diff --git a/npm-packages/mac-v2.4.x/.package-lock.json b/npm-packages/mac-v2.4.x/.package-lock.json index 519fd14..760fd11 100644 --- a/npm-packages/mac-v2.4.x/.package-lock.json +++ b/npm-packages/mac-v2.4.x/.package-lock.json @@ -1,668 +1,639 @@ { - "name": "ccc-tnt-psd2ui", - "version": "0.0.1", - "lockfileVersion": 2, - "requires": true, - "packages": { - "node_modules/@mapbox/node-pre-gyp": { - "version": "1.0.11", - "resolved": "https://registry.npmmirror.com/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", - "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", - "dependencies": { - "detect-libc": "^2.0.0", - "https-proxy-agent": "^5.0.0", - "make-dir": "^3.1.0", - "node-fetch": "^2.6.7", - "nopt": "^5.0.0", - "npmlog": "^5.0.1", - "rimraf": "^3.0.2", - "semver": "^7.3.5", - "tar": "^6.1.11" - }, - "bin": { - "node-pre-gyp": "bin/node-pre-gyp" - } - }, - "node_modules/@types/base64-js": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/@types/base64-js/-/base64-js-1.3.0.tgz", - "integrity": "sha512-ZmI0sZGAUNXUfMWboWwi4LcfpoVUYldyN6Oe0oJ5cCsHDU/LlRq8nQKPXhYLOx36QYSW9bNIb1vvRrD6K7Llgw==" - }, - "node_modules/@types/pako": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/@types/pako/-/pako-2.0.0.tgz", - "integrity": "sha512-10+iaz93qR5WYxTo+PMifD5TSxiOtdRaxBf7INGGXMQgTCu8Z/7GYWYFUOS3q/G0nE5boj1r4FEB+WSy7s5gbA==" - }, - "node_modules/abbrev": { - "version": "1.1.1", - "resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" - }, - "node_modules/ag-psd": { - "version": "15.3.1", - "resolved": "https://registry.npmmirror.com/ag-psd/-/ag-psd-15.3.1.tgz", - "integrity": "sha512-woH/Yb5OduYCvwH2OPLeqSPaWTmgT3n8WYU1/csuUX/BAUSphqH0B/QdRnBvlW7C+53VIH8c3Mm4GErjQx+L3A==", - "dependencies": { - "@types/base64-js": "^1.3.0", - "@types/pako": "^2.0.0", - "base64-js": "^1.5.1", - "pako": "^2.1.0" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmmirror.com/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/aproba": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/aproba/-/aproba-2.0.0.tgz", - "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" - }, - "node_modules/are-we-there-yet": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", - "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", - "dependencies": { - "delegates": "^1.0.0", - "readable-stream": "^3.6.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/canvas": { - "version": "2.11.2", - "resolved": "https://registry.npmmirror.com/canvas/-/canvas-2.11.2.tgz", - "integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==", - "hasInstallScript": true, - "dependencies": { - "@mapbox/node-pre-gyp": "^1.0.0", - "nan": "^2.17.0", - "simple-get": "^3.0.3" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "engines": { - "node": ">=10" - } - }, - "node_modules/color-support": { - "version": "1.1.3", - "resolved": "https://registry.npmmirror.com/color-support/-/color-support-1.1.3.tgz", - "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", - "bin": { - "color-support": "bin.js" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" - }, - "node_modules/console-control-strings": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/console-control-strings/-/console-control-strings-1.1.0.tgz", - "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true + "name": "ccc-tnt-psd2ui", + "version": "0.0.1", + "lockfileVersion": 2, + "requires": true, + "packages": { + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.10", + "license": "BSD-3-Clause", + "dependencies": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@types/base64-js": { + "version": "1.3.0", + "license": "MIT" + }, + "node_modules/@types/pako": { + "version": "2.0.0", + "license": "MIT" + }, + "node_modules/abbrev": { + "version": "1.1.1", + "license": "ISC" + }, + "node_modules/ag-psd": { + "version": "15.0.1", + "license": "MIT", + "dependencies": { + "@types/base64-js": "^1.3.0", + "@types/pako": "^2.0.0", + "base64-js": "^1.5.1", + "pako": "^2.0.4" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "license": "MIT", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/aproba": { + "version": "2.0.0", + "license": "ISC" + }, + "node_modules/are-we-there-yet": { + "version": "2.0.0", + "license": "ISC", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "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/brace-expansion": { + "version": "1.1.11", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/canvas": { + "version": "2.10.2", + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.0", + "nan": "^2.17.0", + "simple-get": "^3.0.3" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/chownr": { + "version": "2.0.0", + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/color-support": { + "version": "1.1.3", + "license": "ISC", + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "license": "MIT" + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "license": "ISC" + }, + "node_modules/debug": { + "version": "4.3.4", + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decompress-response": { + "version": "4.2.1", + "license": "MIT", + "dependencies": { + "mimic-response": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/delegates": { + "version": "1.0.0", + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.0.1", + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "license": "MIT" + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "license": "ISC", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "license": "ISC" + }, + "node_modules/gauge": { + "version": "3.0.2", + "license": "ISC", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "license": "ISC" + }, + "node_modules/has-unicode": { + "version": "2.0.1", + "license": "ISC" + }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "license": "MIT", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "license": "ISC" + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jsonfile": { + "version": "6.1.0", + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "license": "MIT", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/mimic-response": { + "version": "2.1.0", + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.7", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minipass": { + "version": "3.3.4", + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "license": "MIT", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "license": "MIT" + }, + "node_modules/nan": { + "version": "2.17.0", + "license": "MIT" + }, + "node_modules/node-fetch": { + "version": "2.6.7", + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/nopt": { + "version": "5.0.0", + "license": "ISC", + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/npmlog": { + "version": "5.0.1", + "license": "ISC", + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, + "node_modules/object-assign": { + "version": "4.1.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/pako": { + "version": "2.1.0", + "license": "(MIT AND Zlib)" + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pinyin-pro": { + "version": "3.16.0", + "resolved": "https://registry.npmmirror.com/pinyin-pro/-/pinyin-pro-3.16.0.tgz", + "integrity": "sha512-U4pMQ/KSMM5JmSb+ZcReCIbgzGl/JaglaHqWjCli0hpA0rDdjRbAO67e6fOa3ZFcJzbqfe6bJkaMMmpiWmkXgQ==" + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "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/semver": { + "version": "7.3.8", + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "license": "ISC" + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "license": "ISC" + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "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/simple-get": { + "version": "3.1.1", + "license": "MIT", + "dependencies": { + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tar": { + "version": "6.1.12", + "license": "ISC", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "license": "MIT" + }, + "node_modules/universalify": { + "version": "2.0.0", + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "license": "MIT" + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/wide-align": { + "version": "1.1.5", + "license": "ISC", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "license": "ISC" + }, + "node_modules/yallist": { + "version": "4.0.0", + "license": "ISC" } - } - }, - "node_modules/decompress-response": { - "version": "4.2.1", - "resolved": "https://registry.npmmirror.com/decompress-response/-/decompress-response-4.2.1.tgz", - "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", - "dependencies": { - "mimic-response": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" - }, - "node_modules/detect-libc": { - "version": "2.0.2", - "resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-2.0.2.tgz", - "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", - "engines": { - "node": ">=8" - } - }, - "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" - }, - "node_modules/fs-extra": { - "version": "10.1.0", - "resolved": "https://registry.npmmirror.com/fs-extra/-/fs-extra-10.1.0.tgz", - "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", - "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/fs-minipass/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmmirror.com/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" - }, - "node_modules/gauge": { - "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/gauge/-/gauge-3.0.2.tgz", - "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", - "dependencies": { - "aproba": "^1.0.3 || ^2.0.0", - "color-support": "^1.1.2", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.1", - "object-assign": "^4.1.1", - "signal-exit": "^3.0.0", - "string-width": "^4.2.3", - "strip-ansi": "^6.0.1", - "wide-align": "^1.1.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmmirror.com/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.11", - "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.11.tgz", - "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==" - }, - "node_modules/has-unicode": { - "version": "2.0.1", - "resolved": "https://registry.npmmirror.com/has-unicode/-/has-unicode-2.0.1.tgz", - "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" - }, - "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmmirror.com/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmmirror.com/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmmirror.com/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmmirror.com/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/mimic-response": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/mimic-response/-/mimic-response-2.1.0.tgz", - "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.8", - "resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz", - "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==" - }, - "node_modules/minipass": { - "version": "5.0.0", - "resolved": "https://registry.npmmirror.com/minipass/-/minipass-5.0.0.tgz", - "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/minizlib/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmmirror.com/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmmirror.com/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/nan": { - "version": "2.17.0", - "resolved": "https://registry.npmmirror.com/nan/-/nan-2.17.0.tgz", - "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==" - }, - "node_modules/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/nopt": { - "version": "5.0.0", - "resolved": "https://registry.npmmirror.com/nopt/-/nopt-5.0.0.tgz", - "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/npmlog": { - "version": "5.0.1", - "resolved": "https://registry.npmmirror.com/npmlog/-/npmlog-5.0.1.tgz", - "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", - "dependencies": { - "are-we-there-yet": "^2.0.0", - "console-control-strings": "^1.1.0", - "gauge": "^3.0.0", - "set-blocking": "^2.0.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmmirror.com/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmmirror.com/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/pako": { - "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/pako/-/pako-2.1.0.tgz", - "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmmirror.com/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" - }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmmirror.com/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==" - }, - "node_modules/simple-get": { - "version": "3.1.1", - "resolved": "https://registry.npmmirror.com/simple-get/-/simple-get-3.1.1.tgz", - "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==", - "dependencies": { - "decompress-response": "^4.2.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string-width": { - "version": "4.2.3", - "resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz", - "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", - "dependencies": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.1", - "resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz", - "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", - "dependencies": { - "ansi-regex": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/tar": { - "version": "6.1.15", - "resolved": "https://registry.npmmirror.com/tar/-/tar-6.1.15.tgz", - "integrity": "sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmmirror.com/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "node_modules/universalify": { - "version": "2.0.0", - "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.0.tgz", - "integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==", - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmmirror.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmmirror.com/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/wide-align": { - "version": "1.1.5", - "resolved": "https://registry.npmmirror.com/wide-align/-/wide-align-1.1.5.tgz", - "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", - "dependencies": { - "string-width": "^1.0.2 || 2 || 3 || 4" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } - } } diff --git a/npm-packages/mac-v2.4.x/@mapbox/node-pre-gyp/.github/workflows/codeql.yml b/npm-packages/mac-v2.4.x/@mapbox/node-pre-gyp/.github/workflows/codeql.yml deleted file mode 100644 index 70eaa56..0000000 --- a/npm-packages/mac-v2.4.x/@mapbox/node-pre-gyp/.github/workflows/codeql.yml +++ /dev/null @@ -1,74 +0,0 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# -name: "CodeQL" - -on: - push: - branches: [ "master" ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ "master" ] - schedule: - - cron: '24 5 * * 4' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'javascript' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹ️ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - with: - category: "/language:${{matrix.language}}" diff --git a/npm-packages/mac-v2.4.x/@mapbox/node-pre-gyp/CHANGELOG.md b/npm-packages/mac-v2.4.x/@mapbox/node-pre-gyp/CHANGELOG.md index 990e929..b07e75c 100644 --- a/npm-packages/mac-v2.4.x/@mapbox/node-pre-gyp/CHANGELOG.md +++ b/npm-packages/mac-v2.4.x/@mapbox/node-pre-gyp/CHANGELOG.md @@ -1,8 +1,5 @@ # node-pre-gyp changelog -## 1.0.11 -- Fixes dependabot alert [CVE-2021-44906](https://nvd.nist.gov/vuln/detail/CVE-2021-44906) - ## 1.0.10 - Upgraded minimist to 1.2.6 to address dependabot alert [CVE-2021-44906](https://nvd.nist.gov/vuln/detail/CVE-2021-44906) diff --git a/npm-packages/mac-v2.4.x/@mapbox/node-pre-gyp/package.json b/npm-packages/mac-v2.4.x/@mapbox/node-pre-gyp/package.json index 5e1d6fd..34b0d3c 100644 --- a/npm-packages/mac-v2.4.x/@mapbox/node-pre-gyp/package.json +++ b/npm-packages/mac-v2.4.x/@mapbox/node-pre-gyp/package.json @@ -1,7 +1,7 @@ { "name": "@mapbox/node-pre-gyp", "description": "Node.js native addon binary install tool", - "version": "1.0.11", + "version": "1.0.10", "keywords": [ "native", "addon", diff --git a/npm-packages/mac-v2.4.x/ag-psd/CHANGELOG.md b/npm-packages/mac-v2.4.x/ag-psd/CHANGELOG.md index 0d83a25..8a1371a 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/CHANGELOG.md +++ b/npm-packages/mac-v2.4.x/ag-psd/CHANGELOG.md @@ -1,18 +1,5 @@ # Changelog -## v15.3.0 -- Added support for smart layer puppet filter (`placedLayer.filter`) - -## v15.2.0 -- Added handling missing `font` in text layer style by assuming first font on the list - -## v15.1.0 -- Added support for float color in effects, new color type was added - ```ts - export type FRGB = { fr: number; fg: number; fb: number; }; // values from 0 to 1 (can be above 1) - ``` -- Changed `time` field on `LinkedFile` from `Date` to `string` type - ## v15.0.0 - Added support for frame and timeline animations diff --git a/npm-packages/mac-v2.4.x/ag-psd/README_PSD.md b/npm-packages/mac-v2.4.x/ag-psd/README_PSD.md index 52c70ad..1b744a5 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/README_PSD.md +++ b/npm-packages/mac-v2.4.x/ag-psd/README_PSD.md @@ -686,12 +686,11 @@ Many fields in PSD file support passing color in different color formats (RGBA, ```ts type RGBA = { r: number; g: number; b: number; a: number; }; // values from 0 to 255 type RGB = { r: number; g: number; b: number; }; // values from 0 to 255 -type FRGB = { fr: number; fg: number; fb: number; }; // values from 0 to 1 (can be above 1) type HSB = { h: number; s: number; b: number; }; // values from 0 to 1 type CMYK = { c: number; m: number; y: number; k: number; }; // values from 0 to 255 type LAB = { l: number; a: number; b: number; }; // values `l` from 0 to 1; `a` and `b` from -1 to 1 type Grayscale = { k: number }; // values from 0 to 255 -type Color = RGBA | RGB | FRGB | HSB | CMYK | LAB | Grayscale; +type Color = RGBA | RGB | HSB | CMYK | LAB | Grayscale; ``` When you want to set field with a `Color` type, it's pretty straightforward, you can just choose any of the formats you like and set it on the field: @@ -713,8 +712,6 @@ if ('l' in color) { // color is Grayscale } else if ('a' in color) { // color is RGBA -} else if ('rf' in color) { - // color is FRGB } else { // color is RGB } diff --git a/npm-packages/mac-v2.4.x/ag-psd/TODO b/npm-packages/mac-v2.4.x/ag-psd/TODO index 144ba7c..cfcb5c1 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/TODO +++ b/npm-packages/mac-v2.4.x/ag-psd/TODO @@ -1,3 +1,5 @@ +- remove gulp + - can we remove sectionDivider property ? - can we remove nameSource property ? diff --git a/npm-packages/mac-v2.4.x/ag-psd/clean.js b/npm-packages/mac-v2.4.x/ag-psd/clean.js deleted file mode 100644 index 65dfe95..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/clean.js +++ /dev/null @@ -1,3 +0,0 @@ -const fs = require('fs'); -fs.rmSync('dist', { recursive: true, force: true }); -fs.rmSync('dist-es', { recursive: true, force: true }); diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/abr.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/abr.d.ts index 787629d..85a3e0d 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/abr.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/abr.d.ts @@ -1,132 +1,132 @@ -import { BlendMode, PatternInfo } from './psd'; -export interface Abr { - brushes: Brush[]; - samples: SampleInfo[]; - patterns: PatternInfo[]; -} -export interface SampleInfo { - id: string; - bounds: { - x: number; - y: number; - w: number; - h: number; - }; - alpha: Uint8Array; -} -export interface BrushDynamics { - control: 'off' | 'fade' | 'pen pressure' | 'pen tilt' | 'stylus wheel' | 'initial direction' | 'direction' | 'initial rotation' | 'rotation'; - steps: number; - jitter: number; - minimum: number; -} -export interface BrushShape { - name?: string; - size: number; - angle: number; - roundness: number; - hardness?: number; - spacingOn: boolean; - spacing: number; - flipX: boolean; - flipY: boolean; - sampledData?: string; -} -export interface Brush { - name: string; - shape: BrushShape; - shapeDynamics?: { - sizeDynamics: BrushDynamics; - minimumDiameter: number; - tiltScale: number; - angleDynamics: BrushDynamics; - roundnessDynamics: BrushDynamics; - minimumRoundness: number; - flipX: boolean; - flipY: boolean; - brushProjection: boolean; - }; - scatter?: { - bothAxes: boolean; - scatterDynamics: BrushDynamics; - countDynamics: BrushDynamics; - count: number; - }; - texture?: { - id: string; - name: string; - invert: boolean; - scale: number; - brightness: number; - contrast: number; - blendMode: BlendMode; - depth: number; - depthMinimum: number; - depthDynamics: BrushDynamics; - }; - dualBrush?: { - flip: boolean; - shape: BrushShape; - blendMode: BlendMode; - useScatter: boolean; - spacing: number; - count: number; - bothAxes: boolean; - countDynamics: BrushDynamics; - scatterDynamics: BrushDynamics; - }; - colorDynamics?: { - foregroundBackground: BrushDynamics; - hue: number; - saturation: number; - brightness: number; - purity: number; - perTip: boolean; - }; - transfer?: { - flowDynamics: BrushDynamics; - opacityDynamics: BrushDynamics; - wetnessDynamics: BrushDynamics; - mixDynamics: BrushDynamics; - }; - brushPose?: { - overrideAngle: boolean; - overrideTiltX: boolean; - overrideTiltY: boolean; - overridePressure: boolean; - pressure: number; - tiltX: number; - tiltY: number; - angle: number; - }; - noise: boolean; - wetEdges: boolean; - protectTexture?: boolean; - spacing: number; - brushGroup?: undefined; - interpretation?: boolean; - useBrushSize: boolean; - toolOptions?: { - brushPreset: boolean; - flow: number; - smooth: number; - mode: BlendMode; - opacity: number; - smoothing: boolean; - smoothingValue: number; - smoothingRadiusMode: boolean; - smoothingCatchup: boolean; - smoothingCatchupAtEnd: boolean; - smoothingZoomCompensation: boolean; - pressureSmoothing: boolean; - usePressureOverridesSize: boolean; - usePressureOverridesOpacity: boolean; - useLegacy: boolean; - flowDynamics?: BrushDynamics; - opacityDynamics?: BrushDynamics; - sizeDynamics?: BrushDynamics; - }; -} -export declare function readAbr(buffer: ArrayBufferView, options?: { - logMissingFeatures?: boolean; -}): Abr; +import { BlendMode, PatternInfo } from './psd'; +export interface Abr { + brushes: Brush[]; + samples: SampleInfo[]; + patterns: PatternInfo[]; +} +export interface SampleInfo { + id: string; + bounds: { + x: number; + y: number; + w: number; + h: number; + }; + alpha: Uint8Array; +} +export interface BrushDynamics { + control: 'off' | 'fade' | 'pen pressure' | 'pen tilt' | 'stylus wheel' | 'initial direction' | 'direction' | 'initial rotation' | 'rotation'; + steps: number; + jitter: number; + minimum: number; +} +export interface BrushShape { + name?: string; + size: number; + angle: number; + roundness: number; + hardness?: number; + spacingOn: boolean; + spacing: number; + flipX: boolean; + flipY: boolean; + sampledData?: string; +} +export interface Brush { + name: string; + shape: BrushShape; + shapeDynamics?: { + sizeDynamics: BrushDynamics; + minimumDiameter: number; + tiltScale: number; + angleDynamics: BrushDynamics; + roundnessDynamics: BrushDynamics; + minimumRoundness: number; + flipX: boolean; + flipY: boolean; + brushProjection: boolean; + }; + scatter?: { + bothAxes: boolean; + scatterDynamics: BrushDynamics; + countDynamics: BrushDynamics; + count: number; + }; + texture?: { + id: string; + name: string; + invert: boolean; + scale: number; + brightness: number; + contrast: number; + blendMode: BlendMode; + depth: number; + depthMinimum: number; + depthDynamics: BrushDynamics; + }; + dualBrush?: { + flip: boolean; + shape: BrushShape; + blendMode: BlendMode; + useScatter: boolean; + spacing: number; + count: number; + bothAxes: boolean; + countDynamics: BrushDynamics; + scatterDynamics: BrushDynamics; + }; + colorDynamics?: { + foregroundBackground: BrushDynamics; + hue: number; + saturation: number; + brightness: number; + purity: number; + perTip: boolean; + }; + transfer?: { + flowDynamics: BrushDynamics; + opacityDynamics: BrushDynamics; + wetnessDynamics: BrushDynamics; + mixDynamics: BrushDynamics; + }; + brushPose?: { + overrideAngle: boolean; + overrideTiltX: boolean; + overrideTiltY: boolean; + overridePressure: boolean; + pressure: number; + tiltX: number; + tiltY: number; + angle: number; + }; + noise: boolean; + wetEdges: boolean; + protectTexture?: boolean; + spacing: number; + brushGroup?: undefined; + interpretation?: boolean; + useBrushSize: boolean; + toolOptions?: { + brushPreset: boolean; + flow: number; + smooth: number; + mode: BlendMode; + opacity: number; + smoothing: boolean; + smoothingValue: number; + smoothingRadiusMode: boolean; + smoothingCatchup: boolean; + smoothingCatchupAtEnd: boolean; + smoothingZoomCompensation: boolean; + pressureSmoothing: boolean; + usePressureOverridesSize: boolean; + usePressureOverridesOpacity: boolean; + useLegacy: boolean; + flowDynamics?: BrushDynamics; + opacityDynamics?: BrushDynamics; + sizeDynamics?: BrushDynamics; + }; +} +export declare function readAbr(buffer: ArrayBufferView, options?: { + logMissingFeatures?: boolean; +}): Abr; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/abr.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/abr.js index 9bf39a8..f835ce5 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/abr.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/abr.js @@ -1,266 +1,267 @@ -import { BlnM, parseAngle, parsePercent, parseUnitsToNumber, readVersionAndDescriptor } from './descriptor'; -import { checkSignature, createReader, readBytes, readDataRLE, readInt16, readInt32, readPascalString, readPattern, readSignature, readUint16, readUint32, readUint8, skipBytes } from './psdReader'; -var dynamicsControl = ['off', 'fade', 'pen pressure', 'pen tilt', 'stylus wheel', 'initial direction', 'direction', 'initial rotation', 'rotation']; -function parseDynamics(desc) { - return { - control: dynamicsControl[desc.bVTy], - steps: desc.fStp, - jitter: parsePercent(desc.jitter), - minimum: parsePercent(desc['Mnm ']), - }; -} -function parseBrushShape(desc) { - var shape = { - size: parseUnitsToNumber(desc.Dmtr, 'Pixels'), - angle: parseAngle(desc.Angl), - roundness: parsePercent(desc.Rndn), - spacingOn: desc.Intr, - spacing: parsePercent(desc.Spcn), - flipX: desc.flipX, - flipY: desc.flipY, - }; - if (desc['Nm ']) - shape.name = desc['Nm ']; - if (desc.Hrdn) - shape.hardness = parsePercent(desc.Hrdn); - if (desc.sampledData) - shape.sampledData = desc.sampledData; - return shape; -} -export function readAbr(buffer, options) { - var _a, _b, _c, _d; - if (options === void 0) { options = {}; } - var reader = createReader(buffer.buffer, buffer.byteOffset, buffer.byteLength); - var version = readInt16(reader); - var samples = []; - var brushes = []; - var patterns = []; - if (version === 1 || version === 2) { - throw new Error("Unsupported ABR version (".concat(version, ")")); // TODO: ... - } - else if (version === 6 || version === 7 || version === 9 || version === 10) { - var minorVersion = readInt16(reader); - if (minorVersion !== 1 && minorVersion !== 2) - throw new Error('Unsupported ABR minor version'); - while (reader.offset < reader.view.byteLength) { - checkSignature(reader, '8BIM'); - var type = readSignature(reader); - var size = readUint32(reader); - var end = reader.offset + size; - switch (type) { - case 'samp': { - while (reader.offset < end) { - var brushLength = readUint32(reader); - while (brushLength & 3) - brushLength++; // pad to 4 byte alignment - var brushEnd = reader.offset + brushLength; - var id = readPascalString(reader, 1); - // v1 - Skip the Int16 bounds rectangle and the unknown Int16. - // v2 - Skip the unknown bytes. - skipBytes(reader, minorVersion === 1 ? 10 : 264); - var y = readInt32(reader); - var x = readInt32(reader); - var h = readInt32(reader) - y; - var w = readInt32(reader) - x; - if (w <= 0 || h <= 0) - throw new Error('Invalid bounds'); - var depth = readInt16(reader); - var compression = readUint8(reader); // 0 - raw, 1 - RLE - var alpha = new Uint8Array(w * h); - if (depth === 8) { - if (compression === 0) { - alpha.set(readBytes(reader, alpha.byteLength)); - } - else if (compression === 1) { - readDataRLE(reader, { width: w, height: h, data: alpha }, w, h, 1, [0], false); - } - else { - throw new Error('Invalid compression'); - } - } - else if (depth === 16) { - if (compression === 0) { - for (var i = 0; i < alpha.byteLength; i++) { - alpha[i] = readUint16(reader) >> 8; // convert to 8bit values - } - } - else if (compression === 1) { - throw new Error('not implemented (16bit RLE)'); // TODO: ... - } - else { - throw new Error('Invalid compression'); - } - } - else { - throw new Error('Invalid depth'); - } - samples.push({ id: id, bounds: { x: x, y: y, w: w, h: h }, alpha: alpha }); - reader.offset = brushEnd; - } - break; - } - case 'desc': { - var desc = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - for (var _i = 0, _e = desc.Brsh; _i < _e.length; _i++) { - var brush = _e[_i]; - var b = { - name: brush['Nm '], - shape: parseBrushShape(brush.Brsh), - spacing: parsePercent(brush.Spcn), - // TODO: brushGroup ??? - wetEdges: brush.Wtdg, - noise: brush.Nose, - // TODO: TxtC ??? smoothing / build-up ? - // TODO: 'Rpt ' ??? - useBrushSize: brush.useBrushSize, // ??? - }; - if (brush.interpretation != null) - b.interpretation = brush.interpretation; - if (brush.protectTexture != null) - b.protectTexture = brush.protectTexture; - if (brush.useTipDynamics) { - b.shapeDynamics = { - tiltScale: parsePercent(brush.tiltScale), - sizeDynamics: parseDynamics(brush.szVr), - angleDynamics: parseDynamics(brush.angleDynamics), - roundnessDynamics: parseDynamics(brush.roundnessDynamics), - flipX: brush.flipX, - flipY: brush.flipY, - brushProjection: brush.brushProjection, - minimumDiameter: parsePercent(brush.minimumDiameter), - minimumRoundness: parsePercent(brush.minimumRoundness), - }; - } - if (brush.useScatter) { - b.scatter = { - count: brush['Cnt '], - bothAxes: brush.bothAxes, - countDynamics: parseDynamics(brush.countDynamics), - scatterDynamics: parseDynamics(brush.scatterDynamics), - }; - } - if (brush.useTexture && brush.Txtr) { - b.texture = { - id: brush.Txtr.Idnt, - name: brush.Txtr['Nm '], - blendMode: BlnM.decode(brush.textureBlendMode), - depth: parsePercent(brush.textureDepth), - depthMinimum: parsePercent(brush.minimumDepth), - depthDynamics: parseDynamics(brush.textureDepthDynamics), - scale: parsePercent(brush.textureScale), - invert: brush.InvT, - brightness: brush.textureBrightness, - contrast: brush.textureContrast, - }; - } - var db = brush.dualBrush; - if (db && db.useDualBrush) { - b.dualBrush = { - flip: db.Flip, - shape: parseBrushShape(db.Brsh), - blendMode: BlnM.decode(db.BlnM), - useScatter: db.useScatter, - spacing: parsePercent(db.Spcn), - count: db['Cnt '], - bothAxes: db.bothAxes, - countDynamics: parseDynamics(db.countDynamics), - scatterDynamics: parseDynamics(db.scatterDynamics), - }; - } - if (brush.useColorDynamics) { - b.colorDynamics = { - foregroundBackground: parseDynamics(brush.clVr), - hue: parsePercent(brush['H ']), - saturation: parsePercent(brush.Strt), - brightness: parsePercent(brush.Brgh), - purity: parsePercent(brush.purity), - perTip: brush.colorDynamicsPerTip, - }; - } - if (brush.usePaintDynamics) { - b.transfer = { - flowDynamics: parseDynamics(brush.prVr), - opacityDynamics: parseDynamics(brush.opVr), - wetnessDynamics: parseDynamics(brush.wtVr), - mixDynamics: parseDynamics(brush.mxVr), - }; - } - if (brush.useBrushPose) { - b.brushPose = { - overrideAngle: brush.overridePoseAngle, - overrideTiltX: brush.overridePoseTiltX, - overrideTiltY: brush.overridePoseTiltY, - overridePressure: brush.overridePosePressure, - pressure: parsePercent(brush.brushPosePressure), - tiltX: brush.brushPoseTiltX, - tiltY: brush.brushPoseTiltY, - angle: brush.brushPoseAngle, - }; - } - var to = brush.toolOptions; - if (to) { - b.toolOptions = { - brushPreset: to.brushPreset, - flow: (_a = to.flow) !== null && _a !== void 0 ? _a : 100, - smooth: (_b = to.Smoo) !== null && _b !== void 0 ? _b : 0, - mode: BlnM.decode(to['Md '] || 'BlnM.Nrml'), - opacity: (_c = to.Opct) !== null && _c !== void 0 ? _c : 100, - smoothing: !!to.smoothing, - smoothingValue: to.smoothingValue || 0, - smoothingRadiusMode: !!to.smoothingRadiusMode, - smoothingCatchup: !!to.smoothingCatchup, - smoothingCatchupAtEnd: !!to.smoothingCatchupAtEnd, - smoothingZoomCompensation: !!to.smoothingZoomCompensation, - pressureSmoothing: !!to.pressureSmoothing, - usePressureOverridesSize: !!to.usePressureOverridesSize, - usePressureOverridesOpacity: !!to.usePressureOverridesOpacity, - useLegacy: !!to.useLegacy, - }; - if (to.prVr) { - b.toolOptions.flowDynamics = parseDynamics(to.prVr); - } - if (to.opVr) { - b.toolOptions.opacityDynamics = parseDynamics(to.opVr); - } - if (to.szVr) { - b.toolOptions.sizeDynamics = parseDynamics(to.szVr); - } - } - brushes.push(b); - } - break; - } - case 'patt': { - if (reader.offset < end) { // TODO: check multiple patterns - patterns.push(readPattern(reader)); - reader.offset = end; - } - break; - } - case 'phry': { - // TODO: what is this ? - var desc = readVersionAndDescriptor(reader); - if (options.logMissingFeatures) { - if ((_d = desc.hierarchy) === null || _d === void 0 ? void 0 : _d.length) { - console.log('unhandled phry section', desc); - } - } - break; - } - default: - throw new Error("Invalid brush type: ".concat(type)); - } - // align to 4 bytes - while (size % 4) { - reader.offset++; - size++; - } - } - } - else { - throw new Error("Unsupported ABR version (".concat(version, ")")); - } - return { samples: samples, patterns: patterns, brushes: brushes }; -} -//# sourceMappingURL=abr.js.map \ No newline at end of file +import { BlnM, parseAngle, parsePercent, parseUnitsToNumber, readVersionAndDescriptor } from './descriptor'; +import { checkSignature, createReader, readBytes, readDataRLE, readInt16, readInt32, readPascalString, readPattern, readSignature, readUint16, readUint32, readUint8, skipBytes } from './psdReader'; +var dynamicsControl = ['off', 'fade', 'pen pressure', 'pen tilt', 'stylus wheel', 'initial direction', 'direction', 'initial rotation', 'rotation']; +function parseDynamics(desc) { + return { + control: dynamicsControl[desc.bVTy], + steps: desc.fStp, + jitter: parsePercent(desc.jitter), + minimum: parsePercent(desc['Mnm ']), + }; +} +function parseBrushShape(desc) { + var shape = { + size: parseUnitsToNumber(desc.Dmtr, 'Pixels'), + angle: parseAngle(desc.Angl), + roundness: parsePercent(desc.Rndn), + spacingOn: desc.Intr, + spacing: parsePercent(desc.Spcn), + flipX: desc.flipX, + flipY: desc.flipY, + }; + if (desc['Nm ']) + shape.name = desc['Nm ']; + if (desc.Hrdn) + shape.hardness = parsePercent(desc.Hrdn); + if (desc.sampledData) + shape.sampledData = desc.sampledData; + return shape; +} +export function readAbr(buffer, options) { + var _a, _b, _c, _d; + if (options === void 0) { options = {}; } + var reader = createReader(buffer.buffer, buffer.byteOffset, buffer.byteLength); + var version = readInt16(reader); + var samples = []; + var brushes = []; + var patterns = []; + if (version === 1 || version === 2) { + throw new Error("Unsupported ABR version (".concat(version, ")")); // TODO: ... + } + else if (version === 6 || version === 7 || version === 9 || version === 10) { + var minorVersion = readInt16(reader); + if (minorVersion !== 1 && minorVersion !== 2) + throw new Error('Unsupported ABR minor version'); + while (reader.offset < reader.view.byteLength) { + checkSignature(reader, '8BIM'); + var type = readSignature(reader); + var size = readUint32(reader); + var end = reader.offset + size; + switch (type) { + case 'samp': { + while (reader.offset < end) { + var brushLength = readUint32(reader); + while (brushLength & 3) + brushLength++; // pad to 4 byte alignment + var brushEnd = reader.offset + brushLength; + var id = readPascalString(reader, 1); + // v1 - Skip the Int16 bounds rectangle and the unknown Int16. + // v2 - Skip the unknown bytes. + skipBytes(reader, minorVersion === 1 ? 10 : 264); + var y = readInt32(reader); + var x = readInt32(reader); + var h = readInt32(reader) - y; + var w = readInt32(reader) - x; + if (w <= 0 || h <= 0) + throw new Error('Invalid bounds'); + var depth = readInt16(reader); + var compression = readUint8(reader); // 0 - raw, 1 - RLE + var alpha = new Uint8Array(w * h); + if (depth === 8) { + if (compression === 0) { + alpha.set(readBytes(reader, alpha.byteLength)); + } + else if (compression === 1) { + readDataRLE(reader, { width: w, height: h, data: alpha }, w, h, 1, [0], false); + } + else { + throw new Error('Invalid compression'); + } + } + else if (depth === 16) { + if (compression === 0) { + for (var i = 0; i < alpha.byteLength; i++) { + alpha[i] = readUint16(reader) >> 8; // convert to 8bit values + } + } + else if (compression === 1) { + throw new Error('not implemented (16bit RLE)'); // TODO: ... + } + else { + throw new Error('Invalid compression'); + } + } + else { + throw new Error('Invalid depth'); + } + samples.push({ id: id, bounds: { x: x, y: y, w: w, h: h }, alpha: alpha }); + reader.offset = brushEnd; + } + break; + } + case 'desc': { + var desc = readVersionAndDescriptor(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + for (var _i = 0, _e = desc.Brsh; _i < _e.length; _i++) { + var brush = _e[_i]; + var b = { + name: brush['Nm '], + shape: parseBrushShape(brush.Brsh), + spacing: parsePercent(brush.Spcn), + // TODO: brushGroup ??? + wetEdges: brush.Wtdg, + noise: brush.Nose, + // TODO: TxtC ??? smoothing / build-up ? + // TODO: 'Rpt ' ??? + useBrushSize: brush.useBrushSize, // ??? + }; + if (brush.interpretation != null) + b.interpretation = brush.interpretation; + if (brush.protectTexture != null) + b.protectTexture = brush.protectTexture; + if (brush.useTipDynamics) { + b.shapeDynamics = { + tiltScale: parsePercent(brush.tiltScale), + sizeDynamics: parseDynamics(brush.szVr), + angleDynamics: parseDynamics(brush.angleDynamics), + roundnessDynamics: parseDynamics(brush.roundnessDynamics), + flipX: brush.flipX, + flipY: brush.flipY, + brushProjection: brush.brushProjection, + minimumDiameter: parsePercent(brush.minimumDiameter), + minimumRoundness: parsePercent(brush.minimumRoundness), + }; + } + if (brush.useScatter) { + b.scatter = { + count: brush['Cnt '], + bothAxes: brush.bothAxes, + countDynamics: parseDynamics(brush.countDynamics), + scatterDynamics: parseDynamics(brush.scatterDynamics), + }; + } + if (brush.useTexture && brush.Txtr) { + b.texture = { + id: brush.Txtr.Idnt, + name: brush.Txtr['Nm '], + blendMode: BlnM.decode(brush.textureBlendMode), + depth: parsePercent(brush.textureDepth), + depthMinimum: parsePercent(brush.minimumDepth), + depthDynamics: parseDynamics(brush.textureDepthDynamics), + scale: parsePercent(brush.textureScale), + invert: brush.InvT, + brightness: brush.textureBrightness, + contrast: brush.textureContrast, + }; + } + var db = brush.dualBrush; + if (db && db.useDualBrush) { + b.dualBrush = { + flip: db.Flip, + shape: parseBrushShape(db.Brsh), + blendMode: BlnM.decode(db.BlnM), + useScatter: db.useScatter, + spacing: parsePercent(db.Spcn), + count: db['Cnt '], + bothAxes: db.bothAxes, + countDynamics: parseDynamics(db.countDynamics), + scatterDynamics: parseDynamics(db.scatterDynamics), + }; + } + if (brush.useColorDynamics) { + b.colorDynamics = { + foregroundBackground: parseDynamics(brush.clVr), + hue: parsePercent(brush['H ']), + saturation: parsePercent(brush.Strt), + brightness: parsePercent(brush.Brgh), + purity: parsePercent(brush.purity), + perTip: brush.colorDynamicsPerTip, + }; + } + if (brush.usePaintDynamics) { + b.transfer = { + flowDynamics: parseDynamics(brush.prVr), + opacityDynamics: parseDynamics(brush.opVr), + wetnessDynamics: parseDynamics(brush.wtVr), + mixDynamics: parseDynamics(brush.mxVr), + }; + } + if (brush.useBrushPose) { + b.brushPose = { + overrideAngle: brush.overridePoseAngle, + overrideTiltX: brush.overridePoseTiltX, + overrideTiltY: brush.overridePoseTiltY, + overridePressure: brush.overridePosePressure, + pressure: parsePercent(brush.brushPosePressure), + tiltX: brush.brushPoseTiltX, + tiltY: brush.brushPoseTiltY, + angle: brush.brushPoseAngle, + }; + } + var to = brush.toolOptions; + if (to) { + b.toolOptions = { + brushPreset: to.brushPreset, + flow: (_a = to.flow) !== null && _a !== void 0 ? _a : 100, + smooth: (_b = to.Smoo) !== null && _b !== void 0 ? _b : 0, + mode: BlnM.decode(to['Md '] || 'BlnM.Nrml'), + opacity: (_c = to.Opct) !== null && _c !== void 0 ? _c : 100, + smoothing: !!to.smoothing, + smoothingValue: to.smoothingValue || 0, + smoothingRadiusMode: !!to.smoothingRadiusMode, + smoothingCatchup: !!to.smoothingCatchup, + smoothingCatchupAtEnd: !!to.smoothingCatchupAtEnd, + smoothingZoomCompensation: !!to.smoothingZoomCompensation, + pressureSmoothing: !!to.pressureSmoothing, + usePressureOverridesSize: !!to.usePressureOverridesSize, + usePressureOverridesOpacity: !!to.usePressureOverridesOpacity, + useLegacy: !!to.useLegacy, + }; + if (to.prVr) { + b.toolOptions.flowDynamics = parseDynamics(to.prVr); + } + if (to.opVr) { + b.toolOptions.opacityDynamics = parseDynamics(to.opVr); + } + if (to.szVr) { + b.toolOptions.sizeDynamics = parseDynamics(to.szVr); + } + } + brushes.push(b); + } + break; + } + case 'patt': { + if (reader.offset < end) { // TODO: check multiple patterns + patterns.push(readPattern(reader)); + reader.offset = end; + } + break; + } + case 'phry': { + // TODO: what is this ? + var desc = readVersionAndDescriptor(reader); + if (options.logMissingFeatures) { + if ((_d = desc.hierarchy) === null || _d === void 0 ? void 0 : _d.length) { + console.log('unhandled phry section', desc); + } + } + break; + } + default: + throw new Error("Invalid brush type: ".concat(type)); + } + // align to 4 bytes + while (size % 4) { + reader.offset++; + size++; + } + } + } + else { + throw new Error("Unsupported ABR version (".concat(version, ")")); + } + return { samples: samples, patterns: patterns, brushes: brushes }; +} + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFici50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsSUFBSSxFQUF3QixVQUFVLEVBQUUsWUFBWSxFQUFFLGtCQUFrQixFQUFFLHdCQUF3QixFQUFFLE1BQU0sY0FBYyxDQUFDO0FBRWxJLE9BQU8sRUFDTixjQUFjLEVBQUUsWUFBWSxFQUFFLFNBQVMsRUFBRSxXQUFXLEVBQUUsU0FBUyxFQUFFLFNBQVMsRUFBRSxnQkFBZ0IsRUFBRSxXQUFXLEVBQ3pHLGFBQWEsRUFBRSxVQUFVLEVBQUUsVUFBVSxFQUFFLFNBQVMsRUFBRSxTQUFTLEVBQzNELE1BQU0sYUFBYSxDQUFDO0FBcUJyQixJQUFNLGVBQWUsR0FBRyxDQUFDLEtBQUssRUFBRSxNQUFNLEVBQUUsY0FBYyxFQUFFLFVBQVUsRUFBRSxjQUFjLEVBQUUsbUJBQW1CLEVBQUUsV0FBVyxFQUFFLGtCQUFrQixFQUFFLFVBQVUsQ0FBQyxDQUFDO0FBa1B0SixTQUFTLGFBQWEsQ0FBQyxJQUF3QjtJQUM5QyxPQUFPO1FBQ04sT0FBTyxFQUFFLGVBQWUsQ0FBQyxJQUFJLENBQUMsSUFBSSxDQUFRO1FBQzFDLEtBQUssRUFBRSxJQUFJLENBQUMsSUFBSTtRQUNoQixNQUFNLEVBQUUsWUFBWSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUM7UUFDakMsT0FBTyxFQUFFLFlBQVksQ0FBQyxJQUFJLENBQUMsTU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XHRcdFx0XHRpZiAob3B0aW9ucy5sb2dNaXNzaW5nRmVhdHVyZXMpIHtcclxuXHRcdFx0XHRcdFx0aWYgKGRlc2MuaGllcmFyY2h5Py5sZW5ndGgpIHtcclxuXHRcdFx0XHRcdFx0XHRjb25zb2xlLmxvZygndW5oYW5kbGVkIHBocnkgc2VjdGlvbicsIGRlc2MpO1xyXG5cdFx0XHRcdFx0XHR9XHJcblx0XHRcdFx0XHR9XHJcblx0XHRcdFx0XHRicmVhaztcclxuXHRcdFx0XHR9XHJcblx0XHRcdFx0ZGVmYXVsdDpcclxuXHRcdFx0XHRcdHRocm93IG5ldyBFcnJvcihgSW52YWxpZCBicnVzaCB0eXBlOiAke3R5cGV9YCk7XHJcblx0XHRcdH1cclxuXHJcblx0XHRcdC8vIGFsaWduIHRvIDQgYnl0ZXNcclxuXHRcdFx0d2hpbGUgKHNpemUgJSA0KSB7XHJcblx0XHRcdFx0cmVhZGVyLm9mZnNldCsrO1xyXG5cdFx0XHRcdHNpemUrKztcclxuXHRcdFx0fVxyXG5cdFx0fVxyXG5cdH0gZWxzZSB7XHJcblx0XHR0aHJvdyBuZXcgRXJyb3IoYFVuc3VwcG9ydGVkIEFCUiB2ZXJzaW9uICgke3ZlcnNpb259KWApO1xyXG5cdH1cclxuXHJcblx0cmV0dXJuIHsgc2FtcGxlcywgcGF0dGVybnMsIGJydXNoZXMgfTtcclxufVxyXG4iXSwic291cmNlUm9vdCI6IkM6XFxQcm9qZWN0c1xcZ2l0aHViXFxhZy1wc2RcXHNyYyJ9 diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/abr.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/abr.js.map deleted file mode 100644 index 1d446f0..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/abr.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"abr.js","sourceRoot":"../src/","sources":["abr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAwB,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C;AACvC,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/additionalInfo.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/additionalInfo.d.ts index 0d92d0a..2e21b34 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/additionalInfo.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/additionalInfo.d.ts @@ -1,25 +1,25 @@ -import { LayerAdditionalInfo, BezierPath, Psd, ReadOptions, WriteOptions, BooleanOperation, LayerEffectsInfo, LayerVectorMask } from './psd'; -import { PsdReader } from './psdReader'; -import { PsdWriter } from './psdWriter'; -export interface ExtendedWriteOptions extends WriteOptions { - layerIds: Set; - layerToId: Map; -} -type HasMethod = (target: LayerAdditionalInfo) => boolean; -type ReadMethod = (reader: PsdReader, target: LayerAdditionalInfo, left: () => number, psd: Psd, options: ReadOptions) => void; -type WriteMethod = (writer: PsdWriter, target: LayerAdditionalInfo, psd: Psd, options: ExtendedWriteOptions) => void; -export interface InfoHandler { - key: string; - has: HasMethod; - read: ReadMethod; - write: WriteMethod; -} -export declare const infoHandlers: InfoHandler[]; -export declare const infoHandlersMap: { - [key: string]: InfoHandler; -}; -export declare function readBezierKnot(reader: PsdReader, width: number, height: number): number[]; -export declare const booleanOperations: BooleanOperation[]; -export declare function readVectorMask(reader: PsdReader, vectorMask: LayerVectorMask, width: number, height: number, size: number): BezierPath[]; -export declare function hasMultiEffects(effects: LayerEffectsInfo): boolean; -export {}; +import { LayerAdditionalInfo, BezierPath, Psd, ReadOptions, WriteOptions, BooleanOperation, LayerEffectsInfo, LayerVectorMask } from './psd'; +import { PsdReader } from './psdReader'; +import { PsdWriter } from './psdWriter'; +export interface ExtendedWriteOptions extends WriteOptions { + layerIds: Set; + layerToId: Map; +} +declare type HasMethod = (target: LayerAdditionalInfo) => boolean; +declare type ReadMethod = (reader: PsdReader, target: LayerAdditionalInfo, left: () => number, psd: Psd, options: ReadOptions) => void; +declare type WriteMethod = (writer: PsdWriter, target: LayerAdditionalInfo, psd: Psd, options: ExtendedWriteOptions) => void; +export interface InfoHandler { + key: string; + has: HasMethod; + read: ReadMethod; + write: WriteMethod; +} +export declare const infoHandlers: InfoHandler[]; +export declare const infoHandlersMap: { + [key: string]: InfoHandler; +}; +export declare function readBezierKnot(reader: PsdReader, width: number, height: number): number[]; +export declare const booleanOperations: BooleanOperation[]; +export declare function readVectorMask(reader: PsdReader, vectorMask: LayerVectorMask, width: number, height: number, size: number): BezierPath[]; +export declare function hasMultiEffects(effects: LayerEffectsInfo): boolean; +export {}; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/additionalInfo.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/additionalInfo.js index 7b79ad2..06a86da 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/additionalInfo.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/additionalInfo.js @@ -1,2270 +1,2039 @@ -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -import { fromByteArray, toByteArray } from 'base64-js'; -import { readEffects, writeEffects } from './effectsHelpers'; -import { clamp, createEnum, layerColors, MOCK_HANDLERS } from './helpers'; -import { readSignature, readUnicodeString, skipBytes, readUint32, readUint8, readFloat64, readUint16, readBytes, readInt16, checkSignature, readFloat32, readFixedPointPath32, readSection, readColor, readInt32, readPascalString, readUnicodeStringWithLength, readAsciiString, readPattern, } from './psdReader'; -import { writeZeros, writeSignature, writeBytes, writeUint32, writeUint16, writeFloat64, writeUint8, writeInt16, writeFloat32, writeFixedPointPath32, writeUnicodeString, writeSection, writeUnicodeStringWithPadding, writeColor, writePascalString, writeInt32, } from './psdWriter'; -import { Annt, BlnM, parsePercent, parseUnits, parseUnitsOrNumber, strokeStyleLineAlignment, strokeStyleLineCapType, strokeStyleLineJoinType, textGridding, unitsPercent, unitsValue, warpStyle, writeVersionAndDescriptor, readVersionAndDescriptor, Ornt, horzVrtcToXY, xyToHorzVrtc, serializeEffects, parseEffects, parseColor, serializeColor, serializeVectorContent, parseVectorContent, parseTrackList, serializeTrackList, } from './descriptor'; -import { serializeEngineData, parseEngineData } from './engineData'; -import { encodeEngineData, decodeEngineData } from './text'; -export var infoHandlers = []; -export var infoHandlersMap = {}; -function addHandler(key, has, read, write) { - var handler = { key: key, has: has, read: read, write: write }; - infoHandlers.push(handler); - infoHandlersMap[handler.key] = handler; -} -function addHandlerAlias(key, target) { - infoHandlersMap[key] = infoHandlersMap[target]; -} -function hasKey(key) { - return function (target) { return target[key] !== undefined; }; -} -function readLength64(reader) { - if (readUint32(reader)) - throw new Error("Resource size above 4 GB limit at ".concat(reader.offset.toString(16))); - return readUint32(reader); -} -function writeLength64(writer, length) { - writeUint32(writer, 0); - writeUint32(writer, length); -} -addHandler('TySh', hasKey('text'), function (reader, target, leftBytes) { - if (readInt16(reader) !== 1) - throw new Error("Invalid TySh version"); - var transform = []; - for (var i = 0; i < 6; i++) - transform.push(readFloat64(reader)); - if (readInt16(reader) !== 50) - throw new Error("Invalid TySh text version"); - var text = readVersionAndDescriptor(reader); - if (readInt16(reader) !== 1) - throw new Error("Invalid TySh warp version"); - var warp = readVersionAndDescriptor(reader); - target.text = { - transform: transform, - left: readFloat32(reader), - top: readFloat32(reader), - right: readFloat32(reader), - bottom: readFloat32(reader), - text: text['Txt '].replace(/\r/g, '\n'), - index: text.TextIndex || 0, - gridding: textGridding.decode(text.textGridding), - antiAlias: Annt.decode(text.AntA), - orientation: Ornt.decode(text.Ornt), - warp: { - style: warpStyle.decode(warp.warpStyle), - value: warp.warpValue || 0, - perspective: warp.warpPerspective || 0, - perspectiveOther: warp.warpPerspectiveOther || 0, - rotate: Ornt.decode(warp.warpRotate), - }, - }; - if (text.EngineData) { - var engineData = parseEngineData(text.EngineData); - var textData = decodeEngineData(engineData); - // require('fs').writeFileSync(`layer-${target.name}.txt`, require('util').inspect(engineData, false, 99, false), 'utf8'); - // const before = parseEngineData(text.EngineData); - // const after = encodeEngineData(engineData); - // require('fs').writeFileSync('before.txt', require('util').inspect(before, false, 99, false), 'utf8'); - // require('fs').writeFileSync('after.txt', require('util').inspect(after, false, 99, false), 'utf8'); - // console.log(require('util').inspect(parseEngineData(text.EngineData), false, 99, true)); - target.text = __assign(__assign({}, target.text), textData); - // console.log(require('util').inspect(target.text, false, 99, true)); - } - skipBytes(reader, leftBytes()); -}, function (writer, target) { - var text = target.text; - var warp = text.warp || {}; - var transform = text.transform || [1, 0, 0, 1, 0, 0]; - var textDescriptor = { - 'Txt ': (text.text || '').replace(/\r?\n/g, '\r'), - textGridding: textGridding.encode(text.gridding), - Ornt: Ornt.encode(text.orientation), - AntA: Annt.encode(text.antiAlias), - TextIndex: text.index || 0, - EngineData: serializeEngineData(encodeEngineData(text)), - }; - writeInt16(writer, 1); // version - for (var i = 0; i < 6; i++) { - writeFloat64(writer, transform[i]); - } - writeInt16(writer, 50); // text version - writeVersionAndDescriptor(writer, '', 'TxLr', textDescriptor); - writeInt16(writer, 1); // warp version - writeVersionAndDescriptor(writer, '', 'warp', encodeWarp(warp)); - writeFloat32(writer, text.left); - writeFloat32(writer, text.top); - writeFloat32(writer, text.right); - writeFloat32(writer, text.bottom); - // writeZeros(writer, 2); -}); -// vector fills -addHandler('SoCo', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && - target.vectorFill.type === 'color'; }, function (reader, target) { - var descriptor = readVersionAndDescriptor(reader); - target.vectorFill = parseVectorContent(descriptor); -}, function (writer, target) { - var descriptor = serializeVectorContent(target.vectorFill).descriptor; - writeVersionAndDescriptor(writer, '', 'null', descriptor); -}); -addHandler('GdFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && - (target.vectorFill.type === 'solid' || target.vectorFill.type === 'noise'); }, function (reader, target, left) { - var descriptor = readVersionAndDescriptor(reader); - target.vectorFill = parseVectorContent(descriptor); - skipBytes(reader, left()); -}, function (writer, target) { - var descriptor = serializeVectorContent(target.vectorFill).descriptor; - writeVersionAndDescriptor(writer, '', 'null', descriptor); -}); -addHandler('PtFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && - target.vectorFill.type === 'pattern'; }, function (reader, target) { - var descriptor = readVersionAndDescriptor(reader); - target.vectorFill = parseVectorContent(descriptor); -}, function (writer, target) { - var descriptor = serializeVectorContent(target.vectorFill).descriptor; - writeVersionAndDescriptor(writer, '', 'null', descriptor); -}); -addHandler('vscg', function (target) { return target.vectorFill !== undefined && target.vectorStroke !== undefined; }, function (reader, target, left) { - readSignature(reader); // key - var desc = readVersionAndDescriptor(reader); - target.vectorFill = parseVectorContent(desc); - skipBytes(reader, left()); -}, function (writer, target) { - var _a = serializeVectorContent(target.vectorFill), descriptor = _a.descriptor, key = _a.key; - writeSignature(writer, key); - writeVersionAndDescriptor(writer, '', 'null', descriptor); -}); -export function readBezierKnot(reader, width, height) { - var y0 = readFixedPointPath32(reader) * height; - var x0 = readFixedPointPath32(reader) * width; - var y1 = readFixedPointPath32(reader) * height; - var x1 = readFixedPointPath32(reader) * width; - var y2 = readFixedPointPath32(reader) * height; - var x2 = readFixedPointPath32(reader) * width; - return [x0, y0, x1, y1, x2, y2]; -} -function writeBezierKnot(writer, points, width, height) { - writeFixedPointPath32(writer, points[1] / height); // y0 - writeFixedPointPath32(writer, points[0] / width); // x0 - writeFixedPointPath32(writer, points[3] / height); // y1 - writeFixedPointPath32(writer, points[2] / width); // x1 - writeFixedPointPath32(writer, points[5] / height); // y2 - writeFixedPointPath32(writer, points[4] / width); // x2 -} -export var booleanOperations = ['exclude', 'combine', 'subtract', 'intersect']; -export function readVectorMask(reader, vectorMask, width, height, size) { - var end = reader.offset + size; - var paths = vectorMask.paths; - var path = undefined; - while ((end - reader.offset) >= 26) { - var selector = readUint16(reader); - switch (selector) { - case 0: // Closed subpath length record - case 3: { // Open subpath length record - readUint16(reader); // count - var boolOp = readInt16(reader); - readUint16(reader); // always 1 ? - skipBytes(reader, 18); - // TODO: 'combine' here might be wrong - path = { open: selector === 3, operation: boolOp === -1 ? 'combine' : booleanOperations[boolOp], knots: [] }; - paths.push(path); - break; - } - case 1: // Closed subpath Bezier knot, linked - case 2: // Closed subpath Bezier knot, unlinked - case 4: // Open subpath Bezier knot, linked - case 5: // Open subpath Bezier knot, unlinked - path.knots.push({ linked: (selector === 1 || selector === 4), points: readBezierKnot(reader, width, height) }); - break; - case 6: // Path fill rule record - skipBytes(reader, 24); - break; - case 7: { // Clipboard record - // TODO: check if these need to be multiplied by document size - var top_1 = readFixedPointPath32(reader); - var left = readFixedPointPath32(reader); - var bottom = readFixedPointPath32(reader); - var right = readFixedPointPath32(reader); - var resolution = readFixedPointPath32(reader); - skipBytes(reader, 4); - vectorMask.clipboard = { top: top_1, left: left, bottom: bottom, right: right, resolution: resolution }; - break; - } - case 8: // Initial fill rule record - vectorMask.fillStartsWithAllPixels = !!readUint16(reader); - skipBytes(reader, 22); - break; - default: throw new Error('Invalid vmsk section'); - } - } - return paths; -} -addHandler('vmsk', hasKey('vectorMask'), function (reader, target, left, _a) { - var width = _a.width, height = _a.height; - if (readUint32(reader) !== 3) - throw new Error('Invalid vmsk version'); - target.vectorMask = { paths: [] }; - var vectorMask = target.vectorMask; - var flags = readUint32(reader); - vectorMask.invert = (flags & 1) !== 0; - vectorMask.notLink = (flags & 2) !== 0; - vectorMask.disable = (flags & 4) !== 0; - readVectorMask(reader, vectorMask, width, height, left()); - // drawBezierPaths(vectorMask.paths, width, height, 'out.png'); - skipBytes(reader, left()); -}, function (writer, target, _a) { - var width = _a.width, height = _a.height; - var vectorMask = target.vectorMask; - var flags = (vectorMask.invert ? 1 : 0) | - (vectorMask.notLink ? 2 : 0) | - (vectorMask.disable ? 4 : 0); - writeUint32(writer, 3); // version - writeUint32(writer, flags); - // initial entry - writeUint16(writer, 6); - writeZeros(writer, 24); - var clipboard = vectorMask.clipboard; - if (clipboard) { - writeUint16(writer, 7); - writeFixedPointPath32(writer, clipboard.top); - writeFixedPointPath32(writer, clipboard.left); - writeFixedPointPath32(writer, clipboard.bottom); - writeFixedPointPath32(writer, clipboard.right); - writeFixedPointPath32(writer, clipboard.resolution); - writeZeros(writer, 4); - } - if (vectorMask.fillStartsWithAllPixels !== undefined) { - writeUint16(writer, 8); - writeUint16(writer, vectorMask.fillStartsWithAllPixels ? 1 : 0); - writeZeros(writer, 22); - } - for (var _i = 0, _b = vectorMask.paths; _i < _b.length; _i++) { - var path = _b[_i]; - writeUint16(writer, path.open ? 3 : 0); - writeUint16(writer, path.knots.length); - writeUint16(writer, Math.abs(booleanOperations.indexOf(path.operation))); // default to 1 if not found - writeUint16(writer, 1); - writeZeros(writer, 18); // TODO: these are sometimes non-zero - var linkedKnot = path.open ? 4 : 1; - var unlinkedKnot = path.open ? 5 : 2; - for (var _c = 0, _d = path.knots; _c < _d.length; _c++) { - var _e = _d[_c], linked = _e.linked, points = _e.points; - writeUint16(writer, linked ? linkedKnot : unlinkedKnot); - writeBezierKnot(writer, points, width, height); - } - } -}); -// TODO: need to write vmsk if has outline ? -addHandlerAlias('vsms', 'vmsk'); -addHandler('vogk', hasKey('vectorOrigination'), function (reader, target, left) { - if (readInt32(reader) !== 1) - throw new Error("Invalid vogk version"); - var desc = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - target.vectorOrigination = { keyDescriptorList: [] }; - for (var _i = 0, _a = desc.keyDescriptorList; _i < _a.length; _i++) { - var i = _a[_i]; - var item = {}; - if (i.keyShapeInvalidated != null) - item.keyShapeInvalidated = i.keyShapeInvalidated; - if (i.keyOriginType != null) - item.keyOriginType = i.keyOriginType; - if (i.keyOriginResolution != null) - item.keyOriginResolution = i.keyOriginResolution; - if (i.keyOriginShapeBBox) { - item.keyOriginShapeBoundingBox = { - top: parseUnits(i.keyOriginShapeBBox['Top ']), - left: parseUnits(i.keyOriginShapeBBox.Left), - bottom: parseUnits(i.keyOriginShapeBBox.Btom), - right: parseUnits(i.keyOriginShapeBBox.Rght), - }; - } - var rectRadii = i.keyOriginRRectRadii; - if (rectRadii) { - item.keyOriginRRectRadii = { - topRight: parseUnits(rectRadii.topRight), - topLeft: parseUnits(rectRadii.topLeft), - bottomLeft: parseUnits(rectRadii.bottomLeft), - bottomRight: parseUnits(rectRadii.bottomRight), - }; - } - var corners = i.keyOriginBoxCorners; - if (corners) { - item.keyOriginBoxCorners = [ - { x: corners.rectangleCornerA.Hrzn, y: corners.rectangleCornerA.Vrtc }, - { x: corners.rectangleCornerB.Hrzn, y: corners.rectangleCornerB.Vrtc }, - { x: corners.rectangleCornerC.Hrzn, y: corners.rectangleCornerC.Vrtc }, - { x: corners.rectangleCornerD.Hrzn, y: corners.rectangleCornerD.Vrtc }, - ]; - } - var trnf = i.Trnf; - if (trnf) { - item.transform = [trnf.xx, trnf.xy, trnf.xy, trnf.yy, trnf.tx, trnf.ty]; - } - target.vectorOrigination.keyDescriptorList.push(item); - } - skipBytes(reader, left()); -}, function (writer, target) { - target; - var orig = target.vectorOrigination; - var desc = { keyDescriptorList: [] }; - for (var i = 0; i < orig.keyDescriptorList.length; i++) { - var item = orig.keyDescriptorList[i]; - if (item.keyShapeInvalidated) { - desc.keyDescriptorList.push({ keyShapeInvalidated: true, keyOriginIndex: i }); - } - else { - desc.keyDescriptorList.push({}); // we're adding keyOriginIndex at the end - var out = desc.keyDescriptorList[desc.keyDescriptorList.length - 1]; - if (item.keyOriginType != null) - out.keyOriginType = item.keyOriginType; - if (item.keyOriginResolution != null) - out.keyOriginResolution = item.keyOriginResolution; - var radii = item.keyOriginRRectRadii; - if (radii) { - out.keyOriginRRectRadii = { - unitValueQuadVersion: 1, - topRight: unitsValue(radii.topRight, 'topRight'), - topLeft: unitsValue(radii.topLeft, 'topLeft'), - bottomLeft: unitsValue(radii.bottomLeft, 'bottomLeft'), - bottomRight: unitsValue(radii.bottomRight, 'bottomRight'), - }; - } - var box = item.keyOriginShapeBoundingBox; - if (box) { - out.keyOriginShapeBBox = { - unitValueQuadVersion: 1, - 'Top ': unitsValue(box.top, 'top'), - Left: unitsValue(box.left, 'left'), - Btom: unitsValue(box.bottom, 'bottom'), - Rght: unitsValue(box.right, 'right'), - }; - } - var corners = item.keyOriginBoxCorners; - if (corners && corners.length === 4) { - out.keyOriginBoxCorners = { - rectangleCornerA: { Hrzn: corners[0].x, Vrtc: corners[0].y }, - rectangleCornerB: { Hrzn: corners[1].x, Vrtc: corners[1].y }, - rectangleCornerC: { Hrzn: corners[2].x, Vrtc: corners[2].y }, - rectangleCornerD: { Hrzn: corners[3].x, Vrtc: corners[3].y }, - }; - } - var transform = item.transform; - if (transform && transform.length === 6) { - out.Trnf = { - xx: transform[0], - xy: transform[1], - yx: transform[2], - yy: transform[3], - tx: transform[4], - ty: transform[5], - }; - } - out.keyOriginIndex = i; - } - } - writeInt32(writer, 1); // version - writeVersionAndDescriptor(writer, '', 'null', desc); -}); -addHandler('lmfx', function (target) { return target.effects !== undefined && hasMultiEffects(target.effects); }, function (reader, target, left, _, options) { - var version = readUint32(reader); - if (version !== 0) - throw new Error('Invalid lmfx version'); - var desc = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(info, false, 99, true)); - // discard if read in 'lrFX' or 'lfx2' section - target.effects = parseEffects(desc, !!options.logMissingFeatures); - skipBytes(reader, left()); -}, function (writer, target, _, options) { - var desc = serializeEffects(target.effects, !!options.logMissingFeatures, true); - writeUint32(writer, 0); // version - writeVersionAndDescriptor(writer, '', 'null', desc); -}); -addHandler('lrFX', hasKey('effects'), function (reader, target, left) { - if (!target.effects) - target.effects = readEffects(reader); - skipBytes(reader, left()); -}, function (writer, target) { - writeEffects(writer, target.effects); -}); -addHandler('luni', hasKey('name'), function (reader, target, left) { - target.name = readUnicodeString(reader); - skipBytes(reader, left()); -}, function (writer, target) { - writeUnicodeString(writer, target.name); - // writeUint16(writer, 0); // padding (but not extending string length) -}); -addHandler('lnsr', hasKey('nameSource'), function (reader, target) { return target.nameSource = readSignature(reader); }, function (writer, target) { return writeSignature(writer, target.nameSource); }); -addHandler('lyid', hasKey('id'), function (reader, target) { return target.id = readUint32(reader); }, function (writer, target, _psd, options) { - var id = target.id; - while (options.layerIds.has(id)) - id += 100; // make sure we don't have duplicate layer ids - writeUint32(writer, id); - options.layerIds.add(id); - options.layerToId.set(target, id); -}); -addHandler('lsct', hasKey('sectionDivider'), function (reader, target, left) { - target.sectionDivider = { type: readUint32(reader) }; - if (left()) { - checkSignature(reader, '8BIM'); - target.sectionDivider.key = readSignature(reader); - } - if (left()) { - target.sectionDivider.subType = readUint32(reader); - } -}, function (writer, target) { - writeUint32(writer, target.sectionDivider.type); - if (target.sectionDivider.key) { - writeSignature(writer, '8BIM'); - writeSignature(writer, target.sectionDivider.key); - if (target.sectionDivider.subType !== undefined) { - writeUint32(writer, target.sectionDivider.subType); - } - } -}); -// it seems lsdk is used when there's a layer is nested more than 6 levels, but I don't know why? -// maybe some limitation of old version of PS? -addHandlerAlias('lsdk', 'lsct'); -addHandler('clbl', hasKey('blendClippendElements'), function (reader, target) { - target.blendClippendElements = !!readUint8(reader); - skipBytes(reader, 3); -}, function (writer, target) { - writeUint8(writer, target.blendClippendElements ? 1 : 0); - writeZeros(writer, 3); -}); -addHandler('infx', hasKey('blendInteriorElements'), function (reader, target) { - target.blendInteriorElements = !!readUint8(reader); - skipBytes(reader, 3); -}, function (writer, target) { - writeUint8(writer, target.blendInteriorElements ? 1 : 0); - writeZeros(writer, 3); -}); -addHandler('knko', hasKey('knockout'), function (reader, target) { - target.knockout = !!readUint8(reader); - skipBytes(reader, 3); -}, function (writer, target) { - writeUint8(writer, target.knockout ? 1 : 0); - writeZeros(writer, 3); -}); -addHandler('lmgm', hasKey('layerMaskAsGlobalMask'), function (reader, target) { - target.layerMaskAsGlobalMask = !!readUint8(reader); - skipBytes(reader, 3); -}, function (writer, target) { - writeUint8(writer, target.layerMaskAsGlobalMask ? 1 : 0); - writeZeros(writer, 3); -}); -addHandler('lspf', hasKey('protected'), function (reader, target) { - var flags = readUint32(reader); - target.protected = { - transparency: (flags & 0x01) !== 0, - composite: (flags & 0x02) !== 0, - position: (flags & 0x04) !== 0, - }; - if (flags & 0x08) - target.protected.artboards = true; -}, function (writer, target) { - var flags = (target.protected.transparency ? 0x01 : 0) | - (target.protected.composite ? 0x02 : 0) | - (target.protected.position ? 0x04 : 0) | - (target.protected.artboards ? 0x08 : 0); - writeUint32(writer, flags); -}); -addHandler('lclr', hasKey('layerColor'), function (reader, target) { - var color = readUint16(reader); - skipBytes(reader, 6); - target.layerColor = layerColors[color]; -}, function (writer, target) { - var index = layerColors.indexOf(target.layerColor); - writeUint16(writer, index === -1 ? 0 : index); - writeZeros(writer, 6); -}); -addHandler('shmd', function (target) { return target.timestamp !== undefined || target.animationFrames !== undefined || - target.animationFrameFlags !== undefined || target.timeline !== undefined; }, function (reader, target, left, _, options) { - var count = readUint32(reader); - var _loop_1 = function (i) { - checkSignature(reader, '8BIM'); - var key = readSignature(reader); - readUint8(reader); // copy - skipBytes(reader, 3); - readSection(reader, 1, function (left) { - if (key === 'cust') { - var desc = readVersionAndDescriptor(reader); - // console.log('cust', target.name, require('util').inspect(desc, false, 99, true)); - if (desc.layerTime !== undefined) - target.timestamp = desc.layerTime; - } - else if (key === 'mlst') { - var desc = readVersionAndDescriptor(reader); - // console.log('mlst', target.name, require('util').inspect(desc, false, 99, true)); - target.animationFrames = []; - for (var i_1 = 0; i_1 < desc.LaSt.length; i_1++) { - var f = desc.LaSt[i_1]; - var frame = { frames: f.FrLs }; - if (f.enab !== undefined) - frame.enable = f.enab; - if (f.Ofst) - frame.offset = horzVrtcToXY(f.Ofst); - if (f.FXRf) - frame.referencePoint = horzVrtcToXY(f.FXRf); - if (f.Lefx) - frame.effects = parseEffects(f.Lefx, !!options.logMissingFeatures); - if (f.blendOptions && f.blendOptions.Opct) - frame.opacity = parsePercent(f.blendOptions.Opct); - target.animationFrames.push(frame); - } - } - else if (key === 'mdyn') { - // frame flags - readUint16(reader); // unknown - var propagate = readUint8(reader); - var flags = readUint8(reader); - target.animationFrameFlags = { - propagateFrameOne: !propagate, - unifyLayerPosition: (flags & 1) !== 0, - unifyLayerStyle: (flags & 2) !== 0, - unifyLayerVisibility: (flags & 4) !== 0, - }; - } - else if (key === 'tmln') { - var desc = readVersionAndDescriptor(reader); - var timeScope = desc.timeScope; - // console.log('tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); - var timeline = { - start: timeScope.Strt, - duration: timeScope.duration, - inTime: timeScope.inTime, - outTime: timeScope.outTime, - autoScope: desc.autoScope, - audioLevel: desc.audioLevel, - }; - if (desc.trackList) { - timeline.tracks = parseTrackList(desc.trackList, !!options.logMissingFeatures); - } - target.timeline = timeline; - // console.log('tmln:result', target.name, target.id, require('util').inspect(timeline, false, 99, true)); - } - else { - options.logDevFeatures && console.log('Unhandled "shmd" section key', key); - } - skipBytes(reader, left()); - }); - }; - for (var i = 0; i < count; i++) { - _loop_1(i); - } - skipBytes(reader, left()); -}, function (writer, target, _, options) { - var animationFrames = target.animationFrames, animationFrameFlags = target.animationFrameFlags, timestamp = target.timestamp, timeline = target.timeline; - var count = 0; - if (animationFrames) - count++; - if (animationFrameFlags) - count++; - if (timeline) - count++; - if (timestamp !== undefined) - count++; - writeUint32(writer, count); - if (animationFrames) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'mlst'); - writeUint8(writer, 0); // copy (always false) - writeZeros(writer, 3); - writeSection(writer, 2, function () { - var _a; - var desc = { - LaID: (_a = target.id) !== null && _a !== void 0 ? _a : 0, - LaSt: [], - }; - for (var i = 0; i < animationFrames.length; i++) { - var f = animationFrames[i]; - var frame = {}; - if (f.enable !== undefined) - frame.enab = f.enable; - frame.FrLs = f.frames; - if (f.offset) - frame.Ofst = xyToHorzVrtc(f.offset); - if (f.referencePoint) - frame.FXRf = xyToHorzVrtc(f.referencePoint); - if (f.effects) - frame.Lefx = serializeEffects(f.effects, false, false); - if (f.opacity !== undefined) - frame.blendOptions = { Opct: unitsPercent(f.opacity) }; - desc.LaSt.push(frame); - } - writeVersionAndDescriptor(writer, '', 'null', desc); - }, true); - } - if (animationFrameFlags) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'mdyn'); - writeUint8(writer, 0); // copy (always false) - writeZeros(writer, 3); - writeSection(writer, 2, function () { - writeUint16(writer, 0); // unknown - writeUint8(writer, animationFrameFlags.propagateFrameOne ? 0x0 : 0xf); - writeUint8(writer, (animationFrameFlags.unifyLayerPosition ? 1 : 0) | - (animationFrameFlags.unifyLayerStyle ? 2 : 0) | - (animationFrameFlags.unifyLayerVisibility ? 4 : 0)); - }); - } - if (timeline) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'tmln'); - writeUint8(writer, 0); // copy (always false) - writeZeros(writer, 3); - writeSection(writer, 2, function () { - var desc = { - Vrsn: 1, - timeScope: { - Vrsn: 1, - Strt: timeline.start, - duration: timeline.duration, - inTime: timeline.inTime, - outTime: timeline.outTime, - }, - autoScope: timeline.autoScope, - audioLevel: timeline.audioLevel, - }; - if (timeline.tracks) { - desc.trackList = serializeTrackList(timeline.tracks); - } - var id = options.layerToId.get(target) || target.id || 0; - if (!id) - throw new Error('You need to provide layer.id value whan writing document with animations'); - desc.LyrI = id; - // console.log('WRITE:tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); - writeVersionAndDescriptor(writer, '', 'null', desc, 'anim'); - }, true); - } - if (timestamp !== undefined) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'cust'); - writeUint8(writer, 0); // copy (always false) - writeZeros(writer, 3); - writeSection(writer, 2, function () { - var desc = { - layerTime: timestamp, - }; - writeVersionAndDescriptor(writer, '', 'metadata', desc); - }, true); - } -}); -addHandler('vstk', hasKey('vectorStroke'), function (reader, target, left) { - var desc = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - target.vectorStroke = { - strokeEnabled: desc.strokeEnabled, - fillEnabled: desc.fillEnabled, - lineWidth: parseUnits(desc.strokeStyleLineWidth), - lineDashOffset: parseUnits(desc.strokeStyleLineDashOffset), - miterLimit: desc.strokeStyleMiterLimit, - lineCapType: strokeStyleLineCapType.decode(desc.strokeStyleLineCapType), - lineJoinType: strokeStyleLineJoinType.decode(desc.strokeStyleLineJoinType), - lineAlignment: strokeStyleLineAlignment.decode(desc.strokeStyleLineAlignment), - scaleLock: desc.strokeStyleScaleLock, - strokeAdjust: desc.strokeStyleStrokeAdjust, - lineDashSet: desc.strokeStyleLineDashSet.map(parseUnits), - blendMode: BlnM.decode(desc.strokeStyleBlendMode), - opacity: parsePercent(desc.strokeStyleOpacity), - content: parseVectorContent(desc.strokeStyleContent), - resolution: desc.strokeStyleResolution, - }; - skipBytes(reader, left()); -}, function (writer, target) { - var _a, _b, _c; - var stroke = target.vectorStroke; - var descriptor = { - strokeStyleVersion: 2, - strokeEnabled: !!stroke.strokeEnabled, - fillEnabled: !!stroke.fillEnabled, - strokeStyleLineWidth: stroke.lineWidth || { value: 3, units: 'Points' }, - strokeStyleLineDashOffset: stroke.lineDashOffset || { value: 0, units: 'Points' }, - strokeStyleMiterLimit: (_a = stroke.miterLimit) !== null && _a !== void 0 ? _a : 100, - strokeStyleLineCapType: strokeStyleLineCapType.encode(stroke.lineCapType), - strokeStyleLineJoinType: strokeStyleLineJoinType.encode(stroke.lineJoinType), - strokeStyleLineAlignment: strokeStyleLineAlignment.encode(stroke.lineAlignment), - strokeStyleScaleLock: !!stroke.scaleLock, - strokeStyleStrokeAdjust: !!stroke.strokeAdjust, - strokeStyleLineDashSet: stroke.lineDashSet || [], - strokeStyleBlendMode: BlnM.encode(stroke.blendMode), - strokeStyleOpacity: unitsPercent((_b = stroke.opacity) !== null && _b !== void 0 ? _b : 1), - strokeStyleContent: serializeVectorContent(stroke.content || { type: 'color', color: { r: 0, g: 0, b: 0 } }).descriptor, - strokeStyleResolution: (_c = stroke.resolution) !== null && _c !== void 0 ? _c : 72, - }; - writeVersionAndDescriptor(writer, '', 'strokeStyle', descriptor); -}); -addHandler('artb', // per-layer arboard info -hasKey('artboard'), function (reader, target, left) { - var desc = readVersionAndDescriptor(reader); - var rect = desc.artboardRect; - target.artboard = { - rect: { top: rect['Top '], left: rect.Left, bottom: rect.Btom, right: rect.Rght }, - guideIndices: desc.guideIndeces, - presetName: desc.artboardPresetName, - color: parseColor(desc['Clr ']), - backgroundType: desc.artboardBackgroundType, - }; - skipBytes(reader, left()); -}, function (writer, target) { - var _a; - var artboard = target.artboard; - var rect = artboard.rect; - var desc = { - artboardRect: { 'Top ': rect.top, Left: rect.left, Btom: rect.bottom, Rght: rect.right }, - guideIndeces: artboard.guideIndices || [], - artboardPresetName: artboard.presetName || '', - 'Clr ': serializeColor(artboard.color), - artboardBackgroundType: (_a = artboard.backgroundType) !== null && _a !== void 0 ? _a : 1, - }; - writeVersionAndDescriptor(writer, '', 'artboard', desc); -}); -addHandler('sn2P', hasKey('usingAlignedRendering'), function (reader, target) { return target.usingAlignedRendering = !!readUint32(reader); }, function (writer, target) { return writeUint32(writer, target.usingAlignedRendering ? 1 : 0); }); -var placedLayerTypes = ['unknown', 'vector', 'raster', 'image stack']; -function parseWarp(warp) { - var _a, _b, _c, _d, _e, _f; - var result = __assign(__assign({ style: warpStyle.decode(warp.warpStyle) }, (warp.warpValues ? { values: warp.warpValues } : { value: warp.warpValue || 0 })), { perspective: warp.warpPerspective || 0, perspectiveOther: warp.warpPerspectiveOther || 0, rotate: Ornt.decode(warp.warpRotate), bounds: warp.bounds && { - top: parseUnitsOrNumber(warp.bounds['Top ']), - left: parseUnitsOrNumber(warp.bounds.Left), - bottom: parseUnitsOrNumber(warp.bounds.Btom), - right: parseUnitsOrNumber(warp.bounds.Rght), - }, uOrder: warp.uOrder, vOrder: warp.vOrder }); - if (warp.deformNumRows != null || warp.deformNumCols != null) { - result.deformNumRows = warp.deformNumRows; - result.deformNumCols = warp.deformNumCols; - } - var envelopeWarp = warp.customEnvelopeWarp; - if (envelopeWarp) { - result.customEnvelopeWarp = { - meshPoints: [], - }; - var xs = ((_a = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Hrzn'; })) === null || _a === void 0 ? void 0 : _a.values) || []; - var ys = ((_b = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Vrtc'; })) === null || _b === void 0 ? void 0 : _b.values) || []; - for (var i = 0; i < xs.length; i++) { - result.customEnvelopeWarp.meshPoints.push({ x: xs[i], y: ys[i] }); - } - if (envelopeWarp.quiltSliceX || envelopeWarp.quiltSliceY) { - result.customEnvelopeWarp.quiltSliceX = ((_d = (_c = envelopeWarp.quiltSliceX) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.values) || []; - result.customEnvelopeWarp.quiltSliceY = ((_f = (_e = envelopeWarp.quiltSliceY) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.values) || []; - } - } - return result; -} -function isQuiltWarp(warp) { - var _a, _b; - return warp.deformNumCols != null || warp.deformNumRows != null || - ((_a = warp.customEnvelopeWarp) === null || _a === void 0 ? void 0 : _a.quiltSliceX) || ((_b = warp.customEnvelopeWarp) === null || _b === void 0 ? void 0 : _b.quiltSliceY); -} -function encodeWarp(warp) { - var bounds = warp.bounds; - var desc = __assign(__assign({ warpStyle: warpStyle.encode(warp.style) }, (warp.values ? { warpValues: warp.values } : { warpValue: warp.value })), { warpPerspective: warp.perspective || 0, warpPerspectiveOther: warp.perspectiveOther || 0, warpRotate: Ornt.encode(warp.rotate), bounds: { - 'Top ': unitsValue(bounds && bounds.top || { units: 'Pixels', value: 0 }, 'bounds.top'), - Left: unitsValue(bounds && bounds.left || { units: 'Pixels', value: 0 }, 'bounds.left'), - Btom: unitsValue(bounds && bounds.bottom || { units: 'Pixels', value: 0 }, 'bounds.bottom'), - Rght: unitsValue(bounds && bounds.right || { units: 'Pixels', value: 0 }, 'bounds.right'), - }, uOrder: warp.uOrder || 0, vOrder: warp.vOrder || 0 }); - var isQuilt = isQuiltWarp(warp); - if (isQuilt) { - var desc2 = desc; - desc2.deformNumRows = warp.deformNumRows || 0; - desc2.deformNumCols = warp.deformNumCols || 0; - } - var customEnvelopeWarp = warp.customEnvelopeWarp; - if (customEnvelopeWarp) { - var meshPoints = customEnvelopeWarp.meshPoints || []; - if (isQuilt) { - var desc2 = desc; - desc2.customEnvelopeWarp = { - quiltSliceX: [{ - type: 'quiltSliceX', - values: customEnvelopeWarp.quiltSliceX || [], - }], - quiltSliceY: [{ - type: 'quiltSliceY', - values: customEnvelopeWarp.quiltSliceY || [], - }], - meshPoints: [ - { type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) }, - { type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) }, - ], - }; - } - else { - desc.customEnvelopeWarp = { - meshPoints: [ - { type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) }, - { type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) }, - ], - }; - } - } - return desc; -} -addHandler('PlLd', hasKey('placedLayer'), function (reader, target, left) { - if (readSignature(reader) !== 'plcL') - throw new Error("Invalid PlLd signature"); - if (readInt32(reader) !== 3) - throw new Error("Invalid PlLd version"); - var id = readPascalString(reader, 1); - var pageNumber = readInt32(reader); - var totalPages = readInt32(reader); // TODO: check how this works ? - readInt32(reader); // anitAliasPolicy 16 - var placedLayerType = readInt32(reader); // 0 = unknown, 1 = vector, 2 = raster, 3 = image stack - if (!placedLayerTypes[placedLayerType]) - throw new Error('Invalid PlLd type'); - var transform = []; - for (var i = 0; i < 8; i++) - transform.push(readFloat64(reader)); // x, y of 4 corners of the transform - var warpVersion = readInt32(reader); - if (warpVersion !== 0) - throw new Error("Invalid Warp version ".concat(warpVersion)); - var warp = readVersionAndDescriptor(reader); - target.placedLayer = target.placedLayer || { - id: id, - type: placedLayerTypes[placedLayerType], - pageNumber: pageNumber, - totalPages: totalPages, - transform: transform, - warp: parseWarp(warp), - }; - // console.log('PlLd warp', require('util').inspect(warp, false, 99, true)); - // console.log('PlLd', require('util').inspect(target.placedLayer, false, 99, true)); - skipBytes(reader, left()); -}, function (writer, target) { - var placed = target.placedLayer; - writeSignature(writer, 'plcL'); - writeInt32(writer, 3); // version - writePascalString(writer, placed.id, 1); - writeInt32(writer, 1); // pageNumber - writeInt32(writer, 1); // totalPages - writeInt32(writer, 16); // anitAliasPolicy - if (placedLayerTypes.indexOf(placed.type) === -1) - throw new Error('Invalid placedLayer type'); - writeInt32(writer, placedLayerTypes.indexOf(placed.type)); - for (var i = 0; i < 8; i++) - writeFloat64(writer, placed.transform[i]); - writeInt32(writer, 0); // warp version - var isQuilt = placed.warp && isQuiltWarp(placed.warp); - var type = isQuilt ? 'quiltWarp' : 'warp'; - writeVersionAndDescriptor(writer, '', type, encodeWarp(placed.warp || {}), type); -}); -function uint8ToFloat32(array) { - return new Float32Array(array.buffer.slice(array.byteOffset), 0, array.byteLength / 4); -} -function uint8ToUint32(array) { - return new Uint32Array(array.buffer.slice(array.byteOffset), 0, array.byteLength / 4); -} -function toUint8(array) { - return new Uint8Array(array.buffer, array.byteOffset, array.byteLength); -} -function arrayToPoints(array) { - var points = []; - for (var i = 0; i < array.length; i += 2) { - points.push({ x: array[i], y: array[i + 1] }); - } - return points; -} -function pointsToArray(points) { - var array = []; - for (var i = 0; i < points.length; i++) { - array.push(points[i].x, points[i].y); - } - return array; -} -function uin8ToPoints(array) { - return arrayToPoints(uint8ToFloat32(array)); -} -function hrznVrtcToPoint(desc) { - return { - x: parseUnits(desc.Hrzn), - y: parseUnits(desc.Vrtc), - }; -} -function pointToHrznVrtc(point) { - return { - Hrzn: unitsValue(point.x, 'x'), - Vrtc: unitsValue(point.y, 'y'), - }; -} -function parseFilterFX(desc) { - return { - enabled: desc.enab, - validAtPosition: desc.validAtPosition, - maskEnabled: desc.filterMaskEnable, - maskLinked: desc.filterMaskLinked, - maskExtendWithWhite: desc.filterMaskExtendWithWhite, - list: desc.filterFXList.map(function (f) { return ({ - id: f.filterID, - name: f['Nm '], - opacity: parsePercent(f.blendOptions.Opct), - blendMode: BlnM.decode(f.blendOptions['Md ']), - enabled: f.enab, - hasOptions: f.hasoptions, - foregroundColor: parseColor(f.FrgC), - backgroundColor: parseColor(f.BckC), - filter: { - rigidType: f.Fltr.rigidType, - bounds: [ - { x: f.Fltr.PuX0, y: f.Fltr.PuY0, }, - { x: f.Fltr.PuX1, y: f.Fltr.PuY1, }, - { x: f.Fltr.PuX2, y: f.Fltr.PuY2, }, - { x: f.Fltr.PuX3, y: f.Fltr.PuY3, }, - ], - puppetShapeList: f.Fltr.puppetShapeList.map(function (p) { return ({ - rigidType: p.rigidType, - // TODO: VrsM - // TODO: VrsN - originalVertexArray: uin8ToPoints(p.originalVertexArray), - deformedVertexArray: uin8ToPoints(p.deformedVertexArray), - indexArray: Array.from(uint8ToUint32(p.indexArray)), - pinOffsets: arrayToPoints(p.pinOffsets), - posFinalPins: arrayToPoints(p.posFinalPins), - pinVertexIndices: p.pinVertexIndices, - selectedPin: p.selectedPin, - pinPosition: arrayToPoints(p.PinP), - pinRotation: p.PnRt, - pinOverlay: p.PnOv, - pinDepth: p.PnDp, - meshQuality: p.meshQuality, - meshExpansion: p.meshExpansion, - meshRigidity: p.meshRigidity, - imageResolution: p.imageResolution, - meshBoundaryPath: { - pathComponents: p.meshBoundaryPath.pathComponents.map(function (c) { return ({ - shapeOperation: c.shapeOperation.split('.')[1], - paths: c.SbpL.map(function (t) { return ({ - closed: t.Clsp, - points: t['Pts '].map(function (pt) { return ({ - anchor: hrznVrtcToPoint(pt.Anch), - forward: hrznVrtcToPoint(pt['Fwd ']), - backward: hrznVrtcToPoint(pt['Bwd ']), - smooth: pt.Smoo, - }); }), - }); }), - }); }), - }, - }); }), - }, - }); }), - }; -} -function serializeFilterFX(filter) { - return { - enab: filter.enabled, - validAtPosition: filter.validAtPosition, - filterMaskEnable: filter.maskEnabled, - filterMaskLinked: filter.maskLinked, - filterMaskExtendWithWhite: filter.maskExtendWithWhite, - filterFXList: (filter.list || []).map(function (f) { return ({ - 'Nm ': f.name, - blendOptions: { - Opct: unitsPercent(f.opacity), - 'Md ': BlnM.encode(f.blendMode), - }, - enab: f.enabled, - hasoptions: f.hasOptions, - FrgC: serializeColor(f.foregroundColor), - BckC: serializeColor(f.backgroundColor), - Fltr: { - 'null': ['Ordn.Trgt'], - rigidType: f.filter.rigidType, - puppetShapeList: (f.filter.puppetShapeList || []).map(function (p) { return ({ - rigidType: p.rigidType, - VrsM: 1, - VrsN: 0, - originalVertexArray: toUint8(new Float32Array(pointsToArray(p.originalVertexArray))), - deformedVertexArray: toUint8(new Float32Array(pointsToArray(p.deformedVertexArray))), - indexArray: toUint8(new Uint32Array(p.indexArray)), - pinOffsets: pointsToArray(p.pinOffsets), - posFinalPins: pointsToArray(p.posFinalPins), - selectedPin: p.selectedPin, - pinVertexIndices: p.pinVertexIndices, - PinP: pointsToArray(p.pinPosition), - PnRt: p.pinRotation, - PnOv: p.pinOverlay, - PnDp: p.pinDepth, - meshQuality: p.meshQuality, - meshExpansion: p.meshExpansion, - meshRigidity: p.meshRigidity, - imageResolution: p.imageResolution, - meshBoundaryPath: { - pathComponents: (p.meshBoundaryPath.pathComponents || []).map(function (c) { return ({ - shapeOperation: "shapeOperation.".concat(c.shapeOperation), - SbpL: (c.paths || []).map(function (path) { return ({ - Clsp: path.closed, - 'Pts ': (path.points || []).map(function (pt) { return ({ - Anch: pointToHrznVrtc(pt.anchor), - 'Fwd ': pointToHrznVrtc(pt.forward), - 'Bwd ': pointToHrznVrtc(pt.backward), - Smoo: pt.smooth, - }); }), - }); }), - }); }), - }, - }); }), - PuX0: f.filter.bounds[0].x, - PuX1: f.filter.bounds[1].x, - PuX2: f.filter.bounds[2].x, - PuX3: f.filter.bounds[3].x, - PuY0: f.filter.bounds[0].y, - PuY1: f.filter.bounds[1].y, - PuY2: f.filter.bounds[2].y, - PuY3: f.filter.bounds[3].y, - }, - filterID: f.id, - }); }), - }; -} -addHandler('SoLd', hasKey('placedLayer'), function (reader, target, left) { - if (readSignature(reader) !== 'soLD') - throw new Error("Invalid SoLd type"); - var version = readInt32(reader); - if (version !== 4 && version !== 5) - throw new Error("Invalid SoLd version"); - var desc = readVersionAndDescriptor(reader); - // console.log('SoLd', require('util').inspect(desc, false, 99, true)); - // console.log('SoLd.warp', require('util').inspect(desc.warp, false, 99, true)); - // console.log('SoLd.quiltWarp', require('util').inspect(desc.quiltWarp, false, 99, true)); - // desc.filterFX!.filterFXList[0].Fltr.puppetShapeList[0].meshBoundaryPath.pathComponents[0].SbpL[0]['Pts '] = []; - // console.log('filterFX', require('util').inspect(desc.filterFX, false, 99, true)); - target.placedLayer = { - id: desc.Idnt, - placed: desc.placed, - type: placedLayerTypes[desc.Type], - pageNumber: desc.PgNm, - totalPages: desc.totalPages, - frameStep: desc.frameStep, - duration: desc.duration, - frameCount: desc.frameCount, - transform: desc.Trnf, - width: desc['Sz '].Wdth, - height: desc['Sz '].Hght, - resolution: parseUnits(desc.Rslt), - warp: parseWarp((desc.quiltWarp || desc.warp)), - }; - if (desc.nonAffineTransform && desc.nonAffineTransform.some(function (x, i) { return x !== desc.Trnf[i]; })) { - target.placedLayer.nonAffineTransform = desc.nonAffineTransform; - } - if (desc.Crop) - target.placedLayer.crop = desc.Crop; - if (desc.comp) - target.placedLayer.comp = desc.comp; - if (desc.compInfo) - target.placedLayer.compInfo = desc.compInfo; - if (desc.filterFX) - target.placedLayer.filter = parseFilterFX(desc.filterFX); - skipBytes(reader, left()); // HACK -}, function (writer, target) { - var _a, _b; - writeSignature(writer, 'soLD'); - writeInt32(writer, 4); // version - var placed = target.placedLayer; - var desc = __assign(__assign({ Idnt: placed.id, placed: (_a = placed.placed) !== null && _a !== void 0 ? _a : placed.id, PgNm: placed.pageNumber || 1, totalPages: placed.totalPages || 1 }, (placed.crop ? { Crop: placed.crop } : {})), { frameStep: placed.frameStep || { numerator: 0, denominator: 600 }, duration: placed.duration || { numerator: 0, denominator: 600 }, frameCount: placed.frameCount || 0, Annt: 16, Type: placedLayerTypes.indexOf(placed.type), Trnf: placed.transform, nonAffineTransform: (_b = placed.nonAffineTransform) !== null && _b !== void 0 ? _b : placed.transform, quiltWarp: {}, warp: encodeWarp(placed.warp || {}), 'Sz ': { - Wdth: placed.width || 0, - Hght: placed.height || 0, // TODO: find size ? - }, Rslt: placed.resolution ? unitsValue(placed.resolution, 'resolution') : { units: 'Density', value: 72 } }); - if (placed.filter) - desc.filterFX = serializeFilterFX(placed.filter); - if (placed.warp && isQuiltWarp(placed.warp)) { - var quiltWarp = encodeWarp(placed.warp); - desc.quiltWarp = quiltWarp; - desc.warp = { - warpStyle: 'warpStyle.warpNone', - warpValue: quiltWarp.warpValue, - warpPerspective: quiltWarp.warpPerspective, - warpPerspectiveOther: quiltWarp.warpPerspectiveOther, - warpRotate: quiltWarp.warpRotate, - bounds: quiltWarp.bounds, - uOrder: quiltWarp.uOrder, - vOrder: quiltWarp.vOrder, - }; - } - else { - delete desc.quiltWarp; - } - if (placed.comp) - desc.comp = placed.comp; - if (placed.compInfo) - desc.compInfo = placed.compInfo; - writeVersionAndDescriptor(writer, '', 'null', desc, desc.quiltWarp ? 'quiltWarp' : 'warp'); -}); -addHandlerAlias('SoLE', 'SoLd'); -addHandler('fxrp', hasKey('referencePoint'), function (reader, target) { - target.referencePoint = { - x: readFloat64(reader), - y: readFloat64(reader), - }; -}, function (writer, target) { - writeFloat64(writer, target.referencePoint.x); - writeFloat64(writer, target.referencePoint.y); -}); -if (MOCK_HANDLERS) { - addHandler('Patt', function (target) { return target._Patt !== undefined; }, function (reader, target, left) { - // console.log('additional info: Patt'); - target._Patt = readBytes(reader, left()); - }, function (writer, target) { return false && writeBytes(writer, target._Patt); }); -} -else { - addHandler('Patt', // TODO: handle also Pat2 & Pat3 - function (// TODO: handle also Pat2 & Pat3 - target) { return !target; }, function (reader, target, left) { - if (!left()) - return; - skipBytes(reader, left()); - return; // not supported yet - target; - readPattern; - // if (!target.patterns) target.patterns = []; - // target.patterns.push(readPattern(reader)); - // skipBytes(reader, left()); - }, function (_writer, _target) { - }); -} -function readRect(reader) { - var top = readInt32(reader); - var left = readInt32(reader); - var bottom = readInt32(reader); - var right = readInt32(reader); - return { top: top, left: left, bottom: bottom, right: right }; -} -function writeRect(writer, rect) { - writeInt32(writer, rect.top); - writeInt32(writer, rect.left); - writeInt32(writer, rect.bottom); - writeInt32(writer, rect.right); -} -addHandler('Anno', function (target) { return target.annotations !== undefined; }, function (reader, target, left) { - var major = readUint16(reader); - var minor = readUint16(reader); - if (major !== 2 || minor !== 1) - throw new Error('Invalid Anno version'); - var count = readUint32(reader); - var annotations = []; - for (var i = 0; i < count; i++) { - /*const length =*/ readUint32(reader); - var type = readSignature(reader); - var open_1 = !!readUint8(reader); - /*const flags =*/ readUint8(reader); // always 28 - /*const optionalBlocks =*/ readUint16(reader); - var iconLocation = readRect(reader); - var popupLocation = readRect(reader); - var color = readColor(reader); - var author = readPascalString(reader, 2); - var name_1 = readPascalString(reader, 2); - var date = readPascalString(reader, 2); - /*const contentLength =*/ readUint32(reader); - /*const dataType =*/ readSignature(reader); - var dataLength = readUint32(reader); - var data = void 0; - if (type === 'txtA') { - if (dataLength >= 2 && readUint16(reader) === 0xfeff) { - data = readUnicodeStringWithLength(reader, (dataLength - 2) / 2); - } - else { - reader.offset -= 2; - data = readAsciiString(reader, dataLength); - } - data = data.replace(/\r/g, '\n'); - } - else if (type === 'sndA') { - data = readBytes(reader, dataLength); - } - else { - throw new Error('Unknown annotation type'); - } - annotations.push({ - type: type === 'txtA' ? 'text' : 'sound', - open: open_1, - iconLocation: iconLocation, - popupLocation: popupLocation, - color: color, - author: author, - name: name_1, - date: date, - data: data, - }); - } - target.annotations = annotations; - skipBytes(reader, left()); -}, function (writer, target) { - var annotations = target.annotations; - writeUint16(writer, 2); - writeUint16(writer, 1); - writeUint32(writer, annotations.length); - for (var _i = 0, annotations_1 = annotations; _i < annotations_1.length; _i++) { - var annotation = annotations_1[_i]; - var sound = annotation.type === 'sound'; - if (sound && !(annotation.data instanceof Uint8Array)) - throw new Error('Sound annotation data should be Uint8Array'); - if (!sound && typeof annotation.data !== 'string') - throw new Error('Text annotation data should be string'); - var lengthOffset = writer.offset; - writeUint32(writer, 0); // length - writeSignature(writer, sound ? 'sndA' : 'txtA'); - writeUint8(writer, annotation.open ? 1 : 0); - writeUint8(writer, 28); - writeUint16(writer, 1); - writeRect(writer, annotation.iconLocation); - writeRect(writer, annotation.popupLocation); - writeColor(writer, annotation.color); - writePascalString(writer, annotation.author || '', 2); - writePascalString(writer, annotation.name || '', 2); - writePascalString(writer, annotation.date || '', 2); - var contentOffset = writer.offset; - writeUint32(writer, 0); // content length - writeSignature(writer, sound ? 'sndM' : 'txtC'); - writeUint32(writer, 0); // data length - var dataOffset = writer.offset; - if (sound) { - writeBytes(writer, annotation.data); - } - else { - writeUint16(writer, 0xfeff); // unicode string indicator - var text = annotation.data.replace(/\n/g, '\r'); - for (var i = 0; i < text.length; i++) - writeUint16(writer, text.charCodeAt(i)); - } - writer.view.setUint32(lengthOffset, writer.offset - lengthOffset, false); - writer.view.setUint32(contentOffset, writer.offset - contentOffset, false); - writer.view.setUint32(dataOffset - 4, writer.offset - dataOffset, false); - } -}); -addHandler('lnk2', function (target) { return !!target.linkedFiles && target.linkedFiles.length > 0; }, function (reader, target, left, _, options) { - var psd = target; - psd.linkedFiles = psd.linkedFiles || []; - while (left() > 8) { - var size = readLength64(reader); // size - var startOffset = reader.offset; - var type = readSignature(reader); - var version = readInt32(reader); - var id = readPascalString(reader, 1); - var name_2 = readUnicodeString(reader); - var fileType = readSignature(reader).trim(); // ' ' if empty - var fileCreator = readSignature(reader).trim(); // ' ' or '\0\0\0\0' if empty - var dataSize = readLength64(reader); - var hasFileOpenDescriptor = readUint8(reader); - var fileOpenDescriptor = hasFileOpenDescriptor ? readVersionAndDescriptor(reader) : undefined; - var linkedFileDescriptor = type === 'liFE' ? readVersionAndDescriptor(reader) : undefined; - var file = { id: id, name: name_2, data: undefined }; - if (fileType) - file.type = fileType; - if (fileCreator) - file.creator = fileCreator; - if (fileOpenDescriptor) - file.descriptor = fileOpenDescriptor; - if (type === 'liFE' && version > 3) { - var year = readInt32(reader); - var month = readUint8(reader); - var day = readUint8(reader); - var hour = readUint8(reader); - var minute = readUint8(reader); - var seconds = readFloat64(reader); - var wholeSeconds = Math.floor(seconds); - var ms = (seconds - wholeSeconds) * 1000; - file.time = (new Date(year, month, day, hour, minute, wholeSeconds, ms)).toISOString(); - } - var fileSize = type === 'liFE' ? readLength64(reader) : 0; - if (type === 'liFA') - skipBytes(reader, 8); - if (type === 'liFD') - file.data = readBytes(reader, dataSize); - if (version >= 5) - file.childDocumentID = readUnicodeString(reader); - if (version >= 6) - file.assetModTime = readFloat64(reader); - if (version >= 7) - file.assetLockedState = readUint8(reader); - if (type === 'liFE') - file.data = readBytes(reader, fileSize); - if (options.skipLinkedFilesData) - file.data = undefined; - psd.linkedFiles.push(file); - linkedFileDescriptor; - while (size % 4) - size++; - reader.offset = startOffset + size; - } - skipBytes(reader, left()); // ? -}, function (writer, target) { - var psd = target; - for (var _i = 0, _a = psd.linkedFiles; _i < _a.length; _i++) { - var file = _a[_i]; - var version = 2; - if (file.assetLockedState != null) - version = 7; - else if (file.assetModTime != null) - version = 6; - else if (file.childDocumentID != null) - version = 5; - // TODO: else if (file.time != null) version = 3; (only for liFE) - writeUint32(writer, 0); - writeUint32(writer, 0); // size - var sizeOffset = writer.offset; - writeSignature(writer, file.data ? 'liFD' : 'liFA'); - writeInt32(writer, version); - writePascalString(writer, file.id || '', 1); - writeUnicodeStringWithPadding(writer, file.name || ''); - writeSignature(writer, file.type ? "".concat(file.type, " ").substring(0, 4) : ' '); - writeSignature(writer, file.creator ? "".concat(file.creator, " ").substring(0, 4) : '\0\0\0\0'); - writeLength64(writer, file.data ? file.data.byteLength : 0); - if (file.descriptor && file.descriptor.compInfo) { - var desc = { - compInfo: file.descriptor.compInfo, - }; - writeUint8(writer, 1); - writeVersionAndDescriptor(writer, '', 'null', desc); - } - else { - writeUint8(writer, 0); - } - if (file.data) - writeBytes(writer, file.data); - else - writeLength64(writer, 0); - if (version >= 5) - writeUnicodeStringWithPadding(writer, file.childDocumentID || ''); - if (version >= 6) - writeFloat64(writer, file.assetModTime || 0); - if (version >= 7) - writeUint8(writer, file.assetLockedState || 0); - var size = writer.offset - sizeOffset; - writer.view.setUint32(sizeOffset - 4, size, false); // write size - while (size % 4) { - size++; - writeUint8(writer, 0); - } - } -}); -addHandlerAlias('lnkD', 'lnk2'); -addHandlerAlias('lnk3', 'lnk2'); -addHandlerAlias('lnkE', 'lnk2'); -addHandler('pths', hasKey('pathList'), function (reader, target) { - var descriptor = readVersionAndDescriptor(reader); - target.pathList = []; // TODO: read paths (find example with non-empty list) - descriptor; - // console.log('pths', descriptor); // TODO: remove this -}, function (writer, _target) { - var descriptor = { - pathList: [], // TODO: write paths - }; - writeVersionAndDescriptor(writer, '', 'pathsDataClass', descriptor); -}); -addHandler('lyvr', hasKey('version'), function (reader, target) { return target.version = readUint32(reader); }, function (writer, target) { return writeUint32(writer, target.version); }); -function adjustmentType(type) { - return function (target) { return !!target.adjustment && target.adjustment.type === type; }; -} -addHandler('brit', adjustmentType('brightness/contrast'), function (reader, target, left) { - if (!target.adjustment) { // ignore if got one from CgEd block - target.adjustment = { - type: 'brightness/contrast', - brightness: readInt16(reader), - contrast: readInt16(reader), - meanValue: readInt16(reader), - labColorOnly: !!readUint8(reader), - useLegacy: true, - }; - } - skipBytes(reader, left()); -}, function (writer, target) { - var _a; - var info = target.adjustment; - writeInt16(writer, info.brightness || 0); - writeInt16(writer, info.contrast || 0); - writeInt16(writer, (_a = info.meanValue) !== null && _a !== void 0 ? _a : 127); - writeUint8(writer, info.labColorOnly ? 1 : 0); - writeZeros(writer, 1); -}); -function readLevelsChannel(reader) { - var shadowInput = readInt16(reader); - var highlightInput = readInt16(reader); - var shadowOutput = readInt16(reader); - var highlightOutput = readInt16(reader); - var midtoneInput = readInt16(reader) / 100; - return { shadowInput: shadowInput, highlightInput: highlightInput, shadowOutput: shadowOutput, highlightOutput: highlightOutput, midtoneInput: midtoneInput }; -} -function writeLevelsChannel(writer, channel) { - writeInt16(writer, channel.shadowInput); - writeInt16(writer, channel.highlightInput); - writeInt16(writer, channel.shadowOutput); - writeInt16(writer, channel.highlightOutput); - writeInt16(writer, Math.round(channel.midtoneInput * 100)); -} -addHandler('levl', adjustmentType('levels'), function (reader, target, left) { - if (readUint16(reader) !== 2) - throw new Error('Invalid levl version'); - target.adjustment = __assign(__assign({}, target.adjustment), { type: 'levels', rgb: readLevelsChannel(reader), red: readLevelsChannel(reader), green: readLevelsChannel(reader), blue: readLevelsChannel(reader) }); - skipBytes(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var defaultChannel = { - shadowInput: 0, - highlightInput: 255, - shadowOutput: 0, - highlightOutput: 255, - midtoneInput: 1, - }; - writeUint16(writer, 2); // version - writeLevelsChannel(writer, info.rgb || defaultChannel); - writeLevelsChannel(writer, info.red || defaultChannel); - writeLevelsChannel(writer, info.blue || defaultChannel); - writeLevelsChannel(writer, info.green || defaultChannel); - for (var i = 0; i < 59; i++) - writeLevelsChannel(writer, defaultChannel); -}); -function readCurveChannel(reader) { - var nodes = readUint16(reader); - var channel = []; - for (var j = 0; j < nodes; j++) { - var output = readInt16(reader); - var input = readInt16(reader); - channel.push({ input: input, output: output }); - } - return channel; -} -function writeCurveChannel(writer, channel) { - writeUint16(writer, channel.length); - for (var _i = 0, channel_1 = channel; _i < channel_1.length; _i++) { - var n = channel_1[_i]; - writeUint16(writer, n.output); - writeUint16(writer, n.input); - } -} -addHandler('curv', adjustmentType('curves'), function (reader, target, left) { - readUint8(reader); - if (readUint16(reader) !== 1) - throw new Error('Invalid curv version'); - readUint16(reader); - var channels = readUint16(reader); - var info = { type: 'curves' }; - if (channels & 1) - info.rgb = readCurveChannel(reader); - if (channels & 2) - info.red = readCurveChannel(reader); - if (channels & 4) - info.green = readCurveChannel(reader); - if (channels & 8) - info.blue = readCurveChannel(reader); - target.adjustment = __assign(__assign({}, target.adjustment), info); - // ignoring, duplicate information - // checkSignature(reader, 'Crv '); - // const cVersion = readUint16(reader); - // readUint16(reader); - // const channelCount = readUint16(reader); - // for (let i = 0; i < channelCount; i++) { - // const index = readUint16(reader); - // const nodes = readUint16(reader); - // for (let j = 0; j < nodes; j++) { - // const output = readInt16(reader); - // const input = readInt16(reader); - // } - // } - skipBytes(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var rgb = info.rgb, red = info.red, green = info.green, blue = info.blue; - var channels = 0; - var channelCount = 0; - if (rgb && rgb.length) { - channels |= 1; - channelCount++; - } - if (red && red.length) { - channels |= 2; - channelCount++; - } - if (green && green.length) { - channels |= 4; - channelCount++; - } - if (blue && blue.length) { - channels |= 8; - channelCount++; - } - writeUint8(writer, 0); - writeUint16(writer, 1); // version - writeUint16(writer, 0); - writeUint16(writer, channels); - if (rgb && rgb.length) - writeCurveChannel(writer, rgb); - if (red && red.length) - writeCurveChannel(writer, red); - if (green && green.length) - writeCurveChannel(writer, green); - if (blue && blue.length) - writeCurveChannel(writer, blue); - writeSignature(writer, 'Crv '); - writeUint16(writer, 4); // version - writeUint16(writer, 0); - writeUint16(writer, channelCount); - if (rgb && rgb.length) { - writeUint16(writer, 0); - writeCurveChannel(writer, rgb); - } - if (red && red.length) { - writeUint16(writer, 1); - writeCurveChannel(writer, red); - } - if (green && green.length) { - writeUint16(writer, 2); - writeCurveChannel(writer, green); - } - if (blue && blue.length) { - writeUint16(writer, 3); - writeCurveChannel(writer, blue); - } - writeZeros(writer, 2); -}); -addHandler('expA', adjustmentType('exposure'), function (reader, target, left) { - if (readUint16(reader) !== 1) - throw new Error('Invalid expA version'); - target.adjustment = __assign(__assign({}, target.adjustment), { type: 'exposure', exposure: readFloat32(reader), offset: readFloat32(reader), gamma: readFloat32(reader) }); - skipBytes(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - writeUint16(writer, 1); // version - writeFloat32(writer, info.exposure); - writeFloat32(writer, info.offset); - writeFloat32(writer, info.gamma); - writeZeros(writer, 2); -}); -addHandler('vibA', adjustmentType('vibrance'), function (reader, target, left) { - var desc = readVersionAndDescriptor(reader); - target.adjustment = { type: 'vibrance' }; - if (desc.vibrance !== undefined) - target.adjustment.vibrance = desc.vibrance; - if (desc.Strt !== undefined) - target.adjustment.saturation = desc.Strt; - skipBytes(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var desc = {}; - if (info.vibrance !== undefined) - desc.vibrance = info.vibrance; - if (info.saturation !== undefined) - desc.Strt = info.saturation; - writeVersionAndDescriptor(writer, '', 'null', desc); -}); -function readHueChannel(reader) { - return { - a: readInt16(reader), - b: readInt16(reader), - c: readInt16(reader), - d: readInt16(reader), - hue: readInt16(reader), - saturation: readInt16(reader), - lightness: readInt16(reader), - }; -} -function writeHueChannel(writer, channel) { - var c = channel || {}; - writeInt16(writer, c.a || 0); - writeInt16(writer, c.b || 0); - writeInt16(writer, c.c || 0); - writeInt16(writer, c.d || 0); - writeInt16(writer, c.hue || 0); - writeInt16(writer, c.saturation || 0); - writeInt16(writer, c.lightness || 0); -} -addHandler('hue2', adjustmentType('hue/saturation'), function (reader, target, left) { - if (readUint16(reader) !== 2) - throw new Error('Invalid hue2 version'); - target.adjustment = __assign(__assign({}, target.adjustment), { type: 'hue/saturation', master: readHueChannel(reader), reds: readHueChannel(reader), yellows: readHueChannel(reader), greens: readHueChannel(reader), cyans: readHueChannel(reader), blues: readHueChannel(reader), magentas: readHueChannel(reader) }); - skipBytes(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - writeUint16(writer, 2); // version - writeHueChannel(writer, info.master); - writeHueChannel(writer, info.reds); - writeHueChannel(writer, info.yellows); - writeHueChannel(writer, info.greens); - writeHueChannel(writer, info.cyans); - writeHueChannel(writer, info.blues); - writeHueChannel(writer, info.magentas); -}); -function readColorBalance(reader) { - return { - cyanRed: readInt16(reader), - magentaGreen: readInt16(reader), - yellowBlue: readInt16(reader), - }; -} -function writeColorBalance(writer, value) { - writeInt16(writer, value.cyanRed || 0); - writeInt16(writer, value.magentaGreen || 0); - writeInt16(writer, value.yellowBlue || 0); -} -addHandler('blnc', adjustmentType('color balance'), function (reader, target, left) { - target.adjustment = { - type: 'color balance', - shadows: readColorBalance(reader), - midtones: readColorBalance(reader), - highlights: readColorBalance(reader), - preserveLuminosity: !!readUint8(reader), - }; - skipBytes(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - writeColorBalance(writer, info.shadows || {}); - writeColorBalance(writer, info.midtones || {}); - writeColorBalance(writer, info.highlights || {}); - writeUint8(writer, info.preserveLuminosity ? 1 : 0); - writeZeros(writer, 1); -}); -addHandler('blwh', adjustmentType('black & white'), function (reader, target, left) { - var desc = readVersionAndDescriptor(reader); - target.adjustment = { - type: 'black & white', - reds: desc['Rd '], - yellows: desc.Yllw, - greens: desc['Grn '], - cyans: desc['Cyn '], - blues: desc['Bl '], - magentas: desc.Mgnt, - useTint: !!desc.useTint, - presetKind: desc.bwPresetKind, - presetFileName: desc.blackAndWhitePresetFileName, - }; - if (desc.tintColor !== undefined) - target.adjustment.tintColor = parseColor(desc.tintColor); - skipBytes(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var desc = { - 'Rd ': info.reds || 0, - Yllw: info.yellows || 0, - 'Grn ': info.greens || 0, - 'Cyn ': info.cyans || 0, - 'Bl ': info.blues || 0, - Mgnt: info.magentas || 0, - useTint: !!info.useTint, - tintColor: serializeColor(info.tintColor), - bwPresetKind: info.presetKind || 0, - blackAndWhitePresetFileName: info.presetFileName || '', - }; - writeVersionAndDescriptor(writer, '', 'null', desc); -}); -addHandler('phfl', adjustmentType('photo filter'), function (reader, target, left) { - var version = readUint16(reader); - if (version !== 2 && version !== 3) - throw new Error('Invalid phfl version'); - var color; - if (version === 2) { - color = readColor(reader); - } - else { // version 3 - // TODO: test this, this is probably wrong - color = { - l: readInt32(reader) / 100, - a: readInt32(reader) / 100, - b: readInt32(reader) / 100, - }; - } - target.adjustment = { - type: 'photo filter', - color: color, - density: readUint32(reader) / 100, - preserveLuminosity: !!readUint8(reader), - }; - skipBytes(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - writeUint16(writer, 2); // version - writeColor(writer, info.color || { l: 0, a: 0, b: 0 }); - writeUint32(writer, (info.density || 0) * 100); - writeUint8(writer, info.preserveLuminosity ? 1 : 0); - writeZeros(writer, 3); -}); -function readMixrChannel(reader) { - var red = readInt16(reader); - var green = readInt16(reader); - var blue = readInt16(reader); - skipBytes(reader, 2); - var constant = readInt16(reader); - return { red: red, green: green, blue: blue, constant: constant }; -} -function writeMixrChannel(writer, channel) { - var c = channel || {}; - writeInt16(writer, c.red); - writeInt16(writer, c.green); - writeInt16(writer, c.blue); - writeZeros(writer, 2); - writeInt16(writer, c.constant); -} -addHandler('mixr', adjustmentType('channel mixer'), function (reader, target, left) { - if (readUint16(reader) !== 1) - throw new Error('Invalid mixr version'); - var adjustment = target.adjustment = __assign(__assign({}, target.adjustment), { type: 'channel mixer', monochrome: !!readUint16(reader) }); - if (!adjustment.monochrome) { - adjustment.red = readMixrChannel(reader); - adjustment.green = readMixrChannel(reader); - adjustment.blue = readMixrChannel(reader); - } - adjustment.gray = readMixrChannel(reader); - skipBytes(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - writeUint16(writer, 1); // version - writeUint16(writer, info.monochrome ? 1 : 0); - if (info.monochrome) { - writeMixrChannel(writer, info.gray); - writeZeros(writer, 3 * 5 * 2); - } - else { - writeMixrChannel(writer, info.red); - writeMixrChannel(writer, info.green); - writeMixrChannel(writer, info.blue); - writeMixrChannel(writer, info.gray); - } -}); -var colorLookupType = createEnum('colorLookupType', '3DLUT', { - '3dlut': '3DLUT', - abstractProfile: 'abstractProfile', - deviceLinkProfile: 'deviceLinkProfile', -}); -var LUTFormatType = createEnum('LUTFormatType', 'look', { - look: 'LUTFormatLOOK', - cube: 'LUTFormatCUBE', - '3dl': 'LUTFormat3DL', -}); -var colorLookupOrder = createEnum('colorLookupOrder', 'rgb', { - rgb: 'rgbOrder', - bgr: 'bgrOrder', -}); -addHandler('clrL', adjustmentType('color lookup'), function (reader, target, left) { - if (readUint16(reader) !== 1) - throw new Error('Invalid clrL version'); - var desc = readVersionAndDescriptor(reader); - target.adjustment = { type: 'color lookup' }; - var info = target.adjustment; - if (desc.lookupType !== undefined) - info.lookupType = colorLookupType.decode(desc.lookupType); - if (desc['Nm '] !== undefined) - info.name = desc['Nm ']; - if (desc.Dthr !== undefined) - info.dither = desc.Dthr; - if (desc.profile !== undefined) - info.profile = desc.profile; - if (desc.LUTFormat !== undefined) - info.lutFormat = LUTFormatType.decode(desc.LUTFormat); - if (desc.dataOrder !== undefined) - info.dataOrder = colorLookupOrder.decode(desc.dataOrder); - if (desc.tableOrder !== undefined) - info.tableOrder = colorLookupOrder.decode(desc.tableOrder); - if (desc.LUT3DFileData !== undefined) - info.lut3DFileData = desc.LUT3DFileData; - if (desc.LUT3DFileName !== undefined) - info.lut3DFileName = desc.LUT3DFileName; - skipBytes(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var desc = {}; - if (info.lookupType !== undefined) - desc.lookupType = colorLookupType.encode(info.lookupType); - if (info.name !== undefined) - desc['Nm '] = info.name; - if (info.dither !== undefined) - desc.Dthr = info.dither; - if (info.profile !== undefined) - desc.profile = info.profile; - if (info.lutFormat !== undefined) - desc.LUTFormat = LUTFormatType.encode(info.lutFormat); - if (info.dataOrder !== undefined) - desc.dataOrder = colorLookupOrder.encode(info.dataOrder); - if (info.tableOrder !== undefined) - desc.tableOrder = colorLookupOrder.encode(info.tableOrder); - if (info.lut3DFileData !== undefined) - desc.LUT3DFileData = info.lut3DFileData; - if (info.lut3DFileName !== undefined) - desc.LUT3DFileName = info.lut3DFileName; - writeUint16(writer, 1); // version - writeVersionAndDescriptor(writer, '', 'null', desc); -}); -addHandler('nvrt', adjustmentType('invert'), function (reader, target, left) { - target.adjustment = { type: 'invert' }; - skipBytes(reader, left()); -}, function () { - // nothing to write here -}); -addHandler('post', adjustmentType('posterize'), function (reader, target, left) { - target.adjustment = { - type: 'posterize', - levels: readUint16(reader), - }; - skipBytes(reader, left()); -}, function (writer, target) { - var _a; - var info = target.adjustment; - writeUint16(writer, (_a = info.levels) !== null && _a !== void 0 ? _a : 4); - writeZeros(writer, 2); -}); -addHandler('thrs', adjustmentType('threshold'), function (reader, target, left) { - target.adjustment = { - type: 'threshold', - level: readUint16(reader), - }; - skipBytes(reader, left()); -}, function (writer, target) { - var _a; - var info = target.adjustment; - writeUint16(writer, (_a = info.level) !== null && _a !== void 0 ? _a : 128); - writeZeros(writer, 2); -}); -var grdmColorModels = ['', '', '', 'rgb', 'hsb', '', 'lab']; -addHandler('grdm', adjustmentType('gradient map'), function (reader, target, left) { - if (readUint16(reader) !== 1) - throw new Error('Invalid grdm version'); - var info = { - type: 'gradient map', - gradientType: 'solid', - }; - info.reverse = !!readUint8(reader); - info.dither = !!readUint8(reader); - info.name = readUnicodeString(reader); - info.colorStops = []; - info.opacityStops = []; - var stopsCount = readUint16(reader); - for (var i = 0; i < stopsCount; i++) { - info.colorStops.push({ - location: readUint32(reader), - midpoint: readUint32(reader) / 100, - color: readColor(reader), - }); - skipBytes(reader, 2); - } - var opacityStopsCount = readUint16(reader); - for (var i = 0; i < opacityStopsCount; i++) { - info.opacityStops.push({ - location: readUint32(reader), - midpoint: readUint32(reader) / 100, - opacity: readUint16(reader) / 0xff, - }); - } - var expansionCount = readUint16(reader); - if (expansionCount !== 2) - throw new Error('Invalid grdm expansion count'); - var interpolation = readUint16(reader); - info.smoothness = interpolation / 4096; - var length = readUint16(reader); - if (length !== 32) - throw new Error('Invalid grdm length'); - info.gradientType = readUint16(reader) ? 'noise' : 'solid'; - info.randomSeed = readUint32(reader); - info.addTransparency = !!readUint16(reader); - info.restrictColors = !!readUint16(reader); - info.roughness = readUint32(reader) / 4096; - info.colorModel = (grdmColorModels[readUint16(reader)] || 'rgb'); - info.min = [ - readUint16(reader) / 0x8000, - readUint16(reader) / 0x8000, - readUint16(reader) / 0x8000, - readUint16(reader) / 0x8000, - ]; - info.max = [ - readUint16(reader) / 0x8000, - readUint16(reader) / 0x8000, - readUint16(reader) / 0x8000, - readUint16(reader) / 0x8000, - ]; - skipBytes(reader, left()); - for (var _i = 0, _a = info.colorStops; _i < _a.length; _i++) { - var s = _a[_i]; - s.location /= interpolation; - } - for (var _b = 0, _c = info.opacityStops; _b < _c.length; _b++) { - var s = _c[_b]; - s.location /= interpolation; - } - target.adjustment = info; -}, function (writer, target) { - var _a, _b, _c; - var info = target.adjustment; - writeUint16(writer, 1); // version - writeUint8(writer, info.reverse ? 1 : 0); - writeUint8(writer, info.dither ? 1 : 0); - writeUnicodeStringWithPadding(writer, info.name || ''); - writeUint16(writer, info.colorStops && info.colorStops.length || 0); - var interpolation = Math.round(((_a = info.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096); - for (var _i = 0, _d = info.colorStops || []; _i < _d.length; _i++) { - var s = _d[_i]; - writeUint32(writer, Math.round(s.location * interpolation)); - writeUint32(writer, Math.round(s.midpoint * 100)); - writeColor(writer, s.color); - writeZeros(writer, 2); - } - writeUint16(writer, info.opacityStops && info.opacityStops.length || 0); - for (var _e = 0, _f = info.opacityStops || []; _e < _f.length; _e++) { - var s = _f[_e]; - writeUint32(writer, Math.round(s.location * interpolation)); - writeUint32(writer, Math.round(s.midpoint * 100)); - writeUint16(writer, Math.round(s.opacity * 0xff)); - } - writeUint16(writer, 2); // expansion count - writeUint16(writer, interpolation); - writeUint16(writer, 32); // length - writeUint16(writer, info.gradientType === 'noise' ? 1 : 0); - writeUint32(writer, info.randomSeed || 0); - writeUint16(writer, info.addTransparency ? 1 : 0); - writeUint16(writer, info.restrictColors ? 1 : 0); - writeUint32(writer, Math.round(((_b = info.roughness) !== null && _b !== void 0 ? _b : 1) * 4096)); - var colorModel = grdmColorModels.indexOf((_c = info.colorModel) !== null && _c !== void 0 ? _c : 'rgb'); - writeUint16(writer, colorModel === -1 ? 3 : colorModel); - for (var i = 0; i < 4; i++) - writeUint16(writer, Math.round((info.min && info.min[i] || 0) * 0x8000)); - for (var i = 0; i < 4; i++) - writeUint16(writer, Math.round((info.max && info.max[i] || 0) * 0x8000)); - writeZeros(writer, 4); -}); -function readSelectiveColors(reader) { - return { - c: readInt16(reader), - m: readInt16(reader), - y: readInt16(reader), - k: readInt16(reader), - }; -} -function writeSelectiveColors(writer, cmyk) { - var c = cmyk || {}; - writeInt16(writer, c.c); - writeInt16(writer, c.m); - writeInt16(writer, c.y); - writeInt16(writer, c.k); -} -addHandler('selc', adjustmentType('selective color'), function (reader, target) { - if (readUint16(reader) !== 1) - throw new Error('Invalid selc version'); - var mode = readUint16(reader) ? 'absolute' : 'relative'; - skipBytes(reader, 8); - target.adjustment = { - type: 'selective color', - mode: mode, - reds: readSelectiveColors(reader), - yellows: readSelectiveColors(reader), - greens: readSelectiveColors(reader), - cyans: readSelectiveColors(reader), - blues: readSelectiveColors(reader), - magentas: readSelectiveColors(reader), - whites: readSelectiveColors(reader), - neutrals: readSelectiveColors(reader), - blacks: readSelectiveColors(reader), - }; -}, function (writer, target) { - var info = target.adjustment; - writeUint16(writer, 1); // version - writeUint16(writer, info.mode === 'absolute' ? 1 : 0); - writeZeros(writer, 8); - writeSelectiveColors(writer, info.reds); - writeSelectiveColors(writer, info.yellows); - writeSelectiveColors(writer, info.greens); - writeSelectiveColors(writer, info.cyans); - writeSelectiveColors(writer, info.blues); - writeSelectiveColors(writer, info.magentas); - writeSelectiveColors(writer, info.whites); - writeSelectiveColors(writer, info.neutrals); - writeSelectiveColors(writer, info.blacks); -}); -addHandler('CgEd', function (target) { - var a = target.adjustment; - if (!a) - return false; - return (a.type === 'brightness/contrast' && !a.useLegacy) || - ((a.type === 'levels' || a.type === 'curves' || a.type === 'exposure' || a.type === 'channel mixer' || - a.type === 'hue/saturation') && a.presetFileName !== undefined); -}, function (reader, target, left) { - var desc = readVersionAndDescriptor(reader); - if (desc.Vrsn !== 1) - throw new Error('Invalid CgEd version'); - // this section can specify preset file name for other adjustment types - if ('presetFileName' in desc) { - target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.presetKind, presetFileName: desc.presetFileName }); - } - else if ('curvesPresetFileName' in desc) { - target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.curvesPresetKind, presetFileName: desc.curvesPresetFileName }); - } - else if ('mixerPresetFileName' in desc) { - target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.mixerPresetKind, presetFileName: desc.mixerPresetFileName }); - } - else { - target.adjustment = { - type: 'brightness/contrast', - brightness: desc.Brgh, - contrast: desc.Cntr, - meanValue: desc.means, - useLegacy: !!desc.useLegacy, - labColorOnly: !!desc['Lab '], - auto: !!desc.Auto, - }; - } - skipBytes(reader, left()); -}, function (writer, target) { - var _a, _b, _c, _d; - var info = target.adjustment; - if (info.type === 'levels' || info.type === 'exposure' || info.type === 'hue/saturation') { - var desc = { - Vrsn: 1, - presetKind: (_a = info.presetKind) !== null && _a !== void 0 ? _a : 1, - presetFileName: info.presetFileName || '', - }; - writeVersionAndDescriptor(writer, '', 'null', desc); - } - else if (info.type === 'curves') { - var desc = { - Vrsn: 1, - curvesPresetKind: (_b = info.presetKind) !== null && _b !== void 0 ? _b : 1, - curvesPresetFileName: info.presetFileName || '', - }; - writeVersionAndDescriptor(writer, '', 'null', desc); - } - else if (info.type === 'channel mixer') { - var desc = { - Vrsn: 1, - mixerPresetKind: (_c = info.presetKind) !== null && _c !== void 0 ? _c : 1, - mixerPresetFileName: info.presetFileName || '', - }; - writeVersionAndDescriptor(writer, '', 'null', desc); - } - else if (info.type === 'brightness/contrast') { - var desc = { - Vrsn: 1, - Brgh: info.brightness || 0, - Cntr: info.contrast || 0, - means: (_d = info.meanValue) !== null && _d !== void 0 ? _d : 127, - 'Lab ': !!info.labColorOnly, - useLegacy: !!info.useLegacy, - Auto: !!info.auto, - }; - writeVersionAndDescriptor(writer, '', 'null', desc); - } - else { - throw new Error('Unhandled CgEd case'); - } -}); -addHandler('Txt2', hasKey('engineData'), function (reader, target, left) { - var data = readBytes(reader, left()); - target.engineData = fromByteArray(data); - // const engineData = parseEngineData(data); - // console.log(require('util').inspect(engineData, false, 99, true)); - // require('fs').writeFileSync('resources/engineData2Simple.txt', require('util').inspect(engineData, false, 99, false), 'utf8'); - // require('fs').writeFileSync('test_data.json', JSON.stringify(ed, null, 2), 'utf8'); -}, function (writer, target) { - var buffer = toByteArray(target.engineData); - writeBytes(writer, buffer); -}); -addHandler('FMsk', hasKey('filterMask'), function (reader, target) { - target.filterMask = { - colorSpace: readColor(reader), - opacity: readUint16(reader) / 0xff, - }; -}, function (writer, target) { - var _a; - writeColor(writer, target.filterMask.colorSpace); - writeUint16(writer, clamp((_a = target.filterMask.opacity) !== null && _a !== void 0 ? _a : 1, 0, 1) * 0xff); -}); -addHandler('artd', // document-wide artboard info -function (// document-wide artboard info -target) { return target.artboards !== undefined; }, function (reader, target, left) { - var desc = readVersionAndDescriptor(reader); - target.artboards = { - count: desc['Cnt '], - autoExpandOffset: { horizontal: desc.autoExpandOffset.Hrzn, vertical: desc.autoExpandOffset.Vrtc }, - origin: { horizontal: desc.origin.Hrzn, vertical: desc.origin.Vrtc }, - autoExpandEnabled: desc.autoExpandEnabled, - autoNestEnabled: desc.autoNestEnabled, - autoPositionEnabled: desc.autoPositionEnabled, - shrinkwrapOnSaveEnabled: !!desc.shrinkwrapOnSaveEnabled, - docDefaultNewArtboardBackgroundColor: parseColor(desc.docDefaultNewArtboardBackgroundColor), - docDefaultNewArtboardBackgroundType: desc.docDefaultNewArtboardBackgroundType, - }; - skipBytes(reader, left()); -}, function (writer, target) { - var _a, _b, _c, _d, _e; - var artb = target.artboards; - var desc = { - 'Cnt ': artb.count, - autoExpandOffset: artb.autoExpandOffset ? { Hrzn: artb.autoExpandOffset.horizontal, Vrtc: artb.autoExpandOffset.vertical } : { Hrzn: 0, Vrtc: 0 }, - origin: artb.origin ? { Hrzn: artb.origin.horizontal, Vrtc: artb.origin.vertical } : { Hrzn: 0, Vrtc: 0 }, - autoExpandEnabled: (_a = artb.autoExpandEnabled) !== null && _a !== void 0 ? _a : true, - autoNestEnabled: (_b = artb.autoNestEnabled) !== null && _b !== void 0 ? _b : true, - autoPositionEnabled: (_c = artb.autoPositionEnabled) !== null && _c !== void 0 ? _c : true, - shrinkwrapOnSaveEnabled: (_d = artb.shrinkwrapOnSaveEnabled) !== null && _d !== void 0 ? _d : true, - docDefaultNewArtboardBackgroundColor: serializeColor(artb.docDefaultNewArtboardBackgroundColor), - docDefaultNewArtboardBackgroundType: (_e = artb.docDefaultNewArtboardBackgroundType) !== null && _e !== void 0 ? _e : 1, - }; - writeVersionAndDescriptor(writer, '', 'null', desc, 'artd'); -}); -export function hasMultiEffects(effects) { - return Object.keys(effects).map(function (key) { return effects[key]; }).some(function (v) { return Array.isArray(v) && v.length > 1; }); -} -addHandler('lfx2', function (target) { return target.effects !== undefined && !hasMultiEffects(target.effects); }, function (reader, target, left, _, options) { - var version = readUint32(reader); - if (version !== 0) - throw new Error("Invalid lfx2 version"); - var desc = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - // TODO: don't discard if we got it from lmfx - // discard if read in 'lrFX' section - target.effects = parseEffects(desc, !!options.logMissingFeatures); - skipBytes(reader, left()); -}, function (writer, target, _, options) { - var desc = serializeEffects(target.effects, !!options.logMissingFeatures, false); - // console.log(require('util').inspect(desc, false, 99, true)); - writeUint32(writer, 0); // version - writeVersionAndDescriptor(writer, '', 'null', desc); -}); -addHandler('cinf', hasKey('compositorUsed'), function (reader, target, left) { - var desc = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - target.compositorUsed = { - description: desc.description, - reason: desc.reason, - engine: desc.Engn.split('.')[1], - enableCompCore: desc.enableCompCore.split('.')[1], - enableCompCoreGPU: desc.enableCompCoreGPU.split('.')[1], - compCoreSupport: desc.compCoreSupport.split('.')[1], - compCoreGPUSupport: desc.compCoreGPUSupport.split('.')[1], - }; - skipBytes(reader, left()); -}, function (writer, target) { - var cinf = target.compositorUsed; - var desc = { - Vrsn: { major: 1, minor: 0, fix: 0 }, - // psVersion: { major: 22, minor: 3, fix: 1 }, // TESTING - description: cinf.description, - reason: cinf.reason, - Engn: "Engn.".concat(cinf.engine), - enableCompCore: "enable.".concat(cinf.enableCompCore), - enableCompCoreGPU: "enable.".concat(cinf.enableCompCoreGPU), - // enableCompCoreThreads: `enable.feature`, // TESTING - compCoreSupport: "reason.".concat(cinf.compCoreSupport), - compCoreGPUSupport: "reason.".concat(cinf.compCoreGPUSupport), - }; - writeVersionAndDescriptor(writer, '', 'null', desc); -}); -// extension settings ?, ignore it -addHandler('extn', function (target) { return target._extn !== undefined; }, function (reader, target) { - var desc = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - if (MOCK_HANDLERS) - target._extn = desc; -}, function (writer, target) { - // TODO: need to add correct types for desc fields (resources/src.psd) - if (MOCK_HANDLERS) - writeVersionAndDescriptor(writer, '', 'null', target._extn); -}); -addHandler('iOpa', hasKey('fillOpacity'), function (reader, target) { - target.fillOpacity = readUint8(reader) / 0xff; - skipBytes(reader, 3); -}, function (writer, target) { - writeUint8(writer, target.fillOpacity * 0xff); - writeZeros(writer, 3); -}); -addHandler('brst', hasKey('channelBlendingRestrictions'), function (reader, target, left) { - target.channelBlendingRestrictions = []; - while (left() > 4) { - target.channelBlendingRestrictions.push(readInt32(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.channelBlendingRestrictions; _i < _a.length; _i++) { - var channel = _a[_i]; - writeInt32(writer, channel); - } -}); -addHandler('tsly', hasKey('transparencyShapesLayer'), function (reader, target) { - target.transparencyShapesLayer = !!readUint8(reader); - skipBytes(reader, 3); -}, function (writer, target) { - writeUint8(writer, target.transparencyShapesLayer ? 1 : 0); - writeZeros(writer, 3); -}); -/*addHandler( - 'FEid', - hasKey('filterEffects'), - (reader, _target) => { - const version = readInt32(reader); - if (version < 1 || version > 3) throw new Error(`Invalid filterEffects version ${version}`); - - if (readUint32(reader)) throw new Error('filterEffects: 64 bit length is not supported'); - const length = readUint32(reader); - const end = reader.offset + length; - - while (reader.offset < end) { - console.log('bytes to go', end - reader.offset, 'at', reader.offset.toString(16)); - // - const id = readPascalString(reader, 1); - const effectVersion = readInt32(reader); - if (effectVersion !== 1) throw new Error(`Invalid filterEffect version ${effectVersion}`); - if (readUint32(reader)) throw new Error('filterEffect: 64 bit length is not supported'); - const effectLength = readUint32(reader); - const endOfEffect = reader.offset + effectLength; - const top = readInt32(reader); - const left = readInt32(reader); - const bottom = readInt32(reader); - const right = readInt32(reader); - const depth = readInt32(reader); - const maxChannels = readInt32(reader); - const channels: any[] = []; - - for (let i = 0; i < (maxChannels + 2); i++) { - const exists = readInt32(reader); - if (exists) { - if (readUint32(reader)) throw new Error('filterEffect: 64 bit length is not supported'); - const channelLength = readUint32(reader); - const compressionMode = readUint16(reader); - const data = readBytes(reader, channelLength - 2); - channels.push({ channelLength, compressionMode, data: data?.length + ' bytes' }); - // if (c < 3 || c == 25) e_ = _F.Cn(!0, rL, m, b.rect.F, b.rect.V, X, rp); - // if (c == 0) _c.S = e_; - // if (c == 1) _c.v = e_; - // if (c == 2) _c.e = e_; - // if (c == 25) _c.w = e_; - } else { - channels.push(undefined); - } - } - - console.log('left at the end', endOfEffect - reader.offset); - if (endOfEffect > reader.offset) { - if (readUint8(reader)) { - const compressionMode = readUint16(reader); - const data = endOfEffect > reader.offset ? readBytes(reader, endOfEffect - reader.offset) : undefined; - console.log('extra data', { compressionMode, data: data?.length + ' bytes' }); - } else { - console.log('no extra'); - } - } - - console.log('effect', { - id, - effectVersion, - effectLength, - top, - left, - bottom, - right, - depth, - maxChannels, - channels, - }); - - console.log('bytes left after effect', endOfEffect - reader.offset); - // if (length % 4) skipBytes(reader, 4 - length % 4); - } - - console.log({ version, length }); - }, - (_writer, _target) => { - }, -); - -addHandlerAlias('FXid', 'FEid');*/ -//# sourceMappingURL=additionalInfo.js.map \ No newline at end of file +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import { fromByteArray, toByteArray } from 'base64-js'; +import { readEffects, writeEffects } from './effectsHelpers'; +import { clamp, createEnum, layerColors, MOCK_HANDLERS } from './helpers'; +import { readSignature, readUnicodeString, skipBytes, readUint32, readUint8, readFloat64, readUint16, readBytes, readInt16, checkSignature, readFloat32, readFixedPointPath32, readSection, readColor, readInt32, readPascalString, readUnicodeStringWithLength, readAsciiString, readPattern, } from './psdReader'; +import { writeZeros, writeSignature, writeBytes, writeUint32, writeUint16, writeFloat64, writeUint8, writeInt16, writeFloat32, writeFixedPointPath32, writeUnicodeString, writeSection, writeUnicodeStringWithPadding, writeColor, writePascalString, writeInt32, } from './psdWriter'; +import { Annt, BlnM, parsePercent, parseUnits, parseUnitsOrNumber, strokeStyleLineAlignment, strokeStyleLineCapType, strokeStyleLineJoinType, textGridding, unitsPercent, unitsValue, warpStyle, writeVersionAndDescriptor, readVersionAndDescriptor, Ornt, horzVrtcToXY, xyToHorzVrtc, serializeEffects, parseEffects, parseColor, serializeColor, serializeVectorContent, parseVectorContent, parseTrackList, serializeTrackList, } from './descriptor'; +import { serializeEngineData, parseEngineData } from './engineData'; +import { encodeEngineData, decodeEngineData } from './text'; +export var infoHandlers = []; +export var infoHandlersMap = {}; +function addHandler(key, has, read, write) { + var handler = { key: key, has: has, read: read, write: write }; + infoHandlers.push(handler); + infoHandlersMap[handler.key] = handler; +} +function addHandlerAlias(key, target) { + infoHandlersMap[key] = infoHandlersMap[target]; +} +function hasKey(key) { + return function (target) { return target[key] !== undefined; }; +} +function readLength64(reader) { + if (readUint32(reader)) + throw new Error("Resource size above 4 GB limit at ".concat(reader.offset.toString(16))); + return readUint32(reader); +} +function writeLength64(writer, length) { + writeUint32(writer, 0); + writeUint32(writer, length); +} +addHandler('TySh', hasKey('text'), function (reader, target, leftBytes) { + if (readInt16(reader) !== 1) + throw new Error("Invalid TySh version"); + var transform = []; + for (var i = 0; i < 6; i++) + transform.push(readFloat64(reader)); + if (readInt16(reader) !== 50) + throw new Error("Invalid TySh text version"); + var text = readVersionAndDescriptor(reader); + if (readInt16(reader) !== 1) + throw new Error("Invalid TySh warp version"); + var warp = readVersionAndDescriptor(reader); + target.text = { + transform: transform, + left: readFloat32(reader), + top: readFloat32(reader), + right: readFloat32(reader), + bottom: readFloat32(reader), + text: text['Txt '].replace(/\r/g, '\n'), + index: text.TextIndex || 0, + gridding: textGridding.decode(text.textGridding), + antiAlias: Annt.decode(text.AntA), + orientation: Ornt.decode(text.Ornt), + warp: { + style: warpStyle.decode(warp.warpStyle), + value: warp.warpValue || 0, + perspective: warp.warpPerspective || 0, + perspectiveOther: warp.warpPerspectiveOther || 0, + rotate: Ornt.decode(warp.warpRotate), + }, + }; + if (text.EngineData) { + var engineData = decodeEngineData(parseEngineData(text.EngineData)); + // const before = parseEngineData(text.EngineData); + // const after = encodeEngineData(engineData); + // require('fs').writeFileSync('before.txt', require('util').inspect(before, false, 99, false), 'utf8'); + // require('fs').writeFileSync('after.txt', require('util').inspect(after, false, 99, false), 'utf8'); + // console.log(require('util').inspect(parseEngineData(text.EngineData), false, 99, true)); + target.text = __assign(__assign({}, target.text), engineData); + // console.log(require('util').inspect(target.text, false, 99, true)); + } + skipBytes(reader, leftBytes()); +}, function (writer, target) { + var text = target.text; + var warp = text.warp || {}; + var transform = text.transform || [1, 0, 0, 1, 0, 0]; + var textDescriptor = { + 'Txt ': (text.text || '').replace(/\r?\n/g, '\r'), + textGridding: textGridding.encode(text.gridding), + Ornt: Ornt.encode(text.orientation), + AntA: Annt.encode(text.antiAlias), + TextIndex: text.index || 0, + EngineData: serializeEngineData(encodeEngineData(text)), + }; + writeInt16(writer, 1); // version + for (var i = 0; i < 6; i++) { + writeFloat64(writer, transform[i]); + } + writeInt16(writer, 50); // text version + writeVersionAndDescriptor(writer, '', 'TxLr', textDescriptor); + writeInt16(writer, 1); // warp version + writeVersionAndDescriptor(writer, '', 'warp', encodeWarp(warp)); + writeFloat32(writer, text.left); + writeFloat32(writer, text.top); + writeFloat32(writer, text.right); + writeFloat32(writer, text.bottom); + // writeZeros(writer, 2); +}); +// vector fills +addHandler('SoCo', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && + target.vectorFill.type === 'color'; }, function (reader, target) { + var descriptor = readVersionAndDescriptor(reader); + target.vectorFill = parseVectorContent(descriptor); +}, function (writer, target) { + var descriptor = serializeVectorContent(target.vectorFill).descriptor; + writeVersionAndDescriptor(writer, '', 'null', descriptor); +}); +addHandler('GdFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && + (target.vectorFill.type === 'solid' || target.vectorFill.type === 'noise'); }, function (reader, target, left) { + var descriptor = readVersionAndDescriptor(reader); + target.vectorFill = parseVectorContent(descriptor); + skipBytes(reader, left()); +}, function (writer, target) { + var descriptor = serializeVectorContent(target.vectorFill).descriptor; + writeVersionAndDescriptor(writer, '', 'null', descriptor); +}); +addHandler('PtFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && + target.vectorFill.type === 'pattern'; }, function (reader, target) { + var descriptor = readVersionAndDescriptor(reader); + target.vectorFill = parseVectorContent(descriptor); +}, function (writer, target) { + var descriptor = serializeVectorContent(target.vectorFill).descriptor; + writeVersionAndDescriptor(writer, '', 'null', descriptor); +}); +addHandler('vscg', function (target) { return target.vectorFill !== undefined && target.vectorStroke !== undefined; }, function (reader, target, left) { + readSignature(reader); // key + var desc = readVersionAndDescriptor(reader); + target.vectorFill = parseVectorContent(desc); + skipBytes(reader, left()); +}, function (writer, target) { + var _a = serializeVectorContent(target.vectorFill), descriptor = _a.descriptor, key = _a.key; + writeSignature(writer, key); + writeVersionAndDescriptor(writer, '', 'null', descriptor); +}); +export function readBezierKnot(reader, width, height) { + var y0 = readFixedPointPath32(reader) * height; + var x0 = readFixedPointPath32(reader) * width; + var y1 = readFixedPointPath32(reader) * height; + var x1 = readFixedPointPath32(reader) * width; + var y2 = readFixedPointPath32(reader) * height; + var x2 = readFixedPointPath32(reader) * width; + return [x0, y0, x1, y1, x2, y2]; +} +function writeBezierKnot(writer, points, width, height) { + writeFixedPointPath32(writer, points[1] / height); // y0 + writeFixedPointPath32(writer, points[0] / width); // x0 + writeFixedPointPath32(writer, points[3] / height); // y1 + writeFixedPointPath32(writer, points[2] / width); // x1 + writeFixedPointPath32(writer, points[5] / height); // y2 + writeFixedPointPath32(writer, points[4] / width); // x2 +} +export var booleanOperations = ['exclude', 'combine', 'subtract', 'intersect']; +export function readVectorMask(reader, vectorMask, width, height, size) { + var end = reader.offset + size; + var paths = vectorMask.paths; + var path = undefined; + while ((end - reader.offset) >= 26) { + var selector = readUint16(reader); + switch (selector) { + case 0: // Closed subpath length record + case 3: { // Open subpath length record + readUint16(reader); // count + var boolOp = readInt16(reader); + readUint16(reader); // always 1 ? + skipBytes(reader, 18); + // TODO: 'combine' here might be wrong + path = { open: selector === 3, operation: boolOp === -1 ? 'combine' : booleanOperations[boolOp], knots: [] }; + paths.push(path); + break; + } + case 1: // Closed subpath Bezier knot, linked + case 2: // Closed subpath Bezier knot, unlinked + case 4: // Open subpath Bezier knot, linked + case 5: // Open subpath Bezier knot, unlinked + path.knots.push({ linked: (selector === 1 || selector === 4), points: readBezierKnot(reader, width, height) }); + break; + case 6: // Path fill rule record + skipBytes(reader, 24); + break; + case 7: { // Clipboard record + // TODO: check if these need to be multiplied by document size + var top_1 = readFixedPointPath32(reader); + var left = readFixedPointPath32(reader); + var bottom = readFixedPointPath32(reader); + var right = readFixedPointPath32(reader); + var resolution = readFixedPointPath32(reader); + skipBytes(reader, 4); + vectorMask.clipboard = { top: top_1, left: left, bottom: bottom, right: right, resolution: resolution }; + break; + } + case 8: // Initial fill rule record + vectorMask.fillStartsWithAllPixels = !!readUint16(reader); + skipBytes(reader, 22); + break; + default: throw new Error('Invalid vmsk section'); + } + } + return paths; +} +addHandler('vmsk', hasKey('vectorMask'), function (reader, target, left, _a) { + var width = _a.width, height = _a.height; + if (readUint32(reader) !== 3) + throw new Error('Invalid vmsk version'); + target.vectorMask = { paths: [] }; + var vectorMask = target.vectorMask; + var flags = readUint32(reader); + vectorMask.invert = (flags & 1) !== 0; + vectorMask.notLink = (flags & 2) !== 0; + vectorMask.disable = (flags & 4) !== 0; + readVectorMask(reader, vectorMask, width, height, left()); + // drawBezierPaths(vectorMask.paths, width, height, 'out.png'); + skipBytes(reader, left()); +}, function (writer, target, _a) { + var width = _a.width, height = _a.height; + var vectorMask = target.vectorMask; + var flags = (vectorMask.invert ? 1 : 0) | + (vectorMask.notLink ? 2 : 0) | + (vectorMask.disable ? 4 : 0); + writeUint32(writer, 3); // version + writeUint32(writer, flags); + // initial entry + writeUint16(writer, 6); + writeZeros(writer, 24); + var clipboard = vectorMask.clipboard; + if (clipboard) { + writeUint16(writer, 7); + writeFixedPointPath32(writer, clipboard.top); + writeFixedPointPath32(writer, clipboard.left); + writeFixedPointPath32(writer, clipboard.bottom); + writeFixedPointPath32(writer, clipboard.right); + writeFixedPointPath32(writer, clipboard.resolution); + writeZeros(writer, 4); + } + if (vectorMask.fillStartsWithAllPixels !== undefined) { + writeUint16(writer, 8); + writeUint16(writer, vectorMask.fillStartsWithAllPixels ? 1 : 0); + writeZeros(writer, 22); + } + for (var _i = 0, _b = vectorMask.paths; _i < _b.length; _i++) { + var path = _b[_i]; + writeUint16(writer, path.open ? 3 : 0); + writeUint16(writer, path.knots.length); + writeUint16(writer, Math.abs(booleanOperations.indexOf(path.operation))); // default to 1 if not found + writeUint16(writer, 1); + writeZeros(writer, 18); // TODO: these are sometimes non-zero + var linkedKnot = path.open ? 4 : 1; + var unlinkedKnot = path.open ? 5 : 2; + for (var _c = 0, _d = path.knots; _c < _d.length; _c++) { + var _e = _d[_c], linked = _e.linked, points = _e.points; + writeUint16(writer, linked ? linkedKnot : unlinkedKnot); + writeBezierKnot(writer, points, width, height); + } + } +}); +// TODO: need to write vmsk if has outline ? +addHandlerAlias('vsms', 'vmsk'); +addHandler('vogk', hasKey('vectorOrigination'), function (reader, target, left) { + if (readInt32(reader) !== 1) + throw new Error("Invalid vogk version"); + var desc = readVersionAndDescriptor(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + target.vectorOrigination = { keyDescriptorList: [] }; + for (var _i = 0, _a = desc.keyDescriptorList; _i < _a.length; _i++) { + var i = _a[_i]; + var item = {}; + if (i.keyShapeInvalidated != null) + item.keyShapeInvalidated = i.keyShapeInvalidated; + if (i.keyOriginType != null) + item.keyOriginType = i.keyOriginType; + if (i.keyOriginResolution != null) + item.keyOriginResolution = i.keyOriginResolution; + if (i.keyOriginShapeBBox) { + item.keyOriginShapeBoundingBox = { + top: parseUnits(i.keyOriginShapeBBox['Top ']), + left: parseUnits(i.keyOriginShapeBBox.Left), + bottom: parseUnits(i.keyOriginShapeBBox.Btom), + right: parseUnits(i.keyOriginShapeBBox.Rght), + }; + } + var rectRadii = i.keyOriginRRectRadii; + if (rectRadii) { + item.keyOriginRRectRadii = { + topRight: parseUnits(rectRadii.topRight), + topLeft: parseUnits(rectRadii.topLeft), + bottomLeft: parseUnits(rectRadii.bottomLeft), + bottomRight: parseUnits(rectRadii.bottomRight), + }; + } + var corners = i.keyOriginBoxCorners; + if (corners) { + item.keyOriginBoxCorners = [ + { x: corners.rectangleCornerA.Hrzn, y: corners.rectangleCornerA.Vrtc }, + { x: corners.rectangleCornerB.Hrzn, y: corners.rectangleCornerB.Vrtc }, + { x: corners.rectangleCornerC.Hrzn, y: corners.rectangleCornerC.Vrtc }, + { x: corners.rectangleCornerD.Hrzn, y: corners.rectangleCornerD.Vrtc }, + ]; + } + var trnf = i.Trnf; + if (trnf) { + item.transform = [trnf.xx, trnf.xy, trnf.xy, trnf.yy, trnf.tx, trnf.ty]; + } + target.vectorOrigination.keyDescriptorList.push(item); + } + skipBytes(reader, left()); +}, function (writer, target) { + target; + var orig = target.vectorOrigination; + var desc = { keyDescriptorList: [] }; + for (var i = 0; i < orig.keyDescriptorList.length; i++) { + var item = orig.keyDescriptorList[i]; + if (item.keyShapeInvalidated) { + desc.keyDescriptorList.push({ keyShapeInvalidated: true, keyOriginIndex: i }); + } + else { + desc.keyDescriptorList.push({}); // we're adding keyOriginIndex at the end + var out = desc.keyDescriptorList[desc.keyDescriptorList.length - 1]; + if (item.keyOriginType != null) + out.keyOriginType = item.keyOriginType; + if (item.keyOriginResolution != null) + out.keyOriginResolution = item.keyOriginResolution; + var radii = item.keyOriginRRectRadii; + if (radii) { + out.keyOriginRRectRadii = { + unitValueQuadVersion: 1, + topRight: unitsValue(radii.topRight, 'topRight'), + topLeft: unitsValue(radii.topLeft, 'topLeft'), + bottomLeft: unitsValue(radii.bottomLeft, 'bottomLeft'), + bottomRight: unitsValue(radii.bottomRight, 'bottomRight'), + }; + } + var box = item.keyOriginShapeBoundingBox; + if (box) { + out.keyOriginShapeBBox = { + unitValueQuadVersion: 1, + 'Top ': unitsValue(box.top, 'top'), + Left: unitsValue(box.left, 'left'), + Btom: unitsValue(box.bottom, 'bottom'), + Rght: unitsValue(box.right, 'right'), + }; + } + var corners = item.keyOriginBoxCorners; + if (corners && corners.length === 4) { + out.keyOriginBoxCorners = { + rectangleCornerA: { Hrzn: corners[0].x, Vrtc: corners[0].y }, + rectangleCornerB: { Hrzn: corners[1].x, Vrtc: corners[1].y }, + rectangleCornerC: { Hrzn: corners[2].x, Vrtc: corners[2].y }, + rectangleCornerD: { Hrzn: corners[3].x, Vrtc: corners[3].y }, + }; + } + var transform = item.transform; + if (transform && transform.length === 6) { + out.Trnf = { + xx: transform[0], + xy: transform[1], + yx: transform[2], + yy: transform[3], + tx: transform[4], + ty: transform[5], + }; + } + out.keyOriginIndex = i; + } + } + writeInt32(writer, 1); // version + writeVersionAndDescriptor(writer, '', 'null', desc); +}); +addHandler('lmfx', function (target) { return target.effects !== undefined && hasMultiEffects(target.effects); }, function (reader, target, left, _, options) { + var version = readUint32(reader); + if (version !== 0) + throw new Error('Invalid lmfx version'); + var desc = readVersionAndDescriptor(reader); + // console.log(require('util').inspect(info, false, 99, true)); + // discard if read in 'lrFX' or 'lfx2' section + target.effects = parseEffects(desc, !!options.logMissingFeatures); + skipBytes(reader, left()); +}, function (writer, target, _, options) { + var desc = serializeEffects(target.effects, !!options.logMissingFeatures, true); + writeUint32(writer, 0); // version + writeVersionAndDescriptor(writer, '', 'null', desc); +}); +addHandler('lrFX', hasKey('effects'), function (reader, target, left) { + if (!target.effects) + target.effects = readEffects(reader); + skipBytes(reader, left()); +}, function (writer, target) { + writeEffects(writer, target.effects); +}); +addHandler('luni', hasKey('name'), function (reader, target, left) { + target.name = readUnicodeString(reader); + skipBytes(reader, left()); +}, function (writer, target) { + writeUnicodeString(writer, target.name); + // writeUint16(writer, 0); // padding (but not extending string length) +}); +addHandler('lnsr', hasKey('nameSource'), function (reader, target) { return target.nameSource = readSignature(reader); }, function (writer, target) { return writeSignature(writer, target.nameSource); }); +addHandler('lyid', hasKey('id'), function (reader, target) { return target.id = readUint32(reader); }, function (writer, target, _psd, options) { + var id = target.id; + while (options.layerIds.has(id)) + id += 100; // make sure we don't have duplicate layer ids + writeUint32(writer, id); + options.layerIds.add(id); + options.layerToId.set(target, id); +}); +addHandler('lsct', hasKey('sectionDivider'), function (reader, target, left) { + target.sectionDivider = { type: readUint32(reader) }; + if (left()) { + checkSignature(reader, '8BIM'); + target.sectionDivider.key = readSignature(reader); + } + if (left()) { + target.sectionDivider.subType = readUint32(reader); + } +}, function (writer, target) { + writeUint32(writer, target.sectionDivider.type); + if (target.sectionDivider.key) { + writeSignature(writer, '8BIM'); + writeSignature(writer, target.sectionDivider.key); + if (target.sectionDivider.subType !== undefined) { + writeUint32(writer, target.sectionDivider.subType); + } + } +}); +// it seems lsdk is used when there's a layer is nested more than 6 levels, but I don't know why? +// maybe some limitation of old version of PS? +addHandlerAlias('lsdk', 'lsct'); +addHandler('clbl', hasKey('blendClippendElements'), function (reader, target) { + target.blendClippendElements = !!readUint8(reader); + skipBytes(reader, 3); +}, function (writer, target) { + writeUint8(writer, target.blendClippendElements ? 1 : 0); + writeZeros(writer, 3); +}); +addHandler('infx', hasKey('blendInteriorElements'), function (reader, target) { + target.blendInteriorElements = !!readUint8(reader); + skipBytes(reader, 3); +}, function (writer, target) { + writeUint8(writer, target.blendInteriorElements ? 1 : 0); + writeZeros(writer, 3); +}); +addHandler('knko', hasKey('knockout'), function (reader, target) { + target.knockout = !!readUint8(reader); + skipBytes(reader, 3); +}, function (writer, target) { + writeUint8(writer, target.knockout ? 1 : 0); + writeZeros(writer, 3); +}); +addHandler('lmgm', hasKey('layerMaskAsGlobalMask'), function (reader, target) { + target.layerMaskAsGlobalMask = !!readUint8(reader); + skipBytes(reader, 3); +}, function (writer, target) { + writeUint8(writer, target.layerMaskAsGlobalMask ? 1 : 0); + writeZeros(writer, 3); +}); +addHandler('lspf', hasKey('protected'), function (reader, target) { + var flags = readUint32(reader); + target.protected = { + transparency: (flags & 0x01) !== 0, + composite: (flags & 0x02) !== 0, + position: (flags & 0x04) !== 0, + }; + if (flags & 0x08) + target.protected.artboards = true; +}, function (writer, target) { + var flags = (target.protected.transparency ? 0x01 : 0) | + (target.protected.composite ? 0x02 : 0) | + (target.protected.position ? 0x04 : 0) | + (target.protected.artboards ? 0x08 : 0); + writeUint32(writer, flags); +}); +addHandler('lclr', hasKey('layerColor'), function (reader, target) { + var color = readUint16(reader); + skipBytes(reader, 6); + target.layerColor = layerColors[color]; +}, function (writer, target) { + var index = layerColors.indexOf(target.layerColor); + writeUint16(writer, index === -1 ? 0 : index); + writeZeros(writer, 6); +}); +addHandler('shmd', function (target) { return target.timestamp !== undefined || target.animationFrames !== undefined || + target.animationFrameFlags !== undefined || target.timeline !== undefined; }, function (reader, target, left, _, options) { + var count = readUint32(reader); + var _loop_1 = function (i) { + checkSignature(reader, '8BIM'); + var key = readSignature(reader); + readUint8(reader); // copy + skipBytes(reader, 3); + readSection(reader, 1, function (left) { + if (key === 'cust') { + var desc = readVersionAndDescriptor(reader); + // console.log('cust', target.name, require('util').inspect(desc, false, 99, true)); + if (desc.layerTime !== undefined) + target.timestamp = desc.layerTime; + } + else if (key === 'mlst') { + var desc = readVersionAndDescriptor(reader); + // console.log('mlst', target.name, require('util').inspect(desc, false, 99, true)); + target.animationFrames = []; + for (var i_1 = 0; i_1 < desc.LaSt.length; i_1++) { + var f = desc.LaSt[i_1]; + var frame = { frames: f.FrLs }; + if (f.enab !== undefined) + frame.enable = f.enab; + if (f.Ofst) + frame.offset = horzVrtcToXY(f.Ofst); + if (f.FXRf) + frame.referencePoint = horzVrtcToXY(f.FXRf); + if (f.Lefx) + frame.effects = parseEffects(f.Lefx, !!options.logMissingFeatures); + if (f.blendOptions && f.blendOptions.Opct) + frame.opacity = parsePercent(f.blendOptions.Opct); + target.animationFrames.push(frame); + } + } + else if (key === 'mdyn') { + // frame flags + readUint16(reader); // unknown + var propagate = readUint8(reader); + var flags = readUint8(reader); + target.animationFrameFlags = { + propagateFrameOne: !propagate, + unifyLayerPosition: (flags & 1) !== 0, + unifyLayerStyle: (flags & 2) !== 0, + unifyLayerVisibility: (flags & 4) !== 0, + }; + } + else if (key === 'tmln') { + var desc = readVersionAndDescriptor(reader); + var timeScope = desc.timeScope; + // console.log('tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); + var timeline = { + start: timeScope.Strt, + duration: timeScope.duration, + inTime: timeScope.inTime, + outTime: timeScope.outTime, + autoScope: desc.autoScope, + audioLevel: desc.audioLevel, + }; + if (desc.trackList) { + timeline.tracks = parseTrackList(desc.trackList, !!options.logMissingFeatures); + } + target.timeline = timeline; + // console.log('tmln:result', target.name, target.id, require('util').inspect(timeline, false, 99, true)); + } + else { + options.logDevFeatures && console.log('Unhandled "shmd" section key', key); + } + skipBytes(reader, left()); + }); + }; + for (var i = 0; i < count; i++) { + _loop_1(i); + } + skipBytes(reader, left()); +}, function (writer, target, _, options) { + var animationFrames = target.animationFrames, animationFrameFlags = target.animationFrameFlags, timestamp = target.timestamp, timeline = target.timeline; + var count = 0; + if (animationFrames) + count++; + if (animationFrameFlags) + count++; + if (timeline) + count++; + if (timestamp !== undefined) + count++; + writeUint32(writer, count); + if (animationFrames) { + writeSignature(writer, '8BIM'); + writeSignature(writer, 'mlst'); + writeUint8(writer, 0); // copy (always false) + writeZeros(writer, 3); + writeSection(writer, 2, function () { + var _a; + var desc = { + LaID: (_a = target.id) !== null && _a !== void 0 ? _a : 0, + LaSt: [], + }; + for (var i = 0; i < animationFrames.length; i++) { + var f = animationFrames[i]; + var frame = {}; + if (f.enable !== undefined) + frame.enab = f.enable; + frame.FrLs = f.frames; + if (f.offset) + frame.Ofst = xyToHorzVrtc(f.offset); + if (f.referencePoint) + frame.FXRf = xyToHorzVrtc(f.referencePoint); + if (f.effects) + frame.Lefx = serializeEffects(f.effects, false, false); + if (f.opacity !== undefined) + frame.blendOptions = { Opct: unitsPercent(f.opacity) }; + desc.LaSt.push(frame); + } + writeVersionAndDescriptor(writer, '', 'null', desc); + }, true); + } + if (animationFrameFlags) { + writeSignature(writer, '8BIM'); + writeSignature(writer, 'mdyn'); + writeUint8(writer, 0); // copy (always false) + writeZeros(writer, 3); + writeSection(writer, 2, function () { + writeUint16(writer, 0); // unknown + writeUint8(writer, animationFrameFlags.propagateFrameOne ? 0x0 : 0xf); + writeUint8(writer, (animationFrameFlags.unifyLayerPosition ? 1 : 0) | + (animationFrameFlags.unifyLayerStyle ? 2 : 0) | + (animationFrameFlags.unifyLayerVisibility ? 4 : 0)); + }); + } + if (timeline) { + writeSignature(writer, '8BIM'); + writeSignature(writer, 'tmln'); + writeUint8(writer, 0); // copy (always false) + writeZeros(writer, 3); + writeSection(writer, 2, function () { + var desc = { + Vrsn: 1, + timeScope: { + Vrsn: 1, + Strt: timeline.start, + duration: timeline.duration, + inTime: timeline.inTime, + outTime: timeline.outTime, + }, + autoScope: timeline.autoScope, + audioLevel: timeline.audioLevel, + }; + if (timeline.tracks) { + desc.trackList = serializeTrackList(timeline.tracks); + } + var id = options.layerToId.get(target) || target.id || 0; + if (!id) + throw new Error('You need to provide layer.id value whan writing document with animations'); + desc.LyrI = id; + // console.log('WRITE:tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); + writeVersionAndDescriptor(writer, '', 'null', desc, 'anim'); + }, true); + } + if (timestamp !== undefined) { + writeSignature(writer, '8BIM'); + writeSignature(writer, 'cust'); + writeUint8(writer, 0); // copy (always false) + writeZeros(writer, 3); + writeSection(writer, 2, function () { + var desc = { + layerTime: timestamp, + }; + writeVersionAndDescriptor(writer, '', 'metadata', desc); + }, true); + } +}); +addHandler('vstk', hasKey('vectorStroke'), function (reader, target, left) { + var desc = readVersionAndDescriptor(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + target.vectorStroke = { + strokeEnabled: desc.strokeEnabled, + fillEnabled: desc.fillEnabled, + lineWidth: parseUnits(desc.strokeStyleLineWidth), + lineDashOffset: parseUnits(desc.strokeStyleLineDashOffset), + miterLimit: desc.strokeStyleMiterLimit, + lineCapType: strokeStyleLineCapType.decode(desc.strokeStyleLineCapType), + lineJoinType: strokeStyleLineJoinType.decode(desc.strokeStyleLineJoinType), + lineAlignment: strokeStyleLineAlignment.decode(desc.strokeStyleLineAlignment), + scaleLock: desc.strokeStyleScaleLock, + strokeAdjust: desc.strokeStyleStrokeAdjust, + lineDashSet: desc.strokeStyleLineDashSet.map(parseUnits), + blendMode: BlnM.decode(desc.strokeStyleBlendMode), + opacity: parsePercent(desc.strokeStyleOpacity), + content: parseVectorContent(desc.strokeStyleContent), + resolution: desc.strokeStyleResolution, + }; + skipBytes(reader, left()); +}, function (writer, target) { + var _a, _b, _c; + var stroke = target.vectorStroke; + var descriptor = { + strokeStyleVersion: 2, + strokeEnabled: !!stroke.strokeEnabled, + fillEnabled: !!stroke.fillEnabled, + strokeStyleLineWidth: stroke.lineWidth || { value: 3, units: 'Points' }, + strokeStyleLineDashOffset: stroke.lineDashOffset || { value: 0, units: 'Points' }, + strokeStyleMiterLimit: (_a = stroke.miterLimit) !== null && _a !== void 0 ? _a : 100, + strokeStyleLineCapType: strokeStyleLineCapType.encode(stroke.lineCapType), + strokeStyleLineJoinType: strokeStyleLineJoinType.encode(stroke.lineJoinType), + strokeStyleLineAlignment: strokeStyleLineAlignment.encode(stroke.lineAlignment), + strokeStyleScaleLock: !!stroke.scaleLock, + strokeStyleStrokeAdjust: !!stroke.strokeAdjust, + strokeStyleLineDashSet: stroke.lineDashSet || [], + strokeStyleBlendMode: BlnM.encode(stroke.blendMode), + strokeStyleOpacity: unitsPercent((_b = stroke.opacity) !== null && _b !== void 0 ? _b : 1), + strokeStyleContent: serializeVectorContent(stroke.content || { type: 'color', color: { r: 0, g: 0, b: 0 } }).descriptor, + strokeStyleResolution: (_c = stroke.resolution) !== null && _c !== void 0 ? _c : 72, + }; + writeVersionAndDescriptor(writer, '', 'strokeStyle', descriptor); +}); +addHandler('artb', // per-layer arboard info +hasKey('artboard'), function (reader, target, left) { + var desc = readVersionAndDescriptor(reader); + var rect = desc.artboardRect; + target.artboard = { + rect: { top: rect['Top '], left: rect.Left, bottom: rect.Btom, right: rect.Rght }, + guideIndices: desc.guideIndeces, + presetName: desc.artboardPresetName, + color: parseColor(desc['Clr ']), + backgroundType: desc.artboardBackgroundType, + }; + skipBytes(reader, left()); +}, function (writer, target) { + var _a; + var artboard = target.artboard; + var rect = artboard.rect; + var desc = { + artboardRect: { 'Top ': rect.top, Left: rect.left, Btom: rect.bottom, Rght: rect.right }, + guideIndeces: artboard.guideIndices || [], + artboardPresetName: artboard.presetName || '', + 'Clr ': serializeColor(artboard.color), + artboardBackgroundType: (_a = artboard.backgroundType) !== null && _a !== void 0 ? _a : 1, + }; + writeVersionAndDescriptor(writer, '', 'artboard', desc); +}); +addHandler('sn2P', hasKey('usingAlignedRendering'), function (reader, target) { return target.usingAlignedRendering = !!readUint32(reader); }, function (writer, target) { return writeUint32(writer, target.usingAlignedRendering ? 1 : 0); }); +var placedLayerTypes = ['unknown', 'vector', 'raster', 'image stack']; +function parseWarp(warp) { + var _a, _b, _c, _d, _e, _f; + var result = { + style: warpStyle.decode(warp.warpStyle), + value: warp.warpValue || 0, + perspective: warp.warpPerspective || 0, + perspectiveOther: warp.warpPerspectiveOther || 0, + rotate: Ornt.decode(warp.warpRotate), + bounds: warp.bounds && { + top: parseUnitsOrNumber(warp.bounds['Top ']), + left: parseUnitsOrNumber(warp.bounds.Left), + bottom: parseUnitsOrNumber(warp.bounds.Btom), + right: parseUnitsOrNumber(warp.bounds.Rght), + }, + uOrder: warp.uOrder, + vOrder: warp.vOrder, + }; + if (warp.deformNumRows != null || warp.deformNumCols != null) { + result.deformNumRows = warp.deformNumRows; + result.deformNumCols = warp.deformNumCols; + } + var envelopeWarp = warp.customEnvelopeWarp; + if (envelopeWarp) { + result.customEnvelopeWarp = { + meshPoints: [], + }; + var xs = ((_a = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Hrzn'; })) === null || _a === void 0 ? void 0 : _a.values) || []; + var ys = ((_b = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Vrtc'; })) === null || _b === void 0 ? void 0 : _b.values) || []; + for (var i = 0; i < xs.length; i++) { + result.customEnvelopeWarp.meshPoints.push({ x: xs[i], y: ys[i] }); + } + if (envelopeWarp.quiltSliceX || envelopeWarp.quiltSliceY) { + result.customEnvelopeWarp.quiltSliceX = ((_d = (_c = envelopeWarp.quiltSliceX) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.values) || []; + result.customEnvelopeWarp.quiltSliceY = ((_f = (_e = envelopeWarp.quiltSliceY) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.values) || []; + } + } + return result; +} +function isQuiltWarp(warp) { + var _a, _b; + return warp.deformNumCols != null || warp.deformNumRows != null || + ((_a = warp.customEnvelopeWarp) === null || _a === void 0 ? void 0 : _a.quiltSliceX) || ((_b = warp.customEnvelopeWarp) === null || _b === void 0 ? void 0 : _b.quiltSliceY); +} +function encodeWarp(warp) { + var bounds = warp.bounds; + var desc = { + warpStyle: warpStyle.encode(warp.style), + warpValue: warp.value || 0, + warpPerspective: warp.perspective || 0, + warpPerspectiveOther: warp.perspectiveOther || 0, + warpRotate: Ornt.encode(warp.rotate), + bounds: { + 'Top ': unitsValue(bounds && bounds.top || { units: 'Pixels', value: 0 }, 'bounds.top'), + Left: unitsValue(bounds && bounds.left || { units: 'Pixels', value: 0 }, 'bounds.left'), + Btom: unitsValue(bounds && bounds.bottom || { units: 'Pixels', value: 0 }, 'bounds.bottom'), + Rght: unitsValue(bounds && bounds.right || { units: 'Pixels', value: 0 }, 'bounds.right'), + }, + uOrder: warp.uOrder || 0, + vOrder: warp.vOrder || 0, + }; + var isQuilt = isQuiltWarp(warp); + if (isQuilt) { + var desc2 = desc; + desc2.deformNumRows = warp.deformNumRows || 0; + desc2.deformNumCols = warp.deformNumCols || 0; + } + var customEnvelopeWarp = warp.customEnvelopeWarp; + if (customEnvelopeWarp) { + var meshPoints = customEnvelopeWarp.meshPoints || []; + if (isQuilt) { + var desc2 = desc; + desc2.customEnvelopeWarp = { + quiltSliceX: [{ + type: 'quiltSliceX', + values: customEnvelopeWarp.quiltSliceX || [], + }], + quiltSliceY: [{ + type: 'quiltSliceY', + values: customEnvelopeWarp.quiltSliceY || [], + }], + meshPoints: [ + { type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) }, + { type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) }, + ], + }; + } + else { + desc.customEnvelopeWarp = { + meshPoints: [ + { type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) }, + { type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) }, + ], + }; + } + } + return desc; +} +addHandler('PlLd', hasKey('placedLayer'), function (reader, target, left) { + if (readSignature(reader) !== 'plcL') + throw new Error("Invalid PlLd signature"); + if (readInt32(reader) !== 3) + throw new Error("Invalid PlLd version"); + var id = readPascalString(reader, 1); + var pageNumber = readInt32(reader); + var totalPages = readInt32(reader); // TODO: check how this works ? + readInt32(reader); // anitAliasPolicy 16 + var placedLayerType = readInt32(reader); // 0 = unknown, 1 = vector, 2 = raster, 3 = image stack + if (!placedLayerTypes[placedLayerType]) + throw new Error('Invalid PlLd type'); + var transform = []; + for (var i = 0; i < 8; i++) + transform.push(readFloat64(reader)); // x, y of 4 corners of the transform + var warpVersion = readInt32(reader); + if (warpVersion !== 0) + throw new Error("Invalid Warp version ".concat(warpVersion)); + var warp = readVersionAndDescriptor(reader); + target.placedLayer = target.placedLayer || { + id: id, + type: placedLayerTypes[placedLayerType], + pageNumber: pageNumber, + totalPages: totalPages, + transform: transform, + warp: parseWarp(warp), + }; + // console.log('PlLd warp', require('util').inspect(warp, false, 99, true)); + // console.log('PlLd', require('util').inspect(target.placedLayer, false, 99, true)); + skipBytes(reader, left()); +}, function (writer, target) { + var placed = target.placedLayer; + writeSignature(writer, 'plcL'); + writeInt32(writer, 3); // version + writePascalString(writer, placed.id, 1); + writeInt32(writer, 1); // pageNumber + writeInt32(writer, 1); // totalPages + writeInt32(writer, 16); // anitAliasPolicy + if (placedLayerTypes.indexOf(placed.type) === -1) + throw new Error('Invalid placedLayer type'); + writeInt32(writer, placedLayerTypes.indexOf(placed.type)); + for (var i = 0; i < 8; i++) + writeFloat64(writer, placed.transform[i]); + writeInt32(writer, 0); // warp version + var isQuilt = placed.warp && isQuiltWarp(placed.warp); + var type = isQuilt ? 'quiltWarp' : 'warp'; + writeVersionAndDescriptor(writer, '', type, encodeWarp(placed.warp || {}), type); +}); +addHandler('SoLd', hasKey('placedLayer'), function (reader, target, left) { + if (readSignature(reader) !== 'soLD') + throw new Error("Invalid SoLd type"); + if (readInt32(reader) !== 4) + throw new Error("Invalid SoLd version"); + var desc = readVersionAndDescriptor(reader); + // console.log('SoLd', require('util').inspect(desc, false, 99, true)); + // console.log('SoLd.warp', require('util').inspect(desc.warp, false, 99, true)); + // console.log('SoLd.quiltWarp', require('util').inspect(desc.quiltWarp, false, 99, true)); + target.placedLayer = { + id: desc.Idnt, + placed: desc.placed, + type: placedLayerTypes[desc.Type], + pageNumber: desc.PgNm, + totalPages: desc.totalPages, + frameStep: desc.frameStep, + duration: desc.duration, + frameCount: desc.frameCount, + transform: desc.Trnf, + width: desc['Sz '].Wdth, + height: desc['Sz '].Hght, + resolution: parseUnits(desc.Rslt), + warp: parseWarp((desc.quiltWarp || desc.warp)), + }; + if (desc.nonAffineTransform && desc.nonAffineTransform.some(function (x, i) { return x !== desc.Trnf[i]; })) { + target.placedLayer.nonAffineTransform = desc.nonAffineTransform; + } + if (desc.Crop) + target.placedLayer.crop = desc.Crop; + if (desc.comp) + target.placedLayer.comp = desc.comp; + if (desc.compInfo) + target.placedLayer.compInfo = desc.compInfo; + skipBytes(reader, left()); // HACK +}, function (writer, target) { + var _a, _b; + writeSignature(writer, 'soLD'); + writeInt32(writer, 4); // version + var placed = target.placedLayer; + var desc = __assign(__assign({ Idnt: placed.id, placed: (_a = placed.placed) !== null && _a !== void 0 ? _a : placed.id, PgNm: placed.pageNumber || 1, totalPages: placed.totalPages || 1 }, (placed.crop ? { Crop: placed.crop } : {})), { frameStep: placed.frameStep || { numerator: 0, denominator: 600 }, duration: placed.duration || { numerator: 0, denominator: 600 }, frameCount: placed.frameCount || 0, Annt: 16, Type: placedLayerTypes.indexOf(placed.type), Trnf: placed.transform, nonAffineTransform: (_b = placed.nonAffineTransform) !== null && _b !== void 0 ? _b : placed.transform, quiltWarp: {}, warp: encodeWarp(placed.warp || {}), 'Sz ': { + Wdth: placed.width || 0, + Hght: placed.height || 0, // TODO: find size ? + }, Rslt: placed.resolution ? unitsValue(placed.resolution, 'resolution') : { units: 'Density', value: 72 } }); + if (placed.warp && isQuiltWarp(placed.warp)) { + var quiltWarp = encodeWarp(placed.warp); + desc.quiltWarp = quiltWarp; + desc.warp = { + warpStyle: 'warpStyle.warpNone', + warpValue: quiltWarp.warpValue, + warpPerspective: quiltWarp.warpPerspective, + warpPerspectiveOther: quiltWarp.warpPerspectiveOther, + warpRotate: quiltWarp.warpRotate, + bounds: quiltWarp.bounds, + uOrder: quiltWarp.uOrder, + vOrder: quiltWarp.vOrder, + }; + } + else { + delete desc.quiltWarp; + } + if (placed.comp) + desc.comp = placed.comp; + if (placed.compInfo) + desc.compInfo = placed.compInfo; + writeVersionAndDescriptor(writer, '', 'null', desc, desc.quiltWarp ? 'quiltWarp' : 'warp'); +}); +addHandler('fxrp', hasKey('referencePoint'), function (reader, target) { + target.referencePoint = { + x: readFloat64(reader), + y: readFloat64(reader), + }; +}, function (writer, target) { + writeFloat64(writer, target.referencePoint.x); + writeFloat64(writer, target.referencePoint.y); +}); +if (MOCK_HANDLERS) { + addHandler('Patt', function (target) { return target._Patt !== undefined; }, function (reader, target, left) { + // console.log('additional info: Patt'); + target._Patt = readBytes(reader, left()); + }, function (writer, target) { return false && writeBytes(writer, target._Patt); }); +} +else { + addHandler('Patt', // TODO: handle also Pat2 & Pat3 + function (// TODO: handle also Pat2 & Pat3 + target) { return !target; }, function (reader, target, left) { + if (!left()) + return; + skipBytes(reader, left()); + return; // not supported yet + target; + readPattern; + // if (!target.patterns) target.patterns = []; + // target.patterns.push(readPattern(reader)); + // skipBytes(reader, left()); + }, function (_writer, _target) { + }); +} +function readRect(reader) { + var top = readInt32(reader); + var left = readInt32(reader); + var bottom = readInt32(reader); + var right = readInt32(reader); + return { top: top, left: left, bottom: bottom, right: right }; +} +function writeRect(writer, rect) { + writeInt32(writer, rect.top); + writeInt32(writer, rect.left); + writeInt32(writer, rect.bottom); + writeInt32(writer, rect.right); +} +addHandler('Anno', function (target) { return target.annotations !== undefined; }, function (reader, target, left) { + var major = readUint16(reader); + var minor = readUint16(reader); + if (major !== 2 || minor !== 1) + throw new Error('Invalid Anno version'); + var count = readUint32(reader); + var annotations = []; + for (var i = 0; i < count; i++) { + /*const length =*/ readUint32(reader); + var type = readSignature(reader); + var open_1 = !!readUint8(reader); + /*const flags =*/ readUint8(reader); // always 28 + /*const optionalBlocks =*/ readUint16(reader); + var iconLocation = readRect(reader); + var popupLocation = readRect(reader); + var color = readColor(reader); + var author = readPascalString(reader, 2); + var name_1 = readPascalString(reader, 2); + var date = readPascalString(reader, 2); + /*const contentLength =*/ readUint32(reader); + /*const dataType =*/ readSignature(reader); + var dataLength = readUint32(reader); + var data = void 0; + if (type === 'txtA') { + if (dataLength >= 2 && readUint16(reader) === 0xfeff) { + data = readUnicodeStringWithLength(reader, (dataLength - 2) / 2); + } + else { + reader.offset -= 2; + data = readAsciiString(reader, dataLength); + } + data = data.replace(/\r/g, '\n'); + } + else if (type === 'sndA') { + data = readBytes(reader, dataLength); + } + else { + throw new Error('Unknown annotation type'); + } + annotations.push({ + type: type === 'txtA' ? 'text' : 'sound', + open: open_1, + iconLocation: iconLocation, + popupLocation: popupLocation, + color: color, + author: author, + name: name_1, + date: date, + data: data, + }); + } + target.annotations = annotations; + skipBytes(reader, left()); +}, function (writer, target) { + var annotations = target.annotations; + writeUint16(writer, 2); + writeUint16(writer, 1); + writeUint32(writer, annotations.length); + for (var _i = 0, annotations_1 = annotations; _i < annotations_1.length; _i++) { + var annotation = annotations_1[_i]; + var sound = annotation.type === 'sound'; + if (sound && !(annotation.data instanceof Uint8Array)) + throw new Error('Sound annotation data should be Uint8Array'); + if (!sound && typeof annotation.data !== 'string') + throw new Error('Text annotation data should be string'); + var lengthOffset = writer.offset; + writeUint32(writer, 0); // length + writeSignature(writer, sound ? 'sndA' : 'txtA'); + writeUint8(writer, annotation.open ? 1 : 0); + writeUint8(writer, 28); + writeUint16(writer, 1); + writeRect(writer, annotation.iconLocation); + writeRect(writer, annotation.popupLocation); + writeColor(writer, annotation.color); + writePascalString(writer, annotation.author || '', 2); + writePascalString(writer, annotation.name || '', 2); + writePascalString(writer, annotation.date || '', 2); + var contentOffset = writer.offset; + writeUint32(writer, 0); // content length + writeSignature(writer, sound ? 'sndM' : 'txtC'); + writeUint32(writer, 0); // data length + var dataOffset = writer.offset; + if (sound) { + writeBytes(writer, annotation.data); + } + else { + writeUint16(writer, 0xfeff); // unicode string indicator + var text = annotation.data.replace(/\n/g, '\r'); + for (var i = 0; i < text.length; i++) + writeUint16(writer, text.charCodeAt(i)); + } + writer.view.setUint32(lengthOffset, writer.offset - lengthOffset, false); + writer.view.setUint32(contentOffset, writer.offset - contentOffset, false); + writer.view.setUint32(dataOffset - 4, writer.offset - dataOffset, false); + } +}); +addHandler('lnk2', function (target) { return !!target.linkedFiles && target.linkedFiles.length > 0; }, function (reader, target, left, _, options) { + var psd = target; + psd.linkedFiles = []; + while (left() > 8) { + var size = readLength64(reader); // size + var startOffset = reader.offset; + var type = readSignature(reader); + var version = readInt32(reader); + var id = readPascalString(reader, 1); + var name_2 = readUnicodeString(reader); + var fileType = readSignature(reader).trim(); // ' ' if empty + var fileCreator = readSignature(reader).trim(); // ' ' or '\0\0\0\0' if empty + var dataSize = readLength64(reader); + var hasFileOpenDescriptor = readUint8(reader); + var fileOpenDescriptor = hasFileOpenDescriptor ? readVersionAndDescriptor(reader) : undefined; + var linkedFileDescriptor = type === 'liFE' ? readVersionAndDescriptor(reader) : undefined; + var file = { id: id, name: name_2, data: undefined }; + if (fileType) + file.type = fileType; + if (fileCreator) + file.creator = fileCreator; + if (fileOpenDescriptor) + file.descriptor = fileOpenDescriptor; + if (type === 'liFE' && version > 3) { + var year = readInt32(reader); + var month = readUint8(reader); + var day = readUint8(reader); + var hour = readUint8(reader); + var minute = readUint8(reader); + var seconds = readFloat64(reader); + var wholeSeconds = Math.floor(seconds); + var ms = (seconds - wholeSeconds) * 1000; + file.time = new Date(year, month, day, hour, minute, wholeSeconds, ms); + } + var fileSize = type === 'liFE' ? readLength64(reader) : 0; + if (type === 'liFA') + skipBytes(reader, 8); + if (type === 'liFD') + file.data = readBytes(reader, dataSize); + if (version >= 5) + file.childDocumentID = readUnicodeString(reader); + if (version >= 6) + file.assetModTime = readFloat64(reader); + if (version >= 7) + file.assetLockedState = readUint8(reader); + if (type === 'liFE') + file.data = readBytes(reader, fileSize); + if (options.skipLinkedFilesData) + file.data = undefined; + psd.linkedFiles.push(file); + linkedFileDescriptor; + while (size % 4) + size++; + reader.offset = startOffset + size; + } + skipBytes(reader, left()); // ? +}, function (writer, target) { + var psd = target; + for (var _i = 0, _a = psd.linkedFiles; _i < _a.length; _i++) { + var file = _a[_i]; + var version = 2; + if (file.assetLockedState != null) + version = 7; + else if (file.assetModTime != null) + version = 6; + else if (file.childDocumentID != null) + version = 5; + // TODO: else if (file.time != null) version = 3; (only for liFE) + writeUint32(writer, 0); + writeUint32(writer, 0); // size + var sizeOffset = writer.offset; + writeSignature(writer, file.data ? 'liFD' : 'liFA'); + writeInt32(writer, version); + writePascalString(writer, file.id || '', 1); + writeUnicodeStringWithPadding(writer, file.name || ''); + writeSignature(writer, file.type ? "".concat(file.type, " ").substring(0, 4) : ' '); + writeSignature(writer, file.creator ? "".concat(file.creator, " ").substring(0, 4) : '\0\0\0\0'); + writeLength64(writer, file.data ? file.data.byteLength : 0); + if (file.descriptor && file.descriptor.compInfo) { + var desc = { + compInfo: file.descriptor.compInfo, + }; + writeUint8(writer, 1); + writeVersionAndDescriptor(writer, '', 'null', desc); + } + else { + writeUint8(writer, 0); + } + if (file.data) + writeBytes(writer, file.data); + else + writeLength64(writer, 0); + if (version >= 5) + writeUnicodeStringWithPadding(writer, file.childDocumentID || ''); + if (version >= 6) + writeFloat64(writer, file.assetModTime || 0); + if (version >= 7) + writeUint8(writer, file.assetLockedState || 0); + var size = writer.offset - sizeOffset; + writer.view.setUint32(sizeOffset - 4, size, false); // write size + while (size % 4) { + size++; + writeUint8(writer, 0); + } + } +}); +addHandlerAlias('lnkD', 'lnk2'); +addHandlerAlias('lnk3', 'lnk2'); +// this seems to just be zero size block, ignore it +addHandler('lnkE', function (target) { return target._lnkE !== undefined; }, function (reader, target, left, _psds, options) { + if (options.logMissingFeatures && left()) { + console.log("Non-empty lnkE layer info (".concat(left(), " bytes)")); + } + if (MOCK_HANDLERS) { + target._lnkE = readBytes(reader, left()); + } +}, function (writer, target) { return MOCK_HANDLERS && writeBytes(writer, target._lnkE); }); +addHandler('pths', hasKey('pathList'), function (reader, target) { + var descriptor = readVersionAndDescriptor(reader); + target.pathList = []; // TODO: read paths (find example with non-empty list) + descriptor; + // console.log('pths', descriptor); // TODO: remove this +}, function (writer, _target) { + var descriptor = { + pathList: [], // TODO: write paths + }; + writeVersionAndDescriptor(writer, '', 'pathsDataClass', descriptor); +}); +addHandler('lyvr', hasKey('version'), function (reader, target) { return target.version = readUint32(reader); }, function (writer, target) { return writeUint32(writer, target.version); }); +function adjustmentType(type) { + return function (target) { return !!target.adjustment && target.adjustment.type === type; }; +} +addHandler('brit', adjustmentType('brightness/contrast'), function (reader, target, left) { + if (!target.adjustment) { // ignore if got one from CgEd block + target.adjustment = { + type: 'brightness/contrast', + brightness: readInt16(reader), + contrast: readInt16(reader), + meanValue: readInt16(reader), + labColorOnly: !!readUint8(reader), + useLegacy: true, + }; + } + skipBytes(reader, left()); +}, function (writer, target) { + var _a; + var info = target.adjustment; + writeInt16(writer, info.brightness || 0); + writeInt16(writer, info.contrast || 0); + writeInt16(writer, (_a = info.meanValue) !== null && _a !== void 0 ? _a : 127); + writeUint8(writer, info.labColorOnly ? 1 : 0); + writeZeros(writer, 1); +}); +function readLevelsChannel(reader) { + var shadowInput = readInt16(reader); + var highlightInput = readInt16(reader); + var shadowOutput = readInt16(reader); + var highlightOutput = readInt16(reader); + var midtoneInput = readInt16(reader) / 100; + return { shadowInput: shadowInput, highlightInput: highlightInput, shadowOutput: shadowOutput, highlightOutput: highlightOutput, midtoneInput: midtoneInput }; +} +function writeLevelsChannel(writer, channel) { + writeInt16(writer, channel.shadowInput); + writeInt16(writer, channel.highlightInput); + writeInt16(writer, channel.shadowOutput); + writeInt16(writer, channel.highlightOutput); + writeInt16(writer, Math.round(channel.midtoneInput * 100)); +} +addHandler('levl', adjustmentType('levels'), function (reader, target, left) { + if (readUint16(reader) !== 2) + throw new Error('Invalid levl version'); + target.adjustment = __assign(__assign({}, target.adjustment), { type: 'levels', rgb: readLevelsChannel(reader), red: readLevelsChannel(reader), green: readLevelsChannel(reader), blue: readLevelsChannel(reader) }); + skipBytes(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var defaultChannel = { + shadowInput: 0, + highlightInput: 255, + shadowOutput: 0, + highlightOutput: 255, + midtoneInput: 1, + }; + writeUint16(writer, 2); // version + writeLevelsChannel(writer, info.rgb || defaultChannel); + writeLevelsChannel(writer, info.red || defaultChannel); + writeLevelsChannel(writer, info.blue || defaultChannel); + writeLevelsChannel(writer, info.green || defaultChannel); + for (var i = 0; i < 59; i++) + writeLevelsChannel(writer, defaultChannel); +}); +function readCurveChannel(reader) { + var nodes = readUint16(reader); + var channel = []; + for (var j = 0; j < nodes; j++) { + var output = readInt16(reader); + var input = readInt16(reader); + channel.push({ input: input, output: output }); + } + return channel; +} +function writeCurveChannel(writer, channel) { + writeUint16(writer, channel.length); + for (var _i = 0, channel_1 = channel; _i < channel_1.length; _i++) { + var n = channel_1[_i]; + writeUint16(writer, n.output); + writeUint16(writer, n.input); + } +} +addHandler('curv', adjustmentType('curves'), function (reader, target, left) { + readUint8(reader); + if (readUint16(reader) !== 1) + throw new Error('Invalid curv version'); + readUint16(reader); + var channels = readUint16(reader); + var info = { type: 'curves' }; + if (channels & 1) + info.rgb = readCurveChannel(reader); + if (channels & 2) + info.red = readCurveChannel(reader); + if (channels & 4) + info.green = readCurveChannel(reader); + if (channels & 8) + info.blue = readCurveChannel(reader); + target.adjustment = __assign(__assign({}, target.adjustment), info); + // ignoring, duplicate information + // checkSignature(reader, 'Crv '); + // const cVersion = readUint16(reader); + // readUint16(reader); + // const channelCount = readUint16(reader); + // for (let i = 0; i < channelCount; i++) { + // const index = readUint16(reader); + // const nodes = readUint16(reader); + // for (let j = 0; j < nodes; j++) { + // const output = readInt16(reader); + // const input = readInt16(reader); + // } + // } + skipBytes(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var rgb = info.rgb, red = info.red, green = info.green, blue = info.blue; + var channels = 0; + var channelCount = 0; + if (rgb && rgb.length) { + channels |= 1; + channelCount++; + } + if (red && red.length) { + channels |= 2; + channelCount++; + } + if (green && green.length) { + channels |= 4; + channelCount++; + } + if (blue && blue.length) { + channels |= 8; + channelCount++; + } + writeUint8(writer, 0); + writeUint16(writer, 1); // version + writeUint16(writer, 0); + writeUint16(writer, channels); + if (rgb && rgb.length) + writeCurveChannel(writer, rgb); + if (red && red.length) + writeCurveChannel(writer, red); + if (green && green.length) + writeCurveChannel(writer, green); + if (blue && blue.length) + writeCurveChannel(writer, blue); + writeSignature(writer, 'Crv '); + writeUint16(writer, 4); // version + writeUint16(writer, 0); + writeUint16(writer, channelCount); + if (rgb && rgb.length) { + writeUint16(writer, 0); + writeCurveChannel(writer, rgb); + } + if (red && red.length) { + writeUint16(writer, 1); + writeCurveChannel(writer, red); + } + if (green && green.length) { + writeUint16(writer, 2); + writeCurveChannel(writer, green); + } + if (blue && blue.length) { + writeUint16(writer, 3); + writeCurveChannel(writer, blue); + } + writeZeros(writer, 2); +}); +addHandler('expA', adjustmentType('exposure'), function (reader, target, left) { + if (readUint16(reader) !== 1) + throw new Error('Invalid expA version'); + target.adjustment = __assign(__assign({}, target.adjustment), { type: 'exposure', exposure: readFloat32(reader), offset: readFloat32(reader), gamma: readFloat32(reader) }); + skipBytes(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + writeUint16(writer, 1); // version + writeFloat32(writer, info.exposure); + writeFloat32(writer, info.offset); + writeFloat32(writer, info.gamma); + writeZeros(writer, 2); +}); +addHandler('vibA', adjustmentType('vibrance'), function (reader, target, left) { + var desc = readVersionAndDescriptor(reader); + target.adjustment = { type: 'vibrance' }; + if (desc.vibrance !== undefined) + target.adjustment.vibrance = desc.vibrance; + if (desc.Strt !== undefined) + target.adjustment.saturation = desc.Strt; + skipBytes(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var desc = {}; + if (info.vibrance !== undefined) + desc.vibrance = info.vibrance; + if (info.saturation !== undefined) + desc.Strt = info.saturation; + writeVersionAndDescriptor(writer, '', 'null', desc); +}); +function readHueChannel(reader) { + return { + a: readInt16(reader), + b: readInt16(reader), + c: readInt16(reader), + d: readInt16(reader), + hue: readInt16(reader), + saturation: readInt16(reader), + lightness: readInt16(reader), + }; +} +function writeHueChannel(writer, channel) { + var c = channel || {}; + writeInt16(writer, c.a || 0); + writeInt16(writer, c.b || 0); + writeInt16(writer, c.c || 0); + writeInt16(writer, c.d || 0); + writeInt16(writer, c.hue || 0); + writeInt16(writer, c.saturation || 0); + writeInt16(writer, c.lightness || 0); +} +addHandler('hue2', adjustmentType('hue/saturation'), function (reader, target, left) { + if (readUint16(reader) !== 2) + throw new Error('Invalid hue2 version'); + target.adjustment = __assign(__assign({}, target.adjustment), { type: 'hue/saturation', master: readHueChannel(reader), reds: readHueChannel(reader), yellows: readHueChannel(reader), greens: readHueChannel(reader), cyans: readHueChannel(reader), blues: readHueChannel(reader), magentas: readHueChannel(reader) }); + skipBytes(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + writeUint16(writer, 2); // version + writeHueChannel(writer, info.master); + writeHueChannel(writer, info.reds); + writeHueChannel(writer, info.yellows); + writeHueChannel(writer, info.greens); + writeHueChannel(writer, info.cyans); + writeHueChannel(writer, info.blues); + writeHueChannel(writer, info.magentas); +}); +function readColorBalance(reader) { + return { + cyanRed: readInt16(reader), + magentaGreen: readInt16(reader), + yellowBlue: readInt16(reader), + }; +} +function writeColorBalance(writer, value) { + writeInt16(writer, value.cyanRed || 0); + writeInt16(writer, value.magentaGreen || 0); + writeInt16(writer, value.yellowBlue || 0); +} +addHandler('blnc', adjustmentType('color balance'), function (reader, target, left) { + target.adjustment = { + type: 'color balance', + shadows: readColorBalance(reader), + midtones: readColorBalance(reader), + highlights: readColorBalance(reader), + preserveLuminosity: !!readUint8(reader), + }; + skipBytes(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + writeColorBalance(writer, info.shadows || {}); + writeColorBalance(writer, info.midtones || {}); + writeColorBalance(writer, info.highlights || {}); + writeUint8(writer, info.preserveLuminosity ? 1 : 0); + writeZeros(writer, 1); +}); +addHandler('blwh', adjustmentType('black & white'), function (reader, target, left) { + var desc = readVersionAndDescriptor(reader); + target.adjustment = { + type: 'black & white', + reds: desc['Rd '], + yellows: desc.Yllw, + greens: desc['Grn '], + cyans: desc['Cyn '], + blues: desc['Bl '], + magentas: desc.Mgnt, + useTint: !!desc.useTint, + presetKind: desc.bwPresetKind, + presetFileName: desc.blackAndWhitePresetFileName, + }; + if (desc.tintColor !== undefined) + target.adjustment.tintColor = parseColor(desc.tintColor); + skipBytes(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var desc = { + 'Rd ': info.reds || 0, + Yllw: info.yellows || 0, + 'Grn ': info.greens || 0, + 'Cyn ': info.cyans || 0, + 'Bl ': info.blues || 0, + Mgnt: info.magentas || 0, + useTint: !!info.useTint, + tintColor: serializeColor(info.tintColor), + bwPresetKind: info.presetKind || 0, + blackAndWhitePresetFileName: info.presetFileName || '', + }; + writeVersionAndDescriptor(writer, '', 'null', desc); +}); +addHandler('phfl', adjustmentType('photo filter'), function (reader, target, left) { + var version = readUint16(reader); + if (version !== 2 && version !== 3) + throw new Error('Invalid phfl version'); + var color; + if (version === 2) { + color = readColor(reader); + } + else { // version 3 + // TODO: test this, this is probably wrong + color = { + l: readInt32(reader) / 100, + a: readInt32(reader) / 100, + b: readInt32(reader) / 100, + }; + } + target.adjustment = { + type: 'photo filter', + color: color, + density: readUint32(reader) / 100, + preserveLuminosity: !!readUint8(reader), + }; + skipBytes(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + writeUint16(writer, 2); // version + writeColor(writer, info.color || { l: 0, a: 0, b: 0 }); + writeUint32(writer, (info.density || 0) * 100); + writeUint8(writer, info.preserveLuminosity ? 1 : 0); + writeZeros(writer, 3); +}); +function readMixrChannel(reader) { + var red = readInt16(reader); + var green = readInt16(reader); + var blue = readInt16(reader); + skipBytes(reader, 2); + var constant = readInt16(reader); + return { red: red, green: green, blue: blue, constant: constant }; +} +function writeMixrChannel(writer, channel) { + var c = channel || {}; + writeInt16(writer, c.red); + writeInt16(writer, c.green); + writeInt16(writer, c.blue); + writeZeros(writer, 2); + writeInt16(writer, c.constant); +} +addHandler('mixr', adjustmentType('channel mixer'), function (reader, target, left) { + if (readUint16(reader) !== 1) + throw new Error('Invalid mixr version'); + var adjustment = target.adjustment = __assign(__assign({}, target.adjustment), { type: 'channel mixer', monochrome: !!readUint16(reader) }); + if (!adjustment.monochrome) { + adjustment.red = readMixrChannel(reader); + adjustment.green = readMixrChannel(reader); + adjustment.blue = readMixrChannel(reader); + } + adjustment.gray = readMixrChannel(reader); + skipBytes(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + writeUint16(writer, 1); // version + writeUint16(writer, info.monochrome ? 1 : 0); + if (info.monochrome) { + writeMixrChannel(writer, info.gray); + writeZeros(writer, 3 * 5 * 2); + } + else { + writeMixrChannel(writer, info.red); + writeMixrChannel(writer, info.green); + writeMixrChannel(writer, info.blue); + writeMixrChannel(writer, info.gray); + } +}); +var colorLookupType = createEnum('colorLookupType', '3DLUT', { + '3dlut': '3DLUT', + abstractProfile: 'abstractProfile', + deviceLinkProfile: 'deviceLinkProfile', +}); +var LUTFormatType = createEnum('LUTFormatType', 'look', { + look: 'LUTFormatLOOK', + cube: 'LUTFormatCUBE', + '3dl': 'LUTFormat3DL', +}); +var colorLookupOrder = createEnum('colorLookupOrder', 'rgb', { + rgb: 'rgbOrder', + bgr: 'bgrOrder', +}); +addHandler('clrL', adjustmentType('color lookup'), function (reader, target, left) { + if (readUint16(reader) !== 1) + throw new Error('Invalid clrL version'); + var desc = readVersionAndDescriptor(reader); + target.adjustment = { type: 'color lookup' }; + var info = target.adjustment; + if (desc.lookupType !== undefined) + info.lookupType = colorLookupType.decode(desc.lookupType); + if (desc['Nm '] !== undefined) + info.name = desc['Nm ']; + if (desc.Dthr !== undefined) + info.dither = desc.Dthr; + if (desc.profile !== undefined) + info.profile = desc.profile; + if (desc.LUTFormat !== undefined) + info.lutFormat = LUTFormatType.decode(desc.LUTFormat); + if (desc.dataOrder !== undefined) + info.dataOrder = colorLookupOrder.decode(desc.dataOrder); + if (desc.tableOrder !== undefined) + info.tableOrder = colorLookupOrder.decode(desc.tableOrder); + if (desc.LUT3DFileData !== undefined) + info.lut3DFileData = desc.LUT3DFileData; + if (desc.LUT3DFileName !== undefined) + info.lut3DFileName = desc.LUT3DFileName; + skipBytes(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var desc = {}; + if (info.lookupType !== undefined) + desc.lookupType = colorLookupType.encode(info.lookupType); + if (info.name !== undefined) + desc['Nm '] = info.name; + if (info.dither !== undefined) + desc.Dthr = info.dither; + if (info.profile !== undefined) + desc.profile = info.profile; + if (info.lutFormat !== undefined) + desc.LUTFormat = LUTFormatType.encode(info.lutFormat); + if (info.dataOrder !== undefined) + desc.dataOrder = colorLookupOrder.encode(info.dataOrder); + if (info.tableOrder !== undefined) + desc.tableOrder = colorLookupOrder.encode(info.tableOrder); + if (info.lut3DFileData !== undefined) + desc.LUT3DFileData = info.lut3DFileData; + if (info.lut3DFileName !== undefined) + desc.LUT3DFileName = info.lut3DFileName; + writeUint16(writer, 1); // version + writeVersionAndDescriptor(writer, '', 'null', desc); +}); +addHandler('nvrt', adjustmentType('invert'), function (reader, target, left) { + target.adjustment = { type: 'invert' }; + skipBytes(reader, left()); +}, function () { + // nothing to write here +}); +addHandler('post', adjustmentType('posterize'), function (reader, target, left) { + target.adjustment = { + type: 'posterize', + levels: readUint16(reader), + }; + skipBytes(reader, left()); +}, function (writer, target) { + var _a; + var info = target.adjustment; + writeUint16(writer, (_a = info.levels) !== null && _a !== void 0 ? _a : 4); + writeZeros(writer, 2); +}); +addHandler('thrs', adjustmentType('threshold'), function (reader, target, left) { + target.adjustment = { + type: 'threshold', + level: readUint16(reader), + }; + skipBytes(reader, left()); +}, function (writer, target) { + var _a; + var info = target.adjustment; + writeUint16(writer, (_a = info.level) !== null && _a !== void 0 ? _a : 128); + writeZeros(writer, 2); +}); +var grdmColorModels = ['', '', '', 'rgb', 'hsb', '', 'lab']; +addHandler('grdm', adjustmentType('gradient map'), function (reader, target, left) { + if (readUint16(reader) !== 1) + throw new Error('Invalid grdm version'); + var info = { + type: 'gradient map', + gradientType: 'solid', + }; + info.reverse = !!readUint8(reader); + info.dither = !!readUint8(reader); + info.name = readUnicodeString(reader); + info.colorStops = []; + info.opacityStops = []; + var stopsCount = readUint16(reader); + for (var i = 0; i < stopsCount; i++) { + info.colorStops.push({ + location: readUint32(reader), + midpoint: readUint32(reader) / 100, + color: readColor(reader), + }); + skipBytes(reader, 2); + } + var opacityStopsCount = readUint16(reader); + for (var i = 0; i < opacityStopsCount; i++) { + info.opacityStops.push({ + location: readUint32(reader), + midpoint: readUint32(reader) / 100, + opacity: readUint16(reader) / 0xff, + }); + } + var expansionCount = readUint16(reader); + if (expansionCount !== 2) + throw new Error('Invalid grdm expansion count'); + var interpolation = readUint16(reader); + info.smoothness = interpolation / 4096; + var length = readUint16(reader); + if (length !== 32) + throw new Error('Invalid grdm length'); + info.gradientType = readUint16(reader) ? 'noise' : 'solid'; + info.randomSeed = readUint32(reader); + info.addTransparency = !!readUint16(reader); + info.restrictColors = !!readUint16(reader); + info.roughness = readUint32(reader) / 4096; + info.colorModel = (grdmColorModels[readUint16(reader)] || 'rgb'); + info.min = [ + readUint16(reader) / 0x8000, + readUint16(reader) / 0x8000, + readUint16(reader) / 0x8000, + readUint16(reader) / 0x8000, + ]; + info.max = [ + readUint16(reader) / 0x8000, + readUint16(reader) / 0x8000, + readUint16(reader) / 0x8000, + readUint16(reader) / 0x8000, + ]; + skipBytes(reader, left()); + for (var _i = 0, _a = info.colorStops; _i < _a.length; _i++) { + var s = _a[_i]; + s.location /= interpolation; + } + for (var _b = 0, _c = info.opacityStops; _b < _c.length; _b++) { + var s = _c[_b]; + s.location /= interpolation; + } + target.adjustment = info; +}, function (writer, target) { + var _a, _b, _c; + var info = target.adjustment; + writeUint16(writer, 1); // version + writeUint8(writer, info.reverse ? 1 : 0); + writeUint8(writer, info.dither ? 1 : 0); + writeUnicodeStringWithPadding(writer, info.name || ''); + writeUint16(writer, info.colorStops && info.colorStops.length || 0); + var interpolation = Math.round(((_a = info.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096); + for (var _i = 0, _d = info.colorStops || []; _i < _d.length; _i++) { + var s = _d[_i]; + writeUint32(writer, Math.round(s.location * interpolation)); + writeUint32(writer, Math.round(s.midpoint * 100)); + writeColor(writer, s.color); + writeZeros(writer, 2); + } + writeUint16(writer, info.opacityStops && info.opacityStops.length || 0); + for (var _e = 0, _f = info.opacityStops || []; _e < _f.length; _e++) { + var s = _f[_e]; + writeUint32(writer, Math.round(s.location * interpolation)); + writeUint32(writer, Math.round(s.midpoint * 100)); + writeUint16(writer, Math.round(s.opacity * 0xff)); + } + writeUint16(writer, 2); // expansion count + writeUint16(writer, interpolation); + writeUint16(writer, 32); // length + writeUint16(writer, info.gradientType === 'noise' ? 1 : 0); + writeUint32(writer, info.randomSeed || 0); + writeUint16(writer, info.addTransparency ? 1 : 0); + writeUint16(writer, info.restrictColors ? 1 : 0); + writeUint32(writer, Math.round(((_b = info.roughness) !== null && _b !== void 0 ? _b : 1) * 4096)); + var colorModel = grdmColorModels.indexOf((_c = info.colorModel) !== null && _c !== void 0 ? _c : 'rgb'); + writeUint16(writer, colorModel === -1 ? 3 : colorModel); + for (var i = 0; i < 4; i++) + writeUint16(writer, Math.round((info.min && info.min[i] || 0) * 0x8000)); + for (var i = 0; i < 4; i++) + writeUint16(writer, Math.round((info.max && info.max[i] || 0) * 0x8000)); + writeZeros(writer, 4); +}); +function readSelectiveColors(reader) { + return { + c: readInt16(reader), + m: readInt16(reader), + y: readInt16(reader), + k: readInt16(reader), + }; +} +function writeSelectiveColors(writer, cmyk) { + var c = cmyk || {}; + writeInt16(writer, c.c); + writeInt16(writer, c.m); + writeInt16(writer, c.y); + writeInt16(writer, c.k); +} +addHandler('selc', adjustmentType('selective color'), function (reader, target) { + if (readUint16(reader) !== 1) + throw new Error('Invalid selc version'); + var mode = readUint16(reader) ? 'absolute' : 'relative'; + skipBytes(reader, 8); + target.adjustment = { + type: 'selective color', + mode: mode, + reds: readSelectiveColors(reader), + yellows: readSelectiveColors(reader), + greens: readSelectiveColors(reader), + cyans: readSelectiveColors(reader), + blues: readSelectiveColors(reader), + magentas: readSelectiveColors(reader), + whites: readSelectiveColors(reader), + neutrals: readSelectiveColors(reader), + blacks: readSelectiveColors(reader), + }; +}, function (writer, target) { + var info = target.adjustment; + writeUint16(writer, 1); // version + writeUint16(writer, info.mode === 'absolute' ? 1 : 0); + writeZeros(writer, 8); + writeSelectiveColors(writer, info.reds); + writeSelectiveColors(writer, info.yellows); + writeSelectiveColors(writer, info.greens); + writeSelectiveColors(writer, info.cyans); + writeSelectiveColors(writer, info.blues); + writeSelectiveColors(writer, info.magentas); + writeSelectiveColors(writer, info.whites); + writeSelectiveColors(writer, info.neutrals); + writeSelectiveColors(writer, info.blacks); +}); +addHandler('CgEd', function (target) { + var a = target.adjustment; + if (!a) + return false; + return (a.type === 'brightness/contrast' && !a.useLegacy) || + ((a.type === 'levels' || a.type === 'curves' || a.type === 'exposure' || a.type === 'channel mixer' || + a.type === 'hue/saturation') && a.presetFileName !== undefined); +}, function (reader, target, left) { + var desc = readVersionAndDescriptor(reader); + if (desc.Vrsn !== 1) + throw new Error('Invalid CgEd version'); + // this section can specify preset file name for other adjustment types + if ('presetFileName' in desc) { + target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.presetKind, presetFileName: desc.presetFileName }); + } + else if ('curvesPresetFileName' in desc) { + target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.curvesPresetKind, presetFileName: desc.curvesPresetFileName }); + } + else if ('mixerPresetFileName' in desc) { + target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.mixerPresetKind, presetFileName: desc.mixerPresetFileName }); + } + else { + target.adjustment = { + type: 'brightness/contrast', + brightness: desc.Brgh, + contrast: desc.Cntr, + meanValue: desc.means, + useLegacy: !!desc.useLegacy, + labColorOnly: !!desc['Lab '], + auto: !!desc.Auto, + }; + } + skipBytes(reader, left()); +}, function (writer, target) { + var _a, _b, _c, _d; + var info = target.adjustment; + if (info.type === 'levels' || info.type === 'exposure' || info.type === 'hue/saturation') { + var desc = { + Vrsn: 1, + presetKind: (_a = info.presetKind) !== null && _a !== void 0 ? _a : 1, + presetFileName: info.presetFileName || '', + }; + writeVersionAndDescriptor(writer, '', 'null', desc); + } + else if (info.type === 'curves') { + var desc = { + Vrsn: 1, + curvesPresetKind: (_b = info.presetKind) !== null && _b !== void 0 ? _b : 1, + curvesPresetFileName: info.presetFileName || '', + }; + writeVersionAndDescriptor(writer, '', 'null', desc); + } + else if (info.type === 'channel mixer') { + var desc = { + Vrsn: 1, + mixerPresetKind: (_c = info.presetKind) !== null && _c !== void 0 ? _c : 1, + mixerPresetFileName: info.presetFileName || '', + }; + writeVersionAndDescriptor(writer, '', 'null', desc); + } + else if (info.type === 'brightness/contrast') { + var desc = { + Vrsn: 1, + Brgh: info.brightness || 0, + Cntr: info.contrast || 0, + means: (_d = info.meanValue) !== null && _d !== void 0 ? _d : 127, + 'Lab ': !!info.labColorOnly, + useLegacy: !!info.useLegacy, + Auto: !!info.auto, + }; + writeVersionAndDescriptor(writer, '', 'null', desc); + } + else { + throw new Error('Unhandled CgEd case'); + } +}); +addHandler('Txt2', hasKey('engineData'), function (reader, target, left) { + var data = readBytes(reader, left()); + target.engineData = fromByteArray(data); + // const engineData = parseEngineData(data); + // console.log(require('util').inspect(engineData, false, 99, true)); + // require('fs').writeFileSync('resources/engineData2Simple.txt', require('util').inspect(engineData, false, 99, false), 'utf8'); + // require('fs').writeFileSync('test_data.json', JSON.stringify(ed, null, 2), 'utf8'); +}, function (writer, target) { + var buffer = toByteArray(target.engineData); + writeBytes(writer, buffer); +}); +addHandler('FMsk', hasKey('filterMask'), function (reader, target) { + target.filterMask = { + colorSpace: readColor(reader), + opacity: readUint16(reader) / 0xff, + }; +}, function (writer, target) { + var _a; + writeColor(writer, target.filterMask.colorSpace); + writeUint16(writer, clamp((_a = target.filterMask.opacity) !== null && _a !== void 0 ? _a : 1, 0, 1) * 0xff); +}); +addHandler('artd', // document-wide artboard info +function (// document-wide artboard info +target) { return target.artboards !== undefined; }, function (reader, target, left) { + var desc = readVersionAndDescriptor(reader); + target.artboards = { + count: desc['Cnt '], + autoExpandOffset: { horizontal: desc.autoExpandOffset.Hrzn, vertical: desc.autoExpandOffset.Vrtc }, + origin: { horizontal: desc.origin.Hrzn, vertical: desc.origin.Vrtc }, + autoExpandEnabled: desc.autoExpandEnabled, + autoNestEnabled: desc.autoNestEnabled, + autoPositionEnabled: desc.autoPositionEnabled, + shrinkwrapOnSaveEnabled: desc.shrinkwrapOnSaveEnabled, + docDefaultNewArtboardBackgroundColor: parseColor(desc.docDefaultNewArtboardBackgroundColor), + docDefaultNewArtboardBackgroundType: desc.docDefaultNewArtboardBackgroundType, + }; + skipBytes(reader, left()); +}, function (writer, target) { + var _a, _b, _c, _d, _e; + var artb = target.artboards; + var desc = { + 'Cnt ': artb.count, + autoExpandOffset: artb.autoExpandOffset ? { Hrzn: artb.autoExpandOffset.horizontal, Vrtc: artb.autoExpandOffset.vertical } : { Hrzn: 0, Vrtc: 0 }, + origin: artb.origin ? { Hrzn: artb.origin.horizontal, Vrtc: artb.origin.vertical } : { Hrzn: 0, Vrtc: 0 }, + autoExpandEnabled: (_a = artb.autoExpandEnabled) !== null && _a !== void 0 ? _a : true, + autoNestEnabled: (_b = artb.autoNestEnabled) !== null && _b !== void 0 ? _b : true, + autoPositionEnabled: (_c = artb.autoPositionEnabled) !== null && _c !== void 0 ? _c : true, + shrinkwrapOnSaveEnabled: (_d = artb.shrinkwrapOnSaveEnabled) !== null && _d !== void 0 ? _d : true, + docDefaultNewArtboardBackgroundColor: serializeColor(artb.docDefaultNewArtboardBackgroundColor), + docDefaultNewArtboardBackgroundType: (_e = artb.docDefaultNewArtboardBackgroundType) !== null && _e !== void 0 ? _e : 1, + }; + writeVersionAndDescriptor(writer, '', 'null', desc, 'artd'); +}); +export function hasMultiEffects(effects) { + return Object.keys(effects).map(function (key) { return effects[key]; }).some(function (v) { return Array.isArray(v) && v.length > 1; }); +} +addHandler('lfx2', function (target) { return target.effects !== undefined && !hasMultiEffects(target.effects); }, function (reader, target, left, _, options) { + var version = readUint32(reader); + if (version !== 0) + throw new Error("Invalid lfx2 version"); + var desc = readVersionAndDescriptor(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + // TODO: don't discard if we got it from lmfx + // discard if read in 'lrFX' section + target.effects = parseEffects(desc, !!options.logMissingFeatures); + skipBytes(reader, left()); +}, function (writer, target, _, options) { + var desc = serializeEffects(target.effects, !!options.logMissingFeatures, false); + // console.log(require('util').inspect(desc, false, 99, true)); + writeUint32(writer, 0); // version + writeVersionAndDescriptor(writer, '', 'null', desc); +}); +addHandler('cinf', hasKey('compositorUsed'), function (reader, target, left) { + var desc = readVersionAndDescriptor(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + target.compositorUsed = { + description: desc.description, + reason: desc.reason, + engine: desc.Engn.split('.')[1], + enableCompCore: desc.enableCompCore.split('.')[1], + enableCompCoreGPU: desc.enableCompCoreGPU.split('.')[1], + compCoreSupport: desc.compCoreSupport.split('.')[1], + compCoreGPUSupport: desc.compCoreGPUSupport.split('.')[1], + }; + skipBytes(reader, left()); +}, function (writer, target) { + var cinf = target.compositorUsed; + var desc = { + Vrsn: { major: 1, minor: 0, fix: 0 }, + // psVersion: { major: 22, minor: 3, fix: 1 }, // TESTING + description: cinf.description, + reason: cinf.reason, + Engn: "Engn.".concat(cinf.engine), + enableCompCore: "enable.".concat(cinf.enableCompCore), + enableCompCoreGPU: "enable.".concat(cinf.enableCompCoreGPU), + // enableCompCoreThreads: `enable.feature`, // TESTING + compCoreSupport: "reason.".concat(cinf.compCoreSupport), + compCoreGPUSupport: "reason.".concat(cinf.compCoreGPUSupport), + }; + writeVersionAndDescriptor(writer, '', 'null', desc); +}); +// extension settings ?, ignore it +addHandler('extn', function (target) { return target._extn !== undefined; }, function (reader, target) { + var desc = readVersionAndDescriptor(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + if (MOCK_HANDLERS) + target._extn = desc; +}, function (writer, target) { + // TODO: need to add correct types for desc fields (resources/src.psd) + if (MOCK_HANDLERS) + writeVersionAndDescriptor(writer, '', 'null', target._extn); +}); +addHandler('iOpa', hasKey('fillOpacity'), function (reader, target) { + target.fillOpacity = readUint8(reader) / 0xff; + skipBytes(reader, 3); +}, function (writer, target) { + writeUint8(writer, target.fillOpacity * 0xff); + writeZeros(writer, 3); +}); +addHandler('brst', hasKey('channelBlendingRestrictions'), function (reader, target, left) { + target.channelBlendingRestrictions = []; + while (left() > 4) { + target.channelBlendingRestrictions.push(readInt32(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.channelBlendingRestrictions; _i < _a.length; _i++) { + var channel = _a[_i]; + writeInt32(writer, channel); + } +}); +addHandler('tsly', hasKey('transparencyShapesLayer'), function (reader, target) { + target.transparencyShapesLayer = !!readUint8(reader); + skipBytes(reader, 3); +}, function (writer, target) { + writeUint8(writer, target.transparencyShapesLayer ? 1 : 0); + writeZeros(writer, 3); +}); + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFkZGl0aW9uYWxJbmZvLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxFQUFFLGFBQWEsRUFBRSxXQUFXLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFDdkQsT0FBTyxFQUFFLFdBQVcsRUFBRSxZQUFZLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUM3RCxPQUFPLEVBQUUsS0FBSyxFQUFFLFVBQVUsRUFBRSxXQUFXLEVBQUUsYUFBYSxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBVTFFLE9BQU8sR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npm-packages/mac-v2.4.x/ag-psd/dist-es/additionalInfo.js.map deleted file mode 100644 index 20839cf..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/additionalInfo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"additionalInfo.js","sourceRoot":"../src/","sources":["additionalInfo.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAU1E,OAAO,EACK,aAAa,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EACtG,SAAS,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,oBAAoB,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAC1G,gBAAgB,EAAE,2BAA2B,EAAE,eAAe,EAAE,WAAW,GAC3E,MAAM,aAAa,CAAC;AACrB,OAAO,EACK,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EACrG,UAAU,EAAE,YAAY,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,YAAY,EAAE,6BAA6B,EAChH,UAAU,EAAE,iBAAiB,EAAE,UAAU,GACzC,MAAM,aAAa,CAAC;AACrB,OAAO,EACN,IAAI,EAAE,IAAI,EAAyC,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAC/F,wBAAwB,EAAE,sBAAsB,EAAE,uBAAuB,EAAkB,YAAY,EACvG,YAAY,EAAE,UAAU,EAAkB,SAAS,EAAE,yBAAyB,EAC9E,wBAAwB,EAAoB,IAAI,EAAE,YAAY,EACJ,YAAY,EAAE,gBAAgB,EACxF,YAAY,EAAE,UAAU,EAAE,c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AAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3D,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AACvB,CAAC,CACD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAgFkC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/csh.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/csh.d.ts index 027615f..557e38e 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/csh.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/csh.d.ts @@ -1,10 +1,10 @@ -import { LayerVectorMask } from './psd'; -export interface Csh { - shapes: (LayerVectorMask & { - name: string; - id: string; - width: number; - height: number; - })[]; -} -export declare function readCsh(buffer: ArrayBufferView): Csh; +import { LayerVectorMask } from './psd'; +export interface Csh { + shapes: (LayerVectorMask & { + name: string; + id: string; + width: number; + height: number; + })[]; +} +export declare function readCsh(buffer: ArrayBufferView): Csh; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/csh.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/csh.js index 3192669..917a706 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/csh.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/csh.js @@ -1,44 +1,45 @@ -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -import { readVectorMask } from './additionalInfo'; -import { readUint32, checkSignature, createReader, readPascalString, readUnicodeString } from './psdReader'; -export function readCsh(buffer) { - var reader = createReader(buffer.buffer, buffer.byteOffset, buffer.byteLength); - var csh = { shapes: [] }; - checkSignature(reader, 'cush'); - if (readUint32(reader) !== 2) - throw new Error('Invalid version'); - var count = readUint32(reader); - for (var i = 0; i < count; i++) { - var name_1 = readUnicodeString(reader); - while (reader.offset % 4) - reader.offset++; // pad to 4byte bounds - if (readUint32(reader) !== 1) - throw new Error('Invalid shape version'); - var size = readUint32(reader); - var end = reader.offset + size; - var id = readPascalString(reader, 1); - // this might not be correct ??? - var y1 = readUint32(reader); - var x1 = readUint32(reader); - var y2 = readUint32(reader); - var x2 = readUint32(reader); - var width = x2 - x1; - var height = y2 - y1; - var mask = { paths: [] }; - readVectorMask(reader, mask, width, height, end - reader.offset); - csh.shapes.push(__assign({ name: name_1, id: id, width: width, height: height }, mask)); - reader.offset = end; - } - return csh; -} -//# sourceMappingURL=csh.js.map \ No newline at end of file +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import { readVectorMask } from './additionalInfo'; +import { readUint32, checkSignature, createReader, readPascalString, readUnicodeString } from './psdReader'; +export function readCsh(buffer) { + var reader = createReader(buffer.buffer, buffer.byteOffset, buffer.byteLength); + var csh = { shapes: [] }; + checkSignature(reader, 'cush'); + if (readUint32(reader) !== 2) + throw new Error('Invalid version'); + var count = readUint32(reader); + for (var i = 0; i < count; i++) { + var name_1 = readUnicodeString(reader); + while (reader.offset % 4) + reader.offset++; // pad to 4byte bounds + if (readUint32(reader) !== 1) + throw new Error('Invalid shape version'); + var size = readUint32(reader); + var end = reader.offset + size; + var id = readPascalString(reader, 1); + // this might not be correct ??? + var y1 = readUint32(reader); + var x1 = readUint32(reader); + var y2 = readUint32(reader); + var x2 = readUint32(reader); + var width = x2 - x1; + var height = y2 - y1; + var mask = { paths: [] }; + readVectorMask(reader, mask, width, height, end - reader.offset); + csh.shapes.push(__assign({ name: name_1, id: id, width: width,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B9KTtcclxuXHJcblx0XHRyZWFkZXIub2Zmc2V0ID0gZW5kO1xyXG5cdH1cclxuXHJcblx0cmV0dXJuIGNzaDtcclxufVxyXG4iXSwic291cmNlUm9vdCI6IkM6XFxQcm9qZWN0c1xcZ2l0aHViXFxhZy1wc2RcXHNyYyJ9 diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/csh.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/csh.js.map deleted file mode 100644 index 0974784..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/csh.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"csh.js","sourceRoot":"../src/","sources":["csh.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAW5G,MAAM,UAAU,OAAO,CAAC,MAAuB;IAC9C,IAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IACjF,IAAM,GAAG,GAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAEhC,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,IAAI,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACjE,IAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;IAEjC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE;QAC/B,IAAM,MAAI,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;QACvC,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC;YAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,sBAAsB;QACjE,IAAI,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC;YAAE,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;QACvE,IAAM,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;QAChC,IAAM,GAAG,GAAG,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;QACjC,IAAM,EAAE,GAAG,gBAAgB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;QACvC,gCAAgC;QAChC,IAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;QAC9B,IAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;QAC9B,IAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;QAC9B,IAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;QAC9B,IAAM,KAAK,GAAG,EAAE,GAAG,EAAE,CAAC;QACtB,IAAM,MAAM,GAAG,EAAE,GAAG,EAAE,CAAC;QACvB,IAAM,IAAI,GAAoB,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;QAC5C,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QACjE,GAAG,CAAC,MAAM,CAAC,IAAI,YAAG,IAAI,QAAA,EAAE,EAAE,IAAA,EAAE,KAAK,OAAA,EAAE,MAAM,QAAA,IAAK,IAAI,EAAG,CAAC;QAEtD,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC;KACpB;IAED,OAAO,GAAG,CAAC;AACZ,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/descriptor.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/descriptor.d.ts index 8a11dff..5ba490e 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/descriptor.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/descriptor.d.ts @@ -1,415 +1,390 @@ -import { AntiAlias, BevelDirection, BevelStyle, BevelTechnique, BlendMode, Color, GlowSource, GlowTechnique, GradientStyle, InterpolationMethod, LayerEffectsInfo, LineAlignment, LineCapType, LineJoinType, Orientation, TextGridding, TimelineKeyInterpolation, TimelineTrack, TimelineTrackType, Units, UnitsValue, VectorContent, WarpStyle } from './psd'; -import { PsdReader } from './psdReader'; -import { PsdWriter } from './psdWriter'; -export declare function setLogErrors(value: boolean): void; -export declare function readAsciiStringOrClassId(reader: PsdReader): string; -export declare function readDescriptorStructure(reader: PsdReader): any; -export declare function writeDescriptorStructure(writer: PsdWriter, name: string, classId: string, value: any, root: string): void; -export declare function readVersionAndDescriptor(reader: PsdReader): any; -export declare function writeVersionAndDescriptor(writer: PsdWriter, name: string, classID: string, descriptor: any, root?: string): void; -export type DescriptorUnits = 'Angle' | 'Density' | 'Distance' | 'None' | 'Percent' | 'Pixels' | 'Millimeters' | 'Points' | 'Picas' | 'Inches' | 'Centimeters'; -export interface DescriptorUnitsValue { - units: DescriptorUnits; - value: number; -} -export type DescriptorColor = { - 'Rd ': number; - 'Grn ': number; - 'Bl ': number; -} | { - 'H ': DescriptorUnitsValue; - Strt: number; - Brgh: number; -} | { - 'Cyn ': number; - Mgnt: number; - 'Ylw ': number; - Blck: number; -} | { - 'Gry ': number; -} | { - Lmnc: number; - 'A ': number; - 'B ': number; -} | { - redFloat: number; - greenFloat: number; - blueFloat: number; -}; -export interface DesciptorPattern { - 'Nm ': string; - Idnt: string; -} -export type DesciptorGradient = { - 'Nm ': string; - GrdF: 'GrdF.CstS'; - Intr: number; - Clrs: { - 'Clr ': DescriptorColor; - Type: 'Clry.UsrS'; - Lctn: number; - Mdpn: number; - }[]; - Trns: { - Opct: DescriptorUnitsValue; - Lctn: number; - Mdpn: number; - }[]; -} | { - GrdF: 'GrdF.ClNs'; - Smth: number; - 'Nm ': string; - ClrS: string; - RndS: number; - VctC?: boolean; - ShTr?: boolean; - 'Mnm ': number[]; - 'Mxm ': number[]; -}; -export interface DescriptorColorContent { - 'Clr ': DescriptorColor; -} -export interface DescriptorGradientContent { - Grad: DesciptorGradient; - Type: string; - Dthr?: boolean; - Rvrs?: boolean; - Angl?: DescriptorUnitsValue; - 'Scl '?: DescriptorUnitsValue; - Algn?: boolean; - Ofst?: { - Hrzn: DescriptorUnitsValue; - Vrtc: DescriptorUnitsValue; - }; -} -export interface DescriptorPatternContent { - Ptrn: DesciptorPattern; - Lnkd?: boolean; - phase?: { - Hrzn: number; - Vrtc: number; - }; -} -export type DescriptorVectorContent = DescriptorColorContent | DescriptorGradientContent | DescriptorPatternContent; -export interface StrokeDescriptor { - strokeStyleVersion: number; - strokeEnabled: boolean; - fillEnabled: boolean; - strokeStyleLineWidth: DescriptorUnitsValue; - strokeStyleLineDashOffset: DescriptorUnitsValue; - strokeStyleMiterLimit: number; - strokeStyleLineCapType: string; - strokeStyleLineJoinType: string; - strokeStyleLineAlignment: string; - strokeStyleScaleLock: boolean; - strokeStyleStrokeAdjust: boolean; - strokeStyleLineDashSet: DescriptorUnitsValue[]; - strokeStyleBlendMode: string; - strokeStyleOpacity: DescriptorUnitsValue; - strokeStyleContent: DescriptorVectorContent; - strokeStyleResolution: number; -} -export interface TextDescriptor { - 'Txt ': string; - textGridding: string; - Ornt: string; - AntA: string; - TextIndex: number; - EngineData?: Uint8Array; -} -export interface WarpDescriptor { - warpStyle: string; - warpValue?: number; - warpValues?: number[]; - warpPerspective: number; - warpPerspectiveOther: number; - warpRotate: string; - bounds?: { - 'Top ': DescriptorUnitsValue; - Left: DescriptorUnitsValue; - Btom: DescriptorUnitsValue; - Rght: DescriptorUnitsValue; - }; - uOrder: number; - vOrder: number; - customEnvelopeWarp?: { - meshPoints: { - type: 'Hrzn' | 'Vrtc'; - values: number[]; - }[]; - }; -} -export interface QuiltWarpDescriptor extends WarpDescriptor { - deformNumRows: number; - deformNumCols: number; - customEnvelopeWarp: { - quiltSliceX: { - type: 'quiltSliceX'; - values: number[]; - }[]; - quiltSliceY: { - type: 'quiltSliceY'; - values: number[]; - }[]; - meshPoints: { - type: 'Hrzn' | 'Vrtc'; - values: number[]; - }[]; - }; -} -export interface FractionDescriptor { - numerator: number; - denominator: number; -} -export interface HrznVrtcDescriptor { - Hrzn: number; - Vrtc: number; -} -export interface FrameDescriptor { - FrLs: number[]; - enab?: boolean; - IMsk?: { - Ofst: HrznVrtcDescriptor; - }; - VMsk?: { - Ofst: HrznVrtcDescriptor; - }; - Ofst?: HrznVrtcDescriptor; - FXRf?: HrznVrtcDescriptor; - Lefx?: Lfx2Descriptor; - blendOptions?: { - Opct: DescriptorUnitsValue; - }; -} -export interface FrameListDescriptor { - LaID: number; - LaSt: FrameDescriptor[]; -} -export declare function horzVrtcToXY(hv: HrznVrtcDescriptor): { - x: number; - y: number; -}; -export declare function xyToHorzVrtc(xy: { - x: number; - y: number; -}): HrznVrtcDescriptor; -export type TimelineAnimKeyDescriptor = { - Type: 'keyType.Opct'; - Opct: DescriptorUnitsValue; -} | { - Type: 'keyType.Trnf'; - 'Scl ': HrznVrtcDescriptor; - Skew: HrznVrtcDescriptor; - rotation: number; - translation: HrznVrtcDescriptor; -} | { - Type: 'keyType.Pstn'; - Hrzn: number; - Vrtc: number; -} | { - Type: 'keyType.sheetStyle'; - sheetStyle: { - Vrsn: number; - Lefx?: Lfx2Descriptor; - blendOptions: {}; - }; -} | { - Type: 'keyType.globalLighting'; - gblA: number; - globalAltitude: number; -}; -export interface TimelineKeyDescriptor { - Vrsn: 1; - animInterpStyle: 'animInterpStyle.Lnr ' | 'animInterpStyle.hold'; - time: FractionDescriptor; - animKey: TimelineAnimKeyDescriptor; - selected: boolean; -} -export interface TimelineTrackDescriptor { - trackID: 'stdTrackID.globalLightingTrack' | 'stdTrackID.opacityTrack' | 'stdTrackID.styleTrack' | 'stdTrackID.sheetTransformTrack' | 'stdTrackID.sheetPositionTrack'; - Vrsn: 1; - enab: boolean; - Effc: boolean; - effectParams?: { - keyList: TimelineKeyDescriptor[]; - fillCanvas: boolean; - zoomOrigin: number; - }; - keyList: TimelineKeyDescriptor[]; -} -export interface TimeScopeDescriptor { - Vrsn: 1; - Strt: FractionDescriptor; - duration: FractionDescriptor; - inTime: FractionDescriptor; - outTime: FractionDescriptor; -} -export interface TimelineDescriptor { - Vrsn: 1; - timeScope: TimeScopeDescriptor; - autoScope: boolean; - audioLevel: number; - LyrI: number; - trackList?: TimelineTrackDescriptor[]; -} -export interface EffectDescriptor extends Partial, Partial { - enab?: boolean; - Styl: string; - PntT?: string; - 'Md '?: string; - Opct?: DescriptorUnitsValue; - 'Sz '?: DescriptorUnitsValue; - 'Clr '?: DescriptorColor; - present?: boolean; - showInDialog?: boolean; - overprint?: boolean; -} -export interface Lfx2Descriptor { - 'Scl '?: DescriptorUnitsValue; - masterFXSwitch?: boolean; - DrSh?: EffectDescriptor; - IrSh?: EffectDescriptor; - OrGl?: EffectDescriptor; - IrGl?: EffectDescriptor; - ebbl?: EffectDescriptor; - SoFi?: EffectDescriptor; - patternFill?: EffectDescriptor; - GrFl?: EffectDescriptor; - ChFX?: EffectDescriptor; - FrFX?: EffectDescriptor; -} -export interface LmfxDescriptor { - 'Scl '?: DescriptorUnitsValue; - masterFXSwitch?: boolean; - numModifyingFX?: number; - OrGl?: EffectDescriptor; - IrGl?: EffectDescriptor; - ebbl?: EffectDescriptor; - ChFX?: EffectDescriptor; - dropShadowMulti?: EffectDescriptor[]; - innerShadowMulti?: EffectDescriptor[]; - solidFillMulti?: EffectDescriptor[]; - gradientFillMulti?: EffectDescriptor[]; - frameFXMulti?: EffectDescriptor[]; - patternFill?: EffectDescriptor; -} -export declare function serializeEffects(e: LayerEffectsInfo, log: boolean, multi: boolean): Lfx2Descriptor & LmfxDescriptor; -export declare function parseEffects(info: Lfx2Descriptor & LmfxDescriptor, log: boolean): LayerEffectsInfo; -export declare function parseTrackList(trackList: TimelineTrackDescriptor[], logMissingFeatures: boolean): TimelineTrack[]; -export declare function serializeTrackList(tracks: TimelineTrack[]): TimelineTrackDescriptor[]; -export declare function parseVectorContent(descriptor: DescriptorVectorContent): VectorContent; -export declare function serializeVectorContent(content: VectorContent): { - descriptor: DescriptorVectorContent; - key: string; -}; -export declare function parseColor(color: DescriptorColor): Color; -export declare function serializeColor(color: Color | undefined): DescriptorColor; -export declare function parseAngle(x: DescriptorUnitsValue): number; -export declare function parsePercent(x: DescriptorUnitsValue | undefined): number; -export declare function parsePercentOrAngle(x: DescriptorUnitsValue | undefined): number; -export declare function parseUnits({ units, value }: DescriptorUnitsValue): UnitsValue; -export declare function parseUnitsOrNumber(value: DescriptorUnitsValue | number, units?: Units): UnitsValue; -export declare function parseUnitsToNumber({ units, value }: DescriptorUnitsValue, expectedUnits: string): number; -export declare function unitsAngle(value: number | undefined): DescriptorUnitsValue; -export declare function unitsPercent(value: number | undefined): DescriptorUnitsValue; -export declare function unitsValue(x: UnitsValue | undefined, key: string): DescriptorUnitsValue; -export declare const textGridding: { - decode: (val: string) => TextGridding; - encode: (val: TextGridding | undefined) => string; -}; -export declare const Ornt: { - decode: (val: string) => Orientation; - encode: (val: Orientation | undefined) => string; -}; -export declare const Annt: { - decode: (val: string) => AntiAlias; - encode: (val: AntiAlias | undefined) => string; -}; -export declare const warpStyle: { - decode: (val: string) => WarpStyle; - encode: (val: WarpStyle | undefined) => string; -}; -export declare const BlnM: { - decode: (val: string) => BlendMode; - encode: (val: BlendMode | undefined) => string; -}; -export declare const BESl: { - decode: (val: string) => BevelStyle; - encode: (val: BevelStyle | undefined) => string; -}; -export declare const bvlT: { - decode: (val: string) => BevelTechnique; - encode: (val: BevelTechnique | undefined) => string; -}; -export declare const BESs: { - decode: (val: string) => BevelDirection; - encode: (val: BevelDirection | undefined) => string; -}; -export declare const BETE: { - decode: (val: string) => GlowTechnique; - encode: (val: GlowTechnique | undefined) => string; -}; -export declare const IGSr: { - decode: (val: string) => GlowSource; - encode: (val: GlowSource | undefined) => string; -}; -export declare const GrdT: { - decode: (val: string) => GradientStyle; - encode: (val: GradientStyle | undefined) => string; -}; -export declare const animInterpStyleEnum: { - decode: (val: string) => TimelineKeyInterpolation; - encode: (val: TimelineKeyInterpolation | undefined) => string; -}; -export declare const stdTrackID: { - decode: (val: string) => TimelineTrackType; - encode: (val: TimelineTrackType | undefined) => string; -}; -export declare const gradientInterpolationMethodType: { - decode: (val: string) => InterpolationMethod; - encode: (val: InterpolationMethod | undefined) => string; -}; -export declare const ClrS: { - decode: (val: string) => "rgb" | "hsb" | "lab"; - encode: (val: "rgb" | "hsb" | "lab" | undefined) => string; -}; -export declare const FStl: { - decode: (val: string) => "center" | "inside" | "outside"; - encode: (val: "center" | "inside" | "outside" | undefined) => string; -}; -export declare const FrFl: { - decode: (val: string) => "color" | "pattern" | "gradient"; - encode: (val: "color" | "pattern" | "gradient" | undefined) => string; -}; -export declare const ESliceType: { - decode: (val: string) => "image" | "noImage"; - encode: (val: "image" | "noImage" | undefined) => string; -}; -export declare const ESliceHorzAlign: { - decode: (val: string) => "default"; - encode: (val: "default" | undefined) => string; -}; -export declare const ESliceVertAlign: { - decode: (val: string) => "default"; - encode: (val: "default" | undefined) => string; -}; -export declare const ESliceOrigin: { - decode: (val: string) => "userGenerated" | "autoGenerated" | "layer"; - encode: (val: "userGenerated" | "autoGenerated" | "layer" | undefined) => string; -}; -export declare const ESliceBGColorType: { - decode: (val: string) => "none" | "color" | "matte"; - encode: (val: "none" | "color" | "matte" | undefined) => string; -}; -export declare const strokeStyleLineCapType: { - decode: (val: string) => LineCapType; - encode: (val: LineCapType | undefined) => string; -}; -export declare const strokeStyleLineJoinType: { - decode: (val: string) => LineJoinType; - encode: (val: LineJoinType | undefined) => string; -}; -export declare const strokeStyleLineAlignment: { - decode: (val: string) => LineAlignment; - encode: (val: LineAlignment | undefined) => string; -}; +import { AntiAlias, BevelDirection, BevelStyle, BevelTechnique, BlendMode, Color, GlowSource, GlowTechnique, GradientStyle, InterpolationMethod, LayerEffectsInfo, LineAlignment, LineCapType, LineJoinType, Orientation, TextGridding, TimelineKeyInterpolation, TimelineTrack, TimelineTrackType, Units, UnitsValue, VectorContent, WarpStyle } from './psd'; +import { PsdReader } from './psdReader'; +import { PsdWriter } from './psdWriter'; +export declare function setLogErrors(value: boolean): void; +export declare function readAsciiStringOrClassId(reader: PsdReader): string; +export declare function readDescriptorStructure(reader: PsdReader): any; +export declare function writeDescriptorStructure(writer: PsdWriter, name: string, classId: string, value: any, root: string): void; +export declare function readVersionAndDescriptor(reader: PsdReader): any; +export declare function writeVersionAndDescriptor(writer: PsdWriter, name: string, classID: string, descriptor: any, root?: string): void; +export declare type DescriptorUnits = 'Angle' | 'Density' | 'Distance' | 'None' | 'Percent' | 'Pixels' | 'Millimeters' | 'Points' | 'Picas' | 'Inches' | 'Centimeters'; +export interface DescriptorUnitsValue { + units: DescriptorUnits; + value: number; +} +export declare type DescriptorColor = { + 'Rd ': number; + 'Grn ': number; + 'Bl ': number; +} | { + 'H ': DescriptorUnitsValue; + Strt: number; + Brgh: number; +} | { + 'Cyn ': number; + Mgnt: number; + 'Ylw ': number; + Blck: number; +} | { + 'Gry ': number; +} | { + Lmnc: number; + 'A ': number; + 'B ': number; +}; +export interface DesciptorPattern { + 'Nm ': string; + Idnt: string; +} +export declare type DesciptorGradient = { + 'Nm ': string; + GrdF: 'GrdF.CstS'; + Intr: number; + Clrs: { + 'Clr ': DescriptorColor; + Type: 'Clry.UsrS'; + Lctn: number; + Mdpn: number; + }[]; + Trns: { + Opct: DescriptorUnitsValue; + Lctn: number; + Mdpn: number; + }[]; +} | { + GrdF: 'GrdF.ClNs'; + Smth: number; + 'Nm ': string; + ClrS: string; + RndS: number; + VctC?: boolean; + ShTr?: boolean; + 'Mnm ': number[]; + 'Mxm ': number[]; +}; +export interface DescriptorColorContent { + 'Clr ': DescriptorColor; +} +export interface DescriptorGradientContent { + Grad: DesciptorGradient; + Type: string; + Dthr?: boolean; + Rvrs?: boolean; + Angl?: DescriptorUnitsValue; + 'Scl '?: DescriptorUnitsValue; + Algn?: boolean; + Ofst?: { + Hrzn: DescriptorUnitsValue; + Vrtc: DescriptorUnitsValue; + }; +} +export interface DescriptorPatternContent { + Ptrn: DesciptorPattern; + Lnkd?: boolean; + phase?: { + Hrzn: number; + Vrtc: number; + }; +} +export declare type DescriptorVectorContent = DescriptorColorContent | DescriptorGradientContent | DescriptorPatternContent; +export interface StrokeDescriptor { + strokeStyleVersion: number; + strokeEnabled: boolean; + fillEnabled: boolean; + strokeStyleLineWidth: DescriptorUnitsValue; + strokeStyleLineDashOffset: DescriptorUnitsValue; + strokeStyleMiterLimit: number; + strokeStyleLineCapType: string; + strokeStyleLineJoinType: string; + strokeStyleLineAlignment: string; + strokeStyleScaleLock: boolean; + strokeStyleStrokeAdjust: boolean; + strokeStyleLineDashSet: DescriptorUnitsValue[]; + strokeStyleBlendMode: string; + strokeStyleOpacity: DescriptorUnitsValue; + strokeStyleContent: DescriptorVectorContent; + strokeStyleResolution: number; +} +export interface TextDescriptor { + 'Txt ': string; + textGridding: string; + Ornt: string; + AntA: string; + TextIndex: number; + EngineData?: Uint8Array; +} +export interface WarpDescriptor { + warpStyle: string; + warpValue: number; + warpPerspective: number; + warpPerspectiveOther: number; + warpRotate: string; + bounds?: { + 'Top ': DescriptorUnitsValue; + Left: DescriptorUnitsValue; + Btom: DescriptorUnitsValue; + Rght: DescriptorUnitsValue; + }; + uOrder: number; + vOrder: number; + customEnvelopeWarp?: { + meshPoints: { + type: 'Hrzn' | 'Vrtc'; + values: number[]; + }[]; + }; +} +export interface QuiltWarpDescriptor extends WarpDescriptor { + deformNumRows: number; + deformNumCols: number; + customEnvelopeWarp: { + quiltSliceX: { + type: 'quiltSliceX'; + values: number[]; + }[]; + quiltSliceY: { + type: 'quiltSliceY'; + values: number[]; + }[]; + meshPoints: { + type: 'Hrzn' | 'Vrtc'; + values: number[]; + }[]; + }; +} +export interface FractionDescriptor { + numerator: number; + denominator: number; +} +export interface HrznVrtcDescriptor { + Hrzn: number; + Vrtc: number; +} +export interface FrameDescriptor { + FrLs: number[]; + enab?: boolean; + IMsk?: { + Ofst: HrznVrtcDescriptor; + }; + VMsk?: { + Ofst: HrznVrtcDescriptor; + }; + Ofst?: HrznVrtcDescriptor; + FXRf?: HrznVrtcDescriptor; + Lefx?: Lfx2Descriptor; + blendOptions?: { + Opct: DescriptorUnitsValue; + }; +} +export interface FrameListDescriptor { + LaID: number; + LaSt: FrameDescriptor[]; +} +export declare function horzVrtcToXY(hv: HrznVrtcDescriptor): { + x: number; + y: number; +}; +export declare function xyToHorzVrtc(xy: { + x: number; + y: number; +}): HrznVrtcDescriptor; +export declare type TimelineAnimKeyDescriptor = { + Type: 'keyType.Opct'; + Opct: DescriptorUnitsValue; +} | { + Type: 'keyType.Trnf'; + 'Scl ': HrznVrtcDescriptor; + Skew: HrznVrtcDescriptor; + rotation: number; + translation: HrznVrtcDescriptor; +} | { + Type: 'keyType.Pstn'; + Hrzn: number; + Vrtc: number; +} | { + Type: 'keyType.sheetStyle'; + sheetStyle: { + Vrsn: number; + Lefx?: Lfx2Descriptor; + blendOptions: {}; + }; +} | { + Type: 'keyType.globalLighting'; + gblA: number; + globalAltitude: number; +}; +export interface TimelineKeyDescriptor { + Vrsn: 1; + animInterpStyle: 'animInterpStyle.Lnr ' | 'animInterpStyle.hold'; + time: FractionDescriptor; + animKey: TimelineAnimKeyDescriptor; + selected: boolean; +} +export interface TimelineTrackDescriptor { + trackID: 'stdTrackID.globalLightingTrack' | 'stdTrackID.opacityTrack' | 'stdTrackID.styleTrack' | 'stdTrackID.sheetTransformTrack' | 'stdTrackID.sheetPositionTrack'; + Vrsn: 1; + enab: boolean; + Effc: boolean; + effectParams?: { + keyList: TimelineKeyDescriptor[]; + fillCanvas: boolean; + zoomOrigin: number; + }; + keyList: TimelineKeyDescriptor[]; +} +export interface TimeScopeDescriptor { + Vrsn: 1; + Strt: FractionDescriptor; + duration: FractionDescriptor; + inTime: FractionDescriptor; + outTime: FractionDescriptor; +} +export interface TimelineDescriptor { + Vrsn: 1; + timeScope: TimeScopeDescriptor; + autoScope: boolean; + audioLevel: number; + LyrI: number; + trackList?: TimelineTrackDescriptor[]; +} +export interface EffectDescriptor extends Partial, Partial { + enab?: boolean; + Styl: string; + PntT?: string; + 'Md '?: string; + Opct?: DescriptorUnitsValue; + 'Sz '?: DescriptorUnitsValue; + 'Clr '?: DescriptorColor; + present?: boolean; + showInDialog?: boolean; + overprint?: boolean; +} +export interface Lfx2Descriptor { + 'Scl '?: DescriptorUnitsValue; + masterFXSwitch?: boolean; + DrSh?: EffectDescriptor; + IrSh?: EffectDescriptor; + OrGl?: EffectDescriptor; + IrGl?: EffectDescriptor; + ebbl?: EffectDescriptor; + SoFi?: EffectDescriptor; + patternFill?: EffectDescriptor; + GrFl?: EffectDescriptor; + ChFX?: EffectDescriptor; + FrFX?: EffectDescriptor; +} +export interface LmfxDescriptor { + 'Scl '?: DescriptorUnitsValue; + masterFXSwitch?: boolean; + numModifyingFX?: number; + OrGl?: EffectDescriptor; + IrGl?: EffectDescriptor; + ebbl?: EffectDescriptor; + ChFX?: EffectDescriptor; + dropShadowMulti?: EffectDescriptor[]; + innerShadowMulti?: EffectDescriptor[]; + solidFillMulti?: EffectDescriptor[]; + gradientFillMulti?: EffectDescriptor[]; + frameFXMulti?: EffectDescriptor[]; + patternFill?: EffectDescriptor; +} +export declare function serializeEffects(e: LayerEffectsInfo, log: boolean, multi: boolean): Lfx2Descriptor & LmfxDescriptor; +export declare function parseEffects(info: Lfx2Descriptor & LmfxDescriptor, log: boolean): LayerEffectsInfo; +export declare function parseTrackList(trackList: TimelineTrackDescriptor[], logMissingFeatures: boolean): TimelineTrack[]; +export declare function serializeTrackList(tracks: TimelineTrack[]): TimelineTrackDescriptor[]; +export declare function parseVectorContent(descriptor: DescriptorVectorContent): VectorContent; +export declare function serializeVectorContent(content: VectorContent): { + descriptor: DescriptorVectorContent; + key: string; +}; +export declare function parseColor(color: DescriptorColor): Color; +export declare function serializeColor(color: Color | undefined): DescriptorColor; +export declare function parseAngle(x: DescriptorUnitsValue): number; +export declare function parsePercent(x: DescriptorUnitsValue | undefined): number; +export declare function parsePercentOrAngle(x: DescriptorUnitsValue | undefined): number; +export declare function parseUnits({ units, value }: DescriptorUnitsValue): UnitsValue; +export declare function parseUnitsOrNumber(value: DescriptorUnitsValue | number, units?: Units): UnitsValue; +export declare function parseUnitsToNumber({ units, value }: DescriptorUnitsValue, expectedUnits: string): number; +export declare function unitsAngle(value: number | undefined): DescriptorUnitsValue; +export declare function unitsPercent(value: number | undefined): DescriptorUnitsValue; +export declare function unitsValue(x: UnitsValue | undefined, key: string): DescriptorUnitsValue; +export declare const textGridding: { + decode: (val: string) => TextGridding; + encode: (val: TextGridding | undefined) => string; +}; +export declare const Ornt: { + decode: (val: string) => Orientation; + encode: (val: Orientation | undefined) => string; +}; +export declare const Annt: { + decode: (val: string) => AntiAlias; + encode: (val: AntiAlias | undefined) => string; +}; +export declare const warpStyle: { + decode: (val: string) => WarpStyle; + encode: (val: WarpStyle | undefined) => string; +}; +export declare const BlnM: { + decode: (val: string) => BlendMode; + encode: (val: BlendMode | undefined) => string; +}; +export declare const BESl: { + decode: (val: string) => BevelStyle; + encode: (val: BevelStyle | undefined) => string; +}; +export declare const bvlT: { + decode: (val: string) => BevelTechnique; + encode: (val: BevelTechnique | undefined) => string; +}; +export declare const BESs: { + decode: (val: string) => BevelDirection; + encode: (val: BevelDirection | undefined) => string; +}; +export declare const BETE: { + decode: (val: string) => GlowTechnique; + encode: (val: GlowTechnique | undefined) => string; +}; +export declare const IGSr: { + decode: (val: string) => GlowSource; + encode: (val: GlowSource | undefined) => string; +}; +export declare const GrdT: { + decode: (val: string) => GradientStyle; + encode: (val: GradientStyle | undefined) => string; +}; +export declare const animInterpStyleEnum: { + decode: (val: string) => TimelineKeyInterpolation; + encode: (val: TimelineKeyInterpolation | undefined) => string; +}; +export declare const stdTrackID: { + decode: (val: string) => TimelineTrackType; + encode: (val: TimelineTrackType | undefined) => string; +}; +export declare const gradientInterpolationMethodType: { + decode: (val: string) => InterpolationMethod; + encode: (val: InterpolationMethod | undefined) => string; +}; +export declare const ClrS: { + decode: (val: string) => "rgb" | "hsb" | "lab"; + encode: (val: "rgb" | "hsb" | "lab" | undefined) => string; +}; +export declare const FStl: { + decode: (val: string) => "center" | "inside" | "outside"; + encode: (val: "center" | "inside" | "outside" | undefined) => string; +}; +export declare const FrFl: { + decode: (val: string) => "color" | "pattern" | "gradient"; + encode: (val: "color" | "pattern" | "gradient" | undefined) => string; +}; +export declare const strokeStyleLineCapType: { + decode: (val: string) => LineCapType; + encode: (val: LineCapType | undefined) => string; +}; +export declare const strokeStyleLineJoinType: { + decode: (val: string) => LineJoinType; + encode: (val: LineJoinType | undefined) => string; +}; +export declare const strokeStyleLineAlignment: { + decode: (val: string) => LineAlignment; + encode: (val: LineAlignment | undefined) => string; +}; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/descriptor.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/descriptor.js index 0545257..2d2a2a6 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/descriptor.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/descriptor.js @@ -1,1698 +1,1616 @@ -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -import { createEnum } from './helpers'; -import { readSignature, readUnicodeString, readUint32, readUint8, readFloat64, readBytes, readAsciiString, readInt32, readFloat32, readInt32LE, readUnicodeStringWithLength } from './psdReader'; -import { writeSignature, writeBytes, writeUint32, writeFloat64, writeUint8, writeUnicodeStringWithPadding, writeInt32, writeFloat32, writeUnicodeString } from './psdWriter'; -function revMap(map) { - var result = {}; - Object.keys(map).forEach(function (key) { return result[map[key]] = key; }); - return result; -} -var unitsMap = { - '#Ang': 'Angle', - '#Rsl': 'Density', - '#Rlt': 'Distance', - '#Nne': 'None', - '#Prc': 'Percent', - '#Pxl': 'Pixels', - '#Mlm': 'Millimeters', - '#Pnt': 'Points', - 'RrPi': 'Picas', - 'RrIn': 'Inches', - 'RrCm': 'Centimeters', -}; -var unitsMapRev = revMap(unitsMap); -var logErrors = false; -export function setLogErrors(value) { - logErrors = value; -} -function makeType(name, classID) { - return { name: name, classID: classID }; -} -var nullType = makeType('', 'null'); -var fieldToExtType = { - strokeStyleContent: makeType('', 'solidColorLayer'), - // printProofSetup: makeType('校样设置', 'proofSetup'), // TESTING - printProofSetup: makeType('Proof Setup', 'proofSetup'), - patternFill: makeType('', 'patternFill'), - Grad: makeType('Gradient', 'Grdn'), - ebbl: makeType('', 'ebbl'), - SoFi: makeType('', 'SoFi'), - GrFl: makeType('', 'GrFl'), - sdwC: makeType('', 'RGBC'), - hglC: makeType('', 'RGBC'), - 'Clr ': makeType('', 'RGBC'), - 'tintColor': makeType('', 'RGBC'), - Ofst: makeType('', 'Pnt '), - ChFX: makeType('', 'ChFX'), - MpgS: makeType('', 'ShpC'), - DrSh: makeType('', 'DrSh'), - IrSh: makeType('', 'IrSh'), - OrGl: makeType('', 'OrGl'), - IrGl: makeType('', 'IrGl'), - TrnS: makeType('', 'ShpC'), - Ptrn: makeType('', 'Ptrn'), - FrFX: makeType('', 'FrFX'), - phase: makeType('', 'Pnt '), - frameStep: nullType, - duration: nullType, - workInTime: nullType, - workOutTime: nullType, - audioClipGroupList: nullType, - bounds: makeType('', 'Rctn'), - customEnvelopeWarp: makeType('', 'customEnvelopeWarp'), - warp: makeType('', 'warp'), - 'Sz ': makeType('', 'Pnt '), - origin: makeType('', 'Pnt '), - autoExpandOffset: makeType('', 'Pnt '), - keyOriginShapeBBox: makeType('', 'unitRect'), - Vrsn: nullType, - psVersion: nullType, - docDefaultNewArtboardBackgroundColor: makeType('', 'RGBC'), - artboardRect: makeType('', 'classFloatRect'), - keyOriginRRectRadii: makeType('', 'radii'), - keyOriginBoxCorners: nullType, - rectangleCornerA: makeType('', 'Pnt '), - rectangleCornerB: makeType('', 'Pnt '), - rectangleCornerC: makeType('', 'Pnt '), - rectangleCornerD: makeType('', 'Pnt '), - compInfo: nullType, - Trnf: makeType('Transform', 'Trnf'), - quiltWarp: makeType('', 'quiltWarp'), - generatorSettings: nullType, - crema: nullType, - FrIn: nullType, - blendOptions: nullType, - FXRf: nullType, - Lefx: nullType, - time: nullType, - animKey: nullType, - timeScope: nullType, - inTime: nullType, - outTime: nullType, - sheetStyle: nullType, - translation: nullType, - Skew: nullType, - 'Lnk ': makeType('', 'ExternalFileLink'), - frameReader: makeType('', 'FrameReader'), - effectParams: makeType('', 'motionTrackEffectParams'), - Impr: makeType('None', 'none'), - Anch: makeType('', 'Pnt '), - 'Fwd ': makeType('', 'Pnt '), - 'Bwd ': makeType('', 'Pnt '), - meshBoundaryPath: makeType('', 'pathClass'), - filterFX: makeType('', 'filterFXStyle'), - Fltr: makeType('', 'rigidTransform'), - FrgC: makeType('', 'RGBC'), - BckC: makeType('', 'RGBC'), -}; -var fieldToArrayExtType = { - 'Crv ': makeType('', 'CrPt'), - Clrs: makeType('', 'Clrt'), - Trns: makeType('', 'TrnS'), - keyDescriptorList: nullType, - solidFillMulti: makeType('', 'SoFi'), - gradientFillMulti: makeType('', 'GrFl'), - dropShadowMulti: makeType('', 'DrSh'), - innerShadowMulti: makeType('', 'IrSh'), - frameFXMulti: makeType('', 'FrFX'), - FrIn: nullType, - FSts: nullType, - LaSt: nullType, - sheetTimelineOptions: nullType, - trackList: makeType('', 'animationTrack'), - globalTrackList: makeType('', 'animationTrack'), - keyList: nullType, - audioClipGroupList: nullType, - audioClipList: nullType, - countObjectList: makeType('', 'countObject'), - countGroupList: makeType('', 'countGroup'), - slices: makeType('', 'slice'), - 'Pts ': makeType('', 'Pthp'), - SbpL: makeType('', 'SbpL'), - pathComponents: makeType('', 'PaCm'), - filterFXList: makeType('', 'filterFX'), - puppetShapeList: makeType('', 'puppetShape'), -}; -var typeToField = { - 'TEXT': [ - 'Txt ', 'printerName', 'Nm ', 'Idnt', 'blackAndWhitePresetFileName', 'LUT3DFileName', - 'presetFileName', 'curvesPresetFileName', 'mixerPresetFileName', 'placed', 'description', 'reason', - 'artboardPresetName', 'json', 'clipID', 'relPath', 'fullPath', 'mediaDescriptor', 'Msge', - 'altTag', 'url', 'cellText', - ], - 'tdta': ['EngineData', 'LUT3DFileData', 'indexArray', 'originalVertexArray', 'deformedVertexArray'], - 'long': [ - 'TextIndex', 'RndS', 'Mdpn', 'Smth', 'Lctn', 'strokeStyleVersion', 'LaID', 'Vrsn', 'Cnt ', - 'Brgh', 'Cntr', 'means', 'vibrance', 'Strt', 'bwPresetKind', 'presetKind', 'comp', 'compID', 'originalCompID', - 'curvesPresetKind', 'mixerPresetKind', 'uOrder', 'vOrder', 'PgNm', 'totalPages', 'Crop', - 'numerator', 'denominator', 'frameCount', 'Annt', 'keyOriginType', 'unitValueQuadVersion', - 'keyOriginIndex', 'major', 'minor', 'fix', 'docDefaultNewArtboardBackgroundType', 'artboardBackgroundType', - 'numModifyingFX', 'deformNumRows', 'deformNumCols', 'FrID', 'FrDl', 'FsID', 'LCnt', 'AFrm', 'AFSt', - 'numBefore', 'numAfter', 'Spcn', 'minOpacity', 'maxOpacity', 'BlnM', 'sheetID', 'gblA', 'globalAltitude', - 'descVersion', 'frameReaderType', 'LyrI', 'zoomOrigin', 'fontSize', 'Rds ', 'sliceID', - 'topOutset', 'leftOutset', 'bottomOutset', 'rightOutset', 'filterID', 'meshQuality', - 'meshExpansion', 'meshRigidity', 'VrsM', 'VrsN', - ], - 'enum': [ - 'textGridding', 'Ornt', 'warpStyle', 'warpRotate', 'Inte', 'Bltn', 'ClrS', - 'sdwM', 'hglM', 'bvlT', 'bvlS', 'bvlD', 'Md ', 'glwS', 'GrdF', 'GlwT', - 'strokeStyleLineCapType', 'strokeStyleLineJoinType', 'strokeStyleLineAlignment', - 'strokeStyleBlendMode', 'PntT', 'Styl', 'lookupType', 'LUTFormat', 'dataOrder', - 'tableOrder', 'enableCompCore', 'enableCompCoreGPU', 'compCoreSupport', 'compCoreGPUSupport', 'Engn', - 'enableCompCoreThreads', 'gs99', 'FrDs', 'trackID', 'animInterpStyle', 'horzAlign', - 'vertAlign', 'bgColorType', 'shapeOperation', - ], - 'bool': [ - 'PstS', 'printSixteenBit', 'masterFXSwitch', 'enab', 'uglg', 'antialiasGloss', - 'useShape', 'useTexture', 'uglg', 'antialiasGloss', 'useShape', 'Vsbl', - 'useTexture', 'Algn', 'Rvrs', 'Dthr', 'Invr', 'VctC', 'ShTr', 'layerConceals', - 'strokeEnabled', 'fillEnabled', 'strokeStyleScaleLock', 'strokeStyleStrokeAdjust', - 'hardProof', 'MpBl', 'paperWhite', 'useLegacy', 'Auto', 'Lab ', 'useTint', 'keyShapeInvalidated', - 'autoExpandEnabled', 'autoNestEnabled', 'autoPositionEnabled', 'shrinkwrapOnSaveEnabled', - 'present', 'showInDialog', 'overprint', 'sheetDisclosed', 'lightsDisclosed', 'meshesDisclosed', - 'materialsDisclosed', 'hasMotion', 'muted', 'Effc', 'selected', 'autoScope', 'fillCanvas', - 'cellTextIsHTML', 'Smoo', 'Clsp', 'validAtPosition', 'rigidType', 'hasoptions', 'filterMaskEnable', - 'filterMaskLinked', 'filterMaskExtendWithWhite', - ], - 'doub': [ - 'warpValue', 'warpPerspective', 'warpPerspectiveOther', 'Intr', 'Wdth', 'Hght', - 'strokeStyleMiterLimit', 'strokeStyleResolution', 'layerTime', 'keyOriginResolution', - 'xx', 'xy', 'yx', 'yy', 'tx', 'ty', 'FrGA', 'frameRate', 'audioLevel', 'rotation', - 'X ', 'Y ', 'redFloat', 'greenFloat', 'blueFloat', 'imageResolution', - 'PuX0', 'PuX1', 'PuX2', 'PuX3', 'PuY0', 'PuY1', 'PuY2', 'PuY3' - ], - 'UntF': [ - 'Scl ', 'sdwO', 'hglO', 'lagl', 'Lald', 'srgR', 'blur', 'Sftn', 'Opct', 'Dstn', 'Angl', - 'Ckmt', 'Nose', 'Inpr', 'ShdN', 'strokeStyleLineWidth', 'strokeStyleLineDashOffset', - 'strokeStyleOpacity', 'H ', 'Top ', 'Left', 'Btom', 'Rght', 'Rslt', - 'topRight', 'topLeft', 'bottomLeft', 'bottomRight', - ], - 'VlLs': [ - 'Crv ', 'Clrs', 'Mnm ', 'Mxm ', 'Trns', 'pathList', 'strokeStyleLineDashSet', 'FrLs', 'slices', - 'LaSt', 'Trnf', 'nonAffineTransform', 'keyDescriptorList', 'guideIndeces', 'gradientFillMulti', - 'solidFillMulti', 'frameFXMulti', 'innerShadowMulti', 'dropShadowMulti', 'FrIn', 'FSts', 'FsFr', - 'sheetTimelineOptions', 'audioClipList', 'trackList', 'globalTrackList', 'keyList', 'audioClipList', - 'warpValues', 'selectedPin', 'Pts ', 'SbpL', 'pathComponents', 'pinOffsets', 'posFinalPins', - 'pinVertexIndices', 'PinP', 'PnRt', 'PnOv', 'PnDp', 'filterFXList', 'puppetShapeList', - ], - 'ObAr': ['meshPoints', 'quiltSliceX', 'quiltSliceY'], - 'obj ': ['null'], -}; -var channels = [ - 'Rd ', 'Grn ', 'Bl ', 'Yllw', 'Ylw ', 'Cyn ', 'Mgnt', 'Blck', 'Gry ', 'Lmnc', 'A ', 'B ', -]; -var fieldToArrayType = { - 'Mnm ': 'long', - 'Mxm ': 'long', - FrLs: 'long', - strokeStyleLineDashSet: 'UntF', - Trnf: 'doub', - nonAffineTransform: 'doub', - keyDescriptorList: 'Objc', - gradientFillMulti: 'Objc', - solidFillMulti: 'Objc', - frameFXMulti: 'Objc', - innerShadowMulti: 'Objc', - dropShadowMulti: 'Objc', - LaSt: 'Objc', - FrIn: 'Objc', - FSts: 'Objc', - FsFr: 'long', - blendOptions: 'Objc', - sheetTimelineOptions: 'Objc', - keyList: 'Objc', - warpValues: 'doub', - selectedPin: 'long', - 'Pts ': 'Objc', - SbpL: 'Objc', - pathComponents: 'Objc', - pinOffsets: 'doub', - posFinalPins: 'doub', - pinVertexIndices: 'long', - PinP: 'doub', - PnRt: 'long', - PnOv: 'bool', - PnDp: 'doub', - filterFXList: 'Objc', - puppetShapeList: 'Objc', -}; -var fieldToType = {}; -for (var _i = 0, _a = Object.keys(typeToField); _i < _a.length; _i++) { - var type = _a[_i]; - for (var _b = 0, _c = typeToField[type]; _b < _c.length; _b++) { - var field = _c[_b]; - fieldToType[field] = type; - } -} -for (var _d = 0, _e = Object.keys(fieldToExtType); _d < _e.length; _d++) { - var field = _e[_d]; - if (!fieldToType[field]) - fieldToType[field] = 'Objc'; -} -for (var _f = 0, _g = Object.keys(fieldToArrayExtType); _f < _g.length; _f++) { - var field = _g[_f]; - fieldToArrayType[field] = 'Objc'; -} -function getTypeByKey(key, value, root, parent) { - if (key === 'null' && root === 'slices') { - return 'TEXT'; - } - else if (key === 'groupID') { - return root === 'slices' ? 'long' : 'TEXT'; - } - else if (key === 'Sz ') { - return ('Wdth' in value) ? 'Objc' : (('units' in value) ? 'UntF' : 'doub'); - } - else if (key === 'Type') { - return typeof value === 'string' ? 'enum' : 'long'; - } - else if (key === 'AntA') { - return typeof value === 'string' ? 'enum' : 'bool'; - } - else if ((key === 'Hrzn' || key === 'Vrtc') && parent.Type === 'keyType.Pstn') { - return 'long'; - } - else if (key === 'Hrzn' || key === 'Vrtc' || key === 'Top ' || key === 'Left' || key === 'Btom' || key === 'Rght') { - if (root === 'slices') - return 'long'; - return typeof value === 'number' ? 'doub' : 'UntF'; - } - else if (key === 'Vrsn') { - return typeof value === 'number' ? 'long' : 'Objc'; - } - else if (key === 'Rd ' || key === 'Grn ' || key === 'Bl ') { - return root === 'artd' ? 'long' : 'doub'; - } - else if (key === 'Trnf') { - return Array.isArray(value) ? 'VlLs' : 'Objc'; - } - else { - return fieldToType[key]; - } -} -export function readAsciiStringOrClassId(reader) { - var length = readInt32(reader); - return readAsciiString(reader, length || 4); -} -function writeAsciiStringOrClassId(writer, value) { - if (value.length === 4 && value !== 'warp' && value !== 'time' && value !== 'hold') { - // write classId - writeInt32(writer, 0); - writeSignature(writer, value); - } - else { - // write ascii string - writeInt32(writer, value.length); - for (var i = 0; i < value.length; i++) { - writeUint8(writer, value.charCodeAt(i)); - } - } -} -export function readDescriptorStructure(reader) { - var object = {}; - // object.__struct = - readClassStructure(reader); - var itemsCount = readUint32(reader); - // console.log('//', object.__struct); - for (var i = 0; i < itemsCount; i++) { - var key = readAsciiStringOrClassId(reader); - var type = readSignature(reader); - // console.log(`> '${key}' '${type}'`); - var data = readOSType(reader, type); - // if (!getTypeByKey(key, data)) console.log(`> '${key}' '${type}'`, data); - object[key] = data; - } - return object; -} -export function writeDescriptorStructure(writer, name, classId, value, root) { - if (logErrors && !classId) - console.log('Missing classId for: ', name, classId, value); - // write class structure - writeUnicodeStringWithPadding(writer, name); - writeAsciiStringOrClassId(writer, classId); - var keys = Object.keys(value); - writeUint32(writer, keys.length); - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - var type = getTypeByKey(key, value[key], root, value); - var extType = fieldToExtType[key]; - if (key === 'origin') { - type = root === 'slices' ? 'enum' : 'Objc'; - } - else if (key === 'bounds' && root === 'slices') { - type = 'Objc'; - extType = makeType('', 'Rct1'); - } - else if (key === 'Scl ' && 'Hrzn' in value[key]) { - type = 'Objc'; - extType = nullType; - } - else if (key === 'audioClipGroupList' && keys.length === 1) { - type = 'VlLs'; - } - else if ((key === 'Strt' || key === 'Brgh') && 'H ' in value) { - type = 'doub'; - } - else if (key === 'Strt') { - type = 'Objc'; - extType = nullType; - } - else if (channels.indexOf(key) !== -1) { - type = (classId === 'RGBC' && root !== 'artd') ? 'doub' : 'long'; - } - else if (key === 'profile') { - type = classId === 'printOutput' ? 'TEXT' : 'tdta'; - } - else if (key === 'strokeStyleContent') { - if (value[key]['Clr ']) { - extType = makeType('', 'solidColorLayer'); - } - else if (value[key].Grad) { - extType = makeType('', 'gradientLayer'); - } - else if (value[key].Ptrn) { - extType = makeType('', 'patternLayer'); - } - else { - logErrors && console.log('Invalid strokeStyleContent value', value[key]); - } - } - else if (key === 'bounds' && root === 'quiltWarp') { - extType = makeType('', 'classFloatRect'); - } - if (extType && extType.classID === 'RGBC') { - if ('H ' in value[key]) - extType = { classID: 'HSBC', name: '' }; - // TODO: other color spaces - } - writeAsciiStringOrClassId(writer, key); - writeSignature(writer, type || 'long'); - writeOSType(writer, type || 'long', value[key], key, extType, root); - if (logErrors && !type) - console.log("Missing descriptor field type for: '".concat(key, "' in"), value); - } -} -function readOSType(reader, type) { - switch (type) { - case 'obj ': // Reference - return readReferenceStructure(reader); - case 'Objc': // Descriptor - case 'GlbO': // GlobalObject same as Descriptor - return readDescriptorStructure(reader); - case 'VlLs': { // List - var length_1 = readInt32(reader); - var items = []; - for (var i = 0; i < length_1; i++) { - var type_1 = readSignature(reader); - // console.log(' >', type); - items.push(readOSType(reader, type_1)); - } - return items; - } - case 'doub': // Double - return readFloat64(reader); - case 'UntF': { // Unit double - var units = readSignature(reader); - var value = readFloat64(reader); - if (!unitsMap[units]) - throw new Error("Invalid units: ".concat(units)); - return { units: unitsMap[units], value: value }; - } - case 'UnFl': { // Unit float - var units = readSignature(reader); - var value = readFloat32(reader); - if (!unitsMap[units]) - throw new Error("Invalid units: ".concat(units)); - return { units: unitsMap[units], value: value }; - } - case 'TEXT': // String - return readUnicodeString(reader); - case 'enum': { // Enumerated - var type_2 = readAsciiStringOrClassId(reader); - var value = readAsciiStringOrClassId(reader); - return "".concat(type_2, ".").concat(value); - } - case 'long': // Integer - return readInt32(reader); - case 'comp': { // Large Integer - var low = readUint32(reader); - var high = readUint32(reader); - return { low: low, high: high }; - } - case 'bool': // Boolean - return !!readUint8(reader); - case 'type': // Class - case 'GlbC': // Class - return readClassStructure(reader); - case 'alis': { // Alias - var length_2 = readInt32(reader); - return readAsciiString(reader, length_2); - } - case 'tdta': { // Raw Data - var length_3 = readInt32(reader); - return readBytes(reader, length_3); - } - case 'ObAr': { // Object array - readInt32(reader); // version: 16 - readUnicodeString(reader); // name: '' - readAsciiStringOrClassId(reader); // 'rationalPoint' - var length_4 = readInt32(reader); - var items = []; - for (var i = 0; i < length_4; i++) { - var type1 = readAsciiStringOrClassId(reader); // type Hrzn | Vrtc - readSignature(reader); // UnFl - readSignature(reader); // units ? '#Pxl' - var valuesCount = readInt32(reader); - var values = []; - for (var j = 0; j < valuesCount; j++) { - values.push(readFloat64(reader)); - } - items.push({ type: type1, values: values }); - } - return items; - } - case 'Pth ': { // File path - /*const length =*/ readInt32(reader); - var sig = readSignature(reader); - /*const pathSize =*/ readInt32LE(reader); - var charsCount = readInt32LE(reader); - var path = readUnicodeStringWithLength(reader, charsCount); - return { sig: sig, path: path }; - } - default: - throw new Error("Invalid TySh descriptor OSType: ".concat(type, " at ").concat(reader.offset.toString(16))); - } -} -var ObArTypes = { - meshPoints: 'rationalPoint', - quiltSliceX: 'UntF', - quiltSliceY: 'UntF', -}; -function writeOSType(writer, type, value, key, extType, root) { - switch (type) { - case 'obj ': // Reference - writeReferenceStructure(writer, key, value); - break; - case 'Objc': // Descriptor - case 'GlbO': // GlobalObject same as Descriptor - if (!extType) - throw new Error("Missing ext type for: '".concat(key, "' (").concat(JSON.stringify(value), ")")); - writeDescriptorStructure(writer, extType.name, extType.classID, value, root); - break; - case 'VlLs': // List - writeInt32(writer, value.length); - for (var i = 0; i < value.length; i++) { - var type_3 = fieldToArrayType[key]; - writeSignature(writer, type_3 || 'long'); - writeOSType(writer, type_3 || 'long', value[i], "".concat(key, "[]"), fieldToArrayExtType[key], root); - if (logErrors && !type_3) - console.log("Missing descriptor array type for: '".concat(key, "' in"), value); - } - break; - case 'doub': // Double - writeFloat64(writer, value); - break; - case 'UntF': // Unit double - if (!unitsMapRev[value.units]) - throw new Error("Invalid units: ".concat(value.units, " in ").concat(key)); - writeSignature(writer, unitsMapRev[value.units]); - writeFloat64(writer, value.value); - break; - case 'UnFl': // Unit float - if (!unitsMapRev[value.units]) - throw new Error("Invalid units: ".concat(value.units, " in ").concat(key)); - writeSignature(writer, unitsMapRev[value.units]); - writeFloat32(writer, value.value); - break; - case 'TEXT': // String - writeUnicodeStringWithPadding(writer, value); - break; - case 'enum': { // Enumerated - var _a = value.split('.'), _type = _a[0], val = _a[1]; - writeAsciiStringOrClassId(writer, _type); - writeAsciiStringOrClassId(writer, val); - break; - } - case 'long': // Integer - writeInt32(writer, value); - break; - // case 'comp': // Large Integer - // writeLargeInteger(reader); - case 'bool': // Boolean - writeUint8(writer, value ? 1 : 0); - break; - // case 'type': // Class - // case 'GlbC': // Class - // writeClassStructure(reader); - // case 'alis': // Alias - // writeAliasStructure(reader); - case 'tdta': // Raw Data - writeInt32(writer, value.byteLength); - writeBytes(writer, value); - break; - case 'ObAr': { // Object array - writeInt32(writer, 16); // version - writeUnicodeStringWithPadding(writer, ''); // name - var type_4 = ObArTypes[key]; - if (!type_4) - throw new Error("Not implemented ObArType for: ".concat(key)); - writeAsciiStringOrClassId(writer, type_4); - writeInt32(writer, value.length); - for (var i = 0; i < value.length; i++) { - writeAsciiStringOrClassId(writer, value[i].type); // Hrzn | Vrtc - writeSignature(writer, 'UnFl'); - writeSignature(writer, '#Pxl'); - writeInt32(writer, value[i].values.length); - for (var j = 0; j < value[i].values.length; j++) { - writeFloat64(writer, value[i].values[j]); - } - } - break; - } - // case 'Pth ': // File path - // writeFilePath(reader); - default: - throw new Error("Not implemented descriptor OSType: ".concat(type)); - } -} -function readReferenceStructure(reader) { - var itemsCount = readInt32(reader); - var items = []; - for (var i = 0; i < itemsCount; i++) { - var type = readSignature(reader); - switch (type) { - case 'prop': { // Property - readClassStructure(reader); - var keyID = readAsciiStringOrClassId(reader); - items.push(keyID); - break; - } - case 'Clss': // Class - items.push(readClassStructure(reader)); - break; - case 'Enmr': { // Enumerated Reference - readClassStructure(reader); - var typeID = readAsciiStringOrClassId(reader); - var value = readAsciiStringOrClassId(reader); - items.push("".concat(typeID, ".").concat(value)); - break; - } - case 'rele': { // Offset - // const { name, classID } = - readClassStructure(reader); - items.push(readUint32(reader)); - break; - } - case 'Idnt': // Identifier - items.push(readInt32(reader)); - break; - case 'indx': // Index - items.push(readInt32(reader)); - break; - case 'name': { // Name - readClassStructure(reader); - items.push(readUnicodeString(reader)); - break; - } - default: - throw new Error("Invalid descriptor reference type: ".concat(type)); - } - } - return items; -} -function writeReferenceStructure(writer, _key, items) { - writeInt32(writer, items.length); - for (var i = 0; i < items.length; i++) { - var value = items[i]; - var type = 'unknown'; - if (typeof value === 'string') { - if (/^[a-z]+\.[a-z]+$/i.test(value)) { - type = 'Enmr'; - } - else { - type = 'name'; - } - } - writeSignature(writer, type); - switch (type) { - // case 'prop': // Property - // case 'Clss': // Class - case 'Enmr': { // Enumerated Reference - var _a = value.split('.'), typeID = _a[0], enumValue = _a[1]; - writeClassStructure(writer, '\0', typeID); - writeAsciiStringOrClassId(writer, typeID); - writeAsciiStringOrClassId(writer, enumValue); - break; - } - // case 'rele': // Offset - // case 'Idnt': // Identifier - // case 'indx': // Index - case 'name': { // Name - writeClassStructure(writer, '\0', 'Lyr '); - writeUnicodeString(writer, value + '\0'); - break; - } - default: - throw new Error("Invalid descriptor reference type: ".concat(type)); - } - } - return items; -} -function readClassStructure(reader) { - var name = readUnicodeString(reader); - var classID = readAsciiStringOrClassId(reader); - // console.log({ name, classID }); - return { name: name, classID: classID }; -} -function writeClassStructure(writer, name, classID) { - writeUnicodeString(writer, name); - writeAsciiStringOrClassId(writer, classID); -} -export function readVersionAndDescriptor(reader) { - var version = readUint32(reader); - if (version !== 16) - throw new Error("Invalid descriptor version: ".concat(version)); - var desc = readDescriptorStructure(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - return desc; -} -export function writeVersionAndDescriptor(writer, name, classID, descriptor, root) { - if (root === void 0) { root = ''; } - writeUint32(writer, 16); // version - writeDescriptorStructure(writer, name, classID, descriptor, root); -} -export function horzVrtcToXY(hv) { - return { x: hv.Hrzn, y: hv.Vrtc }; -} -export function xyToHorzVrtc(xy) { - return { Hrzn: xy.x, Vrtc: xy.y }; -} -function parseFxObject(fx) { - var stroke = { - enabled: !!fx.enab, - position: FStl.decode(fx.Styl), - fillType: FrFl.decode(fx.PntT), - blendMode: BlnM.decode(fx['Md ']), - opacity: parsePercent(fx.Opct), - size: parseUnits(fx['Sz ']), - }; - if (fx.present !== undefined) - stroke.present = fx.present; - if (fx.showInDialog !== undefined) - stroke.showInDialog = fx.showInDialog; - if (fx.overprint !== undefined) - stroke.overprint = fx.overprint; - if (fx['Clr ']) - stroke.color = parseColor(fx['Clr ']); - if (fx.Grad) - stroke.gradient = parseGradientContent(fx); - if (fx.Ptrn) - stroke.pattern = parsePatternContent(fx); - return stroke; -} -function serializeFxObject(stroke) { - var FrFX = {}; - FrFX.enab = !!stroke.enabled; - if (stroke.present !== undefined) - FrFX.present = !!stroke.present; - if (stroke.showInDialog !== undefined) - FrFX.showInDialog = !!stroke.showInDialog; - FrFX.Styl = FStl.encode(stroke.position); - FrFX.PntT = FrFl.encode(stroke.fillType); - FrFX['Md '] = BlnM.encode(stroke.blendMode); - FrFX.Opct = unitsPercent(stroke.opacity); - FrFX['Sz '] = unitsValue(stroke.size, 'size'); - if (stroke.color) - FrFX['Clr '] = serializeColor(stroke.color); - if (stroke.gradient) - FrFX = __assign(__assign({}, FrFX), serializeGradientContent(stroke.gradient)); - if (stroke.pattern) - FrFX = __assign(__assign({}, FrFX), serializePatternContent(stroke.pattern)); - if (stroke.overprint !== undefined) - FrFX.overprint = !!stroke.overprint; - return FrFX; -} -export function serializeEffects(e, log, multi) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; - var info = multi ? { - 'Scl ': unitsPercent((_a = e.scale) !== null && _a !== void 0 ? _a : 1), - masterFXSwitch: !e.disabled, - } : { - masterFXSwitch: !e.disabled, - 'Scl ': unitsPercent((_b = e.scale) !== null && _b !== void 0 ? _b : 1), - }; - var arrayKeys = ['dropShadow', 'innerShadow', 'solidFill', 'gradientOverlay', 'stroke']; - for (var _i = 0, arrayKeys_1 = arrayKeys; _i < arrayKeys_1.length; _i++) { - var key = arrayKeys_1[_i]; - if (e[key] && !Array.isArray(e[key])) - throw new Error("".concat(key, " should be an array")); - } - if (((_c = e.dropShadow) === null || _c === void 0 ? void 0 : _c[0]) && !multi) - info.DrSh = serializeEffectObject(e.dropShadow[0], 'dropShadow', log); - if (((_d = e.dropShadow) === null || _d === void 0 ? void 0 : _d[0]) && multi) - info.dropShadowMulti = e.dropShadow.map(function (i) { return serializeEffectObject(i, 'dropShadow', log); }); - if (((_e = e.innerShadow) === null || _e === void 0 ? void 0 : _e[0]) && !multi) - info.IrSh = serializeEffectObject(e.innerShadow[0], 'innerShadow', log); - if (((_f = e.innerShadow) === null || _f === void 0 ? void 0 : _f[0]) && multi) - info.innerShadowMulti = e.innerShadow.map(function (i) { return serializeEffectObject(i, 'innerShadow', log); }); - if (e.outerGlow) - info.OrGl = serializeEffectObject(e.outerGlow, 'outerGlow', log); - if (((_g = e.solidFill) === null || _g === void 0 ? void 0 : _g[0]) && multi) - info.solidFillMulti = e.solidFill.map(function (i) { return serializeEffectObject(i, 'solidFill', log); }); - if (((_h = e.gradientOverlay) === null || _h === void 0 ? void 0 : _h[0]) && multi) - info.gradientFillMulti = e.gradientOverlay.map(function (i) { return serializeEffectObject(i, 'gradientOverlay', log); }); - if (((_j = e.stroke) === null || _j === void 0 ? void 0 : _j[0]) && multi) - info.frameFXMulti = e.stroke.map(function (i) { return serializeFxObject(i); }); - if (e.innerGlow) - info.IrGl = serializeEffectObject(e.innerGlow, 'innerGlow', log); - if (e.bevel) - info.ebbl = serializeEffectObject(e.bevel, 'bevel', log); - if (((_k = e.solidFill) === null || _k === void 0 ? void 0 : _k[0]) && !multi) - info.SoFi = serializeEffectObject(e.solidFill[0], 'solidFill', log); - if (e.patternOverlay) - info.patternFill = serializeEffectObject(e.patternOverlay, 'patternOverlay', log); - if (((_l = e.gradientOverlay) === null || _l === void 0 ? void 0 : _l[0]) && !multi) - info.GrFl = serializeEffectObject(e.gradientOverlay[0], 'gradientOverlay', log); - if (e.satin) - info.ChFX = serializeEffectObject(e.satin, 'satin', log); - if (((_m = e.stroke) === null || _m === void 0 ? void 0 : _m[0]) && !multi) - info.FrFX = serializeFxObject((_o = e.stroke) === null || _o === void 0 ? void 0 : _o[0]); - if (multi) { - info.numModifyingFX = 0; - for (var _p = 0, _q = Object.keys(e); _p < _q.length; _p++) { - var key = _q[_p]; - var value = e[key]; - if (Array.isArray(value)) { - for (var _r = 0, value_1 = value; _r < value_1.length; _r++) { - var effect = value_1[_r]; - if (effect.enabled) - info.numModifyingFX++; - } - } - } - } - return info; -} -export function parseEffects(info, log) { - var effects = {}; - if (!info.masterFXSwitch) - effects.disabled = true; - if (info['Scl ']) - effects.scale = parsePercent(info['Scl ']); - if (info.DrSh) - effects.dropShadow = [parseEffectObject(info.DrSh, log)]; - if (info.dropShadowMulti) - effects.dropShadow = info.dropShadowMulti.map(function (i) { return parseEffectObject(i, log); }); - if (info.IrSh) - effects.innerShadow = [parseEffectObject(info.IrSh, log)]; - if (info.innerShadowMulti) - effects.innerShadow = info.innerShadowMulti.map(function (i) { return parseEffectObject(i, log); }); - if (info.OrGl) - effects.outerGlow = parseEffectObject(info.OrGl, log); - if (info.IrGl) - effects.innerGlow = parseEffectObject(info.IrGl, log); - if (info.ebbl) - effects.bevel = parseEffectObject(info.ebbl, log); - if (info.SoFi) - effects.solidFill = [parseEffectObject(info.SoFi, log)]; - if (info.solidFillMulti) - effects.solidFill = info.solidFillMulti.map(function (i) { return parseEffectObject(i, log); }); - if (info.patternFill) - effects.patternOverlay = parseEffectObject(info.patternFill, log); - if (info.GrFl) - effects.gradientOverlay = [parseEffectObject(info.GrFl, log)]; - if (info.gradientFillMulti) - effects.gradientOverlay = info.gradientFillMulti.map(function (i) { return parseEffectObject(i, log); }); - if (info.ChFX) - effects.satin = parseEffectObject(info.ChFX, log); - if (info.FrFX) - effects.stroke = [parseFxObject(info.FrFX)]; - if (info.frameFXMulti) - effects.stroke = info.frameFXMulti.map(function (i) { return parseFxObject(i); }); - return effects; -} -function parseKeyList(keyList, logMissingFeatures) { - var keys = []; - for (var j = 0; j < keyList.length; j++) { - var key = keyList[j]; - var time = key.time, selected = key.selected, animKey = key.animKey; - var interpolation = animInterpStyleEnum.decode(key.animInterpStyle); - switch (animKey.Type) { - case 'keyType.Opct': - keys.push({ interpolation: interpolation, time: time, selected: selected, type: 'opacity', value: parsePercent(animKey.Opct) }); - break; - case 'keyType.Pstn': - keys.push({ interpolation: interpolation, time: time, selected: selected, type: 'position', x: animKey.Hrzn, y: animKey.Vrtc }); - break; - case 'keyType.Trnf': - keys.push({ - interpolation: interpolation, - time: time, - selected: selected, - type: 'transform', - scale: horzVrtcToXY(animKey['Scl ']), skew: horzVrtcToXY(animKey.Skew), rotation: animKey.rotation, translation: horzVrtcToXY(animKey.translation) - }); - break; - case 'keyType.sheetStyle': { - var key_1 = { interpolation: interpolation, time: time, selected: selected, type: 'style' }; - if (animKey.sheetStyle.Lefx) - key_1.style = parseEffects(animKey.sheetStyle.Lefx, logMissingFeatures); - keys.push(key_1); - break; - } - case 'keyType.globalLighting': { - keys.push({ - interpolation: interpolation, - time: time, - selected: selected, - type: 'globalLighting', - globalAngle: animKey.gblA, globalAltitude: animKey.globalAltitude - }); - break; - } - default: throw new Error("Unsupported keyType value"); - } - } - return keys; -} -function serializeKeyList(keys) { - var keyList = []; - for (var j = 0; j < keys.length; j++) { - var key = keys[j]; - var time = key.time, _a = key.selected, selected = _a === void 0 ? false : _a, interpolation = key.interpolation; - var animInterpStyle = animInterpStyleEnum.encode(interpolation); - var animKey = void 0; - switch (key.type) { - case 'opacity': - animKey = { Type: 'keyType.Opct', Opct: unitsPercent(key.value) }; - break; - case 'position': - animKey = { Type: 'keyType.Pstn', Hrzn: key.x, Vrtc: key.y }; - break; - case 'transform': - animKey = { Type: 'keyType.Trnf', 'Scl ': xyToHorzVrtc(key.scale), Skew: xyToHorzVrtc(key.skew), rotation: key.rotation, translation: xyToHorzVrtc(key.translation) }; - break; - case 'style': - animKey = { Type: 'keyType.sheetStyle', sheetStyle: { Vrsn: 1, blendOptions: {} } }; - if (key.style) - animKey.sheetStyle = { Vrsn: 1, Lefx: serializeEffects(key.style, false, false), blendOptions: {} }; - break; - case 'globalLighting': { - animKey = { Type: 'keyType.globalLighting', gblA: key.globalAngle, globalAltitude: key.globalAltitude }; - break; - } - default: throw new Error("Unsupported keyType value"); - } - keyList.push({ Vrsn: 1, animInterpStyle: animInterpStyle, time: time, animKey: animKey, selected: selected }); - } - return keyList; -} -export function parseTrackList(trackList, logMissingFeatures) { - var tracks = []; - for (var i = 0; i < trackList.length; i++) { - var tr = trackList[i]; - var track = { - type: stdTrackID.decode(tr.trackID), - enabled: tr.enab, - keys: parseKeyList(tr.keyList, logMissingFeatures), - }; - if (tr.effectParams) { - track.effectParams = { - fillCanvas: tr.effectParams.fillCanvas, - zoomOrigin: tr.effectParams.zoomOrigin, - keys: parseKeyList(tr.effectParams.keyList, logMissingFeatures), - }; - } - tracks.push(track); - } - return tracks; -} -export function serializeTrackList(tracks) { - var trackList = []; - for (var i = 0; i < tracks.length; i++) { - var t = tracks[i]; - trackList.push(__assign(__assign({ trackID: stdTrackID.encode(t.type), Vrsn: 1, enab: !!t.enabled, Effc: !!t.effectParams }, (t.effectParams ? { - effectParams: { - keyList: serializeKeyList(t.keys), - fillCanvas: t.effectParams.fillCanvas, - zoomOrigin: t.effectParams.zoomOrigin, - } - } : {})), { keyList: serializeKeyList(t.keys) })); - } - return trackList; -} -function parseEffectObject(obj, reportErrors) { - var result = {}; - for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) { - var key = _a[_i]; - var val = obj[key]; - switch (key) { - case 'enab': - result.enabled = !!val; - break; - case 'uglg': - result.useGlobalLight = !!val; - break; - case 'AntA': - result.antialiased = !!val; - break; - case 'Algn': - result.align = !!val; - break; - case 'Dthr': - result.dither = !!val; - break; - case 'Invr': - result.invert = !!val; - break; - case 'Rvrs': - result.reverse = !!val; - break; - case 'Clr ': - result.color = parseColor(val); - break; - case 'hglC': - result.highlightColor = parseColor(val); - break; - case 'sdwC': - result.shadowColor = parseColor(val); - break; - case 'Styl': - result.position = FStl.decode(val); - break; - case 'Md ': - result.blendMode = BlnM.decode(val); - break; - case 'hglM': - result.highlightBlendMode = BlnM.decode(val); - break; - case 'sdwM': - result.shadowBlendMode = BlnM.decode(val); - break; - case 'bvlS': - result.style = BESl.decode(val); - break; - case 'bvlD': - result.direction = BESs.decode(val); - break; - case 'bvlT': - result.technique = bvlT.decode(val); - break; - case 'GlwT': - result.technique = BETE.decode(val); - break; - case 'glwS': - result.source = IGSr.decode(val); - break; - case 'Type': - result.type = GrdT.decode(val); - break; - case 'gs99': - result.interpolationMethod = gradientInterpolationMethodType.decode(val); - break; - case 'Opct': - result.opacity = parsePercent(val); - break; - case 'hglO': - result.highlightOpacity = parsePercent(val); - break; - case 'sdwO': - result.shadowOpacity = parsePercent(val); - break; - case 'lagl': - result.angle = parseAngle(val); - break; - case 'Angl': - result.angle = parseAngle(val); - break; - case 'Lald': - result.altitude = parseAngle(val); - break; - case 'Sftn': - result.soften = parseUnits(val); - break; - case 'srgR': - result.strength = parsePercent(val); - break; - case 'blur': - result.size = parseUnits(val); - break; - case 'Nose': - result.noise = parsePercent(val); - break; - case 'Inpr': - result.range = parsePercent(val); - break; - case 'Ckmt': - result.choke = parseUnits(val); - break; - case 'ShdN': - result.jitter = parsePercent(val); - break; - case 'Dstn': - result.distance = parseUnits(val); - break; - case 'Scl ': - result.scale = parsePercent(val); - break; - case 'Ptrn': - result.pattern = { name: val['Nm '], id: val.Idnt }; - break; - case 'phase': - result.phase = { x: val.Hrzn, y: val.Vrtc }; - break; - case 'Ofst': - result.offset = { x: parsePercent(val.Hrzn), y: parsePercent(val.Vrtc) }; - break; - case 'MpgS': - case 'TrnS': - result.contour = { - name: val['Nm '], - curve: val['Crv '].map(function (p) { return ({ x: p.Hrzn, y: p.Vrtc }); }), - }; - break; - case 'Grad': - result.gradient = parseGradient(val); - break; - case 'useTexture': - case 'useShape': - case 'layerConceals': - case 'present': - case 'showInDialog': - case 'antialiasGloss': - result[key] = val; - break; - default: - reportErrors && console.log("Invalid effect key: '".concat(key, "', value:"), val); - } - } - return result; -} -function serializeEffectObject(obj, objName, reportErrors) { - var result = {}; - for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) { - var objKey = _a[_i]; - var key = objKey; - var val = obj[key]; - switch (key) { - case 'enabled': - result.enab = !!val; - break; - case 'useGlobalLight': - result.uglg = !!val; - break; - case 'antialiased': - result.AntA = !!val; - break; - case 'align': - result.Algn = !!val; - break; - case 'dither': - result.Dthr = !!val; - break; - case 'invert': - result.Invr = !!val; - break; - case 'reverse': - result.Rvrs = !!val; - break; - case 'color': - result['Clr '] = serializeColor(val); - break; - case 'highlightColor': - result.hglC = serializeColor(val); - break; - case 'shadowColor': - result.sdwC = serializeColor(val); - break; - case 'position': - result.Styl = FStl.encode(val); - break; - case 'blendMode': - result['Md '] = BlnM.encode(val); - break; - case 'highlightBlendMode': - result.hglM = BlnM.encode(val); - break; - case 'shadowBlendMode': - result.sdwM = BlnM.encode(val); - break; - case 'style': - result.bvlS = BESl.encode(val); - break; - case 'direction': - result.bvlD = BESs.encode(val); - break; - case 'technique': - if (objName === 'bevel') { - result.bvlT = bvlT.encode(val); - } - else { - result.GlwT = BETE.encode(val); - } - break; - case 'source': - result.glwS = IGSr.encode(val); - break; - case 'type': - result.Type = GrdT.encode(val); - break; - case 'interpolationMethod': - result.gs99 = gradientInterpolationMethodType.encode(val); - break; - case 'opacity': - result.Opct = unitsPercent(val); - break; - case 'highlightOpacity': - result.hglO = unitsPercent(val); - break; - case 'shadowOpacity': - result.sdwO = unitsPercent(val); - break; - case 'angle': - if (objName === 'gradientOverlay') { - result.Angl = unitsAngle(val); - } - else { - result.lagl = unitsAngle(val); - } - break; - case 'altitude': - result.Lald = unitsAngle(val); - break; - case 'soften': - result.Sftn = unitsValue(val, key); - break; - case 'strength': - result.srgR = unitsPercent(val); - break; - case 'size': - result.blur = unitsValue(val, key); - break; - case 'noise': - result.Nose = unitsPercent(val); - break; - case 'range': - result.Inpr = unitsPercent(val); - break; - case 'choke': - result.Ckmt = unitsValue(val, key); - break; - case 'jitter': - result.ShdN = unitsPercent(val); - break; - case 'distance': - result.Dstn = unitsValue(val, key); - break; - case 'scale': - result['Scl '] = unitsPercent(val); - break; - case 'pattern': - result.Ptrn = { 'Nm ': val.name, Idnt: val.id }; - break; - case 'phase': - result.phase = { Hrzn: val.x, Vrtc: val.y }; - break; - case 'offset': - result.Ofst = { Hrzn: unitsPercent(val.x), Vrtc: unitsPercent(val.y) }; - break; - case 'contour': { - result[objName === 'satin' ? 'MpgS' : 'TrnS'] = { - 'Nm ': val.name, - 'Crv ': val.curve.map(function (p) { return ({ Hrzn: p.x, Vrtc: p.y }); }), - }; - break; - } - case 'gradient': - result.Grad = serializeGradient(val); - break; - case 'useTexture': - case 'useShape': - case 'layerConceals': - case 'present': - case 'showInDialog': - case 'antialiasGloss': - result[key] = val; - break; - default: - reportErrors && console.log("Invalid effect key: '".concat(key, "', value:"), val); - } - } - return result; -} -function parseGradient(grad) { - if (grad.GrdF === 'GrdF.CstS') { - var samples_1 = grad.Intr || 4096; - return { - type: 'solid', - name: grad['Nm '], - smoothness: grad.Intr / 4096, - colorStops: grad.Clrs.map(function (s) { return ({ - color: parseColor(s['Clr ']), - location: s.Lctn / samples_1, - midpoint: s.Mdpn / 100, - }); }), - opacityStops: grad.Trns.map(function (s) { return ({ - opacity: parsePercent(s.Opct), - location: s.Lctn / samples_1, - midpoint: s.Mdpn / 100, - }); }), - }; - } - else { - return { - type: 'noise', - name: grad['Nm '], - roughness: grad.Smth / 4096, - colorModel: ClrS.decode(grad.ClrS), - randomSeed: grad.RndS, - restrictColors: !!grad.VctC, - addTransparency: !!grad.ShTr, - min: grad['Mnm '].map(function (x) { return x / 100; }), - max: grad['Mxm '].map(function (x) { return x / 100; }), - }; - } -} -function serializeGradient(grad) { - var _a, _b; - if (grad.type === 'solid') { - var samples_2 = Math.round(((_a = grad.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096); - return { - 'Nm ': grad.name || '', - GrdF: 'GrdF.CstS', - Intr: samples_2, - Clrs: grad.colorStops.map(function (s) { - var _a; - return ({ - 'Clr ': serializeColor(s.color), - Type: 'Clry.UsrS', - Lctn: Math.round(s.location * samples_2), - Mdpn: Math.round(((_a = s.midpoint) !== null && _a !== void 0 ? _a : 0.5) * 100), - }); - }), - Trns: grad.opacityStops.map(function (s) { - var _a; - return ({ - Opct: unitsPercent(s.opacity), - Lctn: Math.round(s.location * samples_2), - Mdpn: Math.round(((_a = s.midpoint) !== null && _a !== void 0 ? _a : 0.5) * 100), - }); - }), - }; - } - else { - return { - GrdF: 'GrdF.ClNs', - 'Nm ': grad.name || '', - ShTr: !!grad.addTransparency, - VctC: !!grad.restrictColors, - ClrS: ClrS.encode(grad.colorModel), - RndS: grad.randomSeed || 0, - Smth: Math.round(((_b = grad.roughness) !== null && _b !== void 0 ? _b : 1) * 4096), - 'Mnm ': (grad.min || [0, 0, 0, 0]).map(function (x) { return x * 100; }), - 'Mxm ': (grad.max || [1, 1, 1, 1]).map(function (x) { return x * 100; }), - }; - } -} -function parseGradientContent(descriptor) { - var result = parseGradient(descriptor.Grad); - result.style = GrdT.decode(descriptor.Type); - if (descriptor.Dthr !== undefined) - result.dither = descriptor.Dthr; - if (descriptor.Rvrs !== undefined) - result.reverse = descriptor.Rvrs; - if (descriptor.Angl !== undefined) - result.angle = parseAngle(descriptor.Angl); - if (descriptor['Scl '] !== undefined) - result.scale = parsePercent(descriptor['Scl ']); - if (descriptor.Algn !== undefined) - result.align = descriptor.Algn; - if (descriptor.Ofst !== undefined) { - result.offset = { - x: parsePercent(descriptor.Ofst.Hrzn), - y: parsePercent(descriptor.Ofst.Vrtc) - }; - } - return result; -} -function parsePatternContent(descriptor) { - var result = { - name: descriptor.Ptrn['Nm '], - id: descriptor.Ptrn.Idnt, - }; - if (descriptor.Lnkd !== undefined) - result.linked = descriptor.Lnkd; - if (descriptor.phase !== undefined) - result.phase = { x: descriptor.phase.Hrzn, y: descriptor.phase.Vrtc }; - return result; -} -export function parseVectorContent(descriptor) { - if ('Grad' in descriptor) { - return parseGradientContent(descriptor); - } - else if ('Ptrn' in descriptor) { - return __assign({ type: 'pattern' }, parsePatternContent(descriptor)); - } - else if ('Clr ' in descriptor) { - return { type: 'color', color: parseColor(descriptor['Clr ']) }; - } - else { - throw new Error('Invalid vector content'); - } -} -function serializeGradientContent(content) { - var result = {}; - if (content.dither !== undefined) - result.Dthr = content.dither; - if (content.reverse !== undefined) - result.Rvrs = content.reverse; - if (content.angle !== undefined) - result.Angl = unitsAngle(content.angle); - result.Type = GrdT.encode(content.style); - if (content.align !== undefined) - result.Algn = content.align; - if (content.scale !== undefined) - result['Scl '] = unitsPercent(content.scale); - if (content.offset) { - result.Ofst = { - Hrzn: unitsPercent(content.offset.x), - Vrtc: unitsPercent(content.offset.y), - }; - } - result.Grad = serializeGradient(content); - return result; -} -function serializePatternContent(content) { - var result = { - Ptrn: { - 'Nm ': content.name || '', - Idnt: content.id || '', - } - }; - if (content.linked !== undefined) - result.Lnkd = !!content.linked; - if (content.phase !== undefined) - result.phase = { Hrzn: content.phase.x, Vrtc: content.phase.y }; - return result; -} -export function serializeVectorContent(content) { - if (content.type === 'color') { - return { key: 'SoCo', descriptor: { 'Clr ': serializeColor(content.color) } }; - } - else if (content.type === 'pattern') { - return { key: 'PtFl', descriptor: serializePatternContent(content) }; - } - else { - return { key: 'GdFl', descriptor: serializeGradientContent(content) }; - } -} -export function parseColor(color) { - if ('H ' in color) { - return { h: parsePercentOrAngle(color['H ']), s: color.Strt, b: color.Brgh }; - } - else if ('Rd ' in color) { - return { r: color['Rd '], g: color['Grn '], b: color['Bl '] }; - } - else if ('Cyn ' in color) { - return { c: color['Cyn '], m: color.Mgnt, y: color['Ylw '], k: color.Blck }; - } - else if ('Gry ' in color) { - return { k: color['Gry '] }; - } - else if ('Lmnc' in color) { - return { l: color.Lmnc, a: color['A '], b: color['B '] }; - } - else if ('redFloat' in color) { - return { fr: color.redFloat, fg: color.greenFloat, fb: color.blueFloat }; - } - else { - throw new Error('Unsupported color descriptor'); - } -} -export function serializeColor(color) { - if (!color) { - return { 'Rd ': 0, 'Grn ': 0, 'Bl ': 0 }; - } - else if ('r' in color) { - return { 'Rd ': color.r || 0, 'Grn ': color.g || 0, 'Bl ': color.b || 0 }; - } - else if ('fr' in color) { - return { redFloat: color.fr, greenFloat: color.fg, blueFloat: color.fb }; - } - else if ('h' in color) { - return { 'H ': unitsAngle(color.h * 360), Strt: color.s || 0, Brgh: color.b || 0 }; - } - else if ('c' in color) { - return { 'Cyn ': color.c || 0, Mgnt: color.m || 0, 'Ylw ': color.y || 0, Blck: color.k || 0 }; - } - else if ('l' in color) { - return { Lmnc: color.l || 0, 'A ': color.a || 0, 'B ': color.b || 0 }; - } - else if ('k' in color) { - return { 'Gry ': color.k }; - } - else { - throw new Error('Invalid color value'); - } -} -export function parseAngle(x) { - if (x === undefined) - return 0; - if (x.units !== 'Angle') - throw new Error("Invalid units: ".concat(x.units)); - return x.value; -} -export function parsePercent(x) { - if (x === undefined) - return 1; - if (x.units !== 'Percent') - throw new Error("Invalid units: ".concat(x.units)); - return x.value / 100; -} -export function parsePercentOrAngle(x) { - if (x === undefined) - return 1; - if (x.units === 'Percent') - return x.value / 100; - if (x.units === 'Angle') - return x.value / 360; - throw new Error("Invalid units: ".concat(x.units)); -} -export function parseUnits(_a) { - var units = _a.units, value = _a.value; - if (units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && - units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density') { - throw new Error("Invalid units: ".concat(JSON.stringify({ units: units, value: value }))); - } - return { value: value, units: units }; -} -export function parseUnitsOrNumber(value, units) { - if (units === void 0) { units = 'Pixels'; } - if (typeof value === 'number') - return { value: value, units: units }; - return parseUnits(value); -} -export function parseUnitsToNumber(_a, expectedUnits) { - var units = _a.units, value = _a.value; - if (units !== expectedUnits) - throw new Error("Invalid units: ".concat(JSON.stringify({ units: units, value: value }))); - return value; -} -export function unitsAngle(value) { - return { units: 'Angle', value: value || 0 }; -} -export function unitsPercent(value) { - return { units: 'Percent', value: Math.round((value || 0) * 100) }; -} -export function unitsValue(x, key) { - if (x == null) - return { units: 'Pixels', value: 0 }; - if (typeof x !== 'object') - throw new Error("Invalid value: ".concat(JSON.stringify(x), " (key: ").concat(key, ") (should have value and units)")); - var units = x.units, value = x.value; - if (typeof value !== 'number') - throw new Error("Invalid value in ".concat(JSON.stringify(x), " (key: ").concat(key, ")")); - if (units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && - units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density') { - throw new Error("Invalid units in ".concat(JSON.stringify(x), " (key: ").concat(key, ")")); - } - return { units: units, value: value }; -} -export var textGridding = createEnum('textGridding', 'none', { - none: 'None', - round: 'Rnd ', -}); -export var Ornt = createEnum('Ornt', 'horizontal', { - horizontal: 'Hrzn', - vertical: 'Vrtc', -}); -export var Annt = createEnum('Annt', 'sharp', { - none: 'Anno', - sharp: 'antiAliasSharp', - crisp: 'AnCr', - strong: 'AnSt', - smooth: 'AnSm', - platform: 'antiAliasPlatformGray', - platformLCD: 'antiAliasPlatformLCD', -}); -export var warpStyle = createEnum('warpStyle', 'none', { - none: 'warpNone', - arc: 'warpArc', - arcLower: 'warpArcLower', - arcUpper: 'warpArcUpper', - arch: 'warpArch', - bulge: 'warpBulge', - shellLower: 'warpShellLower', - shellUpper: 'warpShellUpper', - flag: 'warpFlag', - wave: 'warpWave', - fish: 'warpFish', - rise: 'warpRise', - fisheye: 'warpFisheye', - inflate: 'warpInflate', - squeeze: 'warpSqueeze', - twist: 'warpTwist', - cylinder: 'warpCylinder', - custom: 'warpCustom', -}); -export var BlnM = createEnum('BlnM', 'normal', { - 'normal': 'Nrml', - 'dissolve': 'Dslv', - 'darken': 'Drkn', - 'multiply': 'Mltp', - 'color burn': 'CBrn', - 'linear burn': 'linearBurn', - 'darker color': 'darkerColor', - 'lighten': 'Lghn', - 'screen': 'Scrn', - 'color dodge': 'CDdg', - 'linear dodge': 'linearDodge', - 'lighter color': 'lighterColor', - 'overlay': 'Ovrl', - 'soft light': 'SftL', - 'hard light': 'HrdL', - 'vivid light': 'vividLight', - 'linear light': 'linearLight', - 'pin light': 'pinLight', - 'hard mix': 'hardMix', - 'difference': 'Dfrn', - 'exclusion': 'Xclu', - 'subtract': 'blendSubtraction', - 'divide': 'blendDivide', - 'hue': 'H ', - 'saturation': 'Strt', - 'color': 'Clr ', - 'luminosity': 'Lmns', - // used in ABR - 'linear height': 'linearHeight', - 'height': 'Hght', - 'subtraction': 'Sbtr', // 2nd version of subtract ? -}); -export var BESl = createEnum('BESl', 'inner bevel', { - 'inner bevel': 'InrB', - 'outer bevel': 'OtrB', - 'emboss': 'Embs', - 'pillow emboss': 'PlEb', - 'stroke emboss': 'strokeEmboss', -}); -export var bvlT = createEnum('bvlT', 'smooth', { - 'smooth': 'SfBL', - 'chisel hard': 'PrBL', - 'chisel soft': 'Slmt', -}); -export var BESs = createEnum('BESs', 'up', { - up: 'In ', - down: 'Out ', -}); -export var BETE = createEnum('BETE', 'softer', { - softer: 'SfBL', - precise: 'PrBL', -}); -export var IGSr = createEnum('IGSr', 'edge', { - edge: 'SrcE', - center: 'SrcC', -}); -export var GrdT = createEnum('GrdT', 'linear', { - linear: 'Lnr ', - radial: 'Rdl ', - angle: 'Angl', - reflected: 'Rflc', - diamond: 'Dmnd', -}); -export var animInterpStyleEnum = createEnum('animInterpStyle', 'linear', { - linear: 'Lnr ', - hold: 'hold', -}); -export var stdTrackID = createEnum('stdTrackID', 'opacity', { - opacity: 'opacityTrack', - style: 'styleTrack', - sheetTransform: 'sheetTransformTrack', - sheetPosition: 'sheetPositionTrack', - globalLighting: 'globalLightingTrack', -}); -export var gradientInterpolationMethodType = createEnum('gradientInterpolationMethodType', 'perceptual', { - perceptual: 'Perc', - linear: 'Lnr', - classic: 'Gcls', -}); -export var ClrS = createEnum('ClrS', 'rgb', { - rgb: 'RGBC', - hsb: 'HSBl', - lab: 'LbCl', -}); -export var FStl = createEnum('FStl', 'outside', { - outside: 'OutF', - center: 'CtrF', - inside: 'InsF' -}); -export var FrFl = createEnum('FrFl', 'color', { - color: 'SClr', - gradient: 'GrFl', - pattern: 'Ptrn', -}); -export var ESliceType = createEnum('ESliceType', 'image', { - image: 'Img ', - noImage: 'noImage', -}); -export var ESliceHorzAlign = createEnum('ESliceHorzAlign', 'default', { - default: 'default', -}); -export var ESliceVertAlign = createEnum('ESliceVertAlign', 'default', { - default: 'default', -}); -export var ESliceOrigin = createEnum('ESliceOrigin', 'userGenerated', { - userGenerated: 'userGenerated', - autoGenerated: 'autoGenerated', - layer: 'layer', -}); -export var ESliceBGColorType = createEnum('ESliceBGColorType', 'none', { - none: 'None', - matte: 'matte', - color: 'Clr ', -}); -export var strokeStyleLineCapType = createEnum('strokeStyleLineCapType', 'butt', { - butt: 'strokeStyleButtCap', - round: 'strokeStyleRoundCap', - square: 'strokeStyleSquareCap', -}); -export var strokeStyleLineJoinType = createEnum('strokeStyleLineJoinType', 'miter', { - miter: 'strokeStyleMiterJoin', - round: 'strokeStyleRoundJoin', - bevel: 'strokeStyleBevelJoin', -}); -export var strokeStyleLineAlignment = createEnum('strokeStyleLineAlignment', 'inside', { - inside: 'strokeStyleAlignInside', - center: 'strokeStyleAlignCenter', - outside: 'strokeStyleAlignOutside', -}); -//# sourceMappingURL=descriptor.js.map \ No newline at end of file +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import { createEnum } from './helpers'; +import { readSignature, readUnicodeString, readUint32, readUint8, readFloat64, readBytes, readAsciiString, readInt32, readFloat32, readInt32LE, readUnicodeStringWithLength } from './psdReader'; +import { writeSignature, writeBytes, writeUint32, writeFloat64, writeUint8, writeUnicodeStringWithPadding, writeInt32, writeFloat32, writeUnicodeString } from './psdWriter'; +function revMap(map) { + var result = {}; + Object.keys(map).forEach(function (key) { return result[map[key]] = key; }); + return result; +} +var unitsMap = { + '#Ang': 'Angle', + '#Rsl': 'Density', + '#Rlt': 'Distance', + '#Nne': 'None', + '#Prc': 'Percent', + '#Pxl': 'Pixels', + '#Mlm': 'Millimeters', + '#Pnt': 'Points', + 'RrPi': 'Picas', + 'RrIn': 'Inches', + 'RrCm': 'Centimeters', +}; +var unitsMapRev = revMap(unitsMap); +var logErrors = false; +export function setLogErrors(value) { + logErrors = value; +} +function makeType(name, classID) { + return { name: name, classID: classID }; +} +var nullType = makeType('', 'null'); +var fieldToExtType = { + strokeStyleContent: makeType('', 'solidColorLayer'), + // printProofSetup: makeType('校样设置', 'proofSetup'), // TESTING + printProofSetup: makeType('Proof Setup', 'proofSetup'), + patternFill: makeType('', 'patternFill'), + Grad: makeType('Gradient', 'Grdn'), + ebbl: makeType('', 'ebbl'), + SoFi: makeType('', 'SoFi'), + GrFl: makeType('', 'GrFl'), + sdwC: makeType('', 'RGBC'), + hglC: makeType('', 'RGBC'), + 'Clr ': makeType('', 'RGBC'), + 'tintColor': makeType('', 'RGBC'), + Ofst: makeType('', 'Pnt '), + ChFX: makeType('', 'ChFX'), + MpgS: makeType('', 'ShpC'), + DrSh: makeType('', 'DrSh'), + IrSh: makeType('', 'IrSh'), + OrGl: makeType('', 'OrGl'), + IrGl: makeType('', 'IrGl'), + TrnS: makeType('', 'ShpC'), + Ptrn: makeType('', 'Ptrn'), + FrFX: makeType('', 'FrFX'), + phase: makeType('', 'Pnt '), + frameStep: nullType, + duration: nullType, + workInTime: nullType, + workOutTime: nullType, + audioClipGroupList: nullType, + bounds: makeType('', 'Rctn'), + customEnvelopeWarp: makeType('', 'customEnvelopeWarp'), + warp: makeType('', 'warp'), + 'Sz ': makeType('', 'Pnt '), + origin: makeType('', 'Pnt '), + autoExpandOffset: makeType('', 'Pnt '), + keyOriginShapeBBox: makeType('', 'unitRect'), + Vrsn: nullType, + psVersion: nullType, + docDefaultNewArtboardBackgroundColor: makeType('', 'RGBC'), + artboardRect: makeType('', 'classFloatRect'), + keyOriginRRectRadii: makeType('', 'radii'), + keyOriginBoxCorners: nullType, + rectangleCornerA: makeType('', 'Pnt '), + rectangleCornerB: makeType('', 'Pnt '), + rectangleCornerC: makeType('', 'Pnt '), + rectangleCornerD: makeType('', 'Pnt '), + compInfo: nullType, + Trnf: makeType('Transform', 'Trnf'), + quiltWarp: makeType('', 'quiltWarp'), + generatorSettings: nullType, + crema: nullType, + FrIn: nullType, + blendOptions: nullType, + FXRf: nullType, + Lefx: nullType, + time: nullType, + animKey: nullType, + timeScope: nullType, + inTime: nullType, + outTime: nullType, + sheetStyle: nullType, + translation: nullType, + Skew: nullType, + 'Lnk ': makeType('', 'ExternalFileLink'), + frameReader: makeType('', 'FrameReader'), + effectParams: makeType('', 'motionTrackEffectParams'), +}; +var fieldToArrayExtType = { + 'Crv ': makeType('', 'CrPt'), + Clrs: makeType('', 'Clrt'), + Trns: makeType('', 'TrnS'), + keyDescriptorList: nullType, + solidFillMulti: makeType('', 'SoFi'), + gradientFillMulti: makeType('', 'GrFl'), + dropShadowMulti: makeType('', 'DrSh'), + innerShadowMulti: makeType('', 'IrSh'), + frameFXMulti: makeType('', 'FrFX'), + FrIn: nullType, + FSts: nullType, + LaSt: nullType, + sheetTimelineOptions: nullType, + trackList: makeType('', 'animationTrack'), + globalTrackList: makeType('', 'animationTrack'), + keyList: nullType, + audioClipGroupList: nullType, + audioClipList: nullType, +}; +var typeToField = { + 'TEXT': [ + 'Txt ', 'printerName', 'Nm ', 'Idnt', 'blackAndWhitePresetFileName', 'LUT3DFileName', + 'presetFileName', 'curvesPresetFileName', 'mixerPresetFileName', 'placed', 'description', 'reason', + 'artboardPresetName', 'json', 'groupID', 'clipID', 'relPath', 'fullPath', 'mediaDescriptor', + ], + 'tdta': ['EngineData', 'LUT3DFileData'], + 'long': [ + 'TextIndex', 'RndS', 'Mdpn', 'Smth', 'Lctn', 'strokeStyleVersion', 'LaID', 'Vrsn', 'Cnt ', + 'Brgh', 'Cntr', 'means', 'vibrance', 'Strt', 'bwPresetKind', 'presetKind', 'comp', 'compID', 'originalCompID', + 'curvesPresetKind', 'mixerPresetKind', 'uOrder', 'vOrder', 'PgNm', 'totalPages', 'Crop', + 'numerator', 'denominator', 'frameCount', 'Annt', 'keyOriginType', 'unitValueQuadVersion', + 'keyOriginIndex', 'major', 'minor', 'fix', 'docDefaultNewArtboardBackgroundType', 'artboardBackgroundType', + 'numModifyingFX', 'deformNumRows', 'deformNumCols', 'FrID', 'FrDl', 'FsID', 'LCnt', 'AFrm', 'AFSt', + 'numBefore', 'numAfter', 'Spcn', 'minOpacity', 'maxOpacity', 'BlnM', 'sheetID', 'gblA', 'globalAltitude', + 'descVersion', 'frameReaderType', 'LyrI', 'zoomOrigin', + ], + 'enum': [ + 'textGridding', 'Ornt', 'warpStyle', 'warpRotate', 'Inte', 'Bltn', 'ClrS', + 'sdwM', 'hglM', 'bvlT', 'bvlS', 'bvlD', 'Md ', 'glwS', 'GrdF', 'GlwT', + 'strokeStyleLineCapType', 'strokeStyleLineJoinType', 'strokeStyleLineAlignment', + 'strokeStyleBlendMode', 'PntT', 'Styl', 'lookupType', 'LUTFormat', 'dataOrder', + 'tableOrder', 'enableCompCore', 'enableCompCoreGPU', 'compCoreSupport', 'compCoreGPUSupport', 'Engn', + 'enableCompCoreThreads', 'gs99', 'FrDs', 'trackID', 'animInterpStyle', + ], + 'bool': [ + 'PstS', 'printSixteenBit', 'masterFXSwitch', 'enab', 'uglg', 'antialiasGloss', + 'useShape', 'useTexture', 'uglg', 'antialiasGloss', 'useShape', + 'useTexture', 'Algn', 'Rvrs', 'Dthr', 'Invr', 'VctC', 'ShTr', 'layerConceals', + 'strokeEnabled', 'fillEnabled', 'strokeStyleScaleLock', 'strokeStyleStrokeAdjust', + 'hardProof', 'MpBl', 'paperWhite', 'useLegacy', 'Auto', 'Lab ', 'useTint', 'keyShapeInvalidated', + 'autoExpandEnabled', 'autoNestEnabled', 'autoPositionEnabled', 'shrinkwrapOnSaveEnabled', + 'present', 'showInDialog', 'overprint', 'sheetDisclosed', 'lightsDisclosed', 'meshesDisclosed', + 'materialsDisclosed', 'hasMotion', 'muted', 'Effc', 'selected', 'autoScope', 'fillCanvas', + ], + 'doub': [ + 'warpValue', 'warpPerspective', 'warpPerspectiveOther', 'Intr', 'Wdth', 'Hght', + 'strokeStyleMiterLimit', 'strokeStyleResolution', 'layerTime', 'keyOriginResolution', + 'xx', 'xy', 'yx', 'yy', 'tx', 'ty', 'FrGA', 'frameRate', 'audioLevel', 'rotation', + ], + 'UntF': [ + 'Scl ', 'sdwO', 'hglO', 'lagl', 'Lald', 'srgR', 'blur', 'Sftn', 'Opct', 'Dstn', 'Angl', + 'Ckmt', 'Nose', 'Inpr', 'ShdN', 'strokeStyleLineWidth', 'strokeStyleLineDashOffset', + 'strokeStyleOpacity', 'H ', 'Top ', 'Left', 'Btom', 'Rght', 'Rslt', + 'topRight', 'topLeft', 'bottomLeft', 'bottomRight', + ], + 'VlLs': [ + 'Crv ', 'Clrs', 'Mnm ', 'Mxm ', 'Trns', 'pathList', 'strokeStyleLineDashSet', 'FrLs', + 'LaSt', 'Trnf', 'nonAffineTransform', 'keyDescriptorList', 'guideIndeces', 'gradientFillMulti', + 'solidFillMulti', 'frameFXMulti', 'innerShadowMulti', 'dropShadowMulti', 'FrIn', 'FSts', 'FsFr', + 'sheetTimelineOptions', 'audioClipList', 'trackList', 'globalTrackList', 'keyList', 'audioClipList', + ], + 'ObAr': ['meshPoints', 'quiltSliceX', 'quiltSliceY'], + 'obj ': ['null'], +}; +var channels = [ + 'Rd ', 'Grn ', 'Bl ', 'Yllw', 'Ylw ', 'Cyn ', 'Mgnt', 'Blck', 'Gry ', 'Lmnc', 'A ', 'B ', +]; +var fieldToArrayType = { + 'Mnm ': 'long', + 'Mxm ': 'long', + 'FrLs': 'long', + 'strokeStyleLineDashSet': 'UntF', + 'Trnf': 'doub', + 'nonAffineTransform': 'doub', + 'keyDescriptorList': 'Objc', + 'gradientFillMulti': 'Objc', + 'solidFillMulti': 'Objc', + 'frameFXMulti': 'Objc', + 'innerShadowMulti': 'Objc', + 'dropShadowMulti': 'Objc', + 'LaSt': 'Objc', + 'FrIn': 'Objc', + 'FSts': 'Objc', + 'FsFr': 'long', + 'blendOptions': 'Objc', + 'sheetTimelineOptions': 'Objc', + 'keyList': 'Objc', +}; +var fieldToType = {}; +for (var _i = 0, _a = Object.keys(typeToField); _i < _a.length; _i++) { + var type = _a[_i]; + for (var _b = 0, _c = typeToField[type]; _b < _c.length; _b++) { + var field = _c[_b]; + fieldToType[field] = type; + } +} +for (var _d = 0, _e = Object.keys(fieldToExtType); _d < _e.length; _d++) { + var field = _e[_d]; + if (!fieldToType[field]) + fieldToType[field] = 'Objc'; +} +for (var _f = 0, _g = Object.keys(fieldToArrayExtType); _f < _g.length; _f++) { + var field = _g[_f]; + fieldToArrayType[field] = 'Objc'; +} +function getTypeByKey(key, value, root, parent) { + if (key === 'Sz ') { + return ('Wdth' in value) ? 'Objc' : (('units' in value) ? 'UntF' : 'doub'); + } + else if (key === 'Type') { + return typeof value === 'string' ? 'enum' : 'long'; + } + else if (key === 'AntA') { + return typeof value === 'string' ? 'enum' : 'bool'; + } + else if ((key === 'Hrzn' || key === 'Vrtc') && parent.Type === 'keyType.Pstn') { + return 'long'; + } + else if (key === 'Hrzn' || key === 'Vrtc' || key === 'Top ' || key === 'Left' || key === 'Btom' || key === 'Rght') { + return typeof value === 'number' ? 'doub' : 'UntF'; + } + else if (key === 'Vrsn') { + return typeof value === 'number' ? 'long' : 'Objc'; + } + else if (key === 'Rd ' || key === 'Grn ' || key === 'Bl ') { + return root === 'artd' ? 'long' : 'doub'; + } + else if (key === 'Trnf') { + return Array.isArray(value) ? 'VlLs' : 'Objc'; + } + else { + return fieldToType[key]; + } +} +export function readAsciiStringOrClassId(reader) { + var length = readInt32(reader); + return readAsciiString(reader, length || 4); +} +function writeAsciiStringOrClassId(writer, value) { + if (value.length === 4 && value !== 'warp' && value !== 'time' && value !== 'hold') { + // write classId + writeInt32(writer, 0); + writeSignature(writer, value); + } + else { + // write ascii string + writeInt32(writer, value.length); + for (var i = 0; i < value.length; i++) { + writeUint8(writer, value.charCodeAt(i)); + } + } +} +export function readDescriptorStructure(reader) { + var object = {}; + // object.__struct = + readClassStructure(reader); + var itemsCount = readUint32(reader); + // console.log('//', object.__struct); + for (var i = 0; i < itemsCount; i++) { + var key = readAsciiStringOrClassId(reader); + var type = readSignature(reader); + // console.log(`> '${key}' '${type}'`); + var data = readOSType(reader, type); + // if (!getTypeByKey(key, data)) console.log(`> '${key}' '${type}'`, data); + object[key] = data; + } + return object; +} +export function writeDescriptorStructure(writer, name, classId, value, root) { + if (logErrors && !classId) + console.log('Missing classId for: ', name, classId, value); + // write class structure + writeUnicodeStringWithPadding(writer, name); + writeAsciiStringOrClassId(writer, classId); + var keys = Object.keys(value); + writeUint32(writer, keys.length); + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + var type = getTypeByKey(key, value[key], root, value); + var extType = fieldToExtType[key]; + if (key === 'Scl ' && 'Hrzn' in value[key]) { + type = 'Objc'; + extType = nullType; + } + else if (key === 'audioClipGroupList' && keys.length === 1) { + type = 'VlLs'; + } + else if ((key === 'Strt' || key === 'Brgh') && 'H ' in value) { + type = 'doub'; + } + else if (key === 'Strt') { + type = 'Objc'; + extType = nullType; + } + else if (channels.indexOf(key) !== -1) { + type = (classId === 'RGBC' && root !== 'artd') ? 'doub' : 'long'; + } + else if (key === 'profile') { + type = classId === 'printOutput' ? 'TEXT' : 'tdta'; + } + else if (key === 'strokeStyleContent') { + if (value[key]['Clr ']) { + extType = makeType('', 'solidColorLayer'); + } + else if (value[key].Grad) { + extType = makeType('', 'gradientLayer'); + } + else if (value[key].Ptrn) { + extType = makeType('', 'patternLayer'); + } + else { + logErrors && console.log('Invalid strokeStyleContent value', value[key]); + } + } + else if (key === 'bounds' && root === 'quiltWarp') { + extType = makeType('', 'classFloatRect'); + } + if (extType && extType.classID === 'RGBC') { + if ('H ' in value[key]) + extType = { classID: 'HSBC', name: '' }; + // TODO: other color spaces + } + writeAsciiStringOrClassId(writer, key); + writeSignature(writer, type || 'long'); + writeOSType(writer, type || 'long', value[key], key, extType, root); + if (logErrors && !type) + console.log("Missing descriptor field type for: '".concat(key, "' in"), value); + } +} +function readOSType(reader, type) { + switch (type) { + case 'obj ': // Reference + return readReferenceStructure(reader); + case 'Objc': // Descriptor + case 'GlbO': // GlobalObject same as Descriptor + return readDescriptorStructure(reader); + case 'VlLs': { // List + var length_1 = readInt32(reader); + var items = []; + for (var i = 0; i < length_1; i++) { + var type_1 = readSignature(reader); + // console.log(' >', type); + items.push(readOSType(reader, type_1)); + } + return items; + } + case 'doub': // Double + return readFloat64(reader); + case 'UntF': { // Unit double + var units = readSignature(reader); + var value = readFloat64(reader); + if (!unitsMap[units]) + throw new Error("Invalid units: ".concat(units)); + return { units: unitsMap[units], value: value }; + } + case 'UnFl': { // Unit float + var units = readSignature(reader); + var value = readFloat32(reader); + if (!unitsMap[units]) + throw new Error("Invalid units: ".concat(units)); + return { units: unitsMap[units], value: value }; + } + case 'TEXT': // String + return readUnicodeString(reader); + case 'enum': { // Enumerated + var type_2 = readAsciiStringOrClassId(reader); + var value = readAsciiStringOrClassId(reader); + return "".concat(type_2, ".").concat(value); + } + case 'long': // Integer + return readInt32(reader); + case 'comp': { // Large Integer + var low = readUint32(reader); + var high = readUint32(reader); + return { low: low, high: high }; + } + case 'bool': // Boolean + return !!readUint8(reader); + case 'type': // Class + case 'GlbC': // Class + return readClassStructure(reader); + case 'alis': { // Alias + var length_2 = readInt32(reader); + return readAsciiString(reader, length_2); + } + case 'tdta': { // Raw Data + var length_3 = readInt32(reader); + return readBytes(reader, length_3); + } + case 'ObAr': { // Object array + readInt32(reader); // version: 16 + readUnicodeString(reader); // name: '' + readAsciiStringOrClassId(reader); // 'rationalPoint' + var length_4 = readInt32(reader); + var items = []; + for (var i = 0; i < length_4; i++) { + var type1 = readAsciiStringOrClassId(reader); // type Hrzn | Vrtc + readSignature(reader); // UnFl + readSignature(reader); // units ? '#Pxl' + var valuesCount = readInt32(reader); + var values = []; + for (var j = 0; j < valuesCount; j++) { + values.push(readFloat64(reader)); + } + items.push({ type: type1, values: values }); + } + return items; + } + case 'Pth ': { // File path + /*const length =*/ readInt32(reader); + var sig = readSignature(reader); + /*const pathSize =*/ readInt32LE(reader); + var charsCount = readInt32LE(reader); + var path = readUnicodeStringWithLength(reader, charsCount); + return { sig: sig, path: path }; + } + default: + throw new Error("Invalid TySh descriptor OSType: ".concat(type, " at ").concat(reader.offset.toString(16))); + } +} +var ObArTypes = { + meshPoints: 'rationalPoint', + quiltSliceX: 'UntF', + quiltSliceY: 'UntF', +}; +function writeOSType(writer, type, value, key, extType, root) { + switch (type) { + case 'obj ': // Reference + writeReferenceStructure(writer, key, value); + break; + case 'Objc': // Descriptor + case 'GlbO': // GlobalObject same as Descriptor + if (!extType) + throw new Error("Missing ext type for: '".concat(key, "' (").concat(JSON.stringify(value), ")")); + writeDescriptorStructure(writer, extType.name, extType.classID, value, root); + break; + case 'VlLs': // List + writeInt32(writer, value.length); + for (var i = 0; i < value.length; i++) { + var type_3 = fieldToArrayType[key]; + writeSignature(writer, type_3 || 'long'); + writeOSType(writer, type_3 || 'long', value[i], '', fieldToArrayExtType[key], root); + if (logErrors && !type_3) + console.log("Missing descriptor array type for: '".concat(key, "' in"), value); + } + break; + case 'doub': // Double + writeFloat64(writer, value); + break; + case 'UntF': // Unit double + if (!unitsMapRev[value.units]) + throw new Error("Invalid units: ".concat(value.units, " in ").concat(key)); + writeSignature(writer, unitsMapRev[value.units]); + writeFloat64(writer, value.value); + break; + case 'UnFl': // Unit float + if (!unitsMapRev[value.units]) + throw new Error("Invalid units: ".concat(value.units, " in ").concat(key)); + writeSignature(writer, unitsMapRev[value.units]); + writeFloat32(writer, value.value); + break; + case 'TEXT': // String + writeUnicodeStringWithPadding(writer, value); + break; + case 'enum': { // Enumerated + var _a = value.split('.'), _type = _a[0], val = _a[1]; + writeAsciiStringOrClassId(writer, _type); + writeAsciiStringOrClassId(writer, val); + break; + } + case 'long': // Integer + writeInt32(writer, value); + break; + // case 'comp': // Large Integer + // writeLargeInteger(reader); + case 'bool': // Boolean + writeUint8(writer, value ? 1 : 0); + break; + // case 'type': // Class + // case 'GlbC': // Class + // writeClassStructure(reader); + // case 'alis': // Alias + // writeAliasStructure(reader); + case 'tdta': // Raw Data + writeInt32(writer, value.byteLength); + writeBytes(writer, value); + break; + case 'ObAr': { // Object array + writeInt32(writer, 16); // version + writeUnicodeStringWithPadding(writer, ''); // name + var type_4 = ObArTypes[key]; + if (!type_4) + throw new Error("Not implemented ObArType for: ".concat(key)); + writeAsciiStringOrClassId(writer, type_4); + writeInt32(writer, value.length); + for (var i = 0; i < value.length; i++) { + writeAsciiStringOrClassId(writer, value[i].type); // Hrzn | Vrtc + writeSignature(writer, 'UnFl'); + writeSignature(writer, '#Pxl'); + writeInt32(writer, value[i].values.length); + for (var j = 0; j < value[i].values.length; j++) { + writeFloat64(writer, value[i].values[j]); + } + } + break; + } + // case 'Pth ': // File path + // writeFilePath(reader); + default: + throw new Error("Not implemented descriptor OSType: ".concat(type)); + } +} +function readReferenceStructure(reader) { + var itemsCount = readInt32(reader); + var items = []; + for (var i = 0; i < itemsCount; i++) { + var type = readSignature(reader); + switch (type) { + case 'prop': { // Property + readClassStructure(reader); + var keyID = readAsciiStringOrClassId(reader); + items.push(keyID); + break; + } + case 'Clss': // Class + items.push(readClassStructure(reader)); + break; + case 'Enmr': { // Enumerated Reference + readClassStructure(reader); + var typeID = readAsciiStringOrClassId(reader); + var value = readAsciiStringOrClassId(reader); + items.push("".concat(typeID, ".").concat(value)); + break; + } + case 'rele': { // Offset + // const { name, classID } = + readClassStructure(reader); + items.push(readUint32(reader)); + break; + } + case 'Idnt': // Identifier + items.push(readInt32(reader)); + break; + case 'indx': // Index + items.push(readInt32(reader)); + break; + case 'name': { // Name + readClassStructure(reader); + items.push(readUnicodeString(reader)); + break; + } + default: + throw new Error("Invalid descriptor reference type: ".concat(type)); + } + } + return items; +} +function writeReferenceStructure(writer, _key, items) { + writeInt32(writer, items.length); + for (var i = 0; i < items.length; i++) { + var value = items[i]; + var type = 'unknown'; + if (typeof value === 'string') { + if (/^[a-z]+\.[a-z]+$/i.test(value)) { + type = 'Enmr'; + } + else { + type = 'name'; + } + } + writeSignature(writer, type); + switch (type) { + // case 'prop': // Property + // case 'Clss': // Class + case 'Enmr': { // Enumerated Reference + var _a = value.split('.'), typeID = _a[0], enumValue = _a[1]; + writeClassStructure(writer, '\0', typeID); + writeAsciiStringOrClassId(writer, typeID); + writeAsciiStringOrClassId(writer, enumValue); + break; + } + // case 'rele': // Offset + // case 'Idnt': // Identifier + // case 'indx': // Index + case 'name': { // Name + writeClassStructure(writer, '\0', 'Lyr '); + writeUnicodeString(writer, value + '\0'); + break; + } + default: + throw new Error("Invalid descriptor reference type: ".concat(type)); + } + } + return items; +} +function readClassStructure(reader) { + var name = readUnicodeString(reader); + var classID = readAsciiStringOrClassId(reader); + // console.log({ name, classID }); + return { name: name, classID: classID }; +} +function writeClassStructure(writer, name, classID) { + writeUnicodeString(writer, name); + writeAsciiStringOrClassId(writer, classID); +} +export function readVersionAndDescriptor(reader) { + var version = readUint32(reader); + if (version !== 16) + throw new Error("Invalid descriptor version: ".concat(version)); + var desc = readDescriptorStructure(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + return desc; +} +export function writeVersionAndDescriptor(writer, name, classID, descriptor, root) { + if (root === void 0) { root = ''; } + writeUint32(writer, 16); // version + writeDescriptorStructure(writer, name, classID, descriptor, root); +} +export function horzVrtcToXY(hv) { + return { x: hv.Hrzn, y: hv.Vrtc }; +} +export function xyToHorzVrtc(xy) { + return { Hrzn: xy.x, Vrtc: xy.y }; +} +function parseFxObject(fx) { + var stroke = { + enabled: !!fx.enab, + position: FStl.decode(fx.Styl), + fillType: FrFl.decode(fx.PntT), + blendMode: BlnM.decode(fx['Md ']), + opacity: parsePercent(fx.Opct), + size: parseUnits(fx['Sz ']), + }; + if (fx.present !== undefined) + stroke.present = fx.present; + if (fx.showInDialog !== undefined) + stroke.showInDialog = fx.showInDialog; + if (fx.overprint !== undefined) + stroke.overprint = fx.overprint; + if (fx['Clr ']) + stroke.color = parseColor(fx['Clr ']); + if (fx.Grad) + stroke.gradient = parseGradientContent(fx); + if (fx.Ptrn) + stroke.pattern = parsePatternContent(fx); + return stroke; +} +function serializeFxObject(stroke) { + var FrFX = {}; + FrFX.enab = !!stroke.enabled; + if (stroke.present !== undefined) + FrFX.present = !!stroke.present; + if (stroke.showInDialog !== undefined) + FrFX.showInDialog = !!stroke.showInDialog; + FrFX.Styl = FStl.encode(stroke.position); + FrFX.PntT = FrFl.encode(stroke.fillType); + FrFX['Md '] = BlnM.encode(stroke.blendMode); + FrFX.Opct = unitsPercent(stroke.opacity); + FrFX['Sz '] = unitsValue(stroke.size, 'size'); + if (stroke.color) + FrFX['Clr '] = serializeColor(stroke.color); + if (stroke.gradient) + FrFX = __assign(__assign({}, FrFX), serializeGradientContent(stroke.gradient)); + if (stroke.pattern) + FrFX = __assign(__assign({}, FrFX), serializePatternContent(stroke.pattern)); + if (stroke.overprint !== undefined) + FrFX.overprint = !!stroke.overprint; + return FrFX; +} +export function serializeEffects(e, log, multi) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; + var info = multi ? { + 'Scl ': unitsPercent((_a = e.scale) !== null && _a !== void 0 ? _a : 1), + masterFXSwitch: !e.disabled, + } : { + masterFXSwitch: !e.disabled, + 'Scl ': unitsPercent((_b = e.scale) !== null && _b !== void 0 ? _b : 1), + }; + var arrayKeys = ['dropShadow', 'innerShadow', 'solidFill', 'gradientOverlay', 'stroke']; + for (var _i = 0, arrayKeys_1 = arrayKeys; _i < arrayKeys_1.length; _i++) { + var key = arrayKeys_1[_i]; + if (e[key] && !Array.isArray(e[key])) + throw new Error("".concat(key, " should be an array")); + } + if (((_c = e.dropShadow) === null || _c === void 0 ? void 0 : _c[0]) && !multi) + info.DrSh = serializeEffectObject(e.dropShadow[0], 'dropShadow', log); + if (((_d = e.dropShadow) === null || _d === void 0 ? void 0 : _d[0]) && multi) + info.dropShadowMulti = e.dropShadow.map(function (i) { return serializeEffectObject(i, 'dropShadow', log); }); + if (((_e = e.innerShadow) === null || _e === void 0 ? void 0 : _e[0]) && !multi) + info.IrSh = serializeEffectObject(e.innerShadow[0], 'innerShadow', log); + if (((_f = e.innerShadow) === null || _f === void 0 ? void 0 : _f[0]) && multi) + info.innerShadowMulti = e.innerShadow.map(function (i) { return serializeEffectObject(i, 'innerShadow', log); }); + if (e.outerGlow) + info.OrGl = serializeEffectObject(e.outerGlow, 'outerGlow', log); + if (((_g = e.solidFill) === null || _g === void 0 ? void 0 : _g[0]) && multi) + info.solidFillMulti = e.solidFill.map(function (i) { return serializeEffectObject(i, 'solidFill', log); }); + if (((_h = e.gradientOverlay) === null || _h === void 0 ? void 0 : _h[0]) && multi) + info.gradientFillMulti = e.gradientOverlay.map(function (i) { return serializeEffectObject(i, 'gradientOverlay', log); }); + if (((_j = e.stroke) === null || _j === void 0 ? void 0 : _j[0]) && multi) + info.frameFXMulti = e.stroke.map(function (i) { return serializeFxObject(i); }); + if (e.innerGlow) + info.IrGl = serializeEffectObject(e.innerGlow, 'innerGlow', log); + if (e.bevel) + info.ebbl = serializeEffectObject(e.bevel, 'bevel', log); + if (((_k = e.solidFill) === null || _k === void 0 ? void 0 : _k[0]) && !multi) + info.SoFi = serializeEffectObject(e.solidFill[0], 'solidFill', log); + if (e.patternOverlay) + info.patternFill = serializeEffectObject(e.patternOverlay, 'patternOverlay', log); + if (((_l = e.gradientOverlay) === null || _l === void 0 ? void 0 : _l[0]) && !multi) + info.GrFl = serializeEffectObject(e.gradientOverlay[0], 'gradientOverlay', log); + if (e.satin) + info.ChFX = serializeEffectObject(e.satin, 'satin', log); + if (((_m = e.stroke) === null || _m === void 0 ? void 0 : _m[0]) && !multi) + info.FrFX = serializeFxObject((_o = e.stroke) === null || _o === void 0 ? void 0 : _o[0]); + if (multi) { + info.numModifyingFX = 0; + for (var _p = 0, _q = Object.keys(e); _p < _q.length; _p++) { + var key = _q[_p]; + var value = e[key]; + if (Array.isArray(value)) { + for (var _r = 0, value_1 = value; _r < value_1.length; _r++) { + var effect = value_1[_r]; + if (effect.enabled) + info.numModifyingFX++; + } + } + } + } + return info; +} +export function parseEffects(info, log) { + var effects = {}; + if (!info.masterFXSwitch) + effects.disabled = true; + if (info['Scl ']) + effects.scale = parsePercent(info['Scl ']); + if (info.DrSh) + effects.dropShadow = [parseEffectObject(info.DrSh, log)]; + if (info.dropShadowMulti) + effects.dropShadow = info.dropShadowMulti.map(function (i) { return parseEffectObject(i, log); }); + if (info.IrSh) + effects.innerShadow = [parseEffectObject(info.IrSh, log)]; + if (info.innerShadowMulti) + effects.innerShadow = info.innerShadowMulti.map(function (i) { return parseEffectObject(i, log); }); + if (info.OrGl) + effects.outerGlow = parseEffectObject(info.OrGl, log); + if (info.IrGl) + effects.innerGlow = parseEffectObject(info.IrGl, log); + if (info.ebbl) + effects.bevel = parseEffectObject(info.ebbl, log); + if (info.SoFi) + effects.solidFill = [parseEffectObject(info.SoFi, log)]; + if (info.solidFillMulti) + effects.solidFill = info.solidFillMulti.map(function (i) { return parseEffectObject(i, log); }); + if (info.patternFill) + effects.patternOverlay = parseEffectObject(info.patternFill, log); + if (info.GrFl) + effects.gradientOverlay = [parseEffectObject(info.GrFl, log)]; + if (info.gradientFillMulti) + effects.gradientOverlay = info.gradientFillMulti.map(function (i) { return parseEffectObject(i, log); }); + if (info.ChFX) + effects.satin = parseEffectObject(info.ChFX, log); + if (info.FrFX) + effects.stroke = [parseFxObject(info.FrFX)]; + if (info.frameFXMulti) + effects.stroke = info.frameFXMulti.map(function (i) { return parseFxObject(i); }); + return effects; +} +function parseKeyList(keyList, logMissingFeatures) { + var keys = []; + for (var j = 0; j < keyList.length; j++) { + var key = keyList[j]; + var time = key.time, selected = key.selected, animKey = key.animKey; + var interpolation = animInterpStyleEnum.decode(key.animInterpStyle); + switch (animKey.Type) { + case 'keyType.Opct': + keys.push({ interpolation: interpolation, time: time, selected: selected, type: 'opacity', value: parsePercent(animKey.Opct) }); + break; + case 'keyType.Pstn': + keys.push({ interpolation: interpolation, time: time, selected: selected, type: 'position', x: animKey.Hrzn, y: animKey.Vrtc }); + break; + case 'keyType.Trnf': + keys.push({ + interpolation: interpolation, + time: time, + selected: selected, + type: 'transform', + scale: horzVrtcToXY(animKey['Scl ']), skew: horzVrtcToXY(animKey.Skew), rotation: animKey.rotation, translation: horzVrtcToXY(animKey.translation) + }); + break; + case 'keyType.sheetStyle': { + var key_1 = { interpolation: interpolation, time: time, selected: selected, type: 'style' }; + if (animKey.sheetStyle.Lefx) + key_1.style = parseEffects(animKey.sheetStyle.Lefx, logMissingFeatures); + keys.push(key_1); + break; + } + case 'keyType.globalLighting': { + keys.push({ + interpolation: interpolation, + time: time, + selected: selected, + type: 'globalLighting', + globalAngle: animKey.gblA, globalAltitude: animKey.globalAltitude + }); + break; + } + default: throw new Error("Unsupported keyType value"); + } + } + return keys; +} +function serializeKeyList(keys) { + var keyList = []; + for (var j = 0; j < keys.length; j++) { + var key = keys[j]; + var time = key.time, _a = key.selected, selected = _a === void 0 ? false : _a, interpolation = key.interpolation; + var animInterpStyle = animInterpStyleEnum.encode(interpolation); + var animKey = void 0; + switch (key.type) { + case 'opacity': + animKey = { Type: 'keyType.Opct', Opct: unitsPercent(key.value) }; + break; + case 'position': + animKey = { Type: 'keyType.Pstn', Hrzn: key.x, Vrtc: key.y }; + break; + case 'transform': + animKey = { Type: 'keyType.Trnf', 'Scl ': xyToHorzVrtc(key.scale), Skew: xyToHorzVrtc(key.skew), rotation: key.rotation, translation: xyToHorzVrtc(key.translation) }; + break; + case 'style': + animKey = { Type: 'keyType.sheetStyle', sheetStyle: { Vrsn: 1, blendOptions: {} } }; + if (key.style) + animKey.sheetStyle = { Vrsn: 1, Lefx: serializeEffects(key.style, false, false), blendOptions: {} }; + break; + case 'globalLighting': { + animKey = { Type: 'keyType.globalLighting', gblA: key.globalAngle, globalAltitude: key.globalAltitude }; + break; + } + default: throw new Error("Unsupported keyType value"); + } + keyList.push({ Vrsn: 1, animInterpStyle: animInterpStyle, time: time, animKey: animKey, selected: selected }); + } + return keyList; +} +export function parseTrackList(trackList, logMissingFeatures) { + var tracks = []; + for (var i = 0; i < trackList.length; i++) { + var tr = trackList[i]; + var track = { + type: stdTrackID.decode(tr.trackID), + enabled: tr.enab, + keys: parseKeyList(tr.keyList, logMissingFeatures), + }; + if (tr.effectParams) { + track.effectParams = { + fillCanvas: tr.effectParams.fillCanvas, + zoomOrigin: tr.effectParams.zoomOrigin, + keys: parseKeyList(tr.effectParams.keyList, logMissingFeatures), + }; + } + tracks.push(track); + } + return tracks; +} +export function serializeTrackList(tracks) { + var trackList = []; + for (var i = 0; i < tracks.length; i++) { + var t = tracks[i]; + trackList.push(__assign(__assign({ trackID: stdTrackID.encode(t.type), Vrsn: 1, enab: !!t.enabled, Effc: !!t.effectParams }, (t.effectParams ? { + effectParams: { + keyList: serializeKeyList(t.keys), + fillCanvas: t.effectParams.fillCanvas, + zoomOrigin: t.effectParams.zoomOrigin, + } + } : {})), { keyList: serializeKeyList(t.keys) })); + } + return trackList; +} +function parseEffectObject(obj, reportErrors) { + var result = {}; + for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) { + var key = _a[_i]; + var val = obj[key]; + switch (key) { + case 'enab': + result.enabled = !!val; + break; + case 'uglg': + result.useGlobalLight = !!val; + break; + case 'AntA': + result.antialiased = !!val; + break; + case 'Algn': + result.align = !!val; + break; + case 'Dthr': + result.dither = !!val; + break; + case 'Invr': + result.invert = !!val; + break; + case 'Rvrs': + result.reverse = !!val; + break; + case 'Clr ': + result.color = parseColor(val); + break; + case 'hglC': + result.highlightColor = parseColor(val); + break; + case 'sdwC': + result.shadowColor = parseColor(val); + break; + case 'Styl': + result.position = FStl.decode(val); + break; + case 'Md ': + result.blendMode = BlnM.decode(val); + break; + case 'hglM': + result.highlightBlendMode = BlnM.decode(val); + break; + case 'sdwM': + result.shadowBlendMode = BlnM.decode(val); + break; + case 'bvlS': + result.style = BESl.decode(val); + break; + case 'bvlD': + result.direction = BESs.decode(val); + break; + case 'bvlT': + result.technique = bvlT.decode(val); + break; + case 'GlwT': + result.technique = BETE.decode(val); + break; + case 'glwS': + result.source = IGSr.decode(val); + break; + case 'Type': + result.type = GrdT.decode(val); + break; + case 'gs99': + result.interpolationMethod = gradientInterpolationMethodType.decode(val); + break; + case 'Opct': + result.opacity = parsePercent(val); + break; + case 'hglO': + result.highlightOpacity = parsePercent(val); + break; + case 'sdwO': + result.shadowOpacity = parsePercent(val); + break; + case 'lagl': + result.angle = parseAngle(val); + break; + case 'Angl': + result.angle = parseAngle(val); + break; + case 'Lald': + result.altitude = parseAngle(val); + break; + case 'Sftn': + result.soften = parseUnits(val); + break; + case 'srgR': + result.strength = parsePercent(val); + break; + case 'blur': + result.size = parseUnits(val); + break; + case 'Nose': + result.noise = parsePercent(val); + break; + case 'Inpr': + result.range = parsePercent(val); + break; + case 'Ckmt': + result.choke = parseUnits(val); + break; + case 'ShdN': + result.jitter = parsePercent(val); + break; + case 'Dstn': + result.distance = parseUnits(val); + break; + case 'Scl ': + result.scale = parsePercent(val); + break; + case 'Ptrn': + result.pattern = { name: val['Nm '], id: val.Idnt }; + break; + case 'phase': + result.phase = { x: val.Hrzn, y: val.Vrtc }; + break; + case 'Ofst': + result.offset = { x: parsePercent(val.Hrzn), y: parsePercent(val.Vrtc) }; + break; + case 'MpgS': + case 'TrnS': + result.contour = { + name: val['Nm '], + curve: val['Crv '].map(function (p) { return ({ x: p.Hrzn, y: p.Vrtc }); }), + }; + break; + case 'Grad': + result.gradient = parseGradient(val); + break; + case 'useTexture': + case 'useShape': + case 'layerConceals': + case 'present': + case 'showInDialog': + case 'antialiasGloss': + result[key] = val; + break; + default: + reportErrors && console.log("Invalid effect key: '".concat(key, "', value:"), val); + } + } + return result; +} +function serializeEffectObject(obj, objName, reportErrors) { + var result = {}; + for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) { + var objKey = _a[_i]; + var key = objKey; + var val = obj[key]; + switch (key) { + case 'enabled': + result.enab = !!val; + break; + case 'useGlobalLight': + result.uglg = !!val; + break; + case 'antialiased': + result.AntA = !!val; + break; + case 'align': + result.Algn = !!val; + break; + case 'dither': + result.Dthr = !!val; + break; + case 'invert': + result.Invr = !!val; + break; + case 'reverse': + result.Rvrs = !!val; + break; + case 'color': + result['Clr '] = serializeColor(val); + break; + case 'highlightColor': + result.hglC = serializeColor(val); + break; + case 'shadowColor': + result.sdwC = serializeColor(val); + break; + case 'position': + result.Styl = FStl.encode(val); + break; + case 'blendMode': + result['Md '] = BlnM.encode(val); + break; + case 'highlightBlendMode': + result.hglM = BlnM.encode(val); + break; + case 'shadowBlendMode': + result.sdwM = BlnM.encode(val); + break; + case 'style': + result.bvlS = BESl.encode(val); + break; + case 'direction': + result.bvlD = BESs.encode(val); + break; + case 'technique': + if (objName === 'bevel') { + result.bvlT = bvlT.encode(val); + } + else { + result.GlwT = BETE.encode(val); + } + break; + case 'source': + result.glwS = IGSr.encode(val); + break; + case 'type': + result.Type = GrdT.encode(val); + break; + case 'interpolationMethod': + result.gs99 = gradientInterpolationMethodType.encode(val); + break; + case 'opacity': + result.Opct = unitsPercent(val); + break; + case 'highlightOpacity': + result.hglO = unitsPercent(val); + break; + case 'shadowOpacity': + result.sdwO = unitsPercent(val); + break; + case 'angle': + if (objName === 'gradientOverlay') { + result.Angl = unitsAngle(val); + } + else { + result.lagl = unitsAngle(val); + } + break; + case 'altitude': + result.Lald = unitsAngle(val); + break; + case 'soften': + result.Sftn = unitsValue(val, key); + break; + case 'strength': + result.srgR = unitsPercent(val); + break; + case 'size': + result.blur = unitsValue(val, key); + break; + case 'noise': + result.Nose = unitsPercent(val); + break; + case 'range': + result.Inpr = unitsPercent(val); + break; + case 'choke': + result.Ckmt = unitsValue(val, key); + break; + case 'jitter': + result.ShdN = unitsPercent(val); + break; + case 'distance': + result.Dstn = unitsValue(val, key); + break; + case 'scale': + result['Scl '] = unitsPercent(val); + break; + case 'pattern': + result.Ptrn = { 'Nm ': val.name, Idnt: val.id }; + break; + case 'phase': + result.phase = { Hrzn: val.x, Vrtc: val.y }; + break; + case 'offset': + result.Ofst = { Hrzn: unitsPercent(val.x), Vrtc: unitsPercent(val.y) }; + break; + case 'contour': { + result[objName === 'satin' ? 'MpgS' : 'TrnS'] = { + 'Nm ': val.name, + 'Crv ': val.curve.map(function (p) { return ({ Hrzn: p.x, Vrtc: p.y }); }), + }; + break; + } + case 'gradient': + result.Grad = serializeGradient(val); + break; + case 'useTexture': + case 'useShape': + case 'layerConceals': + case 'present': + case 'showInDialog': + case 'antialiasGloss': + result[key] = val; + break; + default: + reportErrors && console.log("Invalid effect key: '".concat(key, "', value:"), val); + } + } + return result; +} +function parseGradient(grad) { + if (grad.GrdF === 'GrdF.CstS') { + var samples_1 = grad.Intr || 4096; + return { + type: 'solid', + name: grad['Nm '], + smoothness: grad.Intr / 4096, + colorStops: grad.Clrs.map(function (s) { return ({ + color: parseColor(s['Clr ']), + location: s.Lctn / samples_1, + midpoint: s.Mdpn / 100, + }); }), + opacityStops: grad.Trns.map(function (s) { return ({ + opacity: parsePercent(s.Opct), + location: s.Lctn / samples_1, + midpoint: s.Mdpn / 100, + }); }), + }; + } + else { + return { + type: 'noise', + name: grad['Nm '], + roughness: grad.Smth / 4096, + colorModel: ClrS.decode(grad.ClrS), + randomSeed: grad.RndS, + restrictColors: !!grad.VctC, + addTransparency: !!grad.ShTr, + min: grad['Mnm '].map(function (x) { return x / 100; }), + max: grad['Mxm '].map(function (x) { return x / 100; }), + }; + } +} +function serializeGradient(grad) { + var _a, _b; + if (grad.type === 'solid') { + var samples_2 = Math.round(((_a = grad.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096); + return { + 'Nm ': grad.name || '', + GrdF: 'GrdF.CstS', + Intr: samples_2, + Clrs: grad.colorStops.map(function (s) { + var _a; + return ({ + 'Clr ': serializeColor(s.color), + Type: 'Clry.UsrS', + Lctn: Math.round(s.location * samples_2), + Mdpn: Math.round(((_a = s.midpoint) !== null && _a !== void 0 ? _a : 0.5) * 100), + }); + }), + Trns: grad.opacityStops.map(function (s) { + var _a; + return ({ + Opct: unitsPercent(s.opacity), + Lctn: Math.round(s.location * samples_2), + Mdpn: Math.round(((_a = s.midpoint) !== null && _a !== void 0 ? _a : 0.5) * 100), + }); + }), + }; + } + else { + return { + GrdF: 'GrdF.ClNs', + 'Nm ': grad.name || '', + ShTr: !!grad.addTransparency, + VctC: !!grad.restrictColors, + ClrS: ClrS.encode(grad.colorModel), + RndS: grad.randomSeed || 0, + Smth: Math.round(((_b = grad.roughness) !== null && _b !== void 0 ? _b : 1) * 4096), + 'Mnm ': (grad.min || [0, 0, 0, 0]).map(function (x) { return x * 100; }), + 'Mxm ': (grad.max || [1, 1, 1, 1]).map(function (x) { return x * 100; }), + }; + } +} +function parseGradientContent(descriptor) { + var result = parseGradient(descriptor.Grad); + result.style = GrdT.decode(descriptor.Type); + if (descriptor.Dthr !== undefined) + result.dither = descriptor.Dthr; + if (descriptor.Rvrs !== undefined) + result.reverse = descriptor.Rvrs; + if (descriptor.Angl !== undefined) + result.angle = parseAngle(descriptor.Angl); + if (descriptor['Scl '] !== undefined) + result.scale = parsePercent(descriptor['Scl ']); + if (descriptor.Algn !== undefined) + result.align = descriptor.Algn; + if (descriptor.Ofst !== undefined) { + result.offset = { + x: parsePercent(descriptor.Ofst.Hrzn), + y: parsePercent(descriptor.Ofst.Vrtc) + }; + } + return result; +} +function parsePatternContent(descriptor) { + var result = { + name: descriptor.Ptrn['Nm '], + id: descriptor.Ptrn.Idnt, + }; + if (descriptor.Lnkd !== undefined) + result.linked = descriptor.Lnkd; + if (descriptor.phase !== undefined) + result.phase = { x: descriptor.phase.Hrzn, y: descriptor.phase.Vrtc }; + return result; +} +export function parseVectorContent(descriptor) { + if ('Grad' in descriptor) { + return parseGradientContent(descriptor); + } + else if ('Ptrn' in descriptor) { + return __assign({ type: 'pattern' }, parsePatternContent(descriptor)); + } + else if ('Clr ' in descriptor) { + return { type: 'color', color: parseColor(descriptor['Clr ']) }; + } + else { + throw new Error('Invalid vector content'); + } +} +function serializeGradientContent(content) { + var result = {}; + if (content.dither !== undefined) + result.Dthr = content.dither; + if (content.reverse !== undefined) + result.Rvrs = content.reverse; + if (content.angle !== undefined) + result.Angl = unitsAngle(content.angle); + result.Type = GrdT.encode(content.style); + if (content.align !== undefined) + result.Algn = content.align; + if (content.scale !== undefined) + result['Scl '] = unitsPercent(content.scale); + if (content.offset) { + result.Ofst = { + Hrzn: unitsPercent(content.offset.x), + Vrtc: unitsPercent(content.offset.y), + }; + } + result.Grad = serializeGradient(content); + return result; +} +function serializePatternContent(content) { + var result = { + Ptrn: { + 'Nm ': content.name || '', + Idnt: content.id || '', + } + }; + if (content.linked !== undefined) + result.Lnkd = !!content.linked; + if (content.phase !== undefined) + result.phase = { Hrzn: content.phase.x, Vrtc: content.phase.y }; + return result; +} +export function serializeVectorContent(content) { + if (content.type === 'color') { + return { key: 'SoCo', descriptor: { 'Clr ': serializeColor(content.color) } }; + } + else if (content.type === 'pattern') { + return { key: 'PtFl', descriptor: serializePatternContent(content) }; + } + else { + return { key: 'GdFl', descriptor: serializeGradientContent(content) }; + } +} +export function parseColor(color) { + if ('H ' in color) { + return { h: parsePercentOrAngle(color['H ']), s: color.Strt, b: color.Brgh }; + } + else if ('Rd ' in color) { + return { r: color['Rd '], g: color['Grn '], b: color['Bl '] }; + } + else if ('Cyn ' in color) { + return { c: color['Cyn '], m: color.Mgnt, y: color['Ylw '], k: color.Blck }; + } + else if ('Gry ' in color) { + return { k: color['Gry '] }; + } + else if ('Lmnc' in color) { + return { l: color.Lmnc, a: color['A '], b: color['B '] }; + } + else { + throw new Error('Unsupported color descriptor'); + } +} +export function serializeColor(color) { + if (!color) { + return { 'Rd ': 0, 'Grn ': 0, 'Bl ': 0 }; + } + else if ('r' in color) { + return { 'Rd ': color.r || 0, 'Grn ': color.g || 0, 'Bl ': color.b || 0 }; + } + else if ('h' in color) { + return { 'H ': unitsAngle(color.h * 360), Strt: color.s || 0, Brgh: color.b || 0 }; + } + else if ('c' in color) { + return { 'Cyn ': color.c || 0, Mgnt: color.m || 0, 'Ylw ': color.y || 0, Blck: color.k || 0 }; + } + else if ('l' in color) { + return { Lmnc: color.l || 0, 'A ': color.a || 0, 'B ': color.b || 0 }; + } + else if ('k' in color) { + return { 'Gry ': color.k }; + } + else { + throw new Error('Invalid color value'); + } +} +export function parseAngle(x) { + if (x === undefined) + return 0; + if (x.units !== 'Angle') + throw new Error("Invalid units: ".concat(x.units)); + return x.value; +} +export function parsePercent(x) { + if (x === undefined) + return 1; + if (x.units !== 'Percent') + throw new Error("Invalid units: ".concat(x.units)); + return x.value / 100; +} +export function parsePercentOrAngle(x) { + if (x === undefined) + return 1; + if (x.units === 'Percent') + return x.value / 100; + if (x.units === 'Angle') + return x.value / 360; + throw new Error("Invalid units: ".concat(x.units)); +} +export function parseUnits(_a) { + var units = _a.units, value = _a.value; + if (units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && + units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density') { + throw new Error("Invalid units: ".concat(JSON.stringify({ units: units, value: value }))); + } + return { value: value, units: units }; +} +export function parseUnitsOrNumber(value, units) { + if (units === void 0) { units = 'Pixels'; } + if (typeof value === 'number') + return { value: value, units: units }; + return parseUnits(value); +} +export function parseUnitsToNumber(_a, expectedUnits) { + var units = _a.units, value = _a.value; + if (units !== expectedUnits) + throw new Error("Invalid units: ".concat(JSON.stringify({ units: units, value: value }))); + return value; +} +export function unitsAngle(value) { + return { units: 'Angle', value: value || 0 }; +} +export function unitsPercent(value) { + return { units: 'Percent', value: Math.round((value || 0) * 100) }; +} +export function unitsValue(x, key) { + if (x == null) + return { units: 'Pixels', value: 0 }; + if (typeof x !== 'object') + throw new Error("Invalid value: ".concat(JSON.stringify(x), " (key: ").concat(key, ") (should have value and units)")); + var units = x.units, value = x.value; + if (typeof value !== 'number') + throw new Error("Invalid value in ".concat(JSON.stringify(x), " (key: ").concat(key, ")")); + if (units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && + units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density') { + throw new Error("Invalid units in ".concat(JSON.stringify(x), " (key: ").concat(key, ")")); + } + return { units: units, value: value }; +} +export var textGridding = createEnum('textGridding', 'none', { + none: 'None', + round: 'Rnd ', +}); +export var Ornt = createEnum('Ornt', 'horizontal', { + horizontal: 'Hrzn', + vertical: 'Vrtc', +}); +export var Annt = createEnum('Annt', 'sharp', { + none: 'Anno', + sharp: 'antiAliasSharp', + crisp: 'AnCr', + strong: 'AnSt', + smooth: 'AnSm', + platform: 'antiAliasPlatformGray', + platformLCD: 'antiAliasPlatformLCD', +}); +export var warpStyle = createEnum('warpStyle', 'none', { + none: 'warpNone', + arc: 'warpArc', + arcLower: 'warpArcLower', + arcUpper: 'warpArcUpper', + arch: 'warpArch', + bulge: 'warpBulge', + shellLower: 'warpShellLower', + shellUpper: 'warpShellUpper', + flag: 'warpFlag', + wave: 'warpWave', + fish: 'warpFish', + rise: 'warpRise', + fisheye: 'warpFisheye', + inflate: 'warpInflate', + squeeze: 'warpSqueeze', + twist: 'warpTwist', + custom: 'warpCustom', +}); +export var BlnM = createEnum('BlnM', 'normal', { + 'normal': 'Nrml', + 'dissolve': 'Dslv', + 'darken': 'Drkn', + 'multiply': 'Mltp', + 'color burn': 'CBrn', + 'linear burn': 'linearBurn', + 'darker color': 'darkerColor', + 'lighten': 'Lghn', + 'screen': 'Scrn', + 'color dodge': 'CDdg', + 'linear dodge': 'linearDodge', + 'lighter color': 'lighterColor', + 'overlay': 'Ovrl', + 'soft light': 'SftL', + 'hard light': 'HrdL', + 'vivid light': 'vividLight', + 'linear light': 'linearLight', + 'pin light': 'pinLight', + 'hard mix': 'hardMix', + 'difference': 'Dfrn', + 'exclusion': 'Xclu', + 'subtract': 'blendSubtraction', + 'divide': 'blendDivide', + 'hue': 'H ', + 'saturation': 'Strt', + 'color': 'Clr ', + 'luminosity': 'Lmns', + // used in ABR + 'linear height': 'linearHeight', + 'height': 'Hght', + 'subtraction': 'Sbtr', // 2nd version of subtract ? +}); +export var BESl = createEnum('BESl', 'inner bevel', { + 'inner bevel': 'InrB', + 'outer bevel': 'OtrB', + 'emboss': 'Embs', + 'pillow emboss': 'PlEb', + 'stroke emboss': 'strokeEmboss', +}); +export var bvlT = createEnum('bvlT', 'smooth', { + 'smooth': 'SfBL', + 'chisel hard': 'PrBL', + 'chisel soft': 'Slmt', +}); +export var BESs = createEnum('BESs', 'up', { + up: 'In ', + down: 'Out ', +}); +export var BETE = createEnum('BETE', 'softer', { + softer: 'SfBL', + precise: 'PrBL', +}); +export var IGSr = createEnum('IGSr', 'edge', { + edge: 'SrcE', + center: 'SrcC', +}); +export var GrdT = createEnum('GrdT', 'linear', { + linear: 'Lnr ', + radial: 'Rdl ', + angle: 'Angl', + reflected: 'Rflc', + diamond: 'Dmnd', +}); +export var animInterpStyleEnum = createEnum('animInterpStyle', 'linear', { + linear: 'Lnr ', + hold: 'hold', +}); +export var stdTrackID = createEnum('stdTrackID', 'opacity', { + opacity: 'opacityTrack', + style: 'styleTrack', + sheetTransform: 'sheetTransformTrack', + sheetPosition: 'sheetPositionTrack', + globalLighting: 'globalLightingTrack', +}); +export var gradientInterpolationMethodType = createEnum('gradientInterpolationMethodType', 'perceptual', { + perceptual: 'Perc', + linear: 'Lnr', + classic: 'Gcls', +}); +export var ClrS = createEnum('ClrS', 'rgb', { + rgb: 'RGBC', + hsb: 'HSBl', + lab: 'LbCl', +}); +export var FStl = createEnum('FStl', 'outside', { + outside: 'OutF', + center: 'CtrF', + inside: 'InsF' +}); +export var FrFl = createEnum('FrFl', 'color', { + color: 'SClr', + gradient: 'GrFl', + pattern: 'Ptrn', +}); +export var strokeStyleLineCapType = createEnum('strokeStyleLineCapType', 'butt', { + butt: 'strokeStyleButtCap', + round: 'strokeStyleRoundCap', + square: 'strokeStyleSquareCap', +}); +export var strokeStyleLineJoinType = createEnum('strokeStyleLineJoinType', 'miter', { + miter: 'strokeStyleMiterJoin', + round: 'strokeStyleRoundJoin', + bevel: 'strokeStyleBevelJoin', +}); +export var strokeStyleLineAlignment = createEnum('strokeStyleLineAlignment', 'inside', { + inside: 'strokeStyleAlignInside', + center: 'strokeStyleAlignCenter', + outside: 'strokeStyleAlignOutside', +}); + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRlc2NyaXB0b3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBV3ZDLE9BQU8sRUFDSyxhQUFhLEVBQUUsaUJBQWlCLEVBQUUsVUFBVSxFQUFFLFNBQVMsRUFBRSxXQUFXLEVBQy9FLFNBQVMsRUFBRSxlQUFlLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFBRSxXQUFXLEVBQUUsMkJBQTJCLEVBQzVGLE1BQU0sYUFBYSxDQUFDO0FBQ3JCLE9BQU8sRUFDSyxjQUFjLEVBQUUsVUFBVSxFQUFFLFdBQVcsRUFBRSxZQUFZLEVBQUUsVUFBVSxFQUM1RSw2QkFBNkIsRUFBRSxVQUFVLEVBQUUsWUFBWSxFQUFFLGtCQUFrQixFQUMzRSxNQUFNLGFBQWEsQ0FBQztBQU1yQixTQU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pZGU6ICdzdHJva2VTdHlsZUFsaWduT3V0c2lkZScsXHJcbn0pO1xyXG4iXSwic291cmNlUm9vdCI6IkM6XFxQcm9qZWN0c1xcZ2l0aHViXFxhZy1wc2RcXHNyYyJ9 diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/descriptor.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/descriptor.js.map deleted file mode 100644 index f26cbd4..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/descriptor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"descriptor.js","sourceRoot":"../src/","sources":["descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAWvC,OAAO,EACK,aAAa,EAAE,iBAAiB,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAC/E,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,2BAA2B,EAC5F,MAAM,aAAa,CAAC;AACrB,OAAO,EACK,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAC5E,6BAA6B,EAAE,UAAU,EAAE,YAAY,EAAE,kBAAkB,EAC3E,MAAM,aAAa,CAAC;AAMrB,SAAS,MAAM,CAAC,GAAS;IACxB,IAAM,MAAM,GAAS,EAAE,CAAC;IACxB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAA,GAAG,IAAI,OAAA,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,EAAtB,CAAsB,CAAC,CAAC;IACxD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,IAAM,QAAQ,GAAS;IACtB,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,QAAQ;IAChB,M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EH,MAAM,CAAC,IAAM,iBAAiB,GAAG,UAAU,CAA6B,mBAAmB,EAAE,MAAM,EAAE;IACpG,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,MAAM;CACb,CAAC,CAAC;AAEH,MAAM,CAAC,IAAM,sBAAsB,GAAG,UAAU,CAAc,wBAAwB,EAAE,MAAM,EAAE;IAC/F,IAAI,EAAE,oBAAoB;IAC1B,KAAK,EAAE,qBAAqB;IAC5B,MAAM,EAAE,sBAAsB;CAC9B,CAAC,CAAC;AAEH,MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAU,CAAe,yBAAyB,EAAE,OAAO,EAAE;IACnG,KAAK,EAAE,sBAAsB;IAC7B,KAAK,EAAE,sBAAsB;IAC7B,KAAK,EAAE,sBAAsB;CAC7B,CAAC,CAAC;AAEH,MAAM,CAAC,IAAM,wBAAwB,GAAG,UAAU,CAAgB,0BAA0B,EAAE,QAAQ,EAAE;IACvG,MAAM,EAAE,wBAAwB;IAChC,MAAM,EAAE,wBAAwB;IAChC,OAAO,EAAE,yBAAyB;CAClC,CAAC,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/effectsHelpers.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/effectsHelpers.d.ts index d7e49f5..0e97f1b 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/effectsHelpers.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/effectsHelpers.d.ts @@ -1,5 +1,5 @@ -import { LayerEffectsInfo } from './psd'; -import { PsdReader } from './psdReader'; -import { PsdWriter } from './psdWriter'; -export declare function readEffects(reader: PsdReader): LayerEffectsInfo; -export declare function writeEffects(writer: PsdWriter, effects: LayerEffectsInfo): void; +import { LayerEffectsInfo } from './psd'; +import { PsdReader } from './psdReader'; +import { PsdWriter } from './psdWriter'; +export declare function readEffects(reader: PsdReader): LayerEffectsInfo; +export declare function writeEffects(writer: PsdWriter, effects: LayerEffectsInfo): void; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/effectsHelpers.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/effectsHelpers.js index 6ed2338..4626b5b 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/effectsHelpers.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/effectsHelpers.js @@ -1,304 +1,305 @@ -import { toBlendMode, fromBlendMode } from './helpers'; -import { checkSignature, readSignature, skipBytes, readUint16, readUint8, readUint32, readFixedPoint32, readColor } from './psdReader'; -import { writeSignature, writeUint16, writeZeros, writeFixedPoint32, writeUint8, writeUint32, writeColor } from './psdWriter'; -var bevelStyles = [ - undefined, 'outer bevel', 'inner bevel', 'emboss', 'pillow emboss', 'stroke emboss' -]; -function readBlendMode(reader) { - checkSignature(reader, '8BIM'); - return toBlendMode[readSignature(reader)] || 'normal'; -} -function writeBlendMode(writer, mode) { - writeSignature(writer, '8BIM'); - writeSignature(writer, fromBlendMode[mode] || 'norm'); -} -function readFixedPoint8(reader) { - return readUint8(reader) / 0xff; -} -function writeFixedPoint8(writer, value) { - writeUint8(writer, Math.round(value * 0xff) | 0); -} -export function readEffects(reader) { - var version = readUint16(reader); - if (version !== 0) - throw new Error("Invalid effects layer version: ".concat(version)); - var effectsCount = readUint16(reader); - var effects = {}; - for (var i = 0; i < effectsCount; i++) { - checkSignature(reader, '8BIM'); - var type = readSignature(reader); - switch (type) { - case 'cmnS': { // common state (see See Effects layer, common state info) - var size = readUint32(reader); - var version_1 = readUint32(reader); - var visible = !!readUint8(reader); - skipBytes(reader, 2); - if (size !== 7 || version_1 !== 0 || !visible) - throw new Error("Invalid effects common state"); - break; - } - case 'dsdw': // drop shadow (see See Effects layer, drop shadow and inner shadow info) - case 'isdw': { // inner shadow (see See Effects layer, drop shadow and inner shadow info) - var blockSize = readUint32(reader); - var version_2 = readUint32(reader); - if (blockSize !== 41 && blockSize !== 51) - throw new Error("Invalid shadow size: ".concat(blockSize)); - if (version_2 !== 0 && version_2 !== 2) - throw new Error("Invalid shadow version: ".concat(version_2)); - var size = readFixedPoint32(reader); - readFixedPoint32(reader); // intensity - var angle = readFixedPoint32(reader); - var distance = readFixedPoint32(reader); - var color = readColor(reader); - var blendMode = readBlendMode(reader); - var enabled = !!readUint8(reader); - var useGlobalLight = !!readUint8(reader); - var opacity = readFixedPoint8(reader); - if (blockSize >= 51) - readColor(reader); // native color - var shadowInfo = { - size: { units: 'Pixels', value: size }, - distance: { units: 'Pixels', value: distance }, - angle: angle, - color: color, - blendMode: blendMode, - enabled: enabled, - useGlobalLight: useGlobalLight, - opacity: opacity - }; - if (type === 'dsdw') { - effects.dropShadow = [shadowInfo]; - } - else { - effects.innerShadow = [shadowInfo]; - } - break; - } - case 'oglw': { // outer glow (see See Effects layer, outer glow info) - var blockSize = readUint32(reader); - var version_3 = readUint32(reader); - if (blockSize !== 32 && blockSize !== 42) - throw new Error("Invalid outer glow size: ".concat(blockSize)); - if (version_3 !== 0 && version_3 !== 2) - throw new Error("Invalid outer glow version: ".concat(version_3)); - var size = readFixedPoint32(reader); - readFixedPoint32(reader); // intensity - var color = readColor(reader); - var blendMode = readBlendMode(reader); - var enabled = !!readUint8(reader); - var opacity = readFixedPoint8(reader); - if (blockSize >= 42) - readColor(reader); // native color - effects.outerGlow = { - size: { units: 'Pixels', value: size }, - color: color, - blendMode: blendMode, - enabled: enabled, - opacity: opacity - }; - break; - } - case 'iglw': { // inner glow (see See Effects layer, inner glow info) - var blockSize = readUint32(reader); - var version_4 = readUint32(reader); - if (blockSize !== 32 && blockSize !== 43) - throw new Error("Invalid inner glow size: ".concat(blockSize)); - if (version_4 !== 0 && version_4 !== 2) - throw new Error("Invalid inner glow version: ".concat(version_4)); - var size = readFixedPoint32(reader); - readFixedPoint32(reader); // intensity - var color = readColor(reader); - var blendMode = readBlendMode(reader); - var enabled = !!readUint8(reader); - var opacity = readFixedPoint8(reader); - if (blockSize >= 43) { - readUint8(reader); // inverted - readColor(reader); // native color - } - effects.innerGlow = { - size: { units: 'Pixels', value: size }, - color: color, - blendMode: blendMode, - enabled: enabled, - opacity: opacity - }; - break; - } - case 'bevl': { // bevel (see See Effects layer, bevel info) - var blockSize = readUint32(reader); - var version_5 = readUint32(reader); - if (blockSize !== 58 && blockSize !== 78) - throw new Error("Invalid bevel size: ".concat(blockSize)); - if (version_5 !== 0 && version_5 !== 2) - throw new Error("Invalid bevel version: ".concat(version_5)); - var angle = readFixedPoint32(reader); - var strength = readFixedPoint32(reader); - var size = readFixedPoint32(reader); - var highlightBlendMode = readBlendMode(reader); - var shadowBlendMode = readBlendMode(reader); - var highlightColor = readColor(reader); - var shadowColor = readColor(reader); - var style = bevelStyles[readUint8(reader)] || 'inner bevel'; - var highlightOpacity = readFixedPoint8(reader); - var shadowOpacity = readFixedPoint8(reader); - var enabled = !!readUint8(reader); - var useGlobalLight = !!readUint8(reader); - var direction = readUint8(reader) ? 'down' : 'up'; - if (blockSize >= 78) { - readColor(reader); // real highlight color - readColor(reader); // real shadow color - } - effects.bevel = { - size: { units: 'Pixels', value: size }, - angle: angle, - strength: strength, - highlightBlendMode: highlightBlendMode, - shadowBlendMode: shadowBlendMode, - highlightColor: highlightColor, - shadowColor: shadowColor, - style: style, - highlightOpacity: highlightOpacity, - shadowOpacity: shadowOpacity, - enabled: enabled, - useGlobalLight: useGlobalLight, - direction: direction, - }; - break; - } - case 'sofi': { // solid fill (Photoshop 7.0) (see See Effects layer, solid fill (added in Photoshop 7.0)) - var size = readUint32(reader); - var version_6 = readUint32(reader); - if (size !== 34) - throw new Error("Invalid effects solid fill info size: ".concat(size)); - if (version_6 !== 2) - throw new Error("Invalid effects solid fill info version: ".concat(version_6)); - var blendMode = readBlendMode(reader); - var color = readColor(reader); - var opacity = readFixedPoint8(reader); - var enabled = !!readUint8(reader); - readColor(reader); // native color - effects.solidFill = [{ blendMode: blendMode, color: color, opacity: opacity, enabled: enabled }]; - break; - } - default: - throw new Error("Invalid effect type: '".concat(type, "'")); - } - } - return effects; -} -function writeShadowInfo(writer, shadow) { - var _a; - writeUint32(writer, 51); - writeUint32(writer, 2); - writeFixedPoint32(writer, shadow.size && shadow.size.value || 0); - writeFixedPoint32(writer, 0); // intensity - writeFixedPoint32(writer, shadow.angle || 0); - writeFixedPoint32(writer, shadow.distance && shadow.distance.value || 0); - writeColor(writer, shadow.color); - writeBlendMode(writer, shadow.blendMode); - writeUint8(writer, shadow.enabled ? 1 : 0); - writeUint8(writer, shadow.useGlobalLight ? 1 : 0); - writeFixedPoint8(writer, (_a = shadow.opacity) !== null && _a !== void 0 ? _a : 1); - writeColor(writer, shadow.color); // native color -} -export function writeEffects(writer, effects) { - var _a, _b, _c, _d, _e, _f; - var dropShadow = (_a = effects.dropShadow) === null || _a === void 0 ? void 0 : _a[0]; - var innerShadow = (_b = effects.innerShadow) === null || _b === void 0 ? void 0 : _b[0]; - var outerGlow = effects.outerGlow; - var innerGlow = effects.innerGlow; - var bevel = effects.bevel; - var solidFill = (_c = effects.solidFill) === null || _c === void 0 ? void 0 : _c[0]; - var count = 1; - if (dropShadow) - count++; - if (innerShadow) - count++; - if (outerGlow) - count++; - if (innerGlow) - count++; - if (bevel) - count++; - if (solidFill) - count++; - writeUint16(writer, 0); - writeUint16(writer, count); - writeSignature(writer, '8BIM'); - writeSignature(writer, 'cmnS'); - writeUint32(writer, 7); // size - writeUint32(writer, 0); // version - writeUint8(writer, 1); // visible - writeZeros(writer, 2); - if (dropShadow) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'dsdw'); - writeShadowInfo(writer, dropShadow); - } - if (innerShadow) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'isdw'); - writeShadowInfo(writer, innerShadow); - } - if (outerGlow) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'oglw'); - writeUint32(writer, 42); - writeUint32(writer, 2); - writeFixedPoint32(writer, ((_d = outerGlow.size) === null || _d === void 0 ? void 0 : _d.value) || 0); - writeFixedPoint32(writer, 0); // intensity - writeColor(writer, outerGlow.color); - writeBlendMode(writer, outerGlow.blendMode); - writeUint8(writer, outerGlow.enabled ? 1 : 0); - writeFixedPoint8(writer, outerGlow.opacity || 0); - writeColor(writer, outerGlow.color); - } - if (innerGlow) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'iglw'); - writeUint32(writer, 43); - writeUint32(writer, 2); - writeFixedPoint32(writer, ((_e = innerGlow.size) === null || _e === void 0 ? void 0 : _e.value) || 0); - writeFixedPoint32(writer, 0); // intensity - writeColor(writer, innerGlow.color); - writeBlendMode(writer, innerGlow.blendMode); - writeUint8(writer, innerGlow.enabled ? 1 : 0); - writeFixedPoint8(writer, innerGlow.opacity || 0); - writeUint8(writer, 0); // inverted - writeColor(writer, innerGlow.color); - } - if (bevel) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'bevl'); - writeUint32(writer, 78); - writeUint32(writer, 2); - writeFixedPoint32(writer, bevel.angle || 0); - writeFixedPoint32(writer, bevel.strength || 0); - writeFixedPoint32(writer, ((_f = bevel.size) === null || _f === void 0 ? void 0 : _f.value) || 0); - writeBlendMode(writer, bevel.highlightBlendMode); - writeBlendMode(writer, bevel.shadowBlendMode); - writeColor(writer, bevel.highlightColor); - writeColor(writer, bevel.shadowColor); - var style = bevelStyles.indexOf(bevel.style); - writeUint8(writer, style <= 0 ? 1 : style); - writeFixedPoint8(writer, bevel.highlightOpacity || 0); - writeFixedPoint8(writer, bevel.shadowOpacity || 0); - writeUint8(writer, bevel.enabled ? 1 : 0); - writeUint8(writer, bevel.useGlobalLight ? 1 : 0); - writeUint8(writer, bevel.direction === 'down' ? 1 : 0); - writeColor(writer, bevel.highlightColor); - writeColor(writer, bevel.shadowColor); - } - if (solidFill) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'sofi'); - writeUint32(writer, 34); - writeUint32(writer, 2); - writeBlendMode(writer, solidFill.blendMode); - writeColor(writer, solidFill.color); - writeFixedPoint8(writer, solidFill.opacity || 0); - writeUint8(writer, solidFill.enabled ? 1 : 0); - writeColor(writer, solidFill.color); - } -} -//# sourceMappingURL=effectsHelpers.js.map \ No newline at end of file +import { toBlendMode, fromBlendMode } from './helpers'; +import { checkSignature, readSignature, skipBytes, readUint16, readUint8, readUint32, readFixedPoint32, readColor } from './psdReader'; +import { writeSignature, writeUint16, writeZeros, writeFixedPoint32, writeUint8, writeUint32, writeColor } from './psdWriter'; +var bevelStyles = [ + undefined, 'outer bevel', 'inner bevel', 'emboss', 'pillow emboss', 'stroke emboss' +]; +function readBlendMode(reader) { + checkSignature(reader, '8BIM'); + return toBlendMode[readSignature(reader)] || 'normal'; +} +function writeBlendMode(writer, mode) { + writeSignature(writer, '8BIM'); + writeSignature(writer, fromBlendMode[mode] || 'norm'); +} +function readFixedPoint8(reader) { + return readUint8(reader) / 0xff; +} +function writeFixedPoint8(writer, value) { + writeUint8(writer, Math.round(value * 0xff) | 0); +} +export function readEffects(reader) { + var version = readUint16(reader); + if (version !== 0) + throw new Error("Invalid effects layer version: ".concat(version)); + var effectsCount = readUint16(reader); + var effects = {}; + for (var i = 0; i < effectsCount; i++) { + checkSignature(reader, '8BIM'); + var type = readSignature(reader); + switch (type) { + case 'cmnS': { // common state (see See Effects layer, common state info) + var size = readUint32(reader); + var version_1 = readUint32(reader); + var visible = !!readUint8(reader); + skipBytes(reader, 2); + if (size !== 7 || version_1 !== 0 || !visible) + throw new Error("Invalid effects common state"); + break; + } + case 'dsdw': // drop shadow (see See Effects layer, drop shadow and inner shadow info) + case 'isdw': { // inner shadow (see See Effects layer, drop shadow and inner shadow info) + var blockSize = readUint32(reader); + var version_2 = readUint32(reader); + if (blockSize !== 41 && blockSize !== 51) + throw new Error("Invalid shadow size: ".concat(blockSize)); + if (version_2 !== 0 && version_2 !== 2) + throw new Error("Invalid shadow version: ".concat(version_2)); + var size = readFixedPoint32(reader); + readFixedPoint32(reader); // intensity + var angle = readFixedPoint32(reader); + var distance = readFixedPoint32(reader); + var color = readColor(reader); + var blendMode = readBlendMode(reader); + var enabled = !!readUint8(reader); + var useGlobalLight = !!readUint8(reader); + var opacity = readFixedPoint8(reader); + if (blockSize >= 51) + readColor(reader); // native color + var shadowInfo = { + size: { units: 'Pixels', value: size }, + distance: { units: 'Pixels', value: distance }, + angle: angle, + color: color, + blendMode: blendMode, + enabled: enabled, + useGlobalLight: useGlobalLight, + opacity: opacity + }; + if (type === 'dsdw') { + effects.dropShadow = [shadowInfo]; + } + else { + effects.innerShadow = [shadowInfo]; + } + break; + } + case 'oglw': { // outer glow (see See Effects layer, outer glow info) + var blockSize = readUint32(reader); + var version_3 = readUint32(reader); + if (blockSize !== 32 && blockSize !== 42) + throw new Error("Invalid outer glow size: ".concat(blockSize)); + if (version_3 !== 0 && version_3 !== 2) + throw new Error("Invalid outer glow version: ".concat(version_3)); + var size = readFixedPoint32(reader); + readFixedPoint32(reader); // intensity + var color = readColor(reader); + var blendMode = readBlendMode(reader); + var enabled = !!readUint8(reader); + var opacity = readFixedPoint8(reader); + if (blockSize >= 42) + readColor(reader); // native color + effects.outerGlow = { + size: { units: 'Pixels', value: size }, + color: color, + blendMode: blendMode, + enabled: enabled, + opacity: opacity + }; + break; + } + case 'iglw': { // inner glow (see See Effects layer, inner glow info) + var blockSize = readUint32(reader); + var version_4 = readUint32(reader); + if (blockSize !== 32 && blockSize !== 43) + throw new Error("Invalid inner glow size: ".concat(blockSize)); + if (version_4 !== 0 && version_4 !== 2) + throw new Error("Invalid inner glow version: ".concat(version_4)); + var size = readFixedPoint32(reader); + readFixedPoint32(reader); // intensity + var color = readColor(reader); + var blendMode = readBlendMode(reader); + var enabled = !!readUint8(reader); + var opacity = readFixedPoint8(reader); + if (blockSize >= 43) { + readUint8(reader); // inverted + readColor(reader); // native color + } + effects.innerGlow = { + size: { units: 'Pixels', value: size }, + color: color, + blendMode: blendMode, + enabled: enabled, + opacity: opacity + }; + break; + } + case 'bevl': { // bevel (see See Effects layer, bevel info) + var blockSize = readUint32(reader); + var version_5 = readUint32(reader); + if (blockSize !== 58 && blockSize !== 78) + throw new Error("Invalid bevel size: ".concat(blockSize)); + if (version_5 !== 0 && version_5 !== 2) + throw new Error("Invalid bevel version: ".concat(version_5)); + var angle = readFixedPoint32(reader); + var strength = readFixedPoint32(reader); + var size = readFixedPoint32(reader); + var highlightBlendMode = readBlendMode(reader); + var shadowBlendMode = readBlendMode(reader); + var highlightColor = readColor(reader); + var shadowColor = readColor(reader); + var style = bevelStyles[readUint8(reader)] || 'inner bevel'; + var highlightOpacity = readFixedPoint8(reader); + var shadowOpacity = readFixedPoint8(reader); + var enabled = !!readUint8(reader); + var useGlobalLight = !!readUint8(reader); + var direction = readUint8(reader) ? 'down' : 'up'; + if (blockSize >= 78) { + readColor(reader); // real highlight color + readColor(reader); // real shadow color + } + effects.bevel = { + size: { units: 'Pixels', value: size }, + angle: angle, + strength: strength, + highlightBlendMode: highlightBlendMode, + shadowBlendMode: shadowBlendMode, + highlightColor: highlightColor, + shadowColor: shadowColor, + style: style, + highlightOpacity: highlightOpacity, + shadowOpacity: shadowOpacity, + enabled: enabled, + useGlobalLight: useGlobalLight, + direction: direction, + }; + break; + } + case 'sofi': { // solid fill (Photoshop 7.0) (see See Effects layer, solid fill (added in Photoshop 7.0)) + var size = readUint32(reader); + var version_6 = readUint32(reader); + if (size !== 34) + throw new Error("Invalid effects solid fill info size: ".concat(size)); + if (version_6 !== 2) + throw new Error("Invalid effects solid fill info version: ".concat(version_6)); + var blendMode = readBlendMode(reader); + var color = readColor(reader); + var opacity = readFixedPoint8(reader); + var enabled = !!readUint8(reader); + readColor(reader); // native color + effects.solidFill = [{ blendMode: blendMode, color: color, opacity: opacity, enabled: enabled }]; + break; + } + default: + throw new Error("Invalid effect type: '".concat(type, "'")); + } + } + return effects; +} +function writeShadowInfo(writer, shadow) { + var _a; + writeUint32(writer, 51); + writeUint32(writer, 2); + writeFixedPoint32(writer, shadow.size && shadow.size.value || 0); + writeFixedPoint32(writer, 0); // intensity + writeFixedPoint32(writer, shadow.angle || 0); + writeFixedPoint32(writer, shadow.distance && shadow.distance.value || 0); + writeColor(writer, shadow.color); + writeBlendMode(writer, shadow.blendMode); + writeUint8(writer, shadow.enabled ? 1 : 0); + writeUint8(writer, shadow.useGlobalLight ? 1 : 0); + writeFixedPoint8(writer, (_a = shadow.opacity) !== null && _a !== void 0 ? _a : 1); + writeColor(writer, shadow.color); // native color +} +export function writeEffects(writer, effects) { + var _a, _b, _c, _d, _e, _f; + var dropShadow = (_a = effects.dropShadow) === null || _a === void 0 ? void 0 : _a[0]; + var innerShadow = (_b = effects.innerShadow) === null || _b === void 0 ? void 0 : _b[0]; + var outerGlow = effects.outerGlow; + var innerGlow = effects.innerGlow; + var bevel = effects.bevel; + var solidFill = (_c = effects.solidFill) === null || _c === void 0 ? void 0 : _c[0]; + var count = 1; + if (dropShadow) + count++; + if (innerShadow) + count++; + if (outerGlow) + count++; + if (innerGlow) + count++; + if (bevel) + count++; + if (solidFill) + count++; + writeUint16(writer, 0); + writeUint16(writer, count); + writeSignature(writer, '8BIM'); + writeSignature(writer, 'cmnS'); + writeUint32(writer, 7); // size + writeUint32(writer, 0); // version + writeUint8(writer, 1); // visible + writeZeros(writer, 2); + if (dropShadow) { + writeSignature(writer, '8BIM'); + writeSignature(writer, 'dsdw'); + writeShadowInfo(writer, dropShadow); + } + if (innerShadow) { + writeSignature(writer, '8BIM'); + writeSignature(writer, 'isdw'); + writeShadowInfo(writer, innerShadow); + } + if (outerGlow) { + writeSignature(writer, '8BIM'); + writeSignature(writer, 'oglw'); + writeUint32(writer, 42); + writeUint32(writer, 2); + writeFixedPoint32(writer, ((_d = outerGlow.size) === null || _d === void 0 ? void 0 : _d.value) || 0); + writeFixedPoint32(writer, 0); // intensity + writeColor(writer, outerGlow.color); + writeBlendMode(writer, outerGlow.blendMode); + writeUint8(writer, outerGlow.enabled ? 1 : 0); + writeFixedPoint8(writer, outerGlow.opacity || 0); + writeColor(writer, outerGlow.color); + } + if (innerGlow) { + writeSignature(writer, '8BIM'); + writeSignature(writer, 'iglw'); + writeUint32(writer, 43); + writeUint32(writer, 2); + writeFixedPoint32(writer, ((_e = innerGlow.size) === null || _e === void 0 ? void 0 : _e.value) || 0); + writeFixedPoint32(writer, 0); // intensity + writeColor(writer, innerGlow.color); + writeBlendMode(writer, innerGlow.blendMode); + writeUint8(writer, innerGlow.enabled ? 1 : 0); + writeFixedPoint8(writer, innerGlow.opacity || 0); + writeUint8(writer, 0); // inverted + writeColor(writer, innerGlow.color); + } + if (bevel) { + writeSignature(writer, '8BIM'); + writeSignature(writer, 'bevl'); + writeUint32(writer, 78); + writeUint32(writer, 2); + writeFixedPoint32(writer, bevel.angle || 0); + writeFixedPoint32(writer, bevel.strength || 0); + writeFixedPoint32(writer, ((_f = bevel.size) === null || _f === void 0 ? void 0 : _f.value) || 0); + writeBlendMode(writer, bevel.highlightBlendMode); + writeBlendMode(writer, bevel.shadowBlendMode); + writeColor(writer, bevel.highlightColor); + writeColor(writer, bevel.shadowColor); + var style = bevelStyles.indexOf(bevel.style); + writeUint8(writer, style <= 0 ? 1 : style); + writeFixedPoint8(writer, bevel.highlightOpacity || 0); + writeFixedPoint8(writer, bevel.shadowOpacity || 0); + writeUint8(writer, bevel.enabled ? 1 : 0); + writeUint8(writer, bevel.useGlobalLight ? 1 : 0); + writeUint8(writer, bevel.direction === 'down' ? 1 : 0); + writeColor(writer, bevel.highlightColor); + writeColor(writer, bevel.shadowColor); + } + if (solidFill) { + writeSignature(writer, '8BIM'); + writeSignature(writer, 'sofi'); + writeUint32(writer, 34); + writeUint32(writer, 2); + writeBlendMode(writer, solidFill.blendMode); + writeColor(writer, solidFill.color); + writeFixedPoint8(writer, solidFill.opacity || 0); + writeUint8(writer, solidFill.enabled ? 1 : 0); + writeColor(writer, solidFill.color); + } +} + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVmZmVjdHNIZWxwZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9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sIDIpO1xuXHRcdHdyaXRlQmxlbmRNb2RlKHdyaXRlciwgc29saWRGaWxsLmJsZW5kTW9kZSk7XG5cdFx0d3JpdGVDb2xvcih3cml0ZXIsIHNvbGlkRmlsbC5jb2xvcik7XG5cdFx0d3JpdGVGaXhlZFBvaW50OCh3cml0ZXIsIHNvbGlkRmlsbC5vcGFjaXR5IHx8IDApO1xuXHRcdHdyaXRlVWludDgod3JpdGVyLCBzb2xpZEZpbGwuZW5hYmxlZCA/IDEgOiAwKTtcblx0XHR3cml0ZUNvbG9yKHdyaXRlciwgc29saWRGaWxsLmNvbG9yKTtcblx0fVxufVxuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/effectsHelpers.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/effectsHelpers.js.map deleted file mode 100644 index 82f7ea6..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/effectsHelpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"effectsHelpers.js","sourceRoot":"../src/","sources":["effectsHelpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EACK,cAAc,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAC1E,UAAU,EAAE,gBAAgB,EAAE,SAAS,EACvC,MAAM,aAAa,CAAC;AACrB,OAAO,EACK,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,iBAAiB,EACrE,UAAU,EAAE,WAAW,EAAE,UAAU,EACnC,MAAM,aAAa,CAAC;AAErB,IAAM,WAAW,GAAiB;IACjC,SAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,eAAe;CAC1F,CAAC;AAEF,SAAS,aAAa,CAAC,MAAiB;IACvC,cAAc,CAAC,MAA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E,CAAC,CAAC,CAAC;QACvB,cAAc,CAAC,MAAM,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC5C,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;QACpC,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;QACjD,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9C,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;KACpC;AACF,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/engineData.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/engineData.d.ts index fd34fe8..6fc156e 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/engineData.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/engineData.d.ts @@ -1,2 +1,2 @@ -export declare function parseEngineData(data: number[] | Uint8Array): any; -export declare function serializeEngineData(data: any, condensed?: boolean): Uint8Array; +export declare function parseEngineData(data: number[] | Uint8Array): any; +export declare function serializeEngineData(data: any, condensed?: boolean): Uint8Array; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/engineData.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/engineData.js index 209381a..81ba0dd 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/engineData.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/engineData.js @@ -1,332 +1,333 @@ -function isWhitespace(char) { - // ' ', '\n', '\r', '\t' - return char === 32 || char === 10 || char === 13 || char === 9; -} -function isNumber(char) { - // 0123456789.- - return (char >= 48 && char <= 57) || char === 46 || char === 45; -} -export function parseEngineData(data) { - var index = 0; - function skipWhitespace() { - while (index < data.length && isWhitespace(data[index])) { - index++; - } - } - function getTextByte() { - var byte = data[index]; - index++; - if (byte === 92) { // \ - byte = data[index]; - index++; - } - return byte; - } - function getText() { - var result = ''; - if (data[index] === 41) { // ) - index++; - return result; - } - // Strings start with utf-16 BOM - if (data[index] !== 0xFE || data[index + 1] !== 0xFF) { - throw new Error('Invalid utf-16 BOM'); - } - index += 2; - // ), ( and \ characters are escaped in ascii manner, remove the escapes before interpreting - // the bytes as utf-16 - while (index < data.length && data[index] !== 41) { // ) - var high = getTextByte(); - var low = getTextByte(); - var char = (high << 8) | low; - result += String.fromCharCode(char); - } - index++; - return result; - } - var root = null; - var stack = []; - function pushContainer(value) { - if (!stack.length) { - stack.push(value); - root = value; - } - else { - pushValue(value); - stack.push(value); - } - } - function pushValue(value) { - if (!stack.length) - throw new Error('Invalid data'); - var top = stack[stack.length - 1]; - if (typeof top === 'string') { - stack[stack.length - 2][top] = value; - pop(); - } - else if (Array.isArray(top)) { - top.push(value); - } - else { - throw new Error('Invalid data'); - } - } - function pushProperty(name) { - if (!stack.length) - pushContainer({}); - var top = stack[stack.length - 1]; - if (top && typeof top === 'string') { - if (name === 'nil') { - pushValue(null); - } - else { - pushValue("/".concat(name)); - } - } - else if (top && typeof top === 'object') { - stack.push(name); - } - else { - throw new Error('Invalid data'); - } - } - function pop() { - if (!stack.length) - throw new Error('Invalid data'); - stack.pop(); - } - skipWhitespace(); - while (index < data.length) { - var i = index; - var char = data[i]; - if (char === 60 && data[i + 1] === 60) { // << - index += 2; - pushContainer({}); - } - else if (char === 62 && data[i + 1] === 62) { // >> - index += 2; - pop(); - } - else if (char === 47) { // / - index += 1; - var start = index; - while (index < data.length && !isWhitespace(data[index])) { - index++; - } - var name_1 = ''; - for (var i_1 = start; i_1 < index; i_1++) { - name_1 += String.fromCharCode(data[i_1]); - } - pushProperty(name_1); - } - else if (char === 40) { // ( - index += 1; - pushValue(getText()); - } - else if (char === 91) { // [ - index += 1; - pushContainer([]); - } - else if (char === 93) { // ] - index += 1; - pop(); - } - else if (char === 110 && data[i + 1] === 117 && data[i + 2] === 108 && data[i + 3] === 108) { // null - index += 4; - pushValue(null); - } - else if (char === 116 && data[i + 1] === 114 && data[i + 2] === 117 && data[i + 3] === 101) { // true - index += 4; - pushValue(true); - } - else if (char === 102 && data[i + 1] === 97 && data[i + 2] === 108 && data[i + 3] === 115 && data[i + 4] === 101) { // false - index += 5; - pushValue(false); - } - else if (isNumber(char)) { - var value = ''; - while (index < data.length && isNumber(data[index])) { - value += String.fromCharCode(data[index]); - index++; - } - pushValue(parseFloat(value)); - } - else { - index += 1; - console.log("Invalid token ".concat(String.fromCharCode(char), " at ").concat(index)); - // ` near ${String.fromCharCode.apply(null, data.slice(index - 10, index + 20) as any)}` + - // `data [${Array.from(data.slice(index - 10, index + 20)).join(', ')}]` - } - skipWhitespace(); - } - return root; -} -var floatKeys = [ - 'Axis', 'XY', 'Zone', 'WordSpacing', 'FirstLineIndent', 'GlyphSpacing', 'StartIndent', 'EndIndent', 'SpaceBefore', - 'SpaceAfter', 'LetterSpacing', 'Values', 'GridSize', 'GridLeading', 'PointBase', 'BoxBounds', 'TransformPoint0', 'TransformPoint1', - 'TransformPoint2', 'FontSize', 'Leading', 'HorizontalScale', 'VerticalScale', 'BaselineShift', 'Tsume', - 'OutlineWidth', 'AutoLeading', -]; -var intArrays = ['RunLengthArray']; -// TODO: handle /nil -export function serializeEngineData(data, condensed) { - if (condensed === void 0) { condensed = false; } - var buffer = new Uint8Array(1024); - var offset = 0; - var indent = 0; - function write(value) { - if (offset >= buffer.length) { - var newBuffer = new Uint8Array(buffer.length * 2); - newBuffer.set(buffer); - buffer = newBuffer; - } - buffer[offset] = value; - offset++; - } - function writeString(value) { - for (var i = 0; i < value.length; i++) { - write(value.charCodeAt(i)); - } - } - function writeIndent() { - if (condensed) { - writeString(' '); - } - else { - for (var i = 0; i < indent; i++) { - writeString('\t'); - } - } - } - function writeProperty(key, value) { - writeIndent(); - writeString("/".concat(key)); - writeValue(value, key, true); - if (!condensed) - writeString('\n'); - } - function serializeInt(value) { - return value.toString(); - } - function serializeFloat(value) { - return value.toFixed(5) - .replace(/(\d)0+$/g, '$1') - .replace(/^0+\.([1-9])/g, '.$1') - .replace(/^-0+\.0(\d)/g, '-.0$1'); - } - function serializeNumber(value, key) { - var isFloat = (key && floatKeys.indexOf(key) !== -1) || (value | 0) !== value; - return isFloat ? serializeFloat(value) : serializeInt(value); - } - function getKeys(value) { - var keys = Object.keys(value); - if (keys.indexOf('98') !== -1) - keys.unshift.apply(keys, keys.splice(keys.indexOf('99'), 1)); - if (keys.indexOf('99') !== -1) - keys.unshift.apply(keys, keys.splice(keys.indexOf('99'), 1)); - return keys; - } - function writeStringByte(value) { - if (value === 40 || value === 41 || value === 92) { // ( ) \ - write(92); // \ - } - write(value); - } - function writeValue(value, key, inProperty) { - if (inProperty === void 0) { inProperty = false; } - function writePrefix() { - if (inProperty) { - writeString(' '); - } - else { - writeIndent(); - } - } - if (value === null) { - writePrefix(); - writeString(condensed ? '/nil' : 'null'); - } - else if (typeof value === 'number') { - writePrefix(); - writeString(serializeNumber(value, key)); - } - else if (typeof value === 'boolean') { - writePrefix(); - writeString(value ? 'true' : 'false'); - } - else if (typeof value === 'string') { - writePrefix(); - if ((key === '99' || key === '98') && value.charAt(0) === '/') { - writeString(value); - } - else { - writeString('('); - write(0xfe); - write(0xff); - for (var i = 0; i < value.length; i++) { - var code = value.charCodeAt(i); - writeStringByte((code >> 8) & 0xff); - writeStringByte(code & 0xff); - } - writeString(')'); - } - } - else if (Array.isArray(value)) { - writePrefix(); - if (value.every(function (x) { return typeof x === 'number'; })) { - writeString('['); - var intArray = intArrays.indexOf(key) !== -1; - for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { - var x = value_1[_i]; - writeString(' '); - writeString(intArray ? serializeNumber(x) : serializeFloat(x)); - } - writeString(' ]'); - } - else { - writeString('['); - if (!condensed) - writeString('\n'); - for (var _a = 0, value_2 = value; _a < value_2.length; _a++) { - var x = value_2[_a]; - writeValue(x, key); - if (!condensed) - writeString('\n'); - } - writeIndent(); - writeString(']'); - } - } - else if (typeof value === 'object') { - if (inProperty && !condensed) - writeString('\n'); - writeIndent(); - writeString('<<'); - if (!condensed) - writeString('\n'); - indent++; - for (var _b = 0, _c = getKeys(value); _b < _c.length; _b++) { - var key_1 = _c[_b]; - writeProperty(key_1, value[key_1]); - } - indent--; - writeIndent(); - writeString('>>'); - } - return undefined; - } - if (condensed) { - if (typeof data === 'object') { - for (var _i = 0, _a = getKeys(data); _i < _a.length; _i++) { - var key = _a[_i]; - writeProperty(key, data[key]); - } - } - } - else { - writeString('\n\n'); - writeValue(data); - } - return buffer.slice(0, offset); -} -//# sourceMappingURL=engineData.js.map \ No newline at end of file +function isWhitespace(char) { + // ' ', '\n', '\r', '\t' + return char === 32 || char === 10 || char === 13 || char === 9; +} +function isNumber(char) { + // 0123456789.- + return (char >= 48 && char <= 57) || char === 46 || char === 45; +} +export function parseEngineData(data) { + var index = 0; + function skipWhitespace() { + while (index < data.length && isWhitespace(data[index])) { + index++; + } + } + function getTextByte() { + var byte = data[index]; + index++; + if (byte === 92) { // \ + byte = data[index]; + index++; + } + return byte; + } + function getText() { + var result = ''; + if (data[index] === 41) { // ) + index++; + return result; + } + // Strings start with utf-16 BOM + if (data[index] !== 0xFE || data[index + 1] !== 0xFF) { + throw new Error('Invalid utf-16 BOM'); + } + index += 2; + // ), ( and \ characters are escaped in ascii manner, remove the escapes before interpreting + // the bytes as utf-16 + while (index < data.length && data[index] !== 41) { // ) + var high = getTextByte(); + var low = getTextByte(); + var char = (high << 8) | low; + result += String.fromCharCode(char); + } + index++; + return result; + } + var root = null; + var stack = []; + function pushContainer(value) { + if (!stack.length) { + stack.push(value); + root = value; + } + else { + pushValue(value); + stack.push(value); + } + } + function pushValue(value) { + if (!stack.length) + throw new Error('Invalid data'); + var top = stack[stack.length - 1]; + if (typeof top === 'string') { + stack[stack.length - 2][top] = value; + pop(); + } + else if (Array.isArray(top)) { + top.push(value); + } + else { + throw new Error('Invalid data'); + } + } + function pushProperty(name) { + if (!stack.length) + pushContainer({}); + var top = stack[stack.length - 1]; + if (top && typeof top === 'string') { + if (name === 'nil') { + pushValue(null); + } + else { + pushValue("/".concat(name)); + } + } + else if (top && typeof top === 'object') { + stack.push(name); + } + else { + throw new Error('Invalid data'); + } + } + function pop() { + if (!stack.length) + throw new Error('Invalid data'); + stack.pop(); + } + skipWhitespace(); + while (index < data.length) { + var i = index; + var char = data[i]; + if (char === 60 && data[i + 1] === 60) { // << + index += 2; + pushContainer({}); + } + else if (char === 62 && data[i + 1] === 62) { // >> + index += 2; + pop(); + } + else if (char === 47) { // / + index += 1; + var start = index; + while (index < data.length && !isWhitespace(data[index])) { + index++; + } + var name_1 = ''; + for (var i_1 = start; i_1 < index; i_1++) { + name_1 += String.fromCharCode(data[i_1]); + } + pushProperty(name_1); + } + else if (char === 40) { // ( + index += 1; + pushValue(getText()); + } + else if (char === 91) { // [ + index += 1; + pushContainer([]); + } + else if (char === 93) { // ] + index += 1; + pop(); + } + else if (char === 110 && data[i + 1] === 117 && data[i + 2] === 108 && data[i + 3] === 108) { // null + index += 4; + pushValue(null); + } + else if (char === 116 && data[i + 1] === 114 && data[i + 2] === 117 && data[i + 3] === 101) { // true + index += 4; + pushValue(true); + } + else if (char === 102 && data[i + 1] === 97 && data[i + 2] === 108 && data[i + 3] === 115 && data[i + 4] === 101) { // false + index += 5; + pushValue(false); + } + else if (isNumber(char)) { + var value = ''; + while (index < data.length && isNumber(data[index])) { + value += String.fromCharCode(data[index]); + index++; + } + pushValue(parseFloat(value)); + } + else { + index += 1; + console.log("Invalid token ".concat(String.fromCharCode(char), " at ").concat(index)); + // ` near ${String.fromCharCode.apply(null, data.slice(index - 10, index + 20) as any)}` + + // `data [${Array.from(data.slice(index - 10, index + 20)).join(', ')}]` + } + skipWhitespace(); + } + return root; +} +var floatKeys = [ + 'Axis', 'XY', 'Zone', 'WordSpacing', 'FirstLineIndent', 'GlyphSpacing', 'StartIndent', 'EndIndent', 'SpaceBefore', + 'SpaceAfter', 'LetterSpacing', 'Values', 'GridSize', 'GridLeading', 'PointBase', 'BoxBounds', 'TransformPoint0', 'TransformPoint1', + 'TransformPoint2', 'FontSize', 'Leading', 'HorizontalScale', 'VerticalScale', 'BaselineShift', 'Tsume', + 'OutlineWidth', 'AutoLeading', +]; +var intArrays = ['RunLengthArray']; +// TODO: handle /nil +export function serializeEngineData(data, condensed) { + if (condensed === void 0) { condensed = false; } + var buffer = new Uint8Array(1024); + var offset = 0; + var indent = 0; + function write(value) { + if (offset >= buffer.length) { + var newBuffer = new Uint8Array(buffer.length * 2); + newBuffer.set(buffer); + buffer = newBuffer; + } + buffer[offset] = value; + offset++; + } + function writeString(value) { + for (var i = 0; i < value.length; i++) { + write(value.charCodeAt(i)); + } + } + function writeIndent() { + if (condensed) { + writeString(' '); + } + else { + for (var i = 0; i < indent; i++) { + writeString('\t'); + } + } + } + function writeProperty(key, value) { + writeIndent(); + writeString("/".concat(key)); + writeValue(value, key, true); + if (!condensed) + writeString('\n'); + } + function serializeInt(value) { + return value.toString(); + } + function serializeFloat(value) { + return value.toFixed(5) + .replace(/(\d)0+$/g, '$1') + .replace(/^0+\.([1-9])/g, '.$1') + .replace(/^-0+\.0(\d)/g, '-.0$1'); + } + function serializeNumber(value, key) { + var isFloat = (key && floatKeys.indexOf(key) !== -1) || (value | 0) !== value; + return isFloat ? serializeFloat(value) : serializeInt(value); + } + function getKeys(value) { + var keys = Object.keys(value); + if (keys.indexOf('98') !== -1) + keys.unshift.apply(keys, keys.splice(keys.indexOf('99'), 1)); + if (keys.indexOf('99') !== -1) + keys.unshift.apply(keys, keys.splice(keys.indexOf('99'), 1)); + return keys; + } + function writeStringByte(value) { + if (value === 40 || value === 41 || value === 92) { // ( ) \ + write(92); // \ + } + write(value); + } + function writeValue(value, key, inProperty) { + if (inProperty === void 0) { inProperty = false; } + function writePrefix() { + if (inProperty) { + writeString(' '); + } + else { + writeIndent(); + } + } + if (value === null) { + writePrefix(); + writeString(condensed ? '/nil' : 'null'); + } + else if (typeof value === 'number') { + writePrefix(); + writeString(serializeNumber(value, key)); + } + else if (typeof value === 'boolean') { + writePrefix(); + writeString(value ? 'true' : 'false'); + } + else if (typeof value === 'string') { + writePrefix(); + if ((key === '99' || key === '98') && value.charAt(0) === '/') { + writeString(value); + } + else { + writeString('('); + write(0xfe); + write(0xff); + for (var i = 0; i < value.length; i++) { + var code = value.charCodeAt(i); + writeStringByte((code >> 8) & 0xff); + writeStringByte(code & 0xff); + } + writeString(')'); + } + } + else if (Array.isArray(value)) { + writePrefix(); + if (value.every(function (x) { return typeof x === 'number'; })) { + writeString('['); + var intArray = intArrays.indexOf(key) !== -1; + for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { + var x = value_1[_i]; + writeString(' '); + writeString(intArray ? serializeNumber(x) : serializeFloat(x)); + } + writeString(' ]'); + } + else { + writeString('['); + if (!condensed) + writeString('\n'); + for (var _a = 0, value_2 = value; _a < value_2.length; _a++) { + var x = value_2[_a]; + writeValue(x, key); + if (!condensed) + writeString('\n'); + } + writeIndent(); + writeString(']'); + } + } + else if (typeof value === 'object') { + if (inProperty && !condensed) + writeString('\n'); + writeIndent(); + writeString('<<'); + if (!condensed) + writeString('\n'); + indent++; + for (var _b = 0, _c = getKeys(value); _b < _c.length; _b++) { + var key_1 = _c[_b]; + writeProperty(key_1, value[key_1]); + } + indent--; + writeIndent(); + writeString('>>'); + } + return undefined; + } + if (condensed) { + if (typeof data === 'object') { + for (var _i = 0, _a = getKeys(data); _i < _a.length; _i++) { + var key = _a[_i]; + writeProperty(key, data[key]); + } + } + } + else { + writeString('\n\n'); + writeValue(data); + } + return buffer.slice(0, offset); +} + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVuZ2luZURhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsU0FBUyxZQUFZLENBQUMsSUFBWTtJQUNqQyx3QkFBd0I7SUFDeEIsT0FBTyxJQUFJLEtBQUssR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cdGluZGVudC0tO1xyXG5cdFx0XHR3cml0ZUluZGVudCgpO1xyXG5cdFx0XHR3cml0ZVN0cmluZygnPj4nKTtcclxuXHRcdH1cclxuXHJcblx0XHRyZXR1cm4gdW5kZWZpbmVkO1xyXG5cdH1cclxuXHJcblx0aWYgKGNvbmRlbnNlZCkge1xyXG5cdFx0aWYgKHR5cGVvZiBkYXRhID09PSAnb2JqZWN0Jykge1xyXG5cdFx0XHRmb3IgKGNvbnN0IGtleSBvZiBnZXRLZXlzKGRhdGEpKSB7XHJcblx0XHRcdFx0d3JpdGVQcm9wZXJ0eShrZXksIGRhdGFba2V5XSk7XHJcblx0XHRcdH1cclxuXHRcdH1cclxuXHR9IGVsc2Uge1xyXG5cdFx0d3JpdGVTdHJpbmcoJ1xcblxcbicpO1xyXG5cdFx0d3JpdGVWYWx1ZShkYXRhKTtcclxuXHR9XHJcblxyXG5cdHJldHVybiBidWZmZXIuc2xpY2UoMCwgb2Zmc2V0KTtcclxufVxyXG4iXSwic291cmNlUm9vdCI6IkM6XFxQcm9qZWN0c1xcZ2l0aHViXFxhZy1wc2RcXHNyYyJ9 diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/engineData.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/engineData.js.map deleted file mode 100644 index e00575a..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/engineData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"engineData.js","sourceRoot":"../src/","sources":["engineData.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,CAAC,IAAY;IACjC,wBAAwB;IACxB,OAAO,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC7B,eAAe;IACf,OAAO,CAAC,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC,IAAI,IAAI,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,CAAC;gBACd,WAAW,CAAC,GAAG,CAAC,CAAC;aACjB;SACD;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;YACrC,IAAI,UAAU,IAAI,CAAC,SAAS;gBAAE,WAAW,CAAC,IAAI,CAAC,CAAC;YAEhD,WAAW,EAAE,CAAC;YACd,WAAW,CAAC,IAAI,CAAC,CAAC;YAElB,IAAI,CAAC,SAAS;gBAAE,WAAW,CAAC,IAAI,CAAC,CAAC;YAElC,MAAM,EAAE,CAAC;YAET,KAAkB,UAAc,EAAd,KAAA,OAAO,CAAC,KAAK,CAAC,EAAd,cAAc,EAAd,IAAc,EAAE;gBAA7B,IAAM,KAAG,SAAA;gBACb,aAAa,CAAC,KAAG,EAAE,KAAK,CAAC,KAAG,CAAC,CAAC,CAAC;aAC/B;YAED,MAAM,EAAE,CAAC;YACT,WAAW,EAAE,CAAC;YACd,WAAW,CAAC,IAAI,CAAC,CAAC;SAClB;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,IAAI,SAAS,EAAE;QACd,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC7B,KAAkB,UAAa,EAAb,KAAA,OAAO,CAAC,IAAI,CAAC,EAAb,cAAa,EAAb,IAAa,EAAE;gBAA5B,IAAM,GAAG,SAAA;gBACb,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;aAC9B;SACD;KACD;SAAM;QACN,WAAW,CAAC,MAAM,CAAC,CAAC;QACpB,UAAU,CAAC,IAAI,CAAC,CAAC;KACjB;IAED,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAChC,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/helpers.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/helpers.d.ts index 24c84a8..534c338 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/helpers.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/helpers.d.ts @@ -1,93 +1,93 @@ -import { Layer, BlendMode, LayerColor } from './psd'; -export declare const MOCK_HANDLERS = false; -export declare const RAW_IMAGE_DATA = false; -export declare const fromBlendMode: { - [key: string]: string; -}; -export declare const toBlendMode: { - [key: string]: BlendMode; -}; -export declare const layerColors: LayerColor[]; -export declare const largeAdditionalInfoKeys: string[]; -export interface Dict { - [key: string]: string; -} -export declare function revMap(map: Dict): Dict; -export declare function createEnum(prefix: string, def: string, map: Dict): { - decode: (val: string) => T; - encode: (val: T | undefined) => string; -}; -export declare const enum ColorSpace { - RGB = 0, - HSB = 1, - CMYK = 2, - Lab = 7, - Grayscale = 8 -} -export declare const enum LayerMaskFlags { - PositionRelativeToLayer = 1, - LayerMaskDisabled = 2, - InvertLayerMaskWhenBlending = 4, - LayerMaskFromRenderingOtherData = 8, - MaskHasParametersAppliedToIt = 16 -} -export declare const enum MaskParams { - UserMaskDensity = 1, - UserMaskFeather = 2, - VectorMaskDensity = 4, - VectorMaskFeather = 8 -} -export declare const enum ChannelID { - Color0 = 0, - Color1 = 1, - Color2 = 2, - Color3 = 3, - Transparency = -1, - UserMask = -2, - RealUserMask = -3 -} -export declare const enum Compression { - RawData = 0, - RleCompressed = 1, - ZipWithoutPrediction = 2, - ZipWithPrediction = 3 -} -export interface ChannelData { - channelId: ChannelID; - compression: Compression; - buffer: Uint8Array | undefined; - length: number; -} -export interface Bounds { - top: number; - left: number; - right: number; - bottom: number; -} -export interface LayerChannelData { - layer: Layer; - channels: ChannelData[]; - top: number; - left: number; - right: number; - bottom: number; - mask?: Bounds; -} -export type PixelArray = Uint8ClampedArray | Uint8Array; -export interface PixelData { - data: PixelArray; - width: number; - height: number; -} -export declare function offsetForChannel(channelId: ChannelID, cmyk: boolean): number; -export declare function clamp(value: number, min: number, max: number): number; -export declare function hasAlpha(data: PixelData): boolean; -export declare function resetImageData({ data }: PixelData): void; -export declare function decodeBitmap(input: PixelArray, output: PixelArray, width: number, height: number): void; -export declare function writeDataRaw(data: PixelData, offset: number, width: number, height: number): Uint8Array | undefined; -export declare function writeDataRLE(buffer: Uint8Array, { data, width, height }: PixelData, offsets: number[], large: boolean): Uint8Array | undefined; -export declare function writeDataZipWithoutPrediction({ data, width, height }: PixelData, offsets: number[]): Uint8Array; -export declare let createCanvas: (width: number, height: number) => HTMLCanvasElement; -export declare let createCanvasFromData: (data: Uint8Array) => HTMLCanvasElement; -export declare let createImageData: (width: number, height: number) => ImageData; -export declare function initializeCanvas(createCanvasMethod: (width: number, height: number) => HTMLCanvasElement, createCanvasFromDataMethod?: (data: Uint8Array) => HTMLCanvasElement, createImageDataMethod?: (width: number, height: number) => ImageData): void; +import { Layer, BlendMode, LayerColor } from './psd'; +export declare const MOCK_HANDLERS = false; +export declare const RAW_IMAGE_DATA = false; +export declare const fromBlendMode: { + [key: string]: string; +}; +export declare const toBlendMode: { + [key: string]: BlendMode; +}; +export declare const layerColors: LayerColor[]; +export declare const largeAdditionalInfoKeys: string[]; +export interface Dict { + [key: string]: string; +} +export declare function revMap(map: Dict): Dict; +export declare function createEnum(prefix: string, def: string, map: Dict): { + decode: (val: string) => T; + encode: (val: T | undefined) => string; +}; +export declare const enum ColorSpace { + RGB = 0, + HSB = 1, + CMYK = 2, + Lab = 7, + Grayscale = 8 +} +export declare const enum LayerMaskFlags { + PositionRelativeToLayer = 1, + LayerMaskDisabled = 2, + InvertLayerMaskWhenBlending = 4, + LayerMaskFromRenderingOtherData = 8, + MaskHasParametersAppliedToIt = 16 +} +export declare const enum MaskParams { + UserMaskDensity = 1, + UserMaskFeather = 2, + VectorMaskDensity = 4, + VectorMaskFeather = 8 +} +export declare const enum ChannelID { + Color0 = 0, + Color1 = 1, + Color2 = 2, + Color3 = 3, + Transparency = -1, + UserMask = -2, + RealUserMask = -3 +} +export declare const enum Compression { + RawData = 0, + RleCompressed = 1, + ZipWithoutPrediction = 2, + ZipWithPrediction = 3 +} +export interface ChannelData { + channelId: ChannelID; + compression: Compression; + buffer: Uint8Array | undefined; + length: number; +} +export interface Bounds { + top: number; + left: number; + right: number; + bottom: number; +} +export interface LayerChannelData { + layer: Layer; + channels: ChannelData[]; + top: number; + left: number; + right: number; + bottom: number; + mask?: Bounds; +} +export declare type PixelArray = Uint8ClampedArray | Uint8Array; +export interface PixelData { + data: PixelArray; + width: number; + height: number; +} +export declare function offsetForChannel(channelId: ChannelID, cmyk: boolean): number; +export declare function clamp(value: number, min: number, max: number): number; +export declare function hasAlpha(data: PixelData): boolean; +export declare function resetImageData({ data }: PixelData): void; +export declare function decodeBitmap(input: PixelArray, output: PixelArray, width: number, height: number): void; +export declare function writeDataRaw(data: PixelData, offset: number, width: number, height: number): Uint8Array | undefined; +export declare function writeDataRLE(buffer: Uint8Array, { data, width, height }: PixelData, offsets: number[], large: boolean): Uint8Array | undefined; +export declare function writeDataZipWithoutPrediction({ data, width, height }: PixelData, offsets: number[]): Uint8Array; +export declare let createCanvas: (width: number, height: number) => HTMLCanvasElement; +export declare let createCanvasFromData: (data: Uint8Array) => HTMLCanvasElement; +export declare let createImageData: (width: number, height: number) => ImageData; +export declare function initializeCanvas(createCanvasMethod: (width: number, height: number) => HTMLCanvasElement, createCanvasFromDataMethod?: (data: Uint8Array) => HTMLCanvasElement, createImageDataMethod?: (width: number, height: number) => ImageData): void; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/helpers.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/helpers.js index 28630d1..14a41dd 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/helpers.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/helpers.js @@ -1,315 +1,316 @@ -import { fromByteArray } from 'base64-js'; -import { deflate } from 'pako'; -export var MOCK_HANDLERS = false; -export var RAW_IMAGE_DATA = false; -export var fromBlendMode = {}; -export var toBlendMode = { - 'pass': 'pass through', - 'norm': 'normal', - 'diss': 'dissolve', - 'dark': 'darken', - 'mul ': 'multiply', - 'idiv': 'color burn', - 'lbrn': 'linear burn', - 'dkCl': 'darker color', - 'lite': 'lighten', - 'scrn': 'screen', - 'div ': 'color dodge', - 'lddg': 'linear dodge', - 'lgCl': 'lighter color', - 'over': 'overlay', - 'sLit': 'soft light', - 'hLit': 'hard light', - 'vLit': 'vivid light', - 'lLit': 'linear light', - 'pLit': 'pin light', - 'hMix': 'hard mix', - 'diff': 'difference', - 'smud': 'exclusion', - 'fsub': 'subtract', - 'fdiv': 'divide', - 'hue ': 'hue', - 'sat ': 'saturation', - 'colr': 'color', - 'lum ': 'luminosity', -}; -Object.keys(toBlendMode).forEach(function (key) { return fromBlendMode[toBlendMode[key]] = key; }); -export var layerColors = [ - 'none', 'red', 'orange', 'yellow', 'green', 'blue', 'violet', 'gray' -]; -export var largeAdditionalInfoKeys = [ - // from documentation - 'LMsk', 'Lr16', 'Lr32', 'Layr', 'Mt16', 'Mt32', 'Mtrn', 'Alph', 'FMsk', 'lnk2', 'FEid', 'FXid', 'PxSD', - // from guessing - 'cinf', -]; -export function revMap(map) { - var result = {}; - Object.keys(map).forEach(function (key) { return result[map[key]] = key; }); - return result; -} -export function createEnum(prefix, def, map) { - var rev = revMap(map); - var decode = function (val) { - var value = val.split('.')[1]; - if (value && !rev[value]) - throw new Error("Unrecognized value for enum: '".concat(val, "'")); - return rev[value] || def; - }; - var encode = function (val) { - if (val && !map[val]) - throw new Error("Invalid value for enum: '".concat(val, "'")); - return "".concat(prefix, ".").concat(map[val] || map[def]); - }; - return { decode: decode, encode: encode }; -} -export var ColorSpace; -(function (ColorSpace) { - ColorSpace[ColorSpace["RGB"] = 0] = "RGB"; - ColorSpace[ColorSpace["HSB"] = 1] = "HSB"; - ColorSpace[ColorSpace["CMYK"] = 2] = "CMYK"; - ColorSpace[ColorSpace["Lab"] = 7] = "Lab"; - ColorSpace[ColorSpace["Grayscale"] = 8] = "Grayscale"; -})(ColorSpace || (ColorSpace = {})); -export var LayerMaskFlags; -(function (LayerMaskFlags) { - LayerMaskFlags[LayerMaskFlags["PositionRelativeToLayer"] = 1] = "PositionRelativeToLayer"; - LayerMaskFlags[LayerMaskFlags["LayerMaskDisabled"] = 2] = "LayerMaskDisabled"; - LayerMaskFlags[LayerMaskFlags["InvertLayerMaskWhenBlending"] = 4] = "InvertLayerMaskWhenBlending"; - LayerMaskFlags[LayerMaskFlags["LayerMaskFromRenderingOtherData"] = 8] = "LayerMaskFromRenderingOtherData"; - LayerMaskFlags[LayerMaskFlags["MaskHasParametersAppliedToIt"] = 16] = "MaskHasParametersAppliedToIt"; -})(LayerMaskFlags || (LayerMaskFlags = {})); -export var MaskParams; -(function (MaskParams) { - MaskParams[MaskParams["UserMaskDensity"] = 1] = "UserMaskDensity"; - MaskParams[MaskParams["UserMaskFeather"] = 2] = "UserMaskFeather"; - MaskParams[MaskParams["VectorMaskDensity"] = 4] = "VectorMaskDensity"; - MaskParams[MaskParams["VectorMaskFeather"] = 8] = "VectorMaskFeather"; -})(MaskParams || (MaskParams = {})); -export var ChannelID; -(function (ChannelID) { - ChannelID[ChannelID["Color0"] = 0] = "Color0"; - ChannelID[ChannelID["Color1"] = 1] = "Color1"; - ChannelID[ChannelID["Color2"] = 2] = "Color2"; - ChannelID[ChannelID["Color3"] = 3] = "Color3"; - ChannelID[ChannelID["Transparency"] = -1] = "Transparency"; - ChannelID[ChannelID["UserMask"] = -2] = "UserMask"; - ChannelID[ChannelID["RealUserMask"] = -3] = "RealUserMask"; -})(ChannelID || (ChannelID = {})); -export var Compression; -(function (Compression) { - Compression[Compression["RawData"] = 0] = "RawData"; - Compression[Compression["RleCompressed"] = 1] = "RleCompressed"; - Compression[Compression["ZipWithoutPrediction"] = 2] = "ZipWithoutPrediction"; - Compression[Compression["ZipWithPrediction"] = 3] = "ZipWithPrediction"; -})(Compression || (Compression = {})); -export function offsetForChannel(channelId, cmyk) { - switch (channelId) { - case 0 /* ChannelID.Color0 */: return 0; - case 1 /* ChannelID.Color1 */: return 1; - case 2 /* ChannelID.Color2 */: return 2; - case 3 /* ChannelID.Color3 */: return cmyk ? 3 : channelId + 1; - case -1 /* ChannelID.Transparency */: return cmyk ? 4 : 3; - default: return channelId + 1; - } -} -export function clamp(value, min, max) { - return value < min ? min : (value > max ? max : value); -} -export function hasAlpha(data) { - var size = data.width * data.height * 4; - for (var i = 3; i < size; i += 4) { - if (data.data[i] !== 255) { - return true; - } - } - return false; -} -export function resetImageData(_a) { - var data = _a.data; - var buffer = new Uint32Array(data.buffer); - var size = buffer.length | 0; - for (var p = 0; p < size; p = (p + 1) | 0) { - buffer[p] = 0xff000000; - } -} -export function decodeBitmap(input, output, width, height) { - for (var y = 0, p = 0, o = 0; y < height; y++) { - for (var x = 0; x < width;) { - var b = input[o++]; - for (var i = 0; i < 8 && x < width; i++, x++) { - var v = b & 0x80 ? 0 : 255; - b = b << 1; - output[p++] = v; - output[p++] = v; - output[p++] = v; - output[p++] = 255; - } - } - } -} -export function writeDataRaw(data, offset, width, height) { - if (!width || !height) - return undefined; - var array = new Uint8Array(width * height); - for (var i = 0; i < array.length; i++) { - array[i] = data.data[i * 4 + offset]; - } - return array; -} -export function writeDataRLE(buffer, _a, offsets, large) { - var data = _a.data, width = _a.width, height = _a.height; - if (!width || !height) - return undefined; - var stride = (4 * width) | 0; - var ol = 0; - var o = (offsets.length * (large ? 4 : 2) * height) | 0; - for (var _i = 0, offsets_1 = offsets; _i < offsets_1.length; _i++) { - var offset = offsets_1[_i]; - for (var y = 0, p = offset | 0; y < height; y++) { - var strideStart = (y * stride) | 0; - var strideEnd = (strideStart + stride) | 0; - var lastIndex = (strideEnd + offset - 4) | 0; - var lastIndex2 = (lastIndex - 4) | 0; - var startOffset = o; - for (p = (strideStart + offset) | 0; p < strideEnd; p = (p + 4) | 0) { - if (p < lastIndex2) { - var value1 = data[p]; - p = (p + 4) | 0; - var value2 = data[p]; - p = (p + 4) | 0; - var value3 = data[p]; - if (value1 === value2 && value1 === value3) { - var count = 3; - while (count < 128 && p < lastIndex && data[(p + 4) | 0] === value1) { - count = (count + 1) | 0; - p = (p + 4) | 0; - } - buffer[o++] = 1 - count; - buffer[o++] = value1; - } - else { - var countIndex = o; - var writeLast = true; - var count = 1; - buffer[o++] = 0; - buffer[o++] = value1; - while (p < lastIndex && count < 128) { - p = (p + 4) | 0; - value1 = value2; - value2 = value3; - value3 = data[p]; - if (value1 === value2 && value1 === value3) { - p = (p - 12) | 0; - writeLast = false; - break; - } - else { - count++; - buffer[o++] = value1; - } - } - if (writeLast) { - if (count < 127) { - buffer[o++] = value2; - buffer[o++] = value3; - count += 2; - } - else if (count < 128) { - buffer[o++] = value2; - count++; - p = (p - 4) | 0; - } - else { - p = (p - 8) | 0; - } - } - buffer[countIndex] = count - 1; - } - } - else if (p === lastIndex) { - buffer[o++] = 0; - buffer[o++] = data[p]; - } - else { // p === lastIndex2 - buffer[o++] = 1; - buffer[o++] = data[p]; - p = (p + 4) | 0; - buffer[o++] = data[p]; - } - } - var length_1 = o - startOffset; - if (large) { - buffer[ol++] = (length_1 >> 24) & 0xff; - buffer[ol++] = (length_1 >> 16) & 0xff; - } - buffer[ol++] = (length_1 >> 8) & 0xff; - buffer[ol++] = length_1 & 0xff; - } - } - return buffer.slice(0, o); -} -export function writeDataZipWithoutPrediction(_a, offsets) { - var data = _a.data, width = _a.width, height = _a.height; - var size = width * height; - var channel = new Uint8Array(size); - var buffers = []; - var totalLength = 0; - for (var _i = 0, offsets_2 = offsets; _i < offsets_2.length; _i++) { - var offset = offsets_2[_i]; - for (var i = 0, o = offset; i < size; i++, o += 4) { - channel[i] = data[o]; - } - var buffer = deflate(channel); - buffers.push(buffer); - totalLength += buffer.byteLength; - } - if (buffers.length > 0) { - var buffer = new Uint8Array(totalLength); - var offset = 0; - for (var _b = 0, buffers_1 = buffers; _b < buffers_1.length; _b++) { - var b = buffers_1[_b]; - buffer.set(b, offset); - offset += b.byteLength; - } - return buffer; - } - else { - return buffers[0]; - } -} -export var createCanvas = function () { - throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvas method'); -}; -export var createCanvasFromData = function () { - throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvasFromData method'); -}; -var tempCanvas = undefined; -export var createImageData = function (width, height) { - if (!tempCanvas) - tempCanvas = createCanvas(1, 1); - return tempCanvas.getContext('2d').createImageData(width, height); -}; -if (typeof document !== 'undefined') { - createCanvas = function (width, height) { - var canvas = document.createElement('canvas'); - canvas.width = width; - canvas.height = height; - return canvas; - }; - createCanvasFromData = function (data) { - var image = new Image(); - image.src = 'data:image/jpeg;base64,' + fromByteArray(data); - var canvas = document.createElement('canvas'); - canvas.width = image.width; - canvas.height = image.height; - canvas.getContext('2d').drawImage(image, 0, 0); - return canvas; - }; -} -export function initializeCanvas(createCanvasMethod, createCanvasFromDataMethod, createImageDataMethod) { - createCanvas = createCanvasMethod; - createCanvasFromData = createCanvasFromDataMethod || createCanvasFromData; - createImageData = createImageDataMethod || createImageData; -} -//# sourceMappingURL=helpers.js.map \ No newline at end of file +import { fromByteArray } from 'base64-js'; +import { deflate } from 'pako'; +export var MOCK_HANDLERS = false; +export var RAW_IMAGE_DATA = false; +export var fromBlendMode = {}; +export var toBlendMode = { + 'pass': 'pass through', + 'norm': 'normal', + 'diss': 'dissolve', + 'dark': 'darken', + 'mul ': 'multiply', + 'idiv': 'color burn', + 'lbrn': 'linear burn', + 'dkCl': 'darker color', + 'lite': 'lighten', + 'scrn': 'screen', + 'div ': 'color dodge', + 'lddg': 'linear dodge', + 'lgCl': 'lighter color', + 'over': 'overlay', + 'sLit': 'soft light', + 'hLit': 'hard light', + 'vLit': 'vivid light', + 'lLit': 'linear light', + 'pLit': 'pin light', + 'hMix': 'hard mix', + 'diff': 'difference', + 'smud': 'exclusion', + 'fsub': 'subtract', + 'fdiv': 'divide', + 'hue ': 'hue', + 'sat ': 'saturation', + 'colr': 'color', + 'lum ': 'luminosity', +}; +Object.keys(toBlendMode).forEach(function (key) { return fromBlendMode[toBlendMode[key]] = key; }); +export var layerColors = [ + 'none', 'red', 'orange', 'yellow', 'green', 'blue', 'violet', 'gray' +]; +export var largeAdditionalInfoKeys = [ + // from documentation + 'LMsk', 'Lr16', 'Lr32', 'Layr', 'Mt16', 'Mt32', 'Mtrn', 'Alph', 'FMsk', 'lnk2', 'FEid', 'FXid', 'PxSD', + // from guessing + 'cinf', +]; +export function revMap(map) { + var result = {}; + Object.keys(map).forEach(function (key) { return result[map[key]] = key; }); + return result; +} +export function createEnum(prefix, def, map) { + var rev = revMap(map); + var decode = function (val) { + var value = val.split('.')[1]; + if (value && !rev[value]) + throw new Error("Unrecognized value for enum: '".concat(val, "'")); + return rev[value] || def; + }; + var encode = function (val) { + if (val && !map[val]) + throw new Error("Invalid value for enum: '".concat(val, "'")); + return "".concat(prefix, ".").concat(map[val] || map[def]); + }; + return { decode: decode, encode: encode }; +} +export var ColorSpace; +(function (ColorSpace) { + ColorSpace[ColorSpace["RGB"] = 0] = "RGB"; + ColorSpace[ColorSpace["HSB"] = 1] = "HSB"; + ColorSpace[ColorSpace["CMYK"] = 2] = "CMYK"; + ColorSpace[ColorSpace["Lab"] = 7] = "Lab"; + ColorSpace[ColorSpace["Grayscale"] = 8] = "Grayscale"; +})(ColorSpace || (ColorSpace = {})); +export var LayerMaskFlags; +(function (LayerMaskFlags) { + LayerMaskFlags[LayerMaskFlags["PositionRelativeToLayer"] = 1] = "PositionRelativeToLayer"; + LayerMaskFlags[LayerMaskFlags["LayerMaskDisabled"] = 2] = "LayerMaskDisabled"; + LayerMaskFlags[LayerMaskFlags["InvertLayerMaskWhenBlending"] = 4] = "InvertLayerMaskWhenBlending"; + LayerMaskFlags[LayerMaskFlags["LayerMaskFromRenderingOtherData"] = 8] = "LayerMaskFromRenderingOtherData"; + LayerMaskFlags[LayerMaskFlags["MaskHasParametersAppliedToIt"] = 16] = "MaskHasParametersAppliedToIt"; +})(LayerMaskFlags || (LayerMaskFlags = {})); +export var MaskParams; +(function (MaskParams) { + MaskParams[MaskParams["UserMaskDensity"] = 1] = "UserMaskDensity"; + MaskParams[MaskParams["UserMaskFeather"] = 2] = "UserMaskFeather"; + MaskParams[MaskParams["VectorMaskDensity"] = 4] = "VectorMaskDensity"; + MaskParams[MaskParams["VectorMaskFeather"] = 8] = "VectorMaskFeather"; +})(MaskParams || (MaskParams = {})); +export var ChannelID; +(function (ChannelID) { + ChannelID[ChannelID["Color0"] = 0] = "Color0"; + ChannelID[ChannelID["Color1"] = 1] = "Color1"; + ChannelID[ChannelID["Color2"] = 2] = "Color2"; + ChannelID[ChannelID["Color3"] = 3] = "Color3"; + ChannelID[ChannelID["Transparency"] = -1] = "Transparency"; + ChannelID[ChannelID["UserMask"] = -2] = "UserMask"; + ChannelID[ChannelID["RealUserMask"] = -3] = "RealUserMask"; +})(ChannelID || (ChannelID = {})); +export var Compression; +(function (Compression) { + Compression[Compression["RawData"] = 0] = "RawData"; + Compression[Compression["RleCompressed"] = 1] = "RleCompressed"; + Compression[Compression["ZipWithoutPrediction"] = 2] = "ZipWithoutPrediction"; + Compression[Compression["ZipWithPrediction"] = 3] = "ZipWithPrediction"; +})(Compression || (Compression = {})); +export function offsetForChannel(channelId, cmyk) { + switch (channelId) { + case 0 /* ChannelID.Color0 */: return 0; + case 1 /* ChannelID.Color1 */: return 1; + case 2 /* ChannelID.Color2 */: return 2; + case 3 /* ChannelID.Color3 */: return cmyk ? 3 : channelId + 1; + case -1 /* ChannelID.Transparency */: return cmyk ? 4 : 3; + default: return channelId + 1; + } +} +export function clamp(value, min, max) { + return value < min ? min : (value > max ? max : value); +} +export function hasAlpha(data) { + var size = data.width * data.height * 4; + for (var i = 3; i < size; i += 4) { + if (data.data[i] !== 255) { + return true; + } + } + return false; +} +export function resetImageData(_a) { + var data = _a.data; + var buffer = new Uint32Array(data.buffer); + var size = buffer.length | 0; + for (var p = 0; p < size; p = (p + 1) | 0) { + buffer[p] = 0xff000000; + } +} +export function decodeBitmap(input, output, width, height) { + for (var y = 0, p = 0, o = 0; y < height; y++) { + for (var x = 0; x < width;) { + var b = input[o++]; + for (var i = 0; i < 8 && x < width; i++, x++) { + var v = b & 0x80 ? 0 : 255; + b = b << 1; + output[p++] = v; + output[p++] = v; + output[p++] = v; + output[p++] = 255; + } + } + } +} +export function writeDataRaw(data, offset, width, height) { + if (!width || !height) + return undefined; + var array = new Uint8Array(width * height); + for (var i = 0; i < array.length; i++) { + array[i] = data.data[i * 4 + offset]; + } + return array; +} +export function writeDataRLE(buffer, _a, offsets, large) { + var data = _a.data, width = _a.width, height = _a.height; + if (!width || !height) + return undefined; + var stride = (4 * width) | 0; + var ol = 0; + var o = (offsets.length * (large ? 4 : 2) * height) | 0; + for (var _i = 0, offsets_1 = offsets; _i < offsets_1.length; _i++) { + var offset = offsets_1[_i]; + for (var y = 0, p = offset | 0; y < height; y++) { + var strideStart = (y * stride) | 0; + var strideEnd = (strideStart + stride) | 0; + var lastIndex = (strideEnd + offset - 4) | 0; + var lastIndex2 = (lastIndex - 4) | 0; + var startOffset = o; + for (p = (strideStart + offset) | 0; p < strideEnd; p = (p + 4) | 0) { + if (p < lastIndex2) { + var value1 = data[p]; + p = (p + 4) | 0; + var value2 = data[p]; + p = (p + 4) | 0; + var value3 = data[p]; + if (value1 === value2 && value1 === value3) { + var count = 3; + while (count < 128 && p < lastIndex && data[(p + 4) | 0] === value1) { + count = (count + 1) | 0; + p = (p + 4) | 0; + } + buffer[o++] = 1 - count; + buffer[o++] = value1; + } + else { + var countIndex = o; + var writeLast = true; + var count = 1; + buffer[o++] = 0; + buffer[o++] = value1; + while (p < lastIndex && count < 128) { + p = (p + 4) | 0; + value1 = value2; + value2 = value3; + value3 = data[p]; + if (value1 === value2 && value1 === value3) { + p = (p - 12) | 0; + writeLast = false; + break; + } + else { + count++; + buffer[o++] = value1; + } + } + if (writeLast) { + if (count < 127) { + buffer[o++] = value2; + buffer[o++] = value3; + count += 2; + } + else if (count < 128) { + buffer[o++] = value2; + count++; + p = (p - 4) | 0; + } + else { + p = (p - 8) | 0; + } + } + buffer[countIndex] = count - 1; + } + } + else if (p === lastIndex) { + buffer[o++] = 0; + buffer[o++] = data[p]; + } + else { // p === lastIndex2 + buffer[o++] = 1; + buffer[o++] = data[p]; + p = (p + 4) | 0; + buffer[o++] = data[p]; + } + } + var length_1 = o - startOffset; + if (large) { + buffer[ol++] = (length_1 >> 24) & 0xff; + buffer[ol++] = (length_1 >> 16) & 0xff; + } + buffer[ol++] = (length_1 >> 8) & 0xff; + buffer[ol++] = length_1 & 0xff; + } + } + return buffer.slice(0, o); +} +export function writeDataZipWithoutPrediction(_a, offsets) { + var data = _a.data, width = _a.width, height = _a.height; + var size = width * height; + var channel = new Uint8Array(size); + var buffers = []; + var totalLength = 0; + for (var _i = 0, offsets_2 = offsets; _i < offsets_2.length; _i++) { + var offset = offsets_2[_i]; + for (var i = 0, o = offset; i < size; i++, o += 4) { + channel[i] = data[o]; + } + var buffer = deflate(channel); + buffers.push(buffer); + totalLength += buffer.byteLength; + } + if (buffers.length > 0) { + var buffer = new Uint8Array(totalLength); + var offset = 0; + for (var _b = 0, buffers_1 = buffers; _b < buffers_1.length; _b++) { + var b = buffers_1[_b]; + buffer.set(b, offset); + offset += b.byteLength; + } + return buffer; + } + else { + return buffers[0]; + } +} +export var createCanvas = function () { + throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvas method'); +}; +export var createCanvasFromData = function () { + throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvasFromData method'); +}; +var tempCanvas = undefined; +export var createImageData = function (width, height) { + if (!tempCanvas) + tempCanvas = createCanvas(1, 1); + return tempCanvas.getContext('2d').createImageData(width, height); +}; +if (typeof document !== 'undefined') { + createCanvas = function (width, height) { + var canvas = document.createElement('canvas'); + canvas.width = width; + canvas.height = height; + return canvas; + }; + createCanvasFromData = function (data) { + var image = new Image(); + image.src = 'data:image/jpeg;base64,' + fromByteArray(data); + var canvas = document.createElement('canvas'); + canvas.width = image.width; + canvas.height = image.height; + canvas.getContext('2d').drawImage(image, 0, 0); + return canvas; + }; +} +export function initializeCanvas(createCanvasMethod, createCanvasFromDataMethod, createImageDataMethod) { + createCanvas = createCanvasMethod; + createCanvasFromData = createCanvasFromDataMethod || createCanvasFromData; + createImageData = createImageDataMethod || createImageData; +} + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImhlbHBlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLFdBQVcsQ0FBQztBQUMxQyxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBRy9CLE1BQU0sQ0FBQyxJQUFNLGFBQWEsR0FBRyxLQUFLLENBQUM7QUFDbkMsTUFBTSxDQUFDLElBQU0sY0FBYyxHQUFHLEtBQUssQ0FBQztBQUVwQyxNQUFNLENBQUMsSUFBTSxhQUFhLEdBQThCLEVBQUUsQ0FBQztBQUMzRCxNQUFNLENBQUMsSUFBTSxXQUFXLEdBQWlDO0lBQ3hELE1BQU0sRUFBRSxjQUFjO0lBQ3RCLE1BQU0sRUFBRSxRQUFRO0lBQ2hCLE1BQU0sRUFBRSxVQUFVO0lBQ2xCLE1BQU0sRUFBRSxRQUFRO0lBQ2hCLE1BQU0sRUFBRSxVQUFVO0lBQ2xCLE1BQU0sRUFBRSxZQUFZO0lBQ3BCLE1BQU0sRUFBRSxhQUFhO0lBQ3JCLE1BQU0sRUFBRSxjQUFjO0lBQ3RCLE1BQU0sRUFBRSxTQUFTO0lBQ2pCLE1BQU0sRUFBRSxRQUFRO0lBQ2hCLE1BQU0sRUFBRSxhQUFhO0lBQ3JCLE1BQU0sRUFBRSxjQUFjO0lBQ3RCLE1BQU0sRUFBRSxlQUFlO0lBQ3ZCLE1BQU0sRUFBRSxTQUFTO0lBQ2pCLE1BQU0sRUFBRSxZQUFZO0lBQ3BCLE1BQU0sRUFBRSxZQUFZO0lBQ3BCLE1BQU0sRUFBRSxhQUFhO0lBQ3JCLE1BQU0sRUFBRSxjQUFjO0lBQ3RCLE1B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l0aHViXFxhZy1wc2RcXHNyYyJ9 diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/helpers.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/helpers.js.map deleted file mode 100644 index c2c2d92..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"../src/","sources":["helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAG/B,MAAM,CAAC,IAAM,aAAa,GAAG,KAAK,CAAC;AACnC,MAAM,CAAC,IAAM,cAAc,GAAG,KAAK,CAAC;AAEpC,MAAM,CAAC,IAAM,aAAa,GAA8B,EAAE,CAAC;AAC3D,MAAM,CAAC,IAAM,WAAW,GAAiC;IACxD,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,OAAO;IACf,MAAM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ac-v2.4.x/ag-psd/dist-es/imageResources.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/imageResources.d.ts index a8f7108..46ae21a 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/imageResources.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/imageResources.d.ts @@ -1,13 +1,13 @@ -import { ImageResources, ReadOptions } from './psd'; -import { PsdReader } from './psdReader'; -import { PsdWriter } from './psdWriter'; -export interface ResourceHandler { - key: number; - has: (target: ImageResources) => boolean | number; - read: (reader: PsdReader, target: ImageResources, left: () => number, options: ReadOptions) => void; - write: (writer: PsdWriter, target: ImageResources, index: number) => void; -} -export declare const resourceHandlers: ResourceHandler[]; -export declare const resourceHandlersMap: { - [key: number]: ResourceHandler; -}; +import { ImageResources, ReadOptions } from './psd'; +import { PsdReader } from './psdReader'; +import { PsdWriter } from './psdWriter'; +export interface ResourceHandler { + key: number; + has: (target: ImageResources) => boolean; + read: (reader: PsdReader, target: ImageResources, left: () => number, options: ReadOptions) => void; + write: (writer: PsdWriter, target: ImageResources) => void; +} +export declare const resourceHandlers: ResourceHandler[]; +export declare const resourceHandlersMap: { + [key: number]: ResourceHandler; +}; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/imageResources.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/imageResources.js index aeb39eb..174496f 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/imageResources.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/imageResources.js @@ -1,1004 +1,785 @@ -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -import { toByteArray } from 'base64-js'; -import { readPascalString, readUnicodeString, readUint32, readUint16, readUint8, readFloat64, readBytes, skipBytes, readFloat32, readInt16, readFixedPoint32, readSignature, checkSignature, readSection, readColor, readInt32 } from './psdReader'; -import { writePascalString, writeUnicodeString, writeUint32, writeUint8, writeFloat64, writeUint16, writeBytes, writeInt16, writeFloat32, writeFixedPoint32, writeUnicodeStringWithPadding, writeColor, writeSignature, writeSection, writeInt32, } from './psdWriter'; -import { createCanvasFromData, createEnum, MOCK_HANDLERS } from './helpers'; -import { decodeString, encodeString } from './utf8'; -import { ESliceBGColorType, ESliceHorzAlign, ESliceOrigin, ESliceType, ESliceVertAlign, parseTrackList, readVersionAndDescriptor, serializeTrackList, writeVersionAndDescriptor } from './descriptor'; -export var resourceHandlers = []; -export var resourceHandlersMap = {}; -function addHandler(key, has, read, write) { - var handler = { key: key, has: has, read: read, write: write }; - resourceHandlers.push(handler); - resourceHandlersMap[handler.key] = handler; -} -var LOG_MOCK_HANDLERS = false; -var RESOLUTION_UNITS = [undefined, 'PPI', 'PPCM']; -var MEASUREMENT_UNITS = [undefined, 'Inches', 'Centimeters', 'Points', 'Picas', 'Columns']; -var hex = '0123456789abcdef'; -function charToNibble(code) { - return code <= 57 ? code - 48 : code - 87; -} -function byteAt(value, index) { - return (charToNibble(value.charCodeAt(index)) << 4) | charToNibble(value.charCodeAt(index + 1)); -} -function readUtf8String(reader, length) { - var buffer = readBytes(reader, length); - return decodeString(buffer); -} -function writeUtf8String(writer, value) { - var buffer = encodeString(value); - writeBytes(writer, buffer); -} -MOCK_HANDLERS && addHandler(1028, // IPTC-NAA record -function (// IPTC-NAA record -target) { return target._ir1028 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1028', left()); - target._ir1028 = readBytes(reader, left()); -}, function (writer, target) { - writeBytes(writer, target._ir1028); -}); -addHandler(1061, function (target) { return target.captionDigest !== undefined; }, function (reader, target) { - var captionDigest = ''; - for (var i = 0; i < 16; i++) { - var byte = readUint8(reader); - captionDigest += hex[byte >> 4]; - captionDigest += hex[byte & 0xf]; - } - target.captionDigest = captionDigest; -}, function (writer, target) { - for (var i = 0; i < 16; i++) { - writeUint8(writer, byteAt(target.captionDigest, i * 2)); - } -}); -addHandler(1060, function (target) { return target.xmpMetadata !== undefined; }, function (reader, target, left) { return target.xmpMetadata = readUtf8String(reader, left()); }, function (writer, target) { return writeUtf8String(writer, target.xmpMetadata); }); -var Inte = createEnum('Inte', 'perceptual', { - 'perceptual': 'Img ', - 'saturation': 'Grp ', - 'relative colorimetric': 'Clrm', - 'absolute colorimetric': 'AClr', -}); -addHandler(1082, function (target) { return target.printInformation !== undefined; }, function (reader, target) { - var _a, _b; - var desc = readVersionAndDescriptor(reader); - target.printInformation = { - printerName: desc.printerName || '', - renderingIntent: Inte.decode((_a = desc.Inte) !== null && _a !== void 0 ? _a : 'Inte.Img '), - }; - var info = target.printInformation; - if (desc.PstS !== undefined) - info.printerManagesColors = desc.PstS; - if (desc['Nm '] !== undefined) - info.printerProfile = desc['Nm ']; - if (desc.MpBl !== undefined) - info.blackPointCompensation = desc.MpBl; - if (desc.printSixteenBit !== undefined) - info.printSixteenBit = desc.printSixteenBit; - if (desc.hardProof !== undefined) - info.hardProof = desc.hardProof; - if (desc.printProofSetup) { - if ('Bltn' in desc.printProofSetup) { - info.proofSetup = { builtin: desc.printProofSetup.Bltn.split('.')[1] }; - } - else { - info.proofSetup = { - profile: desc.printProofSetup.profile, - renderingIntent: Inte.decode((_b = desc.printProofSetup.Inte) !== null && _b !== void 0 ? _b : 'Inte.Img '), - blackPointCompensation: !!desc.printProofSetup.MpBl, - paperWhite: !!desc.printProofSetup.paperWhite, - }; - } - } -}, function (writer, target) { - var _a, _b; - var info = target.printInformation; - var desc = {}; - if (info.printerManagesColors) { - desc.PstS = true; - } - else { - if (info.hardProof !== undefined) - desc.hardProof = !!info.hardProof; - desc.ClrS = 'ClrS.RGBC'; // TODO: ??? - desc['Nm '] = (_a = info.printerProfile) !== null && _a !== void 0 ? _a : 'CIE RGB'; - } - desc.Inte = Inte.encode(info.renderingIntent); - if (!info.printerManagesColors) - desc.MpBl = !!info.blackPointCompensation; - desc.printSixteenBit = !!info.printSixteenBit; - desc.printerName = info.printerName || ''; - if (info.proofSetup && 'profile' in info.proofSetup) { - desc.printProofSetup = { - profile: info.proofSetup.profile || '', - Inte: Inte.encode(info.proofSetup.renderingIntent), - MpBl: !!info.proofSetup.blackPointCompensation, - paperWhite: !!info.proofSetup.paperWhite, - }; - } - else { - desc.printProofSetup = { - Bltn: ((_b = info.proofSetup) === null || _b === void 0 ? void 0 : _b.builtin) ? "builtinProof.".concat(info.proofSetup.builtin) : 'builtinProof.proofCMYK', - }; - } - writeVersionAndDescriptor(writer, '', 'printOutput', desc); -}); -MOCK_HANDLERS && addHandler(1083, // Print style -function (// Print style -target) { return target._ir1083 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1083', left()); - target._ir1083 = readBytes(reader, left()); - // TODO: - // const desc = readVersionAndDescriptor(reader); - // console.log('1083', require('util').inspect(desc, false, 99, true)); -}, function (writer, target) { - writeBytes(writer, target._ir1083); -}); -addHandler(1005, function (target) { return target.resolutionInfo !== undefined; }, function (reader, target) { - var horizontalResolution = readFixedPoint32(reader); - var horizontalResolutionUnit = readUint16(reader); - var widthUnit = readUint16(reader); - var verticalResolution = readFixedPoint32(reader); - var verticalResolutionUnit = readUint16(reader); - var heightUnit = readUint16(reader); - target.resolutionInfo = { - horizontalResolution: horizontalResolution, - horizontalResolutionUnit: RESOLUTION_UNITS[horizontalResolutionUnit] || 'PPI', - widthUnit: MEASUREMENT_UNITS[widthUnit] || 'Inches', - verticalResolution: verticalResolution, - verticalResolutionUnit: RESOLUTION_UNITS[verticalResolutionUnit] || 'PPI', - heightUnit: MEASUREMENT_UNITS[heightUnit] || 'Inches', - }; -}, function (writer, target) { - var info = target.resolutionInfo; - writeFixedPoint32(writer, info.horizontalResolution || 0); - writeUint16(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.horizontalResolutionUnit))); - writeUint16(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.widthUnit))); - writeFixedPoint32(writer, info.verticalResolution || 0); - writeUint16(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.verticalResolutionUnit))); - writeUint16(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.heightUnit))); -}); -var printScaleStyles = ['centered', 'size to fit', 'user defined']; -addHandler(1062, function (target) { return target.printScale !== undefined; }, function (reader, target) { - target.printScale = { - style: printScaleStyles[readInt16(reader)], - x: readFloat32(reader), - y: readFloat32(reader), - scale: readFloat32(reader), - }; -}, function (writer, target) { - var _a = target.printScale, style = _a.style, x = _a.x, y = _a.y, scale = _a.scale; - writeInt16(writer, Math.max(0, printScaleStyles.indexOf(style))); - writeFloat32(writer, x || 0); - writeFloat32(writer, y || 0); - writeFloat32(writer, scale || 0); -}); -addHandler(1006, function (target) { return target.alphaChannelNames !== undefined; }, function (reader, target, left) { - target.alphaChannelNames = []; - while (left()) { - var value = readPascalString(reader, 1); - target.alphaChannelNames.push(value); - } -}, function (writer, target) { - for (var _i = 0, _a = target.alphaChannelNames; _i < _a.length; _i++) { - var name_1 = _a[_i]; - writePascalString(writer, name_1, 1); - } -}); -addHandler(1045, function (target) { return target.alphaChannelNames !== undefined; }, function (reader, target, left) { - target.alphaChannelNames = []; - while (left()) { - target.alphaChannelNames.push(readUnicodeString(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.alphaChannelNames; _i < _a.length; _i++) { - var name_2 = _a[_i]; - writeUnicodeStringWithPadding(writer, name_2); - } -}); -MOCK_HANDLERS && addHandler(1077, function (target) { return target._ir1077 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1077', left()); - target._ir1077 = readBytes(reader, left()); -}, function (writer, target) { - writeBytes(writer, target._ir1077); -}); -addHandler(1053, function (target) { return target.alphaIdentifiers !== undefined; }, function (reader, target, left) { - target.alphaIdentifiers = []; - while (left() >= 4) { - target.alphaIdentifiers.push(readUint32(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.alphaIdentifiers; _i < _a.length; _i++) { - var id = _a[_i]; - writeUint32(writer, id); - } -}); -addHandler(1010, function (target) { return target.backgroundColor !== undefined; }, function (reader, target) { return target.backgroundColor = readColor(reader); }, function (writer, target) { return writeColor(writer, target.backgroundColor); }); -addHandler(1037, function (target) { return target.globalAngle !== undefined; }, function (reader, target) { return target.globalAngle = readUint32(reader); }, function (writer, target) { return writeUint32(writer, target.globalAngle); }); -addHandler(1049, function (target) { return target.globalAltitude !== undefined; }, function (reader, target) { return target.globalAltitude = readUint32(reader); }, function (writer, target) { return writeUint32(writer, target.globalAltitude); }); -addHandler(1011, function (target) { return target.printFlags !== undefined; }, function (reader, target) { - target.printFlags = { - labels: !!readUint8(reader), - cropMarks: !!readUint8(reader), - colorBars: !!readUint8(reader), - registrationMarks: !!readUint8(reader), - negative: !!readUint8(reader), - flip: !!readUint8(reader), - interpolate: !!readUint8(reader), - caption: !!readUint8(reader), - printFlags: !!readUint8(reader), - }; -}, function (writer, target) { - var flags = target.printFlags; - writeUint8(writer, flags.labels ? 1 : 0); - writeUint8(writer, flags.cropMarks ? 1 : 0); - writeUint8(writer, flags.colorBars ? 1 : 0); - writeUint8(writer, flags.registrationMarks ? 1 : 0); - writeUint8(writer, flags.negative ? 1 : 0); - writeUint8(writer, flags.flip ? 1 : 0); - writeUint8(writer, flags.interpolate ? 1 : 0); - writeUint8(writer, flags.caption ? 1 : 0); - writeUint8(writer, flags.printFlags ? 1 : 0); -}); -MOCK_HANDLERS && addHandler(10000, // Print flags -function (// Print flags -target) { return target._ir10000 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 10000', left()); - target._ir10000 = readBytes(reader, left()); -}, function (writer, target) { - writeBytes(writer, target._ir10000); -}); -MOCK_HANDLERS && addHandler(1013, // Color halftoning -function (// Color halftoning -target) { return target._ir1013 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1013', left()); - target._ir1013 = readBytes(reader, left()); -}, function (writer, target) { - writeBytes(writer, target._ir1013); -}); -MOCK_HANDLERS && addHandler(1016, // Color transfer functions -function (// Color transfer functions -target) { return target._ir1016 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1016', left()); - target._ir1016 = readBytes(reader, left()); -}, function (writer, target) { - writeBytes(writer, target._ir1016); -}); -addHandler(1080, // Count Information -function (// Count Information -target) { return target.countInformation !== undefined; }, function (reader, target) { - var desc = readVersionAndDescriptor(reader); - target.countInformation = desc.countGroupList.map(function (g) { return ({ - color: { r: g['Rd '], g: g['Grn '], b: g['Bl '] }, - name: g['Nm '], - size: g['Rds '], - fontSize: g.fontSize, - visible: g.Vsbl, - points: g.countObjectList.map(function (p) { return ({ x: p['X '], y: p['Y '] }); }), - }); }); -}, function (writer, target) { - var desc = { - Vrsn: 1, - countGroupList: target.countInformation.map(function (g) { return ({ - 'Rd ': g.color.r, - 'Grn ': g.color.g, - 'Bl ': g.color.b, - 'Nm ': g.name, - 'Rds ': g.size, - fontSize: g.fontSize, - Vsbl: g.visible, - countObjectList: g.points.map(function (p) { return ({ 'X ': p.x, 'Y ': p.y }); }), - }); }), - }; - writeVersionAndDescriptor(writer, '', 'Cnt ', desc); -}); -addHandler(1024, function (target) { return target.layerState !== undefined; }, function (reader, target) { return target.layerState = readUint16(reader); }, function (writer, target) { return writeUint16(writer, target.layerState); }); -addHandler(1026, function (target) { return target.layersGroup !== undefined; }, function (reader, target, left) { - target.layersGroup = []; - while (left()) { - target.layersGroup.push(readUint16(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.layersGroup; _i < _a.length; _i++) { - var g = _a[_i]; - writeUint16(writer, g); - } -}); -addHandler(1072, function (target) { return target.layerGroupsEnabledId !== undefined; }, function (reader, target, left) { - target.layerGroupsEnabledId = []; - while (left()) { - target.layerGroupsEnabledId.push(readUint8(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.layerGroupsEnabledId; _i < _a.length; _i++) { - var id = _a[_i]; - writeUint8(writer, id); - } -}); -addHandler(1069, function (target) { return target.layerSelectionIds !== undefined; }, function (reader, target) { - var count = readUint16(reader); - target.layerSelectionIds = []; - while (count--) { - target.layerSelectionIds.push(readUint32(reader)); - } -}, function (writer, target) { - writeUint16(writer, target.layerSelectionIds.length); - for (var _i = 0, _a = target.layerSelectionIds; _i < _a.length; _i++) { - var id = _a[_i]; - writeUint32(writer, id); - } -}); -addHandler(1032, function (target) { return target.gridAndGuidesInformation !== undefined; }, function (reader, target) { - var version = readUint32(reader); - var horizontal = readUint32(reader); - var vertical = readUint32(reader); - var count = readUint32(reader); - if (version !== 1) - throw new Error("Invalid 1032 resource version: ".concat(version)); - target.gridAndGuidesInformation = { - grid: { horizontal: horizontal, vertical: vertical }, - guides: [], - }; - for (var i = 0; i < count; i++) { - target.gridAndGuidesInformation.guides.push({ - location: readUint32(reader) / 32, - direction: readUint8(reader) ? 'horizontal' : 'vertical' - }); - } -}, function (writer, target) { - var info = target.gridAndGuidesInformation; - var grid = info.grid || { horizontal: 18 * 32, vertical: 18 * 32 }; - var guides = info.guides || []; - writeUint32(writer, 1); - writeUint32(writer, grid.horizontal); - writeUint32(writer, grid.vertical); - writeUint32(writer, guides.length); - for (var _i = 0, guides_1 = guides; _i < guides_1.length; _i++) { - var g = guides_1[_i]; - writeUint32(writer, g.location * 32); - writeUint8(writer, g.direction === 'horizontal' ? 1 : 0); - } -}); -// 0 - normal, 7 - multiply, 8 - screen, 23 - difference -var onionSkinsBlendModes = [ - 'normal', undefined, undefined, undefined, undefined, undefined, undefined, 'multiply', - 'screen', undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, 'difference', -]; -addHandler(1078, // Onion Skins -function (// Onion Skins -target) { return target.onionSkins !== undefined; }, function (reader, target) { - var desc = readVersionAndDescriptor(reader); - // console.log('1078', require('util').inspect(desc, false, 99, true)); - target.onionSkins = { - enabled: desc.enab, - framesBefore: desc.numBefore, - framesAfter: desc.numAfter, - frameSpacing: desc.Spcn, - minOpacity: desc.minOpacity / 100, - maxOpacity: desc.maxOpacity / 100, - blendMode: onionSkinsBlendModes[desc.BlnM] || 'normal', - }; -}, function (writer, target) { - var onionSkins = target.onionSkins; - var desc = { - Vrsn: 1, - enab: onionSkins.enabled, - numBefore: onionSkins.framesBefore, - numAfter: onionSkins.framesAfter, - Spcn: onionSkins.frameSpacing, - minOpacity: (onionSkins.minOpacity * 100) | 0, - maxOpacity: (onionSkins.maxOpacity * 100) | 0, - BlnM: Math.max(0, onionSkinsBlendModes.indexOf(onionSkins.blendMode)), - }; - writeVersionAndDescriptor(writer, '', 'null', desc); -}); -addHandler(1075, // Timeline Information -function (// Timeline Information -target) { return target.timelineInformation !== undefined; }, function (reader, target, _, options) { - var _a, _b; - var desc = readVersionAndDescriptor(reader); - // console.log('1075', require('util').inspect(desc, false, 99, true)); - target.timelineInformation = { - enabled: desc.enab, - frameStep: desc.frameStep, - frameRate: desc.frameRate, - time: desc.time, - duration: desc.duration, - workInTime: desc.workInTime, - workOutTime: desc.workOutTime, - repeats: desc.LCnt, - hasMotion: desc.hasMotion, - globalTracks: parseTrackList(desc.globalTrackList, !!options.logMissingFeatures), - }; - if ((_b = (_a = desc.audioClipGroupList) === null || _a === void 0 ? void 0 : _a.audioClipGroupList) === null || _b === void 0 ? void 0 : _b.length) { - target.timelineInformation.audioClipGroups = desc.audioClipGroupList.audioClipGroupList.map(function (g) { return ({ - id: g.groupID, - muted: g.muted, - audioClips: g.audioClipList.map(function (_a) { - var clipID = _a.clipID, timeScope = _a.timeScope, muted = _a.muted, audioLevel = _a.audioLevel, frameReader = _a.frameReader; - return ({ - id: clipID, - start: timeScope.Strt, - duration: timeScope.duration, - inTime: timeScope.inTime, - outTime: timeScope.outTime, - muted: muted, - audioLevel: audioLevel, - frameReader: { - type: frameReader.frameReaderType, - mediaDescriptor: frameReader.mediaDescriptor, - link: { - name: frameReader['Lnk ']['Nm '], - fullPath: frameReader['Lnk '].fullPath, - relativePath: frameReader['Lnk '].relPath, - }, - }, - }); - }), - }); }); - } -}, function (writer, target) { - var _a; - var timeline = target.timelineInformation; - var desc = { - Vrsn: 1, - enab: timeline.enabled, - frameStep: timeline.frameStep, - frameRate: timeline.frameRate, - time: timeline.time, - duration: timeline.duration, - workInTime: timeline.workInTime, - workOutTime: timeline.workOutTime, - LCnt: timeline.repeats, - globalTrackList: serializeTrackList(timeline.globalTracks), - audioClipGroupList: { - audioClipGroupList: (_a = timeline.audioClipGroups) === null || _a === void 0 ? void 0 : _a.map(function (a) { return ({ - groupID: a.id, - muted: a.muted, - audioClipList: a.audioClips.map(function (c) { return ({ - clipID: c.id, - timeScope: { - Vrsn: 1, - Strt: c.start, - duration: c.duration, - inTime: c.inTime, - outTime: c.outTime, - }, - frameReader: { - frameReaderType: c.frameReader.type, - descVersion: 1, - 'Lnk ': { - descVersion: 1, - 'Nm ': c.frameReader.link.name, - fullPath: c.frameReader.link.fullPath, - relPath: c.frameReader.link.relativePath, - }, - mediaDescriptor: c.frameReader.mediaDescriptor, - }, - muted: c.muted, - audioLevel: c.audioLevel, - }); }), - }); }), - }, - hasMotion: timeline.hasMotion, - }; - // console.log('WRITE:1075', require('util').inspect(desc, false, 99, true)); - writeVersionAndDescriptor(writer, '', 'null', desc, 'anim'); -}); -addHandler(1076, // Sheet Disclosure -function (// Sheet Disclosure -target) { return target.sheetDisclosure !== undefined; }, function (reader, target) { - var desc = readVersionAndDescriptor(reader); - // console.log('1076', require('util').inspect(desc, false, 99, true)); - target.sheetDisclosure = {}; - if (desc.sheetTimelineOptions) { - target.sheetDisclosure.sheetTimelineOptions = desc.sheetTimelineOptions.map(function (o) { return ({ - sheetID: o.sheetID, - sheetDisclosed: o.sheetDisclosed, - lightsDisclosed: o.lightsDisclosed, - meshesDisclosed: o.meshesDisclosed, - materialsDisclosed: o.materialsDisclosed, - }); }); - } -}, function (writer, target) { - var disclosure = target.sheetDisclosure; - var desc = { Vrsn: 1 }; - if (disclosure.sheetTimelineOptions) { - desc.sheetTimelineOptions = disclosure.sheetTimelineOptions.map(function (d) { return ({ - Vrsn: 2, - sheetID: d.sheetID, - sheetDisclosed: d.sheetDisclosed, - lightsDisclosed: d.lightsDisclosed, - meshesDisclosed: d.meshesDisclosed, - materialsDisclosed: d.materialsDisclosed, - }); }); - } - writeVersionAndDescriptor(writer, '', 'null', desc); -}); -addHandler(1054, // URL List -function (// URL List -target) { return target.urlsList !== undefined; }, function (reader, target, _, options) { - var count = readUint32(reader); - target.urlsList = []; - for (var i = 0; i < count; i++) { - var long = readSignature(reader); - if (long !== 'slic' && options.throwForMissingFeatures) - throw new Error('Unknown long'); - var id = readUint32(reader); - var url = readUnicodeString(reader); - target.urlsList.push({ id: id, url: url, ref: 'slice' }); - } -}, function (writer, target) { - var list = target.urlsList; - writeUint32(writer, list.length); - for (var i = 0; i < list.length; i++) { - writeSignature(writer, 'slic'); - writeUint32(writer, list[i].id); - writeUnicodeString(writer, list[i].url); - } -}); -function boundsToBounds(bounds) { - return { 'Top ': bounds.top, Left: bounds.left, Btom: bounds.bottom, Rght: bounds.right }; -} -function boundsFromBounds(bounds) { - return { top: bounds['Top '], left: bounds.Left, bottom: bounds.Btom, right: bounds.Rght }; -} -function clamped(array, index) { - return array[Math.max(0, Math.min(array.length - 1, index))]; -} -var sliceOrigins = ['autoGenerated', 'layer', 'userGenerated']; -var sliceTypes = ['noImage', 'image']; -var sliceAlignments = ['default']; -addHandler(1050, // Slices -function (// Slices -target) { return target.slices ? target.slices.length : 0; }, function (reader, target) { - var version = readUint32(reader); - if (version == 6) { - if (!target.slices) - target.slices = []; - var top_1 = readInt32(reader); - var left = readInt32(reader); - var bottom = readInt32(reader); - var right = readInt32(reader); - var groupName = readUnicodeString(reader); - var count = readUint32(reader); - target.slices.push({ bounds: { top: top_1, left: left, bottom: bottom, right: right }, groupName: groupName, slices: [] }); - var slices_1 = target.slices[target.slices.length - 1].slices; - for (var i = 0; i < count; i++) { - var id = readUint32(reader); - var groupId = readUint32(reader); - var origin_1 = clamped(sliceOrigins, readUint32(reader)); - var associatedLayerId = origin_1 == 'layer' ? readUint32(reader) : 0; - var name_3 = readUnicodeString(reader); - var type = clamped(sliceTypes, readUint32(reader)); - var top_2 = readInt32(reader); - var left_1 = readInt32(reader); - var bottom_1 = readInt32(reader); - var right_1 = readInt32(reader); - var url = readUnicodeString(reader); - var target_1 = readUnicodeString(reader); - var message = readUnicodeString(reader); - var altTag = readUnicodeString(reader); - var cellTextIsHTML = !!readUint8(reader); - var cellText = readUnicodeString(reader); - var horizontalAlignment = clamped(sliceAlignments, readUint32(reader)); - var verticalAlignment = clamped(sliceAlignments, readUint32(reader)); - var a = readUint8(reader); - var r = readUint8(reader); - var g = readUint8(reader); - var b = readUint8(reader); - var backgroundColorType = ((a + r + g + b) === 0) ? 'none' : (a === 0 ? 'matte' : 'color'); - slices_1.push({ - id: id, - groupId: groupId, - origin: origin_1, - associatedLayerId: associatedLayerId, - name: name_3, - target: target_1, - message: message, - altTag: altTag, - cellTextIsHTML: cellTextIsHTML, - cellText: cellText, - horizontalAlignment: horizontalAlignment, - verticalAlignment: verticalAlignment, - type: type, - url: url, - bounds: { top: top_2, left: left_1, bottom: bottom_1, right: right_1 }, - backgroundColorType: backgroundColorType, - backgroundColor: { r: r, g: g, b: b, a: a }, - }); - // console.log(require('util').inspect(slices[slices.length - 1], false, 99, true)); - } - var desc = readVersionAndDescriptor(reader); - desc.slices.forEach(function (d) { - var slice = slices_1.find(function (s) { return d.sliceID == s.id; }); - if (slice) { - slice.topOutset = d.topOutset; - slice.leftOutset = d.leftOutset; - slice.bottomOutset = d.bottomOutset; - slice.rightOutset = d.rightOutset; - } - }); - // console.log(require('util').inspect(desc, false, 99, true)); - // console.log(require('util').inspect(target.slices, false, 99, true)); - } - else if (version == 7 || version == 8) { - var desc = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - if (!target.slices) - target.slices = []; - target.slices.push({ - groupName: desc.baseName, - bounds: boundsFromBounds(desc.bounds), - slices: desc.slices.map(function (s) { return ({ - name: '', - id: s.sliceID, - groupId: s.groupID, - associatedLayerId: 0, - origin: ESliceOrigin.decode(s.origin), - type: ESliceType.decode(s.Type), - bounds: boundsFromBounds(s.bounds), - url: s.url, - target: s.null, - message: s.Msge, - altTag: s.altTag, - cellTextIsHTML: s.cellTextIsHTML, - cellText: s.cellText, - horizontalAlignment: ESliceHorzAlign.decode(s.horzAlign), - verticalAlignment: ESliceVertAlign.decode(s.vertAlign), - backgroundColorType: ESliceBGColorType.decode(s.bgColorType), - backgroundColor: s.bgColor ? { r: s.bgColor['Rd '], g: s.bgColor['Grn '], b: s.bgColor['Bl '], a: s.bgColor.alpha } : { r: 0, g: 0, b: 0, a: 0 }, - topOutset: s.topOutset || 0, - leftOutset: s.leftOutset || 0, - bottomOutset: s.bottomOutset || 0, - rightOutset: s.rightOutset || 0, - }); }), - }); - } - else { - throw new Error("Invalid slices version (".concat(version, ")")); - } -}, function (writer, target, index) { - var _a = target.slices[index], bounds = _a.bounds, groupName = _a.groupName, slices = _a.slices; - writeUint32(writer, 6); // version - writeInt32(writer, bounds.top); - writeInt32(writer, bounds.left); - writeInt32(writer, bounds.bottom); - writeInt32(writer, bounds.right); - writeUnicodeString(writer, groupName); - writeUint32(writer, slices.length); - for (var i = 0; i < slices.length; i++) { - var slice = slices[i]; - var _b = slice.backgroundColor, a = _b.a, r = _b.r, g = _b.g, b = _b.b; - if (slice.backgroundColorType === 'none') { - a = r = g = b = 0; - } - else if (slice.backgroundColorType === 'matte') { - a = 0; - r = g = b = 255; - } - writeUint32(writer, slice.id); - writeUint32(writer, slice.groupId); - writeUint32(writer, sliceOrigins.indexOf(slice.origin)); - if (slice.origin === 'layer') - writeUint32(writer, slice.associatedLayerId); - writeUnicodeString(writer, slice.name); - writeUint32(writer, sliceTypes.indexOf(slice.type)); - writeInt32(writer, slice.bounds.top); - writeInt32(writer, slice.bounds.left); - writeInt32(writer, slice.bounds.bottom); - writeInt32(writer, slice.bounds.right); - writeUnicodeString(writer, slice.url); - writeUnicodeString(writer, slice.target); - writeUnicodeString(writer, slice.message); - writeUnicodeString(writer, slice.altTag); - writeUint8(writer, slice.cellTextIsHTML ? 1 : 0); - writeUnicodeString(writer, slice.cellText); - writeUint32(writer, sliceAlignments.indexOf(slice.horizontalAlignment)); - writeUint32(writer, sliceAlignments.indexOf(slice.verticalAlignment)); - writeUint8(writer, a); - writeUint8(writer, r); - writeUint8(writer, g); - writeUint8(writer, b); - } - var desc = { - bounds: boundsToBounds(bounds), - slices: [], - }; - slices.forEach(function (s) { - var slice = __assign(__assign({ sliceID: s.id, groupID: s.groupId, origin: ESliceOrigin.encode(s.origin), Type: ESliceType.encode(s.type), bounds: boundsToBounds(s.bounds) }, (s.name ? { 'Nm ': s.name } : {})), { url: s.url, null: s.target, Msge: s.message, altTag: s.altTag, cellTextIsHTML: s.cellTextIsHTML, cellText: s.cellText, horzAlign: ESliceHorzAlign.encode(s.horizontalAlignment), vertAlign: ESliceVertAlign.encode(s.verticalAlignment), bgColorType: ESliceBGColorType.encode(s.backgroundColorType) }); - if (s.backgroundColorType === 'color') { - var _a = s.backgroundColor, r = _a.r, g = _a.g, b = _a.b, a = _a.a; - slice.bgColor = { 'Rd ': r, 'Grn ': g, 'Bl ': b, alpha: a }; - } - slice.topOutset = s.topOutset || 0; - slice.leftOutset = s.leftOutset || 0; - slice.bottomOutset = s.bottomOutset || 0; - slice.rightOutset = s.rightOutset || 0; - desc.slices.push(slice); - }); - writeVersionAndDescriptor(writer, '', 'null', desc, 'slices'); -}); -addHandler(1064, function (target) { return target.pixelAspectRatio !== undefined; }, function (reader, target) { - if (readUint32(reader) > 2) - throw new Error('Invalid pixelAspectRatio version'); - target.pixelAspectRatio = { aspect: readFloat64(reader) }; -}, function (writer, target) { - writeUint32(writer, 2); // version - writeFloat64(writer, target.pixelAspectRatio.aspect); -}); -addHandler(1041, function (target) { return target.iccUntaggedProfile !== undefined; }, function (reader, target) { - target.iccUntaggedProfile = !!readUint8(reader); -}, function (writer, target) { - writeUint8(writer, target.iccUntaggedProfile ? 1 : 0); -}); -MOCK_HANDLERS && addHandler(1039, // ICC Profile -function (// ICC Profile -target) { return target._ir1039 !== undefined; }, function (reader, target, left) { - // TODO: this is raw bytes, just return as a byte array - LOG_MOCK_HANDLERS && console.log('image resource 1039', left()); - target._ir1039 = readBytes(reader, left()); -}, function (writer, target) { - writeBytes(writer, target._ir1039); -}); -addHandler(1044, function (target) { return target.idsSeedNumber !== undefined; }, function (reader, target) { return target.idsSeedNumber = readUint32(reader); }, function (writer, target) { return writeUint32(writer, target.idsSeedNumber); }); -addHandler(1036, function (target) { return target.thumbnail !== undefined || target.thumbnailRaw !== undefined; }, function (reader, target, left, options) { - var format = readUint32(reader); // 1 = kJpegRGB, 0 = kRawRGB - var width = readUint32(reader); - var height = readUint32(reader); - readUint32(reader); // widthBytes = (width * bits_per_pixel + 31) / 32 * 4. - readUint32(reader); // totalSize = widthBytes * height * planes - readUint32(reader); // sizeAfterCompression - var bitsPerPixel = readUint16(reader); // 24 - var planes = readUint16(reader); // 1 - if (format !== 1 || bitsPerPixel !== 24 || planes !== 1) { - options.logMissingFeatures && console.log("Invalid thumbnail data (format: ".concat(format, ", bitsPerPixel: ").concat(bitsPerPixel, ", planes: ").concat(planes, ")")); - skipBytes(reader, left()); - return; - } - var size = left(); - var data = readBytes(reader, size); - if (options.useRawThumbnail) { - target.thumbnailRaw = { width: width, height: height, data: data }; - } - else if (data.byteLength) { - target.thumbnail = createCanvasFromData(data); - } -}, function (writer, target) { - var _a; - var width = 0; - var height = 0; - var data; - if (target.thumbnailRaw) { - width = target.thumbnailRaw.width; - height = target.thumbnailRaw.height; - data = target.thumbnailRaw.data; - } - else { - var dataUrl = (_a = target.thumbnail.toDataURL('image/jpeg', 1)) === null || _a === void 0 ? void 0 : _a.substring('data:image/jpeg;base64,'.length); - if (dataUrl) { - width = target.thumbnail.width; - height = target.thumbnail.height; - data = toByteArray(dataUrl); - } - else { - data = new Uint8Array(0); - } - } - var bitsPerPixel = 24; - var widthBytes = Math.floor((width * bitsPerPixel + 31) / 32) * 4; - var planes = 1; - var totalSize = widthBytes * height * planes; - var sizeAfterCompression = data.length; - writeUint32(writer, 1); // 1 = kJpegRGB - writeUint32(writer, width); - writeUint32(writer, height); - writeUint32(writer, widthBytes); - writeUint32(writer, totalSize); - writeUint32(writer, sizeAfterCompression); - writeUint16(writer, bitsPerPixel); - writeUint16(writer, planes); - writeBytes(writer, data); -}); -addHandler(1057, function (target) { return target.versionInfo !== undefined; }, function (reader, target, left) { - var version = readUint32(reader); - if (version !== 1) - throw new Error('Invalid versionInfo version'); - target.versionInfo = { - hasRealMergedData: !!readUint8(reader), - writerName: readUnicodeString(reader), - readerName: readUnicodeString(reader), - fileVersion: readUint32(reader), - }; - skipBytes(reader, left()); -}, function (writer, target) { - var versionInfo = target.versionInfo; - writeUint32(writer, 1); // version - writeUint8(writer, versionInfo.hasRealMergedData ? 1 : 0); - writeUnicodeString(writer, versionInfo.writerName); - writeUnicodeString(writer, versionInfo.readerName); - writeUint32(writer, versionInfo.fileVersion); -}); -MOCK_HANDLERS && addHandler(1058, // EXIF data 1. -function (// EXIF data 1. -target) { return target._ir1058 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1058', left()); - target._ir1058 = readBytes(reader, left()); -}, function (writer, target) { - writeBytes(writer, target._ir1058); -}); -addHandler(7000, function (target) { return target.imageReadyVariables !== undefined; }, function (reader, target, left) { - target.imageReadyVariables = readUtf8String(reader, left()); -}, function (writer, target) { - writeUtf8String(writer, target.imageReadyVariables); -}); -addHandler(7001, function (target) { return target.imageReadyDataSets !== undefined; }, function (reader, target, left) { - target.imageReadyDataSets = readUtf8String(reader, left()); -}, function (writer, target) { - writeUtf8String(writer, target.imageReadyDataSets); -}); -addHandler(1088, function (target) { return target.pathSelectionState !== undefined; }, function (reader, target, _left) { - var desc = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - target.pathSelectionState = desc['null']; -}, function (writer, target) { - var desc = { 'null': target.pathSelectionState }; - writeVersionAndDescriptor(writer, '', 'null', desc); -}); -MOCK_HANDLERS && addHandler(1025, function (target) { return target._ir1025 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1025', left()); - target._ir1025 = readBytes(reader, left()); -}, function (writer, target) { - writeBytes(writer, target._ir1025); -}); -var FrmD = createEnum('FrmD', '', { - auto: 'Auto', - none: 'None', - dispose: 'Disp', -}); -addHandler(4000, // Plug-In resource(s) -function (// Plug-In resource(s) -target) { return target.animations !== undefined; }, function (reader, target, left, _a) { - var logMissingFeatures = _a.logMissingFeatures, logDevFeatures = _a.logDevFeatures; - var key = readSignature(reader); - if (key === 'mani') { - checkSignature(reader, 'IRFR'); - readSection(reader, 1, function (left) { - var _loop_1 = function () { - checkSignature(reader, '8BIM'); - var key_1 = readSignature(reader); - readSection(reader, 1, function (left) { - if (key_1 === 'AnDs') { - var desc = readVersionAndDescriptor(reader); - target.animations = { - // desc.AFSt ??? - frames: desc.FrIn.map(function (x) { return ({ - id: x.FrID, - delay: (x.FrDl || 0) / 100, - dispose: x.FrDs ? FrmD.decode(x.FrDs) : 'auto', // missing == auto - // x.FrGA ??? - }); }), - animations: desc.FSts.map(function (x) { return ({ - id: x.FsID, - frames: x.FsFr, - repeats: x.LCnt, - activeFrame: x.AFrm || 0, - }); }), - }; - // console.log('#4000 AnDs', require('util').inspect(desc, false, 99, true)); - // console.log('#4000 AnDs:result', require('util').inspect(target.animations, false, 99, true)); - } - else if (key_1 === 'Roll') { - var bytes = readBytes(reader, left()); - logDevFeatures && console.log('#4000 Roll', bytes); - } - else { - logMissingFeatures && console.log('Unhandled subsection in #4000', key_1); - } - }); - }; - while (left()) { - _loop_1(); - } - }); - } - else if (key === 'mopt') { - var bytes = readBytes(reader, left()); - logDevFeatures && console.log('#4000 mopt', bytes); - } - else { - logMissingFeatures && console.log('Unhandled key in #4000:', key); - } -}, function (writer, target) { - if (target.animations) { - writeSignature(writer, 'mani'); - writeSignature(writer, 'IRFR'); - writeSection(writer, 1, function () { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'AnDs'); - writeSection(writer, 1, function () { - var desc = { - // AFSt: 0, // ??? - FrIn: [], - FSts: [], - }; - for (var i = 0; i < target.animations.frames.length; i++) { - var f = target.animations.frames[i]; - var frame = { - FrID: f.id, - }; - if (f.delay) - frame.FrDl = (f.delay * 100) | 0; - frame.FrDs = FrmD.encode(f.dispose); - // if (i === 0) frame.FrGA = 30; // ??? - desc.FrIn.push(frame); - } - for (var i = 0; i < target.animations.animations.length; i++) { - var a = target.animations.animations[i]; - var anim = { - FsID: a.id, - AFrm: a.activeFrame | 0, - FsFr: a.frames, - LCnt: a.repeats | 0, - }; - desc.FSts.push(anim); - } - writeVersionAndDescriptor(writer, '', 'null', desc); - }); - // writeSignature(writer, '8BIM'); - // writeSignature(writer, 'Roll'); - // writeSection(writer, 1, () => { - // writeZeros(writer, 8); - // }); - }); - } -}); -// TODO: Unfinished -MOCK_HANDLERS && addHandler(4001, // Plug-In resource(s) -function (// Plug-In resource(s) -target) { return target._ir4001 !== undefined; }, function (reader, target, left, _a) { - var logMissingFeatures = _a.logMissingFeatures, logDevFeatures = _a.logDevFeatures; - if (MOCK_HANDLERS) { - LOG_MOCK_HANDLERS && console.log('image resource 4001', left()); - target._ir4001 = readBytes(reader, left()); - return; - } - var key = readSignature(reader); - if (key === 'mfri') { - var version = readUint32(reader); - if (version !== 2) - throw new Error('Invalid mfri version'); - var length_1 = readUint32(reader); - var bytes = readBytes(reader, length_1); - logDevFeatures && console.log('mfri', bytes); - } - else if (key === 'mset') { - var desc = readVersionAndDescriptor(reader); - logDevFeatures && console.log('mset', desc); - } - else { - logMissingFeatures && console.log('Unhandled key in #4001', key); - } -}, function (writer, target) { - writeBytes(writer, target._ir4001); -}); -// TODO: Unfinished -MOCK_HANDLERS && addHandler(4002, // Plug-In resource(s) -function (// Plug-In resource(s) -target) { return target._ir4002 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 4002', left()); - target._ir4002 = readBytes(reader, left()); -}, function (writer, target) { - writeBytes(writer, target._ir4002); -}); -//# sourceMappingURL=imageResources.js.map \ No newline at end of file +import { toByteArray } from 'base64-js'; +import { readPascalString, readUnicodeString, readUint32, readUint16, readUint8, readFloat64, readBytes, skipBytes, readFloat32, readInt16, readFixedPoint32, readSignature, checkSignature, readSection, readColor } from './psdReader'; +import { writePascalString, writeUnicodeString, writeUint32, writeUint8, writeFloat64, writeUint16, writeBytes, writeInt16, writeFloat32, writeFixedPoint32, writeUnicodeStringWithPadding, writeColor, writeSignature, writeSection, } from './psdWriter'; +import { createCanvasFromData, createEnum, MOCK_HANDLERS } from './helpers'; +import { decodeString, encodeString } from './utf8'; +import { parseTrackList, readVersionAndDescriptor, serializeTrackList, writeVersionAndDescriptor } from './descriptor'; +export var resourceHandlers = []; +export var resourceHandlersMap = {}; +function addHandler(key, has, read, write) { + var handler = { key: key, has: has, read: read, write: write }; + resourceHandlers.push(handler); + resourceHandlersMap[handler.key] = handler; +} +var LOG_MOCK_HANDLERS = false; +var RESOLUTION_UNITS = [undefined, 'PPI', 'PPCM']; +var MEASUREMENT_UNITS = [undefined, 'Inches', 'Centimeters', 'Points', 'Picas', 'Columns']; +var hex = '0123456789abcdef'; +function charToNibble(code) { + return code <= 57 ? code - 48 : code - 87; +} +function byteAt(value, index) { + return (charToNibble(value.charCodeAt(index)) << 4) | charToNibble(value.charCodeAt(index + 1)); +} +function readUtf8String(reader, length) { + var buffer = readBytes(reader, length); + return decodeString(buffer); +} +function writeUtf8String(writer, value) { + var buffer = encodeString(value); + writeBytes(writer, buffer); +} +MOCK_HANDLERS && addHandler(1028, // IPTC-NAA record +function (// IPTC-NAA record +target) { return target._ir1028 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1028', left()); + target._ir1028 = readBytes(reader, left()); +}, function (writer, target) { + writeBytes(writer, target._ir1028); +}); +addHandler(1061, function (target) { return target.captionDigest !== undefined; }, function (reader, target) { + var captionDigest = ''; + for (var i = 0; i < 16; i++) { + var byte = readUint8(reader); + captionDigest += hex[byte >> 4]; + captionDigest += hex[byte & 0xf]; + } + target.captionDigest = captionDigest; +}, function (writer, target) { + for (var i = 0; i < 16; i++) { + writeUint8(writer, byteAt(target.captionDigest, i * 2)); + } +}); +addHandler(1060, function (target) { return target.xmpMetadata !== undefined; }, function (reader, target, left) { return target.xmpMetadata = readUtf8String(reader, left()); }, function (writer, target) { return writeUtf8String(writer, target.xmpMetadata); }); +var Inte = createEnum('Inte', 'perceptual', { + 'perceptual': 'Img ', + 'saturation': 'Grp ', + 'relative colorimetric': 'Clrm', + 'absolute colorimetric': 'AClr', +}); +addHandler(1082, function (target) { return target.printInformation !== undefined; }, function (reader, target) { + var _a, _b; + var desc = readVersionAndDescriptor(reader); + target.printInformation = { + printerName: desc.printerName || '', + renderingIntent: Inte.decode((_a = desc.Inte) !== null && _a !== void 0 ? _a : 'Inte.Img '), + }; + var info = target.printInformation; + if (desc.PstS !== undefined) + info.printerManagesColors = desc.PstS; + if (desc['Nm '] !== undefined) + info.printerProfile = desc['Nm ']; + if (desc.MpBl !== undefined) + info.blackPointCompensation = desc.MpBl; + if (desc.printSixteenBit !== undefined) + info.printSixteenBit = desc.printSixteenBit; + if (desc.hardProof !== undefined) + info.hardProof = desc.hardProof; + if (desc.printProofSetup) { + if ('Bltn' in desc.printProofSetup) { + info.proofSetup = { builtin: desc.printProofSetup.Bltn.split('.')[1] }; + } + else { + info.proofSetup = { + profile: desc.printProofSetup.profile, + renderingIntent: Inte.decode((_b = desc.printProofSetup.Inte) !== null && _b !== void 0 ? _b : 'Inte.Img '), + blackPointCompensation: !!desc.printProofSetup.MpBl, + paperWhite: !!desc.printProofSetup.paperWhite, + }; + } + } +}, function (writer, target) { + var _a, _b; + var info = target.printInformation; + var desc = {}; + if (info.printerManagesColors) { + desc.PstS = true; + } + else { + if (info.hardProof !== undefined) + desc.hardProof = !!info.hardProof; + desc.ClrS = 'ClrS.RGBC'; // TODO: ??? + desc['Nm '] = (_a = info.printerProfile) !== null && _a !== void 0 ? _a : 'CIE RGB'; + } + desc.Inte = Inte.encode(info.renderingIntent); + if (!info.printerManagesColors) + desc.MpBl = !!info.blackPointCompensation; + desc.printSixteenBit = !!info.printSixteenBit; + desc.printerName = info.printerName || ''; + if (info.proofSetup && 'profile' in info.proofSetup) { + desc.printProofSetup = { + profile: info.proofSetup.profile || '', + Inte: Inte.encode(info.proofSetup.renderingIntent), + MpBl: !!info.proofSetup.blackPointCompensation, + paperWhite: !!info.proofSetup.paperWhite, + }; + } + else { + desc.printProofSetup = { + Bltn: ((_b = info.proofSetup) === null || _b === void 0 ? void 0 : _b.builtin) ? "builtinProof.".concat(info.proofSetup.builtin) : 'builtinProof.proofCMYK', + }; + } + writeVersionAndDescriptor(writer, '', 'printOutput', desc); +}); +MOCK_HANDLERS && addHandler(1083, // Print style +function (// Print style +target) { return target._ir1083 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1083', left()); + target._ir1083 = readBytes(reader, left()); + // TODO: + // const desc = readVersionAndDescriptor(reader); + // console.log('1083', require('util').inspect(desc, false, 99, true)); +}, function (writer, target) { + writeBytes(writer, target._ir1083); +}); +addHandler(1005, function (target) { return target.resolutionInfo !== undefined; }, function (reader, target) { + var horizontalResolution = readFixedPoint32(reader); + var horizontalResolutionUnit = readUint16(reader); + var widthUnit = readUint16(reader); + var verticalResolution = readFixedPoint32(reader); + var verticalResolutionUnit = readUint16(reader); + var heightUnit = readUint16(reader); + target.resolutionInfo = { + horizontalResolution: horizontalResolution, + horizontalResolutionUnit: RESOLUTION_UNITS[horizontalResolutionUnit] || 'PPI', + widthUnit: MEASUREMENT_UNITS[widthUnit] || 'Inches', + verticalResolution: verticalResolution, + verticalResolutionUnit: RESOLUTION_UNITS[verticalResolutionUnit] || 'PPI', + heightUnit: MEASUREMENT_UNITS[heightUnit] || 'Inches', + }; +}, function (writer, target) { + var info = target.resolutionInfo; + writeFixedPoint32(writer, info.horizontalResolution || 0); + writeUint16(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.horizontalResolutionUnit))); + writeUint16(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.widthUnit))); + writeFixedPoint32(writer, info.verticalResolution || 0); + writeUint16(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.verticalResolutionUnit))); + writeUint16(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.heightUnit))); +}); +var printScaleStyles = ['centered', 'size to fit', 'user defined']; +addHandler(1062, function (target) { return target.printScale !== undefined; }, function (reader, target) { + target.printScale = { + style: printScaleStyles[readInt16(reader)], + x: readFloat32(reader), + y: readFloat32(reader), + scale: readFloat32(reader), + }; +}, function (writer, target) { + var _a = target.printScale, style = _a.style, x = _a.x, y = _a.y, scale = _a.scale; + writeInt16(writer, Math.max(0, printScaleStyles.indexOf(style))); + writeFloat32(writer, x || 0); + writeFloat32(writer, y || 0); + writeFloat32(writer, scale || 0); +}); +addHandler(1006, function (target) { return target.alphaChannelNames !== undefined; }, function (reader, target, left) { + target.alphaChannelNames = []; + while (left()) { + var value = readPascalString(reader, 1); + target.alphaChannelNames.push(value); + } +}, function (writer, target) { + for (var _i = 0, _a = target.alphaChannelNames; _i < _a.length; _i++) { + var name_1 = _a[_i]; + writePascalString(writer, name_1, 1); + } +}); +addHandler(1045, function (target) { return target.alphaChannelNames !== undefined; }, function (reader, target, left) { + target.alphaChannelNames = []; + while (left()) { + target.alphaChannelNames.push(readUnicodeString(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.alphaChannelNames; _i < _a.length; _i++) { + var name_2 = _a[_i]; + writeUnicodeStringWithPadding(writer, name_2); + } +}); +MOCK_HANDLERS && addHandler(1077, function (target) { return target._ir1077 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1077', left()); + target._ir1077 = readBytes(reader, left()); +}, function (writer, target) { + writeBytes(writer, target._ir1077); +}); +addHandler(1053, function (target) { return target.alphaIdentifiers !== undefined; }, function (reader, target, left) { + target.alphaIdentifiers = []; + while (left() >= 4) { + target.alphaIdentifiers.push(readUint32(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.alphaIdentifiers; _i < _a.length; _i++) { + var id = _a[_i]; + writeUint32(writer, id); + } +}); +addHandler(1010, function (target) { return target.backgroundColor !== undefined; }, function (reader, target) { return target.backgroundColor = readColor(reader); }, function (writer, target) { return writeColor(writer, target.backgroundColor); }); +addHandler(1037, function (target) { return target.globalAngle !== undefined; }, function (reader, target) { return target.globalAngle = readUint32(reader); }, function (writer, target) { return writeUint32(writer, target.globalAngle); }); +addHandler(1049, function (target) { return target.globalAltitude !== undefined; }, function (reader, target) { return target.globalAltitude = readUint32(reader); }, function (writer, target) { return writeUint32(writer, target.globalAltitude); }); +addHandler(1011, function (target) { return target.printFlags !== undefined; }, function (reader, target) { + target.printFlags = { + labels: !!readUint8(reader), + cropMarks: !!readUint8(reader), + colorBars: !!readUint8(reader), + registrationMarks: !!readUint8(reader), + negative: !!readUint8(reader), + flip: !!readUint8(reader), + interpolate: !!readUint8(reader), + caption: !!readUint8(reader), + printFlags: !!readUint8(reader), + }; +}, function (writer, target) { + var flags = target.printFlags; + writeUint8(writer, flags.labels ? 1 : 0); + writeUint8(writer, flags.cropMarks ? 1 : 0); + writeUint8(writer, flags.colorBars ? 1 : 0); + writeUint8(writer, flags.registrationMarks ? 1 : 0); + writeUint8(writer, flags.negative ? 1 : 0); + writeUint8(writer, flags.flip ? 1 : 0); + writeUint8(writer, flags.interpolate ? 1 : 0); + writeUint8(writer, flags.caption ? 1 : 0); + writeUint8(writer, flags.printFlags ? 1 : 0); +}); +MOCK_HANDLERS && addHandler(10000, // Print flags +function (// Print flags +target) { return target._ir10000 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 10000', left()); + target._ir10000 = readBytes(reader, left()); +}, function (writer, target) { + writeBytes(writer, target._ir10000); +}); +MOCK_HANDLERS && addHandler(1013, // Color halftoning +function (// Color halftoning +target) { return target._ir1013 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1013', left()); + target._ir1013 = readBytes(reader, left()); +}, function (writer, target) { + writeBytes(writer, target._ir1013); +}); +MOCK_HANDLERS && addHandler(1016, // Color transfer functions +function (// Color transfer functions +target) { return target._ir1016 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1016', left()); + target._ir1016 = readBytes(reader, left()); +}, function (writer, target) { + writeBytes(writer, target._ir1016); +}); +addHandler(1024, function (target) { return target.layerState !== undefined; }, function (reader, target) { return target.layerState = readUint16(reader); }, function (writer, target) { return writeUint16(writer, target.layerState); }); +addHandler(1026, function (target) { return target.layersGroup !== undefined; }, function (reader, target, left) { + target.layersGroup = []; + while (left()) { + target.layersGroup.push(readUint16(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.layersGroup; _i < _a.length; _i++) { + var g = _a[_i]; + writeUint16(writer, g); + } +}); +addHandler(1072, function (target) { return target.layerGroupsEnabledId !== undefined; }, function (reader, target, left) { + target.layerGroupsEnabledId = []; + while (left()) { + target.layerGroupsEnabledId.push(readUint8(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.layerGroupsEnabledId; _i < _a.length; _i++) { + var id = _a[_i]; + writeUint8(writer, id); + } +}); +addHandler(1069, function (target) { return target.layerSelectionIds !== undefined; }, function (reader, target) { + var count = readUint16(reader); + target.layerSelectionIds = []; + while (count--) { + target.layerSelectionIds.push(readUint32(reader)); + } +}, function (writer, target) { + writeUint16(writer, target.layerSelectionIds.length); + for (var _i = 0, _a = target.layerSelectionIds; _i < _a.length; _i++) { + var id = _a[_i]; + writeUint32(writer, id); + } +}); +addHandler(1032, function (target) { return target.gridAndGuidesInformation !== undefined; }, function (reader, target) { + var version = readUint32(reader); + var horizontal = readUint32(reader); + var vertical = readUint32(reader); + var count = readUint32(reader); + if (version !== 1) + throw new Error("Invalid 1032 resource version: ".concat(version)); + target.gridAndGuidesInformation = { + grid: { horizontal: horizontal, vertical: vertical }, + guides: [], + }; + for (var i = 0; i < count; i++) { + target.gridAndGuidesInformation.guides.push({ + location: readUint32(reader) / 32, + direction: readUint8(reader) ? 'horizontal' : 'vertical' + }); + } +}, function (writer, target) { + var info = target.gridAndGuidesInformation; + var grid = info.grid || { horizontal: 18 * 32, vertical: 18 * 32 }; + var guides = info.guides || []; + writeUint32(writer, 1); + writeUint32(writer, grid.horizontal); + writeUint32(writer, grid.vertical); + writeUint32(writer, guides.length); + for (var _i = 0, guides_1 = guides; _i < guides_1.length; _i++) { + var g = guides_1[_i]; + writeUint32(writer, g.location * 32); + writeUint8(writer, g.direction === 'horizontal' ? 1 : 0); + } +}); +// 0 - normal, 7 - multiply, 8 - screen, 23 - difference +var onionSkinsBlendModes = [ + 'normal', undefined, undefined, undefined, undefined, undefined, undefined, 'multiply', + 'screen', undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, 'difference', +]; +addHandler(1078, // Onion Skins +function (// Onion Skins +target) { return target.onionSkins !== undefined; }, function (reader, target) { + var desc = readVersionAndDescriptor(reader); + // console.log('1078', require('util').inspect(desc, false, 99, true)); + target.onionSkins = { + enabled: desc.enab, + framesBefore: desc.numBefore, + framesAfter: desc.numAfter, + frameSpacing: desc.Spcn, + minOpacity: desc.minOpacity / 100, + maxOpacity: desc.maxOpacity / 100, + blendMode: onionSkinsBlendModes[desc.BlnM] || 'normal', + }; +}, function (writer, target) { + var onionSkins = target.onionSkins; + var desc = { + Vrsn: 1, + enab: onionSkins.enabled, + numBefore: onionSkins.framesBefore, + numAfter: onionSkins.framesAfter, + Spcn: onionSkins.frameSpacing, + minOpacity: (onionSkins.minOpacity * 100) | 0, + maxOpacity: (onionSkins.maxOpacity * 100) | 0, + BlnM: Math.max(0, onionSkinsBlendModes.indexOf(onionSkins.blendMode)), + }; + writeVersionAndDescriptor(writer, '', 'null', desc); +}); +addHandler(1075, // Timeline Information +function (// Timeline Information +target) { return target.timelineInformation !== undefined; }, function (reader, target, _, options) { + var _a, _b; + var desc = readVersionAndDescriptor(reader); + // console.log('1075', require('util').inspect(desc, false, 99, true)); + target.timelineInformation = { + enabled: desc.enab, + frameStep: desc.frameStep, + frameRate: desc.frameRate, + time: desc.time, + duration: desc.duration, + workInTime: desc.workInTime, + workOutTime: desc.workOutTime, + repeats: desc.LCnt, + hasMotion: desc.hasMotion, + globalTracks: parseTrackList(desc.globalTrackList, !!options.logMissingFeatures), + }; + if ((_b = (_a = desc.audioClipGroupList) === null || _a === void 0 ? void 0 : _a.audioClipGroupList) === null || _b === void 0 ? void 0 : _b.length) { + target.timelineInformation.audioClipGroups = desc.audioClipGroupList.audioClipGroupList.map(function (g) { return ({ + id: g.groupID, + muted: g.muted, + audioClips: g.audioClipList.map(function (_a) { + var clipID = _a.clipID, timeScope = _a.timeScope, muted = _a.muted, audioLevel = _a.audioLevel, frameReader = _a.frameReader; + return ({ + id: clipID, + start: timeScope.Strt, + duration: timeScope.duration, + inTime: timeScope.inTime, + outTime: timeScope.outTime, + muted: muted, + audioLevel: audioLevel, + frameReader: { + type: frameReader.frameReaderType, + mediaDescriptor: frameReader.mediaDescriptor, + link: { + name: frameReader['Lnk ']['Nm '], + fullPath: frameReader['Lnk '].fullPath, + relativePath: frameReader['Lnk '].relPath, + }, + }, + }); + }), + }); }); + } +}, function (writer, target) { + var _a; + var timeline = target.timelineInformation; + var desc = { + Vrsn: 1, + enab: timeline.enabled, + frameStep: timeline.frameStep, + frameRate: timeline.frameRate, + time: timeline.time, + duration: timeline.duration, + workInTime: timeline.workInTime, + workOutTime: timeline.workOutTime, + LCnt: timeline.repeats, + globalTrackList: serializeTrackList(timeline.globalTracks), + audioClipGroupList: { + audioClipGroupList: (_a = timeline.audioClipGroups) === null || _a === void 0 ? void 0 : _a.map(function (a) { return ({ + groupID: a.id, + muted: a.muted, + audioClipList: a.audioClips.map(function (c) { return ({ + clipID: c.id, + timeScope: { + Vrsn: 1, + Strt: c.start, + duration: c.duration, + inTime: c.inTime, + outTime: c.outTime, + }, + frameReader: { + frameReaderType: c.frameReader.type, + descVersion: 1, + 'Lnk ': { + descVersion: 1, + 'Nm ': c.frameReader.link.name, + fullPath: c.frameReader.link.fullPath, + relPath: c.frameReader.link.relativePath, + }, + mediaDescriptor: c.frameReader.mediaDescriptor, + }, + muted: c.muted, + audioLevel: c.audioLevel, + }); }), + }); }), + }, + hasMotion: timeline.hasMotion, + }; + // console.log('WRITE:1075', require('util').inspect(desc, false, 99, true)); + writeVersionAndDescriptor(writer, '', 'null', desc, 'anim'); +}); +addHandler(1076, // Sheet Disclosure +function (// Sheet Disclosure +target) { return target.sheetDisclosure !== undefined; }, function (reader, target) { + var desc = readVersionAndDescriptor(reader); + // console.log('1076', require('util').inspect(desc, false, 99, true)); + target.sheetDisclosure = {}; + if (desc.sheetTimelineOptions) { + target.sheetDisclosure.sheetTimelineOptions = desc.sheetTimelineOptions.map(function (o) { return ({ + sheetID: o.sheetID, + sheetDisclosed: o.sheetDisclosed, + lightsDisclosed: o.lightsDisclosed, + meshesDisclosed: o.meshesDisclosed, + materialsDisclosed: o.materialsDisclosed, + }); }); + } +}, function (writer, target) { + var disclosure = target.sheetDisclosure; + var desc = { Vrsn: 1 }; + if (disclosure.sheetTimelineOptions) { + desc.sheetTimelineOptions = disclosure.sheetTimelineOptions.map(function (d) { return ({ + Vrsn: 2, + sheetID: d.sheetID, + sheetDisclosed: d.sheetDisclosed, + lightsDisclosed: d.lightsDisclosed, + meshesDisclosed: d.meshesDisclosed, + materialsDisclosed: d.materialsDisclosed, + }); }); + } + writeVersionAndDescriptor(writer, '', 'null', desc); +}); +addHandler(1054, function (target) { return target.urlsList !== undefined; }, function (reader, target, _, options) { + var count = readUint32(reader); + if (count) { + if (!options.throwForMissingFeatures) + return; + throw new Error('Not implemented: URL List'); + } + // TODO: read actual URL list + target.urlsList = []; +}, function (writer, target) { + writeUint32(writer, target.urlsList.length); + // TODO: write actual URL list + if (target.urlsList.length) { + throw new Error('Not implemented: URL List'); + } +}); +MOCK_HANDLERS && addHandler(1050, // Slices +function (// Slices +target) { return target._ir1050 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1050', left()); + target._ir1050 = readBytes(reader, left()); +}, function (writer, target) { + writeBytes(writer, target._ir1050); +}); +addHandler(1064, function (target) { return target.pixelAspectRatio !== undefined; }, function (reader, target) { + if (readUint32(reader) > 2) + throw new Error('Invalid pixelAspectRatio version'); + target.pixelAspectRatio = { aspect: readFloat64(reader) }; +}, function (writer, target) { + writeUint32(writer, 2); // version + writeFloat64(writer, target.pixelAspectRatio.aspect); +}); +addHandler(1041, function (target) { return target.iccUntaggedProfile !== undefined; }, function (reader, target) { + target.iccUntaggedProfile = !!readUint8(reader); +}, function (writer, target) { + writeUint8(writer, target.iccUntaggedProfile ? 1 : 0); +}); +MOCK_HANDLERS && addHandler(1039, // ICC Profile +function (// ICC Profile +target) { return target._ir1039 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1039', left()); + target._ir1039 = readBytes(reader, left()); +}, function (writer, target) { + writeBytes(writer, target._ir1039); +}); +addHandler(1044, function (target) { return target.idsSeedNumber !== undefined; }, function (reader, target) { return target.idsSeedNumber = readUint32(reader); }, function (writer, target) { return writeUint32(writer, target.idsSeedNumber); }); +addHandler(1036, function (target) { return target.thumbnail !== undefined || target.thumbnailRaw !== undefined; }, function (reader, target, left, options) { + var format = readUint32(reader); // 1 = kJpegRGB, 0 = kRawRGB + var width = readUint32(reader); + var height = readUint32(reader); + readUint32(reader); // widthBytes = (width * bits_per_pixel + 31) / 32 * 4. + readUint32(reader); // totalSize = widthBytes * height * planes + readUint32(reader); // sizeAfterCompression + var bitsPerPixel = readUint16(reader); // 24 + var planes = readUint16(reader); // 1 + if (format !== 1 || bitsPerPixel !== 24 || planes !== 1) { + options.logMissingFeatures && console.log("Invalid thumbnail data (format: ".concat(format, ", bitsPerPixel: ").concat(bitsPerPixel, ", planes: ").concat(planes, ")")); + skipBytes(reader, left()); + return; + } + var size = left(); + var data = readBytes(reader, size); + if (options.useRawThumbnail) { + target.thumbnailRaw = { width: width, height: height, data: data }; + } + else if (data.byteLength) { + target.thumbnail = createCanvasFromData(data); + } +}, function (writer, target) { + var _a; + var width = 0; + var height = 0; + var data; + if (target.thumbnailRaw) { + width = target.thumbnailRaw.width; + height = target.thumbnailRaw.height; + data = target.thumbnailRaw.data; + } + else { + var dataUrl = (_a = target.thumbnail.toDataURL('image/jpeg', 1)) === null || _a === void 0 ? void 0 : _a.substring('data:image/jpeg;base64,'.length); + if (dataUrl) { + width = target.thumbnail.width; + height = target.thumbnail.height; + data = toByteArray(dataUrl); + } + else { + data = new Uint8Array(0); + } + } + var bitsPerPixel = 24; + var widthBytes = Math.floor((width * bitsPerPixel + 31) / 32) * 4; + var planes = 1; + var totalSize = widthBytes * height * planes; + var sizeAfterCompression = data.length; + writeUint32(writer, 1); // 1 = kJpegRGB + writeUint32(writer, width); + writeUint32(writer, height); + writeUint32(writer, widthBytes); + writeUint32(writer, totalSize); + writeUint32(writer, sizeAfterCompression); + writeUint16(writer, bitsPerPixel); + writeUint16(writer, planes); + writeBytes(writer, data); +}); +addHandler(1057, function (target) { return target.versionInfo !== undefined; }, function (reader, target, left) { + var version = readUint32(reader); + if (version !== 1) + throw new Error('Invalid versionInfo version'); + target.versionInfo = { + hasRealMergedData: !!readUint8(reader), + writerName: readUnicodeString(reader), + readerName: readUnicodeString(reader), + fileVersion: readUint32(reader), + }; + skipBytes(reader, left()); +}, function (writer, target) { + var versionInfo = target.versionInfo; + writeUint32(writer, 1); // version + writeUint8(writer, versionInfo.hasRealMergedData ? 1 : 0); + writeUnicodeString(writer, versionInfo.writerName); + writeUnicodeString(writer, versionInfo.readerName); + writeUint32(writer, versionInfo.fileVersion); +}); +MOCK_HANDLERS && addHandler(1058, // EXIF data 1. +function (// EXIF data 1. +target) { return target._ir1058 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1058', left()); + target._ir1058 = readBytes(reader, left()); +}, function (writer, target) { + writeBytes(writer, target._ir1058); +}); +addHandler(7000, function (target) { return target.imageReadyVariables !== undefined; }, function (reader, target, left) { + target.imageReadyVariables = readUtf8String(reader, left()); +}, function (writer, target) { + writeUtf8String(writer, target.imageReadyVariables); +}); +addHandler(7001, function (target) { return target.imageReadyDataSets !== undefined; }, function (reader, target, left) { + target.imageReadyDataSets = readUtf8String(reader, left()); +}, function (writer, target) { + writeUtf8String(writer, target.imageReadyDataSets); +}); +addHandler(1088, function (target) { return target.pathSelectionState !== undefined; }, function (reader, target, _left) { + var desc = readVersionAndDescriptor(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + target.pathSelectionState = desc['null']; +}, function (writer, target) { + var desc = { 'null': target.pathSelectionState }; + writeVersionAndDescriptor(writer, '', 'null', desc); +}); +MOCK_HANDLERS && addHandler(1025, function (target) { return target._ir1025 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1025', left()); + target._ir1025 = readBytes(reader, left()); +}, function (writer, target) { + writeBytes(writer, target._ir1025); +}); +var FrmD = createEnum('FrmD', '', { + auto: 'Auto', + none: 'None', + dispose: 'Disp', +}); +addHandler(4000, // Plug-In resource(s) +function (// Plug-In resource(s) +target) { return target.animations !== undefined; }, function (reader, target, left, _a) { + var logMissingFeatures = _a.logMissingFeatures, logDevFeatures = _a.logDevFeatures; + var key = readSignature(reader); + if (key === 'mani') { + checkSignature(reader, 'IRFR'); + readSection(reader, 1, function (left) { + var _loop_1 = function () { + checkSignature(reader, '8BIM'); + var key_1 = readSignature(reader); + readSection(reader, 1, function (left) { + if (key_1 === 'AnDs') { + var desc = readVersionAndDescriptor(reader); + target.animations = { + // desc.AFSt ??? + frames: desc.FrIn.map(function (x) { return ({ + id: x.FrID, + delay: (x.FrDl || 0) / 100, + dispose: x.FrDs ? FrmD.decode(x.FrDs) : 'auto', // missing == auto + // x.FrGA ??? + }); }), + animations: desc.FSts.map(function (x) { return ({ + id: x.FsID, + frames: x.FsFr, + repeats: x.LCnt, + activeFrame: x.AFrm || 0, + }); }), + }; + // console.log('#4000 AnDs', require('util').inspect(desc, false, 99, true)); + // console.log('#4000 AnDs:result', require('util').inspect(target.animations, false, 99, true)); + } + else if (key_1 === 'Roll') { + var bytes = readBytes(reader, left()); + logDevFeatures && console.log('#4000 Roll', bytes); + } + else { + logMissingFeatures && console.log('Unhandled subsection in #4000', key_1); + } + }); + }; + while (left()) { + _loop_1(); + } + }); + } + else if (key === 'mopt') { + var bytes = readBytes(reader, left()); + logDevFeatures && console.log('#4000 mopt', bytes); + } + else { + logMissingFeatures && console.log('Unhandled key in #4000:', key); + } +}, function (writer, target) { + if (target.animations) { + writeSignature(writer, 'mani'); + writeSignature(writer, 'IRFR'); + writeSection(writer, 1, function () { + writeSignature(writer, '8BIM'); + writeSignature(writer, 'AnDs'); + writeSection(writer, 1, function () { + var desc = { + // AFSt: 0, // ??? + FrIn: [], + FSts: [], + }; + for (var i = 0; i < target.animations.frames.length; i++) { + var f = target.animations.frames[i]; + var frame = { + FrID: f.id, + }; + if (f.delay) + frame.FrDl = (f.delay * 100) | 0; + frame.FrDs = FrmD.encode(f.dispose); + // if (i === 0) frame.FrGA = 30; // ??? + desc.FrIn.push(frame); + } + for (var i = 0; i < target.animations.animations.length; i++) { + var a = target.animations.animations[i]; + var anim = { + FsID: a.id, + AFrm: a.activeFrame | 0, + FsFr: a.frames, + LCnt: a.repeats | 0, + }; + desc.FSts.push(anim); + } + writeVersionAndDescriptor(writer, '', 'null', desc); + }); + // writeSignature(writer, '8BIM'); + // writeSignature(writer, 'Roll'); + // writeSection(writer, 1, () => { + // writeZeros(writer, 8); + // }); + }); + } +}); +// TODO: Unfinished +MOCK_HANDLERS && addHandler(4001, // Plug-In resource(s) +function (// Plug-In resource(s) +target) { return target._ir4001 !== undefined; }, function (reader, target, left, _a) { + var logMissingFeatures = _a.logMissingFeatures, logDevFeatures = _a.logDevFeatures; + if (MOCK_HANDLERS) { + LOG_MOCK_HANDLERS && console.log('image resource 4001', left()); + target._ir4001 = readBytes(reader, left()); + return; + } + var key = readSignature(reader); + if (key === 'mfri') { + var version = readUint32(reader); + if (version !== 2) + throw new Error('Invalid mfri version'); + var length_1 = readUint32(reader); + var bytes = readBytes(reader, length_1); + logDevFeatures && console.log('mfri', bytes); + } + else if (key === 'mset') { + var desc = readVersionAndDescriptor(reader); + logDevFeatures && console.log('mset', desc); + } + else { + logMissingFeatures && console.log('Unhandled key in #4001', key); + } +}, function (writer, target) { + writeBytes(writer, target._ir4001); +}); +// TODO: Unfinished +MOCK_HANDLERS && addHandler(4002, // Plug-In resource(s) +function (// Plug-In resource(s) +target) { return target._ir4002 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 4002', left()); + target._ir4002 = readBytes(reader, left()); +}, function (writer, target) { + writeBytes(writer, target._ir4002); +}); + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImltYWdlUmVzb3VyY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFFeEMsT0FBTyxFQUNLLGdCQUFnQixFQUFFLGlCQUFpQixFQUFFLFVBQVUsRUFBRSxVQUFVLEVBQUUsU0FBUyxFQUFFLFdBQVcsRUFDOUYsU0FBUyxFQUFFLFNBQVMsRUFBRSxXQUFXLEVBQUUsU0FBUyxFQUFFLGdCQUFnQixFQUFFLGFBQWEsRUFBRSxjQUFjLEVBQzdGLFdBQVcsRUFBRSxTQUFTLEVBQ3RCLE1BQU0sYUFBYSxDQUFDO0FBQ3JCLE9BQU8sRUFDSyxpQkFBaUIsRUFBRSxrQkFBa0IsRUFBRSxXQUFXLEVBQUUsVUFBVSx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MSk7XG5cdH0sXG4pO1xuXG4vLyBUT0RPOiBVbmZpbmlzaGVkXG5NT0NLX0hBTkRMRVJTICYmIGFkZEhhbmRsZXIoXG5cdDQwMDIsIC8vIFBsdWctSW4gcmVzb3VyY2Uocylcblx0dGFyZ2V0ID0+ICh0YXJnZXQgYXMgYW55KS5faXI0MDAyICE9PSB1bmRlZmluZWQsXG5cdChyZWFkZXIsIHRhcmdldCwgbGVmdCkgPT4ge1xuXHRcdExPR19NT0NLX0hBTkRMRVJTICYmIGNvbnNvbGUubG9nKCdpbWFnZSByZXNvdXJjZSA0MDAyJywgbGVmdCgpKTtcblx0XHQodGFyZ2V0IGFzIGFueSkuX2lyNDAwMiA9IHJlYWRCeXRlcyhyZWFkZXIsIGxlZnQoKSk7XG5cdH0sXG5cdCh3cml0ZXIsIHRhcmdldCkgPT4ge1xuXHRcdHdyaXRlQnl0ZXMod3JpdGVyLCAodGFyZ2V0IGFzIGFueSkuX2lyNDAwMik7XG5cdH0sXG4pO1xuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/imageResources.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/imageResources.js.map deleted file mode 100644 index 5700463..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/imageResources.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"imageResources.js","sourceRoot":"../src/","sources":["imageResources.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,EACK,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAC9F,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAC7F,WAAW,EAAE,SAAS,EAAE,SAAS,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AC/C,UAAC,MAAM,EAAE,MAAM,EAAE,IAAI;IACpB,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/D,MAAc,CAAC,OAAO,GAAG,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AACrD,CAAC,EACD,UAAC,MAAM,EAAE,MAAM;IACd,UAAU,CAAC,MAAM,EAAG,MAAc,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC,CACD,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/index.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/index.d.ts index 3df1283..d44d884 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/index.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/index.d.ts @@ -1,20 +1,20 @@ -/// -import { Psd, ReadOptions, WriteOptions } from './psd'; -import { PsdWriter } from './psdWriter'; -import { PsdReader } from './psdReader'; -export * from './abr'; -export * from './csh'; -export { initializeCanvas } from './helpers'; -export * from './psd'; -import { fromByteArray } from 'base64-js'; -export { PsdReader, PsdWriter }; -interface BufferLike { - buffer: ArrayBuffer; - byteOffset: number; - byteLength: number; -} -export declare const byteArrayToBase64: typeof fromByteArray; -export declare function readPsd(buffer: ArrayBuffer | BufferLike, options?: ReadOptions): Psd; -export declare function writePsd(psd: Psd, options?: WriteOptions): ArrayBuffer; -export declare function writePsdUint8Array(psd: Psd, options?: WriteOptions): Uint8Array; -export declare function writePsdBuffer(psd: Psd, options?: WriteOptions): Buffer; +/// +import { Psd, ReadOptions, WriteOptions } from './psd'; +import { PsdWriter } from './psdWriter'; +import { PsdReader } from './psdReader'; +export * from './abr'; +export * from './csh'; +export { initializeCanvas } from './helpers'; +export * from './psd'; +import { fromByteArray } from 'base64-js'; +export { PsdReader, PsdWriter }; +interface BufferLike { + buffer: ArrayBuffer; + byteOffset: number; + byteLength: number; +} +export declare const byteArrayToBase64: typeof fromByteArray; +export declare function readPsd(buffer: ArrayBuffer | BufferLike, options?: ReadOptions): Psd; +export declare function writePsd(psd: Psd, options?: WriteOptions): ArrayBuffer; +export declare function writePsdUint8Array(psd: Psd, options?: WriteOptions): Uint8Array; +export declare function writePsdBuffer(psd: Psd, options?: WriteOptions): Buffer; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/index.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/index.js index 4f66ef9..fe1752f 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/index.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/index.js @@ -1,31 +1,32 @@ -import { writePsd as writePsdInternal, getWriterBuffer, createWriter, getWriterBufferNoCopy } from './psdWriter'; -import { readPsd as readPsdInternal, createReader } from './psdReader'; -export * from './abr'; -export * from './csh'; -export { initializeCanvas } from './helpers'; -export * from './psd'; -import { fromByteArray } from 'base64-js'; -export var byteArrayToBase64 = fromByteArray; -export function readPsd(buffer, options) { - var reader = 'buffer' in buffer ? - createReader(buffer.buffer, buffer.byteOffset, buffer.byteLength) : - createReader(buffer); - return readPsdInternal(reader, options); -} -export function writePsd(psd, options) { - var writer = createWriter(); - writePsdInternal(writer, psd, options); - return getWriterBuffer(writer); -} -export function writePsdUint8Array(psd, options) { - var writer = createWriter(); - writePsdInternal(writer, psd, options); - return getWriterBufferNoCopy(writer); -} -export function writePsdBuffer(psd, options) { - if (typeof Buffer === 'undefined') { - throw new Error('Buffer not supported on this platform'); - } - return Buffer.from(writePsdUint8Array(psd, options)); -} -//# sourceMappingURL=index.js.map \ No newline at end of file +import { writePsd as writePsdInternal, getWriterBuffer, createWriter, getWriterBufferNoCopy } from './psdWriter'; +import { readPsd as readPsdInternal, createReader } from './psdReader'; +export * from './abr'; +export * from './csh'; +export { initializeCanvas } from './helpers'; +export * from './psd'; +import { fromByteArray } from 'base64-js'; +export var byteArrayToBase64 = fromByteArray; +export function readPsd(buffer, options) { + var reader = 'buffer' in buffer ? + createReader(buffer.buffer, buffer.byteOffset, buffer.byteLength) : + createReader(buffer); + return readPsdInternal(reader, options); +} +export function writePsd(psd, options) { + var writer = createWriter(); + writePsdInternal(writer, psd, options); + return getWriterBuffer(writer); +} +export function writePsdUint8Array(psd, options) { + var writer = createWriter(); + writePsdInternal(writer, psd, options); + return getWriterBufferNoCopy(writer); +} +export function writePsdBuffer(psd, options) { + if (typeof Buffer === 'undefined') { + throw new Error('Buffer not supported on this platform'); + } + return Buffer.from(writePsdUint8Array(psd, options)); +} + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBYSxRQUFRLElBQUksZ0JBQWdCLEVBQUUsZUFBZSxFQUFFLFlBQVksRUFBRSxxQkFBcUIsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUM1SCxPQUFPLEVBQWEsT0FBTyxJQUFJLGVBQWUsRUFBRSxZQUFZLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFDbEYsY0FBYyxPQUFPLENBQUM7QUFDdEIsY0FBYyxPQUFPLENBQUM7QUFDdEIsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sV0FBVyxDQUFDO0FBQzdDLGNBQWMsT0FBTyxDQUFDO0FBQ3RCLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxXQUFXLENBQUM7QUFTMUMsTUFBTSxDQUFDLElBQU0saUJBQWlCLEdBQUcsYUFBYSxDQUFDO0FBRS9DLE1BQU0sVUFBVSxPQUFPLENBQUMsTUFBZ0MsRUFBRSxPQUFxQjtJQUM5RSxJQUFNLE1BQU0sR0FBRyxRQUFRLElBQUksTUFBTSxDQUFDLENBQUM7UUFDbEMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxNQUFNLEVBQUUsTUFBTSxDQUFDLFVBQVUsRUFBRSxNQUFNLENB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dist-es/index.js.map deleted file mode 100644 index 6c231db..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,QAAQ,IAAI,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAC5H,OAAO,EAAa,OAAO,IAAI,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAClF,cAAc,OAAO,CAAC;AACtB,cAAc,OAAO,CAAC;AACtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,cAAc,OAAO,CAAC;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAS1C,MAAM,CAAC,IAAM,iBAAiB,GAAG,aAAa,CAAC;AAE/C,MAAM,UAAU,OAAO,CAAC,MAAgC,EAAE,OAAqB;IAC9E,IAAM,MAAM,GAAG,QAAQ,IAAI,MAAM,CAAC,CAAC;QAClC,YAAY,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;QACnE,YAAY,CAAC,MAAM,CAAC,CAAC;IACtB,OAAO,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,GAAQ,EAAE,OAAsB;IACxD,IAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACvC,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,GAAQ,EAAE,OAAsB;IAClE,IAAM,MAAM,GAAG,YAAY,EAAE,CAAC;IAC9B,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACvC,OAAO,qBAAqB,CAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,GAAQ,EAAE,OAAsB;IAC9D,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;KACzD;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AACtD,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/initializeCanvas.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/initializeCanvas.d.ts index 8ed6d87..39a860b 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/initializeCanvas.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/initializeCanvas.d.ts @@ -1 +1 @@ -export declare function initialize(): void; +export declare function initialize(): void; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/initializeCanvas.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/initializeCanvas.js index abebcd6..045a7c8 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/initializeCanvas.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/initializeCanvas.js @@ -1,22 +1,23 @@ -import { createCanvas } from 'canvas'; -import { initializeCanvas } from './index'; -import { decodeJpeg } from './jpeg'; -function createCanvasFromData(data) { - var canvas = createCanvas(100, 100); - try { - var context_1 = canvas.getContext('2d'); - var imageData = decodeJpeg(data, function (w, h) { return context_1.createImageData(w, h); }); - canvas.width = imageData.width; - canvas.height = imageData.height; - context_1.putImageData(imageData, 0, 0); - } - catch (e) { - console.error('JPEG decompression error', e.message); - } - return canvas; -} -initializeCanvas(createCanvas, createCanvasFromData); -export function initialize() { - initializeCanvas(createCanvas, createCanvasFromData); -} -//# sourceMappingURL=initializeCanvas.js.map \ No newline at end of file +import { createCanvas } from 'canvas'; +import { initializeCanvas } from './index'; +import { decodeJpeg } from './jpeg'; +function createCanvasFromData(data) { + var canvas = createCanvas(100, 100); + try { + var context_1 = canvas.getContext('2d'); + var imageData = decodeJpeg(data, function (w, h) { return context_1.createImageData(w, h); }); + canvas.width = imageData.width; + canvas.height = imageData.height; + context_1.putImageData(imageData, 0, 0); + } + catch (e) { + console.error('JPEG decompression error', e.message); + } + return canvas; +} +initializeCanvas(createCanvas, createCanvasFromData); +export function initialize() { + initializeCanvas(createCanvas, createCanvasFromData); +} + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluaXRpYWxpemVDYW52YXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLFFBQVEsQ0FBQztBQUN0QyxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxTQUFTLENBQUM7QUFDM0MsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLFFBQVEsQ0FBQztBQUVwQyxTQUFTLG9CQUFvQixDQUFDLElBQWdCO0lBQzdDLElBQU0sTUFBTSxHQUFHLFlBQVksQ0FBQyxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUM7SUFFdEMsSUFBSTtRQUNILElBQU0sU0FBTyxHQUFHLE1BQU0sQ0FBQyxVQUFVLENBQUMsSUFBSSxDQUFFLENBQUM7UUFDekMsSUFBTSxTQUFTLEdBQUcsVUFBVSxDQUFDLElBQUksRUFBRSxVQUFDLENBQUMsRUFBRSxDQUFDLElBQUssT0FBQSxTQUFPLENBQUMsZUFBZSxDQUFDLENBQUMsRUFBRSxDQUFDLENBQUMsRUFBN0IsQ0FBNkIsQ0FBQyxDQUFDO1FBQzVFLE1BQU0sQ0FBQyxLQUFLLEdBQUcsU0FBUyxDQUFDLEtBQUssQ0FBQztRQUMvQixNQUFNLENBQUMsTUFBTSxHQUFHLFNBQVMsQ0FBQyxN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IGltYWdlRGF0YS5oZWlnaHQ7XHJcblx0XHRjb250ZXh0LnB1dEltYWdlRGF0YShpbWFnZURhdGEsIDAsIDApO1xyXG5cdH0gY2F0Y2ggKGU6IGFueSkge1xyXG5cdFx0Y29uc29sZS5lcnJvcignSlBFRyBkZWNvbXByZXNzaW9uIGVycm9yJywgZS5tZXNzYWdlKTtcclxuXHR9XHJcblxyXG5cdHJldHVybiBjYW52YXM7XHJcbn1cclxuXHJcbmluaXRpYWxpemVDYW52YXMoY3JlYXRlQ2FudmFzLCBjcmVhdGVDYW52YXNGcm9tRGF0YSk7XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gaW5pdGlhbGl6ZSgpIHtcclxuXHRpbml0aWFsaXplQ2FudmFzKGNyZWF0ZUNhbnZhcywgY3JlYXRlQ2FudmFzRnJvbURhdGEpO1xyXG59XHJcbiJdLCJzb3VyY2VSb290IjoiQzpcXFByb2plY3RzXFxnaXRodWJcXGFnLXBzZFxcc3JjIn0= diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/initializeCanvas.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/initializeCanvas.js.map deleted file mode 100644 index 0e5bb8a..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/initializeCanvas.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeCanvas.js","sourceRoot":"../src/","sources":["initializeCanvas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,SAAS,oBAAoB,CAAC,IAAgB;IAC7C,IAAM,MAAM,GAAG,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAEtC,IAAI;QACH,IAAM,SAAO,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAE,CAAC;QACzC,IAAM,SAAS,GAAG,UAAU,CAAC,IAAI,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAO,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,EAA7B,CAA6B,CAAC,CAAC;QAC5E,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;QAC/B,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;QACjC,SAAO,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;KACtC;IAAC,OAAO,CAAM,EAAE;QAChB,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;KACrD;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED,gBAAgB,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAC;AAErD,MAAM,UAAU,UAAU;IACzB,gBAAgB,CAAC,YAAY,EAAE,oBAAoB,CAAC,CAAC;AACtD,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/jpeg.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/jpeg.d.ts index 4f2afd8..af0c75a 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/jpeg.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/jpeg.d.ts @@ -1 +1 @@ -export declare function decodeJpeg(encoded: Uint8Array, createImageData: (width: number, height: number) => ImageData): ImageData; +export declare function decodeJpeg(encoded: Uint8Array, createImageData: (width: number, height: number) => ImageData): ImageData; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/jpeg.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/jpeg.js index a0d92c1..2735dd9 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/jpeg.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/jpeg.js @@ -1,1018 +1,1019 @@ -// based on https://github.com/jpeg-js/jpeg-js -/* - Copyright 2011 notmasteryet +// based on https://github.com/jpeg-js/jpeg-js +/* + Copyright 2011 notmasteryet - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -var dctZigZag = new Int32Array([ - 0, - 1, 8, - 16, 9, 2, - 3, 10, 17, 24, - 32, 25, 18, 11, 4, - 5, 12, 19, 26, 33, 40, - 48, 41, 34, 27, 20, 13, 6, - 7, 14, 21, 28, 35, 42, 49, 56, - 57, 50, 43, 36, 29, 22, 15, - 23, 30, 37, 44, 51, 58, - 59, 52, 45, 38, 31, - 39, 46, 53, 60, - 61, 54, 47, - 55, 62, - 63 -]); -var dctCos1 = 4017; // cos(pi/16) -var dctSin1 = 799; // sin(pi/16) -var dctCos3 = 3406; // cos(3*pi/16) -var dctSin3 = 2276; // sin(3*pi/16) -var dctCos6 = 1567; // cos(6*pi/16) -var dctSin6 = 3784; // sin(6*pi/16) -var dctSqrt2 = 5793; // sqrt(2) -var dctSqrt1d2 = 2896; // sqrt(2) / 2 -var maxResolutionInMP = 100; // Don't decode more than 100 megapixels -var maxMemoryUsageBytes = 64 * 1024 * 1024; // Don't decode if memory footprint is more than 64MB -var totalBytesAllocated = 0; // avoid unexpected OOMs from untrusted content. -function requestMemoryAllocation(increaseAmount) { - var totalMemoryImpactBytes = totalBytesAllocated + increaseAmount; - if (totalMemoryImpactBytes > maxMemoryUsageBytes) { - var exceededAmount = Math.ceil((totalMemoryImpactBytes - maxMemoryUsageBytes) / 1024 / 1024); - throw new Error("Max memory limit exceeded by at least ".concat(exceededAmount, "MB")); - } - totalBytesAllocated = totalMemoryImpactBytes; -} -function buildHuffmanTable(codeLengths, values) { - var length = 16; - while (length > 0 && !codeLengths[length - 1]) - length--; - var code = [{ children: [], index: 0 }]; - var k = 0; - var p = code[0]; - for (var i = 0; i < length; i++) { - for (var j = 0; j < codeLengths[i]; j++) { - p = code.pop(); - p.children[p.index] = values[k]; - while (p.index > 0) { - if (code.length === 0) - throw new Error('Could not recreate Huffman Table'); - p = code.pop(); - } - p.index++; - code.push(p); - while (code.length <= i) { - var q = { children: [], index: 0 }; - code.push(q); - p.children[p.index] = q.children; - p = q; - } - k++; - } - if (i + 1 < length) { - // p here points to last code - var q = { children: [], index: 0 }; - code.push(q); - p.children[p.index] = q.children; - p = q; - } - } - return code[0].children; -} -function decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successivePrev, successive) { - var mcusPerLine = frame.mcusPerLine; - var progressive = frame.progressive; - var startOffset = offset; - var bitsData = 0; - var bitsCount = 0; - function readBit() { - if (bitsCount > 0) { - bitsCount--; - return (bitsData >> bitsCount) & 1; - } - bitsData = data[offset++]; - if (bitsData == 0xFF) { - var nextByte = data[offset++]; - if (nextByte) - throw new Error("unexpected marker: ".concat(((bitsData << 8) | nextByte).toString(16))); - // unstuff 0 - } - bitsCount = 7; - return bitsData >>> 7; - } - function decodeHuffman(tree) { - var node = tree; - while (true) { - node = node[readBit()]; - if (typeof node === 'number') - return node; - if (node === undefined) - throw new Error('invalid huffman sequence'); - } - } - function receive(length) { - var n = 0; - while (length > 0) { - n = (n << 1) | readBit(); - length--; - } - return n; - } - function receiveAndExtend(length) { - var n = receive(length); - if (n >= 1 << (length - 1)) - return n; - return n + (-1 << length) + 1; - } - function decodeBaseline(component, zz) { - var t = decodeHuffman(component.huffmanTableDC); - var diff = t === 0 ? 0 : receiveAndExtend(t); - zz[0] = (component.pred += diff); - var k = 1; - while (k < 64) { - var rs = decodeHuffman(component.huffmanTableAC); - var s = rs & 15; - var r = rs >> 4; - if (s === 0) { - if (r < 15) - break; - k += 16; - continue; - } - k += r; - var z = dctZigZag[k]; - zz[z] = receiveAndExtend(s); - k++; - } - } - function decodeDCFirst(component, zz) { - var t = decodeHuffman(component.huffmanTableDC); - var diff = t === 0 ? 0 : (receiveAndExtend(t) << successive); - zz[0] = (component.pred += diff); - } - function decodeDCSuccessive(_component, zz) { - zz[0] |= readBit() << successive; - } - var eobrun = 0; - function decodeACFirst(component, zz) { - if (eobrun > 0) { - eobrun--; - return; - } - var k = spectralStart, e = spectralEnd; - while (k <= e) { - var rs = decodeHuffman(component.huffmanTableAC); - var s = rs & 15; - var r = rs >> 4; - if (s === 0) { - if (r < 15) { - eobrun = receive(r) + (1 << r) - 1; - break; - } - k += 16; - continue; - } - k += r; - var z = dctZigZag[k]; - zz[z] = receiveAndExtend(s) * (1 << successive); - k++; - } - } - var successiveACState = 0; - var successiveACNextValue = 0; - function decodeACSuccessive(component, zz) { - var k = spectralStart; - var e = spectralEnd; - var r = 0; - while (k <= e) { - var z = dctZigZag[k]; - var direction = zz[z] < 0 ? -1 : 1; - switch (successiveACState) { - case 0: // initial state - var rs = decodeHuffman(component.huffmanTableAC); - var s = rs & 15; - r = rs >> 4; // this was new variable in old code - if (s === 0) { - if (r < 15) { - eobrun = receive(r) + (1 << r); - successiveACState = 4; - } - else { - r = 16; - successiveACState = 1; - } - } - else { - if (s !== 1) - throw new Error('invalid ACn encoding'); - successiveACNextValue = receiveAndExtend(s); - successiveACState = r ? 2 : 3; - } - continue; - case 1: // skipping r zero items - case 2: - if (zz[z]) { - zz[z] += (readBit() << successive) * direction; - } - else { - r--; - if (r === 0) - successiveACState = successiveACState == 2 ? 3 : 0; - } - break; - case 3: // set value for a zero item - if (zz[z]) { - zz[z] += (readBit() << successive) * direction; - } - else { - zz[z] = successiveACNextValue << successive; - successiveACState = 0; - } - break; - case 4: // eob - if (zz[z]) { - zz[z] += (readBit() << successive) * direction; - } - break; - } - k++; - } - if (successiveACState === 4) { - eobrun--; - if (eobrun === 0) - successiveACState = 0; - } - } - function decodeMcu(component, decode, mcu, row, col) { - var mcuRow = (mcu / mcusPerLine) | 0; - var mcuCol = mcu % mcusPerLine; - var blockRow = mcuRow * component.v + row; - var blockCol = mcuCol * component.h + col; - // If the block is missing, just skip it. - if (component.blocks[blockRow] === undefined) - return; - decode(component, component.blocks[blockRow][blockCol]); - } - function decodeBlock(component, decode, mcu) { - var blockRow = (mcu / component.blocksPerLine) | 0; - var blockCol = mcu % component.blocksPerLine; - // If the block is missing, just skip it. - if (component.blocks[blockRow] === undefined) - return; - decode(component, component.blocks[blockRow][blockCol]); - } - var componentsLength = components.length; - var component; - var decodeFn; - if (progressive) { - if (spectralStart === 0) { - decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive; - } - else { - decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive; - } - } - else { - decodeFn = decodeBaseline; - } - var mcu = 0; - var mcuExpected; - if (componentsLength == 1) { - mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn; - } - else { - mcuExpected = mcusPerLine * frame.mcusPerColumn; - } - if (!resetInterval) - resetInterval = mcuExpected; - var h; - var v; - var marker; - while (mcu < mcuExpected) { - // reset interval stuff - for (var i = 0; i < componentsLength; i++) - components[i].pred = 0; - eobrun = 0; - if (componentsLength == 1) { - component = components[0]; - for (var n = 0; n < resetInterval; n++) { - decodeBlock(component, decodeFn, mcu); - mcu++; - } - } - else { - for (var n = 0; n < resetInterval; n++) { - for (var i = 0; i < componentsLength; i++) { - component = components[i]; - h = component.h; - v = component.v; - for (var j = 0; j < v; j++) { - for (var k = 0; k < h; k++) { - decodeMcu(component, decodeFn, mcu, j, k); - } - } - } - mcu++; - // If we've reached our expected MCU's, stop decoding - if (mcu === mcuExpected) - break; - } - } - if (mcu === mcuExpected) { - // Skip trailing bytes at the end of the scan - until we reach the next marker - do { - if (data[offset] === 0xFF) { - if (data[offset + 1] !== 0x00) { - break; - } - } - offset += 1; - } while (offset < data.length - 2); - } - // find marker - bitsCount = 0; - marker = (data[offset] << 8) | data[offset + 1]; - if (marker < 0xFF00) - throw new Error('marker was not found'); - if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx - offset += 2; - } - else { - break; - } - } - return offset - startOffset; -} -function buildComponentData(component) { - var lines = []; - var blocksPerLine = component.blocksPerLine; - var blocksPerColumn = component.blocksPerColumn; - var samplesPerLine = blocksPerLine << 3; - // Only 1 used per invocation of this function and garbage collected after invocation, so no need to account for its memory footprint. - var R = new Int32Array(64); - var r = new Uint8Array(64); - // A port of poppler's IDCT method which in turn is taken from: - // Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz, - // "Practical Fast 1-D DCT Algorithms with 11 Multiplications", - // IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989, - // 988-991. - function quantizeAndInverse(zz, dataOut, dataIn) { - var qt = component.quantizationTable; - var p = dataIn; - // dequant - for (var i = 0; i < 64; i++) { - p[i] = zz[i] * qt[i]; - } - // inverse DCT on rows - for (var i = 0; i < 8; ++i) { - var row = 8 * i; - // check for all-zero AC coefficients - if (p[1 + row] == 0 && p[2 + row] == 0 && p[3 + row] == 0 && - p[4 + row] == 0 && p[5 + row] == 0 && p[6 + row] == 0 && - p[7 + row] == 0) { - var t_1 = (dctSqrt2 * p[0 + row] + 512) >> 10; - p[0 + row] = t_1; - p[1 + row] = t_1; - p[2 + row] = t_1; - p[3 + row] = t_1; - p[4 + row] = t_1; - p[5 + row] = t_1; - p[6 + row] = t_1; - p[7 + row] = t_1; - continue; - } - // stage 4 - var v0 = (dctSqrt2 * p[0 + row] + 128) >> 8; - var v1 = (dctSqrt2 * p[4 + row] + 128) >> 8; - var v2 = p[2 + row]; - var v3 = p[6 + row]; - var v4 = (dctSqrt1d2 * (p[1 + row] - p[7 + row]) + 128) >> 8; - var v7 = (dctSqrt1d2 * (p[1 + row] + p[7 + row]) + 128) >> 8; - var v5 = p[3 + row] << 4; - var v6 = p[5 + row] << 4; - // stage 3 - var t = (v0 - v1 + 1) >> 1; - v0 = (v0 + v1 + 1) >> 1; - v1 = t; - t = (v2 * dctSin6 + v3 * dctCos6 + 128) >> 8; - v2 = (v2 * dctCos6 - v3 * dctSin6 + 128) >> 8; - v3 = t; - t = (v4 - v6 + 1) >> 1; - v4 = (v4 + v6 + 1) >> 1; - v6 = t; - t = (v7 + v5 + 1) >> 1; - v5 = (v7 - v5 + 1) >> 1; - v7 = t; - // stage 2 - t = (v0 - v3 + 1) >> 1; - v0 = (v0 + v3 + 1) >> 1; - v3 = t; - t = (v1 - v2 + 1) >> 1; - v1 = (v1 + v2 + 1) >> 1; - v2 = t; - t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12; - v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12; - v7 = t; - t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12; - v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12; - v6 = t; - // stage 1 - p[0 + row] = v0 + v7; - p[7 + row] = v0 - v7; - p[1 + row] = v1 + v6; - p[6 + row] = v1 - v6; - p[2 + row] = v2 + v5; - p[5 + row] = v2 - v5; - p[3 + row] = v3 + v4; - p[4 + row] = v3 - v4; - } - // inverse DCT on columns - for (var i = 0; i < 8; ++i) { - var col = i; - // check for all-zero AC coefficients - if (p[1 * 8 + col] == 0 && p[2 * 8 + col] == 0 && p[3 * 8 + col] == 0 && - p[4 * 8 + col] == 0 && p[5 * 8 + col] == 0 && p[6 * 8 + col] == 0 && - p[7 * 8 + col] == 0) { - var t_2 = (dctSqrt2 * dataIn[i + 0] + 8192) >> 14; - p[0 * 8 + col] = t_2; - p[1 * 8 + col] = t_2; - p[2 * 8 + col] = t_2; - p[3 * 8 + col] = t_2; - p[4 * 8 + col] = t_2; - p[5 * 8 + col] = t_2; - p[6 * 8 + col] = t_2; - p[7 * 8 + col] = t_2; - continue; - } - // stage 4 - var v0 = (dctSqrt2 * p[0 * 8 + col] + 2048) >> 12; - var v1 = (dctSqrt2 * p[4 * 8 + col] + 2048) >> 12; - var v2 = p[2 * 8 + col]; - var v3 = p[6 * 8 + col]; - var v4 = (dctSqrt1d2 * (p[1 * 8 + col] - p[7 * 8 + col]) + 2048) >> 12; - var v7 = (dctSqrt1d2 * (p[1 * 8 + col] + p[7 * 8 + col]) + 2048) >> 12; - var v5 = p[3 * 8 + col]; - var v6 = p[5 * 8 + col]; - // stage 3 - var t = (v0 - v1 + 1) >> 1; - v0 = (v0 + v1 + 1) >> 1; - v1 = t; - t = (v2 * dctSin6 + v3 * dctCos6 + 2048) >> 12; - v2 = (v2 * dctCos6 - v3 * dctSin6 + 2048) >> 12; - v3 = t; - t = (v4 - v6 + 1) >> 1; - v4 = (v4 + v6 + 1) >> 1; - v6 = t; - t = (v7 + v5 + 1) >> 1; - v5 = (v7 - v5 + 1) >> 1; - v7 = t; - // stage 2 - t = (v0 - v3 + 1) >> 1; - v0 = (v0 + v3 + 1) >> 1; - v3 = t; - t = (v1 - v2 + 1) >> 1; - v1 = (v1 + v2 + 1) >> 1; - v2 = t; - t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12; - v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12; - v7 = t; - t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12; - v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12; - v6 = t; - // stage 1 - p[0 * 8 + col] = v0 + v7; - p[7 * 8 + col] = v0 - v7; - p[1 * 8 + col] = v1 + v6; - p[6 * 8 + col] = v1 - v6; - p[2 * 8 + col] = v2 + v5; - p[5 * 8 + col] = v2 - v5; - p[3 * 8 + col] = v3 + v4; - p[4 * 8 + col] = v3 - v4; - } - // convert to 8-bit integers - for (var i = 0; i < 64; ++i) { - var sample = 128 + ((p[i] + 8) >> 4); - dataOut[i] = sample < 0 ? 0 : sample > 0xFF ? 0xFF : sample; - } - } - requestMemoryAllocation(samplesPerLine * blocksPerColumn * 8); - for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) { - var scanLine = blockRow << 3; - for (var i = 0; i < 8; i++) - lines.push(new Uint8Array(samplesPerLine)); - for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) { - quantizeAndInverse(component.blocks[blockRow][blockCol], r, R); - var offset = 0; - var sample = blockCol << 3; - for (var j = 0; j < 8; j++) { - var line = lines[scanLine + j]; - for (var i = 0; i < 8; i++) - line[sample + i] = r[offset++]; - } - } - } - return lines; -} -function clampTo8bit(a) { - return a < 0 ? 0 : a > 255 ? 255 : a; -} -function parse(data) { - var self = { - width: 0, - height: 0, - comments: [], - adobe: undefined, - components: [], - exifBuffer: undefined, - jfif: undefined, - }; - var maxResolutionInPixels = maxResolutionInMP * 1000 * 1000; - var offset = 0; - function readUint16() { - var value = (data[offset] << 8) | data[offset + 1]; - offset += 2; - return value; - } - function readDataBlock() { - var length = readUint16(); - var array = data.subarray(offset, offset + length - 2); - offset += array.length; - return array; - } - function prepareComponents(frame) { - var maxH = 0, maxV = 0; - for (var componentId in frame.components) { - if (frame.components.hasOwnProperty(componentId)) { - var component = frame.components[componentId]; - if (maxH < component.h) - maxH = component.h; - if (maxV < component.v) - maxV = component.v; - } - } - var mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / maxH); - var mcusPerColumn = Math.ceil(frame.scanLines / 8 / maxV); - for (var componentId in frame.components) { - if (frame.components.hasOwnProperty(componentId)) { - var component = frame.components[componentId]; - var blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / maxH); - var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / maxV); - var blocksPerLineForMcu = mcusPerLine * component.h; - var blocksPerColumnForMcu = mcusPerColumn * component.v; - var blocksToAllocate = blocksPerColumnForMcu * blocksPerLineForMcu; - var blocks = []; - // Each block is a Int32Array of length 64 (4 x 64 = 256 bytes) - requestMemoryAllocation(blocksToAllocate * 256); - for (var i = 0; i < blocksPerColumnForMcu; i++) { - var row = []; - for (var j = 0; j < blocksPerLineForMcu; j++) { - row.push(new Int32Array(64)); - } - blocks.push(row); - } - component.blocksPerLine = blocksPerLine; - component.blocksPerColumn = blocksPerColumn; - component.blocks = blocks; - } - } - frame.maxH = maxH; - frame.maxV = maxV; - frame.mcusPerLine = mcusPerLine; - frame.mcusPerColumn = mcusPerColumn; - } - var jfif = null; - var adobe = null; - var frame = undefined; - var resetInterval = 0; - var quantizationTables = []; - var frames = []; - var huffmanTablesAC = []; - var huffmanTablesDC = []; - var fileMarker = readUint16(); - var malformedDataOffset = -1; - if (fileMarker != 0xFFD8) { // SOI (Start of Image) - throw new Error('SOI not found'); - } - fileMarker = readUint16(); - while (fileMarker != 0xFFD9) { // EOI (End of image) - switch (fileMarker) { - case 0xFF00: break; - case 0xFFE0: // APP0 (Application Specific) - case 0xFFE1: // APP1 - case 0xFFE2: // APP2 - case 0xFFE3: // APP3 - case 0xFFE4: // APP4 - case 0xFFE5: // APP5 - case 0xFFE6: // APP6 - case 0xFFE7: // APP7 - case 0xFFE8: // APP8 - case 0xFFE9: // APP9 - case 0xFFEA: // APP10 - case 0xFFEB: // APP11 - case 0xFFEC: // APP12 - case 0xFFED: // APP13 - case 0xFFEE: // APP14 - case 0xFFEF: // APP15 - case 0xFFFE: { // COM (Comment) - var appData = readDataBlock(); - if (fileMarker === 0xFFFE) { - var comment = ''; - for (var ii = 0; ii < appData.byteLength; ii++) { - comment += String.fromCharCode(appData[ii]); - } - self.comments.push(comment); - } - if (fileMarker === 0xFFE0) { - if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49 && - appData[3] === 0x46 && appData[4] === 0) { // 'JFIF\x00' - jfif = { - version: { major: appData[5], minor: appData[6] }, - densityUnits: appData[7], - xDensity: (appData[8] << 8) | appData[9], - yDensity: (appData[10] << 8) | appData[11], - thumbWidth: appData[12], - thumbHeight: appData[13], - thumbData: appData.subarray(14, 14 + 3 * appData[12] * appData[13]) - }; - } - } - // TODO APP1 - Exif - if (fileMarker === 0xFFE1) { - if (appData[0] === 0x45 && - appData[1] === 0x78 && - appData[2] === 0x69 && - appData[3] === 0x66 && - appData[4] === 0) { // 'EXIF\x00' - self.exifBuffer = appData.subarray(5, appData.length); - } - } - if (fileMarker === 0xFFEE) { - if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6F && - appData[3] === 0x62 && appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\x00' - adobe = { - version: appData[6], - flags0: (appData[7] << 8) | appData[8], - flags1: (appData[9] << 8) | appData[10], - transformCode: appData[11] - }; - } - } - break; - } - case 0xFFDB: { // DQT (Define Quantization Tables) - var quantizationTablesLength = readUint16(); - var quantizationTablesEnd = quantizationTablesLength + offset - 2; - while (offset < quantizationTablesEnd) { - var quantizationTableSpec = data[offset++]; - requestMemoryAllocation(64 * 4); - var tableData = new Int32Array(64); - if ((quantizationTableSpec >> 4) === 0) { // 8 bit values - for (var j = 0; j < 64; j++) { - var z = dctZigZag[j]; - tableData[z] = data[offset++]; - } - } - else if ((quantizationTableSpec >> 4) === 1) { //16 bit - for (var j = 0; j < 64; j++) { - var z = dctZigZag[j]; - tableData[z] = readUint16(); - } - } - else - throw new Error('DQT: invalid table spec'); - quantizationTables[quantizationTableSpec & 15] = tableData; - } - break; - } - case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT) - case 0xFFC1: // SOF1 (Start of Frame, Extended DCT) - case 0xFFC2: { // SOF2 (Start of Frame, Progressive DCT) - readUint16(); // skip data length - frame = { - extended: (fileMarker === 0xFFC1), - progressive: (fileMarker === 0xFFC2), - precision: data[offset++], - scanLines: readUint16(), - samplesPerLine: readUint16(), - components: {}, - componentsOrder: [], - maxH: 0, - maxV: 0, - mcusPerLine: 0, - mcusPerColumn: 0, - }; - var pixelsInFrame = frame.scanLines * frame.samplesPerLine; - if (pixelsInFrame > maxResolutionInPixels) { - var exceededAmount = Math.ceil((pixelsInFrame - maxResolutionInPixels) / 1e6); - throw new Error("maxResolutionInMP limit exceeded by ".concat(exceededAmount, "MP")); - } - var componentsCount = data[offset++]; - for (var i = 0; i < componentsCount; i++) { - var componentId = data[offset]; - var h = data[offset + 1] >> 4; - var v = data[offset + 1] & 15; - var qId = data[offset + 2]; - frame.componentsOrder.push(componentId); - frame.components[componentId] = { - h: h, - v: v, - quantizationIdx: qId, - blocksPerColumn: 0, - blocksPerLine: 0, - blocks: [], - pred: 0, - }; - offset += 3; - } - prepareComponents(frame); - frames.push(frame); - break; - } - case 0xFFC4: { // DHT (Define Huffman Tables) - var huffmanLength = readUint16(); - for (var i = 2; i < huffmanLength;) { - var huffmanTableSpec = data[offset++]; - var codeLengths = new Uint8Array(16); - var codeLengthSum = 0; - for (var j = 0; j < 16; j++, offset++) { - codeLengthSum += (codeLengths[j] = data[offset]); - } - requestMemoryAllocation(16 + codeLengthSum); - var huffmanValues = new Uint8Array(codeLengthSum); - for (var j = 0; j < codeLengthSum; j++, offset++) { - huffmanValues[j] = data[offset]; - } - i += 17 + codeLengthSum; - var index = huffmanTableSpec & 15; - var table = (huffmanTableSpec >> 4) === 0 ? huffmanTablesDC : huffmanTablesAC; - table[index] = buildHuffmanTable(codeLengths, huffmanValues); - } - break; - } - case 0xFFDD: // DRI (Define Restart Interval) - readUint16(); // skip data length - resetInterval = readUint16(); - break; - case 0xFFDC: // Number of Lines marker - readUint16(); // skip data length - readUint16(); // Ignore this data since it represents the image height - break; - case 0xFFDA: { // SOS (Start of Scan) - readUint16(); // skip data length - var selectorsCount = data[offset++]; - var components = []; - for (var i = 0; i < selectorsCount; i++) { - var component = frame.components[data[offset++]]; - var tableSpec = data[offset++]; - component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4]; - component.huffmanTableAC = huffmanTablesAC[tableSpec & 15]; - components.push(component); - } - var spectralStart = data[offset++]; - var spectralEnd = data[offset++]; - var successiveApproximation = data[offset++]; - var processed = decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successiveApproximation >> 4, successiveApproximation & 15); - offset += processed; - break; - } - case 0xFFFF: // Fill bytes - if (data[offset] !== 0xFF) { // Avoid skipping a valid marker. - offset--; - } - break; - default: { - if (data[offset - 3] == 0xFF && data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) { - // could be incorrect encoding -- last 0xFF byte of the previous - // block was eaten by the encoder - offset -= 3; - break; - } - else if (fileMarker === 0xE0 || fileMarker == 0xE1) { - // Recover from malformed APP1 markers popular in some phone models. - // See https://github.com/eugeneware/jpeg-js/issues/82 - if (malformedDataOffset !== -1) { - throw new Error("first unknown JPEG marker at offset ".concat(malformedDataOffset.toString(16), ", second unknown JPEG marker ").concat(fileMarker.toString(16), " at offset ").concat((offset - 1).toString(16))); - } - malformedDataOffset = offset - 1; - var nextOffset = readUint16(); - if (data[offset + nextOffset - 2] === 0xFF) { - offset += nextOffset - 2; - break; - } - } - throw new Error('unknown JPEG marker ' + fileMarker.toString(16)); - } - } - fileMarker = readUint16(); - } - if (frames.length != 1) - throw new Error('only single frame JPEGs supported'); - // set each frame's components quantization table - for (var i = 0; i < frames.length; i++) { - var cp = frames[i].components; - for (var j in cp) { // TODO: don't use `in` - cp[j].quantizationTable = quantizationTables[cp[j].quantizationIdx]; - delete cp[j].quantizationIdx; // TODO: why ??? - } - } - self.width = frame.samplesPerLine; - self.height = frame.scanLines; - self.jfif = jfif; - self.adobe = adobe; - self.components = []; - for (var i = 0; i < frame.componentsOrder.length; i++) { - var component = frame.components[frame.componentsOrder[i]]; - self.components.push({ - lines: buildComponentData(component), - scaleX: component.h / frame.maxH, - scaleY: component.v / frame.maxV - }); - } - return self; -} -function getData(decoded) { - var offset = 0; - var colorTransform = false; - var width = decoded.width; - var height = decoded.height; - var dataLength = width * height * decoded.components.length; - requestMemoryAllocation(dataLength); - var data = new Uint8Array(dataLength); - switch (decoded.components.length) { - case 1: { - var component1 = decoded.components[0]; - for (var y = 0; y < height; y++) { - var component1Line = component1.lines[0 | (y * component1.scaleY)]; - for (var x = 0; x < width; x++) { - var Y = component1Line[0 | (x * component1.scaleX)]; - data[offset++] = Y; - } - } - break; - } - case 2: { - // PDF might compress two component data in custom colorspace - var component1 = decoded.components[0]; - var component2 = decoded.components[1]; - for (var y = 0; y < height; y++) { - var component1Line = component1.lines[0 | (y * component1.scaleY)]; - var component2Line = component2.lines[0 | (y * component2.scaleY)]; - for (var x = 0; x < width; x++) { - var Y1 = component1Line[0 | (x * component1.scaleX)]; - data[offset++] = Y1; - var Y2 = component2Line[0 | (x * component2.scaleX)]; - data[offset++] = Y2; - } - } - break; - } - case 3: { - // The default transform for three components is true - colorTransform = true; - // The adobe transform marker overrides any previous setting - if (decoded.adobe && decoded.adobe.transformCode) - colorTransform = true; - var component1 = decoded.components[0]; - var component2 = decoded.components[1]; - var component3 = decoded.components[2]; - for (var y = 0; y < height; y++) { - var component1Line = component1.lines[0 | (y * component1.scaleY)]; - var component2Line = component2.lines[0 | (y * component2.scaleY)]; - var component3Line = component3.lines[0 | (y * component3.scaleY)]; - for (var x = 0; x < width; x++) { - var Y = void 0, Cb = void 0, Cr = void 0, R = void 0, G = void 0, B = void 0; - if (!colorTransform) { - R = component1Line[0 | (x * component1.scaleX)]; - G = component2Line[0 | (x * component2.scaleX)]; - B = component3Line[0 | (x * component3.scaleX)]; - } - else { - Y = component1Line[0 | (x * component1.scaleX)]; - Cb = component2Line[0 | (x * component2.scaleX)]; - Cr = component3Line[0 | (x * component3.scaleX)]; - R = clampTo8bit(Y + 1.402 * (Cr - 128)); - G = clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128)); - B = clampTo8bit(Y + 1.772 * (Cb - 128)); - } - data[offset++] = R; - data[offset++] = G; - data[offset++] = B; - } - } - break; - } - case 4: { - if (!decoded.adobe) - throw new Error('Unsupported color mode (4 components)'); - // The default transform for four components is false - colorTransform = false; - // The adobe transform marker overrides any previous setting - if (decoded.adobe && decoded.adobe.transformCode) - colorTransform = true; - var component1 = decoded.components[0]; - var component2 = decoded.components[1]; - var component3 = decoded.components[2]; - var component4 = decoded.components[3]; - for (var y = 0; y < height; y++) { - var component1Line = component1.lines[0 | (y * component1.scaleY)]; - var component2Line = component2.lines[0 | (y * component2.scaleY)]; - var component3Line = component3.lines[0 | (y * component3.scaleY)]; - var component4Line = component4.lines[0 | (y * component4.scaleY)]; - for (var x = 0; x < width; x++) { - var Y = void 0, Cb = void 0, Cr = void 0, K = void 0, C = void 0, M = void 0, Ye = void 0; - if (!colorTransform) { - C = component1Line[0 | (x * component1.scaleX)]; - M = component2Line[0 | (x * component2.scaleX)]; - Ye = component3Line[0 | (x * component3.scaleX)]; - K = component4Line[0 | (x * component4.scaleX)]; - } - else { - Y = component1Line[0 | (x * component1.scaleX)]; - Cb = component2Line[0 | (x * component2.scaleX)]; - Cr = component3Line[0 | (x * component3.scaleX)]; - K = component4Line[0 | (x * component4.scaleX)]; - C = 255 - clampTo8bit(Y + 1.402 * (Cr - 128)); - M = 255 - clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128)); - Ye = 255 - clampTo8bit(Y + 1.772 * (Cb - 128)); - } - data[offset++] = 255 - C; - data[offset++] = 255 - M; - data[offset++] = 255 - Ye; - data[offset++] = 255 - K; - } - } - break; - } - default: - throw new Error('Unsupported color mode'); - } - return data; -} -export function decodeJpeg(encoded, createImageData) { - totalBytesAllocated = 0; - if (encoded.length === 0) - throw new Error('Empty jpeg buffer'); - var decoded = parse(encoded); - requestMemoryAllocation(decoded.width * decoded.height * 4); - var data = getData(decoded); - var imageData = createImageData(decoded.width, decoded.height); - var width = imageData.width; - var height = imageData.height; - var imageDataArray = imageData.data; - var i = 0; - var j = 0; - switch (decoded.components.length) { - case 1: - for (var y = 0; y < height; y++) { - for (var x = 0; x < width; x++) { - var Y = data[i++]; - imageDataArray[j++] = Y; - imageDataArray[j++] = Y; - imageDataArray[j++] = Y; - imageDataArray[j++] = 255; - } - } - break; - case 3: - for (var y = 0; y < height; y++) { - for (var x = 0; x < width; x++) { - var R = data[i++]; - var G = data[i++]; - var B = data[i++]; - imageDataArray[j++] = R; - imageDataArray[j++] = G; - imageDataArray[j++] = B; - imageDataArray[j++] = 255; - } - } - break; - case 4: - for (var y = 0; y < height; y++) { - for (var x = 0; x < width; x++) { - var C = data[i++]; - var M = data[i++]; - var Y = data[i++]; - var K = data[i++]; - var R = 255 - clampTo8bit(C * (1 - K / 255) + K); - var G = 255 - clampTo8bit(M * (1 - K / 255) + K); - var B = 255 - clampTo8bit(Y * (1 - K / 255) + K); - imageDataArray[j++] = R; - imageDataArray[j++] = G; - imageDataArray[j++] = B; - imageDataArray[j++] = 255; - } - } - break; - default: - throw new Error('Unsupported color mode'); - } - return imageData; -} -//# sourceMappingURL=jpeg.js.map \ No newline at end of file + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +var dctZigZag = new Int32Array([ + 0, + 1, 8, + 16, 9, 2, + 3, 10, 17, 24, + 32, 25, 18, 11, 4, + 5, 12, 19, 26, 33, 40, + 48, 41, 34, 27, 20, 13, 6, + 7, 14, 21, 28, 35, 42, 49, 56, + 57, 50, 43, 36, 29, 22, 15, + 23, 30, 37, 44, 51, 58, + 59, 52, 45, 38, 31, + 39, 46, 53, 60, + 61, 54, 47, + 55, 62, + 63 +]); +var dctCos1 = 4017; // cos(pi/16) +var dctSin1 = 799; // sin(pi/16) +var dctCos3 = 3406; // cos(3*pi/16) +var dctSin3 = 2276; // sin(3*pi/16) +var dctCos6 = 1567; // cos(6*pi/16) +var dctSin6 = 3784; // sin(6*pi/16) +var dctSqrt2 = 5793; // sqrt(2) +var dctSqrt1d2 = 2896; // sqrt(2) / 2 +var maxResolutionInMP = 100; // Don't decode more than 100 megapixels +var maxMemoryUsageBytes = 64 * 1024 * 1024; // Don't decode if memory footprint is more than 64MB +var totalBytesAllocated = 0; // avoid unexpected OOMs from untrusted content. +function requestMemoryAllocation(increaseAmount) { + var totalMemoryImpactBytes = totalBytesAllocated + increaseAmount; + if (totalMemoryImpactBytes > maxMemoryUsageBytes) { + var exceededAmount = Math.ceil((totalMemoryImpactBytes - maxMemoryUsageBytes) / 1024 / 1024); + throw new Error("Max memory limit exceeded by at least ".concat(exceededAmount, "MB")); + } + totalBytesAllocated = totalMemoryImpactBytes; +} +function buildHuffmanTable(codeLengths, values) { + var length = 16; + while (length > 0 && !codeLengths[length - 1]) + length--; + var code = [{ children: [], index: 0 }]; + var k = 0; + var p = code[0]; + for (var i = 0; i < length; i++) { + for (var j = 0; j < codeLengths[i]; j++) { + p = code.pop(); + p.children[p.index] = values[k]; + while (p.index > 0) { + if (code.length === 0) + throw new Error('Could not recreate Huffman Table'); + p = code.pop(); + } + p.index++; + code.push(p); + while (code.length <= i) { + var q = { children: [], index: 0 }; + code.push(q); + p.children[p.index] = q.children; + p = q; + } + k++; + } + if (i + 1 < length) { + // p here points to last code + var q = { children: [], index: 0 }; + code.push(q); + p.children[p.index] = q.children; + p = q; + } + } + return code[0].children; +} +function decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successivePrev, successive) { + var mcusPerLine = frame.mcusPerLine; + var progressive = frame.progressive; + var startOffset = offset; + var bitsData = 0; + var bitsCount = 0; + function readBit() { + if (bitsCount > 0) { + bitsCount--; + return (bitsData >> bitsCount) & 1; + } + bitsData = data[offset++]; + if (bitsData == 0xFF) { + var nextByte = data[offset++]; + if (nextByte) + throw new Error("unexpected marker: ".concat(((bitsData << 8) | nextByte).toString(16))); + // unstuff 0 + } + bitsCount = 7; + return bitsData >>> 7; + } + function decodeHuffman(tree) { + var node = tree; + while (true) { + node = node[readBit()]; + if (typeof node === 'number') + return node; + if (node === undefined) + throw new Error('invalid huffman sequence'); + } + } + function receive(length) { + var n = 0; + while (length > 0) { + n = (n << 1) | readBit(); + length--; + } + return n; + } + function receiveAndExtend(length) { + var n = receive(length); + if (n >= 1 << (length - 1)) + return n; + return n + (-1 << length) + 1; + } + function decodeBaseline(component, zz) { + var t = decodeHuffman(component.huffmanTableDC); + var diff = t === 0 ? 0 : receiveAndExtend(t); + zz[0] = (component.pred += diff); + var k = 1; + while (k < 64) { + var rs = decodeHuffman(component.huffmanTableAC); + var s = rs & 15; + var r = rs >> 4; + if (s === 0) { + if (r < 15) + break; + k += 16; + continue; + } + k += r; + var z = dctZigZag[k]; + zz[z] = receiveAndExtend(s); + k++; + } + } + function decodeDCFirst(component, zz) { + var t = decodeHuffman(component.huffmanTableDC); + var diff = t === 0 ? 0 : (receiveAndExtend(t) << successive); + zz[0] = (component.pred += diff); + } + function decodeDCSuccessive(_component, zz) { + zz[0] |= readBit() << successive; + } + var eobrun = 0; + function decodeACFirst(component, zz) { + if (eobrun > 0) { + eobrun--; + return; + } + var k = spectralStart, e = spectralEnd; + while (k <= e) { + var rs = decodeHuffman(component.huffmanTableAC); + var s = rs & 15; + var r = rs >> 4; + if (s === 0) { + if (r < 15) { + eobrun = receive(r) + (1 << r) - 1; + break; + } + k += 16; + continue; + } + k += r; + var z = dctZigZag[k]; + zz[z] = receiveAndExtend(s) * (1 << successive); + k++; + } + } + var successiveACState = 0; + var successiveACNextValue = 0; + function decodeACSuccessive(component, zz) { + var k = spectralStart; + var e = spectralEnd; + var r = 0; + while (k <= e) { + var z = dctZigZag[k]; + var direction = zz[z] < 0 ? -1 : 1; + switch (successiveACState) { + case 0: // initial state + var rs = decodeHuffman(component.huffmanTableAC); + var s = rs & 15; + r = rs >> 4; // this was new variable in old code + if (s === 0) { + if (r < 15) { + eobrun = receive(r) + (1 << r); + successiveACState = 4; + } + else { + r = 16; + successiveACState = 1; + } + } + else { + if (s !== 1) + throw new Error('invalid ACn encoding'); + successiveACNextValue = receiveAndExtend(s); + successiveACState = r ? 2 : 3; + } + continue; + case 1: // skipping r zero items + case 2: + if (zz[z]) { + zz[z] += (readBit() << successive) * direction; + } + else { + r--; + if (r === 0) + successiveACState = successiveACState == 2 ? 3 : 0; + } + break; + case 3: // set value for a zero item + if (zz[z]) { + zz[z] += (readBit() << successive) * direction; + } + else { + zz[z] = successiveACNextValue << successive; + successiveACState = 0; + } + break; + case 4: // eob + if (zz[z]) { + zz[z] += (readBit() << successive) * direction; + } + break; + } + k++; + } + if (successiveACState === 4) { + eobrun--; + if (eobrun === 0) + successiveACState = 0; + } + } + function decodeMcu(component, decode, mcu, row, col) { + var mcuRow = (mcu / mcusPerLine) | 0; + var mcuCol = mcu % mcusPerLine; + var blockRow = mcuRow * component.v + row; + var blockCol = mcuCol * component.h + col; + // If the block is missing, just skip it. + if (component.blocks[blockRow] === undefined) + return; + decode(component, component.blocks[blockRow][blockCol]); + } + function decodeBlock(component, decode, mcu) { + var blockRow = (mcu / component.blocksPerLine) | 0; + var blockCol = mcu % component.blocksPerLine; + // If the block is missing, just skip it. + if (component.blocks[blockRow] === undefined) + return; + decode(component, component.blocks[blockRow][blockCol]); + } + var componentsLength = components.length; + var component; + var decodeFn; + if (progressive) { + if (spectralStart === 0) { + decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive; + } + else { + decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive; + } + } + else { + decodeFn = decodeBaseline; + } + var mcu = 0; + var mcuExpected; + if (componentsLength == 1) { + mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn; + } + else { + mcuExpected = mcusPerLine * frame.mcusPerColumn; + } + if (!resetInterval) + resetInterval = mcuExpected; + var h; + var v; + var marker; + while (mcu < mcuExpected) { + // reset interval stuff + for (var i = 0; i < componentsLength; i++) + components[i].pred = 0; + eobrun = 0; + if (componentsLength == 1) { + component = components[0]; + for (var n = 0; n < resetInterval; n++) { + decodeBlock(component, decodeFn, mcu); + mcu++; + } + } + else { + for (var n = 0; n < resetInterval; n++) { + for (var i = 0; i < componentsLength; i++) { + component = components[i]; + h = component.h; + v = component.v; + for (var j = 0; j < v; j++) { + for (var k = 0; k < h; k++) { + decodeMcu(component, decodeFn, mcu, j, k); + } + } + } + mcu++; + // If we've reached our expected MCU's, stop decoding + if (mcu === mcuExpected) + break; + } + } + if (mcu === mcuExpected) { + // Skip trailing bytes at the end of the scan - until we reach the next marker + do { + if (data[offset] === 0xFF) { + if (data[offset + 1] !== 0x00) { + break; + } + } + offset += 1; + } while (offset < data.length - 2); + } + // find marker + bitsCount = 0; + marker = (data[offset] << 8) | data[offset + 1]; + if (marker < 0xFF00) + throw new Error('marker was not found'); + if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx + offset += 2; + } + else { + break; + } + } + return offset - startOffset; +} +function buildComponentData(component) { + var lines = []; + var blocksPerLine = component.blocksPerLine; + var blocksPerColumn = component.blocksPerColumn; + var samplesPerLine = blocksPerLine << 3; + // Only 1 used per invocation of this function and garbage collected after invocation, so no need to account for its memory footprint. + var R = new Int32Array(64); + var r = new Uint8Array(64); + // A port of poppler's IDCT method which in turn is taken from: + // Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz, + // "Practical Fast 1-D DCT Algorithms with 11 Multiplications", + // IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989, + // 988-991. + function quantizeAndInverse(zz, dataOut, dataIn) { + var qt = component.quantizationTable; + var p = dataIn; + // dequant + for (var i = 0; i < 64; i++) { + p[i] = zz[i] * qt[i]; + } + // inverse DCT on rows + for (var i = 0; i < 8; ++i) { + var row = 8 * i; + // check for all-zero AC coefficients + if (p[1 + row] == 0 && p[2 + row] == 0 && p[3 + row] == 0 && + p[4 + row] == 0 && p[5 + row] == 0 && p[6 + row] == 0 && + p[7 + row] == 0) { + var t_1 = (dctSqrt2 * p[0 + row] + 512) >> 10; + p[0 + row] = t_1; + p[1 + row] = t_1; + p[2 + row] = t_1; + p[3 + row] = t_1; + p[4 + row] = t_1; + p[5 + row] = t_1; + p[6 + row] = t_1; + p[7 + row] = t_1; + continue; + } + // stage 4 + var v0 = (dctSqrt2 * p[0 + row] + 128) >> 8; + var v1 = (dctSqrt2 * p[4 + row] + 128) >> 8; + var v2 = p[2 + row]; + var v3 = p[6 + row]; + var v4 = (dctSqrt1d2 * (p[1 + row] - p[7 + row]) + 128) >> 8; + var v7 = (dctSqrt1d2 * (p[1 + row] + p[7 + row]) + 128) >> 8; + var v5 = p[3 + row] << 4; + var v6 = p[5 + row] << 4; + // stage 3 + var t = (v0 - v1 + 1) >> 1; + v0 = (v0 + v1 + 1) >> 1; + v1 = t; + t = (v2 * dctSin6 + v3 * dctCos6 + 128) >> 8; + v2 = (v2 * dctCos6 - v3 * dctSin6 + 128) >> 8; + v3 = t; + t = (v4 - v6 + 1) >> 1; + v4 = (v4 + v6 + 1) >> 1; + v6 = t; + t = (v7 + v5 + 1) >> 1; + v5 = (v7 - v5 + 1) >> 1; + v7 = t; + // stage 2 + t = (v0 - v3 + 1) >> 1; + v0 = (v0 + v3 + 1) >> 1; + v3 = t; + t = (v1 - v2 + 1) >> 1; + v1 = (v1 + v2 + 1) >> 1; + v2 = t; + t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12; + v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12; + v7 = t; + t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12; + v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12; + v6 = t; + // stage 1 + p[0 + row] = v0 + v7; + p[7 + row] = v0 - v7; + p[1 + row] = v1 + v6; + p[6 + row] = v1 - v6; + p[2 + row] = v2 + v5; + p[5 + row] = v2 - v5; + p[3 + row] = v3 + v4; + p[4 + row] = v3 - v4; + } + // inverse DCT on columns + for (var i = 0; i < 8; ++i) { + var col = i; + // check for all-zero AC coefficients + if (p[1 * 8 + col] == 0 && p[2 * 8 + col] == 0 && p[3 * 8 + col] == 0 && + p[4 * 8 + col] == 0 && p[5 * 8 + col] == 0 && p[6 * 8 + col] == 0 && + p[7 * 8 + col] == 0) { + var t_2 = (dctSqrt2 * dataIn[i + 0] + 8192) >> 14; + p[0 * 8 + col] = t_2; + p[1 * 8 + col] = t_2; + p[2 * 8 + col] = t_2; + p[3 * 8 + col] = t_2; + p[4 * 8 + col] = t_2; + p[5 * 8 + col] = t_2; + p[6 * 8 + col] = t_2; + p[7 * 8 + col] = t_2; + continue; + } + // stage 4 + var v0 = (dctSqrt2 * p[0 * 8 + col] + 2048) >> 12; + var v1 = (dctSqrt2 * p[4 * 8 + col] + 2048) >> 12; + var v2 = p[2 * 8 + col]; + var v3 = p[6 * 8 + col]; + var v4 = (dctSqrt1d2 * (p[1 * 8 + col] - p[7 * 8 + col]) + 2048) >> 12; + var v7 = (dctSqrt1d2 * (p[1 * 8 + col] + p[7 * 8 + col]) + 2048) >> 12; + var v5 = p[3 * 8 + col]; + var v6 = p[5 * 8 + col]; + // stage 3 + var t = (v0 - v1 + 1) >> 1; + v0 = (v0 + v1 + 1) >> 1; + v1 = t; + t = (v2 * dctSin6 + v3 * dctCos6 + 2048) >> 12; + v2 = (v2 * dctCos6 - v3 * dctSin6 + 2048) >> 12; + v3 = t; + t = (v4 - v6 + 1) >> 1; + v4 = (v4 + v6 + 1) >> 1; + v6 = t; + t = (v7 + v5 + 1) >> 1; + v5 = (v7 - v5 + 1) >> 1; + v7 = t; + // stage 2 + t = (v0 - v3 + 1) >> 1; + v0 = (v0 + v3 + 1) >> 1; + v3 = t; + t = (v1 - v2 + 1) >> 1; + v1 = (v1 + v2 + 1) >> 1; + v2 = t; + t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12; + v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12; + v7 = t; + t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12; + v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12; + v6 = t; + // stage 1 + p[0 * 8 + col] = v0 + v7; + p[7 * 8 + col] = v0 - v7; + p[1 * 8 + col] = v1 + v6; + p[6 * 8 + col] = v1 - v6; + p[2 * 8 + col] = v2 + v5; + p[5 * 8 + col] = v2 - v5; + p[3 * 8 + col] = v3 + v4; + p[4 * 8 + col] = v3 - v4; + } + // convert to 8-bit integers + for (var i = 0; i < 64; ++i) { + var sample = 128 + ((p[i] + 8) >> 4); + dataOut[i] = sample < 0 ? 0 : sample > 0xFF ? 0xFF : sample; + } + } + requestMemoryAllocation(samplesPerLine * blocksPerColumn * 8); + for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) { + var scanLine = blockRow << 3; + for (var i = 0; i < 8; i++) + lines.push(new Uint8Array(samplesPerLine)); + for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) { + quantizeAndInverse(component.blocks[blockRow][blockCol], r, R); + var offset = 0; + var sample = blockCol << 3; + for (var j = 0; j < 8; j++) { + var line = lines[scanLine + j]; + for (var i = 0; i < 8; i++) + line[sample + i] = r[offset++]; + } + } + } + return lines; +} +function clampTo8bit(a) { + return a < 0 ? 0 : a > 255 ? 255 : a; +} +function parse(data) { + var self = { + width: 0, + height: 0, + comments: [], + adobe: undefined, + components: [], + exifBuffer: undefined, + jfif: undefined, + }; + var maxResolutionInPixels = maxResolutionInMP * 1000 * 1000; + var offset = 0; + function readUint16() { + var value = (data[offset] << 8) | data[offset + 1]; + offset += 2; + return value; + } + function readDataBlock() { + var length = readUint16(); + var array = data.subarray(offset, offset + length - 2); + offset += array.length; + return array; + } + function prepareComponents(frame) { + var maxH = 0, maxV = 0; + for (var componentId in frame.components) { + if (frame.components.hasOwnProperty(componentId)) { + var component = frame.components[componentId]; + if (maxH < component.h) + maxH = component.h; + if (maxV < component.v) + maxV = component.v; + } + } + var mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / maxH); + var mcusPerColumn = Math.ceil(frame.scanLines / 8 / maxV); + for (var componentId in frame.components) { + if (frame.components.hasOwnProperty(componentId)) { + var component = frame.components[componentId]; + var blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / maxH); + var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / maxV); + var blocksPerLineForMcu = mcusPerLine * component.h; + var blocksPerColumnForMcu = mcusPerColumn * component.v; + var blocksToAllocate = blocksPerColumnForMcu * blocksPerLineForMcu; + var blocks = []; + // Each block is a Int32Array of length 64 (4 x 64 = 256 bytes) + requestMemoryAllocation(blocksToAllocate * 256); + for (var i = 0; i < blocksPerColumnForMcu; i++) { + var row = []; + for (var j = 0; j < blocksPerLineForMcu; j++) { + row.push(new Int32Array(64)); + } + blocks.push(row); + } + component.blocksPerLine = blocksPerLine; + component.blocksPerColumn = blocksPerColumn; + component.blocks = blocks; + } + } + frame.maxH = maxH; + frame.maxV = maxV; + frame.mcusPerLine = mcusPerLine; + frame.mcusPerColumn = mcusPerColumn; + } + var jfif = null; + var adobe = null; + var frame = undefined; + var resetInterval = 0; + var quantizationTables = []; + var frames = []; + var huffmanTablesAC = []; + var huffmanTablesDC = []; + var fileMarker = readUint16(); + var malformedDataOffset = -1; + if (fileMarker != 0xFFD8) { // SOI (Start of Image) + throw new Error('SOI not found'); + } + fileMarker = readUint16(); + while (fileMarker != 0xFFD9) { // EOI (End of image) + switch (fileMarker) { + case 0xFF00: break; + case 0xFFE0: // APP0 (Application Specific) + case 0xFFE1: // APP1 + case 0xFFE2: // APP2 + case 0xFFE3: // APP3 + case 0xFFE4: // APP4 + case 0xFFE5: // APP5 + case 0xFFE6: // APP6 + case 0xFFE7: // APP7 + case 0xFFE8: // APP8 + case 0xFFE9: // APP9 + case 0xFFEA: // APP10 + case 0xFFEB: // APP11 + case 0xFFEC: // APP12 + case 0xFFED: // APP13 + case 0xFFEE: // APP14 + case 0xFFEF: // APP15 + case 0xFFFE: { // COM (Comment) + var appData = readDataBlock(); + if (fileMarker === 0xFFFE) { + var comment = ''; + for (var ii = 0; ii < appData.byteLength; ii++) { + comment += String.fromCharCode(appData[ii]); + } + self.comments.push(comment); + } + if (fileMarker === 0xFFE0) { + if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49 && + appData[3] === 0x46 && appData[4] === 0) { // 'JFIF\x00' + jfif = { + version: { major: appData[5], minor: appData[6] }, + densityUnits: appData[7], + xDensity: (appData[8] << 8) | appData[9], + yDensity: (appData[10] << 8) | appData[11], + thumbWidth: appData[12], + thumbHeight: appData[13], + thumbData: appData.subarray(14, 14 + 3 * appData[12] * appData[13]) + }; + } + } + // TODO APP1 - Exif + if (fileMarker === 0xFFE1) { + if (appData[0] === 0x45 && + appData[1] === 0x78 && + appData[2] === 0x69 && + appData[3] === 0x66 && + appData[4] === 0) { // 'EXIF\x00' + self.exifBuffer = appData.subarray(5, appData.length); + } + } + if (fileMarker === 0xFFEE) { + if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6F && + appData[3] === 0x62 && appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\x00' + adobe = { + version: appData[6], + flags0: (appData[7] << 8) | appData[8], + flags1: (appData[9] << 8) | appData[10], + transformCode: appData[11] + }; + } + } + break; + } + case 0xFFDB: { // DQT (Define Quantization Tables) + var quantizationTablesLength = readUint16(); + var quantizationTablesEnd = quantizationTablesLength + offset - 2; + while (offset < quantizationTablesEnd) { + var quantizationTableSpec = data[offset++]; + requestMemoryAllocation(64 * 4); + var tableData = new Int32Array(64); + if ((quantizationTableSpec >> 4) === 0) { // 8 bit values + for (var j = 0; j < 64; j++) { + var z = dctZigZag[j]; + tableData[z] = data[offset++]; + } + } + else if ((quantizationTableSpec >> 4) === 1) { //16 bit + for (var j = 0; j < 64; j++) { + var z = dctZigZag[j]; + tableData[z] = readUint16(); + } + } + else + throw new Error('DQT: invalid table spec'); + quantizationTables[quantizationTableSpec & 15] = tableData; + } + break; + } + case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT) + case 0xFFC1: // SOF1 (Start of Frame, Extended DCT) + case 0xFFC2: { // SOF2 (Start of Frame, Progressive DCT) + readUint16(); // skip data length + frame = { + extended: (fileMarker === 0xFFC1), + progressive: (fileMarker === 0xFFC2), + precision: data[offset++], + scanLines: readUint16(), + samplesPerLine: readUint16(), + components: {}, + componentsOrder: [], + maxH: 0, + maxV: 0, + mcusPerLine: 0, + mcusPerColumn: 0, + }; + var pixelsInFrame = frame.scanLines * frame.samplesPerLine; + if (pixelsInFrame > maxResolutionInPixels) { + var exceededAmount = Math.ceil((pixelsInFrame - maxResolutionInPixels) / 1e6); + throw new Error("maxResolutionInMP limit exceeded by ".concat(exceededAmount, "MP")); + } + var componentsCount = data[offset++]; + for (var i = 0; i < componentsCount; i++) { + var componentId = data[offset]; + var h = data[offset + 1] >> 4; + var v = data[offset + 1] & 15; + var qId = data[offset + 2]; + frame.componentsOrder.push(componentId); + frame.components[componentId] = { + h: h, + v: v, + quantizationIdx: qId, + blocksPerColumn: 0, + blocksPerLine: 0, + blocks: [], + pred: 0, + }; + offset += 3; + } + prepareComponents(frame); + frames.push(frame); + break; + } + case 0xFFC4: { // DHT (Define Huffman Tables) + var huffmanLength = readUint16(); + for (var i = 2; i < huffmanLength;) { + var huffmanTableSpec = data[offset++]; + var codeLengths = new Uint8Array(16); + var codeLengthSum = 0; + for (var j = 0; j < 16; j++, offset++) { + codeLengthSum += (codeLengths[j] = data[offset]); + } + requestMemoryAllocation(16 + codeLengthSum); + var huffmanValues = new Uint8Array(codeLengthSum); + for (var j = 0; j < codeLengthSum; j++, offset++) { + huffmanValues[j] = data[offset]; + } + i += 17 + codeLengthSum; + var index = huffmanTableSpec & 15; + var table = (huffmanTableSpec >> 4) === 0 ? huffmanTablesDC : huffmanTablesAC; + table[index] = buildHuffmanTable(codeLengths, huffmanValues); + } + break; + } + case 0xFFDD: // DRI (Define Restart Interval) + readUint16(); // skip data length + resetInterval = readUint16(); + break; + case 0xFFDC: // Number of Lines marker + readUint16(); // skip data length + readUint16(); // Ignore this data since it represents the image height + break; + case 0xFFDA: { // SOS (Start of Scan) + readUint16(); // skip data length + var selectorsCount = data[offset++]; + var components = []; + for (var i = 0; i < selectorsCount; i++) { + var component = frame.components[data[offset++]]; + var tableSpec = data[offset++]; + component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4]; + component.huffmanTableAC = huffmanTablesAC[tableSpec & 15]; + components.push(component); + } + var spectralStart = data[offset++]; + var spectralEnd = data[offset++]; + var successiveApproximation = data[offset++]; + var processed = decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successiveApproximation >> 4, successiveApproximation & 15); + offset += processed; + break; + } + case 0xFFFF: // Fill bytes + if (data[offset] !== 0xFF) { // Avoid skipping a valid marker. + offset--; + } + break; + default: { + if (data[offset - 3] == 0xFF && data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) { + // could be incorrect encoding -- last 0xFF byte of the previous + // block was eaten by the encoder + offset -= 3; + break; + } + else if (fileMarker === 0xE0 || fileMarker == 0xE1) { + // Recover from malformed APP1 markers popular in some phone models. + // See https://github.com/eugeneware/jpeg-js/issues/82 + if (malformedDataOffset !== -1) { + throw new Error("first unknown JPEG marker at offset ".concat(malformedDataOffset.toString(16), ", second unknown JPEG marker ").concat(fileMarker.toString(16), " at offset ").concat((offset - 1).toString(16))); + } + malformedDataOffset = offset - 1; + var nextOffset = readUint16(); + if (data[offset + nextOffset - 2] === 0xFF) { + offset += nextOffset - 2; + break; + } + } + throw new Error('unknown JPEG marker ' + fileMarker.toString(16)); + } + } + fileMarker = readUint16(); + } + if (frames.length != 1) + throw new Error('only single frame JPEGs supported'); + // set each frame's components quantization table + for (var i = 0; i < frames.length; i++) { + var cp = frames[i].components; + for (var j in cp) { // TODO: don't use `in` + cp[j].quantizationTable = quantizationTables[cp[j].quantizationIdx]; + delete cp[j].quantizationIdx; // TODO: why ??? + } + } + self.width = frame.samplesPerLine; + self.height = frame.scanLines; + self.jfif = jfif; + self.adobe = adobe; + self.components = []; + for (var i = 0; i < frame.componentsOrder.length; i++) { + var component = frame.components[frame.componentsOrder[i]]; + self.components.push({ + lines: buildComponentData(component), + scaleX: component.h / frame.maxH, + scaleY: component.v / frame.maxV + }); + } + return self; +} +function getData(decoded) { + var offset = 0; + var colorTransform = false; + var width = decoded.width; + var height = decoded.height; + var dataLength = width * height * decoded.components.length; + requestMemoryAllocation(dataLength); + var data = new Uint8Array(dataLength); + switch (decoded.components.length) { + case 1: { + var component1 = decoded.components[0]; + for (var y = 0; y < height; y++) { + var component1Line = component1.lines[0 | (y * component1.scaleY)]; + for (var x = 0; x < width; x++) { + var Y = component1Line[0 | (x * component1.scaleX)]; + data[offset++] = Y; + } + } + break; + } + case 2: { + // PDF might compress two component data in custom colorspace + var component1 = decoded.components[0]; + var component2 = decoded.components[1]; + for (var y = 0; y < height; y++) { + var component1Line = component1.lines[0 | (y * component1.scaleY)]; + var component2Line = component2.lines[0 | (y * component2.scaleY)]; + for (var x = 0; x < width; x++) { + var Y1 = component1Line[0 | (x * component1.scaleX)]; + data[offset++] = Y1; + var Y2 = component2Line[0 | (x * component2.scaleX)]; + data[offset++] = Y2; + } + } + break; + } + case 3: { + // The default transform for three components is true + colorTransform = true; + // The adobe transform marker overrides any previous setting + if (decoded.adobe && decoded.adobe.transformCode) + colorTransform = true; + var component1 = decoded.components[0]; + var component2 = decoded.components[1]; + var component3 = decoded.components[2]; + for (var y = 0; y < height; y++) { + var component1Line = component1.lines[0 | (y * component1.scaleY)]; + var component2Line = component2.lines[0 | (y * component2.scaleY)]; + var component3Line = component3.lines[0 | (y * component3.scaleY)]; + for (var x = 0; x < width; x++) { + var Y = void 0, Cb = void 0, Cr = void 0, R = void 0, G = void 0, B = void 0; + if (!colorTransform) { + R = component1Line[0 | (x * component1.scaleX)]; + G = component2Line[0 | (x * component2.scaleX)]; + B = component3Line[0 | (x * component3.scaleX)]; + } + else { + Y = component1Line[0 | (x * component1.scaleX)]; + Cb = component2Line[0 | (x * component2.scaleX)]; + Cr = component3Line[0 | (x * component3.scaleX)]; + R = clampTo8bit(Y + 1.402 * (Cr - 128)); + G = clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128)); + B = clampTo8bit(Y + 1.772 * (Cb - 128)); + } + data[offset++] = R; + data[offset++] = G; + data[offset++] = B; + } + } + break; + } + case 4: { + if (!decoded.adobe) + throw new Error('Unsupported color mode (4 components)'); + // The default transform for four components is false + colorTransform = false; + // The adobe transform marker overrides any previous setting + if (decoded.adobe && decoded.adobe.transformCode) + colorTransform = true; + var component1 = decoded.components[0]; + var component2 = decoded.components[1]; + var component3 = decoded.components[2]; + var component4 = decoded.components[3]; + for (var y = 0; y < height; y++) { + var component1Line = component1.lines[0 | (y * component1.scaleY)]; + var component2Line = component2.lines[0 | (y * component2.scaleY)]; + var component3Line = component3.lines[0 | (y * component3.scaleY)]; + var component4Line = component4.lines[0 | (y * component4.scaleY)]; + for (var x = 0; x < width; x++) { + var Y = void 0, Cb = void 0, Cr = void 0, K = void 0, C = void 0, M = void 0, Ye = void 0; + if (!colorTransform) { + C = component1Line[0 | (x * component1.scaleX)]; + M = component2Line[0 | (x * component2.scaleX)]; + Ye = component3Line[0 | (x * component3.scaleX)]; + K = component4Line[0 | (x * component4.scaleX)]; + } + else { + Y = component1Line[0 | (x * component1.scaleX)]; + Cb = component2Line[0 | (x * component2.scaleX)]; + Cr = component3Line[0 | (x * component3.scaleX)]; + K = component4Line[0 | (x * component4.scaleX)]; + C = 255 - clampTo8bit(Y + 1.402 * (Cr - 128)); + M = 255 - clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128)); + Ye = 255 - clampTo8bit(Y + 1.772 * (Cb - 128)); + } + data[offset++] = 255 - C; + data[offset++] = 255 - M; + data[offset++] = 255 - Ye; + data[offset++] = 255 - K; + } + } + break; + } + default: + throw new Error('Unsupported color mode'); + } + return data; +} +export function decodeJpeg(encoded, createImageData) { + totalBytesAllocated = 0; + if (encoded.length === 0) + throw new Error('Empty jpeg buffer'); + var decoded = parse(encoded); + requestMemoryAllocation(decoded.width * decoded.height * 4); + var data = getData(decoded); + var imageData = createImageData(decoded.width, decoded.height); + var width = imageData.width; + var height = imageData.height; + var imageDataArray = imageData.data; + var i = 0; + var j = 0; + switch (decoded.components.length) { + case 1: + for (var y = 0; y < height; y++) { + for (var x = 0; x < width; x++) { + var Y = data[i++]; + imageDataArray[j++] = Y; + imageDataArray[j++] = Y; + imageDataArray[j++] = Y; + imageDataArray[j++] = 255; + } + } + break; + case 3: + for (var y = 0; y < height; y++) { + for (var x = 0; x < width; x++) { + var R = data[i++]; + var G = data[i++]; + var B = data[i++]; + imageDataArray[j++] = R; + imageDataArray[j++] = G; + imageDataArray[j++] = B; + imageDataArray[j++] = 255; + } + } + break; + case 4: + for (var y = 0; y < height; y++) { + for (var x = 0; x < width; x++) { + var C = data[i++]; + var M = data[i++]; + var Y = data[i++]; + var K = data[i++]; + var R = 255 - clampTo8bit(C * (1 - K / 255) + K); + var G = 255 - clampTo8bit(M * (1 - K / 255) + K); + var B = 255 - clampTo8bit(Y * (1 - K / 255) + K); + imageDataArray[j++] = R; + imageDataArray[j++] = G; + imageDataArray[j++] = B; + imageDataArray[j++] = 255; + } + } + break; + default: + throw new Error('Unsupported color mode'); + } + return imageData; +} + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImpwZWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsOENBQThDO0FBQzlDOzs7Ozs7Ozs7Ozs7OztFQWNFO0FBNkNGLElBQU0sU0FBUyxHQUFHLElBQUksVUFBVSxDQUFDO0lBQy9CLENBQUM7SUFDRCxDQUFDLEVBQUUsQ0FBQztJQUNKLEVBQUUsRUFBRSxDQUFDLEVBQUUsQ0FBQztJQUNSLENBQUMsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUU7SUFDYixFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsQ0FBQztJQUNqQixDQUFDLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUU7SUFDckIsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsQ0FBQztJQUN6QixDQUFDLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQ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uZDtcclxuICAgIGxldCByID0gMDtcclxuXHJcbiAgICB3aGlsZSAoayA8PSBlKSB7XHJcbiAgICAgIGNvbnN0IHogPSBkY3RaaWdaYWdba107XHJcbiAgICAgIGNvbnN0IGRpcmVjdGlvbiA9IHp6W3pdIDwgMCA/IC0xIDogMTtcclxuXHJcbiAgICAgIHN3aXRjaCAoc3VjY2Vzc2l2ZUFDU3RhdGUpIHtcclxuICAgICAgICBjYXNlIDA6IC8vIGluaXRpYWwgc3RhdGVcclxuICAgICAgICAgIGNvbnN0IHJzID0gZGVjb2RlSHVmZm1hbihjb21wb25lbnQuaHVmZm1hblRhYmxlQUMhKTtcclxuICAgICAgICAgIGNvbnN0IHMgPSBycyAmIDE1O1xyXG4gICAgICAgICAgciA9IHJzID4+IDQ7IC8vIHRoaXMgd2FzIG5ldyB2YXJpYWJsZSBpbiBvbGQgY29kZVxyXG4gICAgICAgICAgaWYgKHMgPT09IDApIHtcclxuICAgICAgICAgICAgaWYgKHIgPCAxNSkge1xyXG4gICAgICAgICAgICAgIGVvYnJ1biA9IHJlY2VpdmUocikgKyAoMSA8PCByKTtcclxuICAgICAgICAgICAgICBzdWNjZXNzaXZlQUNTdGF0ZSA9IDQ7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgciA9IDE2O1xyXG4gICAgICAgICAgICAgIHN1Y2Nlc3NpdmVBQ1N0YXRlID0gMTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgaWYgKHMgIT09IDEpIHRocm93IG5ldyBFcnJvcignaW52YWxpZCBBQ24gZW5jb2RpbmcnKTtcclxuICAgICAgICAgICAgc3VjY2Vzc2l2ZUFDTmV4dFZhbHVlID0gcmVjZWl2ZUFuZEV4dGVuZChzKTtcclxuICAgICAgICAgICAgc3VjY2Vzc2l2ZUFDU3RhdGUgPSByID8gMiA6IDM7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBjb250aW51ZTtcclxuICAgICAgICBjYXNlIDE6IC8vIHNraXBwaW5nIHIgemVybyBpdGVtc1xyXG4gICAgICAgIGNhc2UgMjpcclxuICAgICAgICAgIGlmICh6elt6XSkge1xyXG4gICAgICAgICAgICB6elt6XSArPSAocmVhZEJpdCgpIDw8IHN1Y2Nlc3NpdmUpICogZGlyZWN0aW9uO1xyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgci0tO1xyXG4gICAgICAgICAgICBpZiAociA9PT0gMCkgc3VjY2Vzc2l2ZUFDU3RhdGUgPSBzdWNjZXNzaXZlQUNTdGF0ZSA9PSAyID8gMyA6IDA7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgICBjYXNlIDM6IC8vIHNldCB2YWx1ZSBmb3IgYSB6ZXJvIGl0ZW1cclxuICAgICAgICAgIGlmICh6elt6XSkge1xyXG4gICAgICAgICAgICB6elt6XSArPSAocmVhZEJpdCgpIDw8IHN1Y2Nlc3NpdmUpICogZGlyZWN0aW9uO1xyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgenpbel0gPSBzdWNjZXNzaXZlQUNOZXh0VmFsdWUgPDwgc3VjY2Vzc2l2ZTtcclxuICAgICAgICAgICAgc3VjY2Vzc2l2ZUFDU3RhdGUgPSAwO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgY2FzZSA0OiAvLyBlb2JcclxuICAgICAgICAgIGlmICh6elt6XSkge1xyXG4gICAgICAgICAgICB6elt6XSArPSAocmVhZEJpdCgpIDw8IHN1Y2Nlc3NpdmUpICogZGlyZWN0aW9uO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgYnJlYWs7XHJcbiAgICAgIH1cclxuICAgICAgaysrO1xyXG4gICAgfVxyXG5cclxuICAgIGlmIChzdWNjZXNzaXZlQUNTdGF0ZSA9PT0gNCkge1xyXG4gICAgICBlb2JydW4tL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ZXJ2YWwgPSBtY3VFeHBlY3RlZDtcclxuXHJcbiAgbGV0IGg6IG51bWJlcjtcclxuICBsZXQgdjogbnVtYmVyO1xyXG4gIGxldCBtYXJrZXI6IG51bWJlcjtcclxuXHJcbiAgd2hpbGUgKG1jdSA8IG1jdUV4cGVjdGVkKSB7XHJcbiAgICAvLyByZXNldCBpbnRlcnZhbCBzdHVmZlxyXG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjb21wb25lbnRzTGVuZ3RoOyBpKyspIGNvbXBvbmVudHNbaV0ucHJlZCA9IDA7XHJcbiAgICBlb2JydW4gPSAwO1xyXG5cclxuICAgIGlmIChjb21wb25lbnRzTGVuZ3RoID09IDEpIHtcclxuICAgICAgY29tcG9uZW50ID0gY29tcG9uZW50c1swXTtcclxuICAgICAgZm9yIChsZXQgbiA9IDA7IG4gPCByZXNldEludGVydmFsOyBuKyspIHtcclxuICAgICAgICBkZWNvZGVCbG9jayhjb21wb25lbnQsIGRlY29kZUZuLCBtY3UpO1xyXG4gICAgICAgIG1jdSsrO1xyXG4gICAgICB9XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICBmb3IgKGxldCBuID0gMDsgbiA8IHJlc2V0SW50ZXJ2YWw7IG4rKykge1xyXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY29tcG9uZW50c0xlbmd0aDsgaSsrKSB7XHJcbiAgICAgICAgICBjb21wb25lbnQgPSBjb21wb25lbnRzW2ldO1xyXG4gICAgICAgICAgaCA9IGNvbXBvbmVudC5oO1xyXG4gICAgICAgICAgdiA9IGNvbXBvbmVudC52O1xyXG4gICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCB2OyBqKyspIHtcclxuICAgICAgICAgICAgZm9yIChsZXQgayA9IDA7IGsgPCBoOyBrKyspIHtcclxuICAgICAgICAgICAgICBkZWNvZGVNY3UoY29tcG9uZW50LCBkZWNvZGVGbiwgbWN1LCBqLCBrKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBtY3UrKztcclxuXHJcbiAgICAgICAgLy8gSWYgd2UndmUgcmVhY2hlZCBvdXIgZXhwZWN0ZWQgTUNVJ3MsIHN0b3AgZGVjb2RpbmdcclxuICAgICAgICBpZiAobWN1ID09PSBtY3VFeHBlY3RlZCkgYnJlYWs7XHJcbiAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBpZiAobWN1ID09PSBtY3VFeHBlY3RlZCkge1xyXG4gICAgICAvLyBTa2lwIHRyYWlsaW5nIGJ5dGVzIGF0IHRoZSBlbmQgb2YgdGhlIHNjYW4gLSB1bnRpbCB3ZSByZWFjaCB0aGUgbmV4dCBtYXJrZXJcclxuICAgICAgZG8ge1xyXG4gICAgICAgIGlmIChkYXRhW29mZnNldF0gPT09IDB4RkYpIHtcclxuICAgICAgICAgIGlmIChkYXRhW29mZnNldCArIDFdICE9PSAweDAwKSB7XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBvZmZzZXQgKz0gMTtcclxuICAgICAgfSB3aGlsZSAob2Zmc2V0IDwgZGF0YS5sZW5ndGggLSAyKTtcclxuICAgIH1cclxuXHJcbiAgICAvLyBmaW5kIG1hcmtlclxyXG4gICAgYml0c0NvdW50ID0gMDtcclxuICAgIG1hcmtlciA9IChkYXRhW29mZnNldF0gPDwgOCkgfCBkYXRhW29mZnNldCArIDFdO1xyXG5cclxuICAgIGlmIChtYXJrZXIgPCAweEZGMDApIHRocm93IG5ldyBFcnJvcignbWFya2VyIHdhcyBub3QgZm91bmQnKTtcclxuXHJcbiAgICBpZiAobWFya2VyID49IDB4RkZEMCAmJiBtYXJrZXIgPD0gMHhGRkQ3KSB7IC8vIFJTVHhcclxuICAgICAgb2Zmc2V0ICs9IDI7XHJcbiAgICB9IGVsc2Uge1xyXG4gICAgICBicmVhaztcclxuICAgIH1cclxuICB9XHJcblxyXG4gIHJ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lKHp6OiBJbnQzMkFycmF5LCBkYXRhT3V0OiBVaW50OEFycmF5LCBkYXRhSW46IEludDMyQXJyYXkpIHtcclxuICAgIGNvbnN0IHF0ID0gY29tcG9uZW50LnF1YW50aXphdGlvblRhYmxlITtcclxuICAgIGNvbnN0IHAgPSBkYXRhSW47XHJcblxyXG4gICAgLy8gZGVxdWFudFxyXG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCA2NDsgaSsrKSB7XHJcbiAgICAgIHBbaV0gPSB6eltpXSAqIHF0W2ldO1xyXG4gICAgfVxyXG5cclxuICAgIC8vIGludmVyc2UgRENUIG9uIHJvd3NcclxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgODsgKytpKSB7XHJcbiAgICAgIGNvbnN0IHJvdyA9IDggKiBpO1xyXG5cclxuICAgICAgLy8gY2hlY2sgZm9yIGFsbC16ZXJvIEFDIGNvZWZmaWNpZW50c1xyXG4gICAgICBpZiAocFsxICsgcm93XSA9PSAwICYmIHBbMiArIHJvd10gPT0gMCAmJiBwWzMgKyByb3ddID09IDAgJiZcclxuICAgICAgICBwWzQgKyByb3ddID09IDAgJiYgcFs1ICsgcm93XSA9PSAwICYmIHBbNiArIHJvd10gPT0gMCAmJlxyXG4gICAgICAgIHBbNyArIHJvd10gPT0gMCkge1xyXG4gICAgICAgIGNvbnN0IHQgPSAoZGN0U3FydDIgKiBwWzAgKyByb3ddICsgNTEyKSA+PiAxMDtcclxuICAgICAgICBwWzAgKyByb3ddID0gdDtcclxuICAgICAgICBwWzEgKyByb3ddID0gdDtcclxuICAgICAgICBwWzIgKyByb3ddID0gdDtcclxuICAgICAgICBwWzMgKyByb3ddID0gdDtcclxuICAgICAgICBwWzQgKyByb3ddID0gdDtcclxuICAgICAgICBwWzUgKyByb3ddID0gdDtcclxuICAgICAgICBwWzYgKyByb3ddID0gdDtcclxuICAgICAgICBwWzcgKyByb3ddID0gdDtcclxuICAgICAgICBjb250aW51ZTtcclxuICAgICAgfVxyXG5cclxuICAg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16ZXJvIEFDIGNvZWZmaWNpZW50c1xyXG4gICAgICBpZiAocFsxICogOCArIGNvbF0gPT0gMCAmJiBwWzIgKiA4ICsgY29sXSA9PSAwICYmIHBbMyAqIDggKyBjb2xdID09IDAgJiZcclxuICAgICAgICBwWzQgKiA4ICsgY29sXSA9PSAwICYmIHBbNSAqIDggKyBjb2xdID09IDAgJiYgcFs2ICogOCArIGNvbF0gPT0gMCAmJlxyXG4gICAgICAgIHBbNyAqIDggKyBjb2xdID09IDApIHtcclxuICAgICAgICBjb25zdCB0ID0gKGRjdFNxcnQyICogZGF0YUluW2kgKyAwXSArIDgxOTIpID4+IDE0O1xyXG4gICAgICAgIHBbMCAqIDggKyBjb2xdID0gdDtcclxuICAgICAgICBwWzEgKiA4ICsgY29sXSA9IHQ7XHJcbiAgICAgICAgcFsyICogOCArIGNvbF0gPSB0O1xyXG4gICAgICAgIHBbMyAqIDggKyBjb2xdID0gdDtcclxuICAgICAgICBwWzQgKiA4ICsgY29sXSA9IHQ7XHJcbiAgICAgICAgcFs1ICogOCArIGNvbF0gPSB0O1xyXG4gICAgICAgIHBbNiAqIDggKyBjb2xdID0gdDtcclxuICAgICAgICBwWzcgKiA4ICsgY29sXSA9IHQ7XHJcbiAgICAgICAgY29udGludWU7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIC8vIHN0YWdlIDRcclxuICAgICAgbGV0IHYwID0gKGRjdFNxcnQyICogcFswICogOCArIGNvbF0gKyAyMDQ4KSA+PiAxMjtcclxuICAgICAgbGV0IHYxID0gKGRjdFNxcnQyICogcFs0ICogOCArIGNvbF0gKyAyMDQ4KSA+PiAxMjtcclxuICAgICAgbGV0IHYyID0gcFsyICogOCArIGNvbF07XHJcbiAgICAgIGxldCB2MyA9IHBbNiAqIDggKyBjb2xdO1xyXG4gICAgICBsZXQgdjQgPSAoZGN0U3FydDFkMiAqIChwWzEgKiA4ICsgY29sXSAtIHBbNyAqIDggKyBjb2xdKSArIDIwNDgpID4+IDEyO1xyXG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gICBjYXNlIDB4RkZFOTogLy8gQVBQOVxyXG4gICAgICBjYXNlIDB4RkZFQTogLy8gQVBQMTBcclxuICAgICAgY2FzZSAweEZGRUI6IC8vIEFQUDExXHJcbiAgICAgIGNhc2UgMHhGRkVDOiAvLyBBUFAxMlxyXG4gICAgICBjYXNlIDB4RkZFRDogLy8gQVBQMTNcclxuICAgICAgY2FzZSAweEZGRUU6IC8vIEFQUDE0XHJcbiAgICAgIGNhc2UgMHhGRkVGOiAvLyBBUFAxNVxyXG4gICAgICBjYXNlIDB4RkZGRTogeyAvLyBDT00gKENvbW1lbnQpXHJcbiAgICAgICAgY29uc3QgYXBwRGF0YSA9IHJlYWREYXRhQmxvY2soKTtcclxuXHJcbiAgICAgICAgaWYgKGZpbGVNYXJrZXIgPT09IDB4RkZGRSkge1xyXG4gICAgICAgICAgbGV0IGNvbW1lbnQgPSAnJztcclxuICAgICAgICAgIGZvciAobGV0IGlpID0gMDsgaWkgPCBhcHBEYXRhLmJ5dGVMZW5ndGg7IGlpKyspIHtcclxuICAgICAgICAgICAgY29tbWVudCArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKGFwcERhdGFbaWldKTtcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIHNlbGYuY29tbWVudHMucHVzaChjb21tZW50KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChmaWxlTWFya2VyID09PSAweEZGRTApIHtcclxuICAgICAgICAgIGlmIChhcHBEYXRhWzBdID09PSAweDRBICYmIGFwcERhdGFbMV0gPT09IDB4NDYgJiYgYXBwRGF0YVsyXSA9PT0gMHg0OSAmJlxyXG4gICAgICAgICAgICBhcHBEYXRhWzNdID09PSAweDQ2ICYmIGFwcERhdGFbNF0gPT09IDApIHsgLy8gJ0pGSUZcXHgwMCdcclxuICAgICAgICAgICAgamZpZiA9IHtcclxuICAgICAgICAgICAgICB2ZXJzaW9uOiB7IG1ham9yOiBhcHBEYXRhWzVdLCBtaW5vcjogYXBwRGF0YVs2XSB9LFxyXG4gICAgICAgICAgICAgIGRlbnNpdHlVbml0czogYXBwRGF0YVs3XSxcclxuICAgICAgICAgICAgICB4RGVuc2l0eTogKGFwcERhdGFbOF0gPDwgOCkgfCBhcHBEYXRhWzldLFxyXG4gICAgICAgICAgICAgIHlEZW5zaXR5OiAoYXBwRGF0YVsxMF0gPDwgOCkgfCBhcHBEYXRhWzExXSxcclxuICAgICAgICAgICAgICB0aHVtYldpZHRoOiBhcHBEYXRhWzEyXSxcclxuICAgICAgICAgICAgICB0aHVtYkhlaWdodDogYXBwRGF0YVsxM10sXHJcbiAgICAgICAgICAgICAgdGh1bWJEYXRhOiBhcHBEYXRhLnN1YmFycmF5KDE0LCAxNCArIDMgKiBhcHBEYXRhWzEyXSAqIGFwcERhdGFbMTNdKVxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICAvLyBUT0RPIEFQUDEgLSBFeGlmXHJcbiAgICAgICAgaWYgKGZpbGVNYXJrZXIgPT09IDB4RkZFMSkge1xyXG4gICAgICAgICAgaWYgKGFwcERhdGFbMF0gPT09IDB4NDUgJiZcclxuICAgICAgICAgICAgYXBwRGF0YVsxXSA9PT0gMHg3OCAmJlxyXG4gICAgICAgICAgICBhcHBEYXRhWzJdID09PSAweDY5ICYmXHJcbiAgICAgICAgICAgIGFwcERhdGFbM10gPT09IDB4NjYgJiZcclxuICAgICAgICAgICAgYXBwRGF0YVs0XSA9PT0gMCkgeyAvLyAnRVhJRlxceDAwJ1xyXG4gICAgICAgICAgICBzZWxmLmV4aWZCdWZmZXIgPSBhcHBEYXRhLnN1YmFycmF5KDUsIGFwcERhdGEubGVuZ3RoKTtcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChmaWxlTWFya2VyID09PSAweEZGRUUpIHtcclxuICAgICAgICAgIGlmIChhcHBEYXRhWzBdID09PSAweDQxICYmIGFwcERhdGFbMV0gPT09IDB4NjQgJiYgYXBwRGF0YVsyXSA9PT0gMHg2RiAmJlxyXG4gICAgICAgICAgICBhcHBEYXRhWzNdID09PSAweDYyICYmIGFwcERhdGFbNF0gPT09IDB4NjUgJiYgYXBwRGF0YVs1XSA9PT0gMCkgeyAvLyAnQWRvYmVcXHgwMCdcclxuICAgICAgICAgICAgYWRvYmUgPSB7XHJcbiAgICAgICAgICAgICAgdmVyc2lvbjogYXBwRGF0YVs2XSxcclxuICAgICAgICAgICAgICBmbGFnczA6IChhcHBEYXRhWzddIDw8IDgpIHwgYXBwRGF0YVs4XSxcclxuICAgICAgICAgICAgICBmbGFnczE6IChhcHBEYXRhWzldIDw8IDgpIHwgYXBwRGF0YVsxMF0sXHJcbiAgICAgICAgICAgICAgdHJhbnNmb3JtQ29kZTogYXBwRGF0YVsxMV1cclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICAgIH1cclxuICAgICAgY2FzZSAweEZGREI6IHsgLy8gRFFUIChEZWZpbmUgUXVhbnRpemF0aW9uIFRhYmxlcylcclxuICAgICAgICBjb25zdCBxdWFudGl6YXRpb25UYWJsZXNMZW5ndGggPSByZWFkVWludDE2KCk7XHJcbiAgICAgICAgY29uc3QgcXVhbnRpemF0aW9uVGFibGVzRW5kID0gcXVhbnRpemF0aW9uVGFibGVzTGVuZ3RoICsgb2Zmc2V0IC0gMjtcclxuICAgICAgICB3aGlsZSAob2Zmc2V0IDwgcXVhbnRpemF0aW9uVGFibGVzRW5kKSB7XHJcbiAgICAgICAgICBjb25zdCBxdWFudGl6YXRpb25UYWJsZVNwZWMgPSBkYXRhW29mZnNldCsrXTtcclxuICAgICAgICAgIHJlcXVlc3RNZW1vcnlBbGxvY2F0aW9uKDY0ICogNCk7XHJcbiAgICAgICAgICBjb25zdCB0YWJsZURhdGEgPSBuZXcgSW50MzJBcnJheSg2NCk7XHJcbiAgICAgICAgICBpZiAoKHF1YW50aXphdGlvblRhYmxlU3BlYyA+PiA0KSA9PT0gMCkgeyAvLyA4IGJpdCB2YWx1ZXNcclxuICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCA2NDsgaisrKSB7XHJcbiAgICAgICAgICAgICAgY29uc3QgeiA9IGRjdFppZ1phZ1tqXTtcclxuICAgICAgICAgICAgICB0YWJsZURhdGFbel0gPSBkYXRhW29mZnNldCsrXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSBlbHNlIGlmICgocXVhbnRpemF0aW9uVGFibGVTcGVjID4+IDQpID09PSAxKSB7IC8vMTYgYml0XHJcbiAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgNjQ7IGorKykge1xyXG4gICAgICAgICAgICAgIGNvbnN0IHogPSBkY3RaaWdaYWdbal07XHJcbiAgICAgICAgICAgICAgdGFibGVEYXRhW3pdID0gcmVhZFVpbnQxNigpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9IGVsc2VcclxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdEUVQ6IGludmFsaWQgdGFibGUgc3BlYycpO1xyXG4gICAgICAgICAgcXVhbnRpemF0aW9uVGFibGVzW3F1YW50aXphdGlvblRhYmxlU3BlYyAmIDE1XSA9IHRhYmxlRGF0YTtcclxuICAgICAgICB9XHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICAgIH1cclxuICAgICAgY2FzZSAweEZGQzA6IC8vIFNPRjAgKFN0YXJ0IG9mIEZyYW1lLCBCYXNlbGluZSBEQ1QpXHJcbiAgICAgIGNhc2UgMHhGRkMxOiAvLyBTT0YxIChTdGFydCBvZiBGcmFtZSwgRXh0ZW5kZWQgRENUKVxyXG4gICAgICBjYXNlIDB4RkZDMjogeyAvLyBTT0YyIChTdGFydCBvZiBGcmFtZSwgUHJvZ3Jlc3NpdmUgRENUKVxyXG4gICAgICAgIHJlYWRVaW50MTYoKTsgLy8gc2tpcCBkYXRhIGxlbmd0aFxyXG4gICAgICAgIGZyYW1lID0ge1xyXG4gICAgICAgICAgZXh0ZW5kZWQ6IChmaWxlTWFya2VyID09PSAweEZGQzEpLFxyXG4gICAgICAgICAgcHJvZ3Jlc3NpdmU6IChmaWxlTWFya2VyID09PSAweEZGQzIpLFxyXG4gICAgICAgICAgcHJlY2lzaW9uOiBkYXRhW29mZnNldCsrXSxcclxuICAgICAgICAgIHNjYW5MaW5lczogcmVhZFVpbnQxNigpLFxyXG4gICAgICAgICAgc2FtcGxlc1BlckxpbmU6IHJlYWRVaW50MTYoKSxcclxuICAgICAgICAgIGNvbXBvbmVudHM6IHt9LFxyXG4gICAgICAgICAgY29tcG9uZW50c09yZGVyOiBbXSxcclxuICAgICAgICAgIG1heEg6IDAsXHJcbiAgICAgICAgICBtYXhWOiAwLFxyXG4gICAgICAgICAgbWN1c1BlckxpbmU6IDAsXHJcbiAgICAgICAgICBtY3VzUGVyQ29sdW1uOiAwLFxyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgIGNvbnN0IHBpeGVsc0luRnJhbWUgPSBmcmFtZSEuc2NhbkxpbmVzICogZnJhbWUhLnNhbXBsZXNQZXJMaW5lO1xyXG4gICAgICAgIGlmIChwaXhlbHNJbkZyYW1lID4gbWF4UmVzb2x1dGlvbkluUGl4ZWxzKSB7XHJcbiAgICAgICAgICBjb25zdCBleGNlZWRlZEFtb3VudCA9IE1hdGguY2VpbCgocGl4ZWxzSW5GcmFtZSAtIG1heFJlc29sdXRpb25JblBpeGVscykgLyAxZTYpO1xyXG4gICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBtYXhSZXNvbHV0aW9uSW5NUCBsaW1pdCBleGNlZWRlZCBieSAke2V4Y2VlZGVkQW1vdW50fU1QYCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBjb25zdCBjb21wb25lbnRzQ291bnQgPSBkYXRhW29mZnNldCsrXTtcclxuXHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjb21wb25lbnRzQ291bnQ7IGkrKykge1xyXG4gICAgICAgICAgY29uc3QgY29tcG9uZW50SWQgPSBkYXRhW29mZnNldF07XHJcbiAgICAgICAgICBjb25zdCBoID0gZGF0YVtvZmZzZXQgKyAxXSA+PiA0O1xyXG4gICAgICAgICAgY29uc3QgdiA9IGRhdGFbb2Zmc2V0ICsgMV0gJiAxNTtcclxuICAgICAgICAgIGNvbnN0IHFJZCA9IGRhdGFbb2Zmc2V0ICsgMl07XHJcbiAgICAgICAgICBmcmFtZSEuY29tcG9uZW50c09yZGVyLnB1c2goY29tcG9uZW50SWQpO1xyXG4gICAgICAgICAgZnJhbWUhLmNvbXBvbmVudHNbY29tcG9uZW50SWRdID0ge1xyXG4gICAgICAgICAgICBoOiBoLFxyXG4gICAgICAgICAgICB2OiB2LFxyXG4gICAgICAgICAgICBxdWFudGl6YXRpb25JZHg6IHFJZCxcclxuICAgICAgICAgICAgYmxvY2tzUGVyQ29sdW1uOiAwLFxyXG4gICAgICAgICAgICBibG9ja3NQZXJMaW5lOiAwLFxyXG4gICAgICAgICAgICBibG9ja3M6IFtdLFxyXG4gICAgICAgICAgICBwcmVkOiAwLFxyXG4gICAgICAgICAgfTtcclxuICAgICAgICAgIG9mZnNldCArPSAzO1xyXG4gICAgICAgIH1cclxuICAgICAgICBwcmVwYXJlQ29tcG9uZW50cyhmcmFtZSEpO1xyXG4gICAgICAgIGZyYW1lcy5wdXNoKGZyYW1lKTtcclxuICAgICAgICBicmVhaztcclxuICAgICAgfVxyXG4gICAgICBjYXNlIDB4RkZDNDogey8vIERIVCAoRGVmaW5lIEh1ZmZtYW4gVGFibGVzKVxyXG4gICAgICAgIGNvbnN0IGh1ZmZtYW5MZW5ndGggPSByZWFkVWludDE2KCk7XHJcblxyXG4gICAgICAgIGZvciAobGV0IGkgPSAyOyBpIDwgaHVmZm1hbkxlbmd0aDspIHtcclxuICAgICAgICAgIGNvbnN0IGh1ZmZtYW5UYWJsZVNwZWMgPSBkYXRhW29mZnNldCsrXTtcclxuICAgICAgICAgIGNvbnN0IGNvZGVMZW5ndGhzID0gbmV3IFVpbnQ4QXJyYXkoMTYpO1xyXG4gICAgICAgICAgbGV0IGNvZGVMZW5ndGhTdW0gPSAwO1xyXG5cclxuICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgMTY7IGorKywgb2Zmc2V0KyspIHtcclxuICAgICAgICAgICAgY29kZUxlbmd0aFN1bSArPSAoY29kZUxlbmd0aHNbal0gPSBkYXRhW29mZnNldF0pO1xyXG4gICAgICAgICAgfVxyXG5cclxuICAgICAgICAgIHJlcXVlc3RNZW1vcnlBbGxvY2F0aW9uKDE2ICsgY29kZUxlbmd0aFN1bSk7XHJcbiAgICAgICAgICBjb25zdCBodWZmbWFuVmFsdWVzID0gbmV3IFVpbnQ4QXJyYXkoY29kZUxlbmd0aFN1bSk7XHJcblxyXG4gICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBjb2RlTGVuZ3RoU3VtOyBqKyssIG9mZnNldCsrKSB7XHJcbiAgICAgICAgICAgIGh1ZmZtYW5WYWx1ZXNbal0gPSBkYXRhW29mZnNldF07XHJcbiAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgaSArPSAxNyArIGNvZGVMZW5ndGhTdW07XHJcblxyXG4gICAgICAgICAgY29uc3QgaW5kZXggPSBodWZmbWFuVGFibGVTcGVjICYgMTU7XHJcbiAgICAgICAgICBjb25zdCB0YWJsZSA9IChodWZmbWFuVGFibGVTcGVjID4+IDQpID09PSAwID8gaHVmZm1hblRhYmxlc0RDIDogaHVmZm1hblRhYmxlc0FDO1xyXG4gICAgICAgICAgdGFibGVbaW5kZXhdID0gYnVpbGRIdWZmbWFuVGFibGUoY29kZUxlbmd0aHMsIGh1ZmZtYW5WYWx1ZXMpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBicmVhaztcclxuICAgICAgfVxyXG4gICAgICBjYXNlIDB4RkZERDogLy8gRFJJIChEZWZpbmUgUmVzdGFydCBJbnRlcnZhbClcclxuICAgICAgICByZWFkVWludDE2KCk7IC8vIHNraXAgZGF0YSBsZW5ndGhcclxuICAgICAgICByZXNldEludGVydmFsID0gcmVhZFVpbnQxNigpO1xyXG4gICAgICAgIGJyZWFrO1xyXG4gICAgICBjYXNlIDB4RkZEQzogLy8gTnVtYmVyIG9mIExpbmVzIG1hcmtlclxyXG4gICAgICAgIHJlYWRVaW50MTYoKSAvLyBza2lwIGRhdGEgbGVuZ3RoXHJcbiAgICAgICAgcmVhZFVpbnQxNigpIC8vIElnbm9yZSB0aGlzIGRhdGEgc2luY2UgaXQgcmVwcmVzZW50cyB0aGUgaW1hZ2UgaGVpZ2h0XHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICAgIGNhc2UgMHhGRkRBOiB7IC8vIFNPUyAoU3RhcnQgb2YgU2NhbilcclxuICAgICAgICByZWFkVWludDE2KCk7IC8vIHNraXAgZGF0YSBsZW5ndGhcclxuICAgICAgICBjb25zdCBzZWxlY3RvcnNDb3VudCA9IGRhdGFbb2Zmc2V0KytdO1xyXG4gICAgICAgIGNvbnN0IGNvbXBvbmVudHM6IENvbXBvbmVudFtdID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBzZWxlY3RvcnNDb3VudDsgaSsrKSB7XHJcbiAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBmcmFtZSEuY29tcG9uZW50c1tkYXRhW29mZnNldCsrXV07XHJcbiAgICAgICAgICBjb25zdCB0YWJsZVNwZWMgPSBkYXRhW29mZnNldCsrXTtcclxuICAgICAgICAgIGNvbXBvbmVudC5odWZmbWFuVGFibGVEQyA9IGh1ZmZtYW5UYWJsZXNEQ1t0YWJsZVNwZWMgPj4gNF07XHJcbiAgICAgICAgICBjb21wb25lbnQuaHVmZm1hblRhYmxlQUMgPSBodWZmbWFuVGFibGVzQUNbdGFibGVTcGVjICYgMTVdO1xyXG4gICAgICAgICAgY29tcG9uZW50cy5wdXNoKGNvbXBvbmVudCk7XHJcbiAgICAgIC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lIGVuY29kZXJcclxuICAgICAgICAgIG9mZnNldCAtPSAzO1xyXG4gICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgfSBlbHNlIGlmIChmaWxlTWFya2VyID09PSAweEUwIHx8IGZpbGVNYXJrZXIgPT0gMHhFMSkge1xyXG4gICAgICAgICAgLy8gUmVjb3ZlciBmcm9tIG1hbGZvcm1lZCBBUFAxIG1hcmtlcnMgcG9wdWxhciBpbiBzb21lIHBob25lIG1vZGVscy5cclxuICAgICAgICAgIC8vIFNlZSBodHRwczovL2dpdGh1Yi5jb20vZXVnZW5ld2FyZS9qcGVnLWpzL2lzc3Vlcy84MlxyXG4gICAgICAgICAgaWYgKG1hbGZvcm1lZERhdGFPZmZzZXQgIT09IC0xKSB7XHJcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgZmlyc3QgdW5rbm93biBKUEVHIG1hcmtlciBhdCBvZmZzZXQgJHttYWxmb3JtZWREYXRhT2Zmc2V0LnRvU3RyaW5nKDE2KX0sIHNlY29uZCB1bmtub3duIEpQRUcgbWFya2VyICR7ZmlsZU1hcmtlci50b1N0cmluZygxNil9IGF0IG9mZnNldCAkeyhvZmZzZXQgLSAxKS50b1N0cmluZygxNil9YCk7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBtYWxmb3JtZWREYXRhT2Zmc2V0ID0gb2Zmc2V0IC0gMTtcclxuICAgICAgICAgIGNvbnN0IG5leHRPZmZzZXQgPSByZWFkVWludDE2KCk7XHJcbiAgICAgICAgICBpZiAoZGF0YVtvZmZzZXQgKyBuZXh0T2Zmc2V0IC0gMl0gPT09IDB4RkYpIHtcclxuICAgICAgICAgICAgb2Zmc2V0ICs9IG5leHRPZmZzZXQgLSAyO1xyXG4gICAgICAgICAgICBicmVhaztcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHRocm93IG5ldyBFcnJvcigndW5rbm93biBKUEVHIG1hcmtlciAnICsgZmlsZU1hcmtlci50b1N0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nQxTGluZVswIHwgKHggKiBjb21wb25lbnQxLnNjYWxlWCldO1xyXG4gICAgICAgICAgZGF0YVtvZmZzZXQrK10gPSBZO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgICBicmVhaztcclxuICAgIH1cclxuICAgIGNhc2UgMjoge1xyXG4gICAgICAvLyBQREYgbWlnaHQgY29tcHJlc3MgdHdvIGNvbXBvbmVudCBkYXRhIGluIGN1c3RvbSBjb2xvcnNwYWNlXHJcbiAgICAgIGNvbnN0IGNvbXBvbmVudDEgPSBkZWNvZGVkLmNvbXBvbmVudHNbMF07XHJcbiAgICAgIGNvbnN0IGNvbXBvbmVudDIgPSBkZWNvZGVkLmNvbXBvbmVudHNbMV07XHJcblxyXG4gICAgICBmb3IgKGxldCB5ID0gMDsgeSA8IGhlaWdodDsgeSsrKSB7XHJcbiAgICAgICAgY29uc3QgY29tcG9uZW50MUxpbmUgPSBjb21wb25lbnQxLmxpbmVzWzAgfCAoeSAqIGNvbXBvbmVudDEuc2NhbGVZKV07XHJcbiAgICAgICAgY29uc3QgY29tcG9uZW50MkxpbmUgPSBjb21wb25lbnQyLmxpbmVzWzAgfCAoeSAqIGNvbXBvbmVudDIuc2NhbGVZKV07XHJcblxyXG4gICAgICAgIGZvciAobGV0IHggPSAwOyB4IDwgd2lkdGg7IHgrKykge1xyXG4gICAgICAgICAgY29uc3QgWTEgPSBjb21wb25lbnQxTGluZVswIHwgKHggKiBjb21wb25lbnQxLnNjYWxlWCldO1xyXG4gICAgICAgICAgZGF0YVtvZmZzZXQrK10gPSBZMTtcclxuICAgICAgICAgIGNvbnN0IFkyID0gY29tcG9uZW50MkxpbmVbMCB8ICh4ICogY29tcG9uZW50Mi5zY2FsZVgpXTtcclxuICAgICAgICAgIGRhdGFbb2Zmc2V0KytdID0gWTI7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICAgIGJyZWFrO1xyXG4gICAgfVxyXG4gICAgY2FzZSAzOiB7XHJcbiAgICAgIC8vIFRoZSBkZWZhdWx0IHRyYW5zZm9ybSBmb3IgdGhyZWUgY29tcG9uZW50cyBpcyB0cnVlXHJcbiAgICAgIGNvbG9yVHJhbnNmb3JtID0gdHJ1ZTtcclxuICAgICAgLy8gVGhlIGFkb2JlIHRyYW5zZm9ybSBtYXJrZXIgb3ZlcnJpZGVzIGFueSBwcmV2aW91cyBzZXR0aW5nXHJcbiAgICAgIGlmIChkZWNvZGVkLmFkb2JlICYmIGRlY29kZWQuYWRvYmUudHJhbnNmb3JtQ29kZSkgY29sb3JUcmFuc2Zvcm0gPSB0cnVlO1xyXG5cclxuICAgICAgY29uc3QgY29tcG9uZW50MSA9IGRlY29kZWQuY29tcG9uZW50c1swXTtcclxuICAgICAgY29uc3QgY29tcG9uZW50MiA9IGRlY29kZWQuY29tcG9uZW50c1sxXTtcclxuICAgICAgY29uc3QgY29tcG9uZW50MyA9IGRlY29kZWQuY29tcG9uZW50c1syXTtcclxuXHJcbiAgICAgIGZvciAobGV0IHkgPSAwOyB5IDwgaGVpZ2h0OyB5KyspIHtcclxuICAgICAgICBjb25zdCBjb21wb25lbnQxTGluZSA9IGNvbXBvbmVudDEubGluZXNbMCB8ICh5ICogY29tcG9uZW50MS5zY2FsZVkpXTtcclxuICAgICAgICBjb25zdCBjb21wb25lbnQyTGluZSA9IGNvbXBvbmVudDIubGluZXNbMCB8ICh5ICogY29tcG9uZW50Mi5zY2FsZVkpXTtcclxuICAgICAgICBjb25zdCBjb21wb25lbnQzTGluZSA9IGNvbXBvbmVudDMubGluZXNbMCB8ICh5ICogY29tcG9uZW50My5zY2FsZVkpXTtcclxuXHJcbiAgICAgICAgZm9yIChsZXQgeCA9IDA7IHggPCB3aWR0aDsgeCsrKSB7XHJcbiAgICAgICAgICBsZXQgWSwgQ2IsIENyLCBSLCBHLCBCO1xyXG5cclxuICAgICAgICAgIGlmICghY29sb3JUcmFuc2Zvcm0pIHtcclxuICAgICAgICAgICAgUiA9IGNvbXBvbmVudDFMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDEuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIEcgPSBjb21wb25lbnQyTGluZVswIHwgKHggKiBjb21wb25lbnQyLnNjYWxlWCldO1xyXG4gICAgICAgICAgICBCID0gY29tcG9uZW50M0xpbmVbMCB8ICh4ICogY29tcG9uZW50My5zY2FsZVgpXTtcclxuICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIFkgPSBjb21wb25lbnQxTGluZVswIHwgKHggKiBjb21wb25lbnQxLnNjYWxlWCldO1xyXG4gICAgICAgICAgICBDYiA9IGNvbXBvbmVudDJMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDIuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIENyID0gY29tcG9uZW50M0xpbmVbMCB8ICh4ICogY29tcG9uZW50My5zY2FsZVgpXTtcclxuXHJcbiAgICAgICAgICAgIFIgPSBjbGFtcFRvOGJpdChZICsgMS40MDIgKiAoQ3IgLSAxMjgpKTtcclxuICAgICAgICAgICAgRyA9IGNsYW1wVG84Yml0KFkgLSAwLjM0NDEzNjMgKiAoQ2IgLSAxMjgpIC0gMC43MTQxMzYzNiAqIChDciAtIDEyOCkpO1xyXG4gICAgICAgICAgICBCID0gY2xhbXBUbzhiaXQoWSArIDEuNzcyICogKENiIC0gMTI4KSk7XHJcbiAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgZGF0YVtvZmZzZXQrK10gPSBSO1xyXG4gICAgICAgICAgZGF0YVtvZmZzZXQrK10gPSBHO1xyXG4gICAgICAgICAgZGF0YVtvZmZzZXQrK10gPSBCO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgICBicmVhaztcclxuICAgIH1cclxuICAgIGNhc2UgNDoge1xyXG4gICAgICBpZiAoIWRlY29kZWQuYWRvYmUpIHRocm93IG5ldyBFcnJvcignVW5zdXBwb3J0ZWQgY29sb3IgbW9kZSAoNCBjb21wb25lbnRzKScpO1xyXG4gICAgICAvLyBU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DsgeCA8IHdpZHRoOyB4KyspIHtcclxuICAgICAgICAgIGxldCBZLCBDYiwgQ3IsIEssIEMsIE0sIFllO1xyXG5cclxuICAgICAgICAgIGlmICghY29sb3JUcmFuc2Zvcm0pIHtcclxuICAgICAgICAgICAgQyA9IGNvbXBvbmVudDFMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDEuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIE0gPSBjb21wb25lbnQyTGluZVswIHwgKHggKiBjb21wb25lbnQyLnNjYWxlWCldO1xyXG4gICAgICAgICAgICBZZSA9IGNvbXBvbmVudDNMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDMuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIEsgPSBjb21wb25lbnQ0TGluZVswIHwgKHggKiBjb21wb25lbnQ0LnNjYWxlWCldO1xyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgWSA9IGNvbXBvbmVudDFMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDEuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIENiID0gY29tcG9uZW50MkxpbmVbMCB8ICh4ICogY29tcG9uZW50Mi5zY2FsZVgpXTtcclxuICAgICAgICAgICAgQ3IgPSBjb21wb25lbnQzTGluZVswIHwgKHggKiBjb21wb25lbnQzLnNjYWxlWCldO1xyXG4gICAgICAgICAgICBLID0gY29tcG9uZW50NExpbmVbMCB8ICh4ICogY29tcG9uZW50NC5zY2FsZVgpXTtcclxuXHJcbiAgICAgICAgICAgIEMgPSAyNTUgLSBjbGFtcFRvOGJpdChZICsgMS40MDIgKiAoQ3IgLSAxMjgpKTtcclxuICAgICAgICAgICAgTSA9IDI1NSAtIGNsYW1wVG84Yml0KFkgLSAwLjM0NDEzNjMgKiAoQ2IgLSAxMjgpIC0gMC43MTQxMzYzNiAqIChDciAtIDEyOCkpO1xyXG4gICAgICAgICAgICBZZSA9IDI1NSAtIGNsYW1wVG84Yml0KFkgKyAxLjc3MiAqIChDYiAt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gIGNvbnN0IGhlaWdodCA9IGltYWdlRGF0YS5oZWlnaHQ7XHJcbiAgY29uc3QgaW1hZ2VEYXRhQXJyYXkgPSBpbWFnZURhdGEuZGF0YTtcclxuXHJcbiAgbGV0IGkgPSAwO1xyXG4gIGxldCBqID0gMDtcclxuXHJcbiAgc3dpdGNoIChkZWNvZGVkLmNvbXBvbmVudHMubGVuZ3RoKSB7XHJcbiAgICBjYXNlIDE6XHJcbiAgICAgIGZvciAobGV0IHkgPSAwOyB5IDwgaGVpZ2h0OyB5KyspIHtcclxuICAgICAgICBmb3IgKGxldCB4ID0gMDsgeCA8IHdpZHRoOyB4KyspIHtcclxuICAgICAgICAgIGNvbnN0IFkgPSBkYXRhW2krK107XHJcblxyXG4gICAgICAgICAgaW1hZ2VEYXRhQXJyYXlbaisrXSA9IFk7XHJcbiAgICAgICAgICBpbWFnZURhdGFBcnJheVtqKytdID0gWTtcclxuICAgICAgICAgIGltYWdlRGF0YUFycmF5W2orK10gPSBZO1xyXG4gICAgICAgICAgaW1hZ2VEYXRhQXJyYXlbaisrXSA9IDI1NTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICAgYnJlYWs7XHJcbiAgICBjYXNlIDM6XHJcbiAgICAgIGZvciAobGV0IHkgPSAwOyB5IDwgaGVpZ2h0OyB5KyspIHtcclxuICAgICAgICBmb3IgKGxldCB4ID0gMDsgeCA8IHdpZHRoOyB4KyspIHtcclxuICAgICAgICAgIGNvbnN0IFIgPSBkYXRhW2krK107XHJcbiAgICAgICAgICBjb25zdCBHID0gZGF0YVtpKytdO1xyXG4gICAgICAgICAgY29uc3QgQiA9IGRhdGFbaSsrXTtcclxuXHJcbiAgICAgICAgICBpbWFnZURhdGFBcnJheVtqKytdID0gUjtcclxuICAgICAgICAgIGltYWdlRGF0YUFycmF5W2orK10gPSBHO1xyXG4gICAgICAgICAgaW1hZ2VEYXRhQXJyYXlbaisrXSA9IEI7XHJcbiAgICAgICAgICBpbWFnZURhdGFBcnJheVtqKytdID0gMjU1O1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgICBicmVhaztcclxuICAgIGNhc2UgNDpcclxuICAgICAgZm9yIChsZXQgeSA9IDA7IHkgPCBoZWlnaHQ7IHkrKykge1xyXG4gICAgICAgIGZvciAobGV0IHggPSAwOyB4IDwgd2lkdGg7IHgrKykge1xyXG4gICAgICAgICAgY29uc3QgQyA9IGRhdGFbaSsrXTtcclxuICAgICAgICAgIGNvbnN0IE0gPSBkYXRhW2krK107XHJcbiAgICAgICAgICBjb25zdCBZID0gZGF0YVtpKytdO1xyXG4gICAgICAgICAgY29uc3QgSyA9IGRhdGFbaSsrXTtcclxuXHJcbiAgICAgICAgICBjb25zdCBSID0gMjU1IC0gY2xhbXBUbzhiaXQoQyAqICgxIC0gSyAvIDI1NSkgKyBLKTtcclxuICAgICAgICAgIGNvbnN0IEcgPSAyNTUgLSBjbGFtcFRvOGJpdChNICogKDEgLSBLIC8gMjU1KSArIEspO1xyXG4gICAgICAgICAgY29uc3QgQiA9IDI1NSAtIGNsYW1wVG84Yml0KFkgKiAoMSAtIEsgLyAyNTUpICsgSyk7XHJcblxyXG4gICAgICAgICAgaW1hZ2VEYXRhQXJyYXlbaisrXSA9IFI7XHJcbiAgICAgICAgICBpbWFnZURhdGFBcnJheVtqKytdID0gRztcclxuICAgICAgICAgIGltYWdlRGF0YUFycmF5W2orK10gPSBCO1xyXG4gICAgICAgICAgaW1hZ2VEYXRhQXJyYXlbaisrXSA9IDI1NTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICAgYnJlYWs7XHJcbiAgICBkZWZhdWx0OlxyXG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ1Vuc3VwcG9ydGVkIGNvbG9yIG1vZGUnKTtcclxuICB9XHJcblxyXG4gIHJldHVybiBpbWFnZURhdGE7XHJcbn1cclxuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/jpeg.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/jpeg.js.map deleted file mode 100644 index 0dfdb33..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/jpeg.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jpeg.js","sourceRoot":"../src/","sources":["jpeg.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C;;;;;;;;;;;;;;EAcE;AA6CF,IAAM,SAAS,GAAG,IAAI,UAAU,CAAC;IAC/B,CAAC;IACD,CAAC,EAAE,CAAC;IACJ,EAAE,EAAE,CAAC,EAAE,CAAC;IACR,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IACb,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IACjB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IACrB,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IAC7B,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IAC1B,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IACtB,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IAClB,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IACd,EAAE,EAAE,EAAE,EAAE,EAAE;IACV,EAAE,EAAE,EAAE;IACN,EAAE;CACH,CAAC,CAAC;AACH,IAAM,OAAO,GAAG,IAAI,CAAC,CAAC,aAAa;AACnC,IAAM,OAAO,GAAG,GAAG,CAAC,CAAC,aAAa;AA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d.ts index b91d866..adf1489 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psd.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psd.d.ts @@ -1,1287 +1,1147 @@ -export type BlendMode = 'pass through' | 'normal' | 'dissolve' | 'darken' | 'multiply' | 'color burn' | 'linear burn' | 'darker color' | 'lighten' | 'screen' | 'color dodge' | 'linear dodge' | 'lighter color' | 'overlay' | 'soft light' | 'hard light' | 'vivid light' | 'linear light' | 'pin light' | 'hard mix' | 'difference' | 'exclusion' | 'subtract' | 'divide' | 'hue' | 'saturation' | 'color' | 'luminosity'; -export declare const enum ColorMode { - Bitmap = 0, - Grayscale = 1, - Indexed = 2, - RGB = 3, - CMYK = 4, - Multichannel = 7, - Duotone = 8, - Lab = 9 -} -export declare const enum SectionDividerType { - Other = 0, - OpenFolder = 1, - ClosedFolder = 2, - BoundingSectionDivider = 3 -} -export type RGBA = { - r: number; - g: number; - b: number; - a: number; -}; -export type RGB = { - r: number; - g: number; - b: number; -}; -export type FRGB = { - fr: number; - fg: number; - fb: number; -}; -export type HSB = { - h: number; - s: number; - b: number; -}; -export type CMYK = { - c: number; - m: number; - y: number; - k: number; -}; -export type LAB = { - l: number; - a: number; - b: number; -}; -export type Grayscale = { - k: number; -}; -export type Color = RGBA | RGB | FRGB | HSB | CMYK | LAB | Grayscale; -export interface EffectContour { - name: string; - curve: { - x: number; - y: number; - }[]; -} -export interface EffectPattern { - name: string; - id: string; -} -export interface LayerEffectShadow { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - angle?: number; - distance?: UnitsValue; - color?: Color; - blendMode?: BlendMode; - opacity?: number; - useGlobalLight?: boolean; - antialiased?: boolean; - contour?: EffectContour; - choke?: UnitsValue; - layerConceals?: boolean; -} -export interface LayerEffectsOuterGlow { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - color?: Color; - blendMode?: BlendMode; - opacity?: number; - source?: GlowSource; - antialiased?: boolean; - noise?: number; - range?: number; - choke?: UnitsValue; - jitter?: number; - contour?: EffectContour; -} -export interface LayerEffectInnerGlow { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - color?: Color; - blendMode?: BlendMode; - opacity?: number; - source?: GlowSource; - technique?: GlowTechnique; - antialiased?: boolean; - noise?: number; - range?: number; - choke?: UnitsValue; - jitter?: number; - contour?: EffectContour; -} -export interface LayerEffectBevel { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - angle?: number; - strength?: number; - highlightBlendMode?: BlendMode; - shadowBlendMode?: BlendMode; - highlightColor?: Color; - shadowColor?: Color; - style?: BevelStyle; - highlightOpacity?: number; - shadowOpacity?: number; - soften?: UnitsValue; - useGlobalLight?: boolean; - altitude?: number; - technique?: BevelTechnique; - direction?: BevelDirection; - useTexture?: boolean; - useShape?: boolean; - antialiasGloss?: boolean; - contour?: EffectContour; -} -export interface LayerEffectSolidFill { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - blendMode?: BlendMode; - color?: Color; - opacity?: number; -} -export interface LayerEffectStroke { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - overprint?: boolean; - size?: UnitsValue; - position?: 'inside' | 'center' | 'outside'; - fillType?: 'color' | 'gradient' | 'pattern'; - blendMode?: BlendMode; - opacity?: number; - color?: Color; - gradient?: (EffectSolidGradient | EffectNoiseGradient) & ExtraGradientInfo; - pattern?: EffectPattern & {}; -} -export interface LayerEffectSatin { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - blendMode?: BlendMode; - color?: Color; - antialiased?: boolean; - opacity?: number; - distance?: UnitsValue; - invert?: boolean; - angle?: number; - contour?: EffectContour; -} -export interface LayerEffectPatternOverlay { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - blendMode?: BlendMode; - opacity?: number; - scale?: number; - pattern?: EffectPattern; - phase?: { - x: number; - y: number; - }; - align?: boolean; -} -export interface EffectSolidGradient { - name: string; - type: 'solid'; - smoothness?: number; - colorStops: ColorStop[]; - opacityStops: OpacityStop[]; -} -export interface EffectNoiseGradient { - name: string; - type: 'noise'; - roughness?: number; - colorModel?: 'rgb' | 'hsb' | 'lab'; - randomSeed?: number; - restrictColors?: boolean; - addTransparency?: boolean; - min: number[]; - max: number[]; -} -export interface LayerEffectGradientOverlay { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - blendMode?: string; - opacity?: number; - align?: boolean; - scale?: number; - dither?: boolean; - reverse?: boolean; - type?: GradientStyle; - offset?: { - x: number; - y: number; - }; - gradient?: EffectSolidGradient | EffectNoiseGradient; - interpolationMethod?: InterpolationMethod; -} -export interface LayerEffectsInfo { - disabled?: boolean; - scale?: number; - dropShadow?: LayerEffectShadow[]; - innerShadow?: LayerEffectShadow[]; - outerGlow?: LayerEffectsOuterGlow; - innerGlow?: LayerEffectInnerGlow; - bevel?: LayerEffectBevel; - solidFill?: LayerEffectSolidFill[]; - satin?: LayerEffectSatin; - stroke?: LayerEffectStroke[]; - gradientOverlay?: LayerEffectGradientOverlay[]; - patternOverlay?: LayerEffectPatternOverlay; -} -export interface LayerMaskData { - top?: number; - left?: number; - bottom?: number; - right?: number; - defaultColor?: number; - disabled?: boolean; - positionRelativeToLayer?: boolean; - fromVectorData?: boolean; - userMaskDensity?: number; - userMaskFeather?: number; - vectorMaskDensity?: number; - vectorMaskFeather?: number; - canvas?: HTMLCanvasElement; - imageData?: ImageData; -} -export type TextGridding = 'none' | 'round'; -export type Orientation = 'horizontal' | 'vertical'; -export type AntiAlias = 'none' | 'sharp' | 'crisp' | 'strong' | 'smooth' | 'platform' | 'platformLCD'; -export type WarpStyle = 'none' | 'arc' | 'arcLower' | 'arcUpper' | 'arch' | 'bulge' | 'shellLower' | 'shellUpper' | 'flag' | 'wave' | 'fish' | 'rise' | 'fisheye' | 'inflate' | 'squeeze' | 'twist' | 'custom' | 'cylinder'; -export type BevelStyle = 'outer bevel' | 'inner bevel' | 'emboss' | 'pillow emboss' | 'stroke emboss'; -export type BevelTechnique = 'smooth' | 'chisel hard' | 'chisel soft'; -export type BevelDirection = 'up' | 'down'; -export type GlowTechnique = 'softer' | 'precise'; -export type GlowSource = 'edge' | 'center'; -export type GradientStyle = 'linear' | 'radial' | 'angle' | 'reflected' | 'diamond'; -export type Justification = 'left' | 'right' | 'center'; -export type LineCapType = 'butt' | 'round' | 'square'; -export type LineJoinType = 'miter' | 'round' | 'bevel'; -export type LineAlignment = 'inside' | 'center' | 'outside'; -export type InterpolationMethod = 'classic' | 'perceptual' | 'linear'; -export interface Warp { - style?: WarpStyle; - value?: number; - values?: number[]; - perspective?: number; - perspectiveOther?: number; - rotate?: Orientation; - bounds?: { - top: UnitsValue; - left: UnitsValue; - bottom: UnitsValue; - right: UnitsValue; - }; - uOrder?: number; - vOrder?: number; - deformNumRows?: number; - deformNumCols?: number; - customEnvelopeWarp?: { - quiltSliceX?: number[]; - quiltSliceY?: number[]; - meshPoints: { - x: number; - y: number; - }[]; - }; -} -export interface Animations { - frames: { - id: number; - delay: number; - dispose?: 'auto' | 'none' | 'dispose'; - }[]; - animations: { - id: number; - frames: number[]; - repeats?: number; - activeFrame?: number; - }[]; -} -export interface Font { - name: string; - script?: number; - type?: number; - synthetic?: number; -} -export interface ParagraphStyle { - justification?: Justification; - firstLineIndent?: number; - startIndent?: number; - endIndent?: number; - spaceBefore?: number; - spaceAfter?: number; - autoHyphenate?: boolean; - hyphenatedWordSize?: number; - preHyphen?: number; - postHyphen?: number; - consecutiveHyphens?: number; - zone?: number; - wordSpacing?: number[]; - letterSpacing?: number[]; - glyphSpacing?: number[]; - autoLeading?: number; - leadingType?: number; - hanging?: boolean; - burasagari?: boolean; - kinsokuOrder?: number; - everyLineComposer?: boolean; -} -export interface ParagraphStyleRun { - length: number; - style: ParagraphStyle; -} -export interface TextStyle { - font?: Font; - fontSize?: number; - fauxBold?: boolean; - fauxItalic?: boolean; - autoLeading?: boolean; - leading?: number; - horizontalScale?: number; - verticalScale?: number; - tracking?: number; - autoKerning?: boolean; - kerning?: number; - baselineShift?: number; - fontCaps?: number; - fontBaseline?: number; - underline?: boolean; - strikethrough?: boolean; - ligatures?: boolean; - dLigatures?: boolean; - baselineDirection?: number; - tsume?: number; - styleRunAlignment?: number; - language?: number; - noBreak?: boolean; - fillColor?: Color; - strokeColor?: Color; - fillFlag?: boolean; - strokeFlag?: boolean; - fillFirst?: boolean; - yUnderline?: number; - outlineWidth?: number; - characterDirection?: number; - hindiNumbers?: boolean; - kashida?: number; - diacriticPos?: number; -} -export interface TextStyleRun { - length: number; - style: TextStyle; -} -export interface TextGridInfo { - isOn?: boolean; - show?: boolean; - size?: number; - leading?: number; - color?: Color; - leadingFillColor?: Color; - alignLineHeightToGridFlags?: boolean; -} -export interface LayerTextData { - text: string; - transform?: number[]; - antiAlias?: AntiAlias; - gridding?: TextGridding; - orientation?: Orientation; - index?: number; - warp?: Warp; - top?: number; - left?: number; - bottom?: number; - right?: number; - gridInfo?: TextGridInfo; - useFractionalGlyphWidths?: boolean; - style?: TextStyle; - styleRuns?: TextStyleRun[]; - paragraphStyle?: ParagraphStyle; - paragraphStyleRuns?: ParagraphStyleRun[]; - superscriptSize?: number; - superscriptPosition?: number; - subscriptSize?: number; - subscriptPosition?: number; - smallCapSize?: number; - shapeType?: 'point' | 'box'; - pointBase?: number[]; - boxBounds?: number[]; -} -export interface PatternInfo { - name: string; - id: string; - x: number; - y: number; - bounds: { - x: number; - y: number; - w: number; - h: number; - }; - data: Uint8Array; -} -export interface BezierKnot { - linked: boolean; - points: number[]; -} -export type BooleanOperation = 'exclude' | 'combine' | 'subtract' | 'intersect'; -export interface BezierPath { - open: boolean; - operation: BooleanOperation; - knots: BezierKnot[]; -} -export interface ExtraGradientInfo { - style?: GradientStyle; - scale?: number; - angle?: number; - dither?: boolean; - reverse?: boolean; - align?: boolean; - offset?: { - x: number; - y: number; - }; -} -export interface ExtraPatternInfo { - linked?: boolean; - phase?: { - x: number; - y: number; - }; -} -export type VectorContent = { - type: 'color'; - color: Color; -} | (EffectSolidGradient & ExtraGradientInfo) | (EffectNoiseGradient & ExtraGradientInfo) | (EffectPattern & { - type: 'pattern'; -} & ExtraPatternInfo); -export type RenderingIntent = 'perceptual' | 'saturation' | 'relative colorimetric' | 'absolute colorimetric'; -export type Units = 'Pixels' | 'Points' | 'Picas' | 'Millimeters' | 'Centimeters' | 'Inches' | 'None' | 'Density'; -export interface UnitsValue { - units: Units; - value: number; -} -export interface BrightnessAdjustment { - type: 'brightness/contrast'; - brightness?: number; - contrast?: number; - meanValue?: number; - useLegacy?: boolean; - labColorOnly?: boolean; - auto?: boolean; -} -export interface LevelsAdjustmentChannel { - shadowInput: number; - highlightInput: number; - shadowOutput: number; - highlightOutput: number; - midtoneInput: number; -} -export interface PresetInfo { - presetKind?: number; - presetFileName?: string; -} -export interface LevelsAdjustment extends PresetInfo { - type: 'levels'; - rgb?: LevelsAdjustmentChannel; - red?: LevelsAdjustmentChannel; - green?: LevelsAdjustmentChannel; - blue?: LevelsAdjustmentChannel; -} -export type CurvesAdjustmentChannel = { - input: number; - output: number; -}[]; -export interface CurvesAdjustment extends PresetInfo { - type: 'curves'; - rgb?: CurvesAdjustmentChannel; - red?: CurvesAdjustmentChannel; - green?: CurvesAdjustmentChannel; - blue?: CurvesAdjustmentChannel; -} -export interface ExposureAdjustment extends PresetInfo { - type: 'exposure'; - exposure?: number; - offset?: number; - gamma?: number; -} -export interface VibranceAdjustment { - type: 'vibrance'; - vibrance?: number; - saturation?: number; -} -export interface HueSaturationAdjustmentChannel { - a: number; - b: number; - c: number; - d: number; - hue: number; - saturation: number; - lightness: number; -} -export interface HueSaturationAdjustment extends PresetInfo { - type: 'hue/saturation'; - master?: HueSaturationAdjustmentChannel; - reds?: HueSaturationAdjustmentChannel; - yellows?: HueSaturationAdjustmentChannel; - greens?: HueSaturationAdjustmentChannel; - cyans?: HueSaturationAdjustmentChannel; - blues?: HueSaturationAdjustmentChannel; - magentas?: HueSaturationAdjustmentChannel; -} -export interface ColorBalanceValues { - cyanRed: number; - magentaGreen: number; - yellowBlue: number; -} -export interface ColorBalanceAdjustment { - type: 'color balance'; - shadows?: ColorBalanceValues; - midtones?: ColorBalanceValues; - highlights?: ColorBalanceValues; - preserveLuminosity?: boolean; -} -export interface BlackAndWhiteAdjustment extends PresetInfo { - type: 'black & white'; - reds?: number; - yellows?: number; - greens?: number; - cyans?: number; - blues?: number; - magentas?: number; - useTint?: boolean; - tintColor?: Color; -} -export interface PhotoFilterAdjustment { - type: 'photo filter'; - color?: Color; - density?: number; - preserveLuminosity?: boolean; -} -export interface ChannelMixerChannel { - red: number; - green: number; - blue: number; - constant: number; -} -export interface ChannelMixerAdjustment extends PresetInfo { - type: 'channel mixer'; - monochrome?: boolean; - red?: ChannelMixerChannel; - green?: ChannelMixerChannel; - blue?: ChannelMixerChannel; - gray?: ChannelMixerChannel; -} -export interface ColorLookupAdjustment { - type: 'color lookup'; - lookupType?: '3dlut' | 'abstractProfile' | 'deviceLinkProfile'; - name?: string; - dither?: boolean; - profile?: Uint8Array; - lutFormat?: 'look' | 'cube' | '3dl'; - dataOrder?: 'rgb' | 'bgr'; - tableOrder?: 'rgb' | 'bgr'; - lut3DFileData?: Uint8Array; - lut3DFileName?: string; -} -export interface InvertAdjustment { - type: 'invert'; -} -export interface PosterizeAdjustment { - type: 'posterize'; - levels?: number; -} -export interface ThresholdAdjustment { - type: 'threshold'; - level?: number; -} -export interface ColorStop { - color: Color; - location: number; - midpoint: number; -} -export interface OpacityStop { - opacity: number; - location: number; - midpoint: number; -} -export interface GradientMapAdjustment { - type: 'gradient map'; - name?: string; - gradientType: 'solid' | 'noise'; - dither?: boolean; - reverse?: boolean; - smoothness?: number; - colorStops?: ColorStop[]; - opacityStops?: OpacityStop[]; - roughness?: number; - colorModel?: 'rgb' | 'hsb' | 'lab'; - randomSeed?: number; - restrictColors?: boolean; - addTransparency?: boolean; - min?: number[]; - max?: number[]; -} -export interface SelectiveColorAdjustment { - type: 'selective color'; - mode?: 'relative' | 'absolute'; - reds?: CMYK; - yellows?: CMYK; - greens?: CMYK; - cyans?: CMYK; - blues?: CMYK; - magentas?: CMYK; - whites?: CMYK; - neutrals?: CMYK; - blacks?: CMYK; -} -export interface LinkedFile { - id: string; - name: string; - type?: string; - creator?: string; - data?: Uint8Array; - time?: string; - descriptor?: { - compInfo: { - compID: number; - originalCompID: number; - }; - }; - childDocumentID?: string; - assetModTime?: number; - assetLockedState?: number; -} -export interface PlacedLayerFilter { - enabled: boolean; - validAtPosition: boolean; - maskEnabled: boolean; - maskLinked: boolean; - maskExtendWithWhite: boolean; - list: { - id: number; - name: string; - opacity: number; - blendMode: BlendMode; - enabled: boolean; - hasOptions: boolean; - foregroundColor: Color; - backgroundColor: Color; - filter: { - rigidType: boolean; - bounds: { - x: number; - y: number; - }[]; - puppetShapeList: { - rigidType: boolean; - originalVertexArray: { - x: number; - y: number; - }[]; - deformedVertexArray: { - x: number; - y: number; - }[]; - indexArray: number[]; - pinOffsets: { - x: number; - y: number; - }[]; - posFinalPins: { - x: number; - y: number; - }[]; - pinVertexIndices: number[]; - selectedPin: number[]; - pinPosition: { - x: number; - y: number; - }[]; - pinRotation: number[]; - pinOverlay: boolean[]; - pinDepth: number[]; - meshQuality: number; - meshExpansion: number; - meshRigidity: number; - imageResolution: number; - meshBoundaryPath: { - pathComponents: { - shapeOperation: string; - paths: { - closed: boolean; - points: { - anchor: { - x: UnitsValue; - y: UnitsValue; - }; - forward: { - x: UnitsValue; - y: UnitsValue; - }; - backward: { - x: UnitsValue; - y: UnitsValue; - }; - smooth: boolean; - }[]; - }[]; - }[]; - }; - }[]; - }; - }[]; -} -export type PlacedLayerType = 'unknown' | 'vector' | 'raster' | 'image stack'; -export interface PlacedLayer { - id: string; - placed?: string; - type: PlacedLayerType; - pageNumber?: number; - totalPages?: number; - frameStep?: { - numerator: number; - denominator: number; - }; - duration?: { - numerator: number; - denominator: number; - }; - frameCount?: number; - transform: number[]; - nonAffineTransform?: number[]; - width?: number; - height?: number; - resolution?: UnitsValue; - warp?: Warp; - crop?: number; - comp?: number; - compInfo?: { - compID: number; - originalCompID: number; - }; - filter?: PlacedLayerFilter; -} -export type AdjustmentLayer = BrightnessAdjustment | LevelsAdjustment | CurvesAdjustment | ExposureAdjustment | VibranceAdjustment | HueSaturationAdjustment | ColorBalanceAdjustment | BlackAndWhiteAdjustment | PhotoFilterAdjustment | ChannelMixerAdjustment | ColorLookupAdjustment | InvertAdjustment | PosterizeAdjustment | ThresholdAdjustment | GradientMapAdjustment | SelectiveColorAdjustment; -export type LayerColor = 'none' | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'violet' | 'gray'; -export interface KeyDescriptorItem { - keyShapeInvalidated?: boolean; - keyOriginType?: number; - keyOriginResolution?: number; - keyOriginRRectRadii?: { - topRight: UnitsValue; - topLeft: UnitsValue; - bottomLeft: UnitsValue; - bottomRight: UnitsValue; - }; - keyOriginShapeBoundingBox?: { - top: UnitsValue; - left: UnitsValue; - bottom: UnitsValue; - right: UnitsValue; - }; - keyOriginBoxCorners?: { - x: number; - y: number; - }[]; - transform?: number[]; -} -export interface LayerVectorMask { - invert?: boolean; - notLink?: boolean; - disable?: boolean; - fillStartsWithAllPixels?: boolean; - clipboard?: { - top: number; - left: number; - bottom: number; - right: number; - resolution: number; - }; - paths: BezierPath[]; -} -export interface AnimationFrame { - frames: number[]; - enable?: boolean; - offset?: { - x: number; - y: number; - }; - referencePoint?: { - x: number; - y: number; - }; - opacity?: number; - effects?: LayerEffectsInfo; -} -export interface Fraction { - numerator: number; - denominator: number; -} -export type TimelineKeyInterpolation = 'linear' | 'hold'; -export type TimelineKey = { - interpolation: TimelineKeyInterpolation; - time: Fraction; - selected?: boolean; -} & ({ - type: 'opacity'; - value: number; -} | { - type: 'position'; - x: number; - y: number; -} | { - type: 'transform'; - scale: { - x: number; - y: number; - }; - skew: { - x: number; - y: number; - }; - rotation: number; - translation: { - x: number; - y: number; - }; -} | { - type: 'style'; - style?: LayerEffectsInfo; -} | { - type: 'globalLighting'; - globalAngle: number; - globalAltitude: number; -}); -export type TimelineTrackType = 'opacity' | 'style' | 'sheetTransform' | 'sheetPosition' | 'globalLighting'; -export interface TimelineTrack { - type: TimelineTrackType; - enabled?: boolean; - effectParams?: { - keys: TimelineKey[]; - fillCanvas: boolean; - zoomOrigin: number; - }; - keys: TimelineKey[]; -} -export interface Timeline { - start: Fraction; - duration: Fraction; - inTime: Fraction; - outTime: Fraction; - autoScope: boolean; - audioLevel: number; - tracks?: TimelineTrack[]; -} -export interface LayerAdditionalInfo { - name?: string; - nameSource?: string; - id?: number; - version?: number; - mask?: LayerMaskData; - blendClippendElements?: boolean; - blendInteriorElements?: boolean; - knockout?: boolean; - layerMaskAsGlobalMask?: boolean; - protected?: { - transparency?: boolean; - composite?: boolean; - position?: boolean; - artboards?: boolean; - }; - layerColor?: LayerColor; - referencePoint?: { - x: number; - y: number; - }; - sectionDivider?: { - type: SectionDividerType; - key?: string; - subType?: number; - }; - filterMask?: { - colorSpace: Color; - opacity: number; - }; - effects?: LayerEffectsInfo; - text?: LayerTextData; - patterns?: PatternInfo[]; - vectorFill?: VectorContent; - vectorStroke?: { - strokeEnabled?: boolean; - fillEnabled?: boolean; - lineWidth?: UnitsValue; - lineDashOffset?: UnitsValue; - miterLimit?: number; - lineCapType?: LineCapType; - lineJoinType?: LineJoinType; - lineAlignment?: LineAlignment; - scaleLock?: boolean; - strokeAdjust?: boolean; - lineDashSet?: UnitsValue[]; - blendMode?: BlendMode; - opacity?: number; - content?: VectorContent; - resolution?: number; - }; - vectorMask?: LayerVectorMask; - usingAlignedRendering?: boolean; - timestamp?: number; - pathList?: {}[]; - adjustment?: AdjustmentLayer; - placedLayer?: PlacedLayer; - vectorOrigination?: { - keyDescriptorList: KeyDescriptorItem[]; - }; - compositorUsed?: { - description: string; - reason: string; - engine: string; - enableCompCore: string; - enableCompCoreGPU: string; - compCoreSupport: string; - compCoreGPUSupport: string; - }; - artboard?: { - rect: { - top: number; - left: number; - bottom: number; - right: number; - }; - guideIndices?: any[]; - presetName?: string; - color?: Color; - backgroundType?: number; - }; - fillOpacity?: number; - transparencyShapesLayer?: boolean; - channelBlendingRestrictions?: number[]; - animationFrames?: AnimationFrame[]; - animationFrameFlags?: { - propagateFrameOne?: boolean; - unifyLayerPosition?: boolean; - unifyLayerStyle?: boolean; - unifyLayerVisibility?: boolean; - }; - timeline?: Timeline; - filterEffects?: any; - engineData?: string; -} -export interface ImageResources { - layerState?: number; - layersGroup?: number[]; - layerSelectionIds?: number[]; - layerGroupsEnabledId?: number[]; - versionInfo?: { - hasRealMergedData: boolean; - writerName: string; - readerName: string; - fileVersion: number; - }; - alphaIdentifiers?: number[]; - alphaChannelNames?: string[]; - globalAngle?: number; - globalAltitude?: number; - pixelAspectRatio?: { - aspect: number; - }; - urlsList?: { - id: number; - ref: 'slice'; - url: string; - }[]; - gridAndGuidesInformation?: { - grid?: { - horizontal: number; - vertical: number; - }; - guides?: { - location: number; - direction: 'horizontal' | 'vertical'; - }[]; - }; - resolutionInfo?: { - horizontalResolution: number; - horizontalResolutionUnit: 'PPI' | 'PPCM'; - widthUnit: 'Inches' | 'Centimeters' | 'Points' | 'Picas' | 'Columns'; - verticalResolution: number; - verticalResolutionUnit: 'PPI' | 'PPCM'; - heightUnit: 'Inches' | 'Centimeters' | 'Points' | 'Picas' | 'Columns'; - }; - thumbnail?: HTMLCanvasElement; - thumbnailRaw?: { - width: number; - height: number; - data: Uint8Array; - }; - captionDigest?: string; - xmpMetadata?: string; - printScale?: { - style?: 'centered' | 'size to fit' | 'user defined'; - x?: number; - y?: number; - scale?: number; - }; - printInformation?: { - printerManagesColors?: boolean; - printerName?: string; - printerProfile?: string; - printSixteenBit?: boolean; - renderingIntent?: RenderingIntent; - hardProof?: boolean; - blackPointCompensation?: boolean; - proofSetup?: { - builtin: string; - } | { - profile: string; - renderingIntent?: RenderingIntent; - blackPointCompensation?: boolean; - paperWhite?: boolean; - }; - }; - backgroundColor?: Color; - idsSeedNumber?: number; - printFlags?: { - labels?: boolean; - cropMarks?: boolean; - colorBars?: boolean; - registrationMarks?: boolean; - negative?: boolean; - flip?: boolean; - interpolate?: boolean; - caption?: boolean; - printFlags?: boolean; - }; - iccUntaggedProfile?: boolean; - pathSelectionState?: string[]; - imageReadyVariables?: string; - imageReadyDataSets?: string; - animations?: Animations; - onionSkins?: { - enabled: boolean; - framesBefore: number; - framesAfter: number; - frameSpacing: number; - minOpacity: number; - maxOpacity: number; - blendMode: BlendMode; - }; - timelineInformation?: { - enabled: boolean; - frameStep: Fraction; - frameRate: number; - time: Fraction; - duration: Fraction; - workInTime: Fraction; - workOutTime: Fraction; - repeats: number; - hasMotion: boolean; - globalTracks: TimelineTrack[]; - audioClipGroups?: { - id: string; - muted: boolean; - audioClips: { - id: string; - start: Fraction; - duration: Fraction; - inTime: Fraction; - outTime: Fraction; - muted: boolean; - audioLevel: number; - frameReader: { - type: number; - mediaDescriptor: string; - link: { - name: string; - fullPath: string; - relativePath: string; - }; - }; - }[]; - }[]; - }; - sheetDisclosure?: { - sheetTimelineOptions?: { - sheetID: number; - sheetDisclosed: boolean; - lightsDisclosed: boolean; - meshesDisclosed: boolean; - materialsDisclosed: boolean; - }[]; - }; - countInformation?: { - color: RGB; - name: string; - size: number; - fontSize: number; - visible: boolean; - points: { - x: number; - y: number; - }[]; - }[]; - slices?: { - bounds: { - left: number; - top: number; - right: number; - bottom: number; - }; - groupName: string; - slices: { - id: number; - groupId: number; - origin: 'userGenerated' | 'autoGenerated' | 'layer'; - associatedLayerId: number; - name: string; - type: 'image' | 'noImage'; - bounds: { - left: number; - top: number; - right: number; - bottom: number; - }; - url: string; - target: string; - message: string; - altTag: string; - cellTextIsHTML: boolean; - cellText: string; - horizontalAlignment: 'default'; - verticalAlignment: 'default'; - backgroundColorType: 'none' | 'matte' | 'color'; - backgroundColor: RGBA; - topOutset?: number; - leftOutset?: number; - bottomOutset?: number; - rightOutset?: number; - }[]; - }[]; -} -export interface GlobalLayerMaskInfo { - overlayColorSpace: number; - colorSpace1: number; - colorSpace2: number; - colorSpace3: number; - colorSpace4: number; - opacity: number; - kind: number; -} -export interface Annotation { - type: 'text' | 'sound'; - open: boolean; - iconLocation: { - left: number; - top: number; - right: number; - bottom: number; - }; - popupLocation: { - left: number; - top: number; - right: number; - bottom: number; - }; - color: Color; - author: string; - name: string; - date: string; - data: string | Uint8Array; -} -export interface Layer extends LayerAdditionalInfo { - top?: number; - left?: number; - bottom?: number; - right?: number; - blendMode?: BlendMode; - opacity?: number; - transparencyProtected?: boolean; - hidden?: boolean; - clipping?: boolean; - canvas?: HTMLCanvasElement; - imageData?: ImageData; - children?: Layer[]; - /** Applies only for layer groups. */ - opened?: boolean; -} -export interface Psd extends LayerAdditionalInfo { - width: number; - height: number; - channels?: number; - bitsPerChannel?: number; - colorMode?: ColorMode; - children?: Layer[]; - canvas?: HTMLCanvasElement; - imageData?: ImageData; - imageResources?: ImageResources; - linkedFiles?: LinkedFile[]; - artboards?: { - count: number; - autoExpandOffset?: { - horizontal: number; - vertical: number; - }; - origin?: { - horizontal: number; - vertical: number; - }; - autoExpandEnabled?: boolean; - autoNestEnabled?: boolean; - autoPositionEnabled?: boolean; - shrinkwrapOnSaveEnabled?: boolean; - docDefaultNewArtboardBackgroundColor?: Color; - docDefaultNewArtboardBackgroundType?: number; - }; - globalLayerMaskInfo?: GlobalLayerMaskInfo; - annotations?: Annotation[]; -} -export interface ReadOptions { - /** Does not load layer image data. */ - skipLayerImageData?: boolean; - /** Does not load composite image data. */ - skipCompositeImageData?: boolean; - /** Does not load thumbnail. */ - skipThumbnail?: boolean; - /** Does not load linked files (used in smart-objects). */ - skipLinkedFilesData?: boolean; - /** Throws exception if features are missing. */ - throwForMissingFeatures?: boolean; - /** Logs if features are missing. */ - logMissingFeatures?: boolean; - /** Keep image data as byte array instead of canvas. - * (image data will appear in `imageData` fields instead of `canvas` fields) - * This avoids issues with canvas premultiplied alpha corrupting image data. */ - useImageData?: boolean; - /** Loads thumbnail raw data instead of decoding it's content into canvas. - * `thumnailRaw` field is used instead. */ - useRawThumbnail?: boolean; - /** Usend only for development. */ - logDevFeatures?: boolean; -} -export interface WriteOptions { - /** Automatically generates thumbnail from composite image. */ - generateThumbnail?: boolean; - /** Trims transparent pixels from layer image data. */ - trimImageData?: boolean; - /** Invalidates text layer data, forcing Photoshop to redraw them on load. - * Use this option if you're updating loaded text layer properties. */ - invalidateTextLayers?: boolean; - /** Logs if features are missing. */ - logMissingFeatures?: boolean; - /** Forces bottom layer to be treated as layer and not background even when it's missing any transparency - * (by default Photoshop treats bottom layer as background it it doesn't have any transparent pixels). */ - noBackground?: boolean; - /** Saves document as PSB (Large Document Format) file. */ - psb?: boolean; - /** Uses zip compression when writing PSD file, will result in smaller file size but may be incompatible - * with some software. It may also be significantly slower. */ - compress?: boolean; -} +export declare type BlendMode = 'pass through' | 'normal' | 'dissolve' | 'darken' | 'multiply' | 'color burn' | 'linear burn' | 'darker color' | 'lighten' | 'screen' | 'color dodge' | 'linear dodge' | 'lighter color' | 'overlay' | 'soft light' | 'hard light' | 'vivid light' | 'linear light' | 'pin light' | 'hard mix' | 'difference' | 'exclusion' | 'subtract' | 'divide' | 'hue' | 'saturation' | 'color' | 'luminosity'; +export declare const enum ColorMode { + Bitmap = 0, + Grayscale = 1, + Indexed = 2, + RGB = 3, + CMYK = 4, + Multichannel = 7, + Duotone = 8, + Lab = 9 +} +export declare const enum SectionDividerType { + Other = 0, + OpenFolder = 1, + ClosedFolder = 2, + BoundingSectionDivider = 3 +} +export declare type RGBA = { + r: number; + g: number; + b: number; + a: number; +}; +export declare type RGB = { + r: number; + g: number; + b: number; +}; +export declare type HSB = { + h: number; + s: number; + b: number; +}; +export declare type CMYK = { + c: number; + m: number; + y: number; + k: number; +}; +export declare type LAB = { + l: number; + a: number; + b: number; +}; +export declare type Grayscale = { + k: number; +}; +export declare type Color = RGBA | RGB | HSB | CMYK | LAB | Grayscale; +export interface EffectContour { + name: string; + curve: { + x: number; + y: number; + }[]; +} +export interface EffectPattern { + name: string; + id: string; +} +export interface LayerEffectShadow { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + size?: UnitsValue; + angle?: number; + distance?: UnitsValue; + color?: Color; + blendMode?: BlendMode; + opacity?: number; + useGlobalLight?: boolean; + antialiased?: boolean; + contour?: EffectContour; + choke?: UnitsValue; + layerConceals?: boolean; +} +export interface LayerEffectsOuterGlow { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + size?: UnitsValue; + color?: Color; + blendMode?: BlendMode; + opacity?: number; + source?: GlowSource; + antialiased?: boolean; + noise?: number; + range?: number; + choke?: UnitsValue; + jitter?: number; + contour?: EffectContour; +} +export interface LayerEffectInnerGlow { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + size?: UnitsValue; + color?: Color; + blendMode?: BlendMode; + opacity?: number; + source?: GlowSource; + technique?: GlowTechnique; + antialiased?: boolean; + noise?: number; + range?: number; + choke?: UnitsValue; + jitter?: number; + contour?: EffectContour; +} +export interface LayerEffectBevel { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + size?: UnitsValue; + angle?: number; + strength?: number; + highlightBlendMode?: BlendMode; + shadowBlendMode?: BlendMode; + highlightColor?: Color; + shadowColor?: Color; + style?: BevelStyle; + highlightOpacity?: number; + shadowOpacity?: number; + soften?: UnitsValue; + useGlobalLight?: boolean; + altitude?: number; + technique?: BevelTechnique; + direction?: BevelDirection; + useTexture?: boolean; + useShape?: boolean; + antialiasGloss?: boolean; + contour?: EffectContour; +} +export interface LayerEffectSolidFill { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + blendMode?: BlendMode; + color?: Color; + opacity?: number; +} +export interface LayerEffectStroke { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + overprint?: boolean; + size?: UnitsValue; + position?: 'inside' | 'center' | 'outside'; + fillType?: 'color' | 'gradient' | 'pattern'; + blendMode?: BlendMode; + opacity?: number; + color?: Color; + gradient?: (EffectSolidGradient | EffectNoiseGradient) & ExtraGradientInfo; + pattern?: EffectPattern & {}; +} +export interface LayerEffectSatin { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + size?: UnitsValue; + blendMode?: BlendMode; + color?: Color; + antialiased?: boolean; + opacity?: number; + distance?: UnitsValue; + invert?: boolean; + angle?: number; + contour?: EffectContour; +} +export interface LayerEffectPatternOverlay { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + blendMode?: BlendMode; + opacity?: number; + scale?: number; + pattern?: EffectPattern; + phase?: { + x: number; + y: number; + }; + align?: boolean; +} +export interface EffectSolidGradient { + name: string; + type: 'solid'; + smoothness?: number; + colorStops: ColorStop[]; + opacityStops: OpacityStop[]; +} +export interface EffectNoiseGradient { + name: string; + type: 'noise'; + roughness?: number; + colorModel?: 'rgb' | 'hsb' | 'lab'; + randomSeed?: number; + restrictColors?: boolean; + addTransparency?: boolean; + min: number[]; + max: number[]; +} +export interface LayerEffectGradientOverlay { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + blendMode?: string; + opacity?: number; + align?: boolean; + scale?: number; + dither?: boolean; + reverse?: boolean; + type?: GradientStyle; + offset?: { + x: number; + y: number; + }; + gradient?: EffectSolidGradient | EffectNoiseGradient; + interpolationMethod?: InterpolationMethod; +} +export interface LayerEffectsInfo { + disabled?: boolean; + scale?: number; + dropShadow?: LayerEffectShadow[]; + innerShadow?: LayerEffectShadow[]; + outerGlow?: LayerEffectsOuterGlow; + innerGlow?: LayerEffectInnerGlow; + bevel?: LayerEffectBevel; + solidFill?: LayerEffectSolidFill[]; + satin?: LayerEffectSatin; + stroke?: LayerEffectStroke[]; + gradientOverlay?: LayerEffectGradientOverlay[]; + patternOverlay?: LayerEffectPatternOverlay; +} +export interface LayerMaskData { + top?: number; + left?: number; + bottom?: number; + right?: number; + defaultColor?: number; + disabled?: boolean; + positionRelativeToLayer?: boolean; + fromVectorData?: boolean; + userMaskDensity?: number; + userMaskFeather?: number; + vectorMaskDensity?: number; + vectorMaskFeather?: number; + canvas?: HTMLCanvasElement; + imageData?: ImageData; +} +export declare type TextGridding = 'none' | 'round'; +export declare type Orientation = 'horizontal' | 'vertical'; +export declare type AntiAlias = 'none' | 'sharp' | 'crisp' | 'strong' | 'smooth' | 'platform' | 'platformLCD'; +export declare type WarpStyle = 'none' | 'arc' | 'arcLower' | 'arcUpper' | 'arch' | 'bulge' | 'shellLower' | 'shellUpper' | 'flag' | 'wave' | 'fish' | 'rise' | 'fisheye' | 'inflate' | 'squeeze' | 'twist' | 'custom'; +export declare type BevelStyle = 'outer bevel' | 'inner bevel' | 'emboss' | 'pillow emboss' | 'stroke emboss'; +export declare type BevelTechnique = 'smooth' | 'chisel hard' | 'chisel soft'; +export declare type BevelDirection = 'up' | 'down'; +export declare type GlowTechnique = 'softer' | 'precise'; +export declare type GlowSource = 'edge' | 'center'; +export declare type GradientStyle = 'linear' | 'radial' | 'angle' | 'reflected' | 'diamond'; +export declare type Justification = 'left' | 'right' | 'center'; +export declare type LineCapType = 'butt' | 'round' | 'square'; +export declare type LineJoinType = 'miter' | 'round' | 'bevel'; +export declare type LineAlignment = 'inside' | 'center' | 'outside'; +export declare type InterpolationMethod = 'classic' | 'perceptual' | 'linear'; +export interface Warp { + style?: WarpStyle; + value?: number; + perspective?: number; + perspectiveOther?: number; + rotate?: Orientation; + bounds?: { + top: UnitsValue; + left: UnitsValue; + bottom: UnitsValue; + right: UnitsValue; + }; + uOrder?: number; + vOrder?: number; + deformNumRows?: number; + deformNumCols?: number; + customEnvelopeWarp?: { + quiltSliceX?: number[]; + quiltSliceY?: number[]; + meshPoints: { + x: number; + y: number; + }[]; + }; +} +export interface Animations { + frames: { + id: number; + delay: number; + dispose?: 'auto' | 'none' | 'dispose'; + }[]; + animations: { + id: number; + frames: number[]; + repeats?: number; + activeFrame?: number; + }[]; +} +export interface Font { + name: string; + script?: number; + type?: number; + synthetic?: number; +} +export interface ParagraphStyle { + justification?: Justification; + firstLineIndent?: number; + startIndent?: number; + endIndent?: number; + spaceBefore?: number; + spaceAfter?: number; + autoHyphenate?: boolean; + hyphenatedWordSize?: number; + preHyphen?: number; + postHyphen?: number; + consecutiveHyphens?: number; + zone?: number; + wordSpacing?: number[]; + letterSpacing?: number[]; + glyphSpacing?: number[]; + autoLeading?: number; + leadingType?: number; + hanging?: boolean; + burasagari?: boolean; + kinsokuOrder?: number; + everyLineComposer?: boolean; +} +export interface ParagraphStyleRun { + length: number; + style: ParagraphStyle; +} +export interface TextStyle { + font?: Font; + fontSize?: number; + fauxBold?: boolean; + fauxItalic?: boolean; + autoLeading?: boolean; + leading?: number; + horizontalScale?: number; + verticalScale?: number; + tracking?: number; + autoKerning?: boolean; + kerning?: number; + baselineShift?: number; + fontCaps?: number; + fontBaseline?: number; + underline?: boolean; + strikethrough?: boolean; + ligatures?: boolean; + dLigatures?: boolean; + baselineDirection?: number; + tsume?: number; + styleRunAlignment?: number; + language?: number; + noBreak?: boolean; + fillColor?: Color; + strokeColor?: Color; + fillFlag?: boolean; + strokeFlag?: boolean; + fillFirst?: boolean; + yUnderline?: number; + outlineWidth?: number; + characterDirection?: number; + hindiNumbers?: boolean; + kashida?: number; + diacriticPos?: number; +} +export interface TextStyleRun { + length: number; + style: TextStyle; +} +export interface TextGridInfo { + isOn?: boolean; + show?: boolean; + size?: number; + leading?: number; + color?: Color; + leadingFillColor?: Color; + alignLineHeightToGridFlags?: boolean; +} +export interface LayerTextData { + text: string; + transform?: number[]; + antiAlias?: AntiAlias; + gridding?: TextGridding; + orientation?: Orientation; + index?: number; + warp?: Warp; + top?: number; + left?: number; + bottom?: number; + right?: number; + gridInfo?: TextGridInfo; + useFractionalGlyphWidths?: boolean; + style?: TextStyle; + styleRuns?: TextStyleRun[]; + paragraphStyle?: ParagraphStyle; + paragraphStyleRuns?: ParagraphStyleRun[]; + superscriptSize?: number; + superscriptPosition?: number; + subscriptSize?: number; + subscriptPosition?: number; + smallCapSize?: number; + shapeType?: 'point' | 'box'; + pointBase?: number[]; + boxBounds?: number[]; +} +export interface PatternInfo { + name: string; + id: string; + x: number; + y: number; + bounds: { + x: number; + y: number; + w: number; + h: number; + }; + data: Uint8Array; +} +export interface BezierKnot { + linked: boolean; + points: number[]; +} +export declare type BooleanOperation = 'exclude' | 'combine' | 'subtract' | 'intersect'; +export interface BezierPath { + open: boolean; + operation: BooleanOperation; + knots: BezierKnot[]; +} +export interface ExtraGradientInfo { + style?: GradientStyle; + scale?: number; + angle?: number; + dither?: boolean; + reverse?: boolean; + align?: boolean; + offset?: { + x: number; + y: number; + }; +} +export interface ExtraPatternInfo { + linked?: boolean; + phase?: { + x: number; + y: number; + }; +} +export declare type VectorContent = { + type: 'color'; + color: Color; +} | (EffectSolidGradient & ExtraGradientInfo) | (EffectNoiseGradient & ExtraGradientInfo) | (EffectPattern & { + type: 'pattern'; +} & ExtraPatternInfo); +export declare type RenderingIntent = 'perceptual' | 'saturation' | 'relative colorimetric' | 'absolute colorimetric'; +export declare type Units = 'Pixels' | 'Points' | 'Picas' | 'Millimeters' | 'Centimeters' | 'Inches' | 'None' | 'Density'; +export interface UnitsValue { + units: Units; + value: number; +} +export interface BrightnessAdjustment { + type: 'brightness/contrast'; + brightness?: number; + contrast?: number; + meanValue?: number; + useLegacy?: boolean; + labColorOnly?: boolean; + auto?: boolean; +} +export interface LevelsAdjustmentChannel { + shadowInput: number; + highlightInput: number; + shadowOutput: number; + highlightOutput: number; + midtoneInput: number; +} +export interface PresetInfo { + presetKind?: number; + presetFileName?: string; +} +export interface LevelsAdjustment extends PresetInfo { + type: 'levels'; + rgb?: LevelsAdjustmentChannel; + red?: LevelsAdjustmentChannel; + green?: LevelsAdjustmentChannel; + blue?: LevelsAdjustmentChannel; +} +export declare type CurvesAdjustmentChannel = { + input: number; + output: number; +}[]; +export interface CurvesAdjustment extends PresetInfo { + type: 'curves'; + rgb?: CurvesAdjustmentChannel; + red?: CurvesAdjustmentChannel; + green?: CurvesAdjustmentChannel; + blue?: CurvesAdjustmentChannel; +} +export interface ExposureAdjustment extends PresetInfo { + type: 'exposure'; + exposure?: number; + offset?: number; + gamma?: number; +} +export interface VibranceAdjustment { + type: 'vibrance'; + vibrance?: number; + saturation?: number; +} +export interface HueSaturationAdjustmentChannel { + a: number; + b: number; + c: number; + d: number; + hue: number; + saturation: number; + lightness: number; +} +export interface HueSaturationAdjustment extends PresetInfo { + type: 'hue/saturation'; + master?: HueSaturationAdjustmentChannel; + reds?: HueSaturationAdjustmentChannel; + yellows?: HueSaturationAdjustmentChannel; + greens?: HueSaturationAdjustmentChannel; + cyans?: HueSaturationAdjustmentChannel; + blues?: HueSaturationAdjustmentChannel; + magentas?: HueSaturationAdjustmentChannel; +} +export interface ColorBalanceValues { + cyanRed: number; + magentaGreen: number; + yellowBlue: number; +} +export interface ColorBalanceAdjustment { + type: 'color balance'; + shadows?: ColorBalanceValues; + midtones?: ColorBalanceValues; + highlights?: ColorBalanceValues; + preserveLuminosity?: boolean; +} +export interface BlackAndWhiteAdjustment extends PresetInfo { + type: 'black & white'; + reds?: number; + yellows?: number; + greens?: number; + cyans?: number; + blues?: number; + magentas?: number; + useTint?: boolean; + tintColor?: Color; +} +export interface PhotoFilterAdjustment { + type: 'photo filter'; + color?: Color; + density?: number; + preserveLuminosity?: boolean; +} +export interface ChannelMixerChannel { + red: number; + green: number; + blue: number; + constant: number; +} +export interface ChannelMixerAdjustment extends PresetInfo { + type: 'channel mixer'; + monochrome?: boolean; + red?: ChannelMixerChannel; + green?: ChannelMixerChannel; + blue?: ChannelMixerChannel; + gray?: ChannelMixerChannel; +} +export interface ColorLookupAdjustment { + type: 'color lookup'; + lookupType?: '3dlut' | 'abstractProfile' | 'deviceLinkProfile'; + name?: string; + dither?: boolean; + profile?: Uint8Array; + lutFormat?: 'look' | 'cube' | '3dl'; + dataOrder?: 'rgb' | 'bgr'; + tableOrder?: 'rgb' | 'bgr'; + lut3DFileData?: Uint8Array; + lut3DFileName?: string; +} +export interface InvertAdjustment { + type: 'invert'; +} +export interface PosterizeAdjustment { + type: 'posterize'; + levels?: number; +} +export interface ThresholdAdjustment { + type: 'threshold'; + level?: number; +} +export interface ColorStop { + color: Color; + location: number; + midpoint: number; +} +export interface OpacityStop { + opacity: number; + location: number; + midpoint: number; +} +export interface GradientMapAdjustment { + type: 'gradient map'; + name?: string; + gradientType: 'solid' | 'noise'; + dither?: boolean; + reverse?: boolean; + smoothness?: number; + colorStops?: ColorStop[]; + opacityStops?: OpacityStop[]; + roughness?: number; + colorModel?: 'rgb' | 'hsb' | 'lab'; + randomSeed?: number; + restrictColors?: boolean; + addTransparency?: boolean; + min?: number[]; + max?: number[]; +} +export interface SelectiveColorAdjustment { + type: 'selective color'; + mode?: 'relative' | 'absolute'; + reds?: CMYK; + yellows?: CMYK; + greens?: CMYK; + cyans?: CMYK; + blues?: CMYK; + magentas?: CMYK; + whites?: CMYK; + neutrals?: CMYK; + blacks?: CMYK; +} +export interface LinkedFile { + id: string; + name: string; + type?: string; + creator?: string; + data?: Uint8Array; + time?: Date; + descriptor?: { + compInfo: { + compID: number; + originalCompID: number; + }; + }; + childDocumentID?: string; + assetModTime?: number; + assetLockedState?: number; +} +export declare type PlacedLayerType = 'unknown' | 'vector' | 'raster' | 'image stack'; +export interface PlacedLayer { + id: string; + placed?: string; + type: PlacedLayerType; + pageNumber?: number; + totalPages?: number; + frameStep?: { + numerator: number; + denominator: number; + }; + duration?: { + numerator: number; + denominator: number; + }; + frameCount?: number; + transform: number[]; + nonAffineTransform?: number[]; + width?: number; + height?: number; + resolution?: UnitsValue; + warp?: Warp; + crop?: number; + comp?: number; + compInfo?: { + compID: number; + originalCompID: number; + }; +} +export declare type AdjustmentLayer = BrightnessAdjustment | LevelsAdjustment | CurvesAdjustment | ExposureAdjustment | VibranceAdjustment | HueSaturationAdjustment | ColorBalanceAdjustment | BlackAndWhiteAdjustment | PhotoFilterAdjustment | ChannelMixerAdjustment | ColorLookupAdjustment | InvertAdjustment | PosterizeAdjustment | ThresholdAdjustment | GradientMapAdjustment | SelectiveColorAdjustment; +export declare type LayerColor = 'none' | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'violet' | 'gray'; +export interface KeyDescriptorItem { + keyShapeInvalidated?: boolean; + keyOriginType?: number; + keyOriginResolution?: number; + keyOriginRRectRadii?: { + topRight: UnitsValue; + topLeft: UnitsValue; + bottomLeft: UnitsValue; + bottomRight: UnitsValue; + }; + keyOriginShapeBoundingBox?: { + top: UnitsValue; + left: UnitsValue; + bottom: UnitsValue; + right: UnitsValue; + }; + keyOriginBoxCorners?: { + x: number; + y: number; + }[]; + transform?: number[]; +} +export interface LayerVectorMask { + invert?: boolean; + notLink?: boolean; + disable?: boolean; + fillStartsWithAllPixels?: boolean; + clipboard?: { + top: number; + left: number; + bottom: number; + right: number; + resolution: number; + }; + paths: BezierPath[]; +} +export interface AnimationFrame { + frames: number[]; + enable?: boolean; + offset?: { + x: number; + y: number; + }; + referencePoint?: { + x: number; + y: number; + }; + opacity?: number; + effects?: LayerEffectsInfo; +} +export interface Fraction { + numerator: number; + denominator: number; +} +export declare type TimelineKeyInterpolation = 'linear' | 'hold'; +export declare type TimelineKey = { + interpolation: TimelineKeyInterpolation; + time: Fraction; + selected?: boolean; +} & ({ + type: 'opacity'; + value: number; +} | { + type: 'position'; + x: number; + y: number; +} | { + type: 'transform'; + scale: { + x: number; + y: number; + }; + skew: { + x: number; + y: number; + }; + rotation: number; + translation: { + x: number; + y: number; + }; +} | { + type: 'style'; + style?: LayerEffectsInfo; +} | { + type: 'globalLighting'; + globalAngle: number; + globalAltitude: number; +}); +export declare type TimelineTrackType = 'opacity' | 'style' | 'sheetTransform' | 'sheetPosition' | 'globalLighting'; +export interface TimelineTrack { + type: TimelineTrackType; + enabled?: boolean; + effectParams?: { + keys: TimelineKey[]; + fillCanvas: boolean; + zoomOrigin: number; + }; + keys: TimelineKey[]; +} +export interface Timeline { + start: Fraction; + duration: Fraction; + inTime: Fraction; + outTime: Fraction; + autoScope: boolean; + audioLevel: number; + tracks?: TimelineTrack[]; +} +export interface LayerAdditionalInfo { + name?: string; + nameSource?: string; + id?: number; + version?: number; + mask?: LayerMaskData; + blendClippendElements?: boolean; + blendInteriorElements?: boolean; + knockout?: boolean; + layerMaskAsGlobalMask?: boolean; + protected?: { + transparency?: boolean; + composite?: boolean; + position?: boolean; + artboards?: boolean; + }; + layerColor?: LayerColor; + referencePoint?: { + x: number; + y: number; + }; + sectionDivider?: { + type: SectionDividerType; + key?: string; + subType?: number; + }; + filterMask?: { + colorSpace: Color; + opacity: number; + }; + effects?: LayerEffectsInfo; + text?: LayerTextData; + patterns?: PatternInfo[]; + vectorFill?: VectorContent; + vectorStroke?: { + strokeEnabled?: boolean; + fillEnabled?: boolean; + lineWidth?: UnitsValue; + lineDashOffset?: UnitsValue; + miterLimit?: number; + lineCapType?: LineCapType; + lineJoinType?: LineJoinType; + lineAlignment?: LineAlignment; + scaleLock?: boolean; + strokeAdjust?: boolean; + lineDashSet?: UnitsValue[]; + blendMode?: BlendMode; + opacity?: number; + content?: VectorContent; + resolution?: number; + }; + vectorMask?: LayerVectorMask; + usingAlignedRendering?: boolean; + timestamp?: number; + pathList?: {}[]; + adjustment?: AdjustmentLayer; + placedLayer?: PlacedLayer; + vectorOrigination?: { + keyDescriptorList: KeyDescriptorItem[]; + }; + compositorUsed?: { + description: string; + reason: string; + engine: string; + enableCompCore: string; + enableCompCoreGPU: string; + compCoreSupport: string; + compCoreGPUSupport: string; + }; + artboard?: { + rect: { + top: number; + left: number; + bottom: number; + right: number; + }; + guideIndices?: any[]; + presetName?: string; + color?: Color; + backgroundType?: number; + }; + fillOpacity?: number; + transparencyShapesLayer?: boolean; + channelBlendingRestrictions?: number[]; + animationFrames?: AnimationFrame[]; + animationFrameFlags?: { + propagateFrameOne?: boolean; + unifyLayerPosition?: boolean; + unifyLayerStyle?: boolean; + unifyLayerVisibility?: boolean; + }; + timeline?: Timeline; + engineData?: string; +} +export interface ImageResources { + layerState?: number; + layersGroup?: number[]; + layerSelectionIds?: number[]; + layerGroupsEnabledId?: number[]; + versionInfo?: { + hasRealMergedData: boolean; + writerName: string; + readerName: string; + fileVersion: number; + }; + alphaIdentifiers?: number[]; + alphaChannelNames?: string[]; + globalAngle?: number; + globalAltitude?: number; + pixelAspectRatio?: { + aspect: number; + }; + urlsList?: any[]; + gridAndGuidesInformation?: { + grid?: { + horizontal: number; + vertical: number; + }; + guides?: { + location: number; + direction: 'horizontal' | 'vertical'; + }[]; + }; + resolutionInfo?: { + horizontalResolution: number; + horizontalResolutionUnit: 'PPI' | 'PPCM'; + widthUnit: 'Inches' | 'Centimeters' | 'Points' | 'Picas' | 'Columns'; + verticalResolution: number; + verticalResolutionUnit: 'PPI' | 'PPCM'; + heightUnit: 'Inches' | 'Centimeters' | 'Points' | 'Picas' | 'Columns'; + }; + thumbnail?: HTMLCanvasElement; + thumbnailRaw?: { + width: number; + height: number; + data: Uint8Array; + }; + captionDigest?: string; + xmpMetadata?: string; + printScale?: { + style?: 'centered' | 'size to fit' | 'user defined'; + x?: number; + y?: number; + scale?: number; + }; + printInformation?: { + printerManagesColors?: boolean; + printerName?: string; + printerProfile?: string; + printSixteenBit?: boolean; + renderingIntent?: RenderingIntent; + hardProof?: boolean; + blackPointCompensation?: boolean; + proofSetup?: { + builtin: string; + } | { + profile: string; + renderingIntent?: RenderingIntent; + blackPointCompensation?: boolean; + paperWhite?: boolean; + }; + }; + backgroundColor?: Color; + idsSeedNumber?: number; + printFlags?: { + labels?: boolean; + cropMarks?: boolean; + colorBars?: boolean; + registrationMarks?: boolean; + negative?: boolean; + flip?: boolean; + interpolate?: boolean; + caption?: boolean; + printFlags?: boolean; + }; + iccUntaggedProfile?: boolean; + pathSelectionState?: string[]; + imageReadyVariables?: string; + imageReadyDataSets?: string; + animations?: Animations; + onionSkins?: { + enabled: boolean; + framesBefore: number; + framesAfter: number; + frameSpacing: number; + minOpacity: number; + maxOpacity: number; + blendMode: BlendMode; + }; + timelineInformation?: { + enabled: boolean; + frameStep: Fraction; + frameRate: number; + time: Fraction; + duration: Fraction; + workInTime: Fraction; + workOutTime: Fraction; + repeats: number; + hasMotion: boolean; + globalTracks: TimelineTrack[]; + audioClipGroups?: { + id: string; + muted: boolean; + audioClips: { + id: string; + start: Fraction; + duration: Fraction; + inTime: Fraction; + outTime: Fraction; + muted: boolean; + audioLevel: number; + frameReader: { + type: number; + mediaDescriptor: string; + link: { + name: string; + fullPath: string; + relativePath: string; + }; + }; + }[]; + }[]; + }; + sheetDisclosure?: { + sheetTimelineOptions?: { + sheetID: number; + sheetDisclosed: boolean; + lightsDisclosed: boolean; + meshesDisclosed: boolean; + materialsDisclosed: boolean; + }[]; + }; +} +export interface GlobalLayerMaskInfo { + overlayColorSpace: number; + colorSpace1: number; + colorSpace2: number; + colorSpace3: number; + colorSpace4: number; + opacity: number; + kind: number; +} +export interface Annotation { + type: 'text' | 'sound'; + open: boolean; + iconLocation: { + left: number; + top: number; + right: number; + bottom: number; + }; + popupLocation: { + left: number; + top: number; + right: number; + bottom: number; + }; + color: Color; + author: string; + name: string; + date: string; + data: string | Uint8Array; +} +export interface Layer extends LayerAdditionalInfo { + top?: number; + left?: number; + bottom?: number; + right?: number; + blendMode?: BlendMode; + opacity?: number; + transparencyProtected?: boolean; + hidden?: boolean; + clipping?: boolean; + canvas?: HTMLCanvasElement; + imageData?: ImageData; + children?: Layer[]; + /** Applies only for layer groups. */ + opened?: boolean; +} +export interface Psd extends LayerAdditionalInfo { + width: number; + height: number; + channels?: number; + bitsPerChannel?: number; + colorMode?: ColorMode; + children?: Layer[]; + canvas?: HTMLCanvasElement; + imageData?: ImageData; + imageResources?: ImageResources; + linkedFiles?: LinkedFile[]; + artboards?: { + count: number; + autoExpandOffset?: { + horizontal: number; + vertical: number; + }; + origin?: { + horizontal: number; + vertical: number; + }; + autoExpandEnabled?: boolean; + autoNestEnabled?: boolean; + autoPositionEnabled?: boolean; + shrinkwrapOnSaveEnabled?: boolean; + docDefaultNewArtboardBackgroundColor?: Color; + docDefaultNewArtboardBackgroundType?: number; + }; + globalLayerMaskInfo?: GlobalLayerMaskInfo; + annotations?: Annotation[]; +} +export interface ReadOptions { + /** Does not load layer image data. */ + skipLayerImageData?: boolean; + /** Does not load composite image data. */ + skipCompositeImageData?: boolean; + /** Does not load thumbnail. */ + skipThumbnail?: boolean; + /** Does not load linked files (used in smart-objects). */ + skipLinkedFilesData?: boolean; + /** Throws exception if features are missing. */ + throwForMissingFeatures?: boolean; + /** Logs if features are missing. */ + logMissingFeatures?: boolean; + /** Keep image data as byte array instead of canvas. + * (image data will appear in `imageData` fields instead of `canvas` fields) + * This avoids issues with canvas premultiplied alpha corrupting image data. */ + useImageData?: boolean; + /** Loads thumbnail raw data instead of decoding it's content into canvas. + * `thumnailRaw` field is used instead. */ + useRawThumbnail?: boolean; + /** Usend only for development. */ + logDevFeatures?: boolean; +} +export interface WriteOptions { + /** Automatically generates thumbnail from composite image. */ + generateThumbnail?: boolean; + /** Trims transparent pixels from layer image data. */ + trimImageData?: boolean; + /** Invalidates text layer data, forcing Photoshop to redraw them on load. + * Use this option if you're updating loaded text layer properties. */ + invalidateTextLayers?: boolean; + /** Logs if features are missing. */ + logMissingFeatures?: boolean; + /** Forces bottom layer to be treated as layer and not background even when it's missing any transparency + * (by default Photoshop treats bottom layer as background it it doesn't have any transparent pixels). */ + noBackground?: boolean; + /** Saves document as PSB (Large Document Format) file. */ + psb?: boolean; + /** Uses zip compression when writing PSD file, will result in smaller file size but may be incompatible + * with some software. It may also be significantly slower. */ + compress?: boolean; +} diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psd.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psd.js index 18c8f0b..d15a162 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psd.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psd.js @@ -1,19 +1,20 @@ -export var ColorMode; -(function (ColorMode) { - ColorMode[ColorMode["Bitmap"] = 0] = "Bitmap"; - ColorMode[ColorMode["Grayscale"] = 1] = "Grayscale"; - ColorMode[ColorMode["Indexed"] = 2] = "Indexed"; - ColorMode[ColorMode["RGB"] = 3] = "RGB"; - ColorMode[ColorMode["CMYK"] = 4] = "CMYK"; - ColorMode[ColorMode["Multichannel"] = 7] = "Multichannel"; - ColorMode[ColorMode["Duotone"] = 8] = "Duotone"; - ColorMode[ColorMode["Lab"] = 9] = "Lab"; -})(ColorMode || (ColorMode = {})); -export var SectionDividerType; -(function (SectionDividerType) { - SectionDividerType[SectionDividerType["Other"] = 0] = "Other"; - SectionDividerType[SectionDividerType["OpenFolder"] = 1] = "OpenFolder"; - SectionDividerType[SectionDividerType["ClosedFolder"] = 2] = "ClosedFolder"; - SectionDividerType[SectionDividerType["BoundingSectionDivider"] = 3] = "BoundingSectionDivider"; -})(SectionDividerType || (SectionDividerType = {})); -//# sourceMappingURL=psd.js.map \ No newline at end of file +export var ColorMode; +(function (ColorMode) { + ColorMode[ColorMode["Bitmap"] = 0] = "Bitmap"; + ColorMode[ColorMode["Grayscale"] = 1] = "Grayscale"; + ColorMode[ColorMode["Indexed"] = 2] = "Indexed"; + ColorMode[ColorMode["RGB"] = 3] = "RGB"; + ColorMode[ColorMode["CMYK"] = 4] = "CMYK"; + ColorMode[ColorMode["Multichannel"] = 7] = "Multichannel"; + ColorMode[ColorMode["Duotone"] = 8] = "Duotone"; + ColorMode[ColorMode["Lab"] = 9] = "Lab"; +})(ColorMode || (ColorMode = {})); +export var SectionDividerType; +(function (SectionDividerType) { + SectionDividerType[SectionDividerType["Other"] = 0] = "Other"; + SectionDividerType[SectionDividerType["OpenFolder"] = 1] = "OpenFolder"; + SectionDividerType[SectionDividerType["ClosedFolder"] = 2] = "ClosedFolder"; + SectionDividerType[SectionDividerType["BoundingSectionDivider"] = 3] = "BoundingSectionDivider"; +})(SectionDividerType || (SectionDividerType = {})); + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBzZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFNQSxNQUFNLEN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SB0aGlzIG9wdGlvbiBpZiB5b3UncmUgdXBkYXRpbmcgbG9hZGVkIHRleHQgbGF5ZXIgcHJvcGVydGllcy4gKi9cblx0aW52YWxpZGF0ZVRleHRMYXllcnM/OiBib29sZWFuO1xuXHQvKiogTG9ncyBpZiBmZWF0dXJlcyBhcmUgbWlzc2luZy4gKi9cblx0bG9nTWlzc2luZ0ZlYXR1cmVzPzogYm9vbGVhbjtcblx0LyoqIEZvcmNlcyBib3R0b20gbGF5ZXIgdG8gYmUgdHJlYXRlZCBhcyBsYXllciBhbmQgbm90IGJhY2tncm91bmQgZXZlbiB3aGVuIGl0J3MgbWlzc2luZyBhbnkgdHJhbnNwYXJlbmN5XG5cdCAqIFx0KGJ5IGRlZmF1bHQgUGhvdG9zaG9wIHRyZWF0cyBib3R0b20gbGF5ZXIgYXMgYmFja2dyb3VuZCBpdCBpdCBkb2Vzbid0IGhhdmUgYW55IHRyYW5zcGFyZW50IHBpeGVscykuICovXG5cdG5vQmFja2dyb3VuZD86IGJvb2xlYW47XG5cdC8qKiBTYXZlcyBkb2N1bWVudCBhcyBQU0IgKExhcmdlIERvY3VtZW50IEZvcm1hdCkgZmlsZS4gKi9cblx0cHNiPzogYm9vbGVhbjtcblx0LyoqIFVzZXMgemlwIGNvbXByZXNzaW9uIHdoZW4gd3JpdGluZyBQU0QgZmlsZSwgd2lsbCByZXN1bHQgaW4gc21hbGxlciBmaWxlIHNpemUgYnV0IG1heSBiZSBpbmNvbXBhdGlibGVcblx0ICogIHdpdGggc29tZSBzb2Z0d2FyZS4gSXQgbWF5IGFsc28gYmUgc2lnbmlmaWNhbnRseSBzbG93ZXIuICovXG5cdGNvbXByZXNzPzogYm9vbGVhbjtcbn1cbiJdLCJzb3VyY2VSb290IjoiQzpcXFByb2plY3RzXFxnaXRodWJcXGFnLXBzZFxcc3JjIn0= diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psd.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psd.js.map deleted file mode 100644 index cc82f57..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"psd.js","sourceRoot":"../src/","sources":["psd.ts"],"names":[],"mappings":"AAMA,MAAM,CAAN,IAAkB,SASjB;AATD,WAAkB,SAAS;IAC1B,6CAAU,CAAA;IACV,mDAAa,CAAA;IACb,+CAAW,CAAA;IACX,uCAAO,CAAA;IACP,yCAAQ,CAAA;IACR,yDAAgB,CAAA;IAChB,+CAAW,CAAA;IACX,uCAAO,CAAA;AACR,CAAC,EATiB,SAAS,KAAT,SAAS,QAS1B;AAED,MAAM,CAAN,IAAkB,kBAKjB;AALD,WAAkB,kBAAkB;IACnC,6DAAS,CAAA;IACT,uEAAc,CAAA;IACd,2EAAgB,CAAA;IAChB,+FAA0B,CAAA;AAC3B,CAAC,EALiB,kBAAkB,KAAlB,kBAAkB,QAKnC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdReader.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdReader.d.ts index 19044d8..c3e08b2 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdReader.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdReader.d.ts @@ -1,36 +1,36 @@ -import { Psd, ColorMode, ReadOptions, Color, PatternInfo } from './psd'; -import { PixelData } from './helpers'; -export declare const supportedColorModes: ColorMode[]; -export interface PsdReader { - offset: number; - view: DataView; - strict: boolean; - debug: boolean; -} -export declare function createReader(buffer: ArrayBuffer, offset?: number, length?: number): PsdReader; -export declare function warnOrThrow(reader: PsdReader, message: string): void; -export declare function readUint8(reader: PsdReader): number; -export declare function peekUint8(reader: PsdReader): number; -export declare function readInt16(reader: PsdReader): number; -export declare function readUint16(reader: PsdReader): number; -export declare function readInt32(reader: PsdReader): number; -export declare function readInt32LE(reader: PsdReader): number; -export declare function readUint32(reader: PsdReader): number; -export declare function readFloat32(reader: PsdReader): number; -export declare function readFloat64(reader: PsdReader): number; -export declare function readFixedPoint32(reader: PsdReader): number; -export declare function readFixedPointPath32(reader: PsdReader): number; -export declare function readBytes(reader: PsdReader, length: number): Uint8Array; -export declare function readSignature(reader: PsdReader): string; -export declare function readPascalString(reader: PsdReader, padTo: number): string; -export declare function readUnicodeString(reader: PsdReader): string; -export declare function readUnicodeStringWithLength(reader: PsdReader, length: number): string; -export declare function readAsciiString(reader: PsdReader, length: number): string; -export declare function skipBytes(reader: PsdReader, count: number): void; -export declare function checkSignature(reader: PsdReader, a: string, b?: string): void; -export declare function readPsd(reader: PsdReader, options?: ReadOptions): Psd; -export declare function readDataZipWithoutPrediction(reader: PsdReader, length: number, pixelData: PixelData | undefined, width: number, height: number, step: number, offset: number): void; -export declare function readDataRLE(reader: PsdReader, pixelData: PixelData | undefined, _width: number, height: number, step: number, offsets: number[], large: boolean): void; -export declare function readSection(reader: PsdReader, round: number, func: (left: () => number) => T, skipEmpty?: boolean, eightBytes?: boolean): T | undefined; -export declare function readColor(reader: PsdReader): Color; -export declare function readPattern(reader: PsdReader): PatternInfo; +import { Psd, ColorMode, ReadOptions, Color, PatternInfo } from './psd'; +import { PixelData } from './helpers'; +export declare const supportedColorModes: ColorMode[]; +export interface PsdReader { + offset: number; + view: DataView; + strict: boolean; + debug: boolean; +} +export declare function createReader(buffer: ArrayBuffer, offset?: number, length?: number): PsdReader; +export declare function warnOrThrow(reader: PsdReader, message: string): void; +export declare function readUint8(reader: PsdReader): number; +export declare function peekUint8(reader: PsdReader): number; +export declare function readInt16(reader: PsdReader): number; +export declare function readUint16(reader: PsdReader): number; +export declare function readInt32(reader: PsdReader): number; +export declare function readInt32LE(reader: PsdReader): number; +export declare function readUint32(reader: PsdReader): number; +export declare function readFloat32(reader: PsdReader): number; +export declare function readFloat64(reader: PsdReader): number; +export declare function readFixedPoint32(reader: PsdReader): number; +export declare function readFixedPointPath32(reader: PsdReader): number; +export declare function readBytes(reader: PsdReader, length: number): Uint8Array; +export declare function readSignature(reader: PsdReader): string; +export declare function readPascalString(reader: PsdReader, padTo: number): string; +export declare function readUnicodeString(reader: PsdReader): string; +export declare function readUnicodeStringWithLength(reader: PsdReader, length: number): string; +export declare function readAsciiString(reader: PsdReader, length: number): string; +export declare function skipBytes(reader: PsdReader, count: number): void; +export declare function checkSignature(reader: PsdReader, a: string, b?: string): void; +export declare function readPsd(reader: PsdReader, options?: ReadOptions): Psd; +export declare function readDataZipWithoutPrediction(reader: PsdReader, length: number, pixelData: PixelData | undefined, width: number, height: number, step: number, offset: number): void; +export declare function readDataRLE(reader: PsdReader, pixelData: PixelData | undefined, _width: number, height: number, step: number, offsets: number[], large: boolean): void; +export declare function readSection(reader: PsdReader, round: number, func: (left: () => number) => T, skipEmpty?: boolean, eightBytes?: boolean): T | undefined; +export declare function readColor(reader: PsdReader): Color; +export declare function readPattern(reader: PsdReader): PatternInfo; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdReader.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdReader.js index c47db99..b764373 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdReader.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdReader.js @@ -1,956 +1,929 @@ -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -import { inflate } from 'pako'; -import { resetImageData, offsetForChannel, decodeBitmap, createCanvas, createImageData, toBlendMode, RAW_IMAGE_DATA, largeAdditionalInfoKeys } from './helpers'; -import { infoHandlersMap } from './additionalInfo'; -import { resourceHandlersMap } from './imageResources'; -export var supportedColorModes = [0 /* ColorMode.Bitmap */, 1 /* ColorMode.Grayscale */, 3 /* ColorMode.RGB */]; -var colorModes = ['bitmap', 'grayscale', 'indexed', 'RGB', 'CMYK', 'multichannel', 'duotone', 'lab']; -function setupGrayscale(data) { - var size = data.width * data.height * 4; - for (var i = 0; i < size; i += 4) { - data.data[i + 1] = data.data[i]; - data.data[i + 2] = data.data[i]; - } -} -export function createReader(buffer, offset, length) { - var view = new DataView(buffer, offset, length); - return { view: view, offset: 0, strict: false, debug: false }; -} -export function warnOrThrow(reader, message) { - if (reader.strict) - throw new Error(message); - if (reader.debug) - console.warn(message); -} -export function readUint8(reader) { - reader.offset += 1; - return reader.view.getUint8(reader.offset - 1); -} -export function peekUint8(reader) { - return reader.view.getUint8(reader.offset); -} -export function readInt16(reader) { - reader.offset += 2; - return reader.view.getInt16(reader.offset - 2, false); -} -export function readUint16(reader) { - reader.offset += 2; - return reader.view.getUint16(reader.offset - 2, false); -} -export function readInt32(reader) { - reader.offset += 4; - return reader.view.getInt32(reader.offset - 4, false); -} -export function readInt32LE(reader) { - reader.offset += 4; - return reader.view.getInt32(reader.offset - 4, true); -} -export function readUint32(reader) { - reader.offset += 4; - return reader.view.getUint32(reader.offset - 4, false); -} -export function readFloat32(reader) { - reader.offset += 4; - return reader.view.getFloat32(reader.offset - 4, false); -} -export function readFloat64(reader) { - reader.offset += 8; - return reader.view.getFloat64(reader.offset - 8, false); -} -// 32-bit fixed-point number 16.16 -export function readFixedPoint32(reader) { - return readInt32(reader) / (1 << 16); -} -// 32-bit fixed-point number 8.24 -export function readFixedPointPath32(reader) { - return readInt32(reader) / (1 << 24); -} -export function readBytes(reader, length) { - var start = reader.view.byteOffset + reader.offset; - reader.offset += length; - if ((start + length) > reader.view.buffer.byteLength) { - // fix for broken PSD files that are missing part of file at the end - warnOrThrow(reader, 'Reading bytes exceeding buffer length'); - if (length > (100 * 1024 * 1024)) - throw new Error('Reading past end of file'); // limit to 100MB - var result = new Uint8Array(length); - var len = Math.min(length, reader.view.byteLength - start); - if (len > 0) - result.set(new Uint8Array(reader.view.buffer, start, len)); - return result; - } - else { - return new Uint8Array(reader.view.buffer, start, length); - } -} -export function readSignature(reader) { - return readShortString(reader, 4); -} -export function readPascalString(reader, padTo) { - var length = readUint8(reader); - var text = length ? readShortString(reader, length) : ''; - while (++length % padTo) { - reader.offset++; - } - return text; -} -export function readUnicodeString(reader) { - var length = readUint32(reader); - return readUnicodeStringWithLength(reader, length); -} -export function readUnicodeStringWithLength(reader, length) { - var text = ''; - while (length--) { - var value = readUint16(reader); - if (value || length > 0) { // remove trailing \0 - text += String.fromCharCode(value); - } - } - return text; -} -export function readAsciiString(reader, length) { - var text = ''; - while (length--) { - text += String.fromCharCode(readUint8(reader)); - } - return text; -} -export function skipBytes(reader, count) { - reader.offset += count; -} -export function checkSignature(reader, a, b) { - var offset = reader.offset; - var signature = readSignature(reader); - if (signature !== a && signature !== b) { - throw new Error("Invalid signature: '".concat(signature, "' at 0x").concat(offset.toString(16))); - } -} -function readShortString(reader, length) { - var buffer = readBytes(reader, length); - var result = ''; - for (var i = 0; i < buffer.length; i++) { - result += String.fromCharCode(buffer[i]); - } - return result; -} -function isValidSignature(sig) { - return sig === '8BIM' || sig === 'MeSa' || sig === 'AgHg' || sig === 'PHUT' || sig === 'DCSR'; -} -export function readPsd(reader, options) { - var _a; - if (options === void 0) { options = {}; } - // header - checkSignature(reader, '8BPS'); - var version = readUint16(reader); - if (version !== 1 && version !== 2) - throw new Error("Invalid PSD file version: ".concat(version)); - skipBytes(reader, 6); - var channels = readUint16(reader); - var height = readUint32(reader); - var width = readUint32(reader); - var bitsPerChannel = readUint16(reader); - var colorMode = readUint16(reader); - var maxSize = version === 1 ? 30000 : 300000; - if (width > maxSize || height > maxSize) - throw new Error("Invalid size"); - if (channels > 16) - throw new Error("Invalid channel count"); - if (bitsPerChannel > 32) - throw new Error("Invalid bitsPerChannel count"); - if (supportedColorModes.indexOf(colorMode) === -1) - throw new Error("Color mode not supported: ".concat((_a = colorModes[colorMode]) !== null && _a !== void 0 ? _a : colorMode)); - var psd = { width: width, height: height, channels: channels, bitsPerChannel: bitsPerChannel, colorMode: colorMode }; - var opt = __assign(__assign({}, options), { large: version === 2 }); - var fixOffsets = [0, 1, -1, 2, -2, 3, -3, 4, -4]; - // color mode data - readSection(reader, 1, function (left) { - if (opt.throwForMissingFeatures) - throw new Error('Color mode data not supported'); - skipBytes(reader, left()); - }); - // image resources - readSection(reader, 1, function (left) { - var _loop_1 = function () { - var sigOffset = reader.offset; - var sig = ''; - // attempt to fix broken document by realigning with the signature - for (var _i = 0, fixOffsets_1 = fixOffsets; _i < fixOffsets_1.length; _i++) { - var offset = fixOffsets_1[_i]; - try { - reader.offset = sigOffset + offset; - sig = readSignature(reader); - } - catch (_a) { } - if (isValidSignature(sig)) - break; - } - if (!isValidSignature(sig)) { - throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((sigOffset).toString(16))); - } - var id = readUint16(reader); - readPascalString(reader, 2); // name - readSection(reader, 2, function (left) { - var handler = resourceHandlersMap[id]; - var skip = id === 1036 && !!opt.skipThumbnail; - if (!psd.imageResources) { - psd.imageResources = {}; - } - if (handler && !skip) { - try { - handler.read(reader, psd.imageResources, left, opt); - } - catch (e) { - if (opt.throwForMissingFeatures) - throw e; - skipBytes(reader, left()); - } - } - else { - // options.logMissingFeatures && console.log(`Unhandled image resource: ${id}`); - skipBytes(reader, left()); - } - }); - }; - while (left()) { - _loop_1(); - } - }); - // layer and mask info - var globalAlpha = false; - readSection(reader, 1, function (left) { - globalAlpha = readLayerInfo(reader, psd, opt); - // SAI does not include this section - if (left() > 0) { - var globalLayerMaskInfo = readGlobalLayerMaskInfo(reader); - if (globalLayerMaskInfo) - psd.globalLayerMaskInfo = globalLayerMaskInfo; - } - else { - // revert back to end of section if exceeded section limits - // opt.logMissingFeatures && console.log('reverting to end of section'); - skipBytes(reader, left()); - } - while (left() > 0) { - // sometimes there are empty bytes here - while (left() && peekUint8(reader) === 0) { - // opt.logMissingFeatures && console.log('skipping 0 byte'); - skipBytes(reader, 1); - } - if (left() >= 12) { - readAdditionalLayerInfo(reader, psd, psd, opt); - } - else { - // opt.logMissingFeatures && console.log('skipping leftover bytes', left()); - skipBytes(reader, left()); - } - } - }, undefined, opt.large); - var hasChildren = psd.children && psd.children.length; - var skipComposite = opt.skipCompositeImageData && (opt.skipLayerImageData || hasChildren); - if (!skipComposite) { - readImageData(reader, psd, globalAlpha, opt); - } - // TODO: show converted color mode instead of original PSD file color mode - // but add option to preserve file color mode (need to return image data instead of canvas in that case) - // psd.colorMode = ColorMode.RGB; // we convert all color modes to RGB - return psd; -} -function readLayerInfo(reader, psd, options) { - var globalAlpha = false; - readSection(reader, 2, function (left) { - var layerCount = readInt16(reader); - if (layerCount < 0) { - globalAlpha = true; - layerCount = -layerCount; - } - var layers = []; - var layerChannels = []; - for (var i = 0; i < layerCount; i++) { - var _a = readLayerRecord(reader, psd, options), layer = _a.layer, channels = _a.channels; - layers.push(layer); - layerChannels.push(channels); - } - if (!options.skipLayerImageData) { - for (var i = 0; i < layerCount; i++) { - readLayerChannelImageData(reader, psd, layers[i], layerChannels[i], options); - } - } - skipBytes(reader, left()); - if (!psd.children) - psd.children = []; - var stack = [psd]; - for (var i = layers.length - 1; i >= 0; i--) { - var l = layers[i]; - var type = l.sectionDivider ? l.sectionDivider.type : 0 /* SectionDividerType.Other */; - if (type === 1 /* SectionDividerType.OpenFolder */ || type === 2 /* SectionDividerType.ClosedFolder */) { - l.opened = type === 1 /* SectionDividerType.OpenFolder */; - l.children = []; - stack[stack.length - 1].children.unshift(l); - stack.push(l); - } - else if (type === 3 /* SectionDividerType.BoundingSectionDivider */) { - stack.pop(); - // this was workaround because I didn't know what `lsdk` section was, now it's probably not needed anymore - // } else if (l.name === '' && !l.sectionDivider && !l.top && !l.left && !l.bottom && !l.right) { - // // sometimes layer group terminator doesn't have sectionDivider, so we just guess here (PS bug ?) - // stack.pop(); - } - else { - stack[stack.length - 1].children.unshift(l); - } - } - }, undefined, options.large); - return globalAlpha; -} -function readLayerRecord(reader, psd, options) { - var layer = {}; - layer.top = readInt32(reader); - layer.left = readInt32(reader); - layer.bottom = readInt32(reader); - layer.right = readInt32(reader); - var channelCount = readUint16(reader); - var channels = []; - for (var i = 0; i < channelCount; i++) { - var channelID = readInt16(reader); - var channelLength = readUint32(reader); - if (options.large) { - if (channelLength !== 0) - throw new Error('Sizes larger than 4GB are not supported'); - channelLength = readUint32(reader); - } - channels.push({ id: channelID, length: channelLength }); - } - checkSignature(reader, '8BIM'); - var blendMode = readSignature(reader); - if (!toBlendMode[blendMode]) - throw new Error("Invalid blend mode: '".concat(blendMode, "'")); - layer.blendMode = toBlendMode[blendMode]; - layer.opacity = readUint8(reader) / 0xff; - layer.clipping = readUint8(reader) === 1; - var flags = readUint8(reader); - layer.transparencyProtected = (flags & 0x01) !== 0; - layer.hidden = (flags & 0x02) !== 0; - // 0x04 - obsolete - // 0x08 - 1 for Photoshop 5.0 and later, tells if bit 4 has useful information - // 0x10 - pixel data irrelevant to appearance of document - // 0x20 - ??? - // if (flags & 0x20) (layer as any)._2 = true; // TEMP !!!! - skipBytes(reader, 1); - readSection(reader, 1, function (left) { - var mask = readLayerMaskData(reader, options); - if (mask) - layer.mask = mask; - /*const blendingRanges =*/ readLayerBlendingRanges(reader); - layer.name = readPascalString(reader, 4); - while (left()) { - readAdditionalLayerInfo(reader, layer, psd, options); - } - }); - return { layer: layer, channels: channels }; -} -function readLayerMaskData(reader, options) { - return readSection(reader, 1, function (left) { - if (!left()) - return undefined; - var mask = {}; - mask.top = readInt32(reader); - mask.left = readInt32(reader); - mask.bottom = readInt32(reader); - mask.right = readInt32(reader); - mask.defaultColor = readUint8(reader); - var flags = readUint8(reader); - mask.positionRelativeToLayer = (flags & 1 /* LayerMaskFlags.PositionRelativeToLayer */) !== 0; - mask.disabled = (flags & 2 /* LayerMaskFlags.LayerMaskDisabled */) !== 0; - mask.fromVectorData = (flags & 8 /* LayerMaskFlags.LayerMaskFromRenderingOtherData */) !== 0; - if (flags & 16 /* LayerMaskFlags.MaskHasParametersAppliedToIt */) { - var params = readUint8(reader); - if (params & 1 /* MaskParams.UserMaskDensity */) - mask.userMaskDensity = readUint8(reader) / 0xff; - if (params & 2 /* MaskParams.UserMaskFeather */) - mask.userMaskFeather = readFloat64(reader); - if (params & 4 /* MaskParams.VectorMaskDensity */) - mask.vectorMaskDensity = readUint8(reader) / 0xff; - if (params & 8 /* MaskParams.VectorMaskFeather */) - mask.vectorMaskFeather = readFloat64(reader); - } - if (left() > 2) { - options.logMissingFeatures && console.log('Unhandled extra mask params'); - // TODO: handle these values - /*const realFlags =*/ readUint8(reader); - /*const realUserMaskBackground =*/ readUint8(reader); - /*const top2 =*/ readInt32(reader); - /*const left2 =*/ readInt32(reader); - /*const bottom2 =*/ readInt32(reader); - /*const right2 =*/ readInt32(reader); - } - skipBytes(reader, left()); - return mask; - }); -} -function readLayerBlendingRanges(reader) { - return readSection(reader, 1, function (left) { - var compositeGrayBlendSource = readUint32(reader); - var compositeGraphBlendDestinationRange = readUint32(reader); - var ranges = []; - while (left()) { - var sourceRange = readUint32(reader); - var destRange = readUint32(reader); - ranges.push({ sourceRange: sourceRange, destRange: destRange }); - } - return { compositeGrayBlendSource: compositeGrayBlendSource, compositeGraphBlendDestinationRange: compositeGraphBlendDestinationRange, ranges: ranges }; - }); -} -function readLayerChannelImageData(reader, psd, layer, channels, options) { - var layerWidth = (layer.right || 0) - (layer.left || 0); - var layerHeight = (layer.bottom || 0) - (layer.top || 0); - var cmyk = psd.colorMode === 4 /* ColorMode.CMYK */; - var imageData; - if (layerWidth && layerHeight) { - if (cmyk) { - imageData = { width: layerWidth, height: layerHeight, data: new Uint8ClampedArray(layerWidth * layerHeight * 5) }; - for (var p = 4; p < imageData.data.byteLength; p += 5) - imageData.data[p] = 255; - } - else { - imageData = createImageData(layerWidth, layerHeight); - resetImageData(imageData); - } - } - if (RAW_IMAGE_DATA) - layer.imageDataRaw = []; - for (var _i = 0, channels_1 = channels; _i < channels_1.length; _i++) { - var channel = channels_1[_i]; - if (channel.length === 0) - continue; - if (channel.length < 2) - throw new Error('Invalid channel length'); - var start = reader.offset; - var compression = readUint16(reader); - // try to fix broken files where there's 1 byte shift of channel - if (compression > 3) { - reader.offset -= 1; - compression = readUint16(reader); - } - // try to fix broken files where there's 1 byte shift of channel - if (compression > 3) { - reader.offset -= 3; - compression = readUint16(reader); - } - if (compression > 3) - throw new Error("Invalid compression: ".concat(compression)); - if (channel.id === -2 /* ChannelID.UserMask */) { - var mask = layer.mask; - if (!mask) - throw new Error("Missing layer mask data"); - var maskWidth = (mask.right || 0) - (mask.left || 0); - var maskHeight = (mask.bottom || 0) - (mask.top || 0); - if (maskWidth && maskHeight) { - var maskData = createImageData(maskWidth, maskHeight); - resetImageData(maskData); - var start_1 = reader.offset; - readData(reader, channel.length, maskData, compression, maskWidth, maskHeight, 0, options.large, 4); - if (RAW_IMAGE_DATA) { - layer.maskDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start_1, reader.offset - start_1); - } - setupGrayscale(maskData); - if (options.useImageData) { - mask.imageData = maskData; - } - else { - mask.canvas = createCanvas(maskWidth, maskHeight); - mask.canvas.getContext('2d').putImageData(maskData, 0, 0); - } - } - } - else { - var offset = offsetForChannel(channel.id, cmyk); - var targetData = imageData; - if (offset < 0) { - targetData = undefined; - if (options.throwForMissingFeatures) { - throw new Error("Channel not supported: ".concat(channel.id)); - } - } - readData(reader, channel.length, targetData, compression, layerWidth, layerHeight, offset, options.large, cmyk ? 5 : 4); - if (RAW_IMAGE_DATA) { - layer.imageDataRaw[channel.id] = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start + 2, channel.length - 2); - } - reader.offset = start + channel.length; - if (targetData && psd.colorMode === 1 /* ColorMode.Grayscale */) { - setupGrayscale(targetData); - } - } - } - if (imageData) { - if (cmyk) { - var cmykData = imageData; - imageData = createImageData(cmykData.width, cmykData.height); - cmykToRgb(cmykData, imageData, false); - } - if (options.useImageData) { - layer.imageData = imageData; - } - else { - layer.canvas = createCanvas(layerWidth, layerHeight); - layer.canvas.getContext('2d').putImageData(imageData, 0, 0); - } - } -} -function readData(reader, length, data, compression, width, height, offset, large, step) { - if (compression === 0 /* Compression.RawData */) { - readDataRaw(reader, data, width, height, step, offset); - } - else if (compression === 1 /* Compression.RleCompressed */) { - readDataRLE(reader, data, width, height, step, [offset], large); - } - else if (compression === 2 /* Compression.ZipWithoutPrediction */) { - readDataZipWithoutPrediction(reader, length, data, width, height, step, offset); - } - else if (compression === 3 /* Compression.ZipWithPrediction */) { - throw new Error("Compression type not supported: ".concat(compression)); - } - else { - throw new Error("Invalid Compression type: ".concat(compression)); - } -} -function readGlobalLayerMaskInfo(reader) { - return readSection(reader, 1, function (left) { - if (!left()) - return undefined; - var overlayColorSpace = readUint16(reader); - var colorSpace1 = readUint16(reader); - var colorSpace2 = readUint16(reader); - var colorSpace3 = readUint16(reader); - var colorSpace4 = readUint16(reader); - var opacity = readUint16(reader) / 0xff; - var kind = readUint8(reader); - skipBytes(reader, left()); // 3 bytes of padding ? - return { overlayColorSpace: overlayColorSpace, colorSpace1: colorSpace1, colorSpace2: colorSpace2, colorSpace3: colorSpace3, colorSpace4: colorSpace4, opacity: opacity, kind: kind }; - }); -} -function readAdditionalLayerInfo(reader, target, psd, options) { - var sig = readSignature(reader); - if (sig !== '8BIM' && sig !== '8B64') - throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((reader.offset - 4).toString(16))); - var key = readSignature(reader); - // `largeAdditionalInfoKeys` fallback, because some keys don't have 8B64 signature even when they are 64bit - var u64 = sig === '8B64' || (options.large && largeAdditionalInfoKeys.indexOf(key) !== -1); - readSection(reader, 2, function (left) { - var handler = infoHandlersMap[key]; - if (handler) { - try { - handler.read(reader, target, left, psd, options); - } - catch (e) { - if (options.throwForMissingFeatures) - throw e; - } - } - else { - options.logMissingFeatures && console.log("Unhandled additional info: ".concat(key)); - skipBytes(reader, left()); - } - if (left()) { - options.logMissingFeatures && console.log("Unread ".concat(left(), " bytes left for additional info: ").concat(key)); - skipBytes(reader, left()); - } - }, false, u64); -} -function readImageData(reader, psd, globalAlpha, options) { - var compression = readUint16(reader); - if (supportedColorModes.indexOf(psd.colorMode) === -1) - throw new Error("Color mode not supported: ".concat(psd.colorMode)); - if (compression !== 0 /* Compression.RawData */ && compression !== 1 /* Compression.RleCompressed */) - throw new Error("Compression type not supported: ".concat(compression)); - var imageData = createImageData(psd.width, psd.height); - resetImageData(imageData); - switch (psd.colorMode) { - case 0 /* ColorMode.Bitmap */: { - var bytes = void 0; - if (compression === 0 /* Compression.RawData */) { - bytes = readBytes(reader, Math.ceil(psd.width / 8) * psd.height); - } - else if (compression === 1 /* Compression.RleCompressed */) { - bytes = new Uint8Array(psd.width * psd.height); - readDataRLE(reader, { data: bytes, width: psd.width, height: psd.height }, psd.width, psd.height, 1, [0], options.large); - } - else { - throw new Error("Bitmap compression not supported: ".concat(compression)); - } - decodeBitmap(bytes, imageData.data, psd.width, psd.height); - break; - } - case 3 /* ColorMode.RGB */: - case 1 /* ColorMode.Grayscale */: { - var channels = psd.colorMode === 1 /* ColorMode.Grayscale */ ? [0] : [0, 1, 2]; - if (psd.channels && psd.channels > 3) { - for (var i = 3; i < psd.channels; i++) { - // TODO: store these channels in additional image data - channels.push(i); - } - } - else if (globalAlpha) { - channels.push(3); - } - if (compression === 0 /* Compression.RawData */) { - for (var i = 0; i < channels.length; i++) { - readDataRaw(reader, imageData, psd.width, psd.height, 4, channels[i]); - } - } - else if (compression === 1 /* Compression.RleCompressed */) { - var start = reader.offset; - readDataRLE(reader, imageData, psd.width, psd.height, 4, channels, options.large); - if (RAW_IMAGE_DATA) - psd.imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); - } - if (psd.colorMode === 1 /* ColorMode.Grayscale */) { - setupGrayscale(imageData); - } - break; - } - case 4 /* ColorMode.CMYK */: { - if (psd.channels !== 4) - throw new Error("Invalid channel count"); - var channels = [0, 1, 2, 3]; - if (globalAlpha) - channels.push(4); - if (compression === 0 /* Compression.RawData */) { - throw new Error("Not implemented"); - // TODO: ... - // for (let i = 0; i < channels.length; i++) { - // readDataRaw(reader, imageData, channels[i], psd.width, psd.height); - // } - } - else if (compression === 1 /* Compression.RleCompressed */) { - var cmykImageData = { - width: imageData.width, - height: imageData.height, - data: new Uint8Array(imageData.width * imageData.height * 5), - }; - var start = reader.offset; - readDataRLE(reader, cmykImageData, psd.width, psd.height, 5, channels, options.large); - cmykToRgb(cmykImageData, imageData, true); - if (RAW_IMAGE_DATA) - psd.imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); - } - break; - } - default: throw new Error("Color mode not supported: ".concat(psd.colorMode)); - } - // remove weird white matte - if (globalAlpha) { - var p = imageData.data; - var size = imageData.width * imageData.height * 4; - for (var i = 0; i < size; i += 4) { - var pa = p[i + 3]; - if (pa != 0 && pa != 255) { - var a = pa / 255; - var ra = 1 / a; - var invA = 255 * (1 - ra); - p[i + 0] = p[i + 0] * ra + invA; - p[i + 1] = p[i + 1] * ra + invA; - p[i + 2] = p[i + 2] * ra + invA; - } - } - } - if (options.useImageData) { - psd.imageData = imageData; - } - else { - psd.canvas = createCanvas(psd.width, psd.height); - psd.canvas.getContext('2d').putImageData(imageData, 0, 0); - } -} -function cmykToRgb(cmyk, rgb, reverseAlpha) { - var size = rgb.width * rgb.height * 4; - var srcData = cmyk.data; - var dstData = rgb.data; - for (var src = 0, dst = 0; dst < size; src += 5, dst += 4) { - var c = srcData[src]; - var m = srcData[src + 1]; - var y = srcData[src + 2]; - var k = srcData[src + 3]; - dstData[dst] = ((((c * k) | 0) / 255) | 0); - dstData[dst + 1] = ((((m * k) | 0) / 255) | 0); - dstData[dst + 2] = ((((y * k) | 0) / 255) | 0); - dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; - } - // for (let src = 0, dst = 0; dst < size; src += 5, dst += 4) { - // const c = 1 - (srcData[src + 0] / 255); - // const m = 1 - (srcData[src + 1] / 255); - // const y = 1 - (srcData[src + 2] / 255); - // // const k = srcData[src + 3] / 255; - // dstData[dst + 0] = ((1 - c * 0.8) * 255) | 0; - // dstData[dst + 1] = ((1 - m * 0.8) * 255) | 0; - // dstData[dst + 2] = ((1 - y * 0.8) * 255) | 0; - // dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; - // } -} -function readDataRaw(reader, pixelData, width, height, step, offset) { - var size = width * height; - var buffer = readBytes(reader, size); - if (pixelData && offset < step) { - var data = pixelData.data; - for (var i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { - data[p] = buffer[i]; - } - } -} -export function readDataZipWithoutPrediction(reader, length, pixelData, width, height, step, offset) { - var compressed = readBytes(reader, length); - var decompressed = inflate(compressed); - var size = width * height; - if (pixelData && offset < step) { - var data = pixelData.data; - for (var i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { - data[p] = decompressed[i]; - } - } -} -export function readDataRLE(reader, pixelData, _width, height, step, offsets, large) { - var data = pixelData && pixelData.data; - var lengths; - if (large) { - lengths = new Uint32Array(offsets.length * height); - for (var o = 0, li = 0; o < offsets.length; o++) { - for (var y = 0; y < height; y++, li++) { - lengths[li] = readUint32(reader); - } - } - } - else { - lengths = new Uint16Array(offsets.length * height); - for (var o = 0, li = 0; o < offsets.length; o++) { - for (var y = 0; y < height; y++, li++) { - lengths[li] = readUint16(reader); - } - } - } - var extraLimit = (step - 1) | 0; // 3 for rgb, 4 for cmyk - for (var c = 0, li = 0; c < offsets.length; c++) { - var offset = offsets[c] | 0; - var extra = c > extraLimit || offset > extraLimit; - if (!data || extra) { - for (var y = 0; y < height; y++, li++) { - skipBytes(reader, lengths[li]); - } - } - else { - for (var y = 0, p = offset | 0; y < height; y++, li++) { - var length_1 = lengths[li]; - var buffer = readBytes(reader, length_1); - for (var i = 0; i < length_1; i++) { - var header = buffer[i]; - if (header > 128) { - var value = buffer[++i]; - header = (256 - header) | 0; - for (var j = 0; j <= header; j = (j + 1) | 0) { - data[p] = value; - p = (p + step) | 0; - } - } - else if (header < 128) { - for (var j = 0; j <= header; j = (j + 1) | 0) { - data[p] = buffer[++i]; - p = (p + step) | 0; - } - } - else { - // ignore 128 - } - // This showed up on some images from non-photoshop programs, ignoring it seems to work just fine. - // if (i >= length) throw new Error(`Invalid RLE data: exceeded buffer size ${i}/${length}`); - } - } - } - } -} -export function readSection(reader, round, func, skipEmpty, eightBytes) { - if (skipEmpty === void 0) { skipEmpty = true; } - if (eightBytes === void 0) { eightBytes = false; } - var length = readUint32(reader); - if (eightBytes) { - if (length !== 0) - throw new Error('Sizes larger than 4GB are not supported'); - length = readUint32(reader); - } - if (length <= 0 && skipEmpty) - return undefined; - var end = reader.offset + length; - if (end > reader.view.byteLength) - throw new Error('Section exceeds file size'); - var result = func(function () { return end - reader.offset; }); - if (reader.offset !== end) { - if (reader.offset > end) { - warnOrThrow(reader, 'Exceeded section limits'); - } - else { - warnOrThrow(reader, "Unread section data"); // : ${end - reader.offset} bytes at 0x${reader.offset.toString(16)}`); - } - } - while (end % round) - end++; - reader.offset = end; - return result; -} -export function readColor(reader) { - var colorSpace = readUint16(reader); - switch (colorSpace) { - case 0 /* ColorSpace.RGB */: { - var r = readUint16(reader) / 257; - var g = readUint16(reader) / 257; - var b = readUint16(reader) / 257; - skipBytes(reader, 2); - return { r: r, g: g, b: b }; - } - case 1 /* ColorSpace.HSB */: { - var h = readUint16(reader) / 0xffff; - var s = readUint16(reader) / 0xffff; - var b = readUint16(reader) / 0xffff; - skipBytes(reader, 2); - return { h: h, s: s, b: b }; - } - case 2 /* ColorSpace.CMYK */: { - var c = readUint16(reader) / 257; - var m = readUint16(reader) / 257; - var y = readUint16(reader) / 257; - var k = readUint16(reader) / 257; - return { c: c, m: m, y: y, k: k }; - } - case 7 /* ColorSpace.Lab */: { - var l = readInt16(reader) / 10000; - var ta = readInt16(reader); - var tb = readInt16(reader); - var a = ta < 0 ? (ta / 12800) : (ta / 12700); - var b = tb < 0 ? (tb / 12800) : (tb / 12700); - skipBytes(reader, 2); - return { l: l, a: a, b: b }; - } - case 8 /* ColorSpace.Grayscale */: { - var k = readUint16(reader) * 255 / 10000; - skipBytes(reader, 6); - return { k: k }; - } - default: - throw new Error('Invalid color space'); - } -} -export function readPattern(reader) { - readUint32(reader); // length - var version = readUint32(reader); - if (version !== 1) - throw new Error("Invalid pattern version: ".concat(version)); - var colorMode = readUint32(reader); - var x = readInt16(reader); - var y = readInt16(reader); - // we only support RGB and grayscale for now - if (colorMode !== 3 /* ColorMode.RGB */ && colorMode !== 1 /* ColorMode.Grayscale */ && colorMode !== 2 /* ColorMode.Indexed */) { - throw new Error("Unsupported pattern color mode: ".concat(colorMode)); - } - var name = readUnicodeString(reader); - var id = readPascalString(reader, 1); - var palette = []; - if (colorMode === 2 /* ColorMode.Indexed */) { - for (var i = 0; i < 256; i++) { - palette.push({ - r: readUint8(reader), - g: readUint8(reader), - b: readUint8(reader), - }); - } - skipBytes(reader, 4); // no idea what this is - } - // virtual memory array list - var version2 = readUint32(reader); - if (version2 !== 3) - throw new Error("Invalid pattern VMAL version: ".concat(version2)); - readUint32(reader); // length - var top = readUint32(reader); - var left = readUint32(reader); - var bottom = readUint32(reader); - var right = readUint32(reader); - var channelsCount = readUint32(reader); - var width = right - left; - var height = bottom - top; - var data = new Uint8Array(width * height * 4); - for (var i = 3; i < data.byteLength; i += 4) { - data[i] = 255; - } - for (var i = 0, ch = 0; i < (channelsCount + 2); i++) { - var has = readUint32(reader); - if (!has) - continue; - var length_2 = readUint32(reader); - var pixelDepth = readUint32(reader); - var ctop = readUint32(reader); - var cleft = readUint32(reader); - var cbottom = readUint32(reader); - var cright = readUint32(reader); - var pixelDepth2 = readUint16(reader); - var compressionMode = readUint8(reader); // 0 - raw, 1 - zip - var dataLength = length_2 - (4 + 16 + 2 + 1); - var cdata = readBytes(reader, dataLength); - if (pixelDepth !== 8 || pixelDepth2 !== 8) { - throw new Error('16bit pixel depth not supported for patterns'); - } - var w = cright - cleft; - var h = cbottom - ctop; - var ox = cleft - left; - var oy = ctop - top; - if (compressionMode === 0) { - if (colorMode === 3 /* ColorMode.RGB */ && ch < 3) { - for (var y_1 = 0; y_1 < h; y_1++) { - for (var x_1 = 0; x_1 < w; x_1++) { - var src = x_1 + y_1 * w; - var dst = (ox + x_1 + (y_1 + oy) * width) * 4; - data[dst + ch] = cdata[src]; - } - } - } - if (colorMode === 1 /* ColorMode.Grayscale */ && ch < 1) { - for (var y_2 = 0; y_2 < h; y_2++) { - for (var x_2 = 0; x_2 < w; x_2++) { - var src = x_2 + y_2 * w; - var dst = (ox + x_2 + (y_2 + oy) * width) * 4; - var value = cdata[src]; - data[dst + 0] = value; - data[dst + 1] = value; - data[dst + 2] = value; - } - } - } - if (colorMode === 2 /* ColorMode.Indexed */) { - // TODO: - throw new Error('Indexed pattern color mode not implemented'); - } - } - else if (compressionMode === 1) { - // console.log({ colorMode }); - // require('fs').writeFileSync('zip.bin', Buffer.from(cdata)); - // const data = require('zlib').inflateRawSync(cdata); - // const data = require('zlib').unzipSync(cdata); - // console.log(data); - // throw new Error('Zip compression not supported for pattern'); - // throw new Error('Unsupported pattern compression'); - console.error('Unsupported pattern compression'); - name += ' (failed to decode)'; - } - else { - throw new Error('Invalid pattern compression mode'); - } - ch++; - } - // TODO: use canvas instead of data ? - return { id: id, name: name, x: x, y: y, bounds: { x: left, y: top, w: width, h: height }, data: data }; -} -//# sourceMappingURL=psdReader.js.map \ No newline at end of file +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import { inflate } from 'pako'; +import { resetImageData, offsetForChannel, decodeBitmap, createCanvas, createImageData, toBlendMode, RAW_IMAGE_DATA, largeAdditionalInfoKeys } from './helpers'; +import { infoHandlersMap } from './additionalInfo'; +import { resourceHandlersMap } from './imageResources'; +export var supportedColorModes = [0 /* ColorMode.Bitmap */, 1 /* ColorMode.Grayscale */, 3 /* ColorMode.RGB */]; +var colorModes = ['bitmap', 'grayscale', 'indexed', 'RGB', 'CMYK', 'multichannel', 'duotone', 'lab']; +function setupGrayscale(data) { + var size = data.width * data.height * 4; + for (var i = 0; i < size; i += 4) { + data.data[i + 1] = data.data[i]; + data.data[i + 2] = data.data[i]; + } +} +export function createReader(buffer, offset, length) { + var view = new DataView(buffer, offset, length); + return { view: view, offset: 0, strict: false, debug: false }; +} +export function warnOrThrow(reader, message) { + if (reader.strict) + throw new Error(message); + if (reader.debug) + console.warn(message); +} +export function readUint8(reader) { + reader.offset += 1; + return reader.view.getUint8(reader.offset - 1); +} +export function peekUint8(reader) { + return reader.view.getUint8(reader.offset); +} +export function readInt16(reader) { + reader.offset += 2; + return reader.view.getInt16(reader.offset - 2, false); +} +export function readUint16(reader) { + reader.offset += 2; + return reader.view.getUint16(reader.offset - 2, false); +} +export function readInt32(reader) { + reader.offset += 4; + return reader.view.getInt32(reader.offset - 4, false); +} +export function readInt32LE(reader) { + reader.offset += 4; + return reader.view.getInt32(reader.offset - 4, true); +} +export function readUint32(reader) { + reader.offset += 4; + return reader.view.getUint32(reader.offset - 4, false); +} +export function readFloat32(reader) { + reader.offset += 4; + return reader.view.getFloat32(reader.offset - 4, false); +} +export function readFloat64(reader) { + reader.offset += 8; + return reader.view.getFloat64(reader.offset - 8, false); +} +// 32-bit fixed-point number 16.16 +export function readFixedPoint32(reader) { + return readInt32(reader) / (1 << 16); +} +// 32-bit fixed-point number 8.24 +export function readFixedPointPath32(reader) { + return readInt32(reader) / (1 << 24); +} +export function readBytes(reader, length) { + var start = reader.view.byteOffset + reader.offset; + reader.offset += length; + if ((start + length) > reader.view.buffer.byteLength) { + // fix for broken PSD files that are missing part of file at the end + warnOrThrow(reader, 'Reading bytes exceeding buffer length'); + if (length > (100 * 1024 * 1024)) + throw new Error('Reading past end of file'); // limit to 100MB + var result = new Uint8Array(length); + var len = Math.min(length, reader.view.byteLength - start); + if (len > 0) + result.set(new Uint8Array(reader.view.buffer, start, len)); + return result; + } + else { + return new Uint8Array(reader.view.buffer, start, length); + } +} +export function readSignature(reader) { + return readShortString(reader, 4); +} +export function readPascalString(reader, padTo) { + var length = readUint8(reader); + var text = length ? readShortString(reader, length) : ''; + while (++length % padTo) { + reader.offset++; + } + return text; +} +export function readUnicodeString(reader) { + var length = readUint32(reader); + return readUnicodeStringWithLength(reader, length); +} +export function readUnicodeStringWithLength(reader, length) { + var text = ''; + while (length--) { + var value = readUint16(reader); + if (value || length > 0) { // remove trailing \0 + text += String.fromCharCode(value); + } + } + return text; +} +export function readAsciiString(reader, length) { + var text = ''; + while (length--) { + text += String.fromCharCode(readUint8(reader)); + } + return text; +} +export function skipBytes(reader, count) { + reader.offset += count; +} +export function checkSignature(reader, a, b) { + var offset = reader.offset; + var signature = readSignature(reader); + if (signature !== a && signature !== b) { + throw new Error("Invalid signature: '".concat(signature, "' at 0x").concat(offset.toString(16))); + } +} +function readShortString(reader, length) { + var buffer = readBytes(reader, length); + var result = ''; + for (var i = 0; i < buffer.length; i++) { + result += String.fromCharCode(buffer[i]); + } + return result; +} +function isValidSignature(sig) { + return sig === '8BIM' || sig === 'MeSa' || sig === 'AgHg' || sig === 'PHUT' || sig === 'DCSR'; +} +export function readPsd(reader, options) { + var _a; + if (options === void 0) { options = {}; } + // header + checkSignature(reader, '8BPS'); + var version = readUint16(reader); + if (version !== 1 && version !== 2) + throw new Error("Invalid PSD file version: ".concat(version)); + skipBytes(reader, 6); + var channels = readUint16(reader); + var height = readUint32(reader); + var width = readUint32(reader); + var bitsPerChannel = readUint16(reader); + var colorMode = readUint16(reader); + var maxSize = version === 1 ? 30000 : 300000; + if (width > maxSize || height > maxSize) + throw new Error("Invalid size"); + if (channels > 16) + throw new Error("Invalid channel count"); + if (bitsPerChannel > 32) + throw new Error("Invalid bitsPerChannel count"); + if (supportedColorModes.indexOf(colorMode) === -1) + throw new Error("Color mode not supported: ".concat((_a = colorModes[colorMode]) !== null && _a !== void 0 ? _a : colorMode)); + var psd = { width: width, height: height, channels: channels, bitsPerChannel: bitsPerChannel, colorMode: colorMode }; + var opt = __assign(__assign({}, options), { large: version === 2 }); + var fixOffsets = [0, 1, -1, 2, -2, 3, -3, 4, -4]; + // color mode data + readSection(reader, 1, function (left) { + if (opt.throwForMissingFeatures) + throw new Error('Color mode data not supported'); + skipBytes(reader, left()); + }); + // image resources + readSection(reader, 1, function (left) { + var _loop_1 = function () { + var sigOffset = reader.offset; + var sig = ''; + // attempt to fix broken document by realigning with the signature + for (var _i = 0, fixOffsets_1 = fixOffsets; _i < fixOffsets_1.length; _i++) { + var offset = fixOffsets_1[_i]; + try { + reader.offset = sigOffset + offset; + sig = readSignature(reader); + } + catch (_a) { } + if (isValidSignature(sig)) + break; + } + if (!isValidSignature(sig)) { + throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((sigOffset).toString(16))); + } + var id = readUint16(reader); + readPascalString(reader, 2); // name + readSection(reader, 2, function (left) { + var handler = resourceHandlersMap[id]; + var skip = id === 1036 && !!opt.skipThumbnail; + if (!psd.imageResources) { + psd.imageResources = {}; + } + if (handler && !skip) { + try { + handler.read(reader, psd.imageResources, left, opt); + } + catch (e) { + if (opt.throwForMissingFeatures) + throw e; + skipBytes(reader, left()); + } + } + else { + // options.logMissingFeatures && console.log(`Unhandled image resource: ${id}`); + skipBytes(reader, left()); + } + }); + }; + while (left()) { + _loop_1(); + } + }); + // layer and mask info + var globalAlpha = false; + readSection(reader, 1, function (left) { + globalAlpha = readLayerInfo(reader, psd, opt); + // SAI does not include this section + if (left() > 0) { + var globalLayerMaskInfo = readGlobalLayerMaskInfo(reader); + if (globalLayerMaskInfo) + psd.globalLayerMaskInfo = globalLayerMaskInfo; + } + else { + // revert back to end of section if exceeded section limits + // opt.logMissingFeatures && console.log('reverting to end of section'); + skipBytes(reader, left()); + } + while (left() > 0) { + // sometimes there are empty bytes here + while (left() && peekUint8(reader) === 0) { + // opt.logMissingFeatures && console.log('skipping 0 byte'); + skipBytes(reader, 1); + } + if (left() >= 12) { + readAdditionalLayerInfo(reader, psd, psd, opt); + } + else { + // opt.logMissingFeatures && console.log('skipping leftover bytes', left()); + skipBytes(reader, left()); + } + } + }, undefined, opt.large); + var hasChildren = psd.children && psd.children.length; + var skipComposite = opt.skipCompositeImageData && (opt.skipLayerImageData || hasChildren); + if (!skipComposite) { + readImageData(reader, psd, globalAlpha, opt); + } + // TODO: show converted color mode instead of original PSD file color mode + // but add option to preserve file color mode (need to return image data instead of canvas in that case) + // psd.colorMode = ColorMode.RGB; // we convert all color modes to RGB + return psd; +} +function readLayerInfo(reader, psd, options) { + var globalAlpha = false; + readSection(reader, 2, function (left) { + var layerCount = readInt16(reader); + if (layerCount < 0) { + globalAlpha = true; + layerCount = -layerCount; + } + var layers = []; + var layerChannels = []; + for (var i = 0; i < layerCount; i++) { + var _a = readLayerRecord(reader, psd, options), layer = _a.layer, channels = _a.channels; + layers.push(layer); + layerChannels.push(channels); + } + if (!options.skipLayerImageData) { + for (var i = 0; i < layerCount; i++) { + readLayerChannelImageData(reader, psd, layers[i], layerChannels[i], options); + } + } + skipBytes(reader, left()); + if (!psd.children) + psd.children = []; + var stack = [psd]; + for (var i = layers.length - 1; i >= 0; i--) { + var l = layers[i]; + var type = l.sectionDivider ? l.sectionDivider.type : 0 /* SectionDividerType.Other */; + if (type === 1 /* SectionDividerType.OpenFolder */ || type === 2 /* SectionDividerType.ClosedFolder */) { + l.opened = type === 1 /* SectionDividerType.OpenFolder */; + l.children = []; + stack[stack.length - 1].children.unshift(l); + stack.push(l); + } + else if (type === 3 /* SectionDividerType.BoundingSectionDivider */) { + stack.pop(); + // this was workaround because I didn't know what `lsdk` section was, now it's probably not needed anymore + // } else if (l.name === '' && !l.sectionDivider && !l.top && !l.left && !l.bottom && !l.right) { + // // sometimes layer group terminator doesn't have sectionDivider, so we just guess here (PS bug ?) + // stack.pop(); + } + else { + stack[stack.length - 1].children.unshift(l); + } + } + }, undefined, options.large); + return globalAlpha; +} +function readLayerRecord(reader, psd, options) { + var layer = {}; + layer.top = readInt32(reader); + layer.left = readInt32(reader); + layer.bottom = readInt32(reader); + layer.right = readInt32(reader); + var channelCount = readUint16(reader); + var channels = []; + for (var i = 0; i < channelCount; i++) { + var channelID = readInt16(reader); + var channelLength = readUint32(reader); + if (options.large) { + if (channelLength !== 0) + throw new Error('Sizes larger than 4GB are not supported'); + channelLength = readUint32(reader); + } + channels.push({ id: channelID, length: channelLength }); + } + checkSignature(reader, '8BIM'); + var blendMode = readSignature(reader); + if (!toBlendMode[blendMode]) + throw new Error("Invalid blend mode: '".concat(blendMode, "'")); + layer.blendMode = toBlendMode[blendMode]; + layer.opacity = readUint8(reader) / 0xff; + layer.clipping = readUint8(reader) === 1; + var flags = readUint8(reader); + layer.transparencyProtected = (flags & 0x01) !== 0; + layer.hidden = (flags & 0x02) !== 0; + // 0x04 - obsolete + // 0x08 - 1 for Photoshop 5.0 and later, tells if bit 4 has useful information + // 0x10 - pixel data irrelevant to appearance of document + // 0x20 - ??? + // if (flags & 0x20) (layer as any)._2 = true; // TEMP !!!! + skipBytes(reader, 1); + readSection(reader, 1, function (left) { + var mask = readLayerMaskData(reader, options); + if (mask) + layer.mask = mask; + /*const blendingRanges =*/ readLayerBlendingRanges(reader); + layer.name = readPascalString(reader, 4); + while (left()) { + readAdditionalLayerInfo(reader, layer, psd, options); + } + }); + return { layer: layer, channels: channels }; +} +function readLayerMaskData(reader, options) { + return readSection(reader, 1, function (left) { + if (!left()) + return undefined; + var mask = {}; + mask.top = readInt32(reader); + mask.left = readInt32(reader); + mask.bottom = readInt32(reader); + mask.right = readInt32(reader); + mask.defaultColor = readUint8(reader); + var flags = readUint8(reader); + mask.positionRelativeToLayer = (flags & 1 /* LayerMaskFlags.PositionRelativeToLayer */) !== 0; + mask.disabled = (flags & 2 /* LayerMaskFlags.LayerMaskDisabled */) !== 0; + mask.fromVectorData = (flags & 8 /* LayerMaskFlags.LayerMaskFromRenderingOtherData */) !== 0; + if (flags & 16 /* LayerMaskFlags.MaskHasParametersAppliedToIt */) { + var params = readUint8(reader); + if (params & 1 /* MaskParams.UserMaskDensity */) + mask.userMaskDensity = readUint8(reader) / 0xff; + if (params & 2 /* MaskParams.UserMaskFeather */) + mask.userMaskFeather = readFloat64(reader); + if (params & 4 /* MaskParams.VectorMaskDensity */) + mask.vectorMaskDensity = readUint8(reader) / 0xff; + if (params & 8 /* MaskParams.VectorMaskFeather */) + mask.vectorMaskFeather = readFloat64(reader); + } + if (left() > 2) { + options.logMissingFeatures && console.log('Unhandled extra mask params'); + // TODO: handle these values + /*const realFlags =*/ readUint8(reader); + /*const realUserMaskBackground =*/ readUint8(reader); + /*const top2 =*/ readInt32(reader); + /*const left2 =*/ readInt32(reader); + /*const bottom2 =*/ readInt32(reader); + /*const right2 =*/ readInt32(reader); + } + skipBytes(reader, left()); + return mask; + }); +} +function readLayerBlendingRanges(reader) { + return readSection(reader, 1, function (left) { + var compositeGrayBlendSource = readUint32(reader); + var compositeGraphBlendDestinationRange = readUint32(reader); + var ranges = []; + while (left()) { + var sourceRange = readUint32(reader); + var destRange = readUint32(reader); + ranges.push({ sourceRange: sourceRange, destRange: destRange }); + } + return { compositeGrayBlendSource: compositeGrayBlendSource, compositeGraphBlendDestinationRange: compositeGraphBlendDestinationRange, ranges: ranges }; + }); +} +function readLayerChannelImageData(reader, psd, layer, channels, options) { + var layerWidth = (layer.right || 0) - (layer.left || 0); + var layerHeight = (layer.bottom || 0) - (layer.top || 0); + var cmyk = psd.colorMode === 4 /* ColorMode.CMYK */; + var imageData; + if (layerWidth && layerHeight) { + if (cmyk) { + imageData = { width: layerWidth, height: layerHeight, data: new Uint8ClampedArray(layerWidth * layerHeight * 5) }; + for (var p = 4; p < imageData.data.byteLength; p += 5) + imageData.data[p] = 255; + } + else { + imageData = createImageData(layerWidth, layerHeight); + resetImageData(imageData); + } + } + if (RAW_IMAGE_DATA) + layer.imageDataRaw = []; + for (var _i = 0, channels_1 = channels; _i < channels_1.length; _i++) { + var channel = channels_1[_i]; + if (channel.length === 0) + continue; + if (channel.length < 2) + throw new Error('Invalid channel length'); + var start = reader.offset; + var compression = readUint16(reader); + if (channel.id === -2 /* ChannelID.UserMask */) { + var mask = layer.mask; + if (!mask) + throw new Error("Missing layer mask data"); + var maskWidth = (mask.right || 0) - (mask.left || 0); + var maskHeight = (mask.bottom || 0) - (mask.top || 0); + if (maskWidth && maskHeight) { + var maskData = createImageData(maskWidth, maskHeight); + resetImageData(maskData); + var start_1 = reader.offset; + readData(reader, channel.length, maskData, compression, maskWidth, maskHeight, 0, options.large, 4); + if (RAW_IMAGE_DATA) { + layer.maskDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start_1, reader.offset - start_1); + } + setupGrayscale(maskData); + if (options.useImageData) { + mask.imageData = maskData; + } + else { + mask.canvas = createCanvas(maskWidth, maskHeight); + mask.canvas.getContext('2d').putImageData(maskData, 0, 0); + } + } + } + else { + var offset = offsetForChannel(channel.id, cmyk); + var targetData = imageData; + if (offset < 0) { + targetData = undefined; + if (options.throwForMissingFeatures) { + throw new Error("Channel not supported: ".concat(channel.id)); + } + } + readData(reader, channel.length, targetData, compression, layerWidth, layerHeight, offset, options.large, cmyk ? 5 : 4); + if (RAW_IMAGE_DATA) { + layer.imageDataRaw[channel.id] = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start + 2, channel.length - 2); + } + reader.offset = start + channel.length; + if (targetData && psd.colorMode === 1 /* ColorMode.Grayscale */) { + setupGrayscale(targetData); + } + } + } + if (imageData) { + if (cmyk) { + var cmykData = imageData; + imageData = createImageData(cmykData.width, cmykData.height); + cmykToRgb(cmykData, imageData, false); + } + if (options.useImageData) { + layer.imageData = imageData; + } + else { + layer.canvas = createCanvas(layerWidth, layerHeight); + layer.canvas.getContext('2d').putImageData(imageData, 0, 0); + } + } +} +function readData(reader, length, data, compression, width, height, offset, large, step) { + if (compression === 0 /* Compression.RawData */) { + readDataRaw(reader, data, width, height, step, offset); + } + else if (compression === 1 /* Compression.RleCompressed */) { + readDataRLE(reader, data, width, height, step, [offset], large); + } + else if (compression === 2 /* Compression.ZipWithoutPrediction */) { + readDataZipWithoutPrediction(reader, length, data, width, height, step, offset); + } + else if (compression === 3 /* Compression.ZipWithPrediction */) { + throw new Error("Compression type not supported: ".concat(compression)); + } + else { + throw new Error("Invalid Compression type: ".concat(compression)); + } +} +function readGlobalLayerMaskInfo(reader) { + return readSection(reader, 1, function (left) { + if (!left()) + return undefined; + var overlayColorSpace = readUint16(reader); + var colorSpace1 = readUint16(reader); + var colorSpace2 = readUint16(reader); + var colorSpace3 = readUint16(reader); + var colorSpace4 = readUint16(reader); + var opacity = readUint16(reader) / 0xff; + var kind = readUint8(reader); + skipBytes(reader, left()); // 3 bytes of padding ? + return { overlayColorSpace: overlayColorSpace, colorSpace1: colorSpace1, colorSpace2: colorSpace2, colorSpace3: colorSpace3, colorSpace4: colorSpace4, opacity: opacity, kind: kind }; + }); +} +function readAdditionalLayerInfo(reader, target, psd, options) { + var sig = readSignature(reader); + if (sig !== '8BIM' && sig !== '8B64') + throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((reader.offset - 4).toString(16))); + var key = readSignature(reader); + // `largeAdditionalInfoKeys` fallback, because some keys don't have 8B64 signature even when they are 64bit + var u64 = sig === '8B64' || (options.large && largeAdditionalInfoKeys.indexOf(key) !== -1); + readSection(reader, 2, function (left) { + var handler = infoHandlersMap[key]; + if (handler) { + try { + handler.read(reader, target, left, psd, options); + } + catch (e) { + if (options.throwForMissingFeatures) + throw e; + } + } + else { + options.logMissingFeatures && console.log("Unhandled additional info: ".concat(key)); + skipBytes(reader, left()); + } + if (left()) { + options.logMissingFeatures && console.log("Unread ".concat(left(), " bytes left for additional info: ").concat(key)); + skipBytes(reader, left()); + } + }, false, u64); +} +function readImageData(reader, psd, globalAlpha, options) { + var compression = readUint16(reader); + if (supportedColorModes.indexOf(psd.colorMode) === -1) + throw new Error("Color mode not supported: ".concat(psd.colorMode)); + if (compression !== 0 /* Compression.RawData */ && compression !== 1 /* Compression.RleCompressed */) + throw new Error("Compression type not supported: ".concat(compression)); + var imageData = createImageData(psd.width, psd.height); + resetImageData(imageData); + switch (psd.colorMode) { + case 0 /* ColorMode.Bitmap */: { + var bytes = void 0; + if (compression === 0 /* Compression.RawData */) { + bytes = readBytes(reader, Math.ceil(psd.width / 8) * psd.height); + } + else if (compression === 1 /* Compression.RleCompressed */) { + bytes = new Uint8Array(psd.width * psd.height); + readDataRLE(reader, { data: bytes, width: psd.width, height: psd.height }, psd.width, psd.height, 1, [0], options.large); + } + else { + throw new Error("Bitmap compression not supported: ".concat(compression)); + } + decodeBitmap(bytes, imageData.data, psd.width, psd.height); + break; + } + case 3 /* ColorMode.RGB */: + case 1 /* ColorMode.Grayscale */: { + var channels = psd.colorMode === 1 /* ColorMode.Grayscale */ ? [0] : [0, 1, 2]; + if (psd.channels && psd.channels > 3) { + for (var i = 3; i < psd.channels; i++) { + // TODO: store these channels in additional image data + channels.push(i); + } + } + else if (globalAlpha) { + channels.push(3); + } + if (compression === 0 /* Compression.RawData */) { + for (var i = 0; i < channels.length; i++) { + readDataRaw(reader, imageData, psd.width, psd.height, 4, channels[i]); + } + } + else if (compression === 1 /* Compression.RleCompressed */) { + var start = reader.offset; + readDataRLE(reader, imageData, psd.width, psd.height, 4, channels, options.large); + if (RAW_IMAGE_DATA) + psd.imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); + } + if (psd.colorMode === 1 /* ColorMode.Grayscale */) { + setupGrayscale(imageData); + } + break; + } + case 4 /* ColorMode.CMYK */: { + if (psd.channels !== 4) + throw new Error("Invalid channel count"); + var channels = [0, 1, 2, 3]; + if (globalAlpha) + channels.push(4); + if (compression === 0 /* Compression.RawData */) { + throw new Error("Not implemented"); + // TODO: ... + // for (let i = 0; i < channels.length; i++) { + // readDataRaw(reader, imageData, channels[i], psd.width, psd.height); + // } + } + else if (compression === 1 /* Compression.RleCompressed */) { + var cmykImageData = { + width: imageData.width, + height: imageData.height, + data: new Uint8Array(imageData.width * imageData.height * 5), + }; + var start = reader.offset; + readDataRLE(reader, cmykImageData, psd.width, psd.height, 5, channels, options.large); + cmykToRgb(cmykImageData, imageData, true); + if (RAW_IMAGE_DATA) + psd.imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); + } + break; + } + default: throw new Error("Color mode not supported: ".concat(psd.colorMode)); + } + if (options.useImageData) { + psd.imageData = imageData; + } + else { + psd.canvas = createCanvas(psd.width, psd.height); + psd.canvas.getContext('2d').putImageData(imageData, 0, 0); + } +} +function cmykToRgb(cmyk, rgb, reverseAlpha) { + var size = rgb.width * rgb.height * 4; + var srcData = cmyk.data; + var dstData = rgb.data; + for (var src = 0, dst = 0; dst < size; src += 5, dst += 4) { + var c = srcData[src]; + var m = srcData[src + 1]; + var y = srcData[src + 2]; + var k = srcData[src + 3]; + dstData[dst] = ((((c * k) | 0) / 255) | 0); + dstData[dst + 1] = ((((m * k) | 0) / 255) | 0); + dstData[dst + 2] = ((((y * k) | 0) / 255) | 0); + dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; + } + // for (let src = 0, dst = 0; dst < size; src += 5, dst += 4) { + // const c = 1 - (srcData[src + 0] / 255); + // const m = 1 - (srcData[src + 1] / 255); + // const y = 1 - (srcData[src + 2] / 255); + // // const k = srcData[src + 3] / 255; + // dstData[dst + 0] = ((1 - c * 0.8) * 255) | 0; + // dstData[dst + 1] = ((1 - m * 0.8) * 255) | 0; + // dstData[dst + 2] = ((1 - y * 0.8) * 255) | 0; + // dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; + // } +} +function readDataRaw(reader, pixelData, width, height, step, offset) { + var size = width * height; + var buffer = readBytes(reader, size); + if (pixelData && offset < step) { + var data = pixelData.data; + for (var i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { + data[p] = buffer[i]; + } + } +} +export function readDataZipWithoutPrediction(reader, length, pixelData, width, height, step, offset) { + var compressed = readBytes(reader, length); + var decompressed = inflate(compressed); + var size = width * height; + if (pixelData && offset < step) { + var data = pixelData.data; + for (var i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { + data[p] = decompressed[i]; + } + } +} +export function readDataRLE(reader, pixelData, _width, height, step, offsets, large) { + var data = pixelData && pixelData.data; + var lengths; + if (large) { + lengths = new Uint32Array(offsets.length * height); + for (var o = 0, li = 0; o < offsets.length; o++) { + for (var y = 0; y < height; y++, li++) { + lengths[li] = readUint32(reader); + } + } + } + else { + lengths = new Uint16Array(offsets.length * height); + for (var o = 0, li = 0; o < offsets.length; o++) { + for (var y = 0; y < height; y++, li++) { + lengths[li] = readUint16(reader); + } + } + } + var extraLimit = (step - 1) | 0; // 3 for rgb, 4 for cmyk + for (var c = 0, li = 0; c < offsets.length; c++) { + var offset = offsets[c] | 0; + var extra = c > extraLimit || offset > extraLimit; + if (!data || extra) { + for (var y = 0; y < height; y++, li++) { + skipBytes(reader, lengths[li]); + } + } + else { + for (var y = 0, p = offset | 0; y < height; y++, li++) { + var length_1 = lengths[li]; + var buffer = readBytes(reader, length_1); + for (var i = 0; i < length_1; i++) { + var header = buffer[i]; + if (header > 128) { + var value = buffer[++i]; + header = (256 - header) | 0; + for (var j = 0; j <= header; j = (j + 1) | 0) { + data[p] = value; + p = (p + step) | 0; + } + } + else if (header < 128) { + for (var j = 0; j <= header; j = (j + 1) | 0) { + data[p] = buffer[++i]; + p = (p + step) | 0; + } + } + else { + // ignore 128 + } + // This showed up on some images from non-photoshop programs, ignoring it seems to work just fine. + // if (i >= length) throw new Error(`Invalid RLE data: exceeded buffer size ${i}/${length}`); + } + } + } + } +} +export function readSection(reader, round, func, skipEmpty, eightBytes) { + if (skipEmpty === void 0) { skipEmpty = true; } + if (eightBytes === void 0) { eightBytes = false; } + var length = readUint32(reader); + if (eightBytes) { + if (length !== 0) + throw new Error('Sizes larger than 4GB are not supported'); + length = readUint32(reader); + } + if (length <= 0 && skipEmpty) + return undefined; + var end = reader.offset + length; + if (end > reader.view.byteLength) + throw new Error('Section exceeds file size'); + var result = func(function () { return end - reader.offset; }); + if (reader.offset !== end) { + if (reader.offset > end) { + warnOrThrow(reader, 'Exceeded section limits'); + } + else { + warnOrThrow(reader, "Unread section data"); // : ${end - reader.offset} bytes at 0x${reader.offset.toString(16)}`); + } + } + while (end % round) + end++; + reader.offset = end; + return result; +} +export function readColor(reader) { + var colorSpace = readUint16(reader); + switch (colorSpace) { + case 0 /* ColorSpace.RGB */: { + var r = readUint16(reader) / 257; + var g = readUint16(reader) / 257; + var b = readUint16(reader) / 257; + skipBytes(reader, 2); + return { r: r, g: g, b: b }; + } + case 1 /* ColorSpace.HSB */: { + var h = readUint16(reader) / 0xffff; + var s = readUint16(reader) / 0xffff; + var b = readUint16(reader) / 0xffff; + skipBytes(reader, 2); + return { h: h, s: s, b: b }; + } + case 2 /* ColorSpace.CMYK */: { + var c = readUint16(reader) / 257; + var m = readUint16(reader) / 257; + var y = readUint16(reader) / 257; + var k = readUint16(reader) / 257; + return { c: c, m: m, y: y, k: k }; + } + case 7 /* ColorSpace.Lab */: { + var l = readInt16(reader) / 10000; + var ta = readInt16(reader); + var tb = readInt16(reader); + var a = ta < 0 ? (ta / 12800) : (ta / 12700); + var b = tb < 0 ? (tb / 12800) : (tb / 12700); + skipBytes(reader, 2); + return { l: l, a: a, b: b }; + } + case 8 /* ColorSpace.Grayscale */: { + var k = readUint16(reader) * 255 / 10000; + skipBytes(reader, 6); + return { k: k }; + } + default: + throw new Error('Invalid color space'); + } +} +export function readPattern(reader) { + readUint32(reader); // length + var version = readUint32(reader); + if (version !== 1) + throw new Error("Invalid pattern version: ".concat(version)); + var colorMode = readUint32(reader); + var x = readInt16(reader); + var y = readInt16(reader); + // we only support RGB and grayscale for now + if (colorMode !== 3 /* ColorMode.RGB */ && colorMode !== 1 /* ColorMode.Grayscale */ && colorMode !== 2 /* ColorMode.Indexed */) { + throw new Error("Unsupported pattern color mode: ".concat(colorMode)); + } + var name = readUnicodeString(reader); + var id = readPascalString(reader, 1); + var palette = []; + if (colorMode === 2 /* ColorMode.Indexed */) { + for (var i = 0; i < 256; i++) { + palette.push({ + r: readUint8(reader), + g: readUint8(reader), + b: readUint8(reader), + }); + } + skipBytes(reader, 4); // no idea what this is + } + // virtual memory array list + var version2 = readUint32(reader); + if (version2 !== 3) + throw new Error("Invalid pattern VMAL version: ".concat(version2)); + readUint32(reader); // length + var top = readUint32(reader); + var left = readUint32(reader); + var bottom = readUint32(reader); + var right = readUint32(reader); + var channelsCount = readUint32(reader); + var width = right - left; + var height = bottom - top; + var data = new Uint8Array(width * height * 4); + for (var i = 3; i < data.byteLength; i += 4) { + data[i] = 255; + } + for (var i = 0, ch = 0; i < (channelsCount + 2); i++) { + var has = readUint32(reader); + if (!has) + continue; + var length_2 = readUint32(reader); + var pixelDepth = readUint32(reader); + var ctop = readUint32(reader); + var cleft = readUint32(reader); + var cbottom = readUint32(reader); + var cright = readUint32(reader); + var pixelDepth2 = readUint16(reader); + var compressionMode = readUint8(reader); // 0 - raw, 1 - zip + var dataLength = length_2 - (4 + 16 + 2 + 1); + var cdata = readBytes(reader, dataLength); + if (pixelDepth !== 8 || pixelDepth2 !== 8) { + throw new Error('16bit pixel depth not supported for patterns'); + } + var w = cright - cleft; + var h = cbottom - ctop; + var ox = cleft - left; + var oy = ctop - top; + if (compressionMode === 0) { + if (colorMode === 3 /* ColorMode.RGB */ && ch < 3) { + for (var y_1 = 0; y_1 < h; y_1++) { + for (var x_1 = 0; x_1 < w; x_1++) { + var src = x_1 + y_1 * w; + var dst = (ox + x_1 + (y_1 + oy) * width) * 4; + data[dst + ch] = cdata[src]; + } + } + } + if (colorMode === 1 /* ColorMode.Grayscale */ && ch < 1) { + for (var y_2 = 0; y_2 < h; y_2++) { + for (var x_2 = 0; x_2 < w; x_2++) { + var src = x_2 + y_2 * w; + var dst = (ox + x_2 + (y_2 + oy) * width) * 4; + var value = cdata[src]; + data[dst + 0] = value; + data[dst + 1] = value; + data[dst + 2] = value; + } + } + } + if (colorMode === 2 /* ColorMode.Indexed */) { + // TODO: + throw new Error('Indexed pattern color mode not implemented'); + } + } + else if (compressionMode === 1) { + // console.log({ colorMode }); + // require('fs').writeFileSync('zip.bin', Buffer.from(cdata)); + // const data = require('zlib').inflateRawSync(cdata); + // const data = require('zlib').unzipSync(cdata); + // console.log(data); + // throw new Error('Zip compression not supported for pattern'); + // throw new Error('Unsupported pattern compression'); + console.error('Unsupported pattern compression'); + name += ' (failed to decode)'; + } + else { + throw new Error('Invalid pattern compression mode'); + } + ch++; + } + // TODO: use canvas instead of data ? + return { id: id, name: name, x: x, y: y, bounds: { x: left, y: top, w: width, h: height }, data: data }; +} + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBzZFJlYWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFLL0IsT0FBTyxFQUNOLGNBQWMsRUFBRSxnQkFBZ0IsRUFBRSxZQUFZLEVBQWEsWUFBWSxFQUFFLGVBQWUsRUFDeEYsV0FBVyxFQUFrRSxjQUFjLEVBQUUsdUJBQXVCLEVBQ3BILE1BQU0sV0FBVyxDQUFDO0FBQ25CLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUNuRCxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQVd2RCxNQUFNLENBQUMsSUFBTSxtQkFBbUIsR0FBRyw4RUFBc0QsQ0FBQztBQUMxRixJQUFNLFVBQVUsR0FBRyxDQUFDLFFBQVEsRUFBRSxXQUFXLEVBQUUsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsY0FBYyxFQUFFLFNBQVMsRUFBRSxLQUFLLENBQUMsQ0FBQztBQUV2RyxTQUFTL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B1c2UgY2FudmFzIGluc3RlYWQgb2YgZGF0YSA/XG5cblx0cmV0dXJuIHsgaWQsIG5hbWUsIHgsIHksIGJvdW5kczogeyB4OiBsZWZ0LCB5OiB0b3AsIHc6IHdpZHRoLCBoOiBoZWlnaHQgfSwgZGF0YSB9O1xufVxuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdReader.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdReader.js.map deleted file mode 100644 index 7d900ab..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdReader.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"psdReader.js","sourceRoot":"../src/","sources":["psdReader.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAK/B,OAAO,EACN,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAa,YAAY,EAAE,eAAe,EACxF,WAAW,EAAkE,cAAc,EAAE,uBAAuB,EACpH,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,MAAM,CAAC,IAAM,mBAAmB,GAAG,8EAAsD,CAAC;AAC1F,IAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;AAEvG,SAAS,cAAc,CAAC,IAAe;IACtC,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAE1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE;QACjC,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EAAE,CAAC,GAAA,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,MAAA,EAAE,CAAC;AACnF,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdWriter.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdWriter.d.ts index 4ceb7b7..86320cb 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdWriter.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdWriter.d.ts @@ -1,27 +1,27 @@ -import { Psd, WriteOptions, Color } from './psd'; -export interface PsdWriter { - offset: number; - buffer: ArrayBuffer; - view: DataView; -} -export declare function createWriter(size?: number): PsdWriter; -export declare function getWriterBuffer(writer: PsdWriter): ArrayBuffer; -export declare function getWriterBufferNoCopy(writer: PsdWriter): Uint8Array; -export declare function writeUint8(writer: PsdWriter, value: number): void; -export declare function writeInt16(writer: PsdWriter, value: number): void; -export declare function writeUint16(writer: PsdWriter, value: number): void; -export declare function writeInt32(writer: PsdWriter, value: number): void; -export declare function writeUint32(writer: PsdWriter, value: number): void; -export declare function writeFloat32(writer: PsdWriter, value: number): void; -export declare function writeFloat64(writer: PsdWriter, value: number): void; -export declare function writeFixedPoint32(writer: PsdWriter, value: number): void; -export declare function writeFixedPointPath32(writer: PsdWriter, value: number): void; -export declare function writeBytes(writer: PsdWriter, buffer: Uint8Array | undefined): void; -export declare function writeZeros(writer: PsdWriter, count: number): void; -export declare function writeSignature(writer: PsdWriter, signature: string): void; -export declare function writePascalString(writer: PsdWriter, text: string, padTo: number): void; -export declare function writeUnicodeString(writer: PsdWriter, text: string): void; -export declare function writeUnicodeStringWithPadding(writer: PsdWriter, text: string): void; -export declare function writeSection(writer: PsdWriter, round: number, func: () => void, writeTotalLength?: boolean, large?: boolean): void; -export declare function writePsd(writer: PsdWriter, psd: Psd, options?: WriteOptions): void; -export declare function writeColor(writer: PsdWriter, color: Color | undefined): void; +import { Psd, WriteOptions, Color } from './psd'; +export interface PsdWriter { + offset: number; + buffer: ArrayBuffer; + view: DataView; +} +export declare function createWriter(size?: number): PsdWriter; +export declare function getWriterBuffer(writer: PsdWriter): ArrayBuffer; +export declare function getWriterBufferNoCopy(writer: PsdWriter): Uint8Array; +export declare function writeUint8(writer: PsdWriter, value: number): void; +export declare function writeInt16(writer: PsdWriter, value: number): void; +export declare function writeUint16(writer: PsdWriter, value: number): void; +export declare function writeInt32(writer: PsdWriter, value: number): void; +export declare function writeUint32(writer: PsdWriter, value: number): void; +export declare function writeFloat32(writer: PsdWriter, value: number): void; +export declare function writeFloat64(writer: PsdWriter, value: number): void; +export declare function writeFixedPoint32(writer: PsdWriter, value: number): void; +export declare function writeFixedPointPath32(writer: PsdWriter, value: number): void; +export declare function writeBytes(writer: PsdWriter, buffer: Uint8Array | undefined): void; +export declare function writeZeros(writer: PsdWriter, count: number): void; +export declare function writeSignature(writer: PsdWriter, signature: string): void; +export declare function writePascalString(writer: PsdWriter, text: string, padTo: number): void; +export declare function writeUnicodeString(writer: PsdWriter, text: string): void; +export declare function writeUnicodeStringWithPadding(writer: PsdWriter, text: string): void; +export declare function writeSection(writer: PsdWriter, round: number, func: () => void, writeTotalLength?: boolean, large?: boolean): void; +export declare function writePsd(writer: PsdWriter, psd: Psd, options?: WriteOptions): void; +export declare function writeColor(writer: PsdWriter, color: Color | undefined): void; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdWriter.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdWriter.js index c10af47..9577645 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdWriter.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdWriter.js @@ -1,692 +1,666 @@ -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -import { hasAlpha, createCanvas, writeDataRLE, offsetForChannel, createImageData, fromBlendMode, clamp, largeAdditionalInfoKeys, RAW_IMAGE_DATA, writeDataZipWithoutPrediction } from './helpers'; -import { hasMultiEffects, infoHandlers } from './additionalInfo'; -import { resourceHandlers } from './imageResources'; -export function createWriter(size) { - if (size === void 0) { size = 4096; } - var buffer = new ArrayBuffer(size); - var view = new DataView(buffer); - var offset = 0; - return { buffer: buffer, view: view, offset: offset }; -} -export function getWriterBuffer(writer) { - return writer.buffer.slice(0, writer.offset); -} -export function getWriterBufferNoCopy(writer) { - return new Uint8Array(writer.buffer, 0, writer.offset); -} -export function writeUint8(writer, value) { - var offset = addSize(writer, 1); - writer.view.setUint8(offset, value); -} -export function writeInt16(writer, value) { - var offset = addSize(writer, 2); - writer.view.setInt16(offset, value, false); -} -export function writeUint16(writer, value) { - var offset = addSize(writer, 2); - writer.view.setUint16(offset, value, false); -} -export function writeInt32(writer, value) { - var offset = addSize(writer, 4); - writer.view.setInt32(offset, value, false); -} -export function writeUint32(writer, value) { - var offset = addSize(writer, 4); - writer.view.setUint32(offset, value, false); -} -export function writeFloat32(writer, value) { - var offset = addSize(writer, 4); - writer.view.setFloat32(offset, value, false); -} -export function writeFloat64(writer, value) { - var offset = addSize(writer, 8); - writer.view.setFloat64(offset, value, false); -} -// 32-bit fixed-point number 16.16 -export function writeFixedPoint32(writer, value) { - writeInt32(writer, value * (1 << 16)); -} -// 32-bit fixed-point number 8.24 -export function writeFixedPointPath32(writer, value) { - writeInt32(writer, value * (1 << 24)); -} -export function writeBytes(writer, buffer) { - if (buffer) { - ensureSize(writer, writer.offset + buffer.length); - var bytes = new Uint8Array(writer.buffer); - bytes.set(buffer, writer.offset); - writer.offset += buffer.length; - } -} -export function writeZeros(writer, count) { - for (var i = 0; i < count; i++) { - writeUint8(writer, 0); - } -} -export function writeSignature(writer, signature) { - if (signature.length !== 4) - throw new Error("Invalid signature: '".concat(signature, "'")); - for (var i = 0; i < 4; i++) { - writeUint8(writer, signature.charCodeAt(i)); - } -} -export function writePascalString(writer, text, padTo) { - var length = text.length; - writeUint8(writer, length); - for (var i = 0; i < length; i++) { - var code = text.charCodeAt(i); - writeUint8(writer, code < 128 ? code : '?'.charCodeAt(0)); - } - while (++length % padTo) { - writeUint8(writer, 0); - } -} -export function writeUnicodeString(writer, text) { - writeUint32(writer, text.length); - for (var i = 0; i < text.length; i++) { - writeUint16(writer, text.charCodeAt(i)); - } -} -export function writeUnicodeStringWithPadding(writer, text) { - writeUint32(writer, text.length + 1); - for (var i = 0; i < text.length; i++) { - writeUint16(writer, text.charCodeAt(i)); - } - writeUint16(writer, 0); -} -function getLargestLayerSize(layers) { - if (layers === void 0) { layers = []; } - var max = 0; - for (var _i = 0, layers_1 = layers; _i < layers_1.length; _i++) { - var layer = layers_1[_i]; - if (layer.canvas || layer.imageData) { - var _a = getLayerDimentions(layer), width = _a.width, height = _a.height; - max = Math.max(max, 2 * height + 2 * width * height); - } - if (layer.children) { - max = Math.max(max, getLargestLayerSize(layer.children)); - } - } - return max; -} -export function writeSection(writer, round, func, writeTotalLength, large) { - if (writeTotalLength === void 0) { writeTotalLength = false; } - if (large === void 0) { large = false; } - if (large) - writeUint32(writer, 0); - var offset = writer.offset; - writeUint32(writer, 0); - func(); - var length = writer.offset - offset - 4; - var len = length; - while ((len % round) !== 0) { - writeUint8(writer, 0); - len++; - } - if (writeTotalLength) { - length = len; - } - writer.view.setUint32(offset, length, false); -} -export function writePsd(writer, psd, options) { - if (options === void 0) { options = {}; } - if (!(+psd.width > 0 && +psd.height > 0)) - throw new Error('Invalid document size'); - if ((psd.width > 30000 || psd.height > 30000) && !options.psb) - throw new Error('Document size is too large (max is 30000x30000, use PSB format instead)'); - var imageResources = psd.imageResources || {}; - var opt = __assign(__assign({}, options), { layerIds: new Set(), layerToId: new Map() }); - if (opt.generateThumbnail) { - imageResources = __assign(__assign({}, imageResources), { thumbnail: createThumbnail(psd) }); - } - var imageData = psd.imageData; - if (!imageData && psd.canvas) { - imageData = psd.canvas.getContext('2d').getImageData(0, 0, psd.canvas.width, psd.canvas.height); - } - if (imageData && (psd.width !== imageData.width || psd.height !== imageData.height)) - throw new Error('Document canvas must have the same size as document'); - var globalAlpha = !!imageData && hasAlpha(imageData); - var maxBufferSize = Math.max(getLargestLayerSize(psd.children), 4 * 2 * psd.width * psd.height + 2 * psd.height); - var tempBuffer = new Uint8Array(maxBufferSize); - // header - writeSignature(writer, '8BPS'); - writeUint16(writer, options.psb ? 2 : 1); // version - writeZeros(writer, 6); - writeUint16(writer, globalAlpha ? 4 : 3); // channels - writeUint32(writer, psd.height); - writeUint32(writer, psd.width); - writeUint16(writer, 8); // bits per channel - writeUint16(writer, 3 /* ColorMode.RGB */); // we only support saving RGB right now - // color mode data - writeSection(writer, 1, function () { - // TODO: implement - }); - // image resources - writeSection(writer, 1, function () { - var _loop_1 = function (handler) { - var has = handler.has(imageResources); - var count = has === false ? 0 : (has === true ? 1 : has); - var _loop_2 = function (i) { - writeSignature(writer, '8BIM'); - writeUint16(writer, handler.key); - writePascalString(writer, '', 2); - writeSection(writer, 2, function () { return handler.write(writer, imageResources, i); }); - }; - for (var i = 0; i < count; i++) { - _loop_2(i); - } - }; - for (var _i = 0, resourceHandlers_1 = resourceHandlers; _i < resourceHandlers_1.length; _i++) { - var handler = resourceHandlers_1[_i]; - _loop_1(handler); - } - }); - // layer and mask info - writeSection(writer, 2, function () { - writeLayerInfo(tempBuffer, writer, psd, globalAlpha, opt); - writeGlobalLayerMaskInfo(writer, psd.globalLayerMaskInfo); - writeAdditionalLayerInfo(writer, psd, psd, opt); - }, undefined, !!opt.psb); - // image data - var channels = globalAlpha ? [0, 1, 2, 3] : [0, 1, 2]; - var width = imageData ? imageData.width : psd.width; - var height = imageData ? imageData.height : psd.height; - var data = { data: new Uint8Array(width * height * 4), width: width, height: height }; - writeUint16(writer, 1 /* Compression.RleCompressed */); // Photoshop doesn't support zip compression of composite image data - if (RAW_IMAGE_DATA && psd.imageDataRaw) { - console.log('writing raw image data'); - writeBytes(writer, psd.imageDataRaw); - } - else { - if (imageData) - data.data.set(new Uint8Array(imageData.data.buffer, imageData.data.byteOffset, imageData.data.byteLength)); - // add weird white matte - if (globalAlpha) { - var size = data.width * data.height * 4; - var p = data.data; - for (var i = 0; i < size; i += 4) { - var pa = p[i + 3]; - if (pa != 0 && pa != 255) { - var a = pa / 255; - var ra = 255 * (1 - a); - p[i + 0] = p[i + 0] * a + ra; - p[i + 1] = p[i + 1] * a + ra; - p[i + 2] = p[i + 2] * a + ra; - } - } - } - writeBytes(writer, writeDataRLE(tempBuffer, data, channels, !!options.psb)); - } -} -function writeLayerInfo(tempBuffer, writer, psd, globalAlpha, options) { - writeSection(writer, 4, function () { - var _a; - var layers = []; - addChildren(layers, psd.children); - if (!layers.length) - layers.push({}); - writeInt16(writer, globalAlpha ? -layers.length : layers.length); - var layersData = layers.map(function (l, i) { return getChannels(tempBuffer, l, i === 0, options); }); - var _loop_3 = function (layerData) { - var layer = layerData.layer, top_1 = layerData.top, left = layerData.left, bottom = layerData.bottom, right = layerData.right, channels = layerData.channels; - writeInt32(writer, top_1); - writeInt32(writer, left); - writeInt32(writer, bottom); - writeInt32(writer, right); - writeUint16(writer, channels.length); - for (var _e = 0, channels_1 = channels; _e < channels_1.length; _e++) { - var c = channels_1[_e]; - writeInt16(writer, c.channelId); - if (options.psb) - writeUint32(writer, 0); - writeUint32(writer, c.length); - } - writeSignature(writer, '8BIM'); - writeSignature(writer, fromBlendMode[layer.blendMode] || 'norm'); - writeUint8(writer, Math.round(clamp((_a = layer.opacity) !== null && _a !== void 0 ? _a : 1, 0, 1) * 255)); - writeUint8(writer, layer.clipping ? 1 : 0); - var flags = 0x08; // 1 for Photoshop 5.0 and later, tells if bit 4 has useful information - if (layer.transparencyProtected) - flags |= 0x01; - if (layer.hidden) - flags |= 0x02; - if (layer.vectorMask || (layer.sectionDivider && layer.sectionDivider.type !== 0 /* SectionDividerType.Other */)) { - flags |= 0x10; // pixel data irrelevant to appearance of document - } - if (layer.effects && hasMultiEffects(layer.effects)) { // TODO: this is not correct - flags |= 0x20; // just guessing this one, might be completely incorrect - } - // if ('_2' in layer) flags |= 0x20; // TEMP!!! - writeUint8(writer, flags); - writeUint8(writer, 0); // filler - writeSection(writer, 1, function () { - writeLayerMaskData(writer, layer, layerData); - writeLayerBlendingRanges(writer, psd); - writePascalString(writer, layer.name || '', 4); - writeAdditionalLayerInfo(writer, layer, psd, options); - }); - }; - // layer records - for (var _i = 0, layersData_1 = layersData; _i < layersData_1.length; _i++) { - var layerData = layersData_1[_i]; - _loop_3(layerData); - } - // layer channel image data - for (var _b = 0, layersData_2 = layersData; _b < layersData_2.length; _b++) { - var layerData = layersData_2[_b]; - for (var _c = 0, _d = layerData.channels; _c < _d.length; _c++) { - var channel = _d[_c]; - writeUint16(writer, channel.compression); - if (channel.buffer) { - writeBytes(writer, channel.buffer); - } - } - } - }, true, options.psb); -} -function writeLayerMaskData(writer, _a, layerData) { - var mask = _a.mask; - writeSection(writer, 1, function () { - if (!mask) - return; - var m = layerData.mask || {}; - writeInt32(writer, m.top); - writeInt32(writer, m.left); - writeInt32(writer, m.bottom); - writeInt32(writer, m.right); - writeUint8(writer, mask.defaultColor); - var params = 0; - if (mask.userMaskDensity !== undefined) - params |= 1 /* MaskParams.UserMaskDensity */; - if (mask.userMaskFeather !== undefined) - params |= 2 /* MaskParams.UserMaskFeather */; - if (mask.vectorMaskDensity !== undefined) - params |= 4 /* MaskParams.VectorMaskDensity */; - if (mask.vectorMaskFeather !== undefined) - params |= 8 /* MaskParams.VectorMaskFeather */; - var flags = 0; - if (mask.disabled) - flags |= 2 /* LayerMaskFlags.LayerMaskDisabled */; - if (mask.positionRelativeToLayer) - flags |= 1 /* LayerMaskFlags.PositionRelativeToLayer */; - if (mask.fromVectorData) - flags |= 8 /* LayerMaskFlags.LayerMaskFromRenderingOtherData */; - if (params) - flags |= 16 /* LayerMaskFlags.MaskHasParametersAppliedToIt */; - writeUint8(writer, flags); - if (params) { - writeUint8(writer, params); - if (mask.userMaskDensity !== undefined) - writeUint8(writer, Math.round(mask.userMaskDensity * 0xff)); - if (mask.userMaskFeather !== undefined) - writeFloat64(writer, mask.userMaskFeather); - if (mask.vectorMaskDensity !== undefined) - writeUint8(writer, Math.round(mask.vectorMaskDensity * 0xff)); - if (mask.vectorMaskFeather !== undefined) - writeFloat64(writer, mask.vectorMaskFeather); - } - // TODO: handle rest of the fields - writeZeros(writer, 2); - }); -} -function writeLayerBlendingRanges(writer, psd) { - writeSection(writer, 1, function () { - writeUint32(writer, 65535); - writeUint32(writer, 65535); - var channels = psd.channels || 0; // TODO: use always 4 instead ? - // channels = 4; // TESTING - for (var i = 0; i < channels; i++) { - writeUint32(writer, 65535); - writeUint32(writer, 65535); - } - }); -} -function writeGlobalLayerMaskInfo(writer, info) { - writeSection(writer, 1, function () { - if (info) { - writeUint16(writer, info.overlayColorSpace); - writeUint16(writer, info.colorSpace1); - writeUint16(writer, info.colorSpace2); - writeUint16(writer, info.colorSpace3); - writeUint16(writer, info.colorSpace4); - writeUint16(writer, info.opacity * 0xff); - writeUint8(writer, info.kind); - writeZeros(writer, 3); - } - }); -} -function writeAdditionalLayerInfo(writer, target, psd, options) { - var _loop_4 = function (handler) { - var key = handler.key; - if (key === 'Txt2' && options.invalidateTextLayers) - return "continue"; - if (key === 'vmsk' && options.psb) - key = 'vsms'; - if (handler.has(target)) { - var large = options.psb && largeAdditionalInfoKeys.indexOf(key) !== -1; - writeSignature(writer, large ? '8B64' : '8BIM'); - writeSignature(writer, key); - var fourBytes = key === 'Txt2' || key === 'luni' || key === 'vmsk' || key === 'artb' || key === 'artd' || - key === 'vogk' || key === 'SoLd' || key === 'lnk2' || key === 'vscg' || key === 'vsms' || key === 'GdFl' || - key === 'lmfx' || key === 'lrFX' || key === 'cinf' || key === 'PlLd' || key === 'Anno'; - writeSection(writer, fourBytes ? 4 : 2, function () { - handler.write(writer, target, psd, options); - }, key !== 'Txt2' && key !== 'cinf' && key !== 'extn', large); - } - }; - for (var _i = 0, infoHandlers_1 = infoHandlers; _i < infoHandlers_1.length; _i++) { - var handler = infoHandlers_1[_i]; - _loop_4(handler); - } -} -function addChildren(layers, children) { - if (!children) - return; - for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { - var c = children_1[_i]; - if (c.children && c.canvas) - throw new Error("Invalid layer, cannot have both 'canvas' and 'children' properties"); - if (c.children && c.imageData) - throw new Error("Invalid layer, cannot have both 'imageData' and 'children' properties"); - if (c.children) { - layers.push({ - name: '', - sectionDivider: { - type: 3 /* SectionDividerType.BoundingSectionDivider */, - }, - // TESTING - // nameSource: 'lset', - // id: [4, 0, 0, 8, 11, 0, 0, 0, 0, 14][layers.length] || 0, - // layerColor: 'none', - // timestamp: [1611346817.349021, 0, 0, 1611346817.349175, 1611346817.3491833, 0, 0, 0, 0, 1611346817.349832][layers.length] || 0, - // protected: {}, - // referencePoint: { x: 0, y: 0 }, - }); - addChildren(layers, c.children); - layers.push(__assign({ sectionDivider: { - type: c.opened === false ? 2 /* SectionDividerType.ClosedFolder */ : 1 /* SectionDividerType.OpenFolder */, - key: fromBlendMode[c.blendMode] || 'pass', - subType: 0, - } }, c)); - } - else { - layers.push(__assign({}, c)); - } - } -} -function resizeBuffer(writer, size) { - var newLength = writer.buffer.byteLength; - do { - newLength *= 2; - } while (size > newLength); - var newBuffer = new ArrayBuffer(newLength); - var newBytes = new Uint8Array(newBuffer); - var oldBytes = new Uint8Array(writer.buffer); - newBytes.set(oldBytes); - writer.buffer = newBuffer; - writer.view = new DataView(writer.buffer); -} -function ensureSize(writer, size) { - if (size > writer.buffer.byteLength) { - resizeBuffer(writer, size); - } -} -function addSize(writer, size) { - var offset = writer.offset; - ensureSize(writer, writer.offset += size); - return offset; -} -function createThumbnail(psd) { - var canvas = createCanvas(10, 10); - var scale = 1; - if (psd.width > psd.height) { - canvas.width = 160; - canvas.height = Math.floor(psd.height * (canvas.width / psd.width)); - scale = canvas.width / psd.width; - } - else { - canvas.height = 160; - canvas.width = Math.floor(psd.width * (canvas.height / psd.height)); - scale = canvas.height / psd.height; - } - var context = canvas.getContext('2d'); - context.scale(scale, scale); - if (psd.imageData) { - var temp = createCanvas(psd.imageData.width, psd.imageData.height); - temp.getContext('2d').putImageData(psd.imageData, 0, 0); - context.drawImage(temp, 0, 0); - } - else if (psd.canvas) { - context.drawImage(psd.canvas, 0, 0); - } - return canvas; -} -function getChannels(tempBuffer, layer, background, options) { - var layerData = getLayerChannels(tempBuffer, layer, background, options); - var mask = layer.mask; - if (mask) { - var top_2 = mask.top | 0; - var left = mask.left | 0; - var right = mask.right | 0; - var bottom = mask.bottom | 0; - var _a = getLayerDimentions(mask), width = _a.width, height = _a.height; - var imageData = mask.imageData; - if (!imageData && mask.canvas && width && height) { - imageData = mask.canvas.getContext('2d').getImageData(0, 0, width, height); - } - if (width && height && imageData) { - right = left + width; - bottom = top_2 + height; - if (imageData.width !== width || imageData.height !== height) { - throw new Error('Invalid imageData dimentions'); - } - var buffer = void 0; - var compression = void 0; - if (RAW_IMAGE_DATA && layer.maskDataRaw) { - // console.log('written raw layer image data'); - buffer = layer.maskDataRaw; - compression = 1 /* Compression.RleCompressed */; - } - else if (options.compress) { - buffer = writeDataZipWithoutPrediction(imageData, [0]); - compression = 2 /* Compression.ZipWithoutPrediction */; - } - else { - buffer = writeDataRLE(tempBuffer, imageData, [0], !!options.psb); - compression = 1 /* Compression.RleCompressed */; - } - layerData.mask = { top: top_2, left: left, right: right, bottom: bottom }; - layerData.channels.push({ channelId: -2 /* ChannelID.UserMask */, compression: compression, buffer: buffer, length: 2 + buffer.length }); - } - else { - layerData.mask = { top: 0, left: 0, right: 0, bottom: 0 }; - layerData.channels.push({ channelId: -2 /* ChannelID.UserMask */, compression: 0 /* Compression.RawData */, buffer: new Uint8Array(0), length: 0 }); - } - } - return layerData; -} -function getLayerDimentions(_a) { - var canvas = _a.canvas, imageData = _a.imageData; - return imageData || canvas || { width: 0, height: 0 }; -} -function cropImageData(data, left, top, width, height) { - var croppedData = createImageData(width, height); - var srcData = data.data; - var dstData = croppedData.data; - for (var y = 0; y < height; y++) { - for (var x = 0; x < width; x++) { - var src = ((x + left) + (y + top) * width) * 4; - var dst = (x + y * width) * 4; - dstData[dst] = srcData[src]; - dstData[dst + 1] = srcData[src + 1]; - dstData[dst + 2] = srcData[src + 2]; - dstData[dst + 3] = srcData[src + 3]; - } - } - return croppedData; -} -function getLayerChannels(tempBuffer, layer, background, options) { - var _a; - var top = layer.top | 0; - var left = layer.left | 0; - var right = layer.right | 0; - var bottom = layer.bottom | 0; - var channels = [ - { channelId: -1 /* ChannelID.Transparency */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, - { channelId: 0 /* ChannelID.Color0 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, - { channelId: 1 /* ChannelID.Color1 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, - { channelId: 2 /* ChannelID.Color2 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, - ]; - var _b = getLayerDimentions(layer), width = _b.width, height = _b.height; - if (!(layer.canvas || layer.imageData) || !width || !height) { - right = left; - bottom = top; - return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; - } - right = left + width; - bottom = top + height; - var data = layer.imageData || layer.canvas.getContext('2d').getImageData(0, 0, width, height); - if (options.trimImageData) { - var trimmed = trimData(data); - if (trimmed.left !== 0 || trimmed.top !== 0 || trimmed.right !== data.width || trimmed.bottom !== data.height) { - left += trimmed.left; - top += trimmed.top; - right -= (data.width - trimmed.right); - bottom -= (data.height - trimmed.bottom); - width = right - left; - height = bottom - top; - if (!width || !height) { - return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; - } - if (layer.imageData) { - data = cropImageData(data, trimmed.left, trimmed.top, width, height); - } - else { - data = layer.canvas.getContext('2d').getImageData(trimmed.left, trimmed.top, width, height); - } - } - } - var channelIds = [ - 0 /* ChannelID.Color0 */, - 1 /* ChannelID.Color1 */, - 2 /* ChannelID.Color2 */, - ]; - if (!background || options.noBackground || layer.mask || hasAlpha(data) || (RAW_IMAGE_DATA && ((_a = layer.imageDataRaw) === null || _a === void 0 ? void 0 : _a['-1']))) { - channelIds.unshift(-1 /* ChannelID.Transparency */); - } - channels = channelIds.map(function (channelId) { - var offset = offsetForChannel(channelId, false); // TODO: psd.colorMode === ColorMode.CMYK); - var buffer; - var compression; - if (RAW_IMAGE_DATA && layer.imageDataRaw) { - // console.log('written raw layer image data'); - buffer = layer.imageDataRaw[channelId]; - compression = 1 /* Compression.RleCompressed */; - } - else if (options.compress) { - buffer = writeDataZipWithoutPrediction(data, [offset]); - compression = 2 /* Compression.ZipWithoutPrediction */; - } - else { - buffer = writeDataRLE(tempBuffer, data, [offset], !!options.psb); - compression = 1 /* Compression.RleCompressed */; - } - return { channelId: channelId, compression: compression, buffer: buffer, length: 2 + buffer.length }; - }); - return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; -} -function isRowEmpty(_a, y, left, right) { - var data = _a.data, width = _a.width; - var start = ((y * width + left) * 4 + 3) | 0; - var end = (start + (right - left) * 4) | 0; - for (var i = start; i < end; i = (i + 4) | 0) { - if (data[i] !== 0) { - return false; - } - } - return true; -} -function isColEmpty(_a, x, top, bottom) { - var data = _a.data, width = _a.width; - var stride = (width * 4) | 0; - var start = (top * stride + x * 4 + 3) | 0; - for (var y = top, i = start; y < bottom; y++, i = (i + stride) | 0) { - if (data[i] !== 0) { - return false; - } - } - return true; -} -function trimData(data) { - var top = 0; - var left = 0; - var right = data.width; - var bottom = data.height; - while (top < bottom && isRowEmpty(data, top, left, right)) - top++; - while (bottom > top && isRowEmpty(data, bottom - 1, left, right)) - bottom--; - while (left < right && isColEmpty(data, left, top, bottom)) - left++; - while (right > left && isColEmpty(data, right - 1, top, bottom)) - right--; - return { top: top, left: left, right: right, bottom: bottom }; -} -export function writeColor(writer, color) { - if (!color) { - writeUint16(writer, 0 /* ColorSpace.RGB */); - writeZeros(writer, 8); - } - else if ('r' in color) { - writeUint16(writer, 0 /* ColorSpace.RGB */); - writeUint16(writer, Math.round(color.r * 257)); - writeUint16(writer, Math.round(color.g * 257)); - writeUint16(writer, Math.round(color.b * 257)); - writeUint16(writer, 0); - } - else if ('fr' in color) { - writeUint16(writer, 0 /* ColorSpace.RGB */); - writeUint16(writer, Math.round(color.fr * 255 * 257)); - writeUint16(writer, Math.round(color.fg * 255 * 257)); - writeUint16(writer, Math.round(color.fb * 255 * 257)); - writeUint16(writer, 0); - } - else if ('l' in color) { - writeUint16(writer, 7 /* ColorSpace.Lab */); - writeInt16(writer, Math.round(color.l * 10000)); - writeInt16(writer, Math.round(color.a < 0 ? (color.a * 12800) : (color.a * 12700))); - writeInt16(writer, Math.round(color.b < 0 ? (color.b * 12800) : (color.b * 12700))); - writeUint16(writer, 0); - } - else if ('h' in color) { - writeUint16(writer, 1 /* ColorSpace.HSB */); - writeUint16(writer, Math.round(color.h * 0xffff)); - writeUint16(writer, Math.round(color.s * 0xffff)); - writeUint16(writer, Math.round(color.b * 0xffff)); - writeUint16(writer, 0); - } - else if ('c' in color) { - writeUint16(writer, 2 /* ColorSpace.CMYK */); - writeUint16(writer, Math.round(color.c * 257)); - writeUint16(writer, Math.round(color.m * 257)); - writeUint16(writer, Math.round(color.y * 257)); - writeUint16(writer, Math.round(color.k * 257)); - } - else { - writeUint16(writer, 8 /* ColorSpace.Grayscale */); - writeUint16(writer, Math.round(color.k * 10000 / 255)); - writeZeros(writer, 6); - } -} -//# sourceMappingURL=psdWriter.js.map \ No newline at end of file +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +import { hasAlpha, createCanvas, writeDataRLE, offsetForChannel, createImageData, fromBlendMode, clamp, largeAdditionalInfoKeys, RAW_IMAGE_DATA, writeDataZipWithoutPrediction } from './helpers'; +import { hasMultiEffects, infoHandlers } from './additionalInfo'; +import { resourceHandlers } from './imageResources'; +export function createWriter(size) { + if (size === void 0) { size = 4096; } + var buffer = new ArrayBuffer(size); + var view = new DataView(buffer); + var offset = 0; + return { buffer: buffer, view: view, offset: offset }; +} +export function getWriterBuffer(writer) { + return writer.buffer.slice(0, writer.offset); +} +export function getWriterBufferNoCopy(writer) { + return new Uint8Array(writer.buffer, 0, writer.offset); +} +export function writeUint8(writer, value) { + var offset = addSize(writer, 1); + writer.view.setUint8(offset, value); +} +export function writeInt16(writer, value) { + var offset = addSize(writer, 2); + writer.view.setInt16(offset, value, false); +} +export function writeUint16(writer, value) { + var offset = addSize(writer, 2); + writer.view.setUint16(offset, value, false); +} +export function writeInt32(writer, value) { + var offset = addSize(writer, 4); + writer.view.setInt32(offset, value, false); +} +export function writeUint32(writer, value) { + var offset = addSize(writer, 4); + writer.view.setUint32(offset, value, false); +} +export function writeFloat32(writer, value) { + var offset = addSize(writer, 4); + writer.view.setFloat32(offset, value, false); +} +export function writeFloat64(writer, value) { + var offset = addSize(writer, 8); + writer.view.setFloat64(offset, value, false); +} +// 32-bit fixed-point number 16.16 +export function writeFixedPoint32(writer, value) { + writeInt32(writer, value * (1 << 16)); +} +// 32-bit fixed-point number 8.24 +export function writeFixedPointPath32(writer, value) { + writeInt32(writer, value * (1 << 24)); +} +export function writeBytes(writer, buffer) { + if (buffer) { + ensureSize(writer, writer.offset + buffer.length); + var bytes = new Uint8Array(writer.buffer); + bytes.set(buffer, writer.offset); + writer.offset += buffer.length; + } +} +export function writeZeros(writer, count) { + for (var i = 0; i < count; i++) { + writeUint8(writer, 0); + } +} +export function writeSignature(writer, signature) { + if (signature.length !== 4) + throw new Error("Invalid signature: '".concat(signature, "'")); + for (var i = 0; i < 4; i++) { + writeUint8(writer, signature.charCodeAt(i)); + } +} +export function writePascalString(writer, text, padTo) { + var length = text.length; + writeUint8(writer, length); + for (var i = 0; i < length; i++) { + var code = text.charCodeAt(i); + writeUint8(writer, code < 128 ? code : '?'.charCodeAt(0)); + } + while (++length % padTo) { + writeUint8(writer, 0); + } +} +export function writeUnicodeString(writer, text) { + writeUint32(writer, text.length); + for (var i = 0; i < text.length; i++) { + writeUint16(writer, text.charCodeAt(i)); + } +} +export function writeUnicodeStringWithPadding(writer, text) { + writeUint32(writer, text.length + 1); + for (var i = 0; i < text.length; i++) { + writeUint16(writer, text.charCodeAt(i)); + } + writeUint16(writer, 0); +} +function getLargestLayerSize(layers) { + if (layers === void 0) { layers = []; } + var max = 0; + for (var _i = 0, layers_1 = layers; _i < layers_1.length; _i++) { + var layer = layers_1[_i]; + if (layer.canvas || layer.imageData) { + var _a = getLayerDimentions(layer), width = _a.width, height = _a.height; + max = Math.max(max, 2 * height + 2 * width * height); + } + if (layer.children) { + max = Math.max(max, getLargestLayerSize(layer.children)); + } + } + return max; +} +export function writeSection(writer, round, func, writeTotalLength, large) { + if (writeTotalLength === void 0) { writeTotalLength = false; } + if (large === void 0) { large = false; } + if (large) + writeUint32(writer, 0); + var offset = writer.offset; + writeUint32(writer, 0); + func(); + var length = writer.offset - offset - 4; + var len = length; + while ((len % round) !== 0) { + writeUint8(writer, 0); + len++; + } + if (writeTotalLength) { + length = len; + } + writer.view.setUint32(offset, length, false); +} +export function writePsd(writer, psd, options) { + if (options === void 0) { options = {}; } + if (!(+psd.width > 0 && +psd.height > 0)) + throw new Error('Invalid document size'); + if ((psd.width > 30000 || psd.height > 30000) && !options.psb) + throw new Error('Document size is too large (max is 30000x30000, use PSB format instead)'); + var imageResources = psd.imageResources || {}; + var opt = __assign(__assign({}, options), { layerIds: new Set(), layerToId: new Map() }); + if (opt.generateThumbnail) { + imageResources = __assign(__assign({}, imageResources), { thumbnail: createThumbnail(psd) }); + } + var imageData = psd.imageData; + if (!imageData && psd.canvas) { + imageData = psd.canvas.getContext('2d').getImageData(0, 0, psd.canvas.width, psd.canvas.height); + } + if (imageData && (psd.width !== imageData.width || psd.height !== imageData.height)) + throw new Error('Document canvas must have the same size as document'); + var globalAlpha = !!imageData && hasAlpha(imageData); + var maxBufferSize = Math.max(getLargestLayerSize(psd.children), 4 * 2 * psd.width * psd.height + 2 * psd.height); + var tempBuffer = new Uint8Array(maxBufferSize); + // header + writeSignature(writer, '8BPS'); + writeUint16(writer, options.psb ? 2 : 1); // version + writeZeros(writer, 6); + writeUint16(writer, globalAlpha ? 4 : 3); // channels + writeUint32(writer, psd.height); + writeUint32(writer, psd.width); + writeUint16(writer, 8); // bits per channel + writeUint16(writer, 3 /* ColorMode.RGB */); // we only support saving RGB right now + // color mode data + writeSection(writer, 1, function () { + // TODO: implement + }); + // image resources + writeSection(writer, 1, function () { + var _loop_1 = function (handler) { + if (handler.has(imageResources)) { + writeSignature(writer, '8BIM'); + writeUint16(writer, handler.key); + writePascalString(writer, '', 2); + writeSection(writer, 2, function () { return handler.write(writer, imageResources); }); + } + }; + for (var _i = 0, resourceHandlers_1 = resourceHandlers; _i < resourceHandlers_1.length; _i++) { + var handler = resourceHandlers_1[_i]; + _loop_1(handler); + } + }); + // layer and mask info + writeSection(writer, 2, function () { + writeLayerInfo(tempBuffer, writer, psd, globalAlpha, opt); + writeGlobalLayerMaskInfo(writer, psd.globalLayerMaskInfo); + writeAdditionalLayerInfo(writer, psd, psd, opt); + }, undefined, !!opt.psb); + // image data + var channels = globalAlpha ? [0, 1, 2, 3] : [0, 1, 2]; + var data = imageData || { + data: new Uint8Array(4 * psd.width * psd.height), + width: psd.width, + height: psd.height, + }; + writeUint16(writer, 1 /* Compression.RleCompressed */); // Photoshop doesn't support zip compression of composite image data + if (RAW_IMAGE_DATA && psd.imageDataRaw) { + console.log('writing raw image data'); + writeBytes(writer, psd.imageDataRaw); + } + else { + writeBytes(writer, writeDataRLE(tempBuffer, data, channels, !!options.psb)); + } +} +function writeLayerInfo(tempBuffer, writer, psd, globalAlpha, options) { + writeSection(writer, 4, function () { + var _a; + var layers = []; + addChildren(layers, psd.children); + if (!layers.length) + layers.push({}); + writeInt16(writer, globalAlpha ? -layers.length : layers.length); + var layersData = layers.map(function (l, i) { return getChannels(tempBuffer, l, i === 0, options); }); + var _loop_2 = function (layerData) { + var layer = layerData.layer, top_1 = layerData.top, left = layerData.left, bottom = layerData.bottom, right = layerData.right, channels = layerData.channels; + writeInt32(writer, top_1); + writeInt32(writer, left); + writeInt32(writer, bottom); + writeInt32(writer, right); + writeUint16(writer, channels.length); + for (var _e = 0, channels_1 = channels; _e < channels_1.length; _e++) { + var c = channels_1[_e]; + writeInt16(writer, c.channelId); + if (options.psb) + writeUint32(writer, 0); + writeUint32(writer, c.length); + } + writeSignature(writer, '8BIM'); + writeSignature(writer, fromBlendMode[layer.blendMode] || 'norm'); + writeUint8(writer, Math.round(clamp((_a = layer.opacity) !== null && _a !== void 0 ? _a : 1, 0, 1) * 255)); + writeUint8(writer, layer.clipping ? 1 : 0); + var flags = 0x08; // 1 for Photoshop 5.0 and later, tells if bit 4 has useful information + if (layer.transparencyProtected) + flags |= 0x01; + if (layer.hidden) + flags |= 0x02; + if (layer.vectorMask || (layer.sectionDivider && layer.sectionDivider.type !== 0 /* SectionDividerType.Other */)) { + flags |= 0x10; // pixel data irrelevant to appearance of document + } + if (layer.effects && hasMultiEffects(layer.effects)) { // TODO: this is not correct + flags |= 0x20; // just guessing this one, might be completely incorrect + } + // if ('_2' in layer) flags |= 0x20; // TEMP!!! + writeUint8(writer, flags); + writeUint8(writer, 0); // filler + writeSection(writer, 1, function () { + writeLayerMaskData(writer, layer, layerData); + writeLayerBlendingRanges(writer, psd); + writePascalString(writer, layer.name || '', 4); + writeAdditionalLayerInfo(writer, layer, psd, options); + }); + }; + // layer records + for (var _i = 0, layersData_1 = layersData; _i < layersData_1.length; _i++) { + var layerData = layersData_1[_i]; + _loop_2(layerData); + } + // layer channel image data + for (var _b = 0, layersData_2 = layersData; _b < layersData_2.length; _b++) { + var layerData = layersData_2[_b]; + for (var _c = 0, _d = layerData.channels; _c < _d.length; _c++) { + var channel = _d[_c]; + writeUint16(writer, channel.compression); + if (channel.buffer) { + writeBytes(writer, channel.buffer); + } + } + } + }, true, options.psb); +} +function writeLayerMaskData(writer, _a, layerData) { + var mask = _a.mask; + writeSection(writer, 1, function () { + if (!mask) + return; + var m = layerData.mask || {}; + writeInt32(writer, m.top); + writeInt32(writer, m.left); + writeInt32(writer, m.bottom); + writeInt32(writer, m.right); + writeUint8(writer, mask.defaultColor); + var params = 0; + if (mask.userMaskDensity !== undefined) + params |= 1 /* MaskParams.UserMaskDensity */; + if (mask.userMaskFeather !== undefined) + params |= 2 /* MaskParams.UserMaskFeather */; + if (mask.vectorMaskDensity !== undefined) + params |= 4 /* MaskParams.VectorMaskDensity */; + if (mask.vectorMaskFeather !== undefined) + params |= 8 /* MaskParams.VectorMaskFeather */; + var flags = 0; + if (mask.disabled) + flags |= 2 /* LayerMaskFlags.LayerMaskDisabled */; + if (mask.positionRelativeToLayer) + flags |= 1 /* LayerMaskFlags.PositionRelativeToLayer */; + if (mask.fromVectorData) + flags |= 8 /* LayerMaskFlags.LayerMaskFromRenderingOtherData */; + if (params) + flags |= 16 /* LayerMaskFlags.MaskHasParametersAppliedToIt */; + writeUint8(writer, flags); + if (params) { + writeUint8(writer, params); + if (mask.userMaskDensity !== undefined) + writeUint8(writer, Math.round(mask.userMaskDensity * 0xff)); + if (mask.userMaskFeather !== undefined) + writeFloat64(writer, mask.userMaskFeather); + if (mask.vectorMaskDensity !== undefined) + writeUint8(writer, Math.round(mask.vectorMaskDensity * 0xff)); + if (mask.vectorMaskFeather !== undefined) + writeFloat64(writer, mask.vectorMaskFeather); + } + // TODO: handle rest of the fields + writeZeros(writer, 2); + }); +} +function writeLayerBlendingRanges(writer, psd) { + writeSection(writer, 1, function () { + writeUint32(writer, 65535); + writeUint32(writer, 65535); + var channels = psd.channels || 0; // TODO: use always 4 instead ? + // channels = 4; // TESTING + for (var i = 0; i < channels; i++) { + writeUint32(writer, 65535); + writeUint32(writer, 65535); + } + }); +} +function writeGlobalLayerMaskInfo(writer, info) { + writeSection(writer, 1, function () { + if (info) { + writeUint16(writer, info.overlayColorSpace); + writeUint16(writer, info.colorSpace1); + writeUint16(writer, info.colorSpace2); + writeUint16(writer, info.colorSpace3); + writeUint16(writer, info.colorSpace4); + writeUint16(writer, info.opacity * 0xff); + writeUint8(writer, info.kind); + writeZeros(writer, 3); + } + }); +} +function writeAdditionalLayerInfo(writer, target, psd, options) { + var _loop_3 = function (handler) { + var key = handler.key; + if (key === 'Txt2' && options.invalidateTextLayers) + return "continue"; + if (key === 'vmsk' && options.psb) + key = 'vsms'; + if (handler.has(target)) { + var large = options.psb && largeAdditionalInfoKeys.indexOf(key) !== -1; + writeSignature(writer, large ? '8B64' : '8BIM'); + writeSignature(writer, key); + var fourBytes = key === 'Txt2' || key === 'luni' || key === 'vmsk' || key === 'artb' || key === 'artd' || + key === 'vogk' || key === 'SoLd' || key === 'lnk2' || key === 'vscg' || key === 'vsms' || key === 'GdFl' || + key === 'lmfx' || key === 'lrFX' || key === 'cinf' || key === 'PlLd' || key === 'Anno'; + writeSection(writer, fourBytes ? 4 : 2, function () { + handler.write(writer, target, psd, options); + }, key !== 'Txt2' && key !== 'cinf' && key !== 'extn', large); + } + }; + for (var _i = 0, infoHandlers_1 = infoHandlers; _i < infoHandlers_1.length; _i++) { + var handler = infoHandlers_1[_i]; + _loop_3(handler); + } +} +function addChildren(layers, children) { + if (!children) + return; + for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { + var c = children_1[_i]; + if (c.children && c.canvas) + throw new Error("Invalid layer, cannot have both 'canvas' and 'children' properties"); + if (c.children && c.imageData) + throw new Error("Invalid layer, cannot have both 'imageData' and 'children' properties"); + if (c.children) { + layers.push({ + name: '', + sectionDivider: { + type: 3 /* SectionDividerType.BoundingSectionDivider */, + }, + // TESTING + // nameSource: 'lset', + // id: [4, 0, 0, 8, 11, 0, 0, 0, 0, 14][layers.length] || 0, + // layerColor: 'none', + // timestamp: [1611346817.349021, 0, 0, 1611346817.349175, 1611346817.3491833, 0, 0, 0, 0, 1611346817.349832][layers.length] || 0, + // protected: {}, + // referencePoint: { x: 0, y: 0 }, + }); + addChildren(layers, c.children); + layers.push(__assign({ sectionDivider: { + type: c.opened === false ? 2 /* SectionDividerType.ClosedFolder */ : 1 /* SectionDividerType.OpenFolder */, + key: fromBlendMode[c.blendMode] || 'pass', + subType: 0, + } }, c)); + } + else { + layers.push(__assign({}, c)); + } + } +} +function resizeBuffer(writer, size) { + var newLength = writer.buffer.byteLength; + do { + newLength *= 2; + } while (size > newLength); + var newBuffer = new ArrayBuffer(newLength); + var newBytes = new Uint8Array(newBuffer); + var oldBytes = new Uint8Array(writer.buffer); + newBytes.set(oldBytes); + writer.buffer = newBuffer; + writer.view = new DataView(writer.buffer); +} +function ensureSize(writer, size) { + if (size > writer.buffer.byteLength) { + resizeBuffer(writer, size); + } +} +function addSize(writer, size) { + var offset = writer.offset; + ensureSize(writer, writer.offset += size); + return offset; +} +function createThumbnail(psd) { + var canvas = createCanvas(10, 10); + var scale = 1; + if (psd.width > psd.height) { + canvas.width = 160; + canvas.height = Math.floor(psd.height * (canvas.width / psd.width)); + scale = canvas.width / psd.width; + } + else { + canvas.height = 160; + canvas.width = Math.floor(psd.width * (canvas.height / psd.height)); + scale = canvas.height / psd.height; + } + var context = canvas.getContext('2d'); + context.scale(scale, scale); + if (psd.imageData) { + var temp = createCanvas(psd.imageData.width, psd.imageData.height); + temp.getContext('2d').putImageData(psd.imageData, 0, 0); + context.drawImage(temp, 0, 0); + } + else if (psd.canvas) { + context.drawImage(psd.canvas, 0, 0); + } + return canvas; +} +function getChannels(tempBuffer, layer, background, options) { + var layerData = getLayerChannels(tempBuffer, layer, background, options); + var mask = layer.mask; + if (mask) { + var top_2 = mask.top | 0; + var left = mask.left | 0; + var right = mask.right | 0; + var bottom = mask.bottom | 0; + var _a = getLayerDimentions(mask), width = _a.width, height = _a.height; + var imageData = mask.imageData; + if (!imageData && mask.canvas && width && height) { + imageData = mask.canvas.getContext('2d').getImageData(0, 0, width, height); + } + if (width && height && imageData) { + right = left + width; + bottom = top_2 + height; + if (imageData.width !== width || imageData.height !== height) { + throw new Error('Invalid imageData dimentions'); + } + var buffer = void 0; + var compression = void 0; + if (RAW_IMAGE_DATA && layer.maskDataRaw) { + // console.log('written raw layer image data'); + buffer = layer.maskDataRaw; + compression = 1 /* Compression.RleCompressed */; + } + else if (options.compress) { + buffer = writeDataZipWithoutPrediction(imageData, [0]); + compression = 2 /* Compression.ZipWithoutPrediction */; + } + else { + buffer = writeDataRLE(tempBuffer, imageData, [0], !!options.psb); + compression = 1 /* Compression.RleCompressed */; + } + layerData.mask = { top: top_2, left: left, right: right, bottom: bottom }; + layerData.channels.push({ channelId: -2 /* ChannelID.UserMask */, compression: compression, buffer: buffer, length: 2 + buffer.length }); + } + else { + layerData.mask = { top: 0, left: 0, right: 0, bottom: 0 }; + layerData.channels.push({ channelId: -2 /* ChannelID.UserMask */, compression: 0 /* Compression.RawData */, buffer: new Uint8Array(0), length: 0 }); + } + } + return layerData; +} +function getLayerDimentions(_a) { + var canvas = _a.canvas, imageData = _a.imageData; + return imageData || canvas || { width: 0, height: 0 }; +} +function cropImageData(data, left, top, width, height) { + var croppedData = createImageData(width, height); + var srcData = data.data; + var dstData = croppedData.data; + for (var y = 0; y < height; y++) { + for (var x = 0; x < width; x++) { + var src = ((x + left) + (y + top) * width) * 4; + var dst = (x + y * width) * 4; + dstData[dst] = srcData[src]; + dstData[dst + 1] = srcData[src + 1]; + dstData[dst + 2] = srcData[src + 2]; + dstData[dst + 3] = srcData[src + 3]; + } + } + return croppedData; +} +function getLayerChannels(tempBuffer, layer, background, options) { + var _a; + var top = layer.top | 0; + var left = layer.left | 0; + var right = layer.right | 0; + var bottom = layer.bottom | 0; + var channels = [ + { channelId: -1 /* ChannelID.Transparency */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, + { channelId: 0 /* ChannelID.Color0 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, + { channelId: 1 /* ChannelID.Color1 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, + { channelId: 2 /* ChannelID.Color2 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, + ]; + var _b = getLayerDimentions(layer), width = _b.width, height = _b.height; + if (!(layer.canvas || layer.imageData) || !width || !height) { + right = left; + bottom = top; + return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; + } + right = left + width; + bottom = top + height; + var data = layer.imageData || layer.canvas.getContext('2d').getImageData(0, 0, width, height); + if (options.trimImageData) { + var trimmed = trimData(data); + if (trimmed.left !== 0 || trimmed.top !== 0 || trimmed.right !== data.width || trimmed.bottom !== data.height) { + left += trimmed.left; + top += trimmed.top; + right -= (data.width - trimmed.right); + bottom -= (data.height - trimmed.bottom); + width = right - left; + height = bottom - top; + if (!width || !height) { + return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; + } + if (layer.imageData) { + data = cropImageData(data, trimmed.left, trimmed.top, width, height); + } + else { + data = layer.canvas.getContext('2d').getImageData(trimmed.left, trimmed.top, width, height); + } + } + } + var channelIds = [ + 0 /* ChannelID.Color0 */, + 1 /* ChannelID.Color1 */, + 2 /* ChannelID.Color2 */, + ]; + if (!background || options.noBackground || layer.mask || hasAlpha(data) || (RAW_IMAGE_DATA && ((_a = layer.imageDataRaw) === null || _a === void 0 ? void 0 : _a['-1']))) { + channelIds.unshift(-1 /* ChannelID.Transparency */); + } + channels = channelIds.map(function (channelId) { + var offset = offsetForChannel(channelId, false); // TODO: psd.colorMode === ColorMode.CMYK); + var buffer; + var compression; + if (RAW_IMAGE_DATA && layer.imageDataRaw) { + // console.log('written raw layer image data'); + buffer = layer.imageDataRaw[channelId]; + compression = 1 /* Compression.RleCompressed */; + } + else if (options.compress) { + buffer = writeDataZipWithoutPrediction(data, [offset]); + compression = 2 /* Compression.ZipWithoutPrediction */; + } + else { + buffer = writeDataRLE(tempBuffer, data, [offset], !!options.psb); + compression = 1 /* Compression.RleCompressed */; + } + return { channelId: channelId, compression: compression, buffer: buffer, length: 2 + buffer.length }; + }); + return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; +} +function isRowEmpty(_a, y, left, right) { + var data = _a.data, width = _a.width; + var start = ((y * width + left) * 4 + 3) | 0; + var end = (start + (right - left) * 4) | 0; + for (var i = start; i < end; i = (i + 4) | 0) { + if (data[i] !== 0) { + return false; + } + } + return true; +} +function isColEmpty(_a, x, top, bottom) { + var data = _a.data, width = _a.width; + var stride = (width * 4) | 0; + var start = (top * stride + x * 4 + 3) | 0; + for (var y = top, i = start; y < bottom; y++, i = (i + stride) | 0) { + if (data[i] !== 0) { + return false; + } + } + return true; +} +function trimData(data) { + var top = 0; + var left = 0; + var right = data.width; + var bottom = data.height; + while (top < bottom && isRowEmpty(data, top, left, right)) + top++; + while (bottom > top && isRowEmpty(data, bottom - 1, left, right)) + bottom--; + while (left < right && isColEmpty(data, left, top, bottom)) + left++; + while (right > left && isColEmpty(data, right - 1, top, bottom)) + right--; + return { top: top, left: left, right: right, bottom: bottom }; +} +export function writeColor(writer, color) { + if (!color) { + writeUint16(writer, 0 /* ColorSpace.RGB */); + writeZeros(writer, 8); + } + else if ('r' in color) { + writeUint16(writer, 0 /* ColorSpace.RGB */); + writeUint16(writer, Math.round(color.r * 257)); + writeUint16(writer, Math.round(color.g * 257)); + writeUint16(writer, Math.round(color.b * 257)); + writeUint16(writer, 0); + } + else if ('l' in color) { + writeUint16(writer, 7 /* ColorSpace.Lab */); + writeInt16(writer, Math.round(color.l * 10000)); + writeInt16(writer, Math.round(color.a < 0 ? (color.a * 12800) : (color.a * 12700))); + writeInt16(writer, Math.round(color.b < 0 ? (color.b * 12800) : (color.b * 12700))); + writeUint16(writer, 0); + } + else if ('h' in color) { + writeUint16(writer, 1 /* ColorSpace.HSB */); + writeUint16(writer, Math.round(color.h * 0xffff)); + writeUint16(writer, Math.round(color.s * 0xffff)); + writeUint16(writer, Math.round(color.b * 0xffff)); + writeUint16(writer, 0); + } + else if ('c' in color) { + writeUint16(writer, 2 /* ColorSpace.CMYK */); + writeUint16(writer, Math.round(color.c * 257)); + writeUint16(writer, Math.round(color.m * 257)); + writeUint16(writer, Math.round(color.y * 257)); + writeUint16(writer, Math.round(color.k * 257)); + } + else { + writeUint16(writer, 8 /* ColorSpace.Grayscale */); + writeUint16(writer, Math.round(color.k * 10000 / 255)); + writeZeros(writer, 6); + } +} + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBzZFdyaXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUNBLE9BQU8sRUFDTixRQUFRLEVBQUUsWUFBWSxFQUFFLFlBQVksRUFDcEMsZ0JBQWdCLEVBQUUsZUFBZSxFQUFFLGFBQWEsRUFBMEIsS0FBSyxFQUMvQix1QkFBdUIsRUFBRSxjQUFjLEVBQUUsNkJBQTZCLEVBQ3RILE1BQU0sV0FBVyxDQUFDO0FBQ25CLE9BQU8sRUFBd0IsZUFBZSxFQUFFLFlBQVksRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBQ3ZGLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBUXBELE1BQU0sVUFBVSxZQUFZLENBQUMsSUFBVztJQUFYLHFCQUFBLEVBQUEsV0FBVztJQUN2QyxJQUFNLE1BQU0sR0FBRyxJQUFJLFdBQVcsQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUNyQyxJQUFNLElBQUksR0FBRyxJQUFJLFFBQVEsQ0FBQyxNQUFNLENBQUMsQ0FBQztJQUNsQyxJQUFNLE1BQU0sR0FBRyxDQUFDLENBQUM7SUFDakIsT0FBTyxFQUFFLE1BQU0sUUFBQSxFQUFFLElBQUksTUFBQSxFQU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ZChjb2xvci5rICogMjU3KSk7XG5cdH0gZWxzZSB7XG5cdFx0d3JpdGVVaW50MTYod3JpdGVyLCBDb2xvclNwYWNlLkdyYXlzY2FsZSk7XG5cdFx0d3JpdGVVaW50MTYod3JpdGVyLCBNYXRoLnJvdW5kKGNvbG9yLmsgKiAxMDAwMCAvIDI1NSkpO1xuXHRcdHdyaXRlWmVyb3Mod3JpdGVyLCA2KTtcblx0fVxufVxuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdWriter.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdWriter.js.map deleted file mode 100644 index ed83c13..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/psdWriter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"psdWriter.js","sourceRoot":"../src/","sources":["psdWriter.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,OAAO,EACN,QAAQ,EAAE,YAAY,EAAE,YAAY,EACpC,gBAAgB,EAAE,eAAe,EAAE,aAAa,EAA0B,KAAK,EAC/B,uBAAuB,EAAE,cAAc,EAAE,6BAA6B,EACtH,MAAM,WAAW,CAAC;AACnB,OAAO,EAAwB,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAQpD,MAAM,UAAU,YAAY,CAAC,IAAW;IAAX,qBAAA,EAAA,WAAW;IACvC,IAAM,MAAM,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;IAClC,IAAM,MAAM,GAAG,CAAC,CAAC;IACjB,OAAO,EAAE,MAAM,QAAA,EAAE,IAAI,MAAA,EAAE,MAAM,QAAA,EAAE,CAAC;AACjC,CAAC;AAED,MAAM,U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AAC,CAAC,CAAC;QAClD,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;QAClD,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;QAClD,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;KACvB;SAAM,IAAI,GAAG,IAAI,KAAK,EAAE;QACxB,WAAW,CAAC,MAAM,0BAAkB,CAAC;QACrC,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QAC/C,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QAC/C,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QAC/C,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;KAC/C;SAAM;QACN,WAAW,CAAC,MAAM,+BAAuB,CAAC;QAC1C,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC;QACvD,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;KACtB;AACF,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/text.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/text.d.ts index 0c93ab4..80292b8 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/text.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/text.d.ts @@ -1,168 +1,168 @@ -import { LayerTextData } from './psd'; -interface Adjustments { - Axis: number[]; - XY: number[]; -} -interface TypeValues { - Type: number; - Values: number[]; -} -interface ParagraphProperties { - Justification?: number; - FirstLineIndent?: number; - StartIndent?: number; - EndIndent?: number; - SpaceBefore?: number; - SpaceAfter?: number; - AutoHyphenate?: boolean; - HyphenatedWordSize?: number; - PreHyphen?: number; - PostHyphen?: number; - ConsecutiveHyphens?: number; - Zone?: number; - WordSpacing?: number[]; - LetterSpacing?: number[]; - GlyphSpacing?: number[]; - AutoLeading?: number; - LeadingType?: number; - Hanging?: boolean; - Burasagari?: boolean; - KinsokuOrder?: number; - EveryLineComposer?: boolean; -} -interface ParagraphSheet { - Name?: string; - DefaultStyleSheet: number; - Properties: ParagraphProperties; -} -interface StyleSheetData { - Font?: number; - FontSize?: number; - FauxBold?: boolean; - FauxItalic?: boolean; - AutoLeading?: boolean; - Leading?: number; - HorizontalScale?: number; - VerticalScale?: number; - Tracking?: number; - AutoKerning?: boolean; - Kerning?: number; - BaselineShift?: number; - FontCaps?: number; - FontBaseline?: number; - Underline?: boolean; - Strikethrough?: boolean; - Ligatures?: boolean; - DLigatures?: boolean; - BaselineDirection?: number; - Tsume?: number; - StyleRunAlignment?: number; - Language?: number; - NoBreak?: boolean; - FillColor?: TypeValues; - StrokeColor?: TypeValues; - FillFlag?: boolean; - StrokeFlag?: boolean; - FillFirst?: boolean; - YUnderline?: number; - OutlineWidth?: number; - CharacterDirection?: number; - HindiNumbers?: boolean; - Kashida?: number; - DiacriticPos?: number; -} -interface FontSet { - Name: string; - Script: number; - FontType: number; - Synthetic: number; -} -interface ResourceDict { - KinsokuSet: any[]; - MojiKumiSet: any[]; - TheNormalStyleSheet: number; - TheNormalParagraphSheet: number; - ParagraphSheetSet: ParagraphSheet[]; - StyleSheetSet: { - Name: string; - StyleSheetData: StyleSheetData; - }[]; - FontSet: FontSet[]; - SuperscriptSize: number; - SuperscriptPosition: number; - SubscriptSize: number; - SubscriptPosition: number; - SmallCapSize: number; -} -interface ParagraphRun { - ParagraphSheet: ParagraphSheet; - Adjustments: Adjustments; -} -interface StyleRun { - StyleSheet: { - StyleSheetData: StyleSheetData; - }; -} -interface PhotoshopNode { - ShapeType?: number; - PointBase?: number[]; - BoxBounds?: number[]; - Base?: { - ShapeType: number; - TransformPoint0: number[]; - TransformPoint1: number[]; - TransformPoint2: number[]; - }; -} -interface EngineData { - EngineDict: { - Editor: { - Text: string; - }; - ParagraphRun: { - DefaultRunData: ParagraphRun; - RunArray: ParagraphRun[]; - RunLengthArray: number[]; - IsJoinable: number; - }; - StyleRun: { - DefaultRunData: StyleRun; - RunArray: StyleRun[]; - RunLengthArray: number[]; - IsJoinable: number; - }; - GridInfo: { - GridIsOn: boolean; - ShowGrid: boolean; - GridSize: number; - GridLeading: number; - GridColor: TypeValues; - GridLeadingFillColor: TypeValues; - AlignLineHeightToGridFlags: boolean; - }; - AntiAlias: number; - UseFractionalGlyphWidths: boolean; - Rendered?: { - Version: number; - Shapes?: { - WritingDirection: number; - Children?: { - ShapeType?: number; - Procession: number; - Lines: { - WritingDirection: number; - Children: any[]; - }; - Cookie?: { - Photoshop?: PhotoshopNode; - }; - }[]; - }; - }; - }; - ResourceDict: ResourceDict; - DocumentResources: ResourceDict; -} -export declare function decodeEngineData(engineData: EngineData): LayerTextData; -export declare function encodeEngineData(data: LayerTextData): EngineData; -export {}; +import { LayerTextData } from './psd'; +interface Adjustments { + Axis: number[]; + XY: number[]; +} +interface TypeValues { + Type: number; + Values: number[]; +} +interface ParagraphProperties { + Justification?: number; + FirstLineIndent?: number; + StartIndent?: number; + EndIndent?: number; + SpaceBefore?: number; + SpaceAfter?: number; + AutoHyphenate?: boolean; + HyphenatedWordSize?: number; + PreHyphen?: number; + PostHyphen?: number; + ConsecutiveHyphens?: number; + Zone?: number; + WordSpacing?: number[]; + LetterSpacing?: number[]; + GlyphSpacing?: number[]; + AutoLeading?: number; + LeadingType?: number; + Hanging?: boolean; + Burasagari?: boolean; + KinsokuOrder?: number; + EveryLineComposer?: boolean; +} +interface ParagraphSheet { + Name?: string; + DefaultStyleSheet: number; + Properties: ParagraphProperties; +} +interface StyleSheetData { + Font?: number; + FontSize?: number; + FauxBold?: boolean; + FauxItalic?: boolean; + AutoLeading?: boolean; + Leading?: number; + HorizontalScale?: number; + VerticalScale?: number; + Tracking?: number; + AutoKerning?: boolean; + Kerning?: number; + BaselineShift?: number; + FontCaps?: number; + FontBaseline?: number; + Underline?: boolean; + Strikethrough?: boolean; + Ligatures?: boolean; + DLigatures?: boolean; + BaselineDirection?: number; + Tsume?: number; + StyleRunAlignment?: number; + Language?: number; + NoBreak?: boolean; + FillColor?: TypeValues; + StrokeColor?: TypeValues; + FillFlag?: boolean; + StrokeFlag?: boolean; + FillFirst?: boolean; + YUnderline?: number; + OutlineWidth?: number; + CharacterDirection?: number; + HindiNumbers?: boolean; + Kashida?: number; + DiacriticPos?: number; +} +interface FontSet { + Name: string; + Script: number; + FontType: number; + Synthetic: number; +} +interface ResourceDict { + KinsokuSet: any[]; + MojiKumiSet: any[]; + TheNormalStyleSheet: number; + TheNormalParagraphSheet: number; + ParagraphSheetSet: ParagraphSheet[]; + StyleSheetSet: { + Name: string; + StyleSheetData: StyleSheetData; + }[]; + FontSet: FontSet[]; + SuperscriptSize: number; + SuperscriptPosition: number; + SubscriptSize: number; + SubscriptPosition: number; + SmallCapSize: number; +} +interface ParagraphRun { + ParagraphSheet: ParagraphSheet; + Adjustments: Adjustments; +} +interface StyleRun { + StyleSheet: { + StyleSheetData: StyleSheetData; + }; +} +interface PhotoshopNode { + ShapeType?: number; + PointBase?: number[]; + BoxBounds?: number[]; + Base?: { + ShapeType: number; + TransformPoint0: number[]; + TransformPoint1: number[]; + TransformPoint2: number[]; + }; +} +interface EngineData { + EngineDict: { + Editor: { + Text: string; + }; + ParagraphRun: { + DefaultRunData: ParagraphRun; + RunArray: ParagraphRun[]; + RunLengthArray: number[]; + IsJoinable: number; + }; + StyleRun: { + DefaultRunData: StyleRun; + RunArray: StyleRun[]; + RunLengthArray: number[]; + IsJoinable: number; + }; + GridInfo: { + GridIsOn: boolean; + ShowGrid: boolean; + GridSize: number; + GridLeading: number; + GridColor: TypeValues; + GridLeadingFillColor: TypeValues; + AlignLineHeightToGridFlags: boolean; + }; + AntiAlias: number; + UseFractionalGlyphWidths: boolean; + Rendered?: { + Version: number; + Shapes?: { + WritingDirection: number; + Children?: { + ShapeType?: number; + Procession: number; + Lines: { + WritingDirection: number; + Children: any[]; + }; + Cookie?: { + Photoshop?: PhotoshopNode; + }; + }[]; + }; + }; + }; + ResourceDict: ResourceDict; + DocumentResources: ResourceDict; +} +export declare function decodeEngineData(engineData: EngineData): LayerTextData; +export declare function encodeEngineData(data: LayerTextData): EngineData; +export {}; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/text.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/text.js index 3e633f3..dca209e 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/text.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/text.js @@ -1,554 +1,553 @@ -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -var defaultFont = { - name: 'MyriadPro-Regular', - script: 0, - type: 0, - synthetic: 0, -}; -var defaultParagraphStyle = { - justification: 'left', - firstLineIndent: 0, - startIndent: 0, - endIndent: 0, - spaceBefore: 0, - spaceAfter: 0, - autoHyphenate: true, - hyphenatedWordSize: 6, - preHyphen: 2, - postHyphen: 2, - consecutiveHyphens: 8, - zone: 36, - wordSpacing: [0.8, 1, 1.33], - letterSpacing: [0, 0, 0], - glyphSpacing: [1, 1, 1], - autoLeading: 1.2, - leadingType: 0, - hanging: false, - burasagari: false, - kinsokuOrder: 0, - everyLineComposer: false, -}; -var defaultStyle = { - font: defaultFont, - fontSize: 12, - fauxBold: false, - fauxItalic: false, - autoLeading: true, - leading: 0, - horizontalScale: 1, - verticalScale: 1, - tracking: 0, - autoKerning: true, - kerning: 0, - baselineShift: 0, - fontCaps: 0, - fontBaseline: 0, - underline: false, - strikethrough: false, - ligatures: true, - dLigatures: false, - baselineDirection: 2, - tsume: 0, - styleRunAlignment: 2, - language: 0, - noBreak: false, - fillColor: { r: 0, g: 0, b: 0 }, - strokeColor: { r: 0, g: 0, b: 0 }, - fillFlag: true, - strokeFlag: false, - fillFirst: true, - yUnderline: 1, - outlineWidth: 1, - characterDirection: 0, - hindiNumbers: false, - kashida: 1, - diacriticPos: 2, -}; -var defaultGridInfo = { - isOn: false, - show: false, - size: 18, - leading: 22, - color: { r: 0, g: 0, b: 255 }, - leadingFillColor: { r: 0, g: 0, b: 255 }, - alignLineHeightToGridFlags: false, -}; -var paragraphStyleKeys = [ - 'justification', 'firstLineIndent', 'startIndent', 'endIndent', 'spaceBefore', 'spaceAfter', - 'autoHyphenate', 'hyphenatedWordSize', 'preHyphen', 'postHyphen', 'consecutiveHyphens', - 'zone', 'wordSpacing', 'letterSpacing', 'glyphSpacing', 'autoLeading', 'leadingType', - 'hanging', 'burasagari', 'kinsokuOrder', 'everyLineComposer', -]; -var styleKeys = [ - 'font', 'fontSize', 'fauxBold', 'fauxItalic', 'autoLeading', 'leading', 'horizontalScale', - 'verticalScale', 'tracking', 'autoKerning', 'kerning', 'baselineShift', 'fontCaps', 'fontBaseline', - 'underline', 'strikethrough', 'ligatures', 'dLigatures', 'baselineDirection', 'tsume', - 'styleRunAlignment', 'language', 'noBreak', 'fillColor', 'strokeColor', 'fillFlag', - 'strokeFlag', 'fillFirst', 'yUnderline', 'outlineWidth', 'characterDirection', 'hindiNumbers', - 'kashida', 'diacriticPos', -]; -var antialias = ['none', 'crisp', 'strong', 'smooth', 'sharp']; -var justification = ['left', 'right', 'center']; -function upperFirst(value) { - return value.substr(0, 1).toUpperCase() + value.substr(1); -} -function decodeColor(color) { - var c = color.Values; - if (color.Type === 0) { // grayscale - return { r: c[1] * 255, g: c[1] * 255, b: c[1] * 255 }; // , c[0] * 255]; - } - else { // rgb - return { r: c[1] * 255, g: c[2] * 255, b: c[3] * 255, a: c[0] }; // , c[0] * 255]; - } -} -function encodeColor(color) { - if (color && 'r' in color) { - return ['a' in color ? color.a : 1, color.r / 255, color.g / 255, color.b / 255]; - } - else { - return [0, 0, 0, 0]; - } -} -function arraysEqual(a, b) { - if (!a || !b) - return false; - if (a.length !== b.length) - return false; - for (var i = 0; i < a.length; i++) - if (a[i] !== b[i]) - return false; - return true; -} -function objectsEqual(a, b) { - if (!a || !b) - return false; - for (var _i = 0, _a = Object.keys(a); _i < _a.length; _i++) { - var key = _a[_i]; - if (a[key] !== b[key]) - return false; - } - for (var _b = 0, _c = Object.keys(b); _b < _c.length; _b++) { - var key = _c[_b]; - if (a[key] !== b[key]) - return false; - } - return true; -} -function findOrAddFont(fonts, font) { - for (var i = 0; i < fonts.length; i++) { - if (fonts[i].name === font.name) - return i; - } - fonts.push(font); - return fonts.length - 1; -} -function decodeObject(obj, keys, fonts) { - var result = {}; - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - var Key = upperFirst(key); - if (obj[Key] === undefined) - continue; - if (key === 'justification') { - result[key] = justification[obj[Key]]; - } - else if (key === 'font') { - result[key] = fonts[obj[Key]]; - } - else if (key === 'fillColor' || key === 'strokeColor') { - result[key] = decodeColor(obj[Key]); - } - else { - result[key] = obj[Key]; - } - } - return result; -} -function encodeObject(obj, keys, fonts) { - var _a; - var result = {}; - for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) { - var key = keys_2[_i]; - var Key = upperFirst(key); - if (obj[key] === undefined) - continue; - if (key === 'justification') { - result[Key] = justification.indexOf((_a = obj[key]) !== null && _a !== void 0 ? _a : 'left'); - } - else if (key === 'font') { - result[Key] = findOrAddFont(fonts, obj[key]); - } - else if (key === 'fillColor' || key === 'strokeColor') { - result[Key] = { Type: 1, Values: encodeColor(obj[key]) }; - } - else { - result[Key] = obj[key]; - } - } - return result; -} -function decodeParagraphStyle(obj, fonts) { - return decodeObject(obj, paragraphStyleKeys, fonts); -} -function decodeStyle(obj, fonts) { - return decodeObject(obj, styleKeys, fonts); -} -function encodeParagraphStyle(obj, fonts) { - return encodeObject(obj, paragraphStyleKeys, fonts); -} -function encodeStyle(obj, fonts) { - return encodeObject(obj, styleKeys, fonts); -} -function deduplicateValues(base, runs, keys) { - if (!runs.length) - return; - var _loop_1 = function (key) { - var value = runs[0].style[key]; - if (value !== undefined) { - var identical = false; - if (Array.isArray(value)) { - identical = runs.every(function (r) { return arraysEqual(r.style[key], value); }); - } - else if (typeof value === 'object') { - identical = runs.every(function (r) { return objectsEqual(r.style[key], value); }); - } - else { - identical = runs.every(function (r) { return r.style[key] === value; }); - } - if (identical) { - base[key] = value; - } - } - var styleValue = base[key]; - if (styleValue !== undefined) { - for (var _a = 0, runs_1 = runs; _a < runs_1.length; _a++) { - var r = runs_1[_a]; - var same = false; - if (Array.isArray(value)) { - same = arraysEqual(r.style[key], value); - } - else if (typeof value === 'object') { - same = objectsEqual(r.style[key], value); - } - else { - same = r.style[key] === value; - } - if (same) - delete r.style[key]; - } - } - }; - for (var _i = 0, keys_3 = keys; _i < keys_3.length; _i++) { - var key = keys_3[_i]; - _loop_1(key); - } - if (runs.every(function (x) { return Object.keys(x.style).length === 0; })) { - runs.length = 0; - } -} -export function decodeEngineData(engineData) { - var _a, _b, _c, _d, _e, _f; - // console.log('engineData', require('util').inspect(engineData, false, 99, true)); - var engineDict = engineData.EngineDict; - var resourceDict = engineData.ResourceDict; - var fonts = resourceDict.FontSet.map(function (f) { return ({ - name: f.Name, - script: f.Script, - type: f.FontType, - synthetic: f.Synthetic, - }); }); - var text = engineDict.Editor.Text.replace(/\r/g, '\n'); - var removedCharacters = 0; - while (/\n$/.test(text)) { - text = text.substr(0, text.length - 1); - removedCharacters++; - } - var result = { - text: text, - antiAlias: (_a = antialias[engineDict.AntiAlias]) !== null && _a !== void 0 ? _a : 'smooth', - useFractionalGlyphWidths: !!engineDict.UseFractionalGlyphWidths, - superscriptSize: resourceDict.SuperscriptSize, - superscriptPosition: resourceDict.SuperscriptPosition, - subscriptSize: resourceDict.SubscriptSize, - subscriptPosition: resourceDict.SubscriptPosition, - smallCapSize: resourceDict.SmallCapSize, - }; - // shape - var photoshop = (_f = (_e = (_d = (_c = (_b = engineDict.Rendered) === null || _b === void 0 ? void 0 : _b.Shapes) === null || _c === void 0 ? void 0 : _c.Children) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.Cookie) === null || _f === void 0 ? void 0 : _f.Photoshop; - if (photoshop) { - result.shapeType = photoshop.ShapeType === 1 ? 'box' : 'point'; - if (photoshop.PointBase) - result.pointBase = photoshop.PointBase; - if (photoshop.BoxBounds) - result.boxBounds = photoshop.BoxBounds; - } - // paragraph style - // const theNormalParagraphSheet = resourceDict.TheNormalParagraphSheet; - // const paragraphSheetSet = resourceDict.ParagraphSheetSet; - // const paragraphProperties = paragraphSheetSet[theNormalParagraphSheet].Properties; - var paragraphRun = engineData.EngineDict.ParagraphRun; - result.paragraphStyle = {}; // decodeParagraphStyle(paragraphProperties, fonts); - result.paragraphStyleRuns = []; - for (var i = 0; i < paragraphRun.RunArray.length; i++) { - var run_1 = paragraphRun.RunArray[i]; - var length_1 = paragraphRun.RunLengthArray[i]; - var style = decodeParagraphStyle(run_1.ParagraphSheet.Properties, fonts); - // const adjustments = { - // axis: run.Adjustments.Axis, - // xy: run.Adjustments.XY, - // }; - result.paragraphStyleRuns.push({ length: length_1, style: style /*, adjustments*/ }); - } - for (var counter = removedCharacters; result.paragraphStyleRuns.length && counter > 0; counter--) { - if (--result.paragraphStyleRuns[result.paragraphStyleRuns.length - 1].length === 0) { - result.paragraphStyleRuns.pop(); - } - } - deduplicateValues(result.paragraphStyle, result.paragraphStyleRuns, paragraphStyleKeys); - if (!result.paragraphStyleRuns.length) - delete result.paragraphStyleRuns; - // style - // const theNormalStyleSheet = resourceDict.TheNormalStyleSheet; - // const styleSheetSet = resourceDict.StyleSheetSet; - // const styleSheetData = styleSheetSet[theNormalStyleSheet].StyleSheetData; - var styleRun = engineData.EngineDict.StyleRun; - result.style = {}; // decodeStyle(styleSheetData, fonts); - result.styleRuns = []; - for (var i = 0; i < styleRun.RunArray.length; i++) { - var length_2 = styleRun.RunLengthArray[i]; - var style = decodeStyle(styleRun.RunArray[i].StyleSheet.StyleSheetData, fonts); - if (!style.font) - style.font = fonts[0]; - result.styleRuns.push({ length: length_2, style: style }); - } - for (var counter = removedCharacters; result.styleRuns.length && counter > 0; counter--) { - if (--result.styleRuns[result.styleRuns.length - 1].length === 0) { - result.styleRuns.pop(); - } - } - deduplicateValues(result.style, result.styleRuns, styleKeys); - if (!result.styleRuns.length) - delete result.styleRuns; - return result; -} -export function encodeEngineData(data) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; - var text = "".concat((data.text || '').replace(/\r?\n/g, '\r'), "\r"); - var fonts = [ - { name: 'AdobeInvisFont', script: 0, type: 0, synthetic: 0 }, - ]; - var defFont = ((_a = data.style) === null || _a === void 0 ? void 0 : _a.font) || ((_c = (_b = data.styleRuns) === null || _b === void 0 ? void 0 : _b.find(function (s) { return s.style.font; })) === null || _c === void 0 ? void 0 : _c.style.font) || defaultFont; - var paragraphRunArray = []; - var paragraphRunLengthArray = []; - var paragraphRuns = data.paragraphStyleRuns; - if (paragraphRuns && paragraphRuns.length) { - var leftLength_1 = text.length; - for (var _i = 0, paragraphRuns_1 = paragraphRuns; _i < paragraphRuns_1.length; _i++) { - var run_2 = paragraphRuns_1[_i]; - var runLength = Math.min(run_2.length, leftLength_1); - leftLength_1 -= runLength; - if (!runLength) - continue; // ignore 0 size runs - // extend last run if it's only for trailing \r - if (leftLength_1 === 1 && run_2 === paragraphRuns[paragraphRuns.length - 1]) { - runLength++; - leftLength_1--; - } - paragraphRunLengthArray.push(runLength); - paragraphRunArray.push({ - ParagraphSheet: { - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle(__assign(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), run_2.style), fonts), - }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }); - } - if (leftLength_1) { - paragraphRunLengthArray.push(leftLength_1); - paragraphRunArray.push({ - ParagraphSheet: { - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), - }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }); - } - } - else { - for (var i = 0, last = 0; i < text.length; i++) { - if (text.charCodeAt(i) === 13) { // \r - paragraphRunLengthArray.push(i - last + 1); - paragraphRunArray.push({ - ParagraphSheet: { - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), - }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }); - last = i + 1; - } - } - } - var styleSheetData = encodeStyle(__assign(__assign({}, defaultStyle), { font: defFont }), fonts); - var styleRuns = data.styleRuns || [{ length: text.length, style: data.style || {} }]; - var styleRunArray = []; - var styleRunLengthArray = []; - var leftLength = text.length; - for (var _o = 0, styleRuns_1 = styleRuns; _o < styleRuns_1.length; _o++) { - var run_3 = styleRuns_1[_o]; - var runLength = Math.min(run_3.length, leftLength); - leftLength -= runLength; - if (!runLength) - continue; // ignore 0 size runs - // extend last run if it's only for trailing \r - if (leftLength === 1 && run_3 === styleRuns[styleRuns.length - 1]) { - runLength++; - leftLength--; - } - styleRunLengthArray.push(runLength); - styleRunArray.push({ - StyleSheet: { - StyleSheetData: encodeStyle(__assign(__assign({ kerning: 0, autoKerning: true, fillColor: { r: 0, g: 0, b: 0 } }, data.style), run_3.style), fonts), - }, - }); - } - // add extra run to the end if existing ones didn't fill it up - if (leftLength && styleRuns.length) { - styleRunLengthArray.push(leftLength); - styleRunArray.push({ - StyleSheet: { - StyleSheetData: encodeStyle(__assign({ kerning: 0, autoKerning: true, fillColor: { r: 0, g: 0, b: 0 } }, data.style), fonts), - }, - }); - } - var gridInfo = __assign(__assign({}, defaultGridInfo), data.gridInfo); - var WritingDirection = data.orientation === 'vertical' ? 2 : 0; - var Procession = data.orientation === 'vertical' ? 1 : 0; - var ShapeType = data.shapeType === 'box' ? 1 : 0; - var Photoshop = { - ShapeType: ShapeType, - }; - if (ShapeType === 0) { - Photoshop.PointBase = data.pointBase || [0, 0]; - } - else { - Photoshop.BoxBounds = data.boxBounds || [0, 0, 0, 0]; - } - // needed for correct order of properties - Photoshop.Base = { - ShapeType: ShapeType, - TransformPoint0: [1, 0], - TransformPoint1: [0, 1], - TransformPoint2: [0, 0], - }; - var defaultResources = { - KinsokuSet: [ - { - Name: 'PhotoshopKinsokuHard', - NoStart: '、。,.・:;?!ー―’”)〕]}〉》」』】ヽヾゝゞ々ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ゛゜?!)]},.:;℃℉¢%‰', - NoEnd: '‘“(〔[{〈《「『【([{¥$£@§〒#', - Keep: '―‥', - Hanging: '、。.,', - }, - { - Name: 'PhotoshopKinsokuSoft', - NoStart: '、。,.・:;?!’”)〕]}〉》」』】ヽヾゝゞ々', - NoEnd: '‘“(〔[{〈《「『【', - Keep: '―‥', - Hanging: '、。.,', - }, - ], - MojiKumiSet: [ - { InternalName: 'Photoshop6MojiKumiSet1' }, - { InternalName: 'Photoshop6MojiKumiSet2' }, - { InternalName: 'Photoshop6MojiKumiSet3' }, - { InternalName: 'Photoshop6MojiKumiSet4' }, - ], - TheNormalStyleSheet: 0, - TheNormalParagraphSheet: 0, - ParagraphSheetSet: [ - { - Name: 'Normal RGB', - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), - }, - ], - StyleSheetSet: [ - { - Name: 'Normal RGB', - StyleSheetData: styleSheetData, - }, - ], - FontSet: fonts.map(function (f) { return ({ - Name: f.name, - Script: f.script || 0, - FontType: f.type || 0, - Synthetic: f.synthetic || 0, - }); }), - SuperscriptSize: (_d = data.superscriptSize) !== null && _d !== void 0 ? _d : 0.583, - SuperscriptPosition: (_e = data.superscriptPosition) !== null && _e !== void 0 ? _e : 0.333, - SubscriptSize: (_f = data.subscriptSize) !== null && _f !== void 0 ? _f : 0.583, - SubscriptPosition: (_g = data.subscriptPosition) !== null && _g !== void 0 ? _g : 0.333, - SmallCapSize: (_h = data.smallCapSize) !== null && _h !== void 0 ? _h : 0.7, - }; - var engineData = { - EngineDict: { - Editor: { Text: text }, - ParagraphRun: { - DefaultRunData: { - ParagraphSheet: { DefaultStyleSheet: 0, Properties: {} }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }, - RunArray: paragraphRunArray, - RunLengthArray: paragraphRunLengthArray, - IsJoinable: 1, - }, - StyleRun: { - DefaultRunData: { StyleSheet: { StyleSheetData: {} } }, - RunArray: styleRunArray, - RunLengthArray: styleRunLengthArray, - IsJoinable: 2, - }, - GridInfo: { - GridIsOn: !!gridInfo.isOn, - ShowGrid: !!gridInfo.show, - GridSize: (_j = gridInfo.size) !== null && _j !== void 0 ? _j : 18, - GridLeading: (_k = gridInfo.leading) !== null && _k !== void 0 ? _k : 22, - GridColor: { Type: 1, Values: encodeColor(gridInfo.color) }, - GridLeadingFillColor: { Type: 1, Values: encodeColor(gridInfo.color) }, - AlignLineHeightToGridFlags: !!gridInfo.alignLineHeightToGridFlags, - }, - AntiAlias: antialias.indexOf((_l = data.antiAlias) !== null && _l !== void 0 ? _l : 'sharp'), - UseFractionalGlyphWidths: (_m = data.useFractionalGlyphWidths) !== null && _m !== void 0 ? _m : true, - Rendered: { - Version: 1, - Shapes: { - WritingDirection: WritingDirection, - Children: [ - { - ShapeType: ShapeType, - Procession: Procession, - Lines: { WritingDirection: WritingDirection, Children: [] }, - Cookie: { Photoshop: Photoshop }, - }, - ], - }, - }, - }, - ResourceDict: __assign({}, defaultResources), - DocumentResources: __assign({}, defaultResources), - }; - // console.log('encodeEngineData', require('util').inspect(engineData, false, 99, true)); - return engineData; -} -//# sourceMappingURL=text.js.map \ No newline at end of file +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var defaultFont = { + name: 'MyriadPro-Regular', + script: 0, + type: 0, + synthetic: 0, +}; +var defaultParagraphStyle = { + justification: 'left', + firstLineIndent: 0, + startIndent: 0, + endIndent: 0, + spaceBefore: 0, + spaceAfter: 0, + autoHyphenate: true, + hyphenatedWordSize: 6, + preHyphen: 2, + postHyphen: 2, + consecutiveHyphens: 8, + zone: 36, + wordSpacing: [0.8, 1, 1.33], + letterSpacing: [0, 0, 0], + glyphSpacing: [1, 1, 1], + autoLeading: 1.2, + leadingType: 0, + hanging: false, + burasagari: false, + kinsokuOrder: 0, + everyLineComposer: false, +}; +var defaultStyle = { + font: defaultFont, + fontSize: 12, + fauxBold: false, + fauxItalic: false, + autoLeading: true, + leading: 0, + horizontalScale: 1, + verticalScale: 1, + tracking: 0, + autoKerning: true, + kerning: 0, + baselineShift: 0, + fontCaps: 0, + fontBaseline: 0, + underline: false, + strikethrough: false, + ligatures: true, + dLigatures: false, + baselineDirection: 2, + tsume: 0, + styleRunAlignment: 2, + language: 0, + noBreak: false, + fillColor: { r: 0, g: 0, b: 0 }, + strokeColor: { r: 0, g: 0, b: 0 }, + fillFlag: true, + strokeFlag: false, + fillFirst: true, + yUnderline: 1, + outlineWidth: 1, + characterDirection: 0, + hindiNumbers: false, + kashida: 1, + diacriticPos: 2, +}; +var defaultGridInfo = { + isOn: false, + show: false, + size: 18, + leading: 22, + color: { r: 0, g: 0, b: 255 }, + leadingFillColor: { r: 0, g: 0, b: 255 }, + alignLineHeightToGridFlags: false, +}; +var paragraphStyleKeys = [ + 'justification', 'firstLineIndent', 'startIndent', 'endIndent', 'spaceBefore', 'spaceAfter', + 'autoHyphenate', 'hyphenatedWordSize', 'preHyphen', 'postHyphen', 'consecutiveHyphens', + 'zone', 'wordSpacing', 'letterSpacing', 'glyphSpacing', 'autoLeading', 'leadingType', + 'hanging', 'burasagari', 'kinsokuOrder', 'everyLineComposer', +]; +var styleKeys = [ + 'font', 'fontSize', 'fauxBold', 'fauxItalic', 'autoLeading', 'leading', 'horizontalScale', + 'verticalScale', 'tracking', 'autoKerning', 'kerning', 'baselineShift', 'fontCaps', 'fontBaseline', + 'underline', 'strikethrough', 'ligatures', 'dLigatures', 'baselineDirection', 'tsume', + 'styleRunAlignment', 'language', 'noBreak', 'fillColor', 'strokeColor', 'fillFlag', + 'strokeFlag', 'fillFirst', 'yUnderline', 'outlineWidth', 'characterDirection', 'hindiNumbers', + 'kashida', 'diacriticPos', +]; +var antialias = ['none', 'crisp', 'strong', 'smooth', 'sharp']; +var justification = ['left', 'right', 'center']; +function upperFirst(value) { + return value.substr(0, 1).toUpperCase() + value.substr(1); +} +function decodeColor(color) { + var c = color.Values; + if (color.Type === 0) { // grayscale + return { r: c[1] * 255, g: c[1] * 255, b: c[1] * 255 }; // , c[0] * 255]; + } + else { // rgb + return { r: c[1] * 255, g: c[2] * 255, b: c[3] * 255, a: c[0] }; // , c[0] * 255]; + } +} +function encodeColor(color) { + if (color && 'r' in color) { + return ['a' in color ? color.a : 1, color.r / 255, color.g / 255, color.b / 255]; + } + else { + return [0, 0, 0, 0]; + } +} +function arraysEqual(a, b) { + if (!a || !b) + return false; + if (a.length !== b.length) + return false; + for (var i = 0; i < a.length; i++) + if (a[i] !== b[i]) + return false; + return true; +} +function objectsEqual(a, b) { + if (!a || !b) + return false; + for (var _i = 0, _a = Object.keys(a); _i < _a.length; _i++) { + var key = _a[_i]; + if (a[key] !== b[key]) + return false; + } + for (var _b = 0, _c = Object.keys(b); _b < _c.length; _b++) { + var key = _c[_b]; + if (a[key] !== b[key]) + return false; + } + return true; +} +function findOrAddFont(fonts, font) { + for (var i = 0; i < fonts.length; i++) { + if (fonts[i].name === font.name) + return i; + } + fonts.push(font); + return fonts.length - 1; +} +function decodeObject(obj, keys, fonts) { + var result = {}; + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + var Key = upperFirst(key); + if (obj[Key] === undefined) + continue; + if (key === 'justification') { + result[key] = justification[obj[Key]]; + } + else if (key === 'font') { + result[key] = fonts[obj[Key]]; + } + else if (key === 'fillColor' || key === 'strokeColor') { + result[key] = decodeColor(obj[Key]); + } + else { + result[key] = obj[Key]; + } + } + return result; +} +function encodeObject(obj, keys, fonts) { + var _a; + var result = {}; + for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) { + var key = keys_2[_i]; + var Key = upperFirst(key); + if (obj[key] === undefined) + continue; + if (key === 'justification') { + result[Key] = justification.indexOf((_a = obj[key]) !== null && _a !== void 0 ? _a : 'left'); + } + else if (key === 'font') { + result[Key] = findOrAddFont(fonts, obj[key]); + } + else if (key === 'fillColor' || key === 'strokeColor') { + result[Key] = { Type: 1, Values: encodeColor(obj[key]) }; + } + else { + result[Key] = obj[key]; + } + } + return result; +} +function decodeParagraphStyle(obj, fonts) { + return decodeObject(obj, paragraphStyleKeys, fonts); +} +function decodeStyle(obj, fonts) { + return decodeObject(obj, styleKeys, fonts); +} +function encodeParagraphStyle(obj, fonts) { + return encodeObject(obj, paragraphStyleKeys, fonts); +} +function encodeStyle(obj, fonts) { + return encodeObject(obj, styleKeys, fonts); +} +function deduplicateValues(base, runs, keys) { + if (!runs.length) + return; + var _loop_1 = function (key) { + var value = runs[0].style[key]; + if (value !== undefined) { + var identical = false; + if (Array.isArray(value)) { + identical = runs.every(function (r) { return arraysEqual(r.style[key], value); }); + } + else if (typeof value === 'object') { + identical = runs.every(function (r) { return objectsEqual(r.style[key], value); }); + } + else { + identical = runs.every(function (r) { return r.style[key] === value; }); + } + if (identical) { + base[key] = value; + } + } + var styleValue = base[key]; + if (styleValue !== undefined) { + for (var _a = 0, runs_1 = runs; _a < runs_1.length; _a++) { + var r = runs_1[_a]; + var same = false; + if (Array.isArray(value)) { + same = arraysEqual(r.style[key], value); + } + else if (typeof value === 'object') { + same = objectsEqual(r.style[key], value); + } + else { + same = r.style[key] === value; + } + if (same) + delete r.style[key]; + } + } + }; + for (var _i = 0, keys_3 = keys; _i < keys_3.length; _i++) { + var key = keys_3[_i]; + _loop_1(key); + } + if (runs.every(function (x) { return Object.keys(x.style).length === 0; })) { + runs.length = 0; + } +} +export function decodeEngineData(engineData) { + var _a, _b, _c, _d, _e, _f; + // console.log('engineData', require('util').inspect(engineData, false, 99, true)); + var engineDict = engineData.EngineDict; + var resourceDict = engineData.ResourceDict; + var fonts = resourceDict.FontSet.map(function (f) { return ({ + name: f.Name, + script: f.Script, + type: f.FontType, + synthetic: f.Synthetic, + }); }); + var text = engineDict.Editor.Text.replace(/\r/g, '\n'); + var removedCharacters = 0; + while (/\n$/.test(text)) { + text = text.substr(0, text.length - 1); + removedCharacters++; + } + var result = { + text: text, + antiAlias: (_a = antialias[engineDict.AntiAlias]) !== null && _a !== void 0 ? _a : 'smooth', + useFractionalGlyphWidths: !!engineDict.UseFractionalGlyphWidths, + superscriptSize: resourceDict.SuperscriptSize, + superscriptPosition: resourceDict.SuperscriptPosition, + subscriptSize: resourceDict.SubscriptSize, + subscriptPosition: resourceDict.SubscriptPosition, + smallCapSize: resourceDict.SmallCapSize, + }; + // shape + var photoshop = (_f = (_e = (_d = (_c = (_b = engineDict.Rendered) === null || _b === void 0 ? void 0 : _b.Shapes) === null || _c === void 0 ? void 0 : _c.Children) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.Cookie) === null || _f === void 0 ? void 0 : _f.Photoshop; + if (photoshop) { + result.shapeType = photoshop.ShapeType === 1 ? 'box' : 'point'; + if (photoshop.PointBase) + result.pointBase = photoshop.PointBase; + if (photoshop.BoxBounds) + result.boxBounds = photoshop.BoxBounds; + } + // paragraph style + // const theNormalParagraphSheet = resourceDict.TheNormalParagraphSheet; + // const paragraphSheetSet = resourceDict.ParagraphSheetSet; + // const paragraphProperties = paragraphSheetSet[theNormalParagraphSheet].Properties; + var paragraphRun = engineData.EngineDict.ParagraphRun; + result.paragraphStyle = {}; // decodeParagraphStyle(paragraphProperties, fonts); + result.paragraphStyleRuns = []; + for (var i = 0; i < paragraphRun.RunArray.length; i++) { + var run_1 = paragraphRun.RunArray[i]; + var length_1 = paragraphRun.RunLengthArray[i]; + var style = decodeParagraphStyle(run_1.ParagraphSheet.Properties, fonts); + // const adjustments = { + // axis: run.Adjustments.Axis, + // xy: run.Adjustments.XY, + // }; + result.paragraphStyleRuns.push({ length: length_1, style: style /*, adjustments*/ }); + } + for (var counter = removedCharacters; result.paragraphStyleRuns.length && counter > 0; counter--) { + if (--result.paragraphStyleRuns[result.paragraphStyleRuns.length - 1].length === 0) { + result.paragraphStyleRuns.pop(); + } + } + deduplicateValues(result.paragraphStyle, result.paragraphStyleRuns, paragraphStyleKeys); + if (!result.paragraphStyleRuns.length) + delete result.paragraphStyleRuns; + // style + // const theNormalStyleSheet = resourceDict.TheNormalStyleSheet; + // const styleSheetSet = resourceDict.StyleSheetSet; + // const styleSheetData = styleSheetSet[theNormalStyleSheet].StyleSheetData; + var styleRun = engineData.EngineDict.StyleRun; + result.style = {}; // decodeStyle(styleSheetData, fonts); + result.styleRuns = []; + for (var i = 0; i < styleRun.RunArray.length; i++) { + var length_2 = styleRun.RunLengthArray[i]; + var style = decodeStyle(styleRun.RunArray[i].StyleSheet.StyleSheetData, fonts); + result.styleRuns.push({ length: length_2, style: style }); + } + for (var counter = removedCharacters; result.styleRuns.length && counter > 0; counter--) { + if (--result.styleRuns[result.styleRuns.length - 1].length === 0) { + result.styleRuns.pop(); + } + } + deduplicateValues(result.style, result.styleRuns, styleKeys); + if (!result.styleRuns.length) + delete result.styleRuns; + return result; +} +export function encodeEngineData(data) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; + var text = "".concat((data.text || '').replace(/\r?\n/g, '\r'), "\r"); + var fonts = [ + { name: 'AdobeInvisFont', script: 0, type: 0, synthetic: 0 }, + ]; + var defFont = ((_a = data.style) === null || _a === void 0 ? void 0 : _a.font) || ((_c = (_b = data.styleRuns) === null || _b === void 0 ? void 0 : _b.find(function (s) { return s.style.font; })) === null || _c === void 0 ? void 0 : _c.style.font) || defaultFont; + var paragraphRunArray = []; + var paragraphRunLengthArray = []; + var paragraphRuns = data.paragraphStyleRuns; + if (paragraphRuns && paragraphRuns.length) { + var leftLength_1 = text.length; + for (var _i = 0, paragraphRuns_1 = paragraphRuns; _i < paragraphRuns_1.length; _i++) { + var run_2 = paragraphRuns_1[_i]; + var runLength = Math.min(run_2.length, leftLength_1); + leftLength_1 -= runLength; + if (!runLength) + continue; // ignore 0 size runs + // extend last run if it's only for trailing \r + if (leftLength_1 === 1 && run_2 === paragraphRuns[paragraphRuns.length - 1]) { + runLength++; + leftLength_1--; + } + paragraphRunLengthArray.push(runLength); + paragraphRunArray.push({ + ParagraphSheet: { + DefaultStyleSheet: 0, + Properties: encodeParagraphStyle(__assign(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), run_2.style), fonts), + }, + Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, + }); + } + if (leftLength_1) { + paragraphRunLengthArray.push(leftLength_1); + paragraphRunArray.push({ + ParagraphSheet: { + DefaultStyleSheet: 0, + Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), + }, + Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, + }); + } + } + else { + for (var i = 0, last = 0; i < text.length; i++) { + if (text.charCodeAt(i) === 13) { // \r + paragraphRunLengthArray.push(i - last + 1); + paragraphRunArray.push({ + ParagraphSheet: { + DefaultStyleSheet: 0, + Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), + }, + Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, + }); + last = i + 1; + } + } + } + var styleSheetData = encodeStyle(__assign(__assign({}, defaultStyle), { font: defFont }), fonts); + var styleRuns = data.styleRuns || [{ length: text.length, style: data.style || {} }]; + var styleRunArray = []; + var styleRunLengthArray = []; + var leftLength = text.length; + for (var _o = 0, styleRuns_1 = styleRuns; _o < styleRuns_1.length; _o++) { + var run_3 = styleRuns_1[_o]; + var runLength = Math.min(run_3.length, leftLength); + leftLength -= runLength; + if (!runLength) + continue; // ignore 0 size runs + // extend last run if it's only for trailing \r + if (leftLength === 1 && run_3 === styleRuns[styleRuns.length - 1]) { + runLength++; + leftLength--; + } + styleRunLengthArray.push(runLength); + styleRunArray.push({ + StyleSheet: { + StyleSheetData: encodeStyle(__assign(__assign({ kerning: 0, autoKerning: true, fillColor: { r: 0, g: 0, b: 0 } }, data.style), run_3.style), fonts), + }, + }); + } + // add extra run to the end if existing ones didn't fill it up + if (leftLength && styleRuns.length) { + styleRunLengthArray.push(leftLength); + styleRunArray.push({ + StyleSheet: { + StyleSheetData: encodeStyle(__assign({ kerning: 0, autoKerning: true, fillColor: { r: 0, g: 0, b: 0 } }, data.style), fonts), + }, + }); + } + var gridInfo = __assign(__assign({}, defaultGridInfo), data.gridInfo); + var WritingDirection = data.orientation === 'vertical' ? 2 : 0; + var Procession = data.orientation === 'vertical' ? 1 : 0; + var ShapeType = data.shapeType === 'box' ? 1 : 0; + var Photoshop = { + ShapeType: ShapeType, + }; + if (ShapeType === 0) { + Photoshop.PointBase = data.pointBase || [0, 0]; + } + else { + Photoshop.BoxBounds = data.boxBounds || [0, 0, 0, 0]; + } + // needed for correct order of properties + Photoshop.Base = { + ShapeType: ShapeType, + TransformPoint0: [1, 0], + TransformPoint1: [0, 1], + TransformPoint2: [0, 0], + }; + var defaultResources = { + KinsokuSet: [ + { + Name: 'PhotoshopKinsokuHard', + NoStart: '、。,.・:;?!ー―’”)〕]}〉》」』】ヽヾゝゞ々ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ゛゜?!)]},.:;℃℉¢%‰', + NoEnd: '‘“(〔[{〈《「『【([{¥$£@§〒#', + Keep: '―‥', + Hanging: '、。.,', + }, + { + Name: 'PhotoshopKinsokuSoft', + NoStart: '、。,.・:;?!’”)〕]}〉》」』】ヽヾゝゞ々', + NoEnd: '‘“(〔[{〈《「『【', + Keep: '―‥', + Hanging: '、。.,', + }, + ], + MojiKumiSet: [ + { InternalName: 'Photoshop6MojiKumiSet1' }, + { InternalName: 'Photoshop6MojiKumiSet2' }, + { InternalName: 'Photoshop6MojiKumiSet3' }, + { InternalName: 'Photoshop6MojiKumiSet4' }, + ], + TheNormalStyleSheet: 0, + TheNormalParagraphSheet: 0, + ParagraphSheetSet: [ + { + Name: 'Normal RGB', + DefaultStyleSheet: 0, + Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), + }, + ], + StyleSheetSet: [ + { + Name: 'Normal RGB', + StyleSheetData: styleSheetData, + }, + ], + FontSet: fonts.map(function (f) { return ({ + Name: f.name, + Script: f.script || 0, + FontType: f.type || 0, + Synthetic: f.synthetic || 0, + }); }), + SuperscriptSize: (_d = data.superscriptSize) !== null && _d !== void 0 ? _d : 0.583, + SuperscriptPosition: (_e = data.superscriptPosition) !== null && _e !== void 0 ? _e : 0.333, + SubscriptSize: (_f = data.subscriptSize) !== null && _f !== void 0 ? _f : 0.583, + SubscriptPosition: (_g = data.subscriptPosition) !== null && _g !== void 0 ? _g : 0.333, + SmallCapSize: (_h = data.smallCapSize) !== null && _h !== void 0 ? _h : 0.7, + }; + var engineData = { + EngineDict: { + Editor: { Text: text }, + ParagraphRun: { + DefaultRunData: { + ParagraphSheet: { DefaultStyleSheet: 0, Properties: {} }, + Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, + }, + RunArray: paragraphRunArray, + RunLengthArray: paragraphRunLengthArray, + IsJoinable: 1, + }, + StyleRun: { + DefaultRunData: { StyleSheet: { StyleSheetData: {} } }, + RunArray: styleRunArray, + RunLengthArray: styleRunLengthArray, + IsJoinable: 2, + }, + GridInfo: { + GridIsOn: !!gridInfo.isOn, + ShowGrid: !!gridInfo.show, + GridSize: (_j = gridInfo.size) !== null && _j !== void 0 ? _j : 18, + GridLeading: (_k = gridInfo.leading) !== null && _k !== void 0 ? _k : 22, + GridColor: { Type: 1, Values: encodeColor(gridInfo.color) }, + GridLeadingFillColor: { Type: 1, Values: encodeColor(gridInfo.color) }, + AlignLineHeightToGridFlags: !!gridInfo.alignLineHeightToGridFlags, + }, + AntiAlias: antialias.indexOf((_l = data.antiAlias) !== null && _l !== void 0 ? _l : 'sharp'), + UseFractionalGlyphWidths: (_m = data.useFractionalGlyphWidths) !== null && _m !== void 0 ? _m : true, + Rendered: { + Version: 1, + Shapes: { + WritingDirection: WritingDirection, + Children: [ + { + ShapeType: ShapeType, + Procession: Procession, + Lines: { WritingDirection: WritingDirection, Children: [] }, + Cookie: { Photoshop: Photoshop }, + }, + ], + }, + }, + }, + ResourceDict: __assign({}, defaultResources), + DocumentResources: __assign({}, defaultResources), + }; + // console.log('encodeEngineData', require('util').inspect(engineData, false, 99, true)); + return engineData; +} + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRleHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7QUF1S0EsSUFBTSxXQUFXLEdBQVM7SUFDekIsSUFBSSxFQUFFLG1CQUFtQjtJQUN6QixNQUFNLEVBQUUsQ0FBQztJQUNULElBQUksRUFBRSxDQUFDO0lBQ1AsU0FBUyxFQUFFLENBQUM7Q0FDWixDQUFDO0FBRUYsSUFBTSxxQkFBcUIsR0FBbUI7SUFDN0MsYUFBYSxFQUFFLE1BQU07SUFDckIsZUFBZSxFQUFFLENBQUM7SUFDbEIsV0FBVyxFQUFFLENBQUM7SUFDZCxTQUFTLEVBQUUsQ0FBQztJQUNaLFdBQVcsRUFBRSxDQUF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JhY3Rpb25hbEdseXBoV2lkdGhzID8/IHRydWUsXHJcblx0XHRcdFJlbmRlcmVkOiB7XHJcblx0XHRcdFx0VmVyc2lvbjogMSxcclxuXHRcdFx0XHRTaGFwZXM6IHtcclxuXHRcdFx0XHRcdFdyaXRpbmdEaXJlY3Rpb24sXHJcblx0XHRcdFx0XHRDaGlsZHJlbjogW1xyXG5cdFx0XHRcdFx0XHR7XHJcblx0XHRcdFx0XHRcdFx0U2hhcGVUeXBlLFxyXG5cdFx0XHRcdFx0XHRcdFByb2Nlc3Npb24sXHJcblx0XHRcdFx0XHRcdFx0TGluZXM6IHsgV3JpdGluZ0RpcmVjdGlvbiwgQ2hpbGRyZW46IFtdIH0sXHJcblx0XHRcdFx0XHRcdFx0Q29va2llOiB7IFBob3Rvc2hvcCB9LFxyXG5cdFx0XHRcdFx0XHR9LFxyXG5cdFx0XHRcdFx0XSxcclxuXHRcdFx0XHR9LFxyXG5cdFx0XHR9LFxyXG5cdFx0fSxcclxuXHRcdFJlc291cmNlRGljdDogeyAuLi5kZWZhdWx0UmVzb3VyY2VzIH0sXHJcblx0XHREb2N1bWVudFJlc291cmNlczogeyAuLi5kZWZhdWx0UmVzb3VyY2VzIH0sXHJcblx0fTtcclxuXHJcblx0Ly8gY29uc29sZS5sb2coJ2VuY29kZUVuZ2luZURhdGEnLCByZXF1aXJlKCd1dGlsJykuaW5zcGVjdChlbmdpbmVEYXRhLCBmYWxzZSwgOTksIHRydWUpKTtcclxuXHRyZXR1cm4gZW5naW5lRGF0YTtcclxufVxyXG4iXSwic291cmNlUm9vdCI6IkM6XFxQcm9qZWN0c1xcZ2l0aHViXFxhZy1wc2RcXHNyYyJ9 diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/text.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/text.js.map deleted file mode 100644 index 7f1e6a1..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/text.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3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AACnB,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/utf8.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist-es/utf8.d.ts index eeacaa0..d40218f 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/utf8.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/utf8.d.ts @@ -1,5 +1,5 @@ -/// -export declare function stringLengthInBytes(value: string): number; -export declare function encodeStringTo(buffer: Uint8Array | Buffer, offset: number, value: string): number; -export declare function encodeString(value: string): Uint8Array; -export declare function decodeString(value: Uint8Array): string; +/// +export declare function stringLengthInBytes(value: string): number; +export declare function encodeStringTo(buffer: Uint8Array | Buffer, offset: number, value: string): number; +export declare function encodeString(value: string): Uint8Array; +export declare function decodeString(value: Uint8Array): string; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/utf8.js b/npm-packages/mac-v2.4.x/ag-psd/dist-es/utf8.js index 7e4e171..1c8ccce 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/utf8.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist-es/utf8.js @@ -1,145 +1,146 @@ -function charLengthInBytes(code) { - if ((code & 0xffffff80) === 0) { - return 1; - } - else if ((code & 0xfffff800) === 0) { - return 2; - } - else if ((code & 0xffff0000) === 0) { - return 3; - } - else { - return 4; - } -} -export function stringLengthInBytes(value) { - var result = 0; - for (var i = 0; i < value.length; i++) { - var code = value.charCodeAt(i); - // high surrogate - if (code >= 0xd800 && code <= 0xdbff) { - if ((i + 1) < value.length) { - var extra = value.charCodeAt(i + 1); - // low surrogate - if ((extra & 0xfc00) === 0xdc00) { - i++; - result += charLengthInBytes(((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000); - } - } - } - else { - result += charLengthInBytes(code); - } - } - return result; -} -function writeCharacter(buffer, offset, code) { - var length = charLengthInBytes(code); - switch (length) { - case 1: - buffer[offset] = code; - break; - case 2: - buffer[offset] = ((code >> 6) & 0x1f) | 0xc0; - buffer[offset + 1] = (code & 0x3f) | 0x80; - break; - case 3: - buffer[offset] = ((code >> 12) & 0x0f) | 0xe0; - buffer[offset + 1] = ((code >> 6) & 0x3f) | 0x80; - buffer[offset + 2] = (code & 0x3f) | 0x80; - break; - default: - buffer[offset] = ((code >> 18) & 0x07) | 0xf0; - buffer[offset + 1] = ((code >> 12) & 0x3f) | 0x80; - buffer[offset + 2] = ((code >> 6) & 0x3f) | 0x80; - buffer[offset + 3] = (code & 0x3f) | 0x80; - break; - } - return length; -} -export function encodeStringTo(buffer, offset, value) { - for (var i = 0; i < value.length; i++) { - var code = value.charCodeAt(i); - // high surrogate - if (code >= 0xd800 && code <= 0xdbff) { - if ((i + 1) < value.length) { - var extra = value.charCodeAt(i + 1); - // low surrogate - if ((extra & 0xfc00) === 0xdc00) { - i++; - var fullCode = ((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; - offset += writeCharacter(buffer, offset, fullCode); - } - } - } - else { - offset += writeCharacter(buffer, offset, code); - } - } - return offset; -} -export function encodeString(value) { - var buffer = new Uint8Array(stringLengthInBytes(value)); - encodeStringTo(buffer, 0, value); - return buffer; -} -function continuationByte(buffer, index) { - if (index >= buffer.length) { - throw Error('Invalid byte index'); - } - var continuationByte = buffer[index]; - if ((continuationByte & 0xC0) === 0x80) { - return continuationByte & 0x3F; - } - else { - throw Error('Invalid continuation byte'); - } -} -export function decodeString(value) { - var result = ''; - for (var i = 0; i < value.length;) { - var byte1 = value[i++]; - var code = void 0; - if ((byte1 & 0x80) === 0) { - code = byte1; - } - else if ((byte1 & 0xe0) === 0xc0) { - var byte2 = continuationByte(value, i++); - code = ((byte1 & 0x1f) << 6) | byte2; - if (code < 0x80) { - throw Error('Invalid continuation byte'); - } - } - else if ((byte1 & 0xf0) === 0xe0) { - var byte2 = continuationByte(value, i++); - var byte3 = continuationByte(value, i++); - code = ((byte1 & 0x0f) << 12) | (byte2 << 6) | byte3; - if (code < 0x0800) { - throw Error('Invalid continuation byte'); - } - if (code >= 0xd800 && code <= 0xdfff) { - throw Error("Lone surrogate U+".concat(code.toString(16).toUpperCase(), " is not a scalar value")); - } - } - else if ((byte1 & 0xf8) === 0xf0) { - var byte2 = continuationByte(value, i++); - var byte3 = continuationByte(value, i++); - var byte4 = continuationByte(value, i++); - code = ((byte1 & 0x0f) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; - if (code < 0x010000 || code > 0x10ffff) { - throw Error('Invalid continuation byte'); - } - } - else { - throw Error('Invalid UTF-8 detected'); - } - if (code > 0xffff) { - code -= 0x10000; - result += String.fromCharCode(code >>> 10 & 0x3ff | 0xd800); - code = 0xdc00 | code & 0x3ff; - } - result += String.fromCharCode(code); - } - return result; -} -//# sourceMappingURL=utf8.js.map \ No newline at end of file +function charLengthInBytes(code) { + if ((code & 0xffffff80) === 0) { + return 1; + } + else if ((code & 0xfffff800) === 0) { + return 2; + } + else if ((code & 0xffff0000) === 0) { + return 3; + } + else { + return 4; + } +} +export function stringLengthInBytes(value) { + var result = 0; + for (var i = 0; i < value.length; i++) { + var code = value.charCodeAt(i); + // high surrogate + if (code >= 0xd800 && code <= 0xdbff) { + if ((i + 1) < value.length) { + var extra = value.charCodeAt(i + 1); + // low surrogate + if ((extra & 0xfc00) === 0xdc00) { + i++; + result += charLengthInBytes(((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000); + } + } + } + else { + result += charLengthInBytes(code); + } + } + return result; +} +function writeCharacter(buffer, offset, code) { + var length = charLengthInBytes(code); + switch (length) { + case 1: + buffer[offset] = code; + break; + case 2: + buffer[offset] = ((code >> 6) & 0x1f) | 0xc0; + buffer[offset + 1] = (code & 0x3f) | 0x80; + break; + case 3: + buffer[offset] = ((code >> 12) & 0x0f) | 0xe0; + buffer[offset + 1] = ((code >> 6) & 0x3f) | 0x80; + buffer[offset + 2] = (code & 0x3f) | 0x80; + break; + default: + buffer[offset] = ((code >> 18) & 0x07) | 0xf0; + buffer[offset + 1] = ((code >> 12) & 0x3f) | 0x80; + buffer[offset + 2] = ((code >> 6) & 0x3f) | 0x80; + buffer[offset + 3] = (code & 0x3f) | 0x80; + break; + } + return length; +} +export function encodeStringTo(buffer, offset, value) { + for (var i = 0; i < value.length; i++) { + var code = value.charCodeAt(i); + // high surrogate + if (code >= 0xd800 && code <= 0xdbff) { + if ((i + 1) < value.length) { + var extra = value.charCodeAt(i + 1); + // low surrogate + if ((extra & 0xfc00) === 0xdc00) { + i++; + var fullCode = ((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; + offset += writeCharacter(buffer, offset, fullCode); + } + } + } + else { + offset += writeCharacter(buffer, offset, code); + } + } + return offset; +} +export function encodeString(value) { + var buffer = new Uint8Array(stringLengthInBytes(value)); + encodeStringTo(buffer, 0, value); + return buffer; +} +function continuationByte(buffer, index) { + if (index >= buffer.length) { + throw Error('Invalid byte index'); + } + var continuationByte = buffer[index]; + if ((continuationByte & 0xC0) === 0x80) { + return continuationByte & 0x3F; + } + else { + throw Error('Invalid continuation byte'); + } +} +export function decodeString(value) { + var result = ''; + for (var i = 0; i < value.length;) { + var byte1 = value[i++]; + var code = void 0; + if ((byte1 & 0x80) === 0) { + code = byte1; + } + else if ((byte1 & 0xe0) === 0xc0) { + var byte2 = continuationByte(value, i++); + code = ((byte1 & 0x1f) << 6) | byte2; + if (code < 0x80) { + throw Error('Invalid continuation byte'); + } + } + else if ((byte1 & 0xf0) === 0xe0) { + var byte2 = continuationByte(value, i++); + var byte3 = continuationByte(value, i++); + code = ((byte1 & 0x0f) << 12) | (byte2 << 6) | byte3; + if (code < 0x0800) { + throw Error('Invalid continuation byte'); + } + if (code >= 0xd800 && code <= 0xdfff) { + throw Error("Lone surrogate U+".concat(code.toString(16).toUpperCase(), " is not a scalar value")); + } + } + else if ((byte1 & 0xf8) === 0xf0) { + var byte2 = continuationByte(value, i++); + var byte3 = continuationByte(value, i++); + var byte4 = continuationByte(value, i++); + code = ((byte1 & 0x0f) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; + if (code < 0x010000 || code > 0x10ffff) { + throw Error('Invalid continuation byte'); + } + } + else { + throw Error('Invalid UTF-8 detected'); + } + if (code > 0xffff) { + code -= 0x10000; + result += String.fromCharCode(code >>> 10 & 0x3ff | 0xd800); + code = 0xdc00 | code & 0x3ff; + } + result += String.fromCharCode(code); + } + return result; +} + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInV0ZjgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsU0FBUyxpQkFBaUIsQ0FBQyxJQUFZO0lBQ3RDLElBQUksQ0FBQyxJQUFJLEdBQUcsVUFBVSxDQUFDLEtBQUssQ0FBQyxFQUFFO1FBQzlCLE9BQU8sQ0FBQyxDQUFDO0tBQ1Q7U0FBTSxJQUFJLENBQUMsSUFBSSxHQUFHLFVBQVUsQ0FBQyxLQUFLLENBQUMsRUFBRTtRQUNyQyxPQUFPLENBQUMsQ0FBQztLQUNUO1NBQU0sSUFBSSxDQUFDLElBQUksR0FBRyxVQUFVLENBQUMsS0FBSyxDQUFDLEVBQUU7UUFDckMsT0FBTyxDQUFDLENBQUM7S0FDVDtTQUFNO1FBQ04sT0FBTyxDQUFDLENBQUM7S0FDVDtBQUNGLENBQUM7QUFFRCxNQUFNLFVBQVUsbUJBQW1CLENBQUMsS0FBYTtJQUNoRCxJQUFJLE1BQU0sR0FBRyxDQUFDLENBQUM7SUFFZixLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsS0FBSyxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRTtRQUN0QyxJQUFNLElBQUksR0FBRyxLQUFLLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBRWpDLGlCQUFpQjtRQUNqQixJQUFJLElBQUksSUFBSSxNQUFNLElBQUksSUFBSSxJQUFJLE1BQU0sRUFBRTtZQUNyQyx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pdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist-es/utf8.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist-es/utf8.js.map deleted file mode 100644 index 1af96ca..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist-es/utf8.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utf8.js","sourceRoot":"../src/","sources":["utf8.ts"],"names":[],"mappings":"AAAA,SAAS,iBAAiB,CAAC,IAAY;IACtC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE;QAC9B,OAAO,CAAC,CAAC;KACT;SAAM,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE;QACrC,OAAO,CAAC,CAAC;KACT;SAAM,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE;QACrC,OAAO,CAAC,CAAC;KACT;SAAM;QACN,OAAO,CAAC,CAAC;KACT;AACF,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,KAAa;IAChD,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,IAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAEjC,iBAAiB;QACjB,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,EAAE;YACrC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE;gBAC3B,IAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;gBAEtC,gBAAgB;gBAChB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,MAAM,EAAE;oBAChC,CAAC,EAAE,CAAC;oBACJ,MAAM,IAAI,iBAAiB,CAAC,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IAAI,GAAG,MAAM,EAAE;YAClB,IAAI,IAAI,OAAO,CAAC;YAChB,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,KAAK,EAAE,GAAG,KAAK,GAAG,MAAM,CAAC,CAAC;YAC5D,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,CAAC;SAC7B;QAED,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;KACpC;IAED,OAAO,MAAM,CAAC;AACf,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/abr.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/abr.d.ts index 787629d..85a3e0d 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/abr.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/abr.d.ts @@ -1,132 +1,132 @@ -import { BlendMode, PatternInfo } from './psd'; -export interface Abr { - brushes: Brush[]; - samples: SampleInfo[]; - patterns: PatternInfo[]; -} -export interface SampleInfo { - id: string; - bounds: { - x: number; - y: number; - w: number; - h: number; - }; - alpha: Uint8Array; -} -export interface BrushDynamics { - control: 'off' | 'fade' | 'pen pressure' | 'pen tilt' | 'stylus wheel' | 'initial direction' | 'direction' | 'initial rotation' | 'rotation'; - steps: number; - jitter: number; - minimum: number; -} -export interface BrushShape { - name?: string; - size: number; - angle: number; - roundness: number; - hardness?: number; - spacingOn: boolean; - spacing: number; - flipX: boolean; - flipY: boolean; - sampledData?: string; -} -export interface Brush { - name: string; - shape: BrushShape; - shapeDynamics?: { - sizeDynamics: BrushDynamics; - minimumDiameter: number; - tiltScale: number; - angleDynamics: BrushDynamics; - roundnessDynamics: BrushDynamics; - minimumRoundness: number; - flipX: boolean; - flipY: boolean; - brushProjection: boolean; - }; - scatter?: { - bothAxes: boolean; - scatterDynamics: BrushDynamics; - countDynamics: BrushDynamics; - count: number; - }; - texture?: { - id: string; - name: string; - invert: boolean; - scale: number; - brightness: number; - contrast: number; - blendMode: BlendMode; - depth: number; - depthMinimum: number; - depthDynamics: BrushDynamics; - }; - dualBrush?: { - flip: boolean; - shape: BrushShape; - blendMode: BlendMode; - useScatter: boolean; - spacing: number; - count: number; - bothAxes: boolean; - countDynamics: BrushDynamics; - scatterDynamics: BrushDynamics; - }; - colorDynamics?: { - foregroundBackground: BrushDynamics; - hue: number; - saturation: number; - brightness: number; - purity: number; - perTip: boolean; - }; - transfer?: { - flowDynamics: BrushDynamics; - opacityDynamics: BrushDynamics; - wetnessDynamics: BrushDynamics; - mixDynamics: BrushDynamics; - }; - brushPose?: { - overrideAngle: boolean; - overrideTiltX: boolean; - overrideTiltY: boolean; - overridePressure: boolean; - pressure: number; - tiltX: number; - tiltY: number; - angle: number; - }; - noise: boolean; - wetEdges: boolean; - protectTexture?: boolean; - spacing: number; - brushGroup?: undefined; - interpretation?: boolean; - useBrushSize: boolean; - toolOptions?: { - brushPreset: boolean; - flow: number; - smooth: number; - mode: BlendMode; - opacity: number; - smoothing: boolean; - smoothingValue: number; - smoothingRadiusMode: boolean; - smoothingCatchup: boolean; - smoothingCatchupAtEnd: boolean; - smoothingZoomCompensation: boolean; - pressureSmoothing: boolean; - usePressureOverridesSize: boolean; - usePressureOverridesOpacity: boolean; - useLegacy: boolean; - flowDynamics?: BrushDynamics; - opacityDynamics?: BrushDynamics; - sizeDynamics?: BrushDynamics; - }; -} -export declare function readAbr(buffer: ArrayBufferView, options?: { - logMissingFeatures?: boolean; -}): Abr; +import { BlendMode, PatternInfo } from './psd'; +export interface Abr { + brushes: Brush[]; + samples: SampleInfo[]; + patterns: PatternInfo[]; +} +export interface SampleInfo { + id: string; + bounds: { + x: number; + y: number; + w: number; + h: number; + }; + alpha: Uint8Array; +} +export interface BrushDynamics { + control: 'off' | 'fade' | 'pen pressure' | 'pen tilt' | 'stylus wheel' | 'initial direction' | 'direction' | 'initial rotation' | 'rotation'; + steps: number; + jitter: number; + minimum: number; +} +export interface BrushShape { + name?: string; + size: number; + angle: number; + roundness: number; + hardness?: number; + spacingOn: boolean; + spacing: number; + flipX: boolean; + flipY: boolean; + sampledData?: string; +} +export interface Brush { + name: string; + shape: BrushShape; + shapeDynamics?: { + sizeDynamics: BrushDynamics; + minimumDiameter: number; + tiltScale: number; + angleDynamics: BrushDynamics; + roundnessDynamics: BrushDynamics; + minimumRoundness: number; + flipX: boolean; + flipY: boolean; + brushProjection: boolean; + }; + scatter?: { + bothAxes: boolean; + scatterDynamics: BrushDynamics; + countDynamics: BrushDynamics; + count: number; + }; + texture?: { + id: string; + name: string; + invert: boolean; + scale: number; + brightness: number; + contrast: number; + blendMode: BlendMode; + depth: number; + depthMinimum: number; + depthDynamics: BrushDynamics; + }; + dualBrush?: { + flip: boolean; + shape: BrushShape; + blendMode: BlendMode; + useScatter: boolean; + spacing: number; + count: number; + bothAxes: boolean; + countDynamics: BrushDynamics; + scatterDynamics: BrushDynamics; + }; + colorDynamics?: { + foregroundBackground: BrushDynamics; + hue: number; + saturation: number; + brightness: number; + purity: number; + perTip: boolean; + }; + transfer?: { + flowDynamics: BrushDynamics; + opacityDynamics: BrushDynamics; + wetnessDynamics: BrushDynamics; + mixDynamics: BrushDynamics; + }; + brushPose?: { + overrideAngle: boolean; + overrideTiltX: boolean; + overrideTiltY: boolean; + overridePressure: boolean; + pressure: number; + tiltX: number; + tiltY: number; + angle: number; + }; + noise: boolean; + wetEdges: boolean; + protectTexture?: boolean; + spacing: number; + brushGroup?: undefined; + interpretation?: boolean; + useBrushSize: boolean; + toolOptions?: { + brushPreset: boolean; + flow: number; + smooth: number; + mode: BlendMode; + opacity: number; + smoothing: boolean; + smoothingValue: number; + smoothingRadiusMode: boolean; + smoothingCatchup: boolean; + smoothingCatchupAtEnd: boolean; + smoothingZoomCompensation: boolean; + pressureSmoothing: boolean; + usePressureOverridesSize: boolean; + usePressureOverridesOpacity: boolean; + useLegacy: boolean; + flowDynamics?: BrushDynamics; + opacityDynamics?: BrushDynamics; + sizeDynamics?: BrushDynamics; + }; +} +export declare function readAbr(buffer: ArrayBufferView, options?: { + logMissingFeatures?: boolean; +}): Abr; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/abr.js b/npm-packages/mac-v2.4.x/ag-psd/dist/abr.js index c1c9d81..8c57183 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/abr.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/abr.js @@ -1,270 +1,271 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readAbr = void 0; -var descriptor_1 = require("./descriptor"); -var psdReader_1 = require("./psdReader"); -var dynamicsControl = ['off', 'fade', 'pen pressure', 'pen tilt', 'stylus wheel', 'initial direction', 'direction', 'initial rotation', 'rotation']; -function parseDynamics(desc) { - return { - control: dynamicsControl[desc.bVTy], - steps: desc.fStp, - jitter: (0, descriptor_1.parsePercent)(desc.jitter), - minimum: (0, descriptor_1.parsePercent)(desc['Mnm ']), - }; -} -function parseBrushShape(desc) { - var shape = { - size: (0, descriptor_1.parseUnitsToNumber)(desc.Dmtr, 'Pixels'), - angle: (0, descriptor_1.parseAngle)(desc.Angl), - roundness: (0, descriptor_1.parsePercent)(desc.Rndn), - spacingOn: desc.Intr, - spacing: (0, descriptor_1.parsePercent)(desc.Spcn), - flipX: desc.flipX, - flipY: desc.flipY, - }; - if (desc['Nm ']) - shape.name = desc['Nm ']; - if (desc.Hrdn) - shape.hardness = (0, descriptor_1.parsePercent)(desc.Hrdn); - if (desc.sampledData) - shape.sampledData = desc.sampledData; - return shape; -} -function readAbr(buffer, options) { - var _a, _b, _c, _d; - if (options === void 0) { options = {}; } - var reader = (0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength); - var version = (0, psdReader_1.readInt16)(reader); - var samples = []; - var brushes = []; - var patterns = []; - if (version === 1 || version === 2) { - throw new Error("Unsupported ABR version (".concat(version, ")")); // TODO: ... - } - else if (version === 6 || version === 7 || version === 9 || version === 10) { - var minorVersion = (0, psdReader_1.readInt16)(reader); - if (minorVersion !== 1 && minorVersion !== 2) - throw new Error('Unsupported ABR minor version'); - while (reader.offset < reader.view.byteLength) { - (0, psdReader_1.checkSignature)(reader, '8BIM'); - var type = (0, psdReader_1.readSignature)(reader); - var size = (0, psdReader_1.readUint32)(reader); - var end = reader.offset + size; - switch (type) { - case 'samp': { - while (reader.offset < end) { - var brushLength = (0, psdReader_1.readUint32)(reader); - while (brushLength & 3) - brushLength++; // pad to 4 byte alignment - var brushEnd = reader.offset + brushLength; - var id = (0, psdReader_1.readPascalString)(reader, 1); - // v1 - Skip the Int16 bounds rectangle and the unknown Int16. - // v2 - Skip the unknown bytes. - (0, psdReader_1.skipBytes)(reader, minorVersion === 1 ? 10 : 264); - var y = (0, psdReader_1.readInt32)(reader); - var x = (0, psdReader_1.readInt32)(reader); - var h = (0, psdReader_1.readInt32)(reader) - y; - var w = (0, psdReader_1.readInt32)(reader) - x; - if (w <= 0 || h <= 0) - throw new Error('Invalid bounds'); - var depth = (0, psdReader_1.readInt16)(reader); - var compression = (0, psdReader_1.readUint8)(reader); // 0 - raw, 1 - RLE - var alpha = new Uint8Array(w * h); - if (depth === 8) { - if (compression === 0) { - alpha.set((0, psdReader_1.readBytes)(reader, alpha.byteLength)); - } - else if (compression === 1) { - (0, psdReader_1.readDataRLE)(reader, { width: w, height: h, data: alpha }, w, h, 1, [0], false); - } - else { - throw new Error('Invalid compression'); - } - } - else if (depth === 16) { - if (compression === 0) { - for (var i = 0; i < alpha.byteLength; i++) { - alpha[i] = (0, psdReader_1.readUint16)(reader) >> 8; // convert to 8bit values - } - } - else if (compression === 1) { - throw new Error('not implemented (16bit RLE)'); // TODO: ... - } - else { - throw new Error('Invalid compression'); - } - } - else { - throw new Error('Invalid depth'); - } - samples.push({ id: id, bounds: { x: x, y: y, w: w, h: h }, alpha: alpha }); - reader.offset = brushEnd; - } - break; - } - case 'desc': { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - for (var _i = 0, _e = desc.Brsh; _i < _e.length; _i++) { - var brush = _e[_i]; - var b = { - name: brush['Nm '], - shape: parseBrushShape(brush.Brsh), - spacing: (0, descriptor_1.parsePercent)(brush.Spcn), - // TODO: brushGroup ??? - wetEdges: brush.Wtdg, - noise: brush.Nose, - // TODO: TxtC ??? smoothing / build-up ? - // TODO: 'Rpt ' ??? - useBrushSize: brush.useBrushSize, // ??? - }; - if (brush.interpretation != null) - b.interpretation = brush.interpretation; - if (brush.protectTexture != null) - b.protectTexture = brush.protectTexture; - if (brush.useTipDynamics) { - b.shapeDynamics = { - tiltScale: (0, descriptor_1.parsePercent)(brush.tiltScale), - sizeDynamics: parseDynamics(brush.szVr), - angleDynamics: parseDynamics(brush.angleDynamics), - roundnessDynamics: parseDynamics(brush.roundnessDynamics), - flipX: brush.flipX, - flipY: brush.flipY, - brushProjection: brush.brushProjection, - minimumDiameter: (0, descriptor_1.parsePercent)(brush.minimumDiameter), - minimumRoundness: (0, descriptor_1.parsePercent)(brush.minimumRoundness), - }; - } - if (brush.useScatter) { - b.scatter = { - count: brush['Cnt '], - bothAxes: brush.bothAxes, - countDynamics: parseDynamics(brush.countDynamics), - scatterDynamics: parseDynamics(brush.scatterDynamics), - }; - } - if (brush.useTexture && brush.Txtr) { - b.texture = { - id: brush.Txtr.Idnt, - name: brush.Txtr['Nm '], - blendMode: descriptor_1.BlnM.decode(brush.textureBlendMode), - depth: (0, descriptor_1.parsePercent)(brush.textureDepth), - depthMinimum: (0, descriptor_1.parsePercent)(brush.minimumDepth), - depthDynamics: parseDynamics(brush.textureDepthDynamics), - scale: (0, descriptor_1.parsePercent)(brush.textureScale), - invert: brush.InvT, - brightness: brush.textureBrightness, - contrast: brush.textureContrast, - }; - } - var db = brush.dualBrush; - if (db && db.useDualBrush) { - b.dualBrush = { - flip: db.Flip, - shape: parseBrushShape(db.Brsh), - blendMode: descriptor_1.BlnM.decode(db.BlnM), - useScatter: db.useScatter, - spacing: (0, descriptor_1.parsePercent)(db.Spcn), - count: db['Cnt '], - bothAxes: db.bothAxes, - countDynamics: parseDynamics(db.countDynamics), - scatterDynamics: parseDynamics(db.scatterDynamics), - }; - } - if (brush.useColorDynamics) { - b.colorDynamics = { - foregroundBackground: parseDynamics(brush.clVr), - hue: (0, descriptor_1.parsePercent)(brush['H ']), - saturation: (0, descriptor_1.parsePercent)(brush.Strt), - brightness: (0, descriptor_1.parsePercent)(brush.Brgh), - purity: (0, descriptor_1.parsePercent)(brush.purity), - perTip: brush.colorDynamicsPerTip, - }; - } - if (brush.usePaintDynamics) { - b.transfer = { - flowDynamics: parseDynamics(brush.prVr), - opacityDynamics: parseDynamics(brush.opVr), - wetnessDynamics: parseDynamics(brush.wtVr), - mixDynamics: parseDynamics(brush.mxVr), - }; - } - if (brush.useBrushPose) { - b.brushPose = { - overrideAngle: brush.overridePoseAngle, - overrideTiltX: brush.overridePoseTiltX, - overrideTiltY: brush.overridePoseTiltY, - overridePressure: brush.overridePosePressure, - pressure: (0, descriptor_1.parsePercent)(brush.brushPosePressure), - tiltX: brush.brushPoseTiltX, - tiltY: brush.brushPoseTiltY, - angle: brush.brushPoseAngle, - }; - } - var to = brush.toolOptions; - if (to) { - b.toolOptions = { - brushPreset: to.brushPreset, - flow: (_a = to.flow) !== null && _a !== void 0 ? _a : 100, - smooth: (_b = to.Smoo) !== null && _b !== void 0 ? _b : 0, - mode: descriptor_1.BlnM.decode(to['Md '] || 'BlnM.Nrml'), - opacity: (_c = to.Opct) !== null && _c !== void 0 ? _c : 100, - smoothing: !!to.smoothing, - smoothingValue: to.smoothingValue || 0, - smoothingRadiusMode: !!to.smoothingRadiusMode, - smoothingCatchup: !!to.smoothingCatchup, - smoothingCatchupAtEnd: !!to.smoothingCatchupAtEnd, - smoothingZoomCompensation: !!to.smoothingZoomCompensation, - pressureSmoothing: !!to.pressureSmoothing, - usePressureOverridesSize: !!to.usePressureOverridesSize, - usePressureOverridesOpacity: !!to.usePressureOverridesOpacity, - useLegacy: !!to.useLegacy, - }; - if (to.prVr) { - b.toolOptions.flowDynamics = parseDynamics(to.prVr); - } - if (to.opVr) { - b.toolOptions.opacityDynamics = parseDynamics(to.opVr); - } - if (to.szVr) { - b.toolOptions.sizeDynamics = parseDynamics(to.szVr); - } - } - brushes.push(b); - } - break; - } - case 'patt': { - if (reader.offset < end) { // TODO: check multiple patterns - patterns.push((0, psdReader_1.readPattern)(reader)); - reader.offset = end; - } - break; - } - case 'phry': { - // TODO: what is this ? - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - if (options.logMissingFeatures) { - if ((_d = desc.hierarchy) === null || _d === void 0 ? void 0 : _d.length) { - console.log('unhandled phry section', desc); - } - } - break; - } - default: - throw new Error("Invalid brush type: ".concat(type)); - } - // align to 4 bytes - while (size % 4) { - reader.offset++; - size++; - } - } - } - else { - throw new Error("Unsupported ABR version (".concat(version, ")")); - } - return { samples: samples, patterns: patterns, brushes: brushes }; -} -exports.readAbr = readAbr; -//# sourceMappingURL=abr.js.map \ No newline at end of file +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readAbr = void 0; +var descriptor_1 = require("./descriptor"); +var psdReader_1 = require("./psdReader"); +var dynamicsControl = ['off', 'fade', 'pen pressure', 'pen tilt', 'stylus wheel', 'initial direction', 'direction', 'initial rotation', 'rotation']; +function parseDynamics(desc) { + return { + control: dynamicsControl[desc.bVTy], + steps: desc.fStp, + jitter: (0, descriptor_1.parsePercent)(desc.jitter), + minimum: (0, descriptor_1.parsePercent)(desc['Mnm ']), + }; +} +function parseBrushShape(desc) { + var shape = { + size: (0, descriptor_1.parseUnitsToNumber)(desc.Dmtr, 'Pixels'), + angle: (0, descriptor_1.parseAngle)(desc.Angl), + roundness: (0, descriptor_1.parsePercent)(desc.Rndn), + spacingOn: desc.Intr, + spacing: (0, descriptor_1.parsePercent)(desc.Spcn), + flipX: desc.flipX, + flipY: desc.flipY, + }; + if (desc['Nm ']) + shape.name = desc['Nm ']; + if (desc.Hrdn) + shape.hardness = (0, descriptor_1.parsePercent)(desc.Hrdn); + if (desc.sampledData) + shape.sampledData = desc.sampledData; + return shape; +} +function readAbr(buffer, options) { + var _a, _b, _c, _d; + if (options === void 0) { options = {}; } + var reader = (0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength); + var version = (0, psdReader_1.readInt16)(reader); + var samples = []; + var brushes = []; + var patterns = []; + if (version === 1 || version === 2) { + throw new Error("Unsupported ABR version (".concat(version, ")")); // TODO: ... + } + else if (version === 6 || version === 7 || version === 9 || version === 10) { + var minorVersion = (0, psdReader_1.readInt16)(reader); + if (minorVersion !== 1 && minorVersion !== 2) + throw new Error('Unsupported ABR minor version'); + while (reader.offset < reader.view.byteLength) { + (0, psdReader_1.checkSignature)(reader, '8BIM'); + var type = (0, psdReader_1.readSignature)(reader); + var size = (0, psdReader_1.readUint32)(reader); + var end = reader.offset + size; + switch (type) { + case 'samp': { + while (reader.offset < end) { + var brushLength = (0, psdReader_1.readUint32)(reader); + while (brushLength & 3) + brushLength++; // pad to 4 byte alignment + var brushEnd = reader.offset + brushLength; + var id = (0, psdReader_1.readPascalString)(reader, 1); + // v1 - Skip the Int16 bounds rectangle and the unknown Int16. + // v2 - Skip the unknown bytes. + (0, psdReader_1.skipBytes)(reader, minorVersion === 1 ? 10 : 264); + var y = (0, psdReader_1.readInt32)(reader); + var x = (0, psdReader_1.readInt32)(reader); + var h = (0, psdReader_1.readInt32)(reader) - y; + var w = (0, psdReader_1.readInt32)(reader) - x; + if (w <= 0 || h <= 0) + throw new Error('Invalid bounds'); + var depth = (0, psdReader_1.readInt16)(reader); + var compression = (0, psdReader_1.readUint8)(reader); // 0 - raw, 1 - RLE + var alpha = new Uint8Array(w * h); + if (depth === 8) { + if (compression === 0) { + alpha.set((0, psdReader_1.readBytes)(reader, alpha.byteLength)); + } + else if (compression === 1) { + (0, psdReader_1.readDataRLE)(reader, { width: w, height: h, data: alpha }, w, h, 1, [0], false); + } + else { + throw new Error('Invalid compression'); + } + } + else if (depth === 16) { + if (compression === 0) { + for (var i = 0; i < alpha.byteLength; i++) { + alpha[i] = (0, psdReader_1.readUint16)(reader) >> 8; // convert to 8bit values + } + } + else if (compression === 1) { + throw new Error('not implemented (16bit RLE)'); // TODO: ... + } + else { + throw new Error('Invalid compression'); + } + } + else { + throw new Error('Invalid depth'); + } + samples.push({ id: id, bounds: { x: x, y: y, w: w, h: h }, alpha: alpha }); + reader.offset = brushEnd; + } + break; + } + case 'desc': { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + for (var _i = 0, _e = desc.Brsh; _i < _e.length; _i++) { + var brush = _e[_i]; + var b = { + name: brush['Nm '], + shape: parseBrushShape(brush.Brsh), + spacing: (0, descriptor_1.parsePercent)(brush.Spcn), + // TODO: brushGroup ??? + wetEdges: brush.Wtdg, + noise: brush.Nose, + // TODO: TxtC ??? smoothing / build-up ? + // TODO: 'Rpt ' ??? + useBrushSize: brush.useBrushSize, // ??? + }; + if (brush.interpretation != null) + b.interpretation = brush.interpretation; + if (brush.protectTexture != null) + b.protectTexture = brush.protectTexture; + if (brush.useTipDynamics) { + b.shapeDynamics = { + tiltScale: (0, descriptor_1.parsePercent)(brush.tiltScale), + sizeDynamics: parseDynamics(brush.szVr), + angleDynamics: parseDynamics(brush.angleDynamics), + roundnessDynamics: parseDynamics(brush.roundnessDynamics), + flipX: brush.flipX, + flipY: brush.flipY, + brushProjection: brush.brushProjection, + minimumDiameter: (0, descriptor_1.parsePercent)(brush.minimumDiameter), + minimumRoundness: (0, descriptor_1.parsePercent)(brush.minimumRoundness), + }; + } + if (brush.useScatter) { + b.scatter = { + count: brush['Cnt '], + bothAxes: brush.bothAxes, + countDynamics: parseDynamics(brush.countDynamics), + scatterDynamics: parseDynamics(brush.scatterDynamics), + }; + } + if (brush.useTexture && brush.Txtr) { + b.texture = { + id: brush.Txtr.Idnt, + name: brush.Txtr['Nm '], + blendMode: descriptor_1.BlnM.decode(brush.textureBlendMode), + depth: (0, descriptor_1.parsePercent)(brush.textureDepth), + depthMinimum: (0, descriptor_1.parsePercent)(brush.minimumDepth), + depthDynamics: parseDynamics(brush.textureDepthDynamics), + scale: (0, descriptor_1.parsePercent)(brush.textureScale), + invert: brush.InvT, + brightness: brush.textureBrightness, + contrast: brush.textureContrast, + }; + } + var db = brush.dualBrush; + if (db && db.useDualBrush) { + b.dualBrush = { + flip: db.Flip, + shape: parseBrushShape(db.Brsh), + blendMode: descriptor_1.BlnM.decode(db.BlnM), + useScatter: db.useScatter, + spacing: (0, descriptor_1.parsePercent)(db.Spcn), + count: db['Cnt '], + bothAxes: db.bothAxes, + countDynamics: parseDynamics(db.countDynamics), + scatterDynamics: parseDynamics(db.scatterDynamics), + }; + } + if (brush.useColorDynamics) { + b.colorDynamics = { + foregroundBackground: parseDynamics(brush.clVr), + hue: (0, descriptor_1.parsePercent)(brush['H ']), + saturation: (0, descriptor_1.parsePercent)(brush.Strt), + brightness: (0, descriptor_1.parsePercent)(brush.Brgh), + purity: (0, descriptor_1.parsePercent)(brush.purity), + perTip: brush.colorDynamicsPerTip, + }; + } + if (brush.usePaintDynamics) { + b.transfer = { + flowDynamics: parseDynamics(brush.prVr), + opacityDynamics: parseDynamics(brush.opVr), + wetnessDynamics: parseDynamics(brush.wtVr), + mixDynamics: parseDynamics(brush.mxVr), + }; + } + if (brush.useBrushPose) { + b.brushPose = { + overrideAngle: brush.overridePoseAngle, + overrideTiltX: brush.overridePoseTiltX, + overrideTiltY: brush.overridePoseTiltY, + overridePressure: brush.overridePosePressure, + pressure: (0, descriptor_1.parsePercent)(brush.brushPosePressure), + tiltX: brush.brushPoseTiltX, + tiltY: brush.brushPoseTiltY, + angle: brush.brushPoseAngle, + }; + } + var to = brush.toolOptions; + if (to) { + b.toolOptions = { + brushPreset: to.brushPreset, + flow: (_a = to.flow) !== null && _a !== void 0 ? _a : 100, + smooth: (_b = to.Smoo) !== null && _b !== void 0 ? _b : 0, + mode: descriptor_1.BlnM.decode(to['Md '] || 'BlnM.Nrml'), + opacity: (_c = to.Opct) !== null && _c !== void 0 ? _c : 100, + smoothing: !!to.smoothing, + smoothingValue: to.smoothingValue || 0, + smoothingRadiusMode: !!to.smoothingRadiusMode, + smoothingCatchup: !!to.smoothingCatchup, + smoothingCatchupAtEnd: !!to.smoothingCatchupAtEnd, + smoothingZoomCompensation: !!to.smoothingZoomCompensation, + pressureSmoothing: !!to.pressureSmoothing, + usePressureOverridesSize: !!to.usePressureOverridesSize, + usePressureOverridesOpacity: !!to.usePressureOverridesOpacity, + useLegacy: !!to.useLegacy, + }; + if (to.prVr) { + b.toolOptions.flowDynamics = parseDynamics(to.prVr); + } + if (to.opVr) { + b.toolOptions.opacityDynamics = parseDynamics(to.opVr); + } + if (to.szVr) { + b.toolOptions.sizeDynamics = parseDynamics(to.szVr); + } + } + brushes.push(b); + } + break; + } + case 'patt': { + if (reader.offset < end) { // TODO: check multiple patterns + patterns.push((0, psdReader_1.readPattern)(reader)); + reader.offset = end; + } + break; + } + case 'phry': { + // TODO: what is this ? + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + if (options.logMissingFeatures) { + if ((_d = desc.hierarchy) === null || _d === void 0 ? void 0 : _d.length) { + console.log('unhandled phry section', desc); + } + } + break; + } + default: + throw new Error("Invalid brush type: ".concat(type)); + } + // align to 4 bytes + while (size % 4) { + reader.offset++; + size++; + } + } + } + else { + throw new Error("Unsupported ABR version (".concat(version, ")")); + } + return { samples: samples, patterns: patterns, brushes: brushes }; +} +exports.readAbr = readAbr; + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFici50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSwyQ0FBa0k7QUFFbEkseUNBR3FCO0FBcUJyQixJQUFNLGVBQWUsR0FBRyxDQUFDLEtBQUssRUFBRSxNQUFNLEVBQUUsY0FBYyxFQUFFLFVBQVUsRUFBRSxjQUFjLEVBQUUsbUJBQW1CLEVBQUU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GlsZSAoc2l6ZSAlIDQpIHtcclxuXHRcdFx0XHRyZWFkZXIub2Zmc2V0Kys7XHJcblx0XHRcdFx0c2l6ZSsrO1xyXG5cdFx0XHR9XHJcblx0XHR9XHJcblx0fSBlbHNlIHtcclxuXHRcdHRocm93IG5ldyBFcnJvcihgVW5zdXBwb3J0ZWQgQUJSIHZlcnNpb24gKCR7dmVyc2lvbn0pYCk7XHJcblx0fVxyXG5cclxuXHRyZXR1cm4geyBzYW1wbGVzLCBwYXR0ZXJucywgYnJ1c2hlcyB9O1xyXG59XHJcbiJdLCJzb3VyY2VSb290IjoiQzpcXFByb2plY3RzXFxnaXRodWJcXGFnLXBzZFxcc3JjIn0= diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/abr.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/abr.js.map deleted file mode 100644 index b9b3998..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/abr.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"abr.js","sourceRoot":"../src/","sources":["abr.ts"],"names":[],"mappings":";;;AAAA,2CAAkI;AAElI,yCAGqB;AAqBrB,IAAM,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE,mBAAmB,EAAE,WAAW,EAAE,kBAAkB,EAAE,UAAU,CAAC,CAAC;AAkPtJ,SAAS,aAAa,CAAC,IAAwB;IAC9C,OAAO;QACN,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,IAAI,CAAQ;QAC1C,KAAK,EAAE,IAAI,CAAC,IAAI;QAChB,MAAM,EAAE,IAAA,yBAAY,EAAC,IAAI,CAAC,MAAM,CAAC;QACjC,OAAO,EAAE,IAAA,yBAAY,EAAC,IAAI,CAAC,MAAM,CAAC,CAAC;KACnC,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CAAC,IAA0B;IAClD,IAAM,KAAK,GAAe;QACzB,IAAI,EAAE,IAAA,+BAAkB,EAAC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nC,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC;qBACpB;oBACD,MAAM;iBACN;gBACD,KAAK,MAAM,CAAC,CAAC;oBACZ,uBAAuB;oBACvB,IAAM,IAAI,GAAmB,IAAA,qCAAwB,EAAC,MAAM,CAAC,CAAC;oBAC9D,IAAI,OAAO,CAAC,kBAAkB,EAAE;wBAC/B,IAAI,MAAA,IAAI,CAAC,SAAS,0CAAE,MAAM,EAAE;4BAC3B,OAAO,CAAC,GAAG,CAAC,wBAAwB,EAAE,IAAI,CAAC,CAAC;yBAC5C;qBACD;oBACD,MAAM;iBACN;gBACD;oBACC,MAAM,IAAI,KAAK,CAAC,8BAAuB,IAAI,CAAE,CAAC,CAAC;aAChD;YAED,mBAAmB;YACnB,OAAO,IAAI,GAAG,CAAC,EAAE;gBAChB,MAAM,CAAC,MAAM,EAAE,CAAC;gBAChB,IAAI,EAAE,CAAC;aACP;SACD;KACD;SAAM;QACN,MAAM,IAAI,KAAK,CAAC,mCAA4B,OAAO,MAAG,CAAC,CAAC;KACxD;IAED,OAAO,EAAE,OAAO,SAAA,EAAE,QAAQ,UAAA,EAAE,OAAO,SAAA,EAAE,CAAC;AACvC,CAAC;AApPD,0BAoPC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/additionalInfo.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/additionalInfo.d.ts index 0d92d0a..2e21b34 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/additionalInfo.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/additionalInfo.d.ts @@ -1,25 +1,25 @@ -import { LayerAdditionalInfo, BezierPath, Psd, ReadOptions, WriteOptions, BooleanOperation, LayerEffectsInfo, LayerVectorMask } from './psd'; -import { PsdReader } from './psdReader'; -import { PsdWriter } from './psdWriter'; -export interface ExtendedWriteOptions extends WriteOptions { - layerIds: Set; - layerToId: Map; -} -type HasMethod = (target: LayerAdditionalInfo) => boolean; -type ReadMethod = (reader: PsdReader, target: LayerAdditionalInfo, left: () => number, psd: Psd, options: ReadOptions) => void; -type WriteMethod = (writer: PsdWriter, target: LayerAdditionalInfo, psd: Psd, options: ExtendedWriteOptions) => void; -export interface InfoHandler { - key: string; - has: HasMethod; - read: ReadMethod; - write: WriteMethod; -} -export declare const infoHandlers: InfoHandler[]; -export declare const infoHandlersMap: { - [key: string]: InfoHandler; -}; -export declare function readBezierKnot(reader: PsdReader, width: number, height: number): number[]; -export declare const booleanOperations: BooleanOperation[]; -export declare function readVectorMask(reader: PsdReader, vectorMask: LayerVectorMask, width: number, height: number, size: number): BezierPath[]; -export declare function hasMultiEffects(effects: LayerEffectsInfo): boolean; -export {}; +import { LayerAdditionalInfo, BezierPath, Psd, ReadOptions, WriteOptions, BooleanOperation, LayerEffectsInfo, LayerVectorMask } from './psd'; +import { PsdReader } from './psdReader'; +import { PsdWriter } from './psdWriter'; +export interface ExtendedWriteOptions extends WriteOptions { + layerIds: Set; + layerToId: Map; +} +declare type HasMethod = (target: LayerAdditionalInfo) => boolean; +declare type ReadMethod = (reader: PsdReader, target: LayerAdditionalInfo, left: () => number, psd: Psd, options: ReadOptions) => void; +declare type WriteMethod = (writer: PsdWriter, target: LayerAdditionalInfo, psd: Psd, options: ExtendedWriteOptions) => void; +export interface InfoHandler { + key: string; + has: HasMethod; + read: ReadMethod; + write: WriteMethod; +} +export declare const infoHandlers: InfoHandler[]; +export declare const infoHandlersMap: { + [key: string]: InfoHandler; +}; +export declare function readBezierKnot(reader: PsdReader, width: number, height: number): number[]; +export declare const booleanOperations: BooleanOperation[]; +export declare function readVectorMask(reader: PsdReader, vectorMask: LayerVectorMask, width: number, height: number, size: number): BezierPath[]; +export declare function hasMultiEffects(effects: LayerEffectsInfo): boolean; +export {}; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/additionalInfo.js b/npm-packages/mac-v2.4.x/ag-psd/dist/additionalInfo.js index d595bde..143cf29 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/additionalInfo.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/additionalInfo.js @@ -1,2276 +1,2045 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.hasMultiEffects = exports.readVectorMask = exports.booleanOperations = exports.readBezierKnot = exports.infoHandlersMap = exports.infoHandlers = void 0; -var base64_js_1 = require("base64-js"); -var effectsHelpers_1 = require("./effectsHelpers"); -var helpers_1 = require("./helpers"); -var psdReader_1 = require("./psdReader"); -var psdWriter_1 = require("./psdWriter"); -var descriptor_1 = require("./descriptor"); -var engineData_1 = require("./engineData"); -var text_1 = require("./text"); -exports.infoHandlers = []; -exports.infoHandlersMap = {}; -function addHandler(key, has, read, write) { - var handler = { key: key, has: has, read: read, write: write }; - exports.infoHandlers.push(handler); - exports.infoHandlersMap[handler.key] = handler; -} -function addHandlerAlias(key, target) { - exports.infoHandlersMap[key] = exports.infoHandlersMap[target]; -} -function hasKey(key) { - return function (target) { return target[key] !== undefined; }; -} -function readLength64(reader) { - if ((0, psdReader_1.readUint32)(reader)) - throw new Error("Resource size above 4 GB limit at ".concat(reader.offset.toString(16))); - return (0, psdReader_1.readUint32)(reader); -} -function writeLength64(writer, length) { - (0, psdWriter_1.writeUint32)(writer, 0); - (0, psdWriter_1.writeUint32)(writer, length); -} -addHandler('TySh', hasKey('text'), function (reader, target, leftBytes) { - if ((0, psdReader_1.readInt16)(reader) !== 1) - throw new Error("Invalid TySh version"); - var transform = []; - for (var i = 0; i < 6; i++) - transform.push((0, psdReader_1.readFloat64)(reader)); - if ((0, psdReader_1.readInt16)(reader) !== 50) - throw new Error("Invalid TySh text version"); - var text = (0, descriptor_1.readVersionAndDescriptor)(reader); - if ((0, psdReader_1.readInt16)(reader) !== 1) - throw new Error("Invalid TySh warp version"); - var warp = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.text = { - transform: transform, - left: (0, psdReader_1.readFloat32)(reader), - top: (0, psdReader_1.readFloat32)(reader), - right: (0, psdReader_1.readFloat32)(reader), - bottom: (0, psdReader_1.readFloat32)(reader), - text: text['Txt '].replace(/\r/g, '\n'), - index: text.TextIndex || 0, - gridding: descriptor_1.textGridding.decode(text.textGridding), - antiAlias: descriptor_1.Annt.decode(text.AntA), - orientation: descriptor_1.Ornt.decode(text.Ornt), - warp: { - style: descriptor_1.warpStyle.decode(warp.warpStyle), - value: warp.warpValue || 0, - perspective: warp.warpPerspective || 0, - perspectiveOther: warp.warpPerspectiveOther || 0, - rotate: descriptor_1.Ornt.decode(warp.warpRotate), - }, - }; - if (text.EngineData) { - var engineData = (0, engineData_1.parseEngineData)(text.EngineData); - var textData = (0, text_1.decodeEngineData)(engineData); - // require('fs').writeFileSync(`layer-${target.name}.txt`, require('util').inspect(engineData, false, 99, false), 'utf8'); - // const before = parseEngineData(text.EngineData); - // const after = encodeEngineData(engineData); - // require('fs').writeFileSync('before.txt', require('util').inspect(before, false, 99, false), 'utf8'); - // require('fs').writeFileSync('after.txt', require('util').inspect(after, false, 99, false), 'utf8'); - // console.log(require('util').inspect(parseEngineData(text.EngineData), false, 99, true)); - target.text = __assign(__assign({}, target.text), textData); - // console.log(require('util').inspect(target.text, false, 99, true)); - } - (0, psdReader_1.skipBytes)(reader, leftBytes()); -}, function (writer, target) { - var text = target.text; - var warp = text.warp || {}; - var transform = text.transform || [1, 0, 0, 1, 0, 0]; - var textDescriptor = { - 'Txt ': (text.text || '').replace(/\r?\n/g, '\r'), - textGridding: descriptor_1.textGridding.encode(text.gridding), - Ornt: descriptor_1.Ornt.encode(text.orientation), - AntA: descriptor_1.Annt.encode(text.antiAlias), - TextIndex: text.index || 0, - EngineData: (0, engineData_1.serializeEngineData)((0, text_1.encodeEngineData)(text)), - }; - (0, psdWriter_1.writeInt16)(writer, 1); // version - for (var i = 0; i < 6; i++) { - (0, psdWriter_1.writeFloat64)(writer, transform[i]); - } - (0, psdWriter_1.writeInt16)(writer, 50); // text version - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'TxLr', textDescriptor); - (0, psdWriter_1.writeInt16)(writer, 1); // warp version - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'warp', encodeWarp(warp)); - (0, psdWriter_1.writeFloat32)(writer, text.left); - (0, psdWriter_1.writeFloat32)(writer, text.top); - (0, psdWriter_1.writeFloat32)(writer, text.right); - (0, psdWriter_1.writeFloat32)(writer, text.bottom); - // writeZeros(writer, 2); -}); -// vector fills -addHandler('SoCo', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && - target.vectorFill.type === 'color'; }, function (reader, target) { - var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.vectorFill = (0, descriptor_1.parseVectorContent)(descriptor); -}, function (writer, target) { - var descriptor = (0, descriptor_1.serializeVectorContent)(target.vectorFill).descriptor; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); -}); -addHandler('GdFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && - (target.vectorFill.type === 'solid' || target.vectorFill.type === 'noise'); }, function (reader, target, left) { - var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.vectorFill = (0, descriptor_1.parseVectorContent)(descriptor); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var descriptor = (0, descriptor_1.serializeVectorContent)(target.vectorFill).descriptor; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); -}); -addHandler('PtFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && - target.vectorFill.type === 'pattern'; }, function (reader, target) { - var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.vectorFill = (0, descriptor_1.parseVectorContent)(descriptor); -}, function (writer, target) { - var descriptor = (0, descriptor_1.serializeVectorContent)(target.vectorFill).descriptor; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); -}); -addHandler('vscg', function (target) { return target.vectorFill !== undefined && target.vectorStroke !== undefined; }, function (reader, target, left) { - (0, psdReader_1.readSignature)(reader); // key - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.vectorFill = (0, descriptor_1.parseVectorContent)(desc); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a = (0, descriptor_1.serializeVectorContent)(target.vectorFill), descriptor = _a.descriptor, key = _a.key; - (0, psdWriter_1.writeSignature)(writer, key); - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); -}); -function readBezierKnot(reader, width, height) { - var y0 = (0, psdReader_1.readFixedPointPath32)(reader) * height; - var x0 = (0, psdReader_1.readFixedPointPath32)(reader) * width; - var y1 = (0, psdReader_1.readFixedPointPath32)(reader) * height; - var x1 = (0, psdReader_1.readFixedPointPath32)(reader) * width; - var y2 = (0, psdReader_1.readFixedPointPath32)(reader) * height; - var x2 = (0, psdReader_1.readFixedPointPath32)(reader) * width; - return [x0, y0, x1, y1, x2, y2]; -} -exports.readBezierKnot = readBezierKnot; -function writeBezierKnot(writer, points, width, height) { - (0, psdWriter_1.writeFixedPointPath32)(writer, points[1] / height); // y0 - (0, psdWriter_1.writeFixedPointPath32)(writer, points[0] / width); // x0 - (0, psdWriter_1.writeFixedPointPath32)(writer, points[3] / height); // y1 - (0, psdWriter_1.writeFixedPointPath32)(writer, points[2] / width); // x1 - (0, psdWriter_1.writeFixedPointPath32)(writer, points[5] / height); // y2 - (0, psdWriter_1.writeFixedPointPath32)(writer, points[4] / width); // x2 -} -exports.booleanOperations = ['exclude', 'combine', 'subtract', 'intersect']; -function readVectorMask(reader, vectorMask, width, height, size) { - var end = reader.offset + size; - var paths = vectorMask.paths; - var path = undefined; - while ((end - reader.offset) >= 26) { - var selector = (0, psdReader_1.readUint16)(reader); - switch (selector) { - case 0: // Closed subpath length record - case 3: { // Open subpath length record - (0, psdReader_1.readUint16)(reader); // count - var boolOp = (0, psdReader_1.readInt16)(reader); - (0, psdReader_1.readUint16)(reader); // always 1 ? - (0, psdReader_1.skipBytes)(reader, 18); - // TODO: 'combine' here might be wrong - path = { open: selector === 3, operation: boolOp === -1 ? 'combine' : exports.booleanOperations[boolOp], knots: [] }; - paths.push(path); - break; - } - case 1: // Closed subpath Bezier knot, linked - case 2: // Closed subpath Bezier knot, unlinked - case 4: // Open subpath Bezier knot, linked - case 5: // Open subpath Bezier knot, unlinked - path.knots.push({ linked: (selector === 1 || selector === 4), points: readBezierKnot(reader, width, height) }); - break; - case 6: // Path fill rule record - (0, psdReader_1.skipBytes)(reader, 24); - break; - case 7: { // Clipboard record - // TODO: check if these need to be multiplied by document size - var top_1 = (0, psdReader_1.readFixedPointPath32)(reader); - var left = (0, psdReader_1.readFixedPointPath32)(reader); - var bottom = (0, psdReader_1.readFixedPointPath32)(reader); - var right = (0, psdReader_1.readFixedPointPath32)(reader); - var resolution = (0, psdReader_1.readFixedPointPath32)(reader); - (0, psdReader_1.skipBytes)(reader, 4); - vectorMask.clipboard = { top: top_1, left: left, bottom: bottom, right: right, resolution: resolution }; - break; - } - case 8: // Initial fill rule record - vectorMask.fillStartsWithAllPixels = !!(0, psdReader_1.readUint16)(reader); - (0, psdReader_1.skipBytes)(reader, 22); - break; - default: throw new Error('Invalid vmsk section'); - } - } - return paths; -} -exports.readVectorMask = readVectorMask; -addHandler('vmsk', hasKey('vectorMask'), function (reader, target, left, _a) { - var width = _a.width, height = _a.height; - if ((0, psdReader_1.readUint32)(reader) !== 3) - throw new Error('Invalid vmsk version'); - target.vectorMask = { paths: [] }; - var vectorMask = target.vectorMask; - var flags = (0, psdReader_1.readUint32)(reader); - vectorMask.invert = (flags & 1) !== 0; - vectorMask.notLink = (flags & 2) !== 0; - vectorMask.disable = (flags & 4) !== 0; - readVectorMask(reader, vectorMask, width, height, left()); - // drawBezierPaths(vectorMask.paths, width, height, 'out.png'); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target, _a) { - var width = _a.width, height = _a.height; - var vectorMask = target.vectorMask; - var flags = (vectorMask.invert ? 1 : 0) | - (vectorMask.notLink ? 2 : 0) | - (vectorMask.disable ? 4 : 0); - (0, psdWriter_1.writeUint32)(writer, 3); // version - (0, psdWriter_1.writeUint32)(writer, flags); - // initial entry - (0, psdWriter_1.writeUint16)(writer, 6); - (0, psdWriter_1.writeZeros)(writer, 24); - var clipboard = vectorMask.clipboard; - if (clipboard) { - (0, psdWriter_1.writeUint16)(writer, 7); - (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.top); - (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.left); - (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.bottom); - (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.right); - (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.resolution); - (0, psdWriter_1.writeZeros)(writer, 4); - } - if (vectorMask.fillStartsWithAllPixels !== undefined) { - (0, psdWriter_1.writeUint16)(writer, 8); - (0, psdWriter_1.writeUint16)(writer, vectorMask.fillStartsWithAllPixels ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 22); - } - for (var _i = 0, _b = vectorMask.paths; _i < _b.length; _i++) { - var path = _b[_i]; - (0, psdWriter_1.writeUint16)(writer, path.open ? 3 : 0); - (0, psdWriter_1.writeUint16)(writer, path.knots.length); - (0, psdWriter_1.writeUint16)(writer, Math.abs(exports.booleanOperations.indexOf(path.operation))); // default to 1 if not found - (0, psdWriter_1.writeUint16)(writer, 1); - (0, psdWriter_1.writeZeros)(writer, 18); // TODO: these are sometimes non-zero - var linkedKnot = path.open ? 4 : 1; - var unlinkedKnot = path.open ? 5 : 2; - for (var _c = 0, _d = path.knots; _c < _d.length; _c++) { - var _e = _d[_c], linked = _e.linked, points = _e.points; - (0, psdWriter_1.writeUint16)(writer, linked ? linkedKnot : unlinkedKnot); - writeBezierKnot(writer, points, width, height); - } - } -}); -// TODO: need to write vmsk if has outline ? -addHandlerAlias('vsms', 'vmsk'); -addHandler('vogk', hasKey('vectorOrigination'), function (reader, target, left) { - if ((0, psdReader_1.readInt32)(reader) !== 1) - throw new Error("Invalid vogk version"); - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - target.vectorOrigination = { keyDescriptorList: [] }; - for (var _i = 0, _a = desc.keyDescriptorList; _i < _a.length; _i++) { - var i = _a[_i]; - var item = {}; - if (i.keyShapeInvalidated != null) - item.keyShapeInvalidated = i.keyShapeInvalidated; - if (i.keyOriginType != null) - item.keyOriginType = i.keyOriginType; - if (i.keyOriginResolution != null) - item.keyOriginResolution = i.keyOriginResolution; - if (i.keyOriginShapeBBox) { - item.keyOriginShapeBoundingBox = { - top: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox['Top ']), - left: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox.Left), - bottom: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox.Btom), - right: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox.Rght), - }; - } - var rectRadii = i.keyOriginRRectRadii; - if (rectRadii) { - item.keyOriginRRectRadii = { - topRight: (0, descriptor_1.parseUnits)(rectRadii.topRight), - topLeft: (0, descriptor_1.parseUnits)(rectRadii.topLeft), - bottomLeft: (0, descriptor_1.parseUnits)(rectRadii.bottomLeft), - bottomRight: (0, descriptor_1.parseUnits)(rectRadii.bottomRight), - }; - } - var corners = i.keyOriginBoxCorners; - if (corners) { - item.keyOriginBoxCorners = [ - { x: corners.rectangleCornerA.Hrzn, y: corners.rectangleCornerA.Vrtc }, - { x: corners.rectangleCornerB.Hrzn, y: corners.rectangleCornerB.Vrtc }, - { x: corners.rectangleCornerC.Hrzn, y: corners.rectangleCornerC.Vrtc }, - { x: corners.rectangleCornerD.Hrzn, y: corners.rectangleCornerD.Vrtc }, - ]; - } - var trnf = i.Trnf; - if (trnf) { - item.transform = [trnf.xx, trnf.xy, trnf.xy, trnf.yy, trnf.tx, trnf.ty]; - } - target.vectorOrigination.keyDescriptorList.push(item); - } - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - target; - var orig = target.vectorOrigination; - var desc = { keyDescriptorList: [] }; - for (var i = 0; i < orig.keyDescriptorList.length; i++) { - var item = orig.keyDescriptorList[i]; - if (item.keyShapeInvalidated) { - desc.keyDescriptorList.push({ keyShapeInvalidated: true, keyOriginIndex: i }); - } - else { - desc.keyDescriptorList.push({}); // we're adding keyOriginIndex at the end - var out = desc.keyDescriptorList[desc.keyDescriptorList.length - 1]; - if (item.keyOriginType != null) - out.keyOriginType = item.keyOriginType; - if (item.keyOriginResolution != null) - out.keyOriginResolution = item.keyOriginResolution; - var radii = item.keyOriginRRectRadii; - if (radii) { - out.keyOriginRRectRadii = { - unitValueQuadVersion: 1, - topRight: (0, descriptor_1.unitsValue)(radii.topRight, 'topRight'), - topLeft: (0, descriptor_1.unitsValue)(radii.topLeft, 'topLeft'), - bottomLeft: (0, descriptor_1.unitsValue)(radii.bottomLeft, 'bottomLeft'), - bottomRight: (0, descriptor_1.unitsValue)(radii.bottomRight, 'bottomRight'), - }; - } - var box = item.keyOriginShapeBoundingBox; - if (box) { - out.keyOriginShapeBBox = { - unitValueQuadVersion: 1, - 'Top ': (0, descriptor_1.unitsValue)(box.top, 'top'), - Left: (0, descriptor_1.unitsValue)(box.left, 'left'), - Btom: (0, descriptor_1.unitsValue)(box.bottom, 'bottom'), - Rght: (0, descriptor_1.unitsValue)(box.right, 'right'), - }; - } - var corners = item.keyOriginBoxCorners; - if (corners && corners.length === 4) { - out.keyOriginBoxCorners = { - rectangleCornerA: { Hrzn: corners[0].x, Vrtc: corners[0].y }, - rectangleCornerB: { Hrzn: corners[1].x, Vrtc: corners[1].y }, - rectangleCornerC: { Hrzn: corners[2].x, Vrtc: corners[2].y }, - rectangleCornerD: { Hrzn: corners[3].x, Vrtc: corners[3].y }, - }; - } - var transform = item.transform; - if (transform && transform.length === 6) { - out.Trnf = { - xx: transform[0], - xy: transform[1], - yx: transform[2], - yy: transform[3], - tx: transform[4], - ty: transform[5], - }; - } - out.keyOriginIndex = i; - } - } - (0, psdWriter_1.writeInt32)(writer, 1); // version - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler('lmfx', function (target) { return target.effects !== undefined && hasMultiEffects(target.effects); }, function (reader, target, left, _, options) { - var version = (0, psdReader_1.readUint32)(reader); - if (version !== 0) - throw new Error('Invalid lmfx version'); - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(info, false, 99, true)); - // discard if read in 'lrFX' or 'lfx2' section - target.effects = (0, descriptor_1.parseEffects)(desc, !!options.logMissingFeatures); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target, _, options) { - var desc = (0, descriptor_1.serializeEffects)(target.effects, !!options.logMissingFeatures, true); - (0, psdWriter_1.writeUint32)(writer, 0); // version - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler('lrFX', hasKey('effects'), function (reader, target, left) { - if (!target.effects) - target.effects = (0, effectsHelpers_1.readEffects)(reader); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - (0, effectsHelpers_1.writeEffects)(writer, target.effects); -}); -addHandler('luni', hasKey('name'), function (reader, target, left) { - target.name = (0, psdReader_1.readUnicodeString)(reader); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeUnicodeString)(writer, target.name); - // writeUint16(writer, 0); // padding (but not extending string length) -}); -addHandler('lnsr', hasKey('nameSource'), function (reader, target) { return target.nameSource = (0, psdReader_1.readSignature)(reader); }, function (writer, target) { return (0, psdWriter_1.writeSignature)(writer, target.nameSource); }); -addHandler('lyid', hasKey('id'), function (reader, target) { return target.id = (0, psdReader_1.readUint32)(reader); }, function (writer, target, _psd, options) { - var id = target.id; - while (options.layerIds.has(id)) - id += 100; // make sure we don't have duplicate layer ids - (0, psdWriter_1.writeUint32)(writer, id); - options.layerIds.add(id); - options.layerToId.set(target, id); -}); -addHandler('lsct', hasKey('sectionDivider'), function (reader, target, left) { - target.sectionDivider = { type: (0, psdReader_1.readUint32)(reader) }; - if (left()) { - (0, psdReader_1.checkSignature)(reader, '8BIM'); - target.sectionDivider.key = (0, psdReader_1.readSignature)(reader); - } - if (left()) { - target.sectionDivider.subType = (0, psdReader_1.readUint32)(reader); - } -}, function (writer, target) { - (0, psdWriter_1.writeUint32)(writer, target.sectionDivider.type); - if (target.sectionDivider.key) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, target.sectionDivider.key); - if (target.sectionDivider.subType !== undefined) { - (0, psdWriter_1.writeUint32)(writer, target.sectionDivider.subType); - } - } -}); -// it seems lsdk is used when there's a layer is nested more than 6 levels, but I don't know why? -// maybe some limitation of old version of PS? -addHandlerAlias('lsdk', 'lsct'); -addHandler('clbl', hasKey('blendClippendElements'), function (reader, target) { - target.blendClippendElements = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.skipBytes)(reader, 3); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.blendClippendElements ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -addHandler('infx', hasKey('blendInteriorElements'), function (reader, target) { - target.blendInteriorElements = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.skipBytes)(reader, 3); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.blendInteriorElements ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -addHandler('knko', hasKey('knockout'), function (reader, target) { - target.knockout = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.skipBytes)(reader, 3); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.knockout ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -addHandler('lmgm', hasKey('layerMaskAsGlobalMask'), function (reader, target) { - target.layerMaskAsGlobalMask = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.skipBytes)(reader, 3); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.layerMaskAsGlobalMask ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -addHandler('lspf', hasKey('protected'), function (reader, target) { - var flags = (0, psdReader_1.readUint32)(reader); - target.protected = { - transparency: (flags & 0x01) !== 0, - composite: (flags & 0x02) !== 0, - position: (flags & 0x04) !== 0, - }; - if (flags & 0x08) - target.protected.artboards = true; -}, function (writer, target) { - var flags = (target.protected.transparency ? 0x01 : 0) | - (target.protected.composite ? 0x02 : 0) | - (target.protected.position ? 0x04 : 0) | - (target.protected.artboards ? 0x08 : 0); - (0, psdWriter_1.writeUint32)(writer, flags); -}); -addHandler('lclr', hasKey('layerColor'), function (reader, target) { - var color = (0, psdReader_1.readUint16)(reader); - (0, psdReader_1.skipBytes)(reader, 6); - target.layerColor = helpers_1.layerColors[color]; -}, function (writer, target) { - var index = helpers_1.layerColors.indexOf(target.layerColor); - (0, psdWriter_1.writeUint16)(writer, index === -1 ? 0 : index); - (0, psdWriter_1.writeZeros)(writer, 6); -}); -addHandler('shmd', function (target) { return target.timestamp !== undefined || target.animationFrames !== undefined || - target.animationFrameFlags !== undefined || target.timeline !== undefined; }, function (reader, target, left, _, options) { - var count = (0, psdReader_1.readUint32)(reader); - var _loop_1 = function (i) { - (0, psdReader_1.checkSignature)(reader, '8BIM'); - var key = (0, psdReader_1.readSignature)(reader); - (0, psdReader_1.readUint8)(reader); // copy - (0, psdReader_1.skipBytes)(reader, 3); - (0, psdReader_1.readSection)(reader, 1, function (left) { - if (key === 'cust') { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log('cust', target.name, require('util').inspect(desc, false, 99, true)); - if (desc.layerTime !== undefined) - target.timestamp = desc.layerTime; - } - else if (key === 'mlst') { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log('mlst', target.name, require('util').inspect(desc, false, 99, true)); - target.animationFrames = []; - for (var i_1 = 0; i_1 < desc.LaSt.length; i_1++) { - var f = desc.LaSt[i_1]; - var frame = { frames: f.FrLs }; - if (f.enab !== undefined) - frame.enable = f.enab; - if (f.Ofst) - frame.offset = (0, descriptor_1.horzVrtcToXY)(f.Ofst); - if (f.FXRf) - frame.referencePoint = (0, descriptor_1.horzVrtcToXY)(f.FXRf); - if (f.Lefx) - frame.effects = (0, descriptor_1.parseEffects)(f.Lefx, !!options.logMissingFeatures); - if (f.blendOptions && f.blendOptions.Opct) - frame.opacity = (0, descriptor_1.parsePercent)(f.blendOptions.Opct); - target.animationFrames.push(frame); - } - } - else if (key === 'mdyn') { - // frame flags - (0, psdReader_1.readUint16)(reader); // unknown - var propagate = (0, psdReader_1.readUint8)(reader); - var flags = (0, psdReader_1.readUint8)(reader); - target.animationFrameFlags = { - propagateFrameOne: !propagate, - unifyLayerPosition: (flags & 1) !== 0, - unifyLayerStyle: (flags & 2) !== 0, - unifyLayerVisibility: (flags & 4) !== 0, - }; - } - else if (key === 'tmln') { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - var timeScope = desc.timeScope; - // console.log('tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); - var timeline = { - start: timeScope.Strt, - duration: timeScope.duration, - inTime: timeScope.inTime, - outTime: timeScope.outTime, - autoScope: desc.autoScope, - audioLevel: desc.audioLevel, - }; - if (desc.trackList) { - timeline.tracks = (0, descriptor_1.parseTrackList)(desc.trackList, !!options.logMissingFeatures); - } - target.timeline = timeline; - // console.log('tmln:result', target.name, target.id, require('util').inspect(timeline, false, 99, true)); - } - else { - options.logDevFeatures && console.log('Unhandled "shmd" section key', key); - } - (0, psdReader_1.skipBytes)(reader, left()); - }); - }; - for (var i = 0; i < count; i++) { - _loop_1(i); - } - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target, _, options) { - var animationFrames = target.animationFrames, animationFrameFlags = target.animationFrameFlags, timestamp = target.timestamp, timeline = target.timeline; - var count = 0; - if (animationFrames) - count++; - if (animationFrameFlags) - count++; - if (timeline) - count++; - if (timestamp !== undefined) - count++; - (0, psdWriter_1.writeUint32)(writer, count); - if (animationFrames) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'mlst'); - (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) - (0, psdWriter_1.writeZeros)(writer, 3); - (0, psdWriter_1.writeSection)(writer, 2, function () { - var _a; - var desc = { - LaID: (_a = target.id) !== null && _a !== void 0 ? _a : 0, - LaSt: [], - }; - for (var i = 0; i < animationFrames.length; i++) { - var f = animationFrames[i]; - var frame = {}; - if (f.enable !== undefined) - frame.enab = f.enable; - frame.FrLs = f.frames; - if (f.offset) - frame.Ofst = (0, descriptor_1.xyToHorzVrtc)(f.offset); - if (f.referencePoint) - frame.FXRf = (0, descriptor_1.xyToHorzVrtc)(f.referencePoint); - if (f.effects) - frame.Lefx = (0, descriptor_1.serializeEffects)(f.effects, false, false); - if (f.opacity !== undefined) - frame.blendOptions = { Opct: (0, descriptor_1.unitsPercent)(f.opacity) }; - desc.LaSt.push(frame); - } - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - }, true); - } - if (animationFrameFlags) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'mdyn'); - (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) - (0, psdWriter_1.writeZeros)(writer, 3); - (0, psdWriter_1.writeSection)(writer, 2, function () { - (0, psdWriter_1.writeUint16)(writer, 0); // unknown - (0, psdWriter_1.writeUint8)(writer, animationFrameFlags.propagateFrameOne ? 0x0 : 0xf); - (0, psdWriter_1.writeUint8)(writer, (animationFrameFlags.unifyLayerPosition ? 1 : 0) | - (animationFrameFlags.unifyLayerStyle ? 2 : 0) | - (animationFrameFlags.unifyLayerVisibility ? 4 : 0)); - }); - } - if (timeline) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'tmln'); - (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) - (0, psdWriter_1.writeZeros)(writer, 3); - (0, psdWriter_1.writeSection)(writer, 2, function () { - var desc = { - Vrsn: 1, - timeScope: { - Vrsn: 1, - Strt: timeline.start, - duration: timeline.duration, - inTime: timeline.inTime, - outTime: timeline.outTime, - }, - autoScope: timeline.autoScope, - audioLevel: timeline.audioLevel, - }; - if (timeline.tracks) { - desc.trackList = (0, descriptor_1.serializeTrackList)(timeline.tracks); - } - var id = options.layerToId.get(target) || target.id || 0; - if (!id) - throw new Error('You need to provide layer.id value whan writing document with animations'); - desc.LyrI = id; - // console.log('WRITE:tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'anim'); - }, true); - } - if (timestamp !== undefined) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'cust'); - (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) - (0, psdWriter_1.writeZeros)(writer, 3); - (0, psdWriter_1.writeSection)(writer, 2, function () { - var desc = { - layerTime: timestamp, - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'metadata', desc); - }, true); - } -}); -addHandler('vstk', hasKey('vectorStroke'), function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - target.vectorStroke = { - strokeEnabled: desc.strokeEnabled, - fillEnabled: desc.fillEnabled, - lineWidth: (0, descriptor_1.parseUnits)(desc.strokeStyleLineWidth), - lineDashOffset: (0, descriptor_1.parseUnits)(desc.strokeStyleLineDashOffset), - miterLimit: desc.strokeStyleMiterLimit, - lineCapType: descriptor_1.strokeStyleLineCapType.decode(desc.strokeStyleLineCapType), - lineJoinType: descriptor_1.strokeStyleLineJoinType.decode(desc.strokeStyleLineJoinType), - lineAlignment: descriptor_1.strokeStyleLineAlignment.decode(desc.strokeStyleLineAlignment), - scaleLock: desc.strokeStyleScaleLock, - strokeAdjust: desc.strokeStyleStrokeAdjust, - lineDashSet: desc.strokeStyleLineDashSet.map(descriptor_1.parseUnits), - blendMode: descriptor_1.BlnM.decode(desc.strokeStyleBlendMode), - opacity: (0, descriptor_1.parsePercent)(desc.strokeStyleOpacity), - content: (0, descriptor_1.parseVectorContent)(desc.strokeStyleContent), - resolution: desc.strokeStyleResolution, - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a, _b, _c; - var stroke = target.vectorStroke; - var descriptor = { - strokeStyleVersion: 2, - strokeEnabled: !!stroke.strokeEnabled, - fillEnabled: !!stroke.fillEnabled, - strokeStyleLineWidth: stroke.lineWidth || { value: 3, units: 'Points' }, - strokeStyleLineDashOffset: stroke.lineDashOffset || { value: 0, units: 'Points' }, - strokeStyleMiterLimit: (_a = stroke.miterLimit) !== null && _a !== void 0 ? _a : 100, - strokeStyleLineCapType: descriptor_1.strokeStyleLineCapType.encode(stroke.lineCapType), - strokeStyleLineJoinType: descriptor_1.strokeStyleLineJoinType.encode(stroke.lineJoinType), - strokeStyleLineAlignment: descriptor_1.strokeStyleLineAlignment.encode(stroke.lineAlignment), - strokeStyleScaleLock: !!stroke.scaleLock, - strokeStyleStrokeAdjust: !!stroke.strokeAdjust, - strokeStyleLineDashSet: stroke.lineDashSet || [], - strokeStyleBlendMode: descriptor_1.BlnM.encode(stroke.blendMode), - strokeStyleOpacity: (0, descriptor_1.unitsPercent)((_b = stroke.opacity) !== null && _b !== void 0 ? _b : 1), - strokeStyleContent: (0, descriptor_1.serializeVectorContent)(stroke.content || { type: 'color', color: { r: 0, g: 0, b: 0 } }).descriptor, - strokeStyleResolution: (_c = stroke.resolution) !== null && _c !== void 0 ? _c : 72, - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'strokeStyle', descriptor); -}); -addHandler('artb', // per-layer arboard info -hasKey('artboard'), function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - var rect = desc.artboardRect; - target.artboard = { - rect: { top: rect['Top '], left: rect.Left, bottom: rect.Btom, right: rect.Rght }, - guideIndices: desc.guideIndeces, - presetName: desc.artboardPresetName, - color: (0, descriptor_1.parseColor)(desc['Clr ']), - backgroundType: desc.artboardBackgroundType, - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a; - var artboard = target.artboard; - var rect = artboard.rect; - var desc = { - artboardRect: { 'Top ': rect.top, Left: rect.left, Btom: rect.bottom, Rght: rect.right }, - guideIndeces: artboard.guideIndices || [], - artboardPresetName: artboard.presetName || '', - 'Clr ': (0, descriptor_1.serializeColor)(artboard.color), - artboardBackgroundType: (_a = artboard.backgroundType) !== null && _a !== void 0 ? _a : 1, - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'artboard', desc); -}); -addHandler('sn2P', hasKey('usingAlignedRendering'), function (reader, target) { return target.usingAlignedRendering = !!(0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.usingAlignedRendering ? 1 : 0); }); -var placedLayerTypes = ['unknown', 'vector', 'raster', 'image stack']; -function parseWarp(warp) { - var _a, _b, _c, _d, _e, _f; - var result = __assign(__assign({ style: descriptor_1.warpStyle.decode(warp.warpStyle) }, (warp.warpValues ? { values: warp.warpValues } : { value: warp.warpValue || 0 })), { perspective: warp.warpPerspective || 0, perspectiveOther: warp.warpPerspectiveOther || 0, rotate: descriptor_1.Ornt.decode(warp.warpRotate), bounds: warp.bounds && { - top: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds['Top ']), - left: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds.Left), - bottom: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds.Btom), - right: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds.Rght), - }, uOrder: warp.uOrder, vOrder: warp.vOrder }); - if (warp.deformNumRows != null || warp.deformNumCols != null) { - result.deformNumRows = warp.deformNumRows; - result.deformNumCols = warp.deformNumCols; - } - var envelopeWarp = warp.customEnvelopeWarp; - if (envelopeWarp) { - result.customEnvelopeWarp = { - meshPoints: [], - }; - var xs = ((_a = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Hrzn'; })) === null || _a === void 0 ? void 0 : _a.values) || []; - var ys = ((_b = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Vrtc'; })) === null || _b === void 0 ? void 0 : _b.values) || []; - for (var i = 0; i < xs.length; i++) { - result.customEnvelopeWarp.meshPoints.push({ x: xs[i], y: ys[i] }); - } - if (envelopeWarp.quiltSliceX || envelopeWarp.quiltSliceY) { - result.customEnvelopeWarp.quiltSliceX = ((_d = (_c = envelopeWarp.quiltSliceX) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.values) || []; - result.customEnvelopeWarp.quiltSliceY = ((_f = (_e = envelopeWarp.quiltSliceY) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.values) || []; - } - } - return result; -} -function isQuiltWarp(warp) { - var _a, _b; - return warp.deformNumCols != null || warp.deformNumRows != null || - ((_a = warp.customEnvelopeWarp) === null || _a === void 0 ? void 0 : _a.quiltSliceX) || ((_b = warp.customEnvelopeWarp) === null || _b === void 0 ? void 0 : _b.quiltSliceY); -} -function encodeWarp(warp) { - var bounds = warp.bounds; - var desc = __assign(__assign({ warpStyle: descriptor_1.warpStyle.encode(warp.style) }, (warp.values ? { warpValues: warp.values } : { warpValue: warp.value })), { warpPerspective: warp.perspective || 0, warpPerspectiveOther: warp.perspectiveOther || 0, warpRotate: descriptor_1.Ornt.encode(warp.rotate), bounds: { - 'Top ': (0, descriptor_1.unitsValue)(bounds && bounds.top || { units: 'Pixels', value: 0 }, 'bounds.top'), - Left: (0, descriptor_1.unitsValue)(bounds && bounds.left || { units: 'Pixels', value: 0 }, 'bounds.left'), - Btom: (0, descriptor_1.unitsValue)(bounds && bounds.bottom || { units: 'Pixels', value: 0 }, 'bounds.bottom'), - Rght: (0, descriptor_1.unitsValue)(bounds && bounds.right || { units: 'Pixels', value: 0 }, 'bounds.right'), - }, uOrder: warp.uOrder || 0, vOrder: warp.vOrder || 0 }); - var isQuilt = isQuiltWarp(warp); - if (isQuilt) { - var desc2 = desc; - desc2.deformNumRows = warp.deformNumRows || 0; - desc2.deformNumCols = warp.deformNumCols || 0; - } - var customEnvelopeWarp = warp.customEnvelopeWarp; - if (customEnvelopeWarp) { - var meshPoints = customEnvelopeWarp.meshPoints || []; - if (isQuilt) { - var desc2 = desc; - desc2.customEnvelopeWarp = { - quiltSliceX: [{ - type: 'quiltSliceX', - values: customEnvelopeWarp.quiltSliceX || [], - }], - quiltSliceY: [{ - type: 'quiltSliceY', - values: customEnvelopeWarp.quiltSliceY || [], - }], - meshPoints: [ - { type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) }, - { type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) }, - ], - }; - } - else { - desc.customEnvelopeWarp = { - meshPoints: [ - { type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) }, - { type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) }, - ], - }; - } - } - return desc; -} -addHandler('PlLd', hasKey('placedLayer'), function (reader, target, left) { - if ((0, psdReader_1.readSignature)(reader) !== 'plcL') - throw new Error("Invalid PlLd signature"); - if ((0, psdReader_1.readInt32)(reader) !== 3) - throw new Error("Invalid PlLd version"); - var id = (0, psdReader_1.readPascalString)(reader, 1); - var pageNumber = (0, psdReader_1.readInt32)(reader); - var totalPages = (0, psdReader_1.readInt32)(reader); // TODO: check how this works ? - (0, psdReader_1.readInt32)(reader); // anitAliasPolicy 16 - var placedLayerType = (0, psdReader_1.readInt32)(reader); // 0 = unknown, 1 = vector, 2 = raster, 3 = image stack - if (!placedLayerTypes[placedLayerType]) - throw new Error('Invalid PlLd type'); - var transform = []; - for (var i = 0; i < 8; i++) - transform.push((0, psdReader_1.readFloat64)(reader)); // x, y of 4 corners of the transform - var warpVersion = (0, psdReader_1.readInt32)(reader); - if (warpVersion !== 0) - throw new Error("Invalid Warp version ".concat(warpVersion)); - var warp = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.placedLayer = target.placedLayer || { - id: id, - type: placedLayerTypes[placedLayerType], - pageNumber: pageNumber, - totalPages: totalPages, - transform: transform, - warp: parseWarp(warp), - }; - // console.log('PlLd warp', require('util').inspect(warp, false, 99, true)); - // console.log('PlLd', require('util').inspect(target.placedLayer, false, 99, true)); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var placed = target.placedLayer; - (0, psdWriter_1.writeSignature)(writer, 'plcL'); - (0, psdWriter_1.writeInt32)(writer, 3); // version - (0, psdWriter_1.writePascalString)(writer, placed.id, 1); - (0, psdWriter_1.writeInt32)(writer, 1); // pageNumber - (0, psdWriter_1.writeInt32)(writer, 1); // totalPages - (0, psdWriter_1.writeInt32)(writer, 16); // anitAliasPolicy - if (placedLayerTypes.indexOf(placed.type) === -1) - throw new Error('Invalid placedLayer type'); - (0, psdWriter_1.writeInt32)(writer, placedLayerTypes.indexOf(placed.type)); - for (var i = 0; i < 8; i++) - (0, psdWriter_1.writeFloat64)(writer, placed.transform[i]); - (0, psdWriter_1.writeInt32)(writer, 0); // warp version - var isQuilt = placed.warp && isQuiltWarp(placed.warp); - var type = isQuilt ? 'quiltWarp' : 'warp'; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', type, encodeWarp(placed.warp || {}), type); -}); -function uint8ToFloat32(array) { - return new Float32Array(array.buffer.slice(array.byteOffset), 0, array.byteLength / 4); -} -function uint8ToUint32(array) { - return new Uint32Array(array.buffer.slice(array.byteOffset), 0, array.byteLength / 4); -} -function toUint8(array) { - return new Uint8Array(array.buffer, array.byteOffset, array.byteLength); -} -function arrayToPoints(array) { - var points = []; - for (var i = 0; i < array.length; i += 2) { - points.push({ x: array[i], y: array[i + 1] }); - } - return points; -} -function pointsToArray(points) { - var array = []; - for (var i = 0; i < points.length; i++) { - array.push(points[i].x, points[i].y); - } - return array; -} -function uin8ToPoints(array) { - return arrayToPoints(uint8ToFloat32(array)); -} -function hrznVrtcToPoint(desc) { - return { - x: (0, descriptor_1.parseUnits)(desc.Hrzn), - y: (0, descriptor_1.parseUnits)(desc.Vrtc), - }; -} -function pointToHrznVrtc(point) { - return { - Hrzn: (0, descriptor_1.unitsValue)(point.x, 'x'), - Vrtc: (0, descriptor_1.unitsValue)(point.y, 'y'), - }; -} -function parseFilterFX(desc) { - return { - enabled: desc.enab, - validAtPosition: desc.validAtPosition, - maskEnabled: desc.filterMaskEnable, - maskLinked: desc.filterMaskLinked, - maskExtendWithWhite: desc.filterMaskExtendWithWhite, - list: desc.filterFXList.map(function (f) { return ({ - id: f.filterID, - name: f['Nm '], - opacity: (0, descriptor_1.parsePercent)(f.blendOptions.Opct), - blendMode: descriptor_1.BlnM.decode(f.blendOptions['Md ']), - enabled: f.enab, - hasOptions: f.hasoptions, - foregroundColor: (0, descriptor_1.parseColor)(f.FrgC), - backgroundColor: (0, descriptor_1.parseColor)(f.BckC), - filter: { - rigidType: f.Fltr.rigidType, - bounds: [ - { x: f.Fltr.PuX0, y: f.Fltr.PuY0, }, - { x: f.Fltr.PuX1, y: f.Fltr.PuY1, }, - { x: f.Fltr.PuX2, y: f.Fltr.PuY2, }, - { x: f.Fltr.PuX3, y: f.Fltr.PuY3, }, - ], - puppetShapeList: f.Fltr.puppetShapeList.map(function (p) { return ({ - rigidType: p.rigidType, - // TODO: VrsM - // TODO: VrsN - originalVertexArray: uin8ToPoints(p.originalVertexArray), - deformedVertexArray: uin8ToPoints(p.deformedVertexArray), - indexArray: Array.from(uint8ToUint32(p.indexArray)), - pinOffsets: arrayToPoints(p.pinOffsets), - posFinalPins: arrayToPoints(p.posFinalPins), - pinVertexIndices: p.pinVertexIndices, - selectedPin: p.selectedPin, - pinPosition: arrayToPoints(p.PinP), - pinRotation: p.PnRt, - pinOverlay: p.PnOv, - pinDepth: p.PnDp, - meshQuality: p.meshQuality, - meshExpansion: p.meshExpansion, - meshRigidity: p.meshRigidity, - imageResolution: p.imageResolution, - meshBoundaryPath: { - pathComponents: p.meshBoundaryPath.pathComponents.map(function (c) { return ({ - shapeOperation: c.shapeOperation.split('.')[1], - paths: c.SbpL.map(function (t) { return ({ - closed: t.Clsp, - points: t['Pts '].map(function (pt) { return ({ - anchor: hrznVrtcToPoint(pt.Anch), - forward: hrznVrtcToPoint(pt['Fwd ']), - backward: hrznVrtcToPoint(pt['Bwd ']), - smooth: pt.Smoo, - }); }), - }); }), - }); }), - }, - }); }), - }, - }); }), - }; -} -function serializeFilterFX(filter) { - return { - enab: filter.enabled, - validAtPosition: filter.validAtPosition, - filterMaskEnable: filter.maskEnabled, - filterMaskLinked: filter.maskLinked, - filterMaskExtendWithWhite: filter.maskExtendWithWhite, - filterFXList: (filter.list || []).map(function (f) { return ({ - 'Nm ': f.name, - blendOptions: { - Opct: (0, descriptor_1.unitsPercent)(f.opacity), - 'Md ': descriptor_1.BlnM.encode(f.blendMode), - }, - enab: f.enabled, - hasoptions: f.hasOptions, - FrgC: (0, descriptor_1.serializeColor)(f.foregroundColor), - BckC: (0, descriptor_1.serializeColor)(f.backgroundColor), - Fltr: { - 'null': ['Ordn.Trgt'], - rigidType: f.filter.rigidType, - puppetShapeList: (f.filter.puppetShapeList || []).map(function (p) { return ({ - rigidType: p.rigidType, - VrsM: 1, - VrsN: 0, - originalVertexArray: toUint8(new Float32Array(pointsToArray(p.originalVertexArray))), - deformedVertexArray: toUint8(new Float32Array(pointsToArray(p.deformedVertexArray))), - indexArray: toUint8(new Uint32Array(p.indexArray)), - pinOffsets: pointsToArray(p.pinOffsets), - posFinalPins: pointsToArray(p.posFinalPins), - selectedPin: p.selectedPin, - pinVertexIndices: p.pinVertexIndices, - PinP: pointsToArray(p.pinPosition), - PnRt: p.pinRotation, - PnOv: p.pinOverlay, - PnDp: p.pinDepth, - meshQuality: p.meshQuality, - meshExpansion: p.meshExpansion, - meshRigidity: p.meshRigidity, - imageResolution: p.imageResolution, - meshBoundaryPath: { - pathComponents: (p.meshBoundaryPath.pathComponents || []).map(function (c) { return ({ - shapeOperation: "shapeOperation.".concat(c.shapeOperation), - SbpL: (c.paths || []).map(function (path) { return ({ - Clsp: path.closed, - 'Pts ': (path.points || []).map(function (pt) { return ({ - Anch: pointToHrznVrtc(pt.anchor), - 'Fwd ': pointToHrznVrtc(pt.forward), - 'Bwd ': pointToHrznVrtc(pt.backward), - Smoo: pt.smooth, - }); }), - }); }), - }); }), - }, - }); }), - PuX0: f.filter.bounds[0].x, - PuX1: f.filter.bounds[1].x, - PuX2: f.filter.bounds[2].x, - PuX3: f.filter.bounds[3].x, - PuY0: f.filter.bounds[0].y, - PuY1: f.filter.bounds[1].y, - PuY2: f.filter.bounds[2].y, - PuY3: f.filter.bounds[3].y, - }, - filterID: f.id, - }); }), - }; -} -addHandler('SoLd', hasKey('placedLayer'), function (reader, target, left) { - if ((0, psdReader_1.readSignature)(reader) !== 'soLD') - throw new Error("Invalid SoLd type"); - var version = (0, psdReader_1.readInt32)(reader); - if (version !== 4 && version !== 5) - throw new Error("Invalid SoLd version"); - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log('SoLd', require('util').inspect(desc, false, 99, true)); - // console.log('SoLd.warp', require('util').inspect(desc.warp, false, 99, true)); - // console.log('SoLd.quiltWarp', require('util').inspect(desc.quiltWarp, false, 99, true)); - // desc.filterFX!.filterFXList[0].Fltr.puppetShapeList[0].meshBoundaryPath.pathComponents[0].SbpL[0]['Pts '] = []; - // console.log('filterFX', require('util').inspect(desc.filterFX, false, 99, true)); - target.placedLayer = { - id: desc.Idnt, - placed: desc.placed, - type: placedLayerTypes[desc.Type], - pageNumber: desc.PgNm, - totalPages: desc.totalPages, - frameStep: desc.frameStep, - duration: desc.duration, - frameCount: desc.frameCount, - transform: desc.Trnf, - width: desc['Sz '].Wdth, - height: desc['Sz '].Hght, - resolution: (0, descriptor_1.parseUnits)(desc.Rslt), - warp: parseWarp((desc.quiltWarp || desc.warp)), - }; - if (desc.nonAffineTransform && desc.nonAffineTransform.some(function (x, i) { return x !== desc.Trnf[i]; })) { - target.placedLayer.nonAffineTransform = desc.nonAffineTransform; - } - if (desc.Crop) - target.placedLayer.crop = desc.Crop; - if (desc.comp) - target.placedLayer.comp = desc.comp; - if (desc.compInfo) - target.placedLayer.compInfo = desc.compInfo; - if (desc.filterFX) - target.placedLayer.filter = parseFilterFX(desc.filterFX); - (0, psdReader_1.skipBytes)(reader, left()); // HACK -}, function (writer, target) { - var _a, _b; - (0, psdWriter_1.writeSignature)(writer, 'soLD'); - (0, psdWriter_1.writeInt32)(writer, 4); // version - var placed = target.placedLayer; - var desc = __assign(__assign({ Idnt: placed.id, placed: (_a = placed.placed) !== null && _a !== void 0 ? _a : placed.id, PgNm: placed.pageNumber || 1, totalPages: placed.totalPages || 1 }, (placed.crop ? { Crop: placed.crop } : {})), { frameStep: placed.frameStep || { numerator: 0, denominator: 600 }, duration: placed.duration || { numerator: 0, denominator: 600 }, frameCount: placed.frameCount || 0, Annt: 16, Type: placedLayerTypes.indexOf(placed.type), Trnf: placed.transform, nonAffineTransform: (_b = placed.nonAffineTransform) !== null && _b !== void 0 ? _b : placed.transform, quiltWarp: {}, warp: encodeWarp(placed.warp || {}), 'Sz ': { - Wdth: placed.width || 0, - Hght: placed.height || 0, // TODO: find size ? - }, Rslt: placed.resolution ? (0, descriptor_1.unitsValue)(placed.resolution, 'resolution') : { units: 'Density', value: 72 } }); - if (placed.filter) - desc.filterFX = serializeFilterFX(placed.filter); - if (placed.warp && isQuiltWarp(placed.warp)) { - var quiltWarp = encodeWarp(placed.warp); - desc.quiltWarp = quiltWarp; - desc.warp = { - warpStyle: 'warpStyle.warpNone', - warpValue: quiltWarp.warpValue, - warpPerspective: quiltWarp.warpPerspective, - warpPerspectiveOther: quiltWarp.warpPerspectiveOther, - warpRotate: quiltWarp.warpRotate, - bounds: quiltWarp.bounds, - uOrder: quiltWarp.uOrder, - vOrder: quiltWarp.vOrder, - }; - } - else { - delete desc.quiltWarp; - } - if (placed.comp) - desc.comp = placed.comp; - if (placed.compInfo) - desc.compInfo = placed.compInfo; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, desc.quiltWarp ? 'quiltWarp' : 'warp'); -}); -addHandlerAlias('SoLE', 'SoLd'); -addHandler('fxrp', hasKey('referencePoint'), function (reader, target) { - target.referencePoint = { - x: (0, psdReader_1.readFloat64)(reader), - y: (0, psdReader_1.readFloat64)(reader), - }; -}, function (writer, target) { - (0, psdWriter_1.writeFloat64)(writer, target.referencePoint.x); - (0, psdWriter_1.writeFloat64)(writer, target.referencePoint.y); -}); -if (helpers_1.MOCK_HANDLERS) { - addHandler('Patt', function (target) { return target._Patt !== undefined; }, function (reader, target, left) { - // console.log('additional info: Patt'); - target._Patt = (0, psdReader_1.readBytes)(reader, left()); - }, function (writer, target) { return false && (0, psdWriter_1.writeBytes)(writer, target._Patt); }); -} -else { - addHandler('Patt', // TODO: handle also Pat2 & Pat3 - function (// TODO: handle also Pat2 & Pat3 - target) { return !target; }, function (reader, target, left) { - if (!left()) - return; - (0, psdReader_1.skipBytes)(reader, left()); - return; // not supported yet - target; - psdReader_1.readPattern; - // if (!target.patterns) target.patterns = []; - // target.patterns.push(readPattern(reader)); - // skipBytes(reader, left()); - }, function (_writer, _target) { - }); -} -function readRect(reader) { - var top = (0, psdReader_1.readInt32)(reader); - var left = (0, psdReader_1.readInt32)(reader); - var bottom = (0, psdReader_1.readInt32)(reader); - var right = (0, psdReader_1.readInt32)(reader); - return { top: top, left: left, bottom: bottom, right: right }; -} -function writeRect(writer, rect) { - (0, psdWriter_1.writeInt32)(writer, rect.top); - (0, psdWriter_1.writeInt32)(writer, rect.left); - (0, psdWriter_1.writeInt32)(writer, rect.bottom); - (0, psdWriter_1.writeInt32)(writer, rect.right); -} -addHandler('Anno', function (target) { return target.annotations !== undefined; }, function (reader, target, left) { - var major = (0, psdReader_1.readUint16)(reader); - var minor = (0, psdReader_1.readUint16)(reader); - if (major !== 2 || minor !== 1) - throw new Error('Invalid Anno version'); - var count = (0, psdReader_1.readUint32)(reader); - var annotations = []; - for (var i = 0; i < count; i++) { - /*const length =*/ (0, psdReader_1.readUint32)(reader); - var type = (0, psdReader_1.readSignature)(reader); - var open_1 = !!(0, psdReader_1.readUint8)(reader); - /*const flags =*/ (0, psdReader_1.readUint8)(reader); // always 28 - /*const optionalBlocks =*/ (0, psdReader_1.readUint16)(reader); - var iconLocation = readRect(reader); - var popupLocation = readRect(reader); - var color = (0, psdReader_1.readColor)(reader); - var author = (0, psdReader_1.readPascalString)(reader, 2); - var name_1 = (0, psdReader_1.readPascalString)(reader, 2); - var date = (0, psdReader_1.readPascalString)(reader, 2); - /*const contentLength =*/ (0, psdReader_1.readUint32)(reader); - /*const dataType =*/ (0, psdReader_1.readSignature)(reader); - var dataLength = (0, psdReader_1.readUint32)(reader); - var data = void 0; - if (type === 'txtA') { - if (dataLength >= 2 && (0, psdReader_1.readUint16)(reader) === 0xfeff) { - data = (0, psdReader_1.readUnicodeStringWithLength)(reader, (dataLength - 2) / 2); - } - else { - reader.offset -= 2; - data = (0, psdReader_1.readAsciiString)(reader, dataLength); - } - data = data.replace(/\r/g, '\n'); - } - else if (type === 'sndA') { - data = (0, psdReader_1.readBytes)(reader, dataLength); - } - else { - throw new Error('Unknown annotation type'); - } - annotations.push({ - type: type === 'txtA' ? 'text' : 'sound', - open: open_1, - iconLocation: iconLocation, - popupLocation: popupLocation, - color: color, - author: author, - name: name_1, - date: date, - data: data, - }); - } - target.annotations = annotations; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var annotations = target.annotations; - (0, psdWriter_1.writeUint16)(writer, 2); - (0, psdWriter_1.writeUint16)(writer, 1); - (0, psdWriter_1.writeUint32)(writer, annotations.length); - for (var _i = 0, annotations_1 = annotations; _i < annotations_1.length; _i++) { - var annotation = annotations_1[_i]; - var sound = annotation.type === 'sound'; - if (sound && !(annotation.data instanceof Uint8Array)) - throw new Error('Sound annotation data should be Uint8Array'); - if (!sound && typeof annotation.data !== 'string') - throw new Error('Text annotation data should be string'); - var lengthOffset = writer.offset; - (0, psdWriter_1.writeUint32)(writer, 0); // length - (0, psdWriter_1.writeSignature)(writer, sound ? 'sndA' : 'txtA'); - (0, psdWriter_1.writeUint8)(writer, annotation.open ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, 28); - (0, psdWriter_1.writeUint16)(writer, 1); - writeRect(writer, annotation.iconLocation); - writeRect(writer, annotation.popupLocation); - (0, psdWriter_1.writeColor)(writer, annotation.color); - (0, psdWriter_1.writePascalString)(writer, annotation.author || '', 2); - (0, psdWriter_1.writePascalString)(writer, annotation.name || '', 2); - (0, psdWriter_1.writePascalString)(writer, annotation.date || '', 2); - var contentOffset = writer.offset; - (0, psdWriter_1.writeUint32)(writer, 0); // content length - (0, psdWriter_1.writeSignature)(writer, sound ? 'sndM' : 'txtC'); - (0, psdWriter_1.writeUint32)(writer, 0); // data length - var dataOffset = writer.offset; - if (sound) { - (0, psdWriter_1.writeBytes)(writer, annotation.data); - } - else { - (0, psdWriter_1.writeUint16)(writer, 0xfeff); // unicode string indicator - var text = annotation.data.replace(/\n/g, '\r'); - for (var i = 0; i < text.length; i++) - (0, psdWriter_1.writeUint16)(writer, text.charCodeAt(i)); - } - writer.view.setUint32(lengthOffset, writer.offset - lengthOffset, false); - writer.view.setUint32(contentOffset, writer.offset - contentOffset, false); - writer.view.setUint32(dataOffset - 4, writer.offset - dataOffset, false); - } -}); -addHandler('lnk2', function (target) { return !!target.linkedFiles && target.linkedFiles.length > 0; }, function (reader, target, left, _, options) { - var psd = target; - psd.linkedFiles = psd.linkedFiles || []; - while (left() > 8) { - var size = readLength64(reader); // size - var startOffset = reader.offset; - var type = (0, psdReader_1.readSignature)(reader); - var version = (0, psdReader_1.readInt32)(reader); - var id = (0, psdReader_1.readPascalString)(reader, 1); - var name_2 = (0, psdReader_1.readUnicodeString)(reader); - var fileType = (0, psdReader_1.readSignature)(reader).trim(); // ' ' if empty - var fileCreator = (0, psdReader_1.readSignature)(reader).trim(); // ' ' or '\0\0\0\0' if empty - var dataSize = readLength64(reader); - var hasFileOpenDescriptor = (0, psdReader_1.readUint8)(reader); - var fileOpenDescriptor = hasFileOpenDescriptor ? (0, descriptor_1.readVersionAndDescriptor)(reader) : undefined; - var linkedFileDescriptor = type === 'liFE' ? (0, descriptor_1.readVersionAndDescriptor)(reader) : undefined; - var file = { id: id, name: name_2, data: undefined }; - if (fileType) - file.type = fileType; - if (fileCreator) - file.creator = fileCreator; - if (fileOpenDescriptor) - file.descriptor = fileOpenDescriptor; - if (type === 'liFE' && version > 3) { - var year = (0, psdReader_1.readInt32)(reader); - var month = (0, psdReader_1.readUint8)(reader); - var day = (0, psdReader_1.readUint8)(reader); - var hour = (0, psdReader_1.readUint8)(reader); - var minute = (0, psdReader_1.readUint8)(reader); - var seconds = (0, psdReader_1.readFloat64)(reader); - var wholeSeconds = Math.floor(seconds); - var ms = (seconds - wholeSeconds) * 1000; - file.time = (new Date(year, month, day, hour, minute, wholeSeconds, ms)).toISOString(); - } - var fileSize = type === 'liFE' ? readLength64(reader) : 0; - if (type === 'liFA') - (0, psdReader_1.skipBytes)(reader, 8); - if (type === 'liFD') - file.data = (0, psdReader_1.readBytes)(reader, dataSize); - if (version >= 5) - file.childDocumentID = (0, psdReader_1.readUnicodeString)(reader); - if (version >= 6) - file.assetModTime = (0, psdReader_1.readFloat64)(reader); - if (version >= 7) - file.assetLockedState = (0, psdReader_1.readUint8)(reader); - if (type === 'liFE') - file.data = (0, psdReader_1.readBytes)(reader, fileSize); - if (options.skipLinkedFilesData) - file.data = undefined; - psd.linkedFiles.push(file); - linkedFileDescriptor; - while (size % 4) - size++; - reader.offset = startOffset + size; - } - (0, psdReader_1.skipBytes)(reader, left()); // ? -}, function (writer, target) { - var psd = target; - for (var _i = 0, _a = psd.linkedFiles; _i < _a.length; _i++) { - var file = _a[_i]; - var version = 2; - if (file.assetLockedState != null) - version = 7; - else if (file.assetModTime != null) - version = 6; - else if (file.childDocumentID != null) - version = 5; - // TODO: else if (file.time != null) version = 3; (only for liFE) - (0, psdWriter_1.writeUint32)(writer, 0); - (0, psdWriter_1.writeUint32)(writer, 0); // size - var sizeOffset = writer.offset; - (0, psdWriter_1.writeSignature)(writer, file.data ? 'liFD' : 'liFA'); - (0, psdWriter_1.writeInt32)(writer, version); - (0, psdWriter_1.writePascalString)(writer, file.id || '', 1); - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, file.name || ''); - (0, psdWriter_1.writeSignature)(writer, file.type ? "".concat(file.type, " ").substring(0, 4) : ' '); - (0, psdWriter_1.writeSignature)(writer, file.creator ? "".concat(file.creator, " ").substring(0, 4) : '\0\0\0\0'); - writeLength64(writer, file.data ? file.data.byteLength : 0); - if (file.descriptor && file.descriptor.compInfo) { - var desc = { - compInfo: file.descriptor.compInfo, - }; - (0, psdWriter_1.writeUint8)(writer, 1); - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - } - else { - (0, psdWriter_1.writeUint8)(writer, 0); - } - if (file.data) - (0, psdWriter_1.writeBytes)(writer, file.data); - else - writeLength64(writer, 0); - if (version >= 5) - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, file.childDocumentID || ''); - if (version >= 6) - (0, psdWriter_1.writeFloat64)(writer, file.assetModTime || 0); - if (version >= 7) - (0, psdWriter_1.writeUint8)(writer, file.assetLockedState || 0); - var size = writer.offset - sizeOffset; - writer.view.setUint32(sizeOffset - 4, size, false); // write size - while (size % 4) { - size++; - (0, psdWriter_1.writeUint8)(writer, 0); - } - } -}); -addHandlerAlias('lnkD', 'lnk2'); -addHandlerAlias('lnk3', 'lnk2'); -addHandlerAlias('lnkE', 'lnk2'); -addHandler('pths', hasKey('pathList'), function (reader, target) { - var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.pathList = []; // TODO: read paths (find example with non-empty list) - descriptor; - // console.log('pths', descriptor); // TODO: remove this -}, function (writer, _target) { - var descriptor = { - pathList: [], // TODO: write paths - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'pathsDataClass', descriptor); -}); -addHandler('lyvr', hasKey('version'), function (reader, target) { return target.version = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.version); }); -function adjustmentType(type) { - return function (target) { return !!target.adjustment && target.adjustment.type === type; }; -} -addHandler('brit', adjustmentType('brightness/contrast'), function (reader, target, left) { - if (!target.adjustment) { // ignore if got one from CgEd block - target.adjustment = { - type: 'brightness/contrast', - brightness: (0, psdReader_1.readInt16)(reader), - contrast: (0, psdReader_1.readInt16)(reader), - meanValue: (0, psdReader_1.readInt16)(reader), - labColorOnly: !!(0, psdReader_1.readUint8)(reader), - useLegacy: true, - }; - } - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a; - var info = target.adjustment; - (0, psdWriter_1.writeInt16)(writer, info.brightness || 0); - (0, psdWriter_1.writeInt16)(writer, info.contrast || 0); - (0, psdWriter_1.writeInt16)(writer, (_a = info.meanValue) !== null && _a !== void 0 ? _a : 127); - (0, psdWriter_1.writeUint8)(writer, info.labColorOnly ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 1); -}); -function readLevelsChannel(reader) { - var shadowInput = (0, psdReader_1.readInt16)(reader); - var highlightInput = (0, psdReader_1.readInt16)(reader); - var shadowOutput = (0, psdReader_1.readInt16)(reader); - var highlightOutput = (0, psdReader_1.readInt16)(reader); - var midtoneInput = (0, psdReader_1.readInt16)(reader) / 100; - return { shadowInput: shadowInput, highlightInput: highlightInput, shadowOutput: shadowOutput, highlightOutput: highlightOutput, midtoneInput: midtoneInput }; -} -function writeLevelsChannel(writer, channel) { - (0, psdWriter_1.writeInt16)(writer, channel.shadowInput); - (0, psdWriter_1.writeInt16)(writer, channel.highlightInput); - (0, psdWriter_1.writeInt16)(writer, channel.shadowOutput); - (0, psdWriter_1.writeInt16)(writer, channel.highlightOutput); - (0, psdWriter_1.writeInt16)(writer, Math.round(channel.midtoneInput * 100)); -} -addHandler('levl', adjustmentType('levels'), function (reader, target, left) { - if ((0, psdReader_1.readUint16)(reader) !== 2) - throw new Error('Invalid levl version'); - target.adjustment = __assign(__assign({}, target.adjustment), { type: 'levels', rgb: readLevelsChannel(reader), red: readLevelsChannel(reader), green: readLevelsChannel(reader), blue: readLevelsChannel(reader) }); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var defaultChannel = { - shadowInput: 0, - highlightInput: 255, - shadowOutput: 0, - highlightOutput: 255, - midtoneInput: 1, - }; - (0, psdWriter_1.writeUint16)(writer, 2); // version - writeLevelsChannel(writer, info.rgb || defaultChannel); - writeLevelsChannel(writer, info.red || defaultChannel); - writeLevelsChannel(writer, info.blue || defaultChannel); - writeLevelsChannel(writer, info.green || defaultChannel); - for (var i = 0; i < 59; i++) - writeLevelsChannel(writer, defaultChannel); -}); -function readCurveChannel(reader) { - var nodes = (0, psdReader_1.readUint16)(reader); - var channel = []; - for (var j = 0; j < nodes; j++) { - var output = (0, psdReader_1.readInt16)(reader); - var input = (0, psdReader_1.readInt16)(reader); - channel.push({ input: input, output: output }); - } - return channel; -} -function writeCurveChannel(writer, channel) { - (0, psdWriter_1.writeUint16)(writer, channel.length); - for (var _i = 0, channel_1 = channel; _i < channel_1.length; _i++) { - var n = channel_1[_i]; - (0, psdWriter_1.writeUint16)(writer, n.output); - (0, psdWriter_1.writeUint16)(writer, n.input); - } -} -addHandler('curv', adjustmentType('curves'), function (reader, target, left) { - (0, psdReader_1.readUint8)(reader); - if ((0, psdReader_1.readUint16)(reader) !== 1) - throw new Error('Invalid curv version'); - (0, psdReader_1.readUint16)(reader); - var channels = (0, psdReader_1.readUint16)(reader); - var info = { type: 'curves' }; - if (channels & 1) - info.rgb = readCurveChannel(reader); - if (channels & 2) - info.red = readCurveChannel(reader); - if (channels & 4) - info.green = readCurveChannel(reader); - if (channels & 8) - info.blue = readCurveChannel(reader); - target.adjustment = __assign(__assign({}, target.adjustment), info); - // ignoring, duplicate information - // checkSignature(reader, 'Crv '); - // const cVersion = readUint16(reader); - // readUint16(reader); - // const channelCount = readUint16(reader); - // for (let i = 0; i < channelCount; i++) { - // const index = readUint16(reader); - // const nodes = readUint16(reader); - // for (let j = 0; j < nodes; j++) { - // const output = readInt16(reader); - // const input = readInt16(reader); - // } - // } - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var rgb = info.rgb, red = info.red, green = info.green, blue = info.blue; - var channels = 0; - var channelCount = 0; - if (rgb && rgb.length) { - channels |= 1; - channelCount++; - } - if (red && red.length) { - channels |= 2; - channelCount++; - } - if (green && green.length) { - channels |= 4; - channelCount++; - } - if (blue && blue.length) { - channels |= 8; - channelCount++; - } - (0, psdWriter_1.writeUint8)(writer, 0); - (0, psdWriter_1.writeUint16)(writer, 1); // version - (0, psdWriter_1.writeUint16)(writer, 0); - (0, psdWriter_1.writeUint16)(writer, channels); - if (rgb && rgb.length) - writeCurveChannel(writer, rgb); - if (red && red.length) - writeCurveChannel(writer, red); - if (green && green.length) - writeCurveChannel(writer, green); - if (blue && blue.length) - writeCurveChannel(writer, blue); - (0, psdWriter_1.writeSignature)(writer, 'Crv '); - (0, psdWriter_1.writeUint16)(writer, 4); // version - (0, psdWriter_1.writeUint16)(writer, 0); - (0, psdWriter_1.writeUint16)(writer, channelCount); - if (rgb && rgb.length) { - (0, psdWriter_1.writeUint16)(writer, 0); - writeCurveChannel(writer, rgb); - } - if (red && red.length) { - (0, psdWriter_1.writeUint16)(writer, 1); - writeCurveChannel(writer, red); - } - if (green && green.length) { - (0, psdWriter_1.writeUint16)(writer, 2); - writeCurveChannel(writer, green); - } - if (blue && blue.length) { - (0, psdWriter_1.writeUint16)(writer, 3); - writeCurveChannel(writer, blue); - } - (0, psdWriter_1.writeZeros)(writer, 2); -}); -addHandler('expA', adjustmentType('exposure'), function (reader, target, left) { - if ((0, psdReader_1.readUint16)(reader) !== 1) - throw new Error('Invalid expA version'); - target.adjustment = __assign(__assign({}, target.adjustment), { type: 'exposure', exposure: (0, psdReader_1.readFloat32)(reader), offset: (0, psdReader_1.readFloat32)(reader), gamma: (0, psdReader_1.readFloat32)(reader) }); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, 1); // version - (0, psdWriter_1.writeFloat32)(writer, info.exposure); - (0, psdWriter_1.writeFloat32)(writer, info.offset); - (0, psdWriter_1.writeFloat32)(writer, info.gamma); - (0, psdWriter_1.writeZeros)(writer, 2); -}); -addHandler('vibA', adjustmentType('vibrance'), function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.adjustment = { type: 'vibrance' }; - if (desc.vibrance !== undefined) - target.adjustment.vibrance = desc.vibrance; - if (desc.Strt !== undefined) - target.adjustment.saturation = desc.Strt; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var desc = {}; - if (info.vibrance !== undefined) - desc.vibrance = info.vibrance; - if (info.saturation !== undefined) - desc.Strt = info.saturation; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -function readHueChannel(reader) { - return { - a: (0, psdReader_1.readInt16)(reader), - b: (0, psdReader_1.readInt16)(reader), - c: (0, psdReader_1.readInt16)(reader), - d: (0, psdReader_1.readInt16)(reader), - hue: (0, psdReader_1.readInt16)(reader), - saturation: (0, psdReader_1.readInt16)(reader), - lightness: (0, psdReader_1.readInt16)(reader), - }; -} -function writeHueChannel(writer, channel) { - var c = channel || {}; - (0, psdWriter_1.writeInt16)(writer, c.a || 0); - (0, psdWriter_1.writeInt16)(writer, c.b || 0); - (0, psdWriter_1.writeInt16)(writer, c.c || 0); - (0, psdWriter_1.writeInt16)(writer, c.d || 0); - (0, psdWriter_1.writeInt16)(writer, c.hue || 0); - (0, psdWriter_1.writeInt16)(writer, c.saturation || 0); - (0, psdWriter_1.writeInt16)(writer, c.lightness || 0); -} -addHandler('hue2', adjustmentType('hue/saturation'), function (reader, target, left) { - if ((0, psdReader_1.readUint16)(reader) !== 2) - throw new Error('Invalid hue2 version'); - target.adjustment = __assign(__assign({}, target.adjustment), { type: 'hue/saturation', master: readHueChannel(reader), reds: readHueChannel(reader), yellows: readHueChannel(reader), greens: readHueChannel(reader), cyans: readHueChannel(reader), blues: readHueChannel(reader), magentas: readHueChannel(reader) }); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, 2); // version - writeHueChannel(writer, info.master); - writeHueChannel(writer, info.reds); - writeHueChannel(writer, info.yellows); - writeHueChannel(writer, info.greens); - writeHueChannel(writer, info.cyans); - writeHueChannel(writer, info.blues); - writeHueChannel(writer, info.magentas); -}); -function readColorBalance(reader) { - return { - cyanRed: (0, psdReader_1.readInt16)(reader), - magentaGreen: (0, psdReader_1.readInt16)(reader), - yellowBlue: (0, psdReader_1.readInt16)(reader), - }; -} -function writeColorBalance(writer, value) { - (0, psdWriter_1.writeInt16)(writer, value.cyanRed || 0); - (0, psdWriter_1.writeInt16)(writer, value.magentaGreen || 0); - (0, psdWriter_1.writeInt16)(writer, value.yellowBlue || 0); -} -addHandler('blnc', adjustmentType('color balance'), function (reader, target, left) { - target.adjustment = { - type: 'color balance', - shadows: readColorBalance(reader), - midtones: readColorBalance(reader), - highlights: readColorBalance(reader), - preserveLuminosity: !!(0, psdReader_1.readUint8)(reader), - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - writeColorBalance(writer, info.shadows || {}); - writeColorBalance(writer, info.midtones || {}); - writeColorBalance(writer, info.highlights || {}); - (0, psdWriter_1.writeUint8)(writer, info.preserveLuminosity ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 1); -}); -addHandler('blwh', adjustmentType('black & white'), function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.adjustment = { - type: 'black & white', - reds: desc['Rd '], - yellows: desc.Yllw, - greens: desc['Grn '], - cyans: desc['Cyn '], - blues: desc['Bl '], - magentas: desc.Mgnt, - useTint: !!desc.useTint, - presetKind: desc.bwPresetKind, - presetFileName: desc.blackAndWhitePresetFileName, - }; - if (desc.tintColor !== undefined) - target.adjustment.tintColor = (0, descriptor_1.parseColor)(desc.tintColor); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var desc = { - 'Rd ': info.reds || 0, - Yllw: info.yellows || 0, - 'Grn ': info.greens || 0, - 'Cyn ': info.cyans || 0, - 'Bl ': info.blues || 0, - Mgnt: info.magentas || 0, - useTint: !!info.useTint, - tintColor: (0, descriptor_1.serializeColor)(info.tintColor), - bwPresetKind: info.presetKind || 0, - blackAndWhitePresetFileName: info.presetFileName || '', - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler('phfl', adjustmentType('photo filter'), function (reader, target, left) { - var version = (0, psdReader_1.readUint16)(reader); - if (version !== 2 && version !== 3) - throw new Error('Invalid phfl version'); - var color; - if (version === 2) { - color = (0, psdReader_1.readColor)(reader); - } - else { // version 3 - // TODO: test this, this is probably wrong - color = { - l: (0, psdReader_1.readInt32)(reader) / 100, - a: (0, psdReader_1.readInt32)(reader) / 100, - b: (0, psdReader_1.readInt32)(reader) / 100, - }; - } - target.adjustment = { - type: 'photo filter', - color: color, - density: (0, psdReader_1.readUint32)(reader) / 100, - preserveLuminosity: !!(0, psdReader_1.readUint8)(reader), - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, 2); // version - (0, psdWriter_1.writeColor)(writer, info.color || { l: 0, a: 0, b: 0 }); - (0, psdWriter_1.writeUint32)(writer, (info.density || 0) * 100); - (0, psdWriter_1.writeUint8)(writer, info.preserveLuminosity ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -function readMixrChannel(reader) { - var red = (0, psdReader_1.readInt16)(reader); - var green = (0, psdReader_1.readInt16)(reader); - var blue = (0, psdReader_1.readInt16)(reader); - (0, psdReader_1.skipBytes)(reader, 2); - var constant = (0, psdReader_1.readInt16)(reader); - return { red: red, green: green, blue: blue, constant: constant }; -} -function writeMixrChannel(writer, channel) { - var c = channel || {}; - (0, psdWriter_1.writeInt16)(writer, c.red); - (0, psdWriter_1.writeInt16)(writer, c.green); - (0, psdWriter_1.writeInt16)(writer, c.blue); - (0, psdWriter_1.writeZeros)(writer, 2); - (0, psdWriter_1.writeInt16)(writer, c.constant); -} -addHandler('mixr', adjustmentType('channel mixer'), function (reader, target, left) { - if ((0, psdReader_1.readUint16)(reader) !== 1) - throw new Error('Invalid mixr version'); - var adjustment = target.adjustment = __assign(__assign({}, target.adjustment), { type: 'channel mixer', monochrome: !!(0, psdReader_1.readUint16)(reader) }); - if (!adjustment.monochrome) { - adjustment.red = readMixrChannel(reader); - adjustment.green = readMixrChannel(reader); - adjustment.blue = readMixrChannel(reader); - } - adjustment.gray = readMixrChannel(reader); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, 1); // version - (0, psdWriter_1.writeUint16)(writer, info.monochrome ? 1 : 0); - if (info.monochrome) { - writeMixrChannel(writer, info.gray); - (0, psdWriter_1.writeZeros)(writer, 3 * 5 * 2); - } - else { - writeMixrChannel(writer, info.red); - writeMixrChannel(writer, info.green); - writeMixrChannel(writer, info.blue); - writeMixrChannel(writer, info.gray); - } -}); -var colorLookupType = (0, helpers_1.createEnum)('colorLookupType', '3DLUT', { - '3dlut': '3DLUT', - abstractProfile: 'abstractProfile', - deviceLinkProfile: 'deviceLinkProfile', -}); -var LUTFormatType = (0, helpers_1.createEnum)('LUTFormatType', 'look', { - look: 'LUTFormatLOOK', - cube: 'LUTFormatCUBE', - '3dl': 'LUTFormat3DL', -}); -var colorLookupOrder = (0, helpers_1.createEnum)('colorLookupOrder', 'rgb', { - rgb: 'rgbOrder', - bgr: 'bgrOrder', -}); -addHandler('clrL', adjustmentType('color lookup'), function (reader, target, left) { - if ((0, psdReader_1.readUint16)(reader) !== 1) - throw new Error('Invalid clrL version'); - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.adjustment = { type: 'color lookup' }; - var info = target.adjustment; - if (desc.lookupType !== undefined) - info.lookupType = colorLookupType.decode(desc.lookupType); - if (desc['Nm '] !== undefined) - info.name = desc['Nm ']; - if (desc.Dthr !== undefined) - info.dither = desc.Dthr; - if (desc.profile !== undefined) - info.profile = desc.profile; - if (desc.LUTFormat !== undefined) - info.lutFormat = LUTFormatType.decode(desc.LUTFormat); - if (desc.dataOrder !== undefined) - info.dataOrder = colorLookupOrder.decode(desc.dataOrder); - if (desc.tableOrder !== undefined) - info.tableOrder = colorLookupOrder.decode(desc.tableOrder); - if (desc.LUT3DFileData !== undefined) - info.lut3DFileData = desc.LUT3DFileData; - if (desc.LUT3DFileName !== undefined) - info.lut3DFileName = desc.LUT3DFileName; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var desc = {}; - if (info.lookupType !== undefined) - desc.lookupType = colorLookupType.encode(info.lookupType); - if (info.name !== undefined) - desc['Nm '] = info.name; - if (info.dither !== undefined) - desc.Dthr = info.dither; - if (info.profile !== undefined) - desc.profile = info.profile; - if (info.lutFormat !== undefined) - desc.LUTFormat = LUTFormatType.encode(info.lutFormat); - if (info.dataOrder !== undefined) - desc.dataOrder = colorLookupOrder.encode(info.dataOrder); - if (info.tableOrder !== undefined) - desc.tableOrder = colorLookupOrder.encode(info.tableOrder); - if (info.lut3DFileData !== undefined) - desc.LUT3DFileData = info.lut3DFileData; - if (info.lut3DFileName !== undefined) - desc.LUT3DFileName = info.lut3DFileName; - (0, psdWriter_1.writeUint16)(writer, 1); // version - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler('nvrt', adjustmentType('invert'), function (reader, target, left) { - target.adjustment = { type: 'invert' }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function () { - // nothing to write here -}); -addHandler('post', adjustmentType('posterize'), function (reader, target, left) { - target.adjustment = { - type: 'posterize', - levels: (0, psdReader_1.readUint16)(reader), - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a; - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, (_a = info.levels) !== null && _a !== void 0 ? _a : 4); - (0, psdWriter_1.writeZeros)(writer, 2); -}); -addHandler('thrs', adjustmentType('threshold'), function (reader, target, left) { - target.adjustment = { - type: 'threshold', - level: (0, psdReader_1.readUint16)(reader), - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a; - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, (_a = info.level) !== null && _a !== void 0 ? _a : 128); - (0, psdWriter_1.writeZeros)(writer, 2); -}); -var grdmColorModels = ['', '', '', 'rgb', 'hsb', '', 'lab']; -addHandler('grdm', adjustmentType('gradient map'), function (reader, target, left) { - if ((0, psdReader_1.readUint16)(reader) !== 1) - throw new Error('Invalid grdm version'); - var info = { - type: 'gradient map', - gradientType: 'solid', - }; - info.reverse = !!(0, psdReader_1.readUint8)(reader); - info.dither = !!(0, psdReader_1.readUint8)(reader); - info.name = (0, psdReader_1.readUnicodeString)(reader); - info.colorStops = []; - info.opacityStops = []; - var stopsCount = (0, psdReader_1.readUint16)(reader); - for (var i = 0; i < stopsCount; i++) { - info.colorStops.push({ - location: (0, psdReader_1.readUint32)(reader), - midpoint: (0, psdReader_1.readUint32)(reader) / 100, - color: (0, psdReader_1.readColor)(reader), - }); - (0, psdReader_1.skipBytes)(reader, 2); - } - var opacityStopsCount = (0, psdReader_1.readUint16)(reader); - for (var i = 0; i < opacityStopsCount; i++) { - info.opacityStops.push({ - location: (0, psdReader_1.readUint32)(reader), - midpoint: (0, psdReader_1.readUint32)(reader) / 100, - opacity: (0, psdReader_1.readUint16)(reader) / 0xff, - }); - } - var expansionCount = (0, psdReader_1.readUint16)(reader); - if (expansionCount !== 2) - throw new Error('Invalid grdm expansion count'); - var interpolation = (0, psdReader_1.readUint16)(reader); - info.smoothness = interpolation / 4096; - var length = (0, psdReader_1.readUint16)(reader); - if (length !== 32) - throw new Error('Invalid grdm length'); - info.gradientType = (0, psdReader_1.readUint16)(reader) ? 'noise' : 'solid'; - info.randomSeed = (0, psdReader_1.readUint32)(reader); - info.addTransparency = !!(0, psdReader_1.readUint16)(reader); - info.restrictColors = !!(0, psdReader_1.readUint16)(reader); - info.roughness = (0, psdReader_1.readUint32)(reader) / 4096; - info.colorModel = (grdmColorModels[(0, psdReader_1.readUint16)(reader)] || 'rgb'); - info.min = [ - (0, psdReader_1.readUint16)(reader) / 0x8000, - (0, psdReader_1.readUint16)(reader) / 0x8000, - (0, psdReader_1.readUint16)(reader) / 0x8000, - (0, psdReader_1.readUint16)(reader) / 0x8000, - ]; - info.max = [ - (0, psdReader_1.readUint16)(reader) / 0x8000, - (0, psdReader_1.readUint16)(reader) / 0x8000, - (0, psdReader_1.readUint16)(reader) / 0x8000, - (0, psdReader_1.readUint16)(reader) / 0x8000, - ]; - (0, psdReader_1.skipBytes)(reader, left()); - for (var _i = 0, _a = info.colorStops; _i < _a.length; _i++) { - var s = _a[_i]; - s.location /= interpolation; - } - for (var _b = 0, _c = info.opacityStops; _b < _c.length; _b++) { - var s = _c[_b]; - s.location /= interpolation; - } - target.adjustment = info; -}, function (writer, target) { - var _a, _b, _c; - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, 1); // version - (0, psdWriter_1.writeUint8)(writer, info.reverse ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, info.dither ? 1 : 0); - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, info.name || ''); - (0, psdWriter_1.writeUint16)(writer, info.colorStops && info.colorStops.length || 0); - var interpolation = Math.round(((_a = info.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096); - for (var _i = 0, _d = info.colorStops || []; _i < _d.length; _i++) { - var s = _d[_i]; - (0, psdWriter_1.writeUint32)(writer, Math.round(s.location * interpolation)); - (0, psdWriter_1.writeUint32)(writer, Math.round(s.midpoint * 100)); - (0, psdWriter_1.writeColor)(writer, s.color); - (0, psdWriter_1.writeZeros)(writer, 2); - } - (0, psdWriter_1.writeUint16)(writer, info.opacityStops && info.opacityStops.length || 0); - for (var _e = 0, _f = info.opacityStops || []; _e < _f.length; _e++) { - var s = _f[_e]; - (0, psdWriter_1.writeUint32)(writer, Math.round(s.location * interpolation)); - (0, psdWriter_1.writeUint32)(writer, Math.round(s.midpoint * 100)); - (0, psdWriter_1.writeUint16)(writer, Math.round(s.opacity * 0xff)); - } - (0, psdWriter_1.writeUint16)(writer, 2); // expansion count - (0, psdWriter_1.writeUint16)(writer, interpolation); - (0, psdWriter_1.writeUint16)(writer, 32); // length - (0, psdWriter_1.writeUint16)(writer, info.gradientType === 'noise' ? 1 : 0); - (0, psdWriter_1.writeUint32)(writer, info.randomSeed || 0); - (0, psdWriter_1.writeUint16)(writer, info.addTransparency ? 1 : 0); - (0, psdWriter_1.writeUint16)(writer, info.restrictColors ? 1 : 0); - (0, psdWriter_1.writeUint32)(writer, Math.round(((_b = info.roughness) !== null && _b !== void 0 ? _b : 1) * 4096)); - var colorModel = grdmColorModels.indexOf((_c = info.colorModel) !== null && _c !== void 0 ? _c : 'rgb'); - (0, psdWriter_1.writeUint16)(writer, colorModel === -1 ? 3 : colorModel); - for (var i = 0; i < 4; i++) - (0, psdWriter_1.writeUint16)(writer, Math.round((info.min && info.min[i] || 0) * 0x8000)); - for (var i = 0; i < 4; i++) - (0, psdWriter_1.writeUint16)(writer, Math.round((info.max && info.max[i] || 0) * 0x8000)); - (0, psdWriter_1.writeZeros)(writer, 4); -}); -function readSelectiveColors(reader) { - return { - c: (0, psdReader_1.readInt16)(reader), - m: (0, psdReader_1.readInt16)(reader), - y: (0, psdReader_1.readInt16)(reader), - k: (0, psdReader_1.readInt16)(reader), - }; -} -function writeSelectiveColors(writer, cmyk) { - var c = cmyk || {}; - (0, psdWriter_1.writeInt16)(writer, c.c); - (0, psdWriter_1.writeInt16)(writer, c.m); - (0, psdWriter_1.writeInt16)(writer, c.y); - (0, psdWriter_1.writeInt16)(writer, c.k); -} -addHandler('selc', adjustmentType('selective color'), function (reader, target) { - if ((0, psdReader_1.readUint16)(reader) !== 1) - throw new Error('Invalid selc version'); - var mode = (0, psdReader_1.readUint16)(reader) ? 'absolute' : 'relative'; - (0, psdReader_1.skipBytes)(reader, 8); - target.adjustment = { - type: 'selective color', - mode: mode, - reds: readSelectiveColors(reader), - yellows: readSelectiveColors(reader), - greens: readSelectiveColors(reader), - cyans: readSelectiveColors(reader), - blues: readSelectiveColors(reader), - magentas: readSelectiveColors(reader), - whites: readSelectiveColors(reader), - neutrals: readSelectiveColors(reader), - blacks: readSelectiveColors(reader), - }; -}, function (writer, target) { - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, 1); // version - (0, psdWriter_1.writeUint16)(writer, info.mode === 'absolute' ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 8); - writeSelectiveColors(writer, info.reds); - writeSelectiveColors(writer, info.yellows); - writeSelectiveColors(writer, info.greens); - writeSelectiveColors(writer, info.cyans); - writeSelectiveColors(writer, info.blues); - writeSelectiveColors(writer, info.magentas); - writeSelectiveColors(writer, info.whites); - writeSelectiveColors(writer, info.neutrals); - writeSelectiveColors(writer, info.blacks); -}); -addHandler('CgEd', function (target) { - var a = target.adjustment; - if (!a) - return false; - return (a.type === 'brightness/contrast' && !a.useLegacy) || - ((a.type === 'levels' || a.type === 'curves' || a.type === 'exposure' || a.type === 'channel mixer' || - a.type === 'hue/saturation') && a.presetFileName !== undefined); -}, function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - if (desc.Vrsn !== 1) - throw new Error('Invalid CgEd version'); - // this section can specify preset file name for other adjustment types - if ('presetFileName' in desc) { - target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.presetKind, presetFileName: desc.presetFileName }); - } - else if ('curvesPresetFileName' in desc) { - target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.curvesPresetKind, presetFileName: desc.curvesPresetFileName }); - } - else if ('mixerPresetFileName' in desc) { - target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.mixerPresetKind, presetFileName: desc.mixerPresetFileName }); - } - else { - target.adjustment = { - type: 'brightness/contrast', - brightness: desc.Brgh, - contrast: desc.Cntr, - meanValue: desc.means, - useLegacy: !!desc.useLegacy, - labColorOnly: !!desc['Lab '], - auto: !!desc.Auto, - }; - } - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a, _b, _c, _d; - var info = target.adjustment; - if (info.type === 'levels' || info.type === 'exposure' || info.type === 'hue/saturation') { - var desc = { - Vrsn: 1, - presetKind: (_a = info.presetKind) !== null && _a !== void 0 ? _a : 1, - presetFileName: info.presetFileName || '', - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - } - else if (info.type === 'curves') { - var desc = { - Vrsn: 1, - curvesPresetKind: (_b = info.presetKind) !== null && _b !== void 0 ? _b : 1, - curvesPresetFileName: info.presetFileName || '', - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - } - else if (info.type === 'channel mixer') { - var desc = { - Vrsn: 1, - mixerPresetKind: (_c = info.presetKind) !== null && _c !== void 0 ? _c : 1, - mixerPresetFileName: info.presetFileName || '', - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - } - else if (info.type === 'brightness/contrast') { - var desc = { - Vrsn: 1, - Brgh: info.brightness || 0, - Cntr: info.contrast || 0, - means: (_d = info.meanValue) !== null && _d !== void 0 ? _d : 127, - 'Lab ': !!info.labColorOnly, - useLegacy: !!info.useLegacy, - Auto: !!info.auto, - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - } - else { - throw new Error('Unhandled CgEd case'); - } -}); -addHandler('Txt2', hasKey('engineData'), function (reader, target, left) { - var data = (0, psdReader_1.readBytes)(reader, left()); - target.engineData = (0, base64_js_1.fromByteArray)(data); - // const engineData = parseEngineData(data); - // console.log(require('util').inspect(engineData, false, 99, true)); - // require('fs').writeFileSync('resources/engineData2Simple.txt', require('util').inspect(engineData, false, 99, false), 'utf8'); - // require('fs').writeFileSync('test_data.json', JSON.stringify(ed, null, 2), 'utf8'); -}, function (writer, target) { - var buffer = (0, base64_js_1.toByteArray)(target.engineData); - (0, psdWriter_1.writeBytes)(writer, buffer); -}); -addHandler('FMsk', hasKey('filterMask'), function (reader, target) { - target.filterMask = { - colorSpace: (0, psdReader_1.readColor)(reader), - opacity: (0, psdReader_1.readUint16)(reader) / 0xff, - }; -}, function (writer, target) { - var _a; - (0, psdWriter_1.writeColor)(writer, target.filterMask.colorSpace); - (0, psdWriter_1.writeUint16)(writer, (0, helpers_1.clamp)((_a = target.filterMask.opacity) !== null && _a !== void 0 ? _a : 1, 0, 1) * 0xff); -}); -addHandler('artd', // document-wide artboard info -function (// document-wide artboard info -target) { return target.artboards !== undefined; }, function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.artboards = { - count: desc['Cnt '], - autoExpandOffset: { horizontal: desc.autoExpandOffset.Hrzn, vertical: desc.autoExpandOffset.Vrtc }, - origin: { horizontal: desc.origin.Hrzn, vertical: desc.origin.Vrtc }, - autoExpandEnabled: desc.autoExpandEnabled, - autoNestEnabled: desc.autoNestEnabled, - autoPositionEnabled: desc.autoPositionEnabled, - shrinkwrapOnSaveEnabled: !!desc.shrinkwrapOnSaveEnabled, - docDefaultNewArtboardBackgroundColor: (0, descriptor_1.parseColor)(desc.docDefaultNewArtboardBackgroundColor), - docDefaultNewArtboardBackgroundType: desc.docDefaultNewArtboardBackgroundType, - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a, _b, _c, _d, _e; - var artb = target.artboards; - var desc = { - 'Cnt ': artb.count, - autoExpandOffset: artb.autoExpandOffset ? { Hrzn: artb.autoExpandOffset.horizontal, Vrtc: artb.autoExpandOffset.vertical } : { Hrzn: 0, Vrtc: 0 }, - origin: artb.origin ? { Hrzn: artb.origin.horizontal, Vrtc: artb.origin.vertical } : { Hrzn: 0, Vrtc: 0 }, - autoExpandEnabled: (_a = artb.autoExpandEnabled) !== null && _a !== void 0 ? _a : true, - autoNestEnabled: (_b = artb.autoNestEnabled) !== null && _b !== void 0 ? _b : true, - autoPositionEnabled: (_c = artb.autoPositionEnabled) !== null && _c !== void 0 ? _c : true, - shrinkwrapOnSaveEnabled: (_d = artb.shrinkwrapOnSaveEnabled) !== null && _d !== void 0 ? _d : true, - docDefaultNewArtboardBackgroundColor: (0, descriptor_1.serializeColor)(artb.docDefaultNewArtboardBackgroundColor), - docDefaultNewArtboardBackgroundType: (_e = artb.docDefaultNewArtboardBackgroundType) !== null && _e !== void 0 ? _e : 1, - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'artd'); -}); -function hasMultiEffects(effects) { - return Object.keys(effects).map(function (key) { return effects[key]; }).some(function (v) { return Array.isArray(v) && v.length > 1; }); -} -exports.hasMultiEffects = hasMultiEffects; -addHandler('lfx2', function (target) { return target.effects !== undefined && !hasMultiEffects(target.effects); }, function (reader, target, left, _, options) { - var version = (0, psdReader_1.readUint32)(reader); - if (version !== 0) - throw new Error("Invalid lfx2 version"); - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - // TODO: don't discard if we got it from lmfx - // discard if read in 'lrFX' section - target.effects = (0, descriptor_1.parseEffects)(desc, !!options.logMissingFeatures); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target, _, options) { - var desc = (0, descriptor_1.serializeEffects)(target.effects, !!options.logMissingFeatures, false); - // console.log(require('util').inspect(desc, false, 99, true)); - (0, psdWriter_1.writeUint32)(writer, 0); // version - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler('cinf', hasKey('compositorUsed'), function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - target.compositorUsed = { - description: desc.description, - reason: desc.reason, - engine: desc.Engn.split('.')[1], - enableCompCore: desc.enableCompCore.split('.')[1], - enableCompCoreGPU: desc.enableCompCoreGPU.split('.')[1], - compCoreSupport: desc.compCoreSupport.split('.')[1], - compCoreGPUSupport: desc.compCoreGPUSupport.split('.')[1], - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var cinf = target.compositorUsed; - var desc = { - Vrsn: { major: 1, minor: 0, fix: 0 }, - // psVersion: { major: 22, minor: 3, fix: 1 }, // TESTING - description: cinf.description, - reason: cinf.reason, - Engn: "Engn.".concat(cinf.engine), - enableCompCore: "enable.".concat(cinf.enableCompCore), - enableCompCoreGPU: "enable.".concat(cinf.enableCompCoreGPU), - // enableCompCoreThreads: `enable.feature`, // TESTING - compCoreSupport: "reason.".concat(cinf.compCoreSupport), - compCoreGPUSupport: "reason.".concat(cinf.compCoreGPUSupport), - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -// extension settings ?, ignore it -addHandler('extn', function (target) { return target._extn !== undefined; }, function (reader, target) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - if (helpers_1.MOCK_HANDLERS) - target._extn = desc; -}, function (writer, target) { - // TODO: need to add correct types for desc fields (resources/src.psd) - if (helpers_1.MOCK_HANDLERS) - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', target._extn); -}); -addHandler('iOpa', hasKey('fillOpacity'), function (reader, target) { - target.fillOpacity = (0, psdReader_1.readUint8)(reader) / 0xff; - (0, psdReader_1.skipBytes)(reader, 3); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.fillOpacity * 0xff); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -addHandler('brst', hasKey('channelBlendingRestrictions'), function (reader, target, left) { - target.channelBlendingRestrictions = []; - while (left() > 4) { - target.channelBlendingRestrictions.push((0, psdReader_1.readInt32)(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.channelBlendingRestrictions; _i < _a.length; _i++) { - var channel = _a[_i]; - (0, psdWriter_1.writeInt32)(writer, channel); - } -}); -addHandler('tsly', hasKey('transparencyShapesLayer'), function (reader, target) { - target.transparencyShapesLayer = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.skipBytes)(reader, 3); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.transparencyShapesLayer ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -/*addHandler( - 'FEid', - hasKey('filterEffects'), - (reader, _target) => { - const version = readInt32(reader); - if (version < 1 || version > 3) throw new Error(`Invalid filterEffects version ${version}`); - - if (readUint32(reader)) throw new Error('filterEffects: 64 bit length is not supported'); - const length = readUint32(reader); - const end = reader.offset + length; - - while (reader.offset < end) { - console.log('bytes to go', end - reader.offset, 'at', reader.offset.toString(16)); - // - const id = readPascalString(reader, 1); - const effectVersion = readInt32(reader); - if (effectVersion !== 1) throw new Error(`Invalid filterEffect version ${effectVersion}`); - if (readUint32(reader)) throw new Error('filterEffect: 64 bit length is not supported'); - const effectLength = readUint32(reader); - const endOfEffect = reader.offset + effectLength; - const top = readInt32(reader); - const left = readInt32(reader); - const bottom = readInt32(reader); - const right = readInt32(reader); - const depth = readInt32(reader); - const maxChannels = readInt32(reader); - const channels: any[] = []; - - for (let i = 0; i < (maxChannels + 2); i++) { - const exists = readInt32(reader); - if (exists) { - if (readUint32(reader)) throw new Error('filterEffect: 64 bit length is not supported'); - const channelLength = readUint32(reader); - const compressionMode = readUint16(reader); - const data = readBytes(reader, channelLength - 2); - channels.push({ channelLength, compressionMode, data: data?.length + ' bytes' }); - // if (c < 3 || c == 25) e_ = _F.Cn(!0, rL, m, b.rect.F, b.rect.V, X, rp); - // if (c == 0) _c.S = e_; - // if (c == 1) _c.v = e_; - // if (c == 2) _c.e = e_; - // if (c == 25) _c.w = e_; - } else { - channels.push(undefined); - } - } - - console.log('left at the end', endOfEffect - reader.offset); - if (endOfEffect > reader.offset) { - if (readUint8(reader)) { - const compressionMode = readUint16(reader); - const data = endOfEffect > reader.offset ? readBytes(reader, endOfEffect - reader.offset) : undefined; - console.log('extra data', { compressionMode, data: data?.length + ' bytes' }); - } else { - console.log('no extra'); - } - } - - console.log('effect', { - id, - effectVersion, - effectLength, - top, - left, - bottom, - right, - depth, - maxChannels, - channels, - }); - - console.log('bytes left after effect', endOfEffect - reader.offset); - // if (length % 4) skipBytes(reader, 4 - length % 4); - } - - console.log({ version, length }); - }, - (_writer, _target) => { - }, -); - -addHandlerAlias('FXid', 'FEid');*/ -//# sourceMappingURL=additionalInfo.js.map \ No newline at end of file +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hasMultiEffects = exports.readVectorMask = exports.booleanOperations = exports.readBezierKnot = exports.infoHandlersMap = exports.infoHandlers = void 0; +var base64_js_1 = require("base64-js"); +var effectsHelpers_1 = require("./effectsHelpers"); +var helpers_1 = require("./helpers"); +var psdReader_1 = require("./psdReader"); +var psdWriter_1 = require("./psdWriter"); +var descriptor_1 = require("./descriptor"); +var engineData_1 = require("./engineData"); +var text_1 = require("./text"); +exports.infoHandlers = []; +exports.infoHandlersMap = {}; +function addHandler(key, has, read, write) { + var handler = { key: key, has: has, read: read, write: write }; + exports.infoHandlers.push(handler); + exports.infoHandlersMap[handler.key] = handler; +} +function addHandlerAlias(key, target) { + exports.infoHandlersMap[key] = exports.infoHandlersMap[target]; +} +function hasKey(key) { + return function (target) { return target[key] !== undefined; }; +} +function readLength64(reader) { + if ((0, psdReader_1.readUint32)(reader)) + throw new Error("Resource size above 4 GB limit at ".concat(reader.offset.toString(16))); + return (0, psdReader_1.readUint32)(reader); +} +function writeLength64(writer, length) { + (0, psdWriter_1.writeUint32)(writer, 0); + (0, psdWriter_1.writeUint32)(writer, length); +} +addHandler('TySh', hasKey('text'), function (reader, target, leftBytes) { + if ((0, psdReader_1.readInt16)(reader) !== 1) + throw new Error("Invalid TySh version"); + var transform = []; + for (var i = 0; i < 6; i++) + transform.push((0, psdReader_1.readFloat64)(reader)); + if ((0, psdReader_1.readInt16)(reader) !== 50) + throw new Error("Invalid TySh text version"); + var text = (0, descriptor_1.readVersionAndDescriptor)(reader); + if ((0, psdReader_1.readInt16)(reader) !== 1) + throw new Error("Invalid TySh warp version"); + var warp = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.text = { + transform: transform, + left: (0, psdReader_1.readFloat32)(reader), + top: (0, psdReader_1.readFloat32)(reader), + right: (0, psdReader_1.readFloat32)(reader), + bottom: (0, psdReader_1.readFloat32)(reader), + text: text['Txt '].replace(/\r/g, '\n'), + index: text.TextIndex || 0, + gridding: descriptor_1.textGridding.decode(text.textGridding), + antiAlias: descriptor_1.Annt.decode(text.AntA), + orientation: descriptor_1.Ornt.decode(text.Ornt), + warp: { + style: descriptor_1.warpStyle.decode(warp.warpStyle), + value: warp.warpValue || 0, + perspective: warp.warpPerspective || 0, + perspectiveOther: warp.warpPerspectiveOther || 0, + rotate: descriptor_1.Ornt.decode(warp.warpRotate), + }, + }; + if (text.EngineData) { + var engineData = (0, text_1.decodeEngineData)((0, engineData_1.parseEngineData)(text.EngineData)); + // const before = parseEngineData(text.EngineData); + // const after = encodeEngineData(engineData); + // require('fs').writeFileSync('before.txt', require('util').inspect(before, false, 99, false), 'utf8'); + // require('fs').writeFileSync('after.txt', require('util').inspect(after, false, 99, false), 'utf8'); + // console.log(require('util').inspect(parseEngineData(text.EngineData), false, 99, true)); + target.text = __assign(__assign({}, target.text), engineData); + // console.log(require('util').inspect(target.text, false, 99, true)); + } + (0, psdReader_1.skipBytes)(reader, leftBytes()); +}, function (writer, target) { + var text = target.text; + var warp = text.warp || {}; + var transform = text.transform || [1, 0, 0, 1, 0, 0]; + var textDescriptor = { + 'Txt ': (text.text || '').replace(/\r?\n/g, '\r'), + textGridding: descriptor_1.textGridding.encode(text.gridding), + Ornt: descriptor_1.Ornt.encode(text.orientation), + AntA: descriptor_1.Annt.encode(text.antiAlias), + TextIndex: text.index || 0, + EngineData: (0, engineData_1.serializeEngineData)((0, text_1.encodeEngineData)(text)), + }; + (0, psdWriter_1.writeInt16)(writer, 1); // version + for (var i = 0; i < 6; i++) { + (0, psdWriter_1.writeFloat64)(writer, transform[i]); + } + (0, psdWriter_1.writeInt16)(writer, 50); // text version + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'TxLr', textDescriptor); + (0, psdWriter_1.writeInt16)(writer, 1); // warp version + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'warp', encodeWarp(warp)); + (0, psdWriter_1.writeFloat32)(writer, text.left); + (0, psdWriter_1.writeFloat32)(writer, text.top); + (0, psdWriter_1.writeFloat32)(writer, text.right); + (0, psdWriter_1.writeFloat32)(writer, text.bottom); + // writeZeros(writer, 2); +}); +// vector fills +addHandler('SoCo', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && + target.vectorFill.type === 'color'; }, function (reader, target) { + var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.vectorFill = (0, descriptor_1.parseVectorContent)(descriptor); +}, function (writer, target) { + var descriptor = (0, descriptor_1.serializeVectorContent)(target.vectorFill).descriptor; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); +}); +addHandler('GdFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && + (target.vectorFill.type === 'solid' || target.vectorFill.type === 'noise'); }, function (reader, target, left) { + var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.vectorFill = (0, descriptor_1.parseVectorContent)(descriptor); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var descriptor = (0, descriptor_1.serializeVectorContent)(target.vectorFill).descriptor; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); +}); +addHandler('PtFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && + target.vectorFill.type === 'pattern'; }, function (reader, target) { + var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.vectorFill = (0, descriptor_1.parseVectorContent)(descriptor); +}, function (writer, target) { + var descriptor = (0, descriptor_1.serializeVectorContent)(target.vectorFill).descriptor; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); +}); +addHandler('vscg', function (target) { return target.vectorFill !== undefined && target.vectorStroke !== undefined; }, function (reader, target, left) { + (0, psdReader_1.readSignature)(reader); // key + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.vectorFill = (0, descriptor_1.parseVectorContent)(desc); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a = (0, descriptor_1.serializeVectorContent)(target.vectorFill), descriptor = _a.descriptor, key = _a.key; + (0, psdWriter_1.writeSignature)(writer, key); + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); +}); +function readBezierKnot(reader, width, height) { + var y0 = (0, psdReader_1.readFixedPointPath32)(reader) * height; + var x0 = (0, psdReader_1.readFixedPointPath32)(reader) * width; + var y1 = (0, psdReader_1.readFixedPointPath32)(reader) * height; + var x1 = (0, psdReader_1.readFixedPointPath32)(reader) * width; + var y2 = (0, psdReader_1.readFixedPointPath32)(reader) * height; + var x2 = (0, psdReader_1.readFixedPointPath32)(reader) * width; + return [x0, y0, x1, y1, x2, y2]; +} +exports.readBezierKnot = readBezierKnot; +function writeBezierKnot(writer, points, width, height) { + (0, psdWriter_1.writeFixedPointPath32)(writer, points[1] / height); // y0 + (0, psdWriter_1.writeFixedPointPath32)(writer, points[0] / width); // x0 + (0, psdWriter_1.writeFixedPointPath32)(writer, points[3] / height); // y1 + (0, psdWriter_1.writeFixedPointPath32)(writer, points[2] / width); // x1 + (0, psdWriter_1.writeFixedPointPath32)(writer, points[5] / height); // y2 + (0, psdWriter_1.writeFixedPointPath32)(writer, points[4] / width); // x2 +} +exports.booleanOperations = ['exclude', 'combine', 'subtract', 'intersect']; +function readVectorMask(reader, vectorMask, width, height, size) { + var end = reader.offset + size; + var paths = vectorMask.paths; + var path = undefined; + while ((end - reader.offset) >= 26) { + var selector = (0, psdReader_1.readUint16)(reader); + switch (selector) { + case 0: // Closed subpath length record + case 3: { // Open subpath length record + (0, psdReader_1.readUint16)(reader); // count + var boolOp = (0, psdReader_1.readInt16)(reader); + (0, psdReader_1.readUint16)(reader); // always 1 ? + (0, psdReader_1.skipBytes)(reader, 18); + // TODO: 'combine' here might be wrong + path = { open: selector === 3, operation: boolOp === -1 ? 'combine' : exports.booleanOperations[boolOp], knots: [] }; + paths.push(path); + break; + } + case 1: // Closed subpath Bezier knot, linked + case 2: // Closed subpath Bezier knot, unlinked + case 4: // Open subpath Bezier knot, linked + case 5: // Open subpath Bezier knot, unlinked + path.knots.push({ linked: (selector === 1 || selector === 4), points: readBezierKnot(reader, width, height) }); + break; + case 6: // Path fill rule record + (0, psdReader_1.skipBytes)(reader, 24); + break; + case 7: { // Clipboard record + // TODO: check if these need to be multiplied by document size + var top_1 = (0, psdReader_1.readFixedPointPath32)(reader); + var left = (0, psdReader_1.readFixedPointPath32)(reader); + var bottom = (0, psdReader_1.readFixedPointPath32)(reader); + var right = (0, psdReader_1.readFixedPointPath32)(reader); + var resolution = (0, psdReader_1.readFixedPointPath32)(reader); + (0, psdReader_1.skipBytes)(reader, 4); + vectorMask.clipboard = { top: top_1, left: left, bottom: bottom, right: right, resolution: resolution }; + break; + } + case 8: // Initial fill rule record + vectorMask.fillStartsWithAllPixels = !!(0, psdReader_1.readUint16)(reader); + (0, psdReader_1.skipBytes)(reader, 22); + break; + default: throw new Error('Invalid vmsk section'); + } + } + return paths; +} +exports.readVectorMask = readVectorMask; +addHandler('vmsk', hasKey('vectorMask'), function (reader, target, left, _a) { + var width = _a.width, height = _a.height; + if ((0, psdReader_1.readUint32)(reader) !== 3) + throw new Error('Invalid vmsk version'); + target.vectorMask = { paths: [] }; + var vectorMask = target.vectorMask; + var flags = (0, psdReader_1.readUint32)(reader); + vectorMask.invert = (flags & 1) !== 0; + vectorMask.notLink = (flags & 2) !== 0; + vectorMask.disable = (flags & 4) !== 0; + readVectorMask(reader, vectorMask, width, height, left()); + // drawBezierPaths(vectorMask.paths, width, height, 'out.png'); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target, _a) { + var width = _a.width, height = _a.height; + var vectorMask = target.vectorMask; + var flags = (vectorMask.invert ? 1 : 0) | + (vectorMask.notLink ? 2 : 0) | + (vectorMask.disable ? 4 : 0); + (0, psdWriter_1.writeUint32)(writer, 3); // version + (0, psdWriter_1.writeUint32)(writer, flags); + // initial entry + (0, psdWriter_1.writeUint16)(writer, 6); + (0, psdWriter_1.writeZeros)(writer, 24); + var clipboard = vectorMask.clipboard; + if (clipboard) { + (0, psdWriter_1.writeUint16)(writer, 7); + (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.top); + (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.left); + (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.bottom); + (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.right); + (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.resolution); + (0, psdWriter_1.writeZeros)(writer, 4); + } + if (vectorMask.fillStartsWithAllPixels !== undefined) { + (0, psdWriter_1.writeUint16)(writer, 8); + (0, psdWriter_1.writeUint16)(writer, vectorMask.fillStartsWithAllPixels ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 22); + } + for (var _i = 0, _b = vectorMask.paths; _i < _b.length; _i++) { + var path = _b[_i]; + (0, psdWriter_1.writeUint16)(writer, path.open ? 3 : 0); + (0, psdWriter_1.writeUint16)(writer, path.knots.length); + (0, psdWriter_1.writeUint16)(writer, Math.abs(exports.booleanOperations.indexOf(path.operation))); // default to 1 if not found + (0, psdWriter_1.writeUint16)(writer, 1); + (0, psdWriter_1.writeZeros)(writer, 18); // TODO: these are sometimes non-zero + var linkedKnot = path.open ? 4 : 1; + var unlinkedKnot = path.open ? 5 : 2; + for (var _c = 0, _d = path.knots; _c < _d.length; _c++) { + var _e = _d[_c], linked = _e.linked, points = _e.points; + (0, psdWriter_1.writeUint16)(writer, linked ? linkedKnot : unlinkedKnot); + writeBezierKnot(writer, points, width, height); + } + } +}); +// TODO: need to write vmsk if has outline ? +addHandlerAlias('vsms', 'vmsk'); +addHandler('vogk', hasKey('vectorOrigination'), function (reader, target, left) { + if ((0, psdReader_1.readInt32)(reader) !== 1) + throw new Error("Invalid vogk version"); + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + target.vectorOrigination = { keyDescriptorList: [] }; + for (var _i = 0, _a = desc.keyDescriptorList; _i < _a.length; _i++) { + var i = _a[_i]; + var item = {}; + if (i.keyShapeInvalidated != null) + item.keyShapeInvalidated = i.keyShapeInvalidated; + if (i.keyOriginType != null) + item.keyOriginType = i.keyOriginType; + if (i.keyOriginResolution != null) + item.keyOriginResolution = i.keyOriginResolution; + if (i.keyOriginShapeBBox) { + item.keyOriginShapeBoundingBox = { + top: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox['Top ']), + left: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox.Left), + bottom: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox.Btom), + right: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox.Rght), + }; + } + var rectRadii = i.keyOriginRRectRadii; + if (rectRadii) { + item.keyOriginRRectRadii = { + topRight: (0, descriptor_1.parseUnits)(rectRadii.topRight), + topLeft: (0, descriptor_1.parseUnits)(rectRadii.topLeft), + bottomLeft: (0, descriptor_1.parseUnits)(rectRadii.bottomLeft), + bottomRight: (0, descriptor_1.parseUnits)(rectRadii.bottomRight), + }; + } + var corners = i.keyOriginBoxCorners; + if (corners) { + item.keyOriginBoxCorners = [ + { x: corners.rectangleCornerA.Hrzn, y: corners.rectangleCornerA.Vrtc }, + { x: corners.rectangleCornerB.Hrzn, y: corners.rectangleCornerB.Vrtc }, + { x: corners.rectangleCornerC.Hrzn, y: corners.rectangleCornerC.Vrtc }, + { x: corners.rectangleCornerD.Hrzn, y: corners.rectangleCornerD.Vrtc }, + ]; + } + var trnf = i.Trnf; + if (trnf) { + item.transform = [trnf.xx, trnf.xy, trnf.xy, trnf.yy, trnf.tx, trnf.ty]; + } + target.vectorOrigination.keyDescriptorList.push(item); + } + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + target; + var orig = target.vectorOrigination; + var desc = { keyDescriptorList: [] }; + for (var i = 0; i < orig.keyDescriptorList.length; i++) { + var item = orig.keyDescriptorList[i]; + if (item.keyShapeInvalidated) { + desc.keyDescriptorList.push({ keyShapeInvalidated: true, keyOriginIndex: i }); + } + else { + desc.keyDescriptorList.push({}); // we're adding keyOriginIndex at the end + var out = desc.keyDescriptorList[desc.keyDescriptorList.length - 1]; + if (item.keyOriginType != null) + out.keyOriginType = item.keyOriginType; + if (item.keyOriginResolution != null) + out.keyOriginResolution = item.keyOriginResolution; + var radii = item.keyOriginRRectRadii; + if (radii) { + out.keyOriginRRectRadii = { + unitValueQuadVersion: 1, + topRight: (0, descriptor_1.unitsValue)(radii.topRight, 'topRight'), + topLeft: (0, descriptor_1.unitsValue)(radii.topLeft, 'topLeft'), + bottomLeft: (0, descriptor_1.unitsValue)(radii.bottomLeft, 'bottomLeft'), + bottomRight: (0, descriptor_1.unitsValue)(radii.bottomRight, 'bottomRight'), + }; + } + var box = item.keyOriginShapeBoundingBox; + if (box) { + out.keyOriginShapeBBox = { + unitValueQuadVersion: 1, + 'Top ': (0, descriptor_1.unitsValue)(box.top, 'top'), + Left: (0, descriptor_1.unitsValue)(box.left, 'left'), + Btom: (0, descriptor_1.unitsValue)(box.bottom, 'bottom'), + Rght: (0, descriptor_1.unitsValue)(box.right, 'right'), + }; + } + var corners = item.keyOriginBoxCorners; + if (corners && corners.length === 4) { + out.keyOriginBoxCorners = { + rectangleCornerA: { Hrzn: corners[0].x, Vrtc: corners[0].y }, + rectangleCornerB: { Hrzn: corners[1].x, Vrtc: corners[1].y }, + rectangleCornerC: { Hrzn: corners[2].x, Vrtc: corners[2].y }, + rectangleCornerD: { Hrzn: corners[3].x, Vrtc: corners[3].y }, + }; + } + var transform = item.transform; + if (transform && transform.length === 6) { + out.Trnf = { + xx: transform[0], + xy: transform[1], + yx: transform[2], + yy: transform[3], + tx: transform[4], + ty: transform[5], + }; + } + out.keyOriginIndex = i; + } + } + (0, psdWriter_1.writeInt32)(writer, 1); // version + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler('lmfx', function (target) { return target.effects !== undefined && hasMultiEffects(target.effects); }, function (reader, target, left, _, options) { + var version = (0, psdReader_1.readUint32)(reader); + if (version !== 0) + throw new Error('Invalid lmfx version'); + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(info, false, 99, true)); + // discard if read in 'lrFX' or 'lfx2' section + target.effects = (0, descriptor_1.parseEffects)(desc, !!options.logMissingFeatures); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target, _, options) { + var desc = (0, descriptor_1.serializeEffects)(target.effects, !!options.logMissingFeatures, true); + (0, psdWriter_1.writeUint32)(writer, 0); // version + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler('lrFX', hasKey('effects'), function (reader, target, left) { + if (!target.effects) + target.effects = (0, effectsHelpers_1.readEffects)(reader); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + (0, effectsHelpers_1.writeEffects)(writer, target.effects); +}); +addHandler('luni', hasKey('name'), function (reader, target, left) { + target.name = (0, psdReader_1.readUnicodeString)(reader); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeUnicodeString)(writer, target.name); + // writeUint16(writer, 0); // padding (but not extending string length) +}); +addHandler('lnsr', hasKey('nameSource'), function (reader, target) { return target.nameSource = (0, psdReader_1.readSignature)(reader); }, function (writer, target) { return (0, psdWriter_1.writeSignature)(writer, target.nameSource); }); +addHandler('lyid', hasKey('id'), function (reader, target) { return target.id = (0, psdReader_1.readUint32)(reader); }, function (writer, target, _psd, options) { + var id = target.id; + while (options.layerIds.has(id)) + id += 100; // make sure we don't have duplicate layer ids + (0, psdWriter_1.writeUint32)(writer, id); + options.layerIds.add(id); + options.layerToId.set(target, id); +}); +addHandler('lsct', hasKey('sectionDivider'), function (reader, target, left) { + target.sectionDivider = { type: (0, psdReader_1.readUint32)(reader) }; + if (left()) { + (0, psdReader_1.checkSignature)(reader, '8BIM'); + target.sectionDivider.key = (0, psdReader_1.readSignature)(reader); + } + if (left()) { + target.sectionDivider.subType = (0, psdReader_1.readUint32)(reader); + } +}, function (writer, target) { + (0, psdWriter_1.writeUint32)(writer, target.sectionDivider.type); + if (target.sectionDivider.key) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, target.sectionDivider.key); + if (target.sectionDivider.subType !== undefined) { + (0, psdWriter_1.writeUint32)(writer, target.sectionDivider.subType); + } + } +}); +// it seems lsdk is used when there's a layer is nested more than 6 levels, but I don't know why? +// maybe some limitation of old version of PS? +addHandlerAlias('lsdk', 'lsct'); +addHandler('clbl', hasKey('blendClippendElements'), function (reader, target) { + target.blendClippendElements = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.skipBytes)(reader, 3); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.blendClippendElements ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 3); +}); +addHandler('infx', hasKey('blendInteriorElements'), function (reader, target) { + target.blendInteriorElements = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.skipBytes)(reader, 3); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.blendInteriorElements ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 3); +}); +addHandler('knko', hasKey('knockout'), function (reader, target) { + target.knockout = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.skipBytes)(reader, 3); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.knockout ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 3); +}); +addHandler('lmgm', hasKey('layerMaskAsGlobalMask'), function (reader, target) { + target.layerMaskAsGlobalMask = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.skipBytes)(reader, 3); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.layerMaskAsGlobalMask ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 3); +}); +addHandler('lspf', hasKey('protected'), function (reader, target) { + var flags = (0, psdReader_1.readUint32)(reader); + target.protected = { + transparency: (flags & 0x01) !== 0, + composite: (flags & 0x02) !== 0, + position: (flags & 0x04) !== 0, + }; + if (flags & 0x08) + target.protected.artboards = true; +}, function (writer, target) { + var flags = (target.protected.transparency ? 0x01 : 0) | + (target.protected.composite ? 0x02 : 0) | + (target.protected.position ? 0x04 : 0) | + (target.protected.artboards ? 0x08 : 0); + (0, psdWriter_1.writeUint32)(writer, flags); +}); +addHandler('lclr', hasKey('layerColor'), function (reader, target) { + var color = (0, psdReader_1.readUint16)(reader); + (0, psdReader_1.skipBytes)(reader, 6); + target.layerColor = helpers_1.layerColors[color]; +}, function (writer, target) { + var index = helpers_1.layerColors.indexOf(target.layerColor); + (0, psdWriter_1.writeUint16)(writer, index === -1 ? 0 : index); + (0, psdWriter_1.writeZeros)(writer, 6); +}); +addHandler('shmd', function (target) { return target.timestamp !== undefined || target.animationFrames !== undefined || + target.animationFrameFlags !== undefined || target.timeline !== undefined; }, function (reader, target, left, _, options) { + var count = (0, psdReader_1.readUint32)(reader); + var _loop_1 = function (i) { + (0, psdReader_1.checkSignature)(reader, '8BIM'); + var key = (0, psdReader_1.readSignature)(reader); + (0, psdReader_1.readUint8)(reader); // copy + (0, psdReader_1.skipBytes)(reader, 3); + (0, psdReader_1.readSection)(reader, 1, function (left) { + if (key === 'cust') { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log('cust', target.name, require('util').inspect(desc, false, 99, true)); + if (desc.layerTime !== undefined) + target.timestamp = desc.layerTime; + } + else if (key === 'mlst') { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log('mlst', target.name, require('util').inspect(desc, false, 99, true)); + target.animationFrames = []; + for (var i_1 = 0; i_1 < desc.LaSt.length; i_1++) { + var f = desc.LaSt[i_1]; + var frame = { frames: f.FrLs }; + if (f.enab !== undefined) + frame.enable = f.enab; + if (f.Ofst) + frame.offset = (0, descriptor_1.horzVrtcToXY)(f.Ofst); + if (f.FXRf) + frame.referencePoint = (0, descriptor_1.horzVrtcToXY)(f.FXRf); + if (f.Lefx) + frame.effects = (0, descriptor_1.parseEffects)(f.Lefx, !!options.logMissingFeatures); + if (f.blendOptions && f.blendOptions.Opct) + frame.opacity = (0, descriptor_1.parsePercent)(f.blendOptions.Opct); + target.animationFrames.push(frame); + } + } + else if (key === 'mdyn') { + // frame flags + (0, psdReader_1.readUint16)(reader); // unknown + var propagate = (0, psdReader_1.readUint8)(reader); + var flags = (0, psdReader_1.readUint8)(reader); + target.animationFrameFlags = { + propagateFrameOne: !propagate, + unifyLayerPosition: (flags & 1) !== 0, + unifyLayerStyle: (flags & 2) !== 0, + unifyLayerVisibility: (flags & 4) !== 0, + }; + } + else if (key === 'tmln') { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + var timeScope = desc.timeScope; + // console.log('tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); + var timeline = { + start: timeScope.Strt, + duration: timeScope.duration, + inTime: timeScope.inTime, + outTime: timeScope.outTime, + autoScope: desc.autoScope, + audioLevel: desc.audioLevel, + }; + if (desc.trackList) { + timeline.tracks = (0, descriptor_1.parseTrackList)(desc.trackList, !!options.logMissingFeatures); + } + target.timeline = timeline; + // console.log('tmln:result', target.name, target.id, require('util').inspect(timeline, false, 99, true)); + } + else { + options.logDevFeatures && console.log('Unhandled "shmd" section key', key); + } + (0, psdReader_1.skipBytes)(reader, left()); + }); + }; + for (var i = 0; i < count; i++) { + _loop_1(i); + } + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target, _, options) { + var animationFrames = target.animationFrames, animationFrameFlags = target.animationFrameFlags, timestamp = target.timestamp, timeline = target.timeline; + var count = 0; + if (animationFrames) + count++; + if (animationFrameFlags) + count++; + if (timeline) + count++; + if (timestamp !== undefined) + count++; + (0, psdWriter_1.writeUint32)(writer, count); + if (animationFrames) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'mlst'); + (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) + (0, psdWriter_1.writeZeros)(writer, 3); + (0, psdWriter_1.writeSection)(writer, 2, function () { + var _a; + var desc = { + LaID: (_a = target.id) !== null && _a !== void 0 ? _a : 0, + LaSt: [], + }; + for (var i = 0; i < animationFrames.length; i++) { + var f = animationFrames[i]; + var frame = {}; + if (f.enable !== undefined) + frame.enab = f.enable; + frame.FrLs = f.frames; + if (f.offset) + frame.Ofst = (0, descriptor_1.xyToHorzVrtc)(f.offset); + if (f.referencePoint) + frame.FXRf = (0, descriptor_1.xyToHorzVrtc)(f.referencePoint); + if (f.effects) + frame.Lefx = (0, descriptor_1.serializeEffects)(f.effects, false, false); + if (f.opacity !== undefined) + frame.blendOptions = { Opct: (0, descriptor_1.unitsPercent)(f.opacity) }; + desc.LaSt.push(frame); + } + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + }, true); + } + if (animationFrameFlags) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'mdyn'); + (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) + (0, psdWriter_1.writeZeros)(writer, 3); + (0, psdWriter_1.writeSection)(writer, 2, function () { + (0, psdWriter_1.writeUint16)(writer, 0); // unknown + (0, psdWriter_1.writeUint8)(writer, animationFrameFlags.propagateFrameOne ? 0x0 : 0xf); + (0, psdWriter_1.writeUint8)(writer, (animationFrameFlags.unifyLayerPosition ? 1 : 0) | + (animationFrameFlags.unifyLayerStyle ? 2 : 0) | + (animationFrameFlags.unifyLayerVisibility ? 4 : 0)); + }); + } + if (timeline) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'tmln'); + (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) + (0, psdWriter_1.writeZeros)(writer, 3); + (0, psdWriter_1.writeSection)(writer, 2, function () { + var desc = { + Vrsn: 1, + timeScope: { + Vrsn: 1, + Strt: timeline.start, + duration: timeline.duration, + inTime: timeline.inTime, + outTime: timeline.outTime, + }, + autoScope: timeline.autoScope, + audioLevel: timeline.audioLevel, + }; + if (timeline.tracks) { + desc.trackList = (0, descriptor_1.serializeTrackList)(timeline.tracks); + } + var id = options.layerToId.get(target) || target.id || 0; + if (!id) + throw new Error('You need to provide layer.id value whan writing document with animations'); + desc.LyrI = id; + // console.log('WRITE:tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'anim'); + }, true); + } + if (timestamp !== undefined) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'cust'); + (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) + (0, psdWriter_1.writeZeros)(writer, 3); + (0, psdWriter_1.writeSection)(writer, 2, function () { + var desc = { + layerTime: timestamp, + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'metadata', desc); + }, true); + } +}); +addHandler('vstk', hasKey('vectorStroke'), function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + target.vectorStroke = { + strokeEnabled: desc.strokeEnabled, + fillEnabled: desc.fillEnabled, + lineWidth: (0, descriptor_1.parseUnits)(desc.strokeStyleLineWidth), + lineDashOffset: (0, descriptor_1.parseUnits)(desc.strokeStyleLineDashOffset), + miterLimit: desc.strokeStyleMiterLimit, + lineCapType: descriptor_1.strokeStyleLineCapType.decode(desc.strokeStyleLineCapType), + lineJoinType: descriptor_1.strokeStyleLineJoinType.decode(desc.strokeStyleLineJoinType), + lineAlignment: descriptor_1.strokeStyleLineAlignment.decode(desc.strokeStyleLineAlignment), + scaleLock: desc.strokeStyleScaleLock, + strokeAdjust: desc.strokeStyleStrokeAdjust, + lineDashSet: desc.strokeStyleLineDashSet.map(descriptor_1.parseUnits), + blendMode: descriptor_1.BlnM.decode(desc.strokeStyleBlendMode), + opacity: (0, descriptor_1.parsePercent)(desc.strokeStyleOpacity), + content: (0, descriptor_1.parseVectorContent)(desc.strokeStyleContent), + resolution: desc.strokeStyleResolution, + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a, _b, _c; + var stroke = target.vectorStroke; + var descriptor = { + strokeStyleVersion: 2, + strokeEnabled: !!stroke.strokeEnabled, + fillEnabled: !!stroke.fillEnabled, + strokeStyleLineWidth: stroke.lineWidth || { value: 3, units: 'Points' }, + strokeStyleLineDashOffset: stroke.lineDashOffset || { value: 0, units: 'Points' }, + strokeStyleMiterLimit: (_a = stroke.miterLimit) !== null && _a !== void 0 ? _a : 100, + strokeStyleLineCapType: descriptor_1.strokeStyleLineCapType.encode(stroke.lineCapType), + strokeStyleLineJoinType: descriptor_1.strokeStyleLineJoinType.encode(stroke.lineJoinType), + strokeStyleLineAlignment: descriptor_1.strokeStyleLineAlignment.encode(stroke.lineAlignment), + strokeStyleScaleLock: !!stroke.scaleLock, + strokeStyleStrokeAdjust: !!stroke.strokeAdjust, + strokeStyleLineDashSet: stroke.lineDashSet || [], + strokeStyleBlendMode: descriptor_1.BlnM.encode(stroke.blendMode), + strokeStyleOpacity: (0, descriptor_1.unitsPercent)((_b = stroke.opacity) !== null && _b !== void 0 ? _b : 1), + strokeStyleContent: (0, descriptor_1.serializeVectorContent)(stroke.content || { type: 'color', color: { r: 0, g: 0, b: 0 } }).descriptor, + strokeStyleResolution: (_c = stroke.resolution) !== null && _c !== void 0 ? _c : 72, + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'strokeStyle', descriptor); +}); +addHandler('artb', // per-layer arboard info +hasKey('artboard'), function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + var rect = desc.artboardRect; + target.artboard = { + rect: { top: rect['Top '], left: rect.Left, bottom: rect.Btom, right: rect.Rght }, + guideIndices: desc.guideIndeces, + presetName: desc.artboardPresetName, + color: (0, descriptor_1.parseColor)(desc['Clr ']), + backgroundType: desc.artboardBackgroundType, + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a; + var artboard = target.artboard; + var rect = artboard.rect; + var desc = { + artboardRect: { 'Top ': rect.top, Left: rect.left, Btom: rect.bottom, Rght: rect.right }, + guideIndeces: artboard.guideIndices || [], + artboardPresetName: artboard.presetName || '', + 'Clr ': (0, descriptor_1.serializeColor)(artboard.color), + artboardBackgroundType: (_a = artboard.backgroundType) !== null && _a !== void 0 ? _a : 1, + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'artboard', desc); +}); +addHandler('sn2P', hasKey('usingAlignedRendering'), function (reader, target) { return target.usingAlignedRendering = !!(0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.usingAlignedRendering ? 1 : 0); }); +var placedLayerTypes = ['unknown', 'vector', 'raster', 'image stack']; +function parseWarp(warp) { + var _a, _b, _c, _d, _e, _f; + var result = { + style: descriptor_1.warpStyle.decode(warp.warpStyle), + value: warp.warpValue || 0, + perspective: warp.warpPerspective || 0, + perspectiveOther: warp.warpPerspectiveOther || 0, + rotate: descriptor_1.Ornt.decode(warp.warpRotate), + bounds: warp.bounds && { + top: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds['Top ']), + left: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds.Left), + bottom: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds.Btom), + right: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds.Rght), + }, + uOrder: warp.uOrder, + vOrder: warp.vOrder, + }; + if (warp.deformNumRows != null || warp.deformNumCols != null) { + result.deformNumRows = warp.deformNumRows; + result.deformNumCols = warp.deformNumCols; + } + var envelopeWarp = warp.customEnvelopeWarp; + if (envelopeWarp) { + result.customEnvelopeWarp = { + meshPoints: [], + }; + var xs = ((_a = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Hrzn'; })) === null || _a === void 0 ? void 0 : _a.values) || []; + var ys = ((_b = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Vrtc'; })) === null || _b === void 0 ? void 0 : _b.values) || []; + for (var i = 0; i < xs.length; i++) { + result.customEnvelopeWarp.meshPoints.push({ x: xs[i], y: ys[i] }); + } + if (envelopeWarp.quiltSliceX || envelopeWarp.quiltSliceY) { + result.customEnvelopeWarp.quiltSliceX = ((_d = (_c = envelopeWarp.quiltSliceX) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.values) || []; + result.customEnvelopeWarp.quiltSliceY = ((_f = (_e = envelopeWarp.quiltSliceY) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.values) || []; + } + } + return result; +} +function isQuiltWarp(warp) { + var _a, _b; + return warp.deformNumCols != null || warp.deformNumRows != null || + ((_a = warp.customEnvelopeWarp) === null || _a === void 0 ? void 0 : _a.quiltSliceX) || ((_b = warp.customEnvelopeWarp) === null || _b === void 0 ? void 0 : _b.quiltSliceY); +} +function encodeWarp(warp) { + var bounds = warp.bounds; + var desc = { + warpStyle: descriptor_1.warpStyle.encode(warp.style), + warpValue: warp.value || 0, + warpPerspective: warp.perspective || 0, + warpPerspectiveOther: warp.perspectiveOther || 0, + warpRotate: descriptor_1.Ornt.encode(warp.rotate), + bounds: { + 'Top ': (0, descriptor_1.unitsValue)(bounds && bounds.top || { units: 'Pixels', value: 0 }, 'bounds.top'), + Left: (0, descriptor_1.unitsValue)(bounds && bounds.left || { units: 'Pixels', value: 0 }, 'bounds.left'), + Btom: (0, descriptor_1.unitsValue)(bounds && bounds.bottom || { units: 'Pixels', value: 0 }, 'bounds.bottom'), + Rght: (0, descriptor_1.unitsValue)(bounds && bounds.right || { units: 'Pixels', value: 0 }, 'bounds.right'), + }, + uOrder: warp.uOrder || 0, + vOrder: warp.vOrder || 0, + }; + var isQuilt = isQuiltWarp(warp); + if (isQuilt) { + var desc2 = desc; + desc2.deformNumRows = warp.deformNumRows || 0; + desc2.deformNumCols = warp.deformNumCols || 0; + } + var customEnvelopeWarp = warp.customEnvelopeWarp; + if (customEnvelopeWarp) { + var meshPoints = customEnvelopeWarp.meshPoints || []; + if (isQuilt) { + var desc2 = desc; + desc2.customEnvelopeWarp = { + quiltSliceX: [{ + type: 'quiltSliceX', + values: customEnvelopeWarp.quiltSliceX || [], + }], + quiltSliceY: [{ + type: 'quiltSliceY', + values: customEnvelopeWarp.quiltSliceY || [], + }], + meshPoints: [ + { type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) }, + { type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) }, + ], + }; + } + else { + desc.customEnvelopeWarp = { + meshPoints: [ + { type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) }, + { type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) }, + ], + }; + } + } + return desc; +} +addHandler('PlLd', hasKey('placedLayer'), function (reader, target, left) { + if ((0, psdReader_1.readSignature)(reader) !== 'plcL') + throw new Error("Invalid PlLd signature"); + if ((0, psdReader_1.readInt32)(reader) !== 3) + throw new Error("Invalid PlLd version"); + var id = (0, psdReader_1.readPascalString)(reader, 1); + var pageNumber = (0, psdReader_1.readInt32)(reader); + var totalPages = (0, psdReader_1.readInt32)(reader); // TODO: check how this works ? + (0, psdReader_1.readInt32)(reader); // anitAliasPolicy 16 + var placedLayerType = (0, psdReader_1.readInt32)(reader); // 0 = unknown, 1 = vector, 2 = raster, 3 = image stack + if (!placedLayerTypes[placedLayerType]) + throw new Error('Invalid PlLd type'); + var transform = []; + for (var i = 0; i < 8; i++) + transform.push((0, psdReader_1.readFloat64)(reader)); // x, y of 4 corners of the transform + var warpVersion = (0, psdReader_1.readInt32)(reader); + if (warpVersion !== 0) + throw new Error("Invalid Warp version ".concat(warpVersion)); + var warp = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.placedLayer = target.placedLayer || { + id: id, + type: placedLayerTypes[placedLayerType], + pageNumber: pageNumber, + totalPages: totalPages, + transform: transform, + warp: parseWarp(warp), + }; + // console.log('PlLd warp', require('util').inspect(warp, false, 99, true)); + // console.log('PlLd', require('util').inspect(target.placedLayer, false, 99, true)); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var placed = target.placedLayer; + (0, psdWriter_1.writeSignature)(writer, 'plcL'); + (0, psdWriter_1.writeInt32)(writer, 3); // version + (0, psdWriter_1.writePascalString)(writer, placed.id, 1); + (0, psdWriter_1.writeInt32)(writer, 1); // pageNumber + (0, psdWriter_1.writeInt32)(writer, 1); // totalPages + (0, psdWriter_1.writeInt32)(writer, 16); // anitAliasPolicy + if (placedLayerTypes.indexOf(placed.type) === -1) + throw new Error('Invalid placedLayer type'); + (0, psdWriter_1.writeInt32)(writer, placedLayerTypes.indexOf(placed.type)); + for (var i = 0; i < 8; i++) + (0, psdWriter_1.writeFloat64)(writer, placed.transform[i]); + (0, psdWriter_1.writeInt32)(writer, 0); // warp version + var isQuilt = placed.warp && isQuiltWarp(placed.warp); + var type = isQuilt ? 'quiltWarp' : 'warp'; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', type, encodeWarp(placed.warp || {}), type); +}); +addHandler('SoLd', hasKey('placedLayer'), function (reader, target, left) { + if ((0, psdReader_1.readSignature)(reader) !== 'soLD') + throw new Error("Invalid SoLd type"); + if ((0, psdReader_1.readInt32)(reader) !== 4) + throw new Error("Invalid SoLd version"); + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log('SoLd', require('util').inspect(desc, false, 99, true)); + // console.log('SoLd.warp', require('util').inspect(desc.warp, false, 99, true)); + // console.log('SoLd.quiltWarp', require('util').inspect(desc.quiltWarp, false, 99, true)); + target.placedLayer = { + id: desc.Idnt, + placed: desc.placed, + type: placedLayerTypes[desc.Type], + pageNumber: desc.PgNm, + totalPages: desc.totalPages, + frameStep: desc.frameStep, + duration: desc.duration, + frameCount: desc.frameCount, + transform: desc.Trnf, + width: desc['Sz '].Wdth, + height: desc['Sz '].Hght, + resolution: (0, descriptor_1.parseUnits)(desc.Rslt), + warp: parseWarp((desc.quiltWarp || desc.warp)), + }; + if (desc.nonAffineTransform && desc.nonAffineTransform.some(function (x, i) { return x !== desc.Trnf[i]; })) { + target.placedLayer.nonAffineTransform = desc.nonAffineTransform; + } + if (desc.Crop) + target.placedLayer.crop = desc.Crop; + if (desc.comp) + target.placedLayer.comp = desc.comp; + if (desc.compInfo) + target.placedLayer.compInfo = desc.compInfo; + (0, psdReader_1.skipBytes)(reader, left()); // HACK +}, function (writer, target) { + var _a, _b; + (0, psdWriter_1.writeSignature)(writer, 'soLD'); + (0, psdWriter_1.writeInt32)(writer, 4); // version + var placed = target.placedLayer; + var desc = __assign(__assign({ Idnt: placed.id, placed: (_a = placed.placed) !== null && _a !== void 0 ? _a : placed.id, PgNm: placed.pageNumber || 1, totalPages: placed.totalPages || 1 }, (placed.crop ? { Crop: placed.crop } : {})), { frameStep: placed.frameStep || { numerator: 0, denominator: 600 }, duration: placed.duration || { numerator: 0, denominator: 600 }, frameCount: placed.frameCount || 0, Annt: 16, Type: placedLayerTypes.indexOf(placed.type), Trnf: placed.transform, nonAffineTransform: (_b = placed.nonAffineTransform) !== null && _b !== void 0 ? _b : placed.transform, quiltWarp: {}, warp: encodeWarp(placed.warp || {}), 'Sz ': { + Wdth: placed.width || 0, + Hght: placed.height || 0, // TODO: find size ? + }, Rslt: placed.resolution ? (0, descriptor_1.unitsValue)(placed.resolution, 'resolution') : { units: 'Density', value: 72 } }); + if (placed.warp && isQuiltWarp(placed.warp)) { + var quiltWarp = encodeWarp(placed.warp); + desc.quiltWarp = quiltWarp; + desc.warp = { + warpStyle: 'warpStyle.warpNone', + warpValue: quiltWarp.warpValue, + warpPerspective: quiltWarp.warpPerspective, + warpPerspectiveOther: quiltWarp.warpPerspectiveOther, + warpRotate: quiltWarp.warpRotate, + bounds: quiltWarp.bounds, + uOrder: quiltWarp.uOrder, + vOrder: quiltWarp.vOrder, + }; + } + else { + delete desc.quiltWarp; + } + if (placed.comp) + desc.comp = placed.comp; + if (placed.compInfo) + desc.compInfo = placed.compInfo; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, desc.quiltWarp ? 'quiltWarp' : 'warp'); +}); +addHandler('fxrp', hasKey('referencePoint'), function (reader, target) { + target.referencePoint = { + x: (0, psdReader_1.readFloat64)(reader), + y: (0, psdReader_1.readFloat64)(reader), + }; +}, function (writer, target) { + (0, psdWriter_1.writeFloat64)(writer, target.referencePoint.x); + (0, psdWriter_1.writeFloat64)(writer, target.referencePoint.y); +}); +if (helpers_1.MOCK_HANDLERS) { + addHandler('Patt', function (target) { return target._Patt !== undefined; }, function (reader, target, left) { + // console.log('additional info: Patt'); + target._Patt = (0, psdReader_1.readBytes)(reader, left()); + }, function (writer, target) { return false && (0, psdWriter_1.writeBytes)(writer, target._Patt); }); +} +else { + addHandler('Patt', // TODO: handle also Pat2 & Pat3 + function (// TODO: handle also Pat2 & Pat3 + target) { return !target; }, function (reader, target, left) { + if (!left()) + return; + (0, psdReader_1.skipBytes)(reader, left()); + return; // not supported yet + target; + psdReader_1.readPattern; + // if (!target.patterns) target.patterns = []; + // target.patterns.push(readPattern(reader)); + // skipBytes(reader, left()); + }, function (_writer, _target) { + }); +} +function readRect(reader) { + var top = (0, psdReader_1.readInt32)(reader); + var left = (0, psdReader_1.readInt32)(reader); + var bottom = (0, psdReader_1.readInt32)(reader); + var right = (0, psdReader_1.readInt32)(reader); + return { top: top, left: left, bottom: bottom, right: right }; +} +function writeRect(writer, rect) { + (0, psdWriter_1.writeInt32)(writer, rect.top); + (0, psdWriter_1.writeInt32)(writer, rect.left); + (0, psdWriter_1.writeInt32)(writer, rect.bottom); + (0, psdWriter_1.writeInt32)(writer, rect.right); +} +addHandler('Anno', function (target) { return target.annotations !== undefined; }, function (reader, target, left) { + var major = (0, psdReader_1.readUint16)(reader); + var minor = (0, psdReader_1.readUint16)(reader); + if (major !== 2 || minor !== 1) + throw new Error('Invalid Anno version'); + var count = (0, psdReader_1.readUint32)(reader); + var annotations = []; + for (var i = 0; i < count; i++) { + /*const length =*/ (0, psdReader_1.readUint32)(reader); + var type = (0, psdReader_1.readSignature)(reader); + var open_1 = !!(0, psdReader_1.readUint8)(reader); + /*const flags =*/ (0, psdReader_1.readUint8)(reader); // always 28 + /*const optionalBlocks =*/ (0, psdReader_1.readUint16)(reader); + var iconLocation = readRect(reader); + var popupLocation = readRect(reader); + var color = (0, psdReader_1.readColor)(reader); + var author = (0, psdReader_1.readPascalString)(reader, 2); + var name_1 = (0, psdReader_1.readPascalString)(reader, 2); + var date = (0, psdReader_1.readPascalString)(reader, 2); + /*const contentLength =*/ (0, psdReader_1.readUint32)(reader); + /*const dataType =*/ (0, psdReader_1.readSignature)(reader); + var dataLength = (0, psdReader_1.readUint32)(reader); + var data = void 0; + if (type === 'txtA') { + if (dataLength >= 2 && (0, psdReader_1.readUint16)(reader) === 0xfeff) { + data = (0, psdReader_1.readUnicodeStringWithLength)(reader, (dataLength - 2) / 2); + } + else { + reader.offset -= 2; + data = (0, psdReader_1.readAsciiString)(reader, dataLength); + } + data = data.replace(/\r/g, '\n'); + } + else if (type === 'sndA') { + data = (0, psdReader_1.readBytes)(reader, dataLength); + } + else { + throw new Error('Unknown annotation type'); + } + annotations.push({ + type: type === 'txtA' ? 'text' : 'sound', + open: open_1, + iconLocation: iconLocation, + popupLocation: popupLocation, + color: color, + author: author, + name: name_1, + date: date, + data: data, + }); + } + target.annotations = annotations; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var annotations = target.annotations; + (0, psdWriter_1.writeUint16)(writer, 2); + (0, psdWriter_1.writeUint16)(writer, 1); + (0, psdWriter_1.writeUint32)(writer, annotations.length); + for (var _i = 0, annotations_1 = annotations; _i < annotations_1.length; _i++) { + var annotation = annotations_1[_i]; + var sound = annotation.type === 'sound'; + if (sound && !(annotation.data instanceof Uint8Array)) + throw new Error('Sound annotation data should be Uint8Array'); + if (!sound && typeof annotation.data !== 'string') + throw new Error('Text annotation data should be string'); + var lengthOffset = writer.offset; + (0, psdWriter_1.writeUint32)(writer, 0); // length + (0, psdWriter_1.writeSignature)(writer, sound ? 'sndA' : 'txtA'); + (0, psdWriter_1.writeUint8)(writer, annotation.open ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, 28); + (0, psdWriter_1.writeUint16)(writer, 1); + writeRect(writer, annotation.iconLocation); + writeRect(writer, annotation.popupLocation); + (0, psdWriter_1.writeColor)(writer, annotation.color); + (0, psdWriter_1.writePascalString)(writer, annotation.author || '', 2); + (0, psdWriter_1.writePascalString)(writer, annotation.name || '', 2); + (0, psdWriter_1.writePascalString)(writer, annotation.date || '', 2); + var contentOffset = writer.offset; + (0, psdWriter_1.writeUint32)(writer, 0); // content length + (0, psdWriter_1.writeSignature)(writer, sound ? 'sndM' : 'txtC'); + (0, psdWriter_1.writeUint32)(writer, 0); // data length + var dataOffset = writer.offset; + if (sound) { + (0, psdWriter_1.writeBytes)(writer, annotation.data); + } + else { + (0, psdWriter_1.writeUint16)(writer, 0xfeff); // unicode string indicator + var text = annotation.data.replace(/\n/g, '\r'); + for (var i = 0; i < text.length; i++) + (0, psdWriter_1.writeUint16)(writer, text.charCodeAt(i)); + } + writer.view.setUint32(lengthOffset, writer.offset - lengthOffset, false); + writer.view.setUint32(contentOffset, writer.offset - contentOffset, false); + writer.view.setUint32(dataOffset - 4, writer.offset - dataOffset, false); + } +}); +addHandler('lnk2', function (target) { return !!target.linkedFiles && target.linkedFiles.length > 0; }, function (reader, target, left, _, options) { + var psd = target; + psd.linkedFiles = []; + while (left() > 8) { + var size = readLength64(reader); // size + var startOffset = reader.offset; + var type = (0, psdReader_1.readSignature)(reader); + var version = (0, psdReader_1.readInt32)(reader); + var id = (0, psdReader_1.readPascalString)(reader, 1); + var name_2 = (0, psdReader_1.readUnicodeString)(reader); + var fileType = (0, psdReader_1.readSignature)(reader).trim(); // ' ' if empty + var fileCreator = (0, psdReader_1.readSignature)(reader).trim(); // ' ' or '\0\0\0\0' if empty + var dataSize = readLength64(reader); + var hasFileOpenDescriptor = (0, psdReader_1.readUint8)(reader); + var fileOpenDescriptor = hasFileOpenDescriptor ? (0, descriptor_1.readVersionAndDescriptor)(reader) : undefined; + var linkedFileDescriptor = type === 'liFE' ? (0, descriptor_1.readVersionAndDescriptor)(reader) : undefined; + var file = { id: id, name: name_2, data: undefined }; + if (fileType) + file.type = fileType; + if (fileCreator) + file.creator = fileCreator; + if (fileOpenDescriptor) + file.descriptor = fileOpenDescriptor; + if (type === 'liFE' && version > 3) { + var year = (0, psdReader_1.readInt32)(reader); + var month = (0, psdReader_1.readUint8)(reader); + var day = (0, psdReader_1.readUint8)(reader); + var hour = (0, psdReader_1.readUint8)(reader); + var minute = (0, psdReader_1.readUint8)(reader); + var seconds = (0, psdReader_1.readFloat64)(reader); + var wholeSeconds = Math.floor(seconds); + var ms = (seconds - wholeSeconds) * 1000; + file.time = new Date(year, month, day, hour, minute, wholeSeconds, ms); + } + var fileSize = type === 'liFE' ? readLength64(reader) : 0; + if (type === 'liFA') + (0, psdReader_1.skipBytes)(reader, 8); + if (type === 'liFD') + file.data = (0, psdReader_1.readBytes)(reader, dataSize); + if (version >= 5) + file.childDocumentID = (0, psdReader_1.readUnicodeString)(reader); + if (version >= 6) + file.assetModTime = (0, psdReader_1.readFloat64)(reader); + if (version >= 7) + file.assetLockedState = (0, psdReader_1.readUint8)(reader); + if (type === 'liFE') + file.data = (0, psdReader_1.readBytes)(reader, fileSize); + if (options.skipLinkedFilesData) + file.data = undefined; + psd.linkedFiles.push(file); + linkedFileDescriptor; + while (size % 4) + size++; + reader.offset = startOffset + size; + } + (0, psdReader_1.skipBytes)(reader, left()); // ? +}, function (writer, target) { + var psd = target; + for (var _i = 0, _a = psd.linkedFiles; _i < _a.length; _i++) { + var file = _a[_i]; + var version = 2; + if (file.assetLockedState != null) + version = 7; + else if (file.assetModTime != null) + version = 6; + else if (file.childDocumentID != null) + version = 5; + // TODO: else if (file.time != null) version = 3; (only for liFE) + (0, psdWriter_1.writeUint32)(writer, 0); + (0, psdWriter_1.writeUint32)(writer, 0); // size + var sizeOffset = writer.offset; + (0, psdWriter_1.writeSignature)(writer, file.data ? 'liFD' : 'liFA'); + (0, psdWriter_1.writeInt32)(writer, version); + (0, psdWriter_1.writePascalString)(writer, file.id || '', 1); + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, file.name || ''); + (0, psdWriter_1.writeSignature)(writer, file.type ? "".concat(file.type, " ").substring(0, 4) : ' '); + (0, psdWriter_1.writeSignature)(writer, file.creator ? "".concat(file.creator, " ").substring(0, 4) : '\0\0\0\0'); + writeLength64(writer, file.data ? file.data.byteLength : 0); + if (file.descriptor && file.descriptor.compInfo) { + var desc = { + compInfo: file.descriptor.compInfo, + }; + (0, psdWriter_1.writeUint8)(writer, 1); + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + } + else { + (0, psdWriter_1.writeUint8)(writer, 0); + } + if (file.data) + (0, psdWriter_1.writeBytes)(writer, file.data); + else + writeLength64(writer, 0); + if (version >= 5) + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, file.childDocumentID || ''); + if (version >= 6) + (0, psdWriter_1.writeFloat64)(writer, file.assetModTime || 0); + if (version >= 7) + (0, psdWriter_1.writeUint8)(writer, file.assetLockedState || 0); + var size = writer.offset - sizeOffset; + writer.view.setUint32(sizeOffset - 4, size, false); // write size + while (size % 4) { + size++; + (0, psdWriter_1.writeUint8)(writer, 0); + } + } +}); +addHandlerAlias('lnkD', 'lnk2'); +addHandlerAlias('lnk3', 'lnk2'); +// this seems to just be zero size block, ignore it +addHandler('lnkE', function (target) { return target._lnkE !== undefined; }, function (reader, target, left, _psds, options) { + if (options.logMissingFeatures && left()) { + console.log("Non-empty lnkE layer info (".concat(left(), " bytes)")); + } + if (helpers_1.MOCK_HANDLERS) { + target._lnkE = (0, psdReader_1.readBytes)(reader, left()); + } +}, function (writer, target) { return helpers_1.MOCK_HANDLERS && (0, psdWriter_1.writeBytes)(writer, target._lnkE); }); +addHandler('pths', hasKey('pathList'), function (reader, target) { + var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.pathList = []; // TODO: read paths (find example with non-empty list) + descriptor; + // console.log('pths', descriptor); // TODO: remove this +}, function (writer, _target) { + var descriptor = { + pathList: [], // TODO: write paths + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'pathsDataClass', descriptor); +}); +addHandler('lyvr', hasKey('version'), function (reader, target) { return target.version = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.version); }); +function adjustmentType(type) { + return function (target) { return !!target.adjustment && target.adjustment.type === type; }; +} +addHandler('brit', adjustmentType('brightness/contrast'), function (reader, target, left) { + if (!target.adjustment) { // ignore if got one from CgEd block + target.adjustment = { + type: 'brightness/contrast', + brightness: (0, psdReader_1.readInt16)(reader), + contrast: (0, psdReader_1.readInt16)(reader), + meanValue: (0, psdReader_1.readInt16)(reader), + labColorOnly: !!(0, psdReader_1.readUint8)(reader), + useLegacy: true, + }; + } + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a; + var info = target.adjustment; + (0, psdWriter_1.writeInt16)(writer, info.brightness || 0); + (0, psdWriter_1.writeInt16)(writer, info.contrast || 0); + (0, psdWriter_1.writeInt16)(writer, (_a = info.meanValue) !== null && _a !== void 0 ? _a : 127); + (0, psdWriter_1.writeUint8)(writer, info.labColorOnly ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 1); +}); +function readLevelsChannel(reader) { + var shadowInput = (0, psdReader_1.readInt16)(reader); + var highlightInput = (0, psdReader_1.readInt16)(reader); + var shadowOutput = (0, psdReader_1.readInt16)(reader); + var highlightOutput = (0, psdReader_1.readInt16)(reader); + var midtoneInput = (0, psdReader_1.readInt16)(reader) / 100; + return { shadowInput: shadowInput, highlightInput: highlightInput, shadowOutput: shadowOutput, highlightOutput: highlightOutput, midtoneInput: midtoneInput }; +} +function writeLevelsChannel(writer, channel) { + (0, psdWriter_1.writeInt16)(writer, channel.shadowInput); + (0, psdWriter_1.writeInt16)(writer, channel.highlightInput); + (0, psdWriter_1.writeInt16)(writer, channel.shadowOutput); + (0, psdWriter_1.writeInt16)(writer, channel.highlightOutput); + (0, psdWriter_1.writeInt16)(writer, Math.round(channel.midtoneInput * 100)); +} +addHandler('levl', adjustmentType('levels'), function (reader, target, left) { + if ((0, psdReader_1.readUint16)(reader) !== 2) + throw new Error('Invalid levl version'); + target.adjustment = __assign(__assign({}, target.adjustment), { type: 'levels', rgb: readLevelsChannel(reader), red: readLevelsChannel(reader), green: readLevelsChannel(reader), blue: readLevelsChannel(reader) }); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var defaultChannel = { + shadowInput: 0, + highlightInput: 255, + shadowOutput: 0, + highlightOutput: 255, + midtoneInput: 1, + }; + (0, psdWriter_1.writeUint16)(writer, 2); // version + writeLevelsChannel(writer, info.rgb || defaultChannel); + writeLevelsChannel(writer, info.red || defaultChannel); + writeLevelsChannel(writer, info.blue || defaultChannel); + writeLevelsChannel(writer, info.green || defaultChannel); + for (var i = 0; i < 59; i++) + writeLevelsChannel(writer, defaultChannel); +}); +function readCurveChannel(reader) { + var nodes = (0, psdReader_1.readUint16)(reader); + var channel = []; + for (var j = 0; j < nodes; j++) { + var output = (0, psdReader_1.readInt16)(reader); + var input = (0, psdReader_1.readInt16)(reader); + channel.push({ input: input, output: output }); + } + return channel; +} +function writeCurveChannel(writer, channel) { + (0, psdWriter_1.writeUint16)(writer, channel.length); + for (var _i = 0, channel_1 = channel; _i < channel_1.length; _i++) { + var n = channel_1[_i]; + (0, psdWriter_1.writeUint16)(writer, n.output); + (0, psdWriter_1.writeUint16)(writer, n.input); + } +} +addHandler('curv', adjustmentType('curves'), function (reader, target, left) { + (0, psdReader_1.readUint8)(reader); + if ((0, psdReader_1.readUint16)(reader) !== 1) + throw new Error('Invalid curv version'); + (0, psdReader_1.readUint16)(reader); + var channels = (0, psdReader_1.readUint16)(reader); + var info = { type: 'curves' }; + if (channels & 1) + info.rgb = readCurveChannel(reader); + if (channels & 2) + info.red = readCurveChannel(reader); + if (channels & 4) + info.green = readCurveChannel(reader); + if (channels & 8) + info.blue = readCurveChannel(reader); + target.adjustment = __assign(__assign({}, target.adjustment), info); + // ignoring, duplicate information + // checkSignature(reader, 'Crv '); + // const cVersion = readUint16(reader); + // readUint16(reader); + // const channelCount = readUint16(reader); + // for (let i = 0; i < channelCount; i++) { + // const index = readUint16(reader); + // const nodes = readUint16(reader); + // for (let j = 0; j < nodes; j++) { + // const output = readInt16(reader); + // const input = readInt16(reader); + // } + // } + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var rgb = info.rgb, red = info.red, green = info.green, blue = info.blue; + var channels = 0; + var channelCount = 0; + if (rgb && rgb.length) { + channels |= 1; + channelCount++; + } + if (red && red.length) { + channels |= 2; + channelCount++; + } + if (green && green.length) { + channels |= 4; + channelCount++; + } + if (blue && blue.length) { + channels |= 8; + channelCount++; + } + (0, psdWriter_1.writeUint8)(writer, 0); + (0, psdWriter_1.writeUint16)(writer, 1); // version + (0, psdWriter_1.writeUint16)(writer, 0); + (0, psdWriter_1.writeUint16)(writer, channels); + if (rgb && rgb.length) + writeCurveChannel(writer, rgb); + if (red && red.length) + writeCurveChannel(writer, red); + if (green && green.length) + writeCurveChannel(writer, green); + if (blue && blue.length) + writeCurveChannel(writer, blue); + (0, psdWriter_1.writeSignature)(writer, 'Crv '); + (0, psdWriter_1.writeUint16)(writer, 4); // version + (0, psdWriter_1.writeUint16)(writer, 0); + (0, psdWriter_1.writeUint16)(writer, channelCount); + if (rgb && rgb.length) { + (0, psdWriter_1.writeUint16)(writer, 0); + writeCurveChannel(writer, rgb); + } + if (red && red.length) { + (0, psdWriter_1.writeUint16)(writer, 1); + writeCurveChannel(writer, red); + } + if (green && green.length) { + (0, psdWriter_1.writeUint16)(writer, 2); + writeCurveChannel(writer, green); + } + if (blue && blue.length) { + (0, psdWriter_1.writeUint16)(writer, 3); + writeCurveChannel(writer, blue); + } + (0, psdWriter_1.writeZeros)(writer, 2); +}); +addHandler('expA', adjustmentType('exposure'), function (reader, target, left) { + if ((0, psdReader_1.readUint16)(reader) !== 1) + throw new Error('Invalid expA version'); + target.adjustment = __assign(__assign({}, target.adjustment), { type: 'exposure', exposure: (0, psdReader_1.readFloat32)(reader), offset: (0, psdReader_1.readFloat32)(reader), gamma: (0, psdReader_1.readFloat32)(reader) }); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, 1); // version + (0, psdWriter_1.writeFloat32)(writer, info.exposure); + (0, psdWriter_1.writeFloat32)(writer, info.offset); + (0, psdWriter_1.writeFloat32)(writer, info.gamma); + (0, psdWriter_1.writeZeros)(writer, 2); +}); +addHandler('vibA', adjustmentType('vibrance'), function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.adjustment = { type: 'vibrance' }; + if (desc.vibrance !== undefined) + target.adjustment.vibrance = desc.vibrance; + if (desc.Strt !== undefined) + target.adjustment.saturation = desc.Strt; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var desc = {}; + if (info.vibrance !== undefined) + desc.vibrance = info.vibrance; + if (info.saturation !== undefined) + desc.Strt = info.saturation; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +function readHueChannel(reader) { + return { + a: (0, psdReader_1.readInt16)(reader), + b: (0, psdReader_1.readInt16)(reader), + c: (0, psdReader_1.readInt16)(reader), + d: (0, psdReader_1.readInt16)(reader), + hue: (0, psdReader_1.readInt16)(reader), + saturation: (0, psdReader_1.readInt16)(reader), + lightness: (0, psdReader_1.readInt16)(reader), + }; +} +function writeHueChannel(writer, channel) { + var c = channel || {}; + (0, psdWriter_1.writeInt16)(writer, c.a || 0); + (0, psdWriter_1.writeInt16)(writer, c.b || 0); + (0, psdWriter_1.writeInt16)(writer, c.c || 0); + (0, psdWriter_1.writeInt16)(writer, c.d || 0); + (0, psdWriter_1.writeInt16)(writer, c.hue || 0); + (0, psdWriter_1.writeInt16)(writer, c.saturation || 0); + (0, psdWriter_1.writeInt16)(writer, c.lightness || 0); +} +addHandler('hue2', adjustmentType('hue/saturation'), function (reader, target, left) { + if ((0, psdReader_1.readUint16)(reader) !== 2) + throw new Error('Invalid hue2 version'); + target.adjustment = __assign(__assign({}, target.adjustment), { type: 'hue/saturation', master: readHueChannel(reader), reds: readHueChannel(reader), yellows: readHueChannel(reader), greens: readHueChannel(reader), cyans: readHueChannel(reader), blues: readHueChannel(reader), magentas: readHueChannel(reader) }); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, 2); // version + writeHueChannel(writer, info.master); + writeHueChannel(writer, info.reds); + writeHueChannel(writer, info.yellows); + writeHueChannel(writer, info.greens); + writeHueChannel(writer, info.cyans); + writeHueChannel(writer, info.blues); + writeHueChannel(writer, info.magentas); +}); +function readColorBalance(reader) { + return { + cyanRed: (0, psdReader_1.readInt16)(reader), + magentaGreen: (0, psdReader_1.readInt16)(reader), + yellowBlue: (0, psdReader_1.readInt16)(reader), + }; +} +function writeColorBalance(writer, value) { + (0, psdWriter_1.writeInt16)(writer, value.cyanRed || 0); + (0, psdWriter_1.writeInt16)(writer, value.magentaGreen || 0); + (0, psdWriter_1.writeInt16)(writer, value.yellowBlue || 0); +} +addHandler('blnc', adjustmentType('color balance'), function (reader, target, left) { + target.adjustment = { + type: 'color balance', + shadows: readColorBalance(reader), + midtones: readColorBalance(reader), + highlights: readColorBalance(reader), + preserveLuminosity: !!(0, psdReader_1.readUint8)(reader), + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + writeColorBalance(writer, info.shadows || {}); + writeColorBalance(writer, info.midtones || {}); + writeColorBalance(writer, info.highlights || {}); + (0, psdWriter_1.writeUint8)(writer, info.preserveLuminosity ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 1); +}); +addHandler('blwh', adjustmentType('black & white'), function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.adjustment = { + type: 'black & white', + reds: desc['Rd '], + yellows: desc.Yllw, + greens: desc['Grn '], + cyans: desc['Cyn '], + blues: desc['Bl '], + magentas: desc.Mgnt, + useTint: !!desc.useTint, + presetKind: desc.bwPresetKind, + presetFileName: desc.blackAndWhitePresetFileName, + }; + if (desc.tintColor !== undefined) + target.adjustment.tintColor = (0, descriptor_1.parseColor)(desc.tintColor); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var desc = { + 'Rd ': info.reds || 0, + Yllw: info.yellows || 0, + 'Grn ': info.greens || 0, + 'Cyn ': info.cyans || 0, + 'Bl ': info.blues || 0, + Mgnt: info.magentas || 0, + useTint: !!info.useTint, + tintColor: (0, descriptor_1.serializeColor)(info.tintColor), + bwPresetKind: info.presetKind || 0, + blackAndWhitePresetFileName: info.presetFileName || '', + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler('phfl', adjustmentType('photo filter'), function (reader, target, left) { + var version = (0, psdReader_1.readUint16)(reader); + if (version !== 2 && version !== 3) + throw new Error('Invalid phfl version'); + var color; + if (version === 2) { + color = (0, psdReader_1.readColor)(reader); + } + else { // version 3 + // TODO: test this, this is probably wrong + color = { + l: (0, psdReader_1.readInt32)(reader) / 100, + a: (0, psdReader_1.readInt32)(reader) / 100, + b: (0, psdReader_1.readInt32)(reader) / 100, + }; + } + target.adjustment = { + type: 'photo filter', + color: color, + density: (0, psdReader_1.readUint32)(reader) / 100, + preserveLuminosity: !!(0, psdReader_1.readUint8)(reader), + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, 2); // version + (0, psdWriter_1.writeColor)(writer, info.color || { l: 0, a: 0, b: 0 }); + (0, psdWriter_1.writeUint32)(writer, (info.density || 0) * 100); + (0, psdWriter_1.writeUint8)(writer, info.preserveLuminosity ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 3); +}); +function readMixrChannel(reader) { + var red = (0, psdReader_1.readInt16)(reader); + var green = (0, psdReader_1.readInt16)(reader); + var blue = (0, psdReader_1.readInt16)(reader); + (0, psdReader_1.skipBytes)(reader, 2); + var constant = (0, psdReader_1.readInt16)(reader); + return { red: red, green: green, blue: blue, constant: constant }; +} +function writeMixrChannel(writer, channel) { + var c = channel || {}; + (0, psdWriter_1.writeInt16)(writer, c.red); + (0, psdWriter_1.writeInt16)(writer, c.green); + (0, psdWriter_1.writeInt16)(writer, c.blue); + (0, psdWriter_1.writeZeros)(writer, 2); + (0, psdWriter_1.writeInt16)(writer, c.constant); +} +addHandler('mixr', adjustmentType('channel mixer'), function (reader, target, left) { + if ((0, psdReader_1.readUint16)(reader) !== 1) + throw new Error('Invalid mixr version'); + var adjustment = target.adjustment = __assign(__assign({}, target.adjustment), { type: 'channel mixer', monochrome: !!(0, psdReader_1.readUint16)(reader) }); + if (!adjustment.monochrome) { + adjustment.red = readMixrChannel(reader); + adjustment.green = readMixrChannel(reader); + adjustment.blue = readMixrChannel(reader); + } + adjustment.gray = readMixrChannel(reader); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, 1); // version + (0, psdWriter_1.writeUint16)(writer, info.monochrome ? 1 : 0); + if (info.monochrome) { + writeMixrChannel(writer, info.gray); + (0, psdWriter_1.writeZeros)(writer, 3 * 5 * 2); + } + else { + writeMixrChannel(writer, info.red); + writeMixrChannel(writer, info.green); + writeMixrChannel(writer, info.blue); + writeMixrChannel(writer, info.gray); + } +}); +var colorLookupType = (0, helpers_1.createEnum)('colorLookupType', '3DLUT', { + '3dlut': '3DLUT', + abstractProfile: 'abstractProfile', + deviceLinkProfile: 'deviceLinkProfile', +}); +var LUTFormatType = (0, helpers_1.createEnum)('LUTFormatType', 'look', { + look: 'LUTFormatLOOK', + cube: 'LUTFormatCUBE', + '3dl': 'LUTFormat3DL', +}); +var colorLookupOrder = (0, helpers_1.createEnum)('colorLookupOrder', 'rgb', { + rgb: 'rgbOrder', + bgr: 'bgrOrder', +}); +addHandler('clrL', adjustmentType('color lookup'), function (reader, target, left) { + if ((0, psdReader_1.readUint16)(reader) !== 1) + throw new Error('Invalid clrL version'); + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.adjustment = { type: 'color lookup' }; + var info = target.adjustment; + if (desc.lookupType !== undefined) + info.lookupType = colorLookupType.decode(desc.lookupType); + if (desc['Nm '] !== undefined) + info.name = desc['Nm ']; + if (desc.Dthr !== undefined) + info.dither = desc.Dthr; + if (desc.profile !== undefined) + info.profile = desc.profile; + if (desc.LUTFormat !== undefined) + info.lutFormat = LUTFormatType.decode(desc.LUTFormat); + if (desc.dataOrder !== undefined) + info.dataOrder = colorLookupOrder.decode(desc.dataOrder); + if (desc.tableOrder !== undefined) + info.tableOrder = colorLookupOrder.decode(desc.tableOrder); + if (desc.LUT3DFileData !== undefined) + info.lut3DFileData = desc.LUT3DFileData; + if (desc.LUT3DFileName !== undefined) + info.lut3DFileName = desc.LUT3DFileName; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var desc = {}; + if (info.lookupType !== undefined) + desc.lookupType = colorLookupType.encode(info.lookupType); + if (info.name !== undefined) + desc['Nm '] = info.name; + if (info.dither !== undefined) + desc.Dthr = info.dither; + if (info.profile !== undefined) + desc.profile = info.profile; + if (info.lutFormat !== undefined) + desc.LUTFormat = LUTFormatType.encode(info.lutFormat); + if (info.dataOrder !== undefined) + desc.dataOrder = colorLookupOrder.encode(info.dataOrder); + if (info.tableOrder !== undefined) + desc.tableOrder = colorLookupOrder.encode(info.tableOrder); + if (info.lut3DFileData !== undefined) + desc.LUT3DFileData = info.lut3DFileData; + if (info.lut3DFileName !== undefined) + desc.LUT3DFileName = info.lut3DFileName; + (0, psdWriter_1.writeUint16)(writer, 1); // version + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler('nvrt', adjustmentType('invert'), function (reader, target, left) { + target.adjustment = { type: 'invert' }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function () { + // nothing to write here +}); +addHandler('post', adjustmentType('posterize'), function (reader, target, left) { + target.adjustment = { + type: 'posterize', + levels: (0, psdReader_1.readUint16)(reader), + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a; + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, (_a = info.levels) !== null && _a !== void 0 ? _a : 4); + (0, psdWriter_1.writeZeros)(writer, 2); +}); +addHandler('thrs', adjustmentType('threshold'), function (reader, target, left) { + target.adjustment = { + type: 'threshold', + level: (0, psdReader_1.readUint16)(reader), + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a; + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, (_a = info.level) !== null && _a !== void 0 ? _a : 128); + (0, psdWriter_1.writeZeros)(writer, 2); +}); +var grdmColorModels = ['', '', '', 'rgb', 'hsb', '', 'lab']; +addHandler('grdm', adjustmentType('gradient map'), function (reader, target, left) { + if ((0, psdReader_1.readUint16)(reader) !== 1) + throw new Error('Invalid grdm version'); + var info = { + type: 'gradient map', + gradientType: 'solid', + }; + info.reverse = !!(0, psdReader_1.readUint8)(reader); + info.dither = !!(0, psdReader_1.readUint8)(reader); + info.name = (0, psdReader_1.readUnicodeString)(reader); + info.colorStops = []; + info.opacityStops = []; + var stopsCount = (0, psdReader_1.readUint16)(reader); + for (var i = 0; i < stopsCount; i++) { + info.colorStops.push({ + location: (0, psdReader_1.readUint32)(reader), + midpoint: (0, psdReader_1.readUint32)(reader) / 100, + color: (0, psdReader_1.readColor)(reader), + }); + (0, psdReader_1.skipBytes)(reader, 2); + } + var opacityStopsCount = (0, psdReader_1.readUint16)(reader); + for (var i = 0; i < opacityStopsCount; i++) { + info.opacityStops.push({ + location: (0, psdReader_1.readUint32)(reader), + midpoint: (0, psdReader_1.readUint32)(reader) / 100, + opacity: (0, psdReader_1.readUint16)(reader) / 0xff, + }); + } + var expansionCount = (0, psdReader_1.readUint16)(reader); + if (expansionCount !== 2) + throw new Error('Invalid grdm expansion count'); + var interpolation = (0, psdReader_1.readUint16)(reader); + info.smoothness = interpolation / 4096; + var length = (0, psdReader_1.readUint16)(reader); + if (length !== 32) + throw new Error('Invalid grdm length'); + info.gradientType = (0, psdReader_1.readUint16)(reader) ? 'noise' : 'solid'; + info.randomSeed = (0, psdReader_1.readUint32)(reader); + info.addTransparency = !!(0, psdReader_1.readUint16)(reader); + info.restrictColors = !!(0, psdReader_1.readUint16)(reader); + info.roughness = (0, psdReader_1.readUint32)(reader) / 4096; + info.colorModel = (grdmColorModels[(0, psdReader_1.readUint16)(reader)] || 'rgb'); + info.min = [ + (0, psdReader_1.readUint16)(reader) / 0x8000, + (0, psdReader_1.readUint16)(reader) / 0x8000, + (0, psdReader_1.readUint16)(reader) / 0x8000, + (0, psdReader_1.readUint16)(reader) / 0x8000, + ]; + info.max = [ + (0, psdReader_1.readUint16)(reader) / 0x8000, + (0, psdReader_1.readUint16)(reader) / 0x8000, + (0, psdReader_1.readUint16)(reader) / 0x8000, + (0, psdReader_1.readUint16)(reader) / 0x8000, + ]; + (0, psdReader_1.skipBytes)(reader, left()); + for (var _i = 0, _a = info.colorStops; _i < _a.length; _i++) { + var s = _a[_i]; + s.location /= interpolation; + } + for (var _b = 0, _c = info.opacityStops; _b < _c.length; _b++) { + var s = _c[_b]; + s.location /= interpolation; + } + target.adjustment = info; +}, function (writer, target) { + var _a, _b, _c; + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, 1); // version + (0, psdWriter_1.writeUint8)(writer, info.reverse ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, info.dither ? 1 : 0); + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, info.name || ''); + (0, psdWriter_1.writeUint16)(writer, info.colorStops && info.colorStops.length || 0); + var interpolation = Math.round(((_a = info.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096); + for (var _i = 0, _d = info.colorStops || []; _i < _d.length; _i++) { + var s = _d[_i]; + (0, psdWriter_1.writeUint32)(writer, Math.round(s.location * interpolation)); + (0, psdWriter_1.writeUint32)(writer, Math.round(s.midpoint * 100)); + (0, psdWriter_1.writeColor)(writer, s.color); + (0, psdWriter_1.writeZeros)(writer, 2); + } + (0, psdWriter_1.writeUint16)(writer, info.opacityStops && info.opacityStops.length || 0); + for (var _e = 0, _f = info.opacityStops || []; _e < _f.length; _e++) { + var s = _f[_e]; + (0, psdWriter_1.writeUint32)(writer, Math.round(s.location * interpolation)); + (0, psdWriter_1.writeUint32)(writer, Math.round(s.midpoint * 100)); + (0, psdWriter_1.writeUint16)(writer, Math.round(s.opacity * 0xff)); + } + (0, psdWriter_1.writeUint16)(writer, 2); // expansion count + (0, psdWriter_1.writeUint16)(writer, interpolation); + (0, psdWriter_1.writeUint16)(writer, 32); // length + (0, psdWriter_1.writeUint16)(writer, info.gradientType === 'noise' ? 1 : 0); + (0, psdWriter_1.writeUint32)(writer, info.randomSeed || 0); + (0, psdWriter_1.writeUint16)(writer, info.addTransparency ? 1 : 0); + (0, psdWriter_1.writeUint16)(writer, info.restrictColors ? 1 : 0); + (0, psdWriter_1.writeUint32)(writer, Math.round(((_b = info.roughness) !== null && _b !== void 0 ? _b : 1) * 4096)); + var colorModel = grdmColorModels.indexOf((_c = info.colorModel) !== null && _c !== void 0 ? _c : 'rgb'); + (0, psdWriter_1.writeUint16)(writer, colorModel === -1 ? 3 : colorModel); + for (var i = 0; i < 4; i++) + (0, psdWriter_1.writeUint16)(writer, Math.round((info.min && info.min[i] || 0) * 0x8000)); + for (var i = 0; i < 4; i++) + (0, psdWriter_1.writeUint16)(writer, Math.round((info.max && info.max[i] || 0) * 0x8000)); + (0, psdWriter_1.writeZeros)(writer, 4); +}); +function readSelectiveColors(reader) { + return { + c: (0, psdReader_1.readInt16)(reader), + m: (0, psdReader_1.readInt16)(reader), + y: (0, psdReader_1.readInt16)(reader), + k: (0, psdReader_1.readInt16)(reader), + }; +} +function writeSelectiveColors(writer, cmyk) { + var c = cmyk || {}; + (0, psdWriter_1.writeInt16)(writer, c.c); + (0, psdWriter_1.writeInt16)(writer, c.m); + (0, psdWriter_1.writeInt16)(writer, c.y); + (0, psdWriter_1.writeInt16)(writer, c.k); +} +addHandler('selc', adjustmentType('selective color'), function (reader, target) { + if ((0, psdReader_1.readUint16)(reader) !== 1) + throw new Error('Invalid selc version'); + var mode = (0, psdReader_1.readUint16)(reader) ? 'absolute' : 'relative'; + (0, psdReader_1.skipBytes)(reader, 8); + target.adjustment = { + type: 'selective color', + mode: mode, + reds: readSelectiveColors(reader), + yellows: readSelectiveColors(reader), + greens: readSelectiveColors(reader), + cyans: readSelectiveColors(reader), + blues: readSelectiveColors(reader), + magentas: readSelectiveColors(reader), + whites: readSelectiveColors(reader), + neutrals: readSelectiveColors(reader), + blacks: readSelectiveColors(reader), + }; +}, function (writer, target) { + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, 1); // version + (0, psdWriter_1.writeUint16)(writer, info.mode === 'absolute' ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 8); + writeSelectiveColors(writer, info.reds); + writeSelectiveColors(writer, info.yellows); + writeSelectiveColors(writer, info.greens); + writeSelectiveColors(writer, info.cyans); + writeSelectiveColors(writer, info.blues); + writeSelectiveColors(writer, info.magentas); + writeSelectiveColors(writer, info.whites); + writeSelectiveColors(writer, info.neutrals); + writeSelectiveColors(writer, info.blacks); +}); +addHandler('CgEd', function (target) { + var a = target.adjustment; + if (!a) + return false; + return (a.type === 'brightness/contrast' && !a.useLegacy) || + ((a.type === 'levels' || a.type === 'curves' || a.type === 'exposure' || a.type === 'channel mixer' || + a.type === 'hue/saturation') && a.presetFileName !== undefined); +}, function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + if (desc.Vrsn !== 1) + throw new Error('Invalid CgEd version'); + // this section can specify preset file name for other adjustment types + if ('presetFileName' in desc) { + target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.presetKind, presetFileName: desc.presetFileName }); + } + else if ('curvesPresetFileName' in desc) { + target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.curvesPresetKind, presetFileName: desc.curvesPresetFileName }); + } + else if ('mixerPresetFileName' in desc) { + target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.mixerPresetKind, presetFileName: desc.mixerPresetFileName }); + } + else { + target.adjustment = { + type: 'brightness/contrast', + brightness: desc.Brgh, + contrast: desc.Cntr, + meanValue: desc.means, + useLegacy: !!desc.useLegacy, + labColorOnly: !!desc['Lab '], + auto: !!desc.Auto, + }; + } + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a, _b, _c, _d; + var info = target.adjustment; + if (info.type === 'levels' || info.type === 'exposure' || info.type === 'hue/saturation') { + var desc = { + Vrsn: 1, + presetKind: (_a = info.presetKind) !== null && _a !== void 0 ? _a : 1, + presetFileName: info.presetFileName || '', + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + } + else if (info.type === 'curves') { + var desc = { + Vrsn: 1, + curvesPresetKind: (_b = info.presetKind) !== null && _b !== void 0 ? _b : 1, + curvesPresetFileName: info.presetFileName || '', + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + } + else if (info.type === 'channel mixer') { + var desc = { + Vrsn: 1, + mixerPresetKind: (_c = info.presetKind) !== null && _c !== void 0 ? _c : 1, + mixerPresetFileName: info.presetFileName || '', + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + } + else if (info.type === 'brightness/contrast') { + var desc = { + Vrsn: 1, + Brgh: info.brightness || 0, + Cntr: info.contrast || 0, + means: (_d = info.meanValue) !== null && _d !== void 0 ? _d : 127, + 'Lab ': !!info.labColorOnly, + useLegacy: !!info.useLegacy, + Auto: !!info.auto, + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + } + else { + throw new Error('Unhandled CgEd case'); + } +}); +addHandler('Txt2', hasKey('engineData'), function (reader, target, left) { + var data = (0, psdReader_1.readBytes)(reader, left()); + target.engineData = (0, base64_js_1.fromByteArray)(data); + // const engineData = parseEngineData(data); + // console.log(require('util').inspect(engineData, false, 99, true)); + // require('fs').writeFileSync('resources/engineData2Simple.txt', require('util').inspect(engineData, false, 99, false), 'utf8'); + // require('fs').writeFileSync('test_data.json', JSON.stringify(ed, null, 2), 'utf8'); +}, function (writer, target) { + var buffer = (0, base64_js_1.toByteArray)(target.engineData); + (0, psdWriter_1.writeBytes)(writer, buffer); +}); +addHandler('FMsk', hasKey('filterMask'), function (reader, target) { + target.filterMask = { + colorSpace: (0, psdReader_1.readColor)(reader), + opacity: (0, psdReader_1.readUint16)(reader) / 0xff, + }; +}, function (writer, target) { + var _a; + (0, psdWriter_1.writeColor)(writer, target.filterMask.colorSpace); + (0, psdWriter_1.writeUint16)(writer, (0, helpers_1.clamp)((_a = target.filterMask.opacity) !== null && _a !== void 0 ? _a : 1, 0, 1) * 0xff); +}); +addHandler('artd', // document-wide artboard info +function (// document-wide artboard info +target) { return target.artboards !== undefined; }, function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.artboards = { + count: desc['Cnt '], + autoExpandOffset: { horizontal: desc.autoExpandOffset.Hrzn, vertical: desc.autoExpandOffset.Vrtc }, + origin: { horizontal: desc.origin.Hrzn, vertical: desc.origin.Vrtc }, + autoExpandEnabled: desc.autoExpandEnabled, + autoNestEnabled: desc.autoNestEnabled, + autoPositionEnabled: desc.autoPositionEnabled, + shrinkwrapOnSaveEnabled: desc.shrinkwrapOnSaveEnabled, + docDefaultNewArtboardBackgroundColor: (0, descriptor_1.parseColor)(desc.docDefaultNewArtboardBackgroundColor), + docDefaultNewArtboardBackgroundType: desc.docDefaultNewArtboardBackgroundType, + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a, _b, _c, _d, _e; + var artb = target.artboards; + var desc = { + 'Cnt ': artb.count, + autoExpandOffset: artb.autoExpandOffset ? { Hrzn: artb.autoExpandOffset.horizontal, Vrtc: artb.autoExpandOffset.vertical } : { Hrzn: 0, Vrtc: 0 }, + origin: artb.origin ? { Hrzn: artb.origin.horizontal, Vrtc: artb.origin.vertical } : { Hrzn: 0, Vrtc: 0 }, + autoExpandEnabled: (_a = artb.autoExpandEnabled) !== null && _a !== void 0 ? _a : true, + autoNestEnabled: (_b = artb.autoNestEnabled) !== null && _b !== void 0 ? _b : true, + autoPositionEnabled: (_c = artb.autoPositionEnabled) !== null && _c !== void 0 ? _c : true, + shrinkwrapOnSaveEnabled: (_d = artb.shrinkwrapOnSaveEnabled) !== null && _d !== void 0 ? _d : true, + docDefaultNewArtboardBackgroundColor: (0, descriptor_1.serializeColor)(artb.docDefaultNewArtboardBackgroundColor), + docDefaultNewArtboardBackgroundType: (_e = artb.docDefaultNewArtboardBackgroundType) !== null && _e !== void 0 ? _e : 1, + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'artd'); +}); +function hasMultiEffects(effects) { + return Object.keys(effects).map(function (key) { return effects[key]; }).some(function (v) { return Array.isArray(v) && v.length > 1; }); +} +exports.hasMultiEffects = hasMultiEffects; +addHandler('lfx2', function (target) { return target.effects !== undefined && !hasMultiEffects(target.effects); }, function (reader, target, left, _, options) { + var version = (0, psdReader_1.readUint32)(reader); + if (version !== 0) + throw new Error("Invalid lfx2 version"); + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + // TODO: don't discard if we got it from lmfx + // discard if read in 'lrFX' section + target.effects = (0, descriptor_1.parseEffects)(desc, !!options.logMissingFeatures); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target, _, options) { + var desc = (0, descriptor_1.serializeEffects)(target.effects, !!options.logMissingFeatures, false); + // console.log(require('util').inspect(desc, false, 99, true)); + (0, psdWriter_1.writeUint32)(writer, 0); // version + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler('cinf', hasKey('compositorUsed'), function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + target.compositorUsed = { + description: desc.description, + reason: desc.reason, + engine: desc.Engn.split('.')[1], + enableCompCore: desc.enableCompCore.split('.')[1], + enableCompCoreGPU: desc.enableCompCoreGPU.split('.')[1], + compCoreSupport: desc.compCoreSupport.split('.')[1], + compCoreGPUSupport: desc.compCoreGPUSupport.split('.')[1], + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var cinf = target.compositorUsed; + var desc = { + Vrsn: { major: 1, minor: 0, fix: 0 }, + // psVersion: { major: 22, minor: 3, fix: 1 }, // TESTING + description: cinf.description, + reason: cinf.reason, + Engn: "Engn.".concat(cinf.engine), + enableCompCore: "enable.".concat(cinf.enableCompCore), + enableCompCoreGPU: "enable.".concat(cinf.enableCompCoreGPU), + // enableCompCoreThreads: `enable.feature`, // TESTING + compCoreSupport: "reason.".concat(cinf.compCoreSupport), + compCoreGPUSupport: "reason.".concat(cinf.compCoreGPUSupport), + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +// extension settings ?, ignore it +addHandler('extn', function (target) { return target._extn !== undefined; }, function (reader, target) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + if (helpers_1.MOCK_HANDLERS) + target._extn = desc; +}, function (writer, target) { + // TODO: need to add correct types for desc fields (resources/src.psd) + if (helpers_1.MOCK_HANDLERS) + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', target._extn); +}); +addHandler('iOpa', hasKey('fillOpacity'), function (reader, target) { + target.fillOpacity = (0, psdReader_1.readUint8)(reader) / 0xff; + (0, psdReader_1.skipBytes)(reader, 3); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.fillOpacity * 0xff); + (0, psdWriter_1.writeZeros)(writer, 3); +}); +addHandler('brst', hasKey('channelBlendingRestrictions'), function (reader, target, left) { + target.channelBlendingRestrictions = []; + while (left() > 4) { + target.channelBlendingRestrictions.push((0, psdReader_1.readInt32)(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.channelBlendingRestrictions; _i < _a.length; _i++) { + var channel = _a[_i]; + (0, psdWriter_1.writeInt32)(writer, channel); + } +}); +addHandler('tsly', hasKey('transparencyShapesLayer'), function (reader, target) { + target.transparencyShapesLayer = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.skipBytes)(reader, 3); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.transparencyShapesLayer ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 3); +}); + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFkZGl0aW9uYWxJbmZvLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7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25zdCBjaGFubmVsIG9mIHRhcmdldC5jaGFubmVsQmxlbmRpbmdSZXN0cmljdGlvbnMhKSB7XG5cdFx0XHR3cml0ZUludDMyKHdyaXRlciwgY2hhbm5lbCk7XG5cdFx0fVxuXHR9LFxuKTtcblxuYWRkSGFuZGxlcihcblx0J3RzbHknLFxuXHRoYXNLZXkoJ3RyYW5zcGFyZW5jeVNoYXBlc0xheWVyJyksXG5cdChyZWFkZXIsIHRhcmdldCkgPT4ge1xuXHRcdHRhcmdldC50cmFuc3BhcmVuY3lTaGFwZXNMYXllciA9ICEhcmVhZFVpbnQ4KHJlYWRlcik7XG5cdFx0c2tpcEJ5dGVzKHJlYWRlciwgMyk7XG5cdH0sXG5cdCh3cml0ZXIsIHRhcmdldCkgPT4ge1xuXHRcdHdyaXRlVWludDgod3JpdGVyLCB0YXJnZXQudHJhbnNwYXJlbmN5U2hhcGVzTGF5ZXIgPyAxIDogMCk7XG5cdFx0d3JpdGVaZXJvcyh3cml0ZXIsIDMpO1xuXHR9LFxuKTtcbiJdLCJzb3VyY2VSb290IjoiQzpcXFByb2plY3RzXFxnaXRodWJcXGFnLXBzZFxcc3JjIn0= diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/additionalInfo.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/additionalInfo.js.map deleted file mode 100644 index 7d1fdb7..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/additionalInfo.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"additionalInfo.js","sourceRoot":"../src/","sources":["additionalInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,uCAAuD;AACvD,mDAA6D;AAC7D,qCAA0E;AAU1E,yCAIqB;AACrB,yCAIqB;AACrB,2CAQsB;AACtB,2CAAoE;AACpE,+BAA4D;AAkB/C,QAAA,YAAY,GAAkB,EAAE,CAAC;AACjC,QAAA,eAAe,GAAoC,EAAE,CAAC;AAEnE,SAAS,UAAU,CAAC,GAAW,EAAE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EAAE,OAAO,CAAC,CAAC;KAC5B;AACF,CAAC,CACD,CAAC;AAEF,UAAU,CACT,MAAM,EACN,MAAM,CAAC,yBAAyB,CAAC,EACjC,UAAC,MAAM,EAAE,MAAM;IACd,MAAM,CAAC,uBAAuB,GAAG,CAAC,CAAC,IAAA,qBAAS,EAAC,MAAM,CAAC,CAAC;IACrD,IAAA,qBAAS,EAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AACtB,CAAC,EACD,UAAC,MAAM,EAAE,MAAM;IACd,IAAA,sBAAU,EAAC,MAAM,EAAE,MAAM,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3D,IAAA,sBAAU,EAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AACvB,CAAC,CACD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAgFkC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/bundle.js b/npm-packages/mac-v2.4.x/ag-psd/dist/bundle.js index fb168bb..2358f77 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/bundle.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/bundle.js @@ -1,8811 +1,8233 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.agPsd = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i> 8; // convert to 8bit values - } - } - else if (compression === 1) { - throw new Error('not implemented (16bit RLE)'); // TODO: ... - } - else { - throw new Error('Invalid compression'); - } - } - else { - throw new Error('Invalid depth'); - } - samples.push({ id: id, bounds: { x: x, y: y, w: w, h: h }, alpha: alpha }); - reader.offset = brushEnd; - } - break; - } - case 'desc': { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - for (var _i = 0, _e = desc.Brsh; _i < _e.length; _i++) { - var brush = _e[_i]; - var b = { - name: brush['Nm '], - shape: parseBrushShape(brush.Brsh), - spacing: (0, descriptor_1.parsePercent)(brush.Spcn), - // TODO: brushGroup ??? - wetEdges: brush.Wtdg, - noise: brush.Nose, - // TODO: TxtC ??? smoothing / build-up ? - // TODO: 'Rpt ' ??? - useBrushSize: brush.useBrushSize, // ??? - }; - if (brush.interpretation != null) - b.interpretation = brush.interpretation; - if (brush.protectTexture != null) - b.protectTexture = brush.protectTexture; - if (brush.useTipDynamics) { - b.shapeDynamics = { - tiltScale: (0, descriptor_1.parsePercent)(brush.tiltScale), - sizeDynamics: parseDynamics(brush.szVr), - angleDynamics: parseDynamics(brush.angleDynamics), - roundnessDynamics: parseDynamics(brush.roundnessDynamics), - flipX: brush.flipX, - flipY: brush.flipY, - brushProjection: brush.brushProjection, - minimumDiameter: (0, descriptor_1.parsePercent)(brush.minimumDiameter), - minimumRoundness: (0, descriptor_1.parsePercent)(brush.minimumRoundness), - }; - } - if (brush.useScatter) { - b.scatter = { - count: brush['Cnt '], - bothAxes: brush.bothAxes, - countDynamics: parseDynamics(brush.countDynamics), - scatterDynamics: parseDynamics(brush.scatterDynamics), - }; - } - if (brush.useTexture && brush.Txtr) { - b.texture = { - id: brush.Txtr.Idnt, - name: brush.Txtr['Nm '], - blendMode: descriptor_1.BlnM.decode(brush.textureBlendMode), - depth: (0, descriptor_1.parsePercent)(brush.textureDepth), - depthMinimum: (0, descriptor_1.parsePercent)(brush.minimumDepth), - depthDynamics: parseDynamics(brush.textureDepthDynamics), - scale: (0, descriptor_1.parsePercent)(brush.textureScale), - invert: brush.InvT, - brightness: brush.textureBrightness, - contrast: brush.textureContrast, - }; - } - var db = brush.dualBrush; - if (db && db.useDualBrush) { - b.dualBrush = { - flip: db.Flip, - shape: parseBrushShape(db.Brsh), - blendMode: descriptor_1.BlnM.decode(db.BlnM), - useScatter: db.useScatter, - spacing: (0, descriptor_1.parsePercent)(db.Spcn), - count: db['Cnt '], - bothAxes: db.bothAxes, - countDynamics: parseDynamics(db.countDynamics), - scatterDynamics: parseDynamics(db.scatterDynamics), - }; - } - if (brush.useColorDynamics) { - b.colorDynamics = { - foregroundBackground: parseDynamics(brush.clVr), - hue: (0, descriptor_1.parsePercent)(brush['H ']), - saturation: (0, descriptor_1.parsePercent)(brush.Strt), - brightness: (0, descriptor_1.parsePercent)(brush.Brgh), - purity: (0, descriptor_1.parsePercent)(brush.purity), - perTip: brush.colorDynamicsPerTip, - }; - } - if (brush.usePaintDynamics) { - b.transfer = { - flowDynamics: parseDynamics(brush.prVr), - opacityDynamics: parseDynamics(brush.opVr), - wetnessDynamics: parseDynamics(brush.wtVr), - mixDynamics: parseDynamics(brush.mxVr), - }; - } - if (brush.useBrushPose) { - b.brushPose = { - overrideAngle: brush.overridePoseAngle, - overrideTiltX: brush.overridePoseTiltX, - overrideTiltY: brush.overridePoseTiltY, - overridePressure: brush.overridePosePressure, - pressure: (0, descriptor_1.parsePercent)(brush.brushPosePressure), - tiltX: brush.brushPoseTiltX, - tiltY: brush.brushPoseTiltY, - angle: brush.brushPoseAngle, - }; - } - var to = brush.toolOptions; - if (to) { - b.toolOptions = { - brushPreset: to.brushPreset, - flow: (_a = to.flow) !== null && _a !== void 0 ? _a : 100, - smooth: (_b = to.Smoo) !== null && _b !== void 0 ? _b : 0, - mode: descriptor_1.BlnM.decode(to['Md '] || 'BlnM.Nrml'), - opacity: (_c = to.Opct) !== null && _c !== void 0 ? _c : 100, - smoothing: !!to.smoothing, - smoothingValue: to.smoothingValue || 0, - smoothingRadiusMode: !!to.smoothingRadiusMode, - smoothingCatchup: !!to.smoothingCatchup, - smoothingCatchupAtEnd: !!to.smoothingCatchupAtEnd, - smoothingZoomCompensation: !!to.smoothingZoomCompensation, - pressureSmoothing: !!to.pressureSmoothing, - usePressureOverridesSize: !!to.usePressureOverridesSize, - usePressureOverridesOpacity: !!to.usePressureOverridesOpacity, - useLegacy: !!to.useLegacy, - }; - if (to.prVr) { - b.toolOptions.flowDynamics = parseDynamics(to.prVr); - } - if (to.opVr) { - b.toolOptions.opacityDynamics = parseDynamics(to.opVr); - } - if (to.szVr) { - b.toolOptions.sizeDynamics = parseDynamics(to.szVr); - } - } - brushes.push(b); - } - break; - } - case 'patt': { - if (reader.offset < end) { // TODO: check multiple patterns - patterns.push((0, psdReader_1.readPattern)(reader)); - reader.offset = end; - } - break; - } - case 'phry': { - // TODO: what is this ? - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - if (options.logMissingFeatures) { - if ((_d = desc.hierarchy) === null || _d === void 0 ? void 0 : _d.length) { - console.log('unhandled phry section', desc); - } - } - break; - } - default: - throw new Error("Invalid brush type: ".concat(type)); - } - // align to 4 bytes - while (size % 4) { - reader.offset++; - size++; - } - } - } - else { - throw new Error("Unsupported ABR version (".concat(version, ")")); - } - return { samples: samples, patterns: patterns, brushes: brushes }; -} -exports.readAbr = readAbr; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readAbr = void 0; +var descriptor_1 = require("./descriptor"); +var psdReader_1 = require("./psdReader"); +var dynamicsControl = ['off', 'fade', 'pen pressure', 'pen tilt', 'stylus wheel', 'initial direction', 'direction', 'initial rotation', 'rotation']; +function parseDynamics(desc) { + return { + control: dynamicsControl[desc.bVTy], + steps: desc.fStp, + jitter: (0, descriptor_1.parsePercent)(desc.jitter), + minimum: (0, descriptor_1.parsePercent)(desc['Mnm ']), + }; +} +function parseBrushShape(desc) { + var shape = { + size: (0, descriptor_1.parseUnitsToNumber)(desc.Dmtr, 'Pixels'), + angle: (0, descriptor_1.parseAngle)(desc.Angl), + roundness: (0, descriptor_1.parsePercent)(desc.Rndn), + spacingOn: desc.Intr, + spacing: (0, descriptor_1.parsePercent)(desc.Spcn), + flipX: desc.flipX, + flipY: desc.flipY, + }; + if (desc['Nm ']) + shape.name = desc['Nm ']; + if (desc.Hrdn) + shape.hardness = (0, descriptor_1.parsePercent)(desc.Hrdn); + if (desc.sampledData) + shape.sampledData = desc.sampledData; + return shape; +} +function readAbr(buffer, options) { + var _a, _b, _c, _d; + if (options === void 0) { options = {}; } + var reader = (0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength); + var version = (0, psdReader_1.readInt16)(reader); + var samples = []; + var brushes = []; + var patterns = []; + if (version === 1 || version === 2) { + throw new Error("Unsupported ABR version (".concat(version, ")")); // TODO: ... + } + else if (version === 6 || version === 7 || version === 9 || version === 10) { + var minorVersion = (0, psdReader_1.readInt16)(reader); + if (minorVersion !== 1 && minorVersion !== 2) + throw new Error('Unsupported ABR minor version'); + while (reader.offset < reader.view.byteLength) { + (0, psdReader_1.checkSignature)(reader, '8BIM'); + var type = (0, psdReader_1.readSignature)(reader); + var size = (0, psdReader_1.readUint32)(reader); + var end = reader.offset + size; + switch (type) { + case 'samp': { + while (reader.offset < end) { + var brushLength = (0, psdReader_1.readUint32)(reader); + while (brushLength & 3) + brushLength++; // pad to 4 byte alignment + var brushEnd = reader.offset + brushLength; + var id = (0, psdReader_1.readPascalString)(reader, 1); + // v1 - Skip the Int16 bounds rectangle and the unknown Int16. + // v2 - Skip the unknown bytes. + (0, psdReader_1.skipBytes)(reader, minorVersion === 1 ? 10 : 264); + var y = (0, psdReader_1.readInt32)(reader); + var x = (0, psdReader_1.readInt32)(reader); + var h = (0, psdReader_1.readInt32)(reader) - y; + var w = (0, psdReader_1.readInt32)(reader) - x; + if (w <= 0 || h <= 0) + throw new Error('Invalid bounds'); + var depth = (0, psdReader_1.readInt16)(reader); + var compression = (0, psdReader_1.readUint8)(reader); // 0 - raw, 1 - RLE + var alpha = new Uint8Array(w * h); + if (depth === 8) { + if (compression === 0) { + alpha.set((0, psdReader_1.readBytes)(reader, alpha.byteLength)); + } + else if (compression === 1) { + (0, psdReader_1.readDataRLE)(reader, { width: w, height: h, data: alpha }, w, h, 1, [0], false); + } + else { + throw new Error('Invalid compression'); + } + } + else if (depth === 16) { + if (compression === 0) { + for (var i = 0; i < alpha.byteLength; i++) { + alpha[i] = (0, psdReader_1.readUint16)(reader) >> 8; // convert to 8bit values + } + } + else if (compression === 1) { + throw new Error('not implemented (16bit RLE)'); // TODO: ... + } + else { + throw new Error('Invalid compression'); + } + } + else { + throw new Error('Invalid depth'); + } + samples.push({ id: id, bounds: { x: x, y: y, w: w, h: h }, alpha: alpha }); + reader.offset = brushEnd; + } + break; + } + case 'desc': { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + for (var _i = 0, _e = desc.Brsh; _i < _e.length; _i++) { + var brush = _e[_i]; + var b = { + name: brush['Nm '], + shape: parseBrushShape(brush.Brsh), + spacing: (0, descriptor_1.parsePercent)(brush.Spcn), + // TODO: brushGroup ??? + wetEdges: brush.Wtdg, + noise: brush.Nose, + // TODO: TxtC ??? smoothing / build-up ? + // TODO: 'Rpt ' ??? + useBrushSize: brush.useBrushSize, // ??? + }; + if (brush.interpretation != null) + b.interpretation = brush.interpretation; + if (brush.protectTexture != null) + b.protectTexture = brush.protectTexture; + if (brush.useTipDynamics) { + b.shapeDynamics = { + tiltScale: (0, descriptor_1.parsePercent)(brush.tiltScale), + sizeDynamics: parseDynamics(brush.szVr), + angleDynamics: parseDynamics(brush.angleDynamics), + roundnessDynamics: parseDynamics(brush.roundnessDynamics), + flipX: brush.flipX, + flipY: brush.flipY, + brushProjection: brush.brushProjection, + minimumDiameter: (0, descriptor_1.parsePercent)(brush.minimumDiameter), + minimumRoundness: (0, descriptor_1.parsePercent)(brush.minimumRoundness), + }; + } + if (brush.useScatter) { + b.scatter = { + count: brush['Cnt '], + bothAxes: brush.bothAxes, + countDynamics: parseDynamics(brush.countDynamics), + scatterDynamics: parseDynamics(brush.scatterDynamics), + }; + } + if (brush.useTexture && brush.Txtr) { + b.texture = { + id: brush.Txtr.Idnt, + name: brush.Txtr['Nm '], + blendMode: descriptor_1.BlnM.decode(brush.textureBlendMode), + depth: (0, descriptor_1.parsePercent)(brush.textureDepth), + depthMinimum: (0, descriptor_1.parsePercent)(brush.minimumDepth), + depthDynamics: parseDynamics(brush.textureDepthDynamics), + scale: (0, descriptor_1.parsePercent)(brush.textureScale), + invert: brush.InvT, + brightness: brush.textureBrightness, + contrast: brush.textureContrast, + }; + } + var db = brush.dualBrush; + if (db && db.useDualBrush) { + b.dualBrush = { + flip: db.Flip, + shape: parseBrushShape(db.Brsh), + blendMode: descriptor_1.BlnM.decode(db.BlnM), + useScatter: db.useScatter, + spacing: (0, descriptor_1.parsePercent)(db.Spcn), + count: db['Cnt '], + bothAxes: db.bothAxes, + countDynamics: parseDynamics(db.countDynamics), + scatterDynamics: parseDynamics(db.scatterDynamics), + }; + } + if (brush.useColorDynamics) { + b.colorDynamics = { + foregroundBackground: parseDynamics(brush.clVr), + hue: (0, descriptor_1.parsePercent)(brush['H ']), + saturation: (0, descriptor_1.parsePercent)(brush.Strt), + brightness: (0, descriptor_1.parsePercent)(brush.Brgh), + purity: (0, descriptor_1.parsePercent)(brush.purity), + perTip: brush.colorDynamicsPerTip, + }; + } + if (brush.usePaintDynamics) { + b.transfer = { + flowDynamics: parseDynamics(brush.prVr), + opacityDynamics: parseDynamics(brush.opVr), + wetnessDynamics: parseDynamics(brush.wtVr), + mixDynamics: parseDynamics(brush.mxVr), + }; + } + if (brush.useBrushPose) { + b.brushPose = { + overrideAngle: brush.overridePoseAngle, + overrideTiltX: brush.overridePoseTiltX, + overrideTiltY: brush.overridePoseTiltY, + overridePressure: brush.overridePosePressure, + pressure: (0, descriptor_1.parsePercent)(brush.brushPosePressure), + tiltX: brush.brushPoseTiltX, + tiltY: brush.brushPoseTiltY, + angle: brush.brushPoseAngle, + }; + } + var to = brush.toolOptions; + if (to) { + b.toolOptions = { + brushPreset: to.brushPreset, + flow: (_a = to.flow) !== null && _a !== void 0 ? _a : 100, + smooth: (_b = to.Smoo) !== null && _b !== void 0 ? _b : 0, + mode: descriptor_1.BlnM.decode(to['Md '] || 'BlnM.Nrml'), + opacity: (_c = to.Opct) !== null && _c !== void 0 ? _c : 100, + smoothing: !!to.smoothing, + smoothingValue: to.smoothingValue || 0, + smoothingRadiusMode: !!to.smoothingRadiusMode, + smoothingCatchup: !!to.smoothingCatchup, + smoothingCatchupAtEnd: !!to.smoothingCatchupAtEnd, + smoothingZoomCompensation: !!to.smoothingZoomCompensation, + pressureSmoothing: !!to.pressureSmoothing, + usePressureOverridesSize: !!to.usePressureOverridesSize, + usePressureOverridesOpacity: !!to.usePressureOverridesOpacity, + useLegacy: !!to.useLegacy, + }; + if (to.prVr) { + b.toolOptions.flowDynamics = parseDynamics(to.prVr); + } + if (to.opVr) { + b.toolOptions.opacityDynamics = parseDynamics(to.opVr); + } + if (to.szVr) { + b.toolOptions.sizeDynamics = parseDynamics(to.szVr); + } + } + brushes.push(b); + } + break; + } + case 'patt': { + if (reader.offset < end) { // TODO: check multiple patterns + patterns.push((0, psdReader_1.readPattern)(reader)); + reader.offset = end; + } + break; + } + case 'phry': { + // TODO: what is this ? + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + if (options.logMissingFeatures) { + if ((_d = desc.hierarchy) === null || _d === void 0 ? void 0 : _d.length) { + console.log('unhandled phry section', desc); + } + } + break; + } + default: + throw new Error("Invalid brush type: ".concat(type)); + } + // align to 4 bytes + while (size % 4) { + reader.offset++; + size++; + } + } + } + else { + throw new Error("Unsupported ABR version (".concat(version, ")")); + } + return { samples: samples, patterns: patterns, brushes: brushes }; +} +exports.readAbr = readAbr; + },{"./descriptor":4,"./psdReader":11}],2:[function(require,module,exports){ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.hasMultiEffects = exports.readVectorMask = exports.booleanOperations = exports.readBezierKnot = exports.infoHandlersMap = exports.infoHandlers = void 0; -var base64_js_1 = require("base64-js"); -var effectsHelpers_1 = require("./effectsHelpers"); -var helpers_1 = require("./helpers"); -var psdReader_1 = require("./psdReader"); -var psdWriter_1 = require("./psdWriter"); -var descriptor_1 = require("./descriptor"); -var engineData_1 = require("./engineData"); -var text_1 = require("./text"); -exports.infoHandlers = []; -exports.infoHandlersMap = {}; -function addHandler(key, has, read, write) { - var handler = { key: key, has: has, read: read, write: write }; - exports.infoHandlers.push(handler); - exports.infoHandlersMap[handler.key] = handler; -} -function addHandlerAlias(key, target) { - exports.infoHandlersMap[key] = exports.infoHandlersMap[target]; -} -function hasKey(key) { - return function (target) { return target[key] !== undefined; }; -} -function readLength64(reader) { - if ((0, psdReader_1.readUint32)(reader)) - throw new Error("Resource size above 4 GB limit at ".concat(reader.offset.toString(16))); - return (0, psdReader_1.readUint32)(reader); -} -function writeLength64(writer, length) { - (0, psdWriter_1.writeUint32)(writer, 0); - (0, psdWriter_1.writeUint32)(writer, length); -} -addHandler('TySh', hasKey('text'), function (reader, target, leftBytes) { - if ((0, psdReader_1.readInt16)(reader) !== 1) - throw new Error("Invalid TySh version"); - var transform = []; - for (var i = 0; i < 6; i++) - transform.push((0, psdReader_1.readFloat64)(reader)); - if ((0, psdReader_1.readInt16)(reader) !== 50) - throw new Error("Invalid TySh text version"); - var text = (0, descriptor_1.readVersionAndDescriptor)(reader); - if ((0, psdReader_1.readInt16)(reader) !== 1) - throw new Error("Invalid TySh warp version"); - var warp = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.text = { - transform: transform, - left: (0, psdReader_1.readFloat32)(reader), - top: (0, psdReader_1.readFloat32)(reader), - right: (0, psdReader_1.readFloat32)(reader), - bottom: (0, psdReader_1.readFloat32)(reader), - text: text['Txt '].replace(/\r/g, '\n'), - index: text.TextIndex || 0, - gridding: descriptor_1.textGridding.decode(text.textGridding), - antiAlias: descriptor_1.Annt.decode(text.AntA), - orientation: descriptor_1.Ornt.decode(text.Ornt), - warp: { - style: descriptor_1.warpStyle.decode(warp.warpStyle), - value: warp.warpValue || 0, - perspective: warp.warpPerspective || 0, - perspectiveOther: warp.warpPerspectiveOther || 0, - rotate: descriptor_1.Ornt.decode(warp.warpRotate), - }, - }; - if (text.EngineData) { - var engineData = (0, engineData_1.parseEngineData)(text.EngineData); - var textData = (0, text_1.decodeEngineData)(engineData); - // require('fs').writeFileSync(`layer-${target.name}.txt`, require('util').inspect(engineData, false, 99, false), 'utf8'); - // const before = parseEngineData(text.EngineData); - // const after = encodeEngineData(engineData); - // require('fs').writeFileSync('before.txt', require('util').inspect(before, false, 99, false), 'utf8'); - // require('fs').writeFileSync('after.txt', require('util').inspect(after, false, 99, false), 'utf8'); - // console.log(require('util').inspect(parseEngineData(text.EngineData), false, 99, true)); - target.text = __assign(__assign({}, target.text), textData); - // console.log(require('util').inspect(target.text, false, 99, true)); - } - (0, psdReader_1.skipBytes)(reader, leftBytes()); -}, function (writer, target) { - var text = target.text; - var warp = text.warp || {}; - var transform = text.transform || [1, 0, 0, 1, 0, 0]; - var textDescriptor = { - 'Txt ': (text.text || '').replace(/\r?\n/g, '\r'), - textGridding: descriptor_1.textGridding.encode(text.gridding), - Ornt: descriptor_1.Ornt.encode(text.orientation), - AntA: descriptor_1.Annt.encode(text.antiAlias), - TextIndex: text.index || 0, - EngineData: (0, engineData_1.serializeEngineData)((0, text_1.encodeEngineData)(text)), - }; - (0, psdWriter_1.writeInt16)(writer, 1); // version - for (var i = 0; i < 6; i++) { - (0, psdWriter_1.writeFloat64)(writer, transform[i]); - } - (0, psdWriter_1.writeInt16)(writer, 50); // text version - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'TxLr', textDescriptor); - (0, psdWriter_1.writeInt16)(writer, 1); // warp version - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'warp', encodeWarp(warp)); - (0, psdWriter_1.writeFloat32)(writer, text.left); - (0, psdWriter_1.writeFloat32)(writer, text.top); - (0, psdWriter_1.writeFloat32)(writer, text.right); - (0, psdWriter_1.writeFloat32)(writer, text.bottom); - // writeZeros(writer, 2); -}); -// vector fills -addHandler('SoCo', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && - target.vectorFill.type === 'color'; }, function (reader, target) { - var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.vectorFill = (0, descriptor_1.parseVectorContent)(descriptor); -}, function (writer, target) { - var descriptor = (0, descriptor_1.serializeVectorContent)(target.vectorFill).descriptor; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); -}); -addHandler('GdFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && - (target.vectorFill.type === 'solid' || target.vectorFill.type === 'noise'); }, function (reader, target, left) { - var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.vectorFill = (0, descriptor_1.parseVectorContent)(descriptor); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var descriptor = (0, descriptor_1.serializeVectorContent)(target.vectorFill).descriptor; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); -}); -addHandler('PtFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && - target.vectorFill.type === 'pattern'; }, function (reader, target) { - var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.vectorFill = (0, descriptor_1.parseVectorContent)(descriptor); -}, function (writer, target) { - var descriptor = (0, descriptor_1.serializeVectorContent)(target.vectorFill).descriptor; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); -}); -addHandler('vscg', function (target) { return target.vectorFill !== undefined && target.vectorStroke !== undefined; }, function (reader, target, left) { - (0, psdReader_1.readSignature)(reader); // key - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.vectorFill = (0, descriptor_1.parseVectorContent)(desc); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a = (0, descriptor_1.serializeVectorContent)(target.vectorFill), descriptor = _a.descriptor, key = _a.key; - (0, psdWriter_1.writeSignature)(writer, key); - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); -}); -function readBezierKnot(reader, width, height) { - var y0 = (0, psdReader_1.readFixedPointPath32)(reader) * height; - var x0 = (0, psdReader_1.readFixedPointPath32)(reader) * width; - var y1 = (0, psdReader_1.readFixedPointPath32)(reader) * height; - var x1 = (0, psdReader_1.readFixedPointPath32)(reader) * width; - var y2 = (0, psdReader_1.readFixedPointPath32)(reader) * height; - var x2 = (0, psdReader_1.readFixedPointPath32)(reader) * width; - return [x0, y0, x1, y1, x2, y2]; -} -exports.readBezierKnot = readBezierKnot; -function writeBezierKnot(writer, points, width, height) { - (0, psdWriter_1.writeFixedPointPath32)(writer, points[1] / height); // y0 - (0, psdWriter_1.writeFixedPointPath32)(writer, points[0] / width); // x0 - (0, psdWriter_1.writeFixedPointPath32)(writer, points[3] / height); // y1 - (0, psdWriter_1.writeFixedPointPath32)(writer, points[2] / width); // x1 - (0, psdWriter_1.writeFixedPointPath32)(writer, points[5] / height); // y2 - (0, psdWriter_1.writeFixedPointPath32)(writer, points[4] / width); // x2 -} -exports.booleanOperations = ['exclude', 'combine', 'subtract', 'intersect']; -function readVectorMask(reader, vectorMask, width, height, size) { - var end = reader.offset + size; - var paths = vectorMask.paths; - var path = undefined; - while ((end - reader.offset) >= 26) { - var selector = (0, psdReader_1.readUint16)(reader); - switch (selector) { - case 0: // Closed subpath length record - case 3: { // Open subpath length record - (0, psdReader_1.readUint16)(reader); // count - var boolOp = (0, psdReader_1.readInt16)(reader); - (0, psdReader_1.readUint16)(reader); // always 1 ? - (0, psdReader_1.skipBytes)(reader, 18); - // TODO: 'combine' here might be wrong - path = { open: selector === 3, operation: boolOp === -1 ? 'combine' : exports.booleanOperations[boolOp], knots: [] }; - paths.push(path); - break; - } - case 1: // Closed subpath Bezier knot, linked - case 2: // Closed subpath Bezier knot, unlinked - case 4: // Open subpath Bezier knot, linked - case 5: // Open subpath Bezier knot, unlinked - path.knots.push({ linked: (selector === 1 || selector === 4), points: readBezierKnot(reader, width, height) }); - break; - case 6: // Path fill rule record - (0, psdReader_1.skipBytes)(reader, 24); - break; - case 7: { // Clipboard record - // TODO: check if these need to be multiplied by document size - var top_1 = (0, psdReader_1.readFixedPointPath32)(reader); - var left = (0, psdReader_1.readFixedPointPath32)(reader); - var bottom = (0, psdReader_1.readFixedPointPath32)(reader); - var right = (0, psdReader_1.readFixedPointPath32)(reader); - var resolution = (0, psdReader_1.readFixedPointPath32)(reader); - (0, psdReader_1.skipBytes)(reader, 4); - vectorMask.clipboard = { top: top_1, left: left, bottom: bottom, right: right, resolution: resolution }; - break; - } - case 8: // Initial fill rule record - vectorMask.fillStartsWithAllPixels = !!(0, psdReader_1.readUint16)(reader); - (0, psdReader_1.skipBytes)(reader, 22); - break; - default: throw new Error('Invalid vmsk section'); - } - } - return paths; -} -exports.readVectorMask = readVectorMask; -addHandler('vmsk', hasKey('vectorMask'), function (reader, target, left, _a) { - var width = _a.width, height = _a.height; - if ((0, psdReader_1.readUint32)(reader) !== 3) - throw new Error('Invalid vmsk version'); - target.vectorMask = { paths: [] }; - var vectorMask = target.vectorMask; - var flags = (0, psdReader_1.readUint32)(reader); - vectorMask.invert = (flags & 1) !== 0; - vectorMask.notLink = (flags & 2) !== 0; - vectorMask.disable = (flags & 4) !== 0; - readVectorMask(reader, vectorMask, width, height, left()); - // drawBezierPaths(vectorMask.paths, width, height, 'out.png'); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target, _a) { - var width = _a.width, height = _a.height; - var vectorMask = target.vectorMask; - var flags = (vectorMask.invert ? 1 : 0) | - (vectorMask.notLink ? 2 : 0) | - (vectorMask.disable ? 4 : 0); - (0, psdWriter_1.writeUint32)(writer, 3); // version - (0, psdWriter_1.writeUint32)(writer, flags); - // initial entry - (0, psdWriter_1.writeUint16)(writer, 6); - (0, psdWriter_1.writeZeros)(writer, 24); - var clipboard = vectorMask.clipboard; - if (clipboard) { - (0, psdWriter_1.writeUint16)(writer, 7); - (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.top); - (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.left); - (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.bottom); - (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.right); - (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.resolution); - (0, psdWriter_1.writeZeros)(writer, 4); - } - if (vectorMask.fillStartsWithAllPixels !== undefined) { - (0, psdWriter_1.writeUint16)(writer, 8); - (0, psdWriter_1.writeUint16)(writer, vectorMask.fillStartsWithAllPixels ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 22); - } - for (var _i = 0, _b = vectorMask.paths; _i < _b.length; _i++) { - var path = _b[_i]; - (0, psdWriter_1.writeUint16)(writer, path.open ? 3 : 0); - (0, psdWriter_1.writeUint16)(writer, path.knots.length); - (0, psdWriter_1.writeUint16)(writer, Math.abs(exports.booleanOperations.indexOf(path.operation))); // default to 1 if not found - (0, psdWriter_1.writeUint16)(writer, 1); - (0, psdWriter_1.writeZeros)(writer, 18); // TODO: these are sometimes non-zero - var linkedKnot = path.open ? 4 : 1; - var unlinkedKnot = path.open ? 5 : 2; - for (var _c = 0, _d = path.knots; _c < _d.length; _c++) { - var _e = _d[_c], linked = _e.linked, points = _e.points; - (0, psdWriter_1.writeUint16)(writer, linked ? linkedKnot : unlinkedKnot); - writeBezierKnot(writer, points, width, height); - } - } -}); -// TODO: need to write vmsk if has outline ? -addHandlerAlias('vsms', 'vmsk'); -addHandler('vogk', hasKey('vectorOrigination'), function (reader, target, left) { - if ((0, psdReader_1.readInt32)(reader) !== 1) - throw new Error("Invalid vogk version"); - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - target.vectorOrigination = { keyDescriptorList: [] }; - for (var _i = 0, _a = desc.keyDescriptorList; _i < _a.length; _i++) { - var i = _a[_i]; - var item = {}; - if (i.keyShapeInvalidated != null) - item.keyShapeInvalidated = i.keyShapeInvalidated; - if (i.keyOriginType != null) - item.keyOriginType = i.keyOriginType; - if (i.keyOriginResolution != null) - item.keyOriginResolution = i.keyOriginResolution; - if (i.keyOriginShapeBBox) { - item.keyOriginShapeBoundingBox = { - top: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox['Top ']), - left: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox.Left), - bottom: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox.Btom), - right: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox.Rght), - }; - } - var rectRadii = i.keyOriginRRectRadii; - if (rectRadii) { - item.keyOriginRRectRadii = { - topRight: (0, descriptor_1.parseUnits)(rectRadii.topRight), - topLeft: (0, descriptor_1.parseUnits)(rectRadii.topLeft), - bottomLeft: (0, descriptor_1.parseUnits)(rectRadii.bottomLeft), - bottomRight: (0, descriptor_1.parseUnits)(rectRadii.bottomRight), - }; - } - var corners = i.keyOriginBoxCorners; - if (corners) { - item.keyOriginBoxCorners = [ - { x: corners.rectangleCornerA.Hrzn, y: corners.rectangleCornerA.Vrtc }, - { x: corners.rectangleCornerB.Hrzn, y: corners.rectangleCornerB.Vrtc }, - { x: corners.rectangleCornerC.Hrzn, y: corners.rectangleCornerC.Vrtc }, - { x: corners.rectangleCornerD.Hrzn, y: corners.rectangleCornerD.Vrtc }, - ]; - } - var trnf = i.Trnf; - if (trnf) { - item.transform = [trnf.xx, trnf.xy, trnf.xy, trnf.yy, trnf.tx, trnf.ty]; - } - target.vectorOrigination.keyDescriptorList.push(item); - } - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - target; - var orig = target.vectorOrigination; - var desc = { keyDescriptorList: [] }; - for (var i = 0; i < orig.keyDescriptorList.length; i++) { - var item = orig.keyDescriptorList[i]; - if (item.keyShapeInvalidated) { - desc.keyDescriptorList.push({ keyShapeInvalidated: true, keyOriginIndex: i }); - } - else { - desc.keyDescriptorList.push({}); // we're adding keyOriginIndex at the end - var out = desc.keyDescriptorList[desc.keyDescriptorList.length - 1]; - if (item.keyOriginType != null) - out.keyOriginType = item.keyOriginType; - if (item.keyOriginResolution != null) - out.keyOriginResolution = item.keyOriginResolution; - var radii = item.keyOriginRRectRadii; - if (radii) { - out.keyOriginRRectRadii = { - unitValueQuadVersion: 1, - topRight: (0, descriptor_1.unitsValue)(radii.topRight, 'topRight'), - topLeft: (0, descriptor_1.unitsValue)(radii.topLeft, 'topLeft'), - bottomLeft: (0, descriptor_1.unitsValue)(radii.bottomLeft, 'bottomLeft'), - bottomRight: (0, descriptor_1.unitsValue)(radii.bottomRight, 'bottomRight'), - }; - } - var box = item.keyOriginShapeBoundingBox; - if (box) { - out.keyOriginShapeBBox = { - unitValueQuadVersion: 1, - 'Top ': (0, descriptor_1.unitsValue)(box.top, 'top'), - Left: (0, descriptor_1.unitsValue)(box.left, 'left'), - Btom: (0, descriptor_1.unitsValue)(box.bottom, 'bottom'), - Rght: (0, descriptor_1.unitsValue)(box.right, 'right'), - }; - } - var corners = item.keyOriginBoxCorners; - if (corners && corners.length === 4) { - out.keyOriginBoxCorners = { - rectangleCornerA: { Hrzn: corners[0].x, Vrtc: corners[0].y }, - rectangleCornerB: { Hrzn: corners[1].x, Vrtc: corners[1].y }, - rectangleCornerC: { Hrzn: corners[2].x, Vrtc: corners[2].y }, - rectangleCornerD: { Hrzn: corners[3].x, Vrtc: corners[3].y }, - }; - } - var transform = item.transform; - if (transform && transform.length === 6) { - out.Trnf = { - xx: transform[0], - xy: transform[1], - yx: transform[2], - yy: transform[3], - tx: transform[4], - ty: transform[5], - }; - } - out.keyOriginIndex = i; - } - } - (0, psdWriter_1.writeInt32)(writer, 1); // version - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler('lmfx', function (target) { return target.effects !== undefined && hasMultiEffects(target.effects); }, function (reader, target, left, _, options) { - var version = (0, psdReader_1.readUint32)(reader); - if (version !== 0) - throw new Error('Invalid lmfx version'); - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(info, false, 99, true)); - // discard if read in 'lrFX' or 'lfx2' section - target.effects = (0, descriptor_1.parseEffects)(desc, !!options.logMissingFeatures); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target, _, options) { - var desc = (0, descriptor_1.serializeEffects)(target.effects, !!options.logMissingFeatures, true); - (0, psdWriter_1.writeUint32)(writer, 0); // version - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler('lrFX', hasKey('effects'), function (reader, target, left) { - if (!target.effects) - target.effects = (0, effectsHelpers_1.readEffects)(reader); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - (0, effectsHelpers_1.writeEffects)(writer, target.effects); -}); -addHandler('luni', hasKey('name'), function (reader, target, left) { - target.name = (0, psdReader_1.readUnicodeString)(reader); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeUnicodeString)(writer, target.name); - // writeUint16(writer, 0); // padding (but not extending string length) -}); -addHandler('lnsr', hasKey('nameSource'), function (reader, target) { return target.nameSource = (0, psdReader_1.readSignature)(reader); }, function (writer, target) { return (0, psdWriter_1.writeSignature)(writer, target.nameSource); }); -addHandler('lyid', hasKey('id'), function (reader, target) { return target.id = (0, psdReader_1.readUint32)(reader); }, function (writer, target, _psd, options) { - var id = target.id; - while (options.layerIds.has(id)) - id += 100; // make sure we don't have duplicate layer ids - (0, psdWriter_1.writeUint32)(writer, id); - options.layerIds.add(id); - options.layerToId.set(target, id); -}); -addHandler('lsct', hasKey('sectionDivider'), function (reader, target, left) { - target.sectionDivider = { type: (0, psdReader_1.readUint32)(reader) }; - if (left()) { - (0, psdReader_1.checkSignature)(reader, '8BIM'); - target.sectionDivider.key = (0, psdReader_1.readSignature)(reader); - } - if (left()) { - target.sectionDivider.subType = (0, psdReader_1.readUint32)(reader); - } -}, function (writer, target) { - (0, psdWriter_1.writeUint32)(writer, target.sectionDivider.type); - if (target.sectionDivider.key) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, target.sectionDivider.key); - if (target.sectionDivider.subType !== undefined) { - (0, psdWriter_1.writeUint32)(writer, target.sectionDivider.subType); - } - } -}); -// it seems lsdk is used when there's a layer is nested more than 6 levels, but I don't know why? -// maybe some limitation of old version of PS? -addHandlerAlias('lsdk', 'lsct'); -addHandler('clbl', hasKey('blendClippendElements'), function (reader, target) { - target.blendClippendElements = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.skipBytes)(reader, 3); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.blendClippendElements ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -addHandler('infx', hasKey('blendInteriorElements'), function (reader, target) { - target.blendInteriorElements = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.skipBytes)(reader, 3); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.blendInteriorElements ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -addHandler('knko', hasKey('knockout'), function (reader, target) { - target.knockout = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.skipBytes)(reader, 3); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.knockout ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -addHandler('lmgm', hasKey('layerMaskAsGlobalMask'), function (reader, target) { - target.layerMaskAsGlobalMask = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.skipBytes)(reader, 3); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.layerMaskAsGlobalMask ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -addHandler('lspf', hasKey('protected'), function (reader, target) { - var flags = (0, psdReader_1.readUint32)(reader); - target.protected = { - transparency: (flags & 0x01) !== 0, - composite: (flags & 0x02) !== 0, - position: (flags & 0x04) !== 0, - }; - if (flags & 0x08) - target.protected.artboards = true; -}, function (writer, target) { - var flags = (target.protected.transparency ? 0x01 : 0) | - (target.protected.composite ? 0x02 : 0) | - (target.protected.position ? 0x04 : 0) | - (target.protected.artboards ? 0x08 : 0); - (0, psdWriter_1.writeUint32)(writer, flags); -}); -addHandler('lclr', hasKey('layerColor'), function (reader, target) { - var color = (0, psdReader_1.readUint16)(reader); - (0, psdReader_1.skipBytes)(reader, 6); - target.layerColor = helpers_1.layerColors[color]; -}, function (writer, target) { - var index = helpers_1.layerColors.indexOf(target.layerColor); - (0, psdWriter_1.writeUint16)(writer, index === -1 ? 0 : index); - (0, psdWriter_1.writeZeros)(writer, 6); -}); -addHandler('shmd', function (target) { return target.timestamp !== undefined || target.animationFrames !== undefined || - target.animationFrameFlags !== undefined || target.timeline !== undefined; }, function (reader, target, left, _, options) { - var count = (0, psdReader_1.readUint32)(reader); - var _loop_1 = function (i) { - (0, psdReader_1.checkSignature)(reader, '8BIM'); - var key = (0, psdReader_1.readSignature)(reader); - (0, psdReader_1.readUint8)(reader); // copy - (0, psdReader_1.skipBytes)(reader, 3); - (0, psdReader_1.readSection)(reader, 1, function (left) { - if (key === 'cust') { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log('cust', target.name, require('util').inspect(desc, false, 99, true)); - if (desc.layerTime !== undefined) - target.timestamp = desc.layerTime; - } - else if (key === 'mlst') { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log('mlst', target.name, require('util').inspect(desc, false, 99, true)); - target.animationFrames = []; - for (var i_1 = 0; i_1 < desc.LaSt.length; i_1++) { - var f = desc.LaSt[i_1]; - var frame = { frames: f.FrLs }; - if (f.enab !== undefined) - frame.enable = f.enab; - if (f.Ofst) - frame.offset = (0, descriptor_1.horzVrtcToXY)(f.Ofst); - if (f.FXRf) - frame.referencePoint = (0, descriptor_1.horzVrtcToXY)(f.FXRf); - if (f.Lefx) - frame.effects = (0, descriptor_1.parseEffects)(f.Lefx, !!options.logMissingFeatures); - if (f.blendOptions && f.blendOptions.Opct) - frame.opacity = (0, descriptor_1.parsePercent)(f.blendOptions.Opct); - target.animationFrames.push(frame); - } - } - else if (key === 'mdyn') { - // frame flags - (0, psdReader_1.readUint16)(reader); // unknown - var propagate = (0, psdReader_1.readUint8)(reader); - var flags = (0, psdReader_1.readUint8)(reader); - target.animationFrameFlags = { - propagateFrameOne: !propagate, - unifyLayerPosition: (flags & 1) !== 0, - unifyLayerStyle: (flags & 2) !== 0, - unifyLayerVisibility: (flags & 4) !== 0, - }; - } - else if (key === 'tmln') { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - var timeScope = desc.timeScope; - // console.log('tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); - var timeline = { - start: timeScope.Strt, - duration: timeScope.duration, - inTime: timeScope.inTime, - outTime: timeScope.outTime, - autoScope: desc.autoScope, - audioLevel: desc.audioLevel, - }; - if (desc.trackList) { - timeline.tracks = (0, descriptor_1.parseTrackList)(desc.trackList, !!options.logMissingFeatures); - } - target.timeline = timeline; - // console.log('tmln:result', target.name, target.id, require('util').inspect(timeline, false, 99, true)); - } - else { - options.logDevFeatures && console.log('Unhandled "shmd" section key', key); - } - (0, psdReader_1.skipBytes)(reader, left()); - }); - }; - for (var i = 0; i < count; i++) { - _loop_1(i); - } - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target, _, options) { - var animationFrames = target.animationFrames, animationFrameFlags = target.animationFrameFlags, timestamp = target.timestamp, timeline = target.timeline; - var count = 0; - if (animationFrames) - count++; - if (animationFrameFlags) - count++; - if (timeline) - count++; - if (timestamp !== undefined) - count++; - (0, psdWriter_1.writeUint32)(writer, count); - if (animationFrames) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'mlst'); - (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) - (0, psdWriter_1.writeZeros)(writer, 3); - (0, psdWriter_1.writeSection)(writer, 2, function () { - var _a; - var desc = { - LaID: (_a = target.id) !== null && _a !== void 0 ? _a : 0, - LaSt: [], - }; - for (var i = 0; i < animationFrames.length; i++) { - var f = animationFrames[i]; - var frame = {}; - if (f.enable !== undefined) - frame.enab = f.enable; - frame.FrLs = f.frames; - if (f.offset) - frame.Ofst = (0, descriptor_1.xyToHorzVrtc)(f.offset); - if (f.referencePoint) - frame.FXRf = (0, descriptor_1.xyToHorzVrtc)(f.referencePoint); - if (f.effects) - frame.Lefx = (0, descriptor_1.serializeEffects)(f.effects, false, false); - if (f.opacity !== undefined) - frame.blendOptions = { Opct: (0, descriptor_1.unitsPercent)(f.opacity) }; - desc.LaSt.push(frame); - } - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - }, true); - } - if (animationFrameFlags) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'mdyn'); - (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) - (0, psdWriter_1.writeZeros)(writer, 3); - (0, psdWriter_1.writeSection)(writer, 2, function () { - (0, psdWriter_1.writeUint16)(writer, 0); // unknown - (0, psdWriter_1.writeUint8)(writer, animationFrameFlags.propagateFrameOne ? 0x0 : 0xf); - (0, psdWriter_1.writeUint8)(writer, (animationFrameFlags.unifyLayerPosition ? 1 : 0) | - (animationFrameFlags.unifyLayerStyle ? 2 : 0) | - (animationFrameFlags.unifyLayerVisibility ? 4 : 0)); - }); - } - if (timeline) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'tmln'); - (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) - (0, psdWriter_1.writeZeros)(writer, 3); - (0, psdWriter_1.writeSection)(writer, 2, function () { - var desc = { - Vrsn: 1, - timeScope: { - Vrsn: 1, - Strt: timeline.start, - duration: timeline.duration, - inTime: timeline.inTime, - outTime: timeline.outTime, - }, - autoScope: timeline.autoScope, - audioLevel: timeline.audioLevel, - }; - if (timeline.tracks) { - desc.trackList = (0, descriptor_1.serializeTrackList)(timeline.tracks); - } - var id = options.layerToId.get(target) || target.id || 0; - if (!id) - throw new Error('You need to provide layer.id value whan writing document with animations'); - desc.LyrI = id; - // console.log('WRITE:tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'anim'); - }, true); - } - if (timestamp !== undefined) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'cust'); - (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) - (0, psdWriter_1.writeZeros)(writer, 3); - (0, psdWriter_1.writeSection)(writer, 2, function () { - var desc = { - layerTime: timestamp, - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'metadata', desc); - }, true); - } -}); -addHandler('vstk', hasKey('vectorStroke'), function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - target.vectorStroke = { - strokeEnabled: desc.strokeEnabled, - fillEnabled: desc.fillEnabled, - lineWidth: (0, descriptor_1.parseUnits)(desc.strokeStyleLineWidth), - lineDashOffset: (0, descriptor_1.parseUnits)(desc.strokeStyleLineDashOffset), - miterLimit: desc.strokeStyleMiterLimit, - lineCapType: descriptor_1.strokeStyleLineCapType.decode(desc.strokeStyleLineCapType), - lineJoinType: descriptor_1.strokeStyleLineJoinType.decode(desc.strokeStyleLineJoinType), - lineAlignment: descriptor_1.strokeStyleLineAlignment.decode(desc.strokeStyleLineAlignment), - scaleLock: desc.strokeStyleScaleLock, - strokeAdjust: desc.strokeStyleStrokeAdjust, - lineDashSet: desc.strokeStyleLineDashSet.map(descriptor_1.parseUnits), - blendMode: descriptor_1.BlnM.decode(desc.strokeStyleBlendMode), - opacity: (0, descriptor_1.parsePercent)(desc.strokeStyleOpacity), - content: (0, descriptor_1.parseVectorContent)(desc.strokeStyleContent), - resolution: desc.strokeStyleResolution, - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a, _b, _c; - var stroke = target.vectorStroke; - var descriptor = { - strokeStyleVersion: 2, - strokeEnabled: !!stroke.strokeEnabled, - fillEnabled: !!stroke.fillEnabled, - strokeStyleLineWidth: stroke.lineWidth || { value: 3, units: 'Points' }, - strokeStyleLineDashOffset: stroke.lineDashOffset || { value: 0, units: 'Points' }, - strokeStyleMiterLimit: (_a = stroke.miterLimit) !== null && _a !== void 0 ? _a : 100, - strokeStyleLineCapType: descriptor_1.strokeStyleLineCapType.encode(stroke.lineCapType), - strokeStyleLineJoinType: descriptor_1.strokeStyleLineJoinType.encode(stroke.lineJoinType), - strokeStyleLineAlignment: descriptor_1.strokeStyleLineAlignment.encode(stroke.lineAlignment), - strokeStyleScaleLock: !!stroke.scaleLock, - strokeStyleStrokeAdjust: !!stroke.strokeAdjust, - strokeStyleLineDashSet: stroke.lineDashSet || [], - strokeStyleBlendMode: descriptor_1.BlnM.encode(stroke.blendMode), - strokeStyleOpacity: (0, descriptor_1.unitsPercent)((_b = stroke.opacity) !== null && _b !== void 0 ? _b : 1), - strokeStyleContent: (0, descriptor_1.serializeVectorContent)(stroke.content || { type: 'color', color: { r: 0, g: 0, b: 0 } }).descriptor, - strokeStyleResolution: (_c = stroke.resolution) !== null && _c !== void 0 ? _c : 72, - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'strokeStyle', descriptor); -}); -addHandler('artb', // per-layer arboard info -hasKey('artboard'), function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - var rect = desc.artboardRect; - target.artboard = { - rect: { top: rect['Top '], left: rect.Left, bottom: rect.Btom, right: rect.Rght }, - guideIndices: desc.guideIndeces, - presetName: desc.artboardPresetName, - color: (0, descriptor_1.parseColor)(desc['Clr ']), - backgroundType: desc.artboardBackgroundType, - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a; - var artboard = target.artboard; - var rect = artboard.rect; - var desc = { - artboardRect: { 'Top ': rect.top, Left: rect.left, Btom: rect.bottom, Rght: rect.right }, - guideIndeces: artboard.guideIndices || [], - artboardPresetName: artboard.presetName || '', - 'Clr ': (0, descriptor_1.serializeColor)(artboard.color), - artboardBackgroundType: (_a = artboard.backgroundType) !== null && _a !== void 0 ? _a : 1, - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'artboard', desc); -}); -addHandler('sn2P', hasKey('usingAlignedRendering'), function (reader, target) { return target.usingAlignedRendering = !!(0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.usingAlignedRendering ? 1 : 0); }); -var placedLayerTypes = ['unknown', 'vector', 'raster', 'image stack']; -function parseWarp(warp) { - var _a, _b, _c, _d, _e, _f; - var result = __assign(__assign({ style: descriptor_1.warpStyle.decode(warp.warpStyle) }, (warp.warpValues ? { values: warp.warpValues } : { value: warp.warpValue || 0 })), { perspective: warp.warpPerspective || 0, perspectiveOther: warp.warpPerspectiveOther || 0, rotate: descriptor_1.Ornt.decode(warp.warpRotate), bounds: warp.bounds && { - top: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds['Top ']), - left: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds.Left), - bottom: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds.Btom), - right: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds.Rght), - }, uOrder: warp.uOrder, vOrder: warp.vOrder }); - if (warp.deformNumRows != null || warp.deformNumCols != null) { - result.deformNumRows = warp.deformNumRows; - result.deformNumCols = warp.deformNumCols; - } - var envelopeWarp = warp.customEnvelopeWarp; - if (envelopeWarp) { - result.customEnvelopeWarp = { - meshPoints: [], - }; - var xs = ((_a = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Hrzn'; })) === null || _a === void 0 ? void 0 : _a.values) || []; - var ys = ((_b = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Vrtc'; })) === null || _b === void 0 ? void 0 : _b.values) || []; - for (var i = 0; i < xs.length; i++) { - result.customEnvelopeWarp.meshPoints.push({ x: xs[i], y: ys[i] }); - } - if (envelopeWarp.quiltSliceX || envelopeWarp.quiltSliceY) { - result.customEnvelopeWarp.quiltSliceX = ((_d = (_c = envelopeWarp.quiltSliceX) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.values) || []; - result.customEnvelopeWarp.quiltSliceY = ((_f = (_e = envelopeWarp.quiltSliceY) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.values) || []; - } - } - return result; -} -function isQuiltWarp(warp) { - var _a, _b; - return warp.deformNumCols != null || warp.deformNumRows != null || - ((_a = warp.customEnvelopeWarp) === null || _a === void 0 ? void 0 : _a.quiltSliceX) || ((_b = warp.customEnvelopeWarp) === null || _b === void 0 ? void 0 : _b.quiltSliceY); -} -function encodeWarp(warp) { - var bounds = warp.bounds; - var desc = __assign(__assign({ warpStyle: descriptor_1.warpStyle.encode(warp.style) }, (warp.values ? { warpValues: warp.values } : { warpValue: warp.value })), { warpPerspective: warp.perspective || 0, warpPerspectiveOther: warp.perspectiveOther || 0, warpRotate: descriptor_1.Ornt.encode(warp.rotate), bounds: { - 'Top ': (0, descriptor_1.unitsValue)(bounds && bounds.top || { units: 'Pixels', value: 0 }, 'bounds.top'), - Left: (0, descriptor_1.unitsValue)(bounds && bounds.left || { units: 'Pixels', value: 0 }, 'bounds.left'), - Btom: (0, descriptor_1.unitsValue)(bounds && bounds.bottom || { units: 'Pixels', value: 0 }, 'bounds.bottom'), - Rght: (0, descriptor_1.unitsValue)(bounds && bounds.right || { units: 'Pixels', value: 0 }, 'bounds.right'), - }, uOrder: warp.uOrder || 0, vOrder: warp.vOrder || 0 }); - var isQuilt = isQuiltWarp(warp); - if (isQuilt) { - var desc2 = desc; - desc2.deformNumRows = warp.deformNumRows || 0; - desc2.deformNumCols = warp.deformNumCols || 0; - } - var customEnvelopeWarp = warp.customEnvelopeWarp; - if (customEnvelopeWarp) { - var meshPoints = customEnvelopeWarp.meshPoints || []; - if (isQuilt) { - var desc2 = desc; - desc2.customEnvelopeWarp = { - quiltSliceX: [{ - type: 'quiltSliceX', - values: customEnvelopeWarp.quiltSliceX || [], - }], - quiltSliceY: [{ - type: 'quiltSliceY', - values: customEnvelopeWarp.quiltSliceY || [], - }], - meshPoints: [ - { type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) }, - { type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) }, - ], - }; - } - else { - desc.customEnvelopeWarp = { - meshPoints: [ - { type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) }, - { type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) }, - ], - }; - } - } - return desc; -} -addHandler('PlLd', hasKey('placedLayer'), function (reader, target, left) { - if ((0, psdReader_1.readSignature)(reader) !== 'plcL') - throw new Error("Invalid PlLd signature"); - if ((0, psdReader_1.readInt32)(reader) !== 3) - throw new Error("Invalid PlLd version"); - var id = (0, psdReader_1.readPascalString)(reader, 1); - var pageNumber = (0, psdReader_1.readInt32)(reader); - var totalPages = (0, psdReader_1.readInt32)(reader); // TODO: check how this works ? - (0, psdReader_1.readInt32)(reader); // anitAliasPolicy 16 - var placedLayerType = (0, psdReader_1.readInt32)(reader); // 0 = unknown, 1 = vector, 2 = raster, 3 = image stack - if (!placedLayerTypes[placedLayerType]) - throw new Error('Invalid PlLd type'); - var transform = []; - for (var i = 0; i < 8; i++) - transform.push((0, psdReader_1.readFloat64)(reader)); // x, y of 4 corners of the transform - var warpVersion = (0, psdReader_1.readInt32)(reader); - if (warpVersion !== 0) - throw new Error("Invalid Warp version ".concat(warpVersion)); - var warp = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.placedLayer = target.placedLayer || { - id: id, - type: placedLayerTypes[placedLayerType], - pageNumber: pageNumber, - totalPages: totalPages, - transform: transform, - warp: parseWarp(warp), - }; - // console.log('PlLd warp', require('util').inspect(warp, false, 99, true)); - // console.log('PlLd', require('util').inspect(target.placedLayer, false, 99, true)); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var placed = target.placedLayer; - (0, psdWriter_1.writeSignature)(writer, 'plcL'); - (0, psdWriter_1.writeInt32)(writer, 3); // version - (0, psdWriter_1.writePascalString)(writer, placed.id, 1); - (0, psdWriter_1.writeInt32)(writer, 1); // pageNumber - (0, psdWriter_1.writeInt32)(writer, 1); // totalPages - (0, psdWriter_1.writeInt32)(writer, 16); // anitAliasPolicy - if (placedLayerTypes.indexOf(placed.type) === -1) - throw new Error('Invalid placedLayer type'); - (0, psdWriter_1.writeInt32)(writer, placedLayerTypes.indexOf(placed.type)); - for (var i = 0; i < 8; i++) - (0, psdWriter_1.writeFloat64)(writer, placed.transform[i]); - (0, psdWriter_1.writeInt32)(writer, 0); // warp version - var isQuilt = placed.warp && isQuiltWarp(placed.warp); - var type = isQuilt ? 'quiltWarp' : 'warp'; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', type, encodeWarp(placed.warp || {}), type); -}); -function uint8ToFloat32(array) { - return new Float32Array(array.buffer.slice(array.byteOffset), 0, array.byteLength / 4); -} -function uint8ToUint32(array) { - return new Uint32Array(array.buffer.slice(array.byteOffset), 0, array.byteLength / 4); -} -function toUint8(array) { - return new Uint8Array(array.buffer, array.byteOffset, array.byteLength); -} -function arrayToPoints(array) { - var points = []; - for (var i = 0; i < array.length; i += 2) { - points.push({ x: array[i], y: array[i + 1] }); - } - return points; -} -function pointsToArray(points) { - var array = []; - for (var i = 0; i < points.length; i++) { - array.push(points[i].x, points[i].y); - } - return array; -} -function uin8ToPoints(array) { - return arrayToPoints(uint8ToFloat32(array)); -} -function hrznVrtcToPoint(desc) { - return { - x: (0, descriptor_1.parseUnits)(desc.Hrzn), - y: (0, descriptor_1.parseUnits)(desc.Vrtc), - }; -} -function pointToHrznVrtc(point) { - return { - Hrzn: (0, descriptor_1.unitsValue)(point.x, 'x'), - Vrtc: (0, descriptor_1.unitsValue)(point.y, 'y'), - }; -} -function parseFilterFX(desc) { - return { - enabled: desc.enab, - validAtPosition: desc.validAtPosition, - maskEnabled: desc.filterMaskEnable, - maskLinked: desc.filterMaskLinked, - maskExtendWithWhite: desc.filterMaskExtendWithWhite, - list: desc.filterFXList.map(function (f) { return ({ - id: f.filterID, - name: f['Nm '], - opacity: (0, descriptor_1.parsePercent)(f.blendOptions.Opct), - blendMode: descriptor_1.BlnM.decode(f.blendOptions['Md ']), - enabled: f.enab, - hasOptions: f.hasoptions, - foregroundColor: (0, descriptor_1.parseColor)(f.FrgC), - backgroundColor: (0, descriptor_1.parseColor)(f.BckC), - filter: { - rigidType: f.Fltr.rigidType, - bounds: [ - { x: f.Fltr.PuX0, y: f.Fltr.PuY0, }, - { x: f.Fltr.PuX1, y: f.Fltr.PuY1, }, - { x: f.Fltr.PuX2, y: f.Fltr.PuY2, }, - { x: f.Fltr.PuX3, y: f.Fltr.PuY3, }, - ], - puppetShapeList: f.Fltr.puppetShapeList.map(function (p) { return ({ - rigidType: p.rigidType, - // TODO: VrsM - // TODO: VrsN - originalVertexArray: uin8ToPoints(p.originalVertexArray), - deformedVertexArray: uin8ToPoints(p.deformedVertexArray), - indexArray: Array.from(uint8ToUint32(p.indexArray)), - pinOffsets: arrayToPoints(p.pinOffsets), - posFinalPins: arrayToPoints(p.posFinalPins), - pinVertexIndices: p.pinVertexIndices, - selectedPin: p.selectedPin, - pinPosition: arrayToPoints(p.PinP), - pinRotation: p.PnRt, - pinOverlay: p.PnOv, - pinDepth: p.PnDp, - meshQuality: p.meshQuality, - meshExpansion: p.meshExpansion, - meshRigidity: p.meshRigidity, - imageResolution: p.imageResolution, - meshBoundaryPath: { - pathComponents: p.meshBoundaryPath.pathComponents.map(function (c) { return ({ - shapeOperation: c.shapeOperation.split('.')[1], - paths: c.SbpL.map(function (t) { return ({ - closed: t.Clsp, - points: t['Pts '].map(function (pt) { return ({ - anchor: hrznVrtcToPoint(pt.Anch), - forward: hrznVrtcToPoint(pt['Fwd ']), - backward: hrznVrtcToPoint(pt['Bwd ']), - smooth: pt.Smoo, - }); }), - }); }), - }); }), - }, - }); }), - }, - }); }), - }; -} -function serializeFilterFX(filter) { - return { - enab: filter.enabled, - validAtPosition: filter.validAtPosition, - filterMaskEnable: filter.maskEnabled, - filterMaskLinked: filter.maskLinked, - filterMaskExtendWithWhite: filter.maskExtendWithWhite, - filterFXList: (filter.list || []).map(function (f) { return ({ - 'Nm ': f.name, - blendOptions: { - Opct: (0, descriptor_1.unitsPercent)(f.opacity), - 'Md ': descriptor_1.BlnM.encode(f.blendMode), - }, - enab: f.enabled, - hasoptions: f.hasOptions, - FrgC: (0, descriptor_1.serializeColor)(f.foregroundColor), - BckC: (0, descriptor_1.serializeColor)(f.backgroundColor), - Fltr: { - 'null': ['Ordn.Trgt'], - rigidType: f.filter.rigidType, - puppetShapeList: (f.filter.puppetShapeList || []).map(function (p) { return ({ - rigidType: p.rigidType, - VrsM: 1, - VrsN: 0, - originalVertexArray: toUint8(new Float32Array(pointsToArray(p.originalVertexArray))), - deformedVertexArray: toUint8(new Float32Array(pointsToArray(p.deformedVertexArray))), - indexArray: toUint8(new Uint32Array(p.indexArray)), - pinOffsets: pointsToArray(p.pinOffsets), - posFinalPins: pointsToArray(p.posFinalPins), - selectedPin: p.selectedPin, - pinVertexIndices: p.pinVertexIndices, - PinP: pointsToArray(p.pinPosition), - PnRt: p.pinRotation, - PnOv: p.pinOverlay, - PnDp: p.pinDepth, - meshQuality: p.meshQuality, - meshExpansion: p.meshExpansion, - meshRigidity: p.meshRigidity, - imageResolution: p.imageResolution, - meshBoundaryPath: { - pathComponents: (p.meshBoundaryPath.pathComponents || []).map(function (c) { return ({ - shapeOperation: "shapeOperation.".concat(c.shapeOperation), - SbpL: (c.paths || []).map(function (path) { return ({ - Clsp: path.closed, - 'Pts ': (path.points || []).map(function (pt) { return ({ - Anch: pointToHrznVrtc(pt.anchor), - 'Fwd ': pointToHrznVrtc(pt.forward), - 'Bwd ': pointToHrznVrtc(pt.backward), - Smoo: pt.smooth, - }); }), - }); }), - }); }), - }, - }); }), - PuX0: f.filter.bounds[0].x, - PuX1: f.filter.bounds[1].x, - PuX2: f.filter.bounds[2].x, - PuX3: f.filter.bounds[3].x, - PuY0: f.filter.bounds[0].y, - PuY1: f.filter.bounds[1].y, - PuY2: f.filter.bounds[2].y, - PuY3: f.filter.bounds[3].y, - }, - filterID: f.id, - }); }), - }; -} -addHandler('SoLd', hasKey('placedLayer'), function (reader, target, left) { - if ((0, psdReader_1.readSignature)(reader) !== 'soLD') - throw new Error("Invalid SoLd type"); - var version = (0, psdReader_1.readInt32)(reader); - if (version !== 4 && version !== 5) - throw new Error("Invalid SoLd version"); - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log('SoLd', require('util').inspect(desc, false, 99, true)); - // console.log('SoLd.warp', require('util').inspect(desc.warp, false, 99, true)); - // console.log('SoLd.quiltWarp', require('util').inspect(desc.quiltWarp, false, 99, true)); - // desc.filterFX!.filterFXList[0].Fltr.puppetShapeList[0].meshBoundaryPath.pathComponents[0].SbpL[0]['Pts '] = []; - // console.log('filterFX', require('util').inspect(desc.filterFX, false, 99, true)); - target.placedLayer = { - id: desc.Idnt, - placed: desc.placed, - type: placedLayerTypes[desc.Type], - pageNumber: desc.PgNm, - totalPages: desc.totalPages, - frameStep: desc.frameStep, - duration: desc.duration, - frameCount: desc.frameCount, - transform: desc.Trnf, - width: desc['Sz '].Wdth, - height: desc['Sz '].Hght, - resolution: (0, descriptor_1.parseUnits)(desc.Rslt), - warp: parseWarp((desc.quiltWarp || desc.warp)), - }; - if (desc.nonAffineTransform && desc.nonAffineTransform.some(function (x, i) { return x !== desc.Trnf[i]; })) { - target.placedLayer.nonAffineTransform = desc.nonAffineTransform; - } - if (desc.Crop) - target.placedLayer.crop = desc.Crop; - if (desc.comp) - target.placedLayer.comp = desc.comp; - if (desc.compInfo) - target.placedLayer.compInfo = desc.compInfo; - if (desc.filterFX) - target.placedLayer.filter = parseFilterFX(desc.filterFX); - (0, psdReader_1.skipBytes)(reader, left()); // HACK -}, function (writer, target) { - var _a, _b; - (0, psdWriter_1.writeSignature)(writer, 'soLD'); - (0, psdWriter_1.writeInt32)(writer, 4); // version - var placed = target.placedLayer; - var desc = __assign(__assign({ Idnt: placed.id, placed: (_a = placed.placed) !== null && _a !== void 0 ? _a : placed.id, PgNm: placed.pageNumber || 1, totalPages: placed.totalPages || 1 }, (placed.crop ? { Crop: placed.crop } : {})), { frameStep: placed.frameStep || { numerator: 0, denominator: 600 }, duration: placed.duration || { numerator: 0, denominator: 600 }, frameCount: placed.frameCount || 0, Annt: 16, Type: placedLayerTypes.indexOf(placed.type), Trnf: placed.transform, nonAffineTransform: (_b = placed.nonAffineTransform) !== null && _b !== void 0 ? _b : placed.transform, quiltWarp: {}, warp: encodeWarp(placed.warp || {}), 'Sz ': { - Wdth: placed.width || 0, - Hght: placed.height || 0, // TODO: find size ? - }, Rslt: placed.resolution ? (0, descriptor_1.unitsValue)(placed.resolution, 'resolution') : { units: 'Density', value: 72 } }); - if (placed.filter) - desc.filterFX = serializeFilterFX(placed.filter); - if (placed.warp && isQuiltWarp(placed.warp)) { - var quiltWarp = encodeWarp(placed.warp); - desc.quiltWarp = quiltWarp; - desc.warp = { - warpStyle: 'warpStyle.warpNone', - warpValue: quiltWarp.warpValue, - warpPerspective: quiltWarp.warpPerspective, - warpPerspectiveOther: quiltWarp.warpPerspectiveOther, - warpRotate: quiltWarp.warpRotate, - bounds: quiltWarp.bounds, - uOrder: quiltWarp.uOrder, - vOrder: quiltWarp.vOrder, - }; - } - else { - delete desc.quiltWarp; - } - if (placed.comp) - desc.comp = placed.comp; - if (placed.compInfo) - desc.compInfo = placed.compInfo; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, desc.quiltWarp ? 'quiltWarp' : 'warp'); -}); -addHandlerAlias('SoLE', 'SoLd'); -addHandler('fxrp', hasKey('referencePoint'), function (reader, target) { - target.referencePoint = { - x: (0, psdReader_1.readFloat64)(reader), - y: (0, psdReader_1.readFloat64)(reader), - }; -}, function (writer, target) { - (0, psdWriter_1.writeFloat64)(writer, target.referencePoint.x); - (0, psdWriter_1.writeFloat64)(writer, target.referencePoint.y); -}); -if (helpers_1.MOCK_HANDLERS) { - addHandler('Patt', function (target) { return target._Patt !== undefined; }, function (reader, target, left) { - // console.log('additional info: Patt'); - target._Patt = (0, psdReader_1.readBytes)(reader, left()); - }, function (writer, target) { return false && (0, psdWriter_1.writeBytes)(writer, target._Patt); }); -} -else { - addHandler('Patt', // TODO: handle also Pat2 & Pat3 - function (// TODO: handle also Pat2 & Pat3 - target) { return !target; }, function (reader, target, left) { - if (!left()) - return; - (0, psdReader_1.skipBytes)(reader, left()); - return; // not supported yet - target; - psdReader_1.readPattern; - // if (!target.patterns) target.patterns = []; - // target.patterns.push(readPattern(reader)); - // skipBytes(reader, left()); - }, function (_writer, _target) { - }); -} -function readRect(reader) { - var top = (0, psdReader_1.readInt32)(reader); - var left = (0, psdReader_1.readInt32)(reader); - var bottom = (0, psdReader_1.readInt32)(reader); - var right = (0, psdReader_1.readInt32)(reader); - return { top: top, left: left, bottom: bottom, right: right }; -} -function writeRect(writer, rect) { - (0, psdWriter_1.writeInt32)(writer, rect.top); - (0, psdWriter_1.writeInt32)(writer, rect.left); - (0, psdWriter_1.writeInt32)(writer, rect.bottom); - (0, psdWriter_1.writeInt32)(writer, rect.right); -} -addHandler('Anno', function (target) { return target.annotations !== undefined; }, function (reader, target, left) { - var major = (0, psdReader_1.readUint16)(reader); - var minor = (0, psdReader_1.readUint16)(reader); - if (major !== 2 || minor !== 1) - throw new Error('Invalid Anno version'); - var count = (0, psdReader_1.readUint32)(reader); - var annotations = []; - for (var i = 0; i < count; i++) { - /*const length =*/ (0, psdReader_1.readUint32)(reader); - var type = (0, psdReader_1.readSignature)(reader); - var open_1 = !!(0, psdReader_1.readUint8)(reader); - /*const flags =*/ (0, psdReader_1.readUint8)(reader); // always 28 - /*const optionalBlocks =*/ (0, psdReader_1.readUint16)(reader); - var iconLocation = readRect(reader); - var popupLocation = readRect(reader); - var color = (0, psdReader_1.readColor)(reader); - var author = (0, psdReader_1.readPascalString)(reader, 2); - var name_1 = (0, psdReader_1.readPascalString)(reader, 2); - var date = (0, psdReader_1.readPascalString)(reader, 2); - /*const contentLength =*/ (0, psdReader_1.readUint32)(reader); - /*const dataType =*/ (0, psdReader_1.readSignature)(reader); - var dataLength = (0, psdReader_1.readUint32)(reader); - var data = void 0; - if (type === 'txtA') { - if (dataLength >= 2 && (0, psdReader_1.readUint16)(reader) === 0xfeff) { - data = (0, psdReader_1.readUnicodeStringWithLength)(reader, (dataLength - 2) / 2); - } - else { - reader.offset -= 2; - data = (0, psdReader_1.readAsciiString)(reader, dataLength); - } - data = data.replace(/\r/g, '\n'); - } - else if (type === 'sndA') { - data = (0, psdReader_1.readBytes)(reader, dataLength); - } - else { - throw new Error('Unknown annotation type'); - } - annotations.push({ - type: type === 'txtA' ? 'text' : 'sound', - open: open_1, - iconLocation: iconLocation, - popupLocation: popupLocation, - color: color, - author: author, - name: name_1, - date: date, - data: data, - }); - } - target.annotations = annotations; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var annotations = target.annotations; - (0, psdWriter_1.writeUint16)(writer, 2); - (0, psdWriter_1.writeUint16)(writer, 1); - (0, psdWriter_1.writeUint32)(writer, annotations.length); - for (var _i = 0, annotations_1 = annotations; _i < annotations_1.length; _i++) { - var annotation = annotations_1[_i]; - var sound = annotation.type === 'sound'; - if (sound && !(annotation.data instanceof Uint8Array)) - throw new Error('Sound annotation data should be Uint8Array'); - if (!sound && typeof annotation.data !== 'string') - throw new Error('Text annotation data should be string'); - var lengthOffset = writer.offset; - (0, psdWriter_1.writeUint32)(writer, 0); // length - (0, psdWriter_1.writeSignature)(writer, sound ? 'sndA' : 'txtA'); - (0, psdWriter_1.writeUint8)(writer, annotation.open ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, 28); - (0, psdWriter_1.writeUint16)(writer, 1); - writeRect(writer, annotation.iconLocation); - writeRect(writer, annotation.popupLocation); - (0, psdWriter_1.writeColor)(writer, annotation.color); - (0, psdWriter_1.writePascalString)(writer, annotation.author || '', 2); - (0, psdWriter_1.writePascalString)(writer, annotation.name || '', 2); - (0, psdWriter_1.writePascalString)(writer, annotation.date || '', 2); - var contentOffset = writer.offset; - (0, psdWriter_1.writeUint32)(writer, 0); // content length - (0, psdWriter_1.writeSignature)(writer, sound ? 'sndM' : 'txtC'); - (0, psdWriter_1.writeUint32)(writer, 0); // data length - var dataOffset = writer.offset; - if (sound) { - (0, psdWriter_1.writeBytes)(writer, annotation.data); - } - else { - (0, psdWriter_1.writeUint16)(writer, 0xfeff); // unicode string indicator - var text = annotation.data.replace(/\n/g, '\r'); - for (var i = 0; i < text.length; i++) - (0, psdWriter_1.writeUint16)(writer, text.charCodeAt(i)); - } - writer.view.setUint32(lengthOffset, writer.offset - lengthOffset, false); - writer.view.setUint32(contentOffset, writer.offset - contentOffset, false); - writer.view.setUint32(dataOffset - 4, writer.offset - dataOffset, false); - } -}); -addHandler('lnk2', function (target) { return !!target.linkedFiles && target.linkedFiles.length > 0; }, function (reader, target, left, _, options) { - var psd = target; - psd.linkedFiles = psd.linkedFiles || []; - while (left() > 8) { - var size = readLength64(reader); // size - var startOffset = reader.offset; - var type = (0, psdReader_1.readSignature)(reader); - var version = (0, psdReader_1.readInt32)(reader); - var id = (0, psdReader_1.readPascalString)(reader, 1); - var name_2 = (0, psdReader_1.readUnicodeString)(reader); - var fileType = (0, psdReader_1.readSignature)(reader).trim(); // ' ' if empty - var fileCreator = (0, psdReader_1.readSignature)(reader).trim(); // ' ' or '\0\0\0\0' if empty - var dataSize = readLength64(reader); - var hasFileOpenDescriptor = (0, psdReader_1.readUint8)(reader); - var fileOpenDescriptor = hasFileOpenDescriptor ? (0, descriptor_1.readVersionAndDescriptor)(reader) : undefined; - var linkedFileDescriptor = type === 'liFE' ? (0, descriptor_1.readVersionAndDescriptor)(reader) : undefined; - var file = { id: id, name: name_2, data: undefined }; - if (fileType) - file.type = fileType; - if (fileCreator) - file.creator = fileCreator; - if (fileOpenDescriptor) - file.descriptor = fileOpenDescriptor; - if (type === 'liFE' && version > 3) { - var year = (0, psdReader_1.readInt32)(reader); - var month = (0, psdReader_1.readUint8)(reader); - var day = (0, psdReader_1.readUint8)(reader); - var hour = (0, psdReader_1.readUint8)(reader); - var minute = (0, psdReader_1.readUint8)(reader); - var seconds = (0, psdReader_1.readFloat64)(reader); - var wholeSeconds = Math.floor(seconds); - var ms = (seconds - wholeSeconds) * 1000; - file.time = (new Date(year, month, day, hour, minute, wholeSeconds, ms)).toISOString(); - } - var fileSize = type === 'liFE' ? readLength64(reader) : 0; - if (type === 'liFA') - (0, psdReader_1.skipBytes)(reader, 8); - if (type === 'liFD') - file.data = (0, psdReader_1.readBytes)(reader, dataSize); - if (version >= 5) - file.childDocumentID = (0, psdReader_1.readUnicodeString)(reader); - if (version >= 6) - file.assetModTime = (0, psdReader_1.readFloat64)(reader); - if (version >= 7) - file.assetLockedState = (0, psdReader_1.readUint8)(reader); - if (type === 'liFE') - file.data = (0, psdReader_1.readBytes)(reader, fileSize); - if (options.skipLinkedFilesData) - file.data = undefined; - psd.linkedFiles.push(file); - linkedFileDescriptor; - while (size % 4) - size++; - reader.offset = startOffset + size; - } - (0, psdReader_1.skipBytes)(reader, left()); // ? -}, function (writer, target) { - var psd = target; - for (var _i = 0, _a = psd.linkedFiles; _i < _a.length; _i++) { - var file = _a[_i]; - var version = 2; - if (file.assetLockedState != null) - version = 7; - else if (file.assetModTime != null) - version = 6; - else if (file.childDocumentID != null) - version = 5; - // TODO: else if (file.time != null) version = 3; (only for liFE) - (0, psdWriter_1.writeUint32)(writer, 0); - (0, psdWriter_1.writeUint32)(writer, 0); // size - var sizeOffset = writer.offset; - (0, psdWriter_1.writeSignature)(writer, file.data ? 'liFD' : 'liFA'); - (0, psdWriter_1.writeInt32)(writer, version); - (0, psdWriter_1.writePascalString)(writer, file.id || '', 1); - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, file.name || ''); - (0, psdWriter_1.writeSignature)(writer, file.type ? "".concat(file.type, " ").substring(0, 4) : ' '); - (0, psdWriter_1.writeSignature)(writer, file.creator ? "".concat(file.creator, " ").substring(0, 4) : '\0\0\0\0'); - writeLength64(writer, file.data ? file.data.byteLength : 0); - if (file.descriptor && file.descriptor.compInfo) { - var desc = { - compInfo: file.descriptor.compInfo, - }; - (0, psdWriter_1.writeUint8)(writer, 1); - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - } - else { - (0, psdWriter_1.writeUint8)(writer, 0); - } - if (file.data) - (0, psdWriter_1.writeBytes)(writer, file.data); - else - writeLength64(writer, 0); - if (version >= 5) - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, file.childDocumentID || ''); - if (version >= 6) - (0, psdWriter_1.writeFloat64)(writer, file.assetModTime || 0); - if (version >= 7) - (0, psdWriter_1.writeUint8)(writer, file.assetLockedState || 0); - var size = writer.offset - sizeOffset; - writer.view.setUint32(sizeOffset - 4, size, false); // write size - while (size % 4) { - size++; - (0, psdWriter_1.writeUint8)(writer, 0); - } - } -}); -addHandlerAlias('lnkD', 'lnk2'); -addHandlerAlias('lnk3', 'lnk2'); -addHandlerAlias('lnkE', 'lnk2'); -addHandler('pths', hasKey('pathList'), function (reader, target) { - var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.pathList = []; // TODO: read paths (find example with non-empty list) - descriptor; - // console.log('pths', descriptor); // TODO: remove this -}, function (writer, _target) { - var descriptor = { - pathList: [], // TODO: write paths - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'pathsDataClass', descriptor); -}); -addHandler('lyvr', hasKey('version'), function (reader, target) { return target.version = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.version); }); -function adjustmentType(type) { - return function (target) { return !!target.adjustment && target.adjustment.type === type; }; -} -addHandler('brit', adjustmentType('brightness/contrast'), function (reader, target, left) { - if (!target.adjustment) { // ignore if got one from CgEd block - target.adjustment = { - type: 'brightness/contrast', - brightness: (0, psdReader_1.readInt16)(reader), - contrast: (0, psdReader_1.readInt16)(reader), - meanValue: (0, psdReader_1.readInt16)(reader), - labColorOnly: !!(0, psdReader_1.readUint8)(reader), - useLegacy: true, - }; - } - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a; - var info = target.adjustment; - (0, psdWriter_1.writeInt16)(writer, info.brightness || 0); - (0, psdWriter_1.writeInt16)(writer, info.contrast || 0); - (0, psdWriter_1.writeInt16)(writer, (_a = info.meanValue) !== null && _a !== void 0 ? _a : 127); - (0, psdWriter_1.writeUint8)(writer, info.labColorOnly ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 1); -}); -function readLevelsChannel(reader) { - var shadowInput = (0, psdReader_1.readInt16)(reader); - var highlightInput = (0, psdReader_1.readInt16)(reader); - var shadowOutput = (0, psdReader_1.readInt16)(reader); - var highlightOutput = (0, psdReader_1.readInt16)(reader); - var midtoneInput = (0, psdReader_1.readInt16)(reader) / 100; - return { shadowInput: shadowInput, highlightInput: highlightInput, shadowOutput: shadowOutput, highlightOutput: highlightOutput, midtoneInput: midtoneInput }; -} -function writeLevelsChannel(writer, channel) { - (0, psdWriter_1.writeInt16)(writer, channel.shadowInput); - (0, psdWriter_1.writeInt16)(writer, channel.highlightInput); - (0, psdWriter_1.writeInt16)(writer, channel.shadowOutput); - (0, psdWriter_1.writeInt16)(writer, channel.highlightOutput); - (0, psdWriter_1.writeInt16)(writer, Math.round(channel.midtoneInput * 100)); -} -addHandler('levl', adjustmentType('levels'), function (reader, target, left) { - if ((0, psdReader_1.readUint16)(reader) !== 2) - throw new Error('Invalid levl version'); - target.adjustment = __assign(__assign({}, target.adjustment), { type: 'levels', rgb: readLevelsChannel(reader), red: readLevelsChannel(reader), green: readLevelsChannel(reader), blue: readLevelsChannel(reader) }); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var defaultChannel = { - shadowInput: 0, - highlightInput: 255, - shadowOutput: 0, - highlightOutput: 255, - midtoneInput: 1, - }; - (0, psdWriter_1.writeUint16)(writer, 2); // version - writeLevelsChannel(writer, info.rgb || defaultChannel); - writeLevelsChannel(writer, info.red || defaultChannel); - writeLevelsChannel(writer, info.blue || defaultChannel); - writeLevelsChannel(writer, info.green || defaultChannel); - for (var i = 0; i < 59; i++) - writeLevelsChannel(writer, defaultChannel); -}); -function readCurveChannel(reader) { - var nodes = (0, psdReader_1.readUint16)(reader); - var channel = []; - for (var j = 0; j < nodes; j++) { - var output = (0, psdReader_1.readInt16)(reader); - var input = (0, psdReader_1.readInt16)(reader); - channel.push({ input: input, output: output }); - } - return channel; -} -function writeCurveChannel(writer, channel) { - (0, psdWriter_1.writeUint16)(writer, channel.length); - for (var _i = 0, channel_1 = channel; _i < channel_1.length; _i++) { - var n = channel_1[_i]; - (0, psdWriter_1.writeUint16)(writer, n.output); - (0, psdWriter_1.writeUint16)(writer, n.input); - } -} -addHandler('curv', adjustmentType('curves'), function (reader, target, left) { - (0, psdReader_1.readUint8)(reader); - if ((0, psdReader_1.readUint16)(reader) !== 1) - throw new Error('Invalid curv version'); - (0, psdReader_1.readUint16)(reader); - var channels = (0, psdReader_1.readUint16)(reader); - var info = { type: 'curves' }; - if (channels & 1) - info.rgb = readCurveChannel(reader); - if (channels & 2) - info.red = readCurveChannel(reader); - if (channels & 4) - info.green = readCurveChannel(reader); - if (channels & 8) - info.blue = readCurveChannel(reader); - target.adjustment = __assign(__assign({}, target.adjustment), info); - // ignoring, duplicate information - // checkSignature(reader, 'Crv '); - // const cVersion = readUint16(reader); - // readUint16(reader); - // const channelCount = readUint16(reader); - // for (let i = 0; i < channelCount; i++) { - // const index = readUint16(reader); - // const nodes = readUint16(reader); - // for (let j = 0; j < nodes; j++) { - // const output = readInt16(reader); - // const input = readInt16(reader); - // } - // } - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var rgb = info.rgb, red = info.red, green = info.green, blue = info.blue; - var channels = 0; - var channelCount = 0; - if (rgb && rgb.length) { - channels |= 1; - channelCount++; - } - if (red && red.length) { - channels |= 2; - channelCount++; - } - if (green && green.length) { - channels |= 4; - channelCount++; - } - if (blue && blue.length) { - channels |= 8; - channelCount++; - } - (0, psdWriter_1.writeUint8)(writer, 0); - (0, psdWriter_1.writeUint16)(writer, 1); // version - (0, psdWriter_1.writeUint16)(writer, 0); - (0, psdWriter_1.writeUint16)(writer, channels); - if (rgb && rgb.length) - writeCurveChannel(writer, rgb); - if (red && red.length) - writeCurveChannel(writer, red); - if (green && green.length) - writeCurveChannel(writer, green); - if (blue && blue.length) - writeCurveChannel(writer, blue); - (0, psdWriter_1.writeSignature)(writer, 'Crv '); - (0, psdWriter_1.writeUint16)(writer, 4); // version - (0, psdWriter_1.writeUint16)(writer, 0); - (0, psdWriter_1.writeUint16)(writer, channelCount); - if (rgb && rgb.length) { - (0, psdWriter_1.writeUint16)(writer, 0); - writeCurveChannel(writer, rgb); - } - if (red && red.length) { - (0, psdWriter_1.writeUint16)(writer, 1); - writeCurveChannel(writer, red); - } - if (green && green.length) { - (0, psdWriter_1.writeUint16)(writer, 2); - writeCurveChannel(writer, green); - } - if (blue && blue.length) { - (0, psdWriter_1.writeUint16)(writer, 3); - writeCurveChannel(writer, blue); - } - (0, psdWriter_1.writeZeros)(writer, 2); -}); -addHandler('expA', adjustmentType('exposure'), function (reader, target, left) { - if ((0, psdReader_1.readUint16)(reader) !== 1) - throw new Error('Invalid expA version'); - target.adjustment = __assign(__assign({}, target.adjustment), { type: 'exposure', exposure: (0, psdReader_1.readFloat32)(reader), offset: (0, psdReader_1.readFloat32)(reader), gamma: (0, psdReader_1.readFloat32)(reader) }); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, 1); // version - (0, psdWriter_1.writeFloat32)(writer, info.exposure); - (0, psdWriter_1.writeFloat32)(writer, info.offset); - (0, psdWriter_1.writeFloat32)(writer, info.gamma); - (0, psdWriter_1.writeZeros)(writer, 2); -}); -addHandler('vibA', adjustmentType('vibrance'), function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.adjustment = { type: 'vibrance' }; - if (desc.vibrance !== undefined) - target.adjustment.vibrance = desc.vibrance; - if (desc.Strt !== undefined) - target.adjustment.saturation = desc.Strt; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var desc = {}; - if (info.vibrance !== undefined) - desc.vibrance = info.vibrance; - if (info.saturation !== undefined) - desc.Strt = info.saturation; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -function readHueChannel(reader) { - return { - a: (0, psdReader_1.readInt16)(reader), - b: (0, psdReader_1.readInt16)(reader), - c: (0, psdReader_1.readInt16)(reader), - d: (0, psdReader_1.readInt16)(reader), - hue: (0, psdReader_1.readInt16)(reader), - saturation: (0, psdReader_1.readInt16)(reader), - lightness: (0, psdReader_1.readInt16)(reader), - }; -} -function writeHueChannel(writer, channel) { - var c = channel || {}; - (0, psdWriter_1.writeInt16)(writer, c.a || 0); - (0, psdWriter_1.writeInt16)(writer, c.b || 0); - (0, psdWriter_1.writeInt16)(writer, c.c || 0); - (0, psdWriter_1.writeInt16)(writer, c.d || 0); - (0, psdWriter_1.writeInt16)(writer, c.hue || 0); - (0, psdWriter_1.writeInt16)(writer, c.saturation || 0); - (0, psdWriter_1.writeInt16)(writer, c.lightness || 0); -} -addHandler('hue2', adjustmentType('hue/saturation'), function (reader, target, left) { - if ((0, psdReader_1.readUint16)(reader) !== 2) - throw new Error('Invalid hue2 version'); - target.adjustment = __assign(__assign({}, target.adjustment), { type: 'hue/saturation', master: readHueChannel(reader), reds: readHueChannel(reader), yellows: readHueChannel(reader), greens: readHueChannel(reader), cyans: readHueChannel(reader), blues: readHueChannel(reader), magentas: readHueChannel(reader) }); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, 2); // version - writeHueChannel(writer, info.master); - writeHueChannel(writer, info.reds); - writeHueChannel(writer, info.yellows); - writeHueChannel(writer, info.greens); - writeHueChannel(writer, info.cyans); - writeHueChannel(writer, info.blues); - writeHueChannel(writer, info.magentas); -}); -function readColorBalance(reader) { - return { - cyanRed: (0, psdReader_1.readInt16)(reader), - magentaGreen: (0, psdReader_1.readInt16)(reader), - yellowBlue: (0, psdReader_1.readInt16)(reader), - }; -} -function writeColorBalance(writer, value) { - (0, psdWriter_1.writeInt16)(writer, value.cyanRed || 0); - (0, psdWriter_1.writeInt16)(writer, value.magentaGreen || 0); - (0, psdWriter_1.writeInt16)(writer, value.yellowBlue || 0); -} -addHandler('blnc', adjustmentType('color balance'), function (reader, target, left) { - target.adjustment = { - type: 'color balance', - shadows: readColorBalance(reader), - midtones: readColorBalance(reader), - highlights: readColorBalance(reader), - preserveLuminosity: !!(0, psdReader_1.readUint8)(reader), - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - writeColorBalance(writer, info.shadows || {}); - writeColorBalance(writer, info.midtones || {}); - writeColorBalance(writer, info.highlights || {}); - (0, psdWriter_1.writeUint8)(writer, info.preserveLuminosity ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 1); -}); -addHandler('blwh', adjustmentType('black & white'), function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.adjustment = { - type: 'black & white', - reds: desc['Rd '], - yellows: desc.Yllw, - greens: desc['Grn '], - cyans: desc['Cyn '], - blues: desc['Bl '], - magentas: desc.Mgnt, - useTint: !!desc.useTint, - presetKind: desc.bwPresetKind, - presetFileName: desc.blackAndWhitePresetFileName, - }; - if (desc.tintColor !== undefined) - target.adjustment.tintColor = (0, descriptor_1.parseColor)(desc.tintColor); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var desc = { - 'Rd ': info.reds || 0, - Yllw: info.yellows || 0, - 'Grn ': info.greens || 0, - 'Cyn ': info.cyans || 0, - 'Bl ': info.blues || 0, - Mgnt: info.magentas || 0, - useTint: !!info.useTint, - tintColor: (0, descriptor_1.serializeColor)(info.tintColor), - bwPresetKind: info.presetKind || 0, - blackAndWhitePresetFileName: info.presetFileName || '', - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler('phfl', adjustmentType('photo filter'), function (reader, target, left) { - var version = (0, psdReader_1.readUint16)(reader); - if (version !== 2 && version !== 3) - throw new Error('Invalid phfl version'); - var color; - if (version === 2) { - color = (0, psdReader_1.readColor)(reader); - } - else { // version 3 - // TODO: test this, this is probably wrong - color = { - l: (0, psdReader_1.readInt32)(reader) / 100, - a: (0, psdReader_1.readInt32)(reader) / 100, - b: (0, psdReader_1.readInt32)(reader) / 100, - }; - } - target.adjustment = { - type: 'photo filter', - color: color, - density: (0, psdReader_1.readUint32)(reader) / 100, - preserveLuminosity: !!(0, psdReader_1.readUint8)(reader), - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, 2); // version - (0, psdWriter_1.writeColor)(writer, info.color || { l: 0, a: 0, b: 0 }); - (0, psdWriter_1.writeUint32)(writer, (info.density || 0) * 100); - (0, psdWriter_1.writeUint8)(writer, info.preserveLuminosity ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -function readMixrChannel(reader) { - var red = (0, psdReader_1.readInt16)(reader); - var green = (0, psdReader_1.readInt16)(reader); - var blue = (0, psdReader_1.readInt16)(reader); - (0, psdReader_1.skipBytes)(reader, 2); - var constant = (0, psdReader_1.readInt16)(reader); - return { red: red, green: green, blue: blue, constant: constant }; -} -function writeMixrChannel(writer, channel) { - var c = channel || {}; - (0, psdWriter_1.writeInt16)(writer, c.red); - (0, psdWriter_1.writeInt16)(writer, c.green); - (0, psdWriter_1.writeInt16)(writer, c.blue); - (0, psdWriter_1.writeZeros)(writer, 2); - (0, psdWriter_1.writeInt16)(writer, c.constant); -} -addHandler('mixr', adjustmentType('channel mixer'), function (reader, target, left) { - if ((0, psdReader_1.readUint16)(reader) !== 1) - throw new Error('Invalid mixr version'); - var adjustment = target.adjustment = __assign(__assign({}, target.adjustment), { type: 'channel mixer', monochrome: !!(0, psdReader_1.readUint16)(reader) }); - if (!adjustment.monochrome) { - adjustment.red = readMixrChannel(reader); - adjustment.green = readMixrChannel(reader); - adjustment.blue = readMixrChannel(reader); - } - adjustment.gray = readMixrChannel(reader); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, 1); // version - (0, psdWriter_1.writeUint16)(writer, info.monochrome ? 1 : 0); - if (info.monochrome) { - writeMixrChannel(writer, info.gray); - (0, psdWriter_1.writeZeros)(writer, 3 * 5 * 2); - } - else { - writeMixrChannel(writer, info.red); - writeMixrChannel(writer, info.green); - writeMixrChannel(writer, info.blue); - writeMixrChannel(writer, info.gray); - } -}); -var colorLookupType = (0, helpers_1.createEnum)('colorLookupType', '3DLUT', { - '3dlut': '3DLUT', - abstractProfile: 'abstractProfile', - deviceLinkProfile: 'deviceLinkProfile', -}); -var LUTFormatType = (0, helpers_1.createEnum)('LUTFormatType', 'look', { - look: 'LUTFormatLOOK', - cube: 'LUTFormatCUBE', - '3dl': 'LUTFormat3DL', -}); -var colorLookupOrder = (0, helpers_1.createEnum)('colorLookupOrder', 'rgb', { - rgb: 'rgbOrder', - bgr: 'bgrOrder', -}); -addHandler('clrL', adjustmentType('color lookup'), function (reader, target, left) { - if ((0, psdReader_1.readUint16)(reader) !== 1) - throw new Error('Invalid clrL version'); - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.adjustment = { type: 'color lookup' }; - var info = target.adjustment; - if (desc.lookupType !== undefined) - info.lookupType = colorLookupType.decode(desc.lookupType); - if (desc['Nm '] !== undefined) - info.name = desc['Nm ']; - if (desc.Dthr !== undefined) - info.dither = desc.Dthr; - if (desc.profile !== undefined) - info.profile = desc.profile; - if (desc.LUTFormat !== undefined) - info.lutFormat = LUTFormatType.decode(desc.LUTFormat); - if (desc.dataOrder !== undefined) - info.dataOrder = colorLookupOrder.decode(desc.dataOrder); - if (desc.tableOrder !== undefined) - info.tableOrder = colorLookupOrder.decode(desc.tableOrder); - if (desc.LUT3DFileData !== undefined) - info.lut3DFileData = desc.LUT3DFileData; - if (desc.LUT3DFileName !== undefined) - info.lut3DFileName = desc.LUT3DFileName; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var info = target.adjustment; - var desc = {}; - if (info.lookupType !== undefined) - desc.lookupType = colorLookupType.encode(info.lookupType); - if (info.name !== undefined) - desc['Nm '] = info.name; - if (info.dither !== undefined) - desc.Dthr = info.dither; - if (info.profile !== undefined) - desc.profile = info.profile; - if (info.lutFormat !== undefined) - desc.LUTFormat = LUTFormatType.encode(info.lutFormat); - if (info.dataOrder !== undefined) - desc.dataOrder = colorLookupOrder.encode(info.dataOrder); - if (info.tableOrder !== undefined) - desc.tableOrder = colorLookupOrder.encode(info.tableOrder); - if (info.lut3DFileData !== undefined) - desc.LUT3DFileData = info.lut3DFileData; - if (info.lut3DFileName !== undefined) - desc.LUT3DFileName = info.lut3DFileName; - (0, psdWriter_1.writeUint16)(writer, 1); // version - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler('nvrt', adjustmentType('invert'), function (reader, target, left) { - target.adjustment = { type: 'invert' }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function () { - // nothing to write here -}); -addHandler('post', adjustmentType('posterize'), function (reader, target, left) { - target.adjustment = { - type: 'posterize', - levels: (0, psdReader_1.readUint16)(reader), - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a; - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, (_a = info.levels) !== null && _a !== void 0 ? _a : 4); - (0, psdWriter_1.writeZeros)(writer, 2); -}); -addHandler('thrs', adjustmentType('threshold'), function (reader, target, left) { - target.adjustment = { - type: 'threshold', - level: (0, psdReader_1.readUint16)(reader), - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a; - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, (_a = info.level) !== null && _a !== void 0 ? _a : 128); - (0, psdWriter_1.writeZeros)(writer, 2); -}); -var grdmColorModels = ['', '', '', 'rgb', 'hsb', '', 'lab']; -addHandler('grdm', adjustmentType('gradient map'), function (reader, target, left) { - if ((0, psdReader_1.readUint16)(reader) !== 1) - throw new Error('Invalid grdm version'); - var info = { - type: 'gradient map', - gradientType: 'solid', - }; - info.reverse = !!(0, psdReader_1.readUint8)(reader); - info.dither = !!(0, psdReader_1.readUint8)(reader); - info.name = (0, psdReader_1.readUnicodeString)(reader); - info.colorStops = []; - info.opacityStops = []; - var stopsCount = (0, psdReader_1.readUint16)(reader); - for (var i = 0; i < stopsCount; i++) { - info.colorStops.push({ - location: (0, psdReader_1.readUint32)(reader), - midpoint: (0, psdReader_1.readUint32)(reader) / 100, - color: (0, psdReader_1.readColor)(reader), - }); - (0, psdReader_1.skipBytes)(reader, 2); - } - var opacityStopsCount = (0, psdReader_1.readUint16)(reader); - for (var i = 0; i < opacityStopsCount; i++) { - info.opacityStops.push({ - location: (0, psdReader_1.readUint32)(reader), - midpoint: (0, psdReader_1.readUint32)(reader) / 100, - opacity: (0, psdReader_1.readUint16)(reader) / 0xff, - }); - } - var expansionCount = (0, psdReader_1.readUint16)(reader); - if (expansionCount !== 2) - throw new Error('Invalid grdm expansion count'); - var interpolation = (0, psdReader_1.readUint16)(reader); - info.smoothness = interpolation / 4096; - var length = (0, psdReader_1.readUint16)(reader); - if (length !== 32) - throw new Error('Invalid grdm length'); - info.gradientType = (0, psdReader_1.readUint16)(reader) ? 'noise' : 'solid'; - info.randomSeed = (0, psdReader_1.readUint32)(reader); - info.addTransparency = !!(0, psdReader_1.readUint16)(reader); - info.restrictColors = !!(0, psdReader_1.readUint16)(reader); - info.roughness = (0, psdReader_1.readUint32)(reader) / 4096; - info.colorModel = (grdmColorModels[(0, psdReader_1.readUint16)(reader)] || 'rgb'); - info.min = [ - (0, psdReader_1.readUint16)(reader) / 0x8000, - (0, psdReader_1.readUint16)(reader) / 0x8000, - (0, psdReader_1.readUint16)(reader) / 0x8000, - (0, psdReader_1.readUint16)(reader) / 0x8000, - ]; - info.max = [ - (0, psdReader_1.readUint16)(reader) / 0x8000, - (0, psdReader_1.readUint16)(reader) / 0x8000, - (0, psdReader_1.readUint16)(reader) / 0x8000, - (0, psdReader_1.readUint16)(reader) / 0x8000, - ]; - (0, psdReader_1.skipBytes)(reader, left()); - for (var _i = 0, _a = info.colorStops; _i < _a.length; _i++) { - var s = _a[_i]; - s.location /= interpolation; - } - for (var _b = 0, _c = info.opacityStops; _b < _c.length; _b++) { - var s = _c[_b]; - s.location /= interpolation; - } - target.adjustment = info; -}, function (writer, target) { - var _a, _b, _c; - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, 1); // version - (0, psdWriter_1.writeUint8)(writer, info.reverse ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, info.dither ? 1 : 0); - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, info.name || ''); - (0, psdWriter_1.writeUint16)(writer, info.colorStops && info.colorStops.length || 0); - var interpolation = Math.round(((_a = info.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096); - for (var _i = 0, _d = info.colorStops || []; _i < _d.length; _i++) { - var s = _d[_i]; - (0, psdWriter_1.writeUint32)(writer, Math.round(s.location * interpolation)); - (0, psdWriter_1.writeUint32)(writer, Math.round(s.midpoint * 100)); - (0, psdWriter_1.writeColor)(writer, s.color); - (0, psdWriter_1.writeZeros)(writer, 2); - } - (0, psdWriter_1.writeUint16)(writer, info.opacityStops && info.opacityStops.length || 0); - for (var _e = 0, _f = info.opacityStops || []; _e < _f.length; _e++) { - var s = _f[_e]; - (0, psdWriter_1.writeUint32)(writer, Math.round(s.location * interpolation)); - (0, psdWriter_1.writeUint32)(writer, Math.round(s.midpoint * 100)); - (0, psdWriter_1.writeUint16)(writer, Math.round(s.opacity * 0xff)); - } - (0, psdWriter_1.writeUint16)(writer, 2); // expansion count - (0, psdWriter_1.writeUint16)(writer, interpolation); - (0, psdWriter_1.writeUint16)(writer, 32); // length - (0, psdWriter_1.writeUint16)(writer, info.gradientType === 'noise' ? 1 : 0); - (0, psdWriter_1.writeUint32)(writer, info.randomSeed || 0); - (0, psdWriter_1.writeUint16)(writer, info.addTransparency ? 1 : 0); - (0, psdWriter_1.writeUint16)(writer, info.restrictColors ? 1 : 0); - (0, psdWriter_1.writeUint32)(writer, Math.round(((_b = info.roughness) !== null && _b !== void 0 ? _b : 1) * 4096)); - var colorModel = grdmColorModels.indexOf((_c = info.colorModel) !== null && _c !== void 0 ? _c : 'rgb'); - (0, psdWriter_1.writeUint16)(writer, colorModel === -1 ? 3 : colorModel); - for (var i = 0; i < 4; i++) - (0, psdWriter_1.writeUint16)(writer, Math.round((info.min && info.min[i] || 0) * 0x8000)); - for (var i = 0; i < 4; i++) - (0, psdWriter_1.writeUint16)(writer, Math.round((info.max && info.max[i] || 0) * 0x8000)); - (0, psdWriter_1.writeZeros)(writer, 4); -}); -function readSelectiveColors(reader) { - return { - c: (0, psdReader_1.readInt16)(reader), - m: (0, psdReader_1.readInt16)(reader), - y: (0, psdReader_1.readInt16)(reader), - k: (0, psdReader_1.readInt16)(reader), - }; -} -function writeSelectiveColors(writer, cmyk) { - var c = cmyk || {}; - (0, psdWriter_1.writeInt16)(writer, c.c); - (0, psdWriter_1.writeInt16)(writer, c.m); - (0, psdWriter_1.writeInt16)(writer, c.y); - (0, psdWriter_1.writeInt16)(writer, c.k); -} -addHandler('selc', adjustmentType('selective color'), function (reader, target) { - if ((0, psdReader_1.readUint16)(reader) !== 1) - throw new Error('Invalid selc version'); - var mode = (0, psdReader_1.readUint16)(reader) ? 'absolute' : 'relative'; - (0, psdReader_1.skipBytes)(reader, 8); - target.adjustment = { - type: 'selective color', - mode: mode, - reds: readSelectiveColors(reader), - yellows: readSelectiveColors(reader), - greens: readSelectiveColors(reader), - cyans: readSelectiveColors(reader), - blues: readSelectiveColors(reader), - magentas: readSelectiveColors(reader), - whites: readSelectiveColors(reader), - neutrals: readSelectiveColors(reader), - blacks: readSelectiveColors(reader), - }; -}, function (writer, target) { - var info = target.adjustment; - (0, psdWriter_1.writeUint16)(writer, 1); // version - (0, psdWriter_1.writeUint16)(writer, info.mode === 'absolute' ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 8); - writeSelectiveColors(writer, info.reds); - writeSelectiveColors(writer, info.yellows); - writeSelectiveColors(writer, info.greens); - writeSelectiveColors(writer, info.cyans); - writeSelectiveColors(writer, info.blues); - writeSelectiveColors(writer, info.magentas); - writeSelectiveColors(writer, info.whites); - writeSelectiveColors(writer, info.neutrals); - writeSelectiveColors(writer, info.blacks); -}); -addHandler('CgEd', function (target) { - var a = target.adjustment; - if (!a) - return false; - return (a.type === 'brightness/contrast' && !a.useLegacy) || - ((a.type === 'levels' || a.type === 'curves' || a.type === 'exposure' || a.type === 'channel mixer' || - a.type === 'hue/saturation') && a.presetFileName !== undefined); -}, function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - if (desc.Vrsn !== 1) - throw new Error('Invalid CgEd version'); - // this section can specify preset file name for other adjustment types - if ('presetFileName' in desc) { - target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.presetKind, presetFileName: desc.presetFileName }); - } - else if ('curvesPresetFileName' in desc) { - target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.curvesPresetKind, presetFileName: desc.curvesPresetFileName }); - } - else if ('mixerPresetFileName' in desc) { - target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.mixerPresetKind, presetFileName: desc.mixerPresetFileName }); - } - else { - target.adjustment = { - type: 'brightness/contrast', - brightness: desc.Brgh, - contrast: desc.Cntr, - meanValue: desc.means, - useLegacy: !!desc.useLegacy, - labColorOnly: !!desc['Lab '], - auto: !!desc.Auto, - }; - } - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a, _b, _c, _d; - var info = target.adjustment; - if (info.type === 'levels' || info.type === 'exposure' || info.type === 'hue/saturation') { - var desc = { - Vrsn: 1, - presetKind: (_a = info.presetKind) !== null && _a !== void 0 ? _a : 1, - presetFileName: info.presetFileName || '', - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - } - else if (info.type === 'curves') { - var desc = { - Vrsn: 1, - curvesPresetKind: (_b = info.presetKind) !== null && _b !== void 0 ? _b : 1, - curvesPresetFileName: info.presetFileName || '', - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - } - else if (info.type === 'channel mixer') { - var desc = { - Vrsn: 1, - mixerPresetKind: (_c = info.presetKind) !== null && _c !== void 0 ? _c : 1, - mixerPresetFileName: info.presetFileName || '', - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - } - else if (info.type === 'brightness/contrast') { - var desc = { - Vrsn: 1, - Brgh: info.brightness || 0, - Cntr: info.contrast || 0, - means: (_d = info.meanValue) !== null && _d !== void 0 ? _d : 127, - 'Lab ': !!info.labColorOnly, - useLegacy: !!info.useLegacy, - Auto: !!info.auto, - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - } - else { - throw new Error('Unhandled CgEd case'); - } -}); -addHandler('Txt2', hasKey('engineData'), function (reader, target, left) { - var data = (0, psdReader_1.readBytes)(reader, left()); - target.engineData = (0, base64_js_1.fromByteArray)(data); - // const engineData = parseEngineData(data); - // console.log(require('util').inspect(engineData, false, 99, true)); - // require('fs').writeFileSync('resources/engineData2Simple.txt', require('util').inspect(engineData, false, 99, false), 'utf8'); - // require('fs').writeFileSync('test_data.json', JSON.stringify(ed, null, 2), 'utf8'); -}, function (writer, target) { - var buffer = (0, base64_js_1.toByteArray)(target.engineData); - (0, psdWriter_1.writeBytes)(writer, buffer); -}); -addHandler('FMsk', hasKey('filterMask'), function (reader, target) { - target.filterMask = { - colorSpace: (0, psdReader_1.readColor)(reader), - opacity: (0, psdReader_1.readUint16)(reader) / 0xff, - }; -}, function (writer, target) { - var _a; - (0, psdWriter_1.writeColor)(writer, target.filterMask.colorSpace); - (0, psdWriter_1.writeUint16)(writer, (0, helpers_1.clamp)((_a = target.filterMask.opacity) !== null && _a !== void 0 ? _a : 1, 0, 1) * 0xff); -}); -addHandler('artd', // document-wide artboard info -function (// document-wide artboard info -target) { return target.artboards !== undefined; }, function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.artboards = { - count: desc['Cnt '], - autoExpandOffset: { horizontal: desc.autoExpandOffset.Hrzn, vertical: desc.autoExpandOffset.Vrtc }, - origin: { horizontal: desc.origin.Hrzn, vertical: desc.origin.Vrtc }, - autoExpandEnabled: desc.autoExpandEnabled, - autoNestEnabled: desc.autoNestEnabled, - autoPositionEnabled: desc.autoPositionEnabled, - shrinkwrapOnSaveEnabled: !!desc.shrinkwrapOnSaveEnabled, - docDefaultNewArtboardBackgroundColor: (0, descriptor_1.parseColor)(desc.docDefaultNewArtboardBackgroundColor), - docDefaultNewArtboardBackgroundType: desc.docDefaultNewArtboardBackgroundType, - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var _a, _b, _c, _d, _e; - var artb = target.artboards; - var desc = { - 'Cnt ': artb.count, - autoExpandOffset: artb.autoExpandOffset ? { Hrzn: artb.autoExpandOffset.horizontal, Vrtc: artb.autoExpandOffset.vertical } : { Hrzn: 0, Vrtc: 0 }, - origin: artb.origin ? { Hrzn: artb.origin.horizontal, Vrtc: artb.origin.vertical } : { Hrzn: 0, Vrtc: 0 }, - autoExpandEnabled: (_a = artb.autoExpandEnabled) !== null && _a !== void 0 ? _a : true, - autoNestEnabled: (_b = artb.autoNestEnabled) !== null && _b !== void 0 ? _b : true, - autoPositionEnabled: (_c = artb.autoPositionEnabled) !== null && _c !== void 0 ? _c : true, - shrinkwrapOnSaveEnabled: (_d = artb.shrinkwrapOnSaveEnabled) !== null && _d !== void 0 ? _d : true, - docDefaultNewArtboardBackgroundColor: (0, descriptor_1.serializeColor)(artb.docDefaultNewArtboardBackgroundColor), - docDefaultNewArtboardBackgroundType: (_e = artb.docDefaultNewArtboardBackgroundType) !== null && _e !== void 0 ? _e : 1, - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'artd'); -}); -function hasMultiEffects(effects) { - return Object.keys(effects).map(function (key) { return effects[key]; }).some(function (v) { return Array.isArray(v) && v.length > 1; }); -} -exports.hasMultiEffects = hasMultiEffects; -addHandler('lfx2', function (target) { return target.effects !== undefined && !hasMultiEffects(target.effects); }, function (reader, target, left, _, options) { - var version = (0, psdReader_1.readUint32)(reader); - if (version !== 0) - throw new Error("Invalid lfx2 version"); - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - // TODO: don't discard if we got it from lmfx - // discard if read in 'lrFX' section - target.effects = (0, descriptor_1.parseEffects)(desc, !!options.logMissingFeatures); - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target, _, options) { - var desc = (0, descriptor_1.serializeEffects)(target.effects, !!options.logMissingFeatures, false); - // console.log(require('util').inspect(desc, false, 99, true)); - (0, psdWriter_1.writeUint32)(writer, 0); // version - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler('cinf', hasKey('compositorUsed'), function (reader, target, left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - target.compositorUsed = { - description: desc.description, - reason: desc.reason, - engine: desc.Engn.split('.')[1], - enableCompCore: desc.enableCompCore.split('.')[1], - enableCompCoreGPU: desc.enableCompCoreGPU.split('.')[1], - compCoreSupport: desc.compCoreSupport.split('.')[1], - compCoreGPUSupport: desc.compCoreGPUSupport.split('.')[1], - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var cinf = target.compositorUsed; - var desc = { - Vrsn: { major: 1, minor: 0, fix: 0 }, - // psVersion: { major: 22, minor: 3, fix: 1 }, // TESTING - description: cinf.description, - reason: cinf.reason, - Engn: "Engn.".concat(cinf.engine), - enableCompCore: "enable.".concat(cinf.enableCompCore), - enableCompCoreGPU: "enable.".concat(cinf.enableCompCoreGPU), - // enableCompCoreThreads: `enable.feature`, // TESTING - compCoreSupport: "reason.".concat(cinf.compCoreSupport), - compCoreGPUSupport: "reason.".concat(cinf.compCoreGPUSupport), - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -// extension settings ?, ignore it -addHandler('extn', function (target) { return target._extn !== undefined; }, function (reader, target) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - if (helpers_1.MOCK_HANDLERS) - target._extn = desc; -}, function (writer, target) { - // TODO: need to add correct types for desc fields (resources/src.psd) - if (helpers_1.MOCK_HANDLERS) - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', target._extn); -}); -addHandler('iOpa', hasKey('fillOpacity'), function (reader, target) { - target.fillOpacity = (0, psdReader_1.readUint8)(reader) / 0xff; - (0, psdReader_1.skipBytes)(reader, 3); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.fillOpacity * 0xff); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -addHandler('brst', hasKey('channelBlendingRestrictions'), function (reader, target, left) { - target.channelBlendingRestrictions = []; - while (left() > 4) { - target.channelBlendingRestrictions.push((0, psdReader_1.readInt32)(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.channelBlendingRestrictions; _i < _a.length; _i++) { - var channel = _a[_i]; - (0, psdWriter_1.writeInt32)(writer, channel); - } -}); -addHandler('tsly', hasKey('transparencyShapesLayer'), function (reader, target) { - target.transparencyShapesLayer = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.skipBytes)(reader, 3); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.transparencyShapesLayer ? 1 : 0); - (0, psdWriter_1.writeZeros)(writer, 3); -}); -/*addHandler( - 'FEid', - hasKey('filterEffects'), - (reader, _target) => { - const version = readInt32(reader); - if (version < 1 || version > 3) throw new Error(`Invalid filterEffects version ${version}`); - - if (readUint32(reader)) throw new Error('filterEffects: 64 bit length is not supported'); - const length = readUint32(reader); - const end = reader.offset + length; - - while (reader.offset < end) { - console.log('bytes to go', end - reader.offset, 'at', reader.offset.toString(16)); - // - const id = readPascalString(reader, 1); - const effectVersion = readInt32(reader); - if (effectVersion !== 1) throw new Error(`Invalid filterEffect version ${effectVersion}`); - if (readUint32(reader)) throw new Error('filterEffect: 64 bit length is not supported'); - const effectLength = readUint32(reader); - const endOfEffect = reader.offset + effectLength; - const top = readInt32(reader); - const left = readInt32(reader); - const bottom = readInt32(reader); - const right = readInt32(reader); - const depth = readInt32(reader); - const maxChannels = readInt32(reader); - const channels: any[] = []; - - for (let i = 0; i < (maxChannels + 2); i++) { - const exists = readInt32(reader); - if (exists) { - if (readUint32(reader)) throw new Error('filterEffect: 64 bit length is not supported'); - const channelLength = readUint32(reader); - const compressionMode = readUint16(reader); - const data = readBytes(reader, channelLength - 2); - channels.push({ channelLength, compressionMode, data: data?.length + ' bytes' }); - // if (c < 3 || c == 25) e_ = _F.Cn(!0, rL, m, b.rect.F, b.rect.V, X, rp); - // if (c == 0) _c.S = e_; - // if (c == 1) _c.v = e_; - // if (c == 2) _c.e = e_; - // if (c == 25) _c.w = e_; - } else { - channels.push(undefined); - } - } - - console.log('left at the end', endOfEffect - reader.offset); - if (endOfEffect > reader.offset) { - if (readUint8(reader)) { - const compressionMode = readUint16(reader); - const data = endOfEffect > reader.offset ? readBytes(reader, endOfEffect - reader.offset) : undefined; - console.log('extra data', { compressionMode, data: data?.length + ' bytes' }); - } else { - console.log('no extra'); - } - } - - console.log('effect', { - id, - effectVersion, - effectLength, - top, - left, - bottom, - right, - depth, - maxChannels, - channels, - }); - - console.log('bytes left after effect', endOfEffect - reader.offset); - // if (length % 4) skipBytes(reader, 4 - length % 4); - } - - console.log({ version, length }); - }, - (_writer, _target) => { - }, -); - -addHandlerAlias('FXid', 'FEid');*/ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.hasMultiEffects = exports.readVectorMask = exports.booleanOperations = exports.readBezierKnot = exports.infoHandlersMap = exports.infoHandlers = void 0; +var base64_js_1 = require("base64-js"); +var effectsHelpers_1 = require("./effectsHelpers"); +var helpers_1 = require("./helpers"); +var psdReader_1 = require("./psdReader"); +var psdWriter_1 = require("./psdWriter"); +var descriptor_1 = require("./descriptor"); +var engineData_1 = require("./engineData"); +var text_1 = require("./text"); +exports.infoHandlers = []; +exports.infoHandlersMap = {}; +function addHandler(key, has, read, write) { + var handler = { key: key, has: has, read: read, write: write }; + exports.infoHandlers.push(handler); + exports.infoHandlersMap[handler.key] = handler; +} +function addHandlerAlias(key, target) { + exports.infoHandlersMap[key] = exports.infoHandlersMap[target]; +} +function hasKey(key) { + return function (target) { return target[key] !== undefined; }; +} +function readLength64(reader) { + if ((0, psdReader_1.readUint32)(reader)) + throw new Error("Resource size above 4 GB limit at ".concat(reader.offset.toString(16))); + return (0, psdReader_1.readUint32)(reader); +} +function writeLength64(writer, length) { + (0, psdWriter_1.writeUint32)(writer, 0); + (0, psdWriter_1.writeUint32)(writer, length); +} +addHandler('TySh', hasKey('text'), function (reader, target, leftBytes) { + if ((0, psdReader_1.readInt16)(reader) !== 1) + throw new Error("Invalid TySh version"); + var transform = []; + for (var i = 0; i < 6; i++) + transform.push((0, psdReader_1.readFloat64)(reader)); + if ((0, psdReader_1.readInt16)(reader) !== 50) + throw new Error("Invalid TySh text version"); + var text = (0, descriptor_1.readVersionAndDescriptor)(reader); + if ((0, psdReader_1.readInt16)(reader) !== 1) + throw new Error("Invalid TySh warp version"); + var warp = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.text = { + transform: transform, + left: (0, psdReader_1.readFloat32)(reader), + top: (0, psdReader_1.readFloat32)(reader), + right: (0, psdReader_1.readFloat32)(reader), + bottom: (0, psdReader_1.readFloat32)(reader), + text: text['Txt '].replace(/\r/g, '\n'), + index: text.TextIndex || 0, + gridding: descriptor_1.textGridding.decode(text.textGridding), + antiAlias: descriptor_1.Annt.decode(text.AntA), + orientation: descriptor_1.Ornt.decode(text.Ornt), + warp: { + style: descriptor_1.warpStyle.decode(warp.warpStyle), + value: warp.warpValue || 0, + perspective: warp.warpPerspective || 0, + perspectiveOther: warp.warpPerspectiveOther || 0, + rotate: descriptor_1.Ornt.decode(warp.warpRotate), + }, + }; + if (text.EngineData) { + var engineData = (0, text_1.decodeEngineData)((0, engineData_1.parseEngineData)(text.EngineData)); + // const before = parseEngineData(text.EngineData); + // const after = encodeEngineData(engineData); + // require('fs').writeFileSync('before.txt', require('util').inspect(before, false, 99, false), 'utf8'); + // require('fs').writeFileSync('after.txt', require('util').inspect(after, false, 99, false), 'utf8'); + // console.log(require('util').inspect(parseEngineData(text.EngineData), false, 99, true)); + target.text = __assign(__assign({}, target.text), engineData); + // console.log(require('util').inspect(target.text, false, 99, true)); + } + (0, psdReader_1.skipBytes)(reader, leftBytes()); +}, function (writer, target) { + var text = target.text; + var warp = text.warp || {}; + var transform = text.transform || [1, 0, 0, 1, 0, 0]; + var textDescriptor = { + 'Txt ': (text.text || '').replace(/\r?\n/g, '\r'), + textGridding: descriptor_1.textGridding.encode(text.gridding), + Ornt: descriptor_1.Ornt.encode(text.orientation), + AntA: descriptor_1.Annt.encode(text.antiAlias), + TextIndex: text.index || 0, + EngineData: (0, engineData_1.serializeEngineData)((0, text_1.encodeEngineData)(text)), + }; + (0, psdWriter_1.writeInt16)(writer, 1); // version + for (var i = 0; i < 6; i++) { + (0, psdWriter_1.writeFloat64)(writer, transform[i]); + } + (0, psdWriter_1.writeInt16)(writer, 50); // text version + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'TxLr', textDescriptor); + (0, psdWriter_1.writeInt16)(writer, 1); // warp version + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'warp', encodeWarp(warp)); + (0, psdWriter_1.writeFloat32)(writer, text.left); + (0, psdWriter_1.writeFloat32)(writer, text.top); + (0, psdWriter_1.writeFloat32)(writer, text.right); + (0, psdWriter_1.writeFloat32)(writer, text.bottom); + // writeZeros(writer, 2); +}); +// vector fills +addHandler('SoCo', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && + target.vectorFill.type === 'color'; }, function (reader, target) { + var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.vectorFill = (0, descriptor_1.parseVectorContent)(descriptor); +}, function (writer, target) { + var descriptor = (0, descriptor_1.serializeVectorContent)(target.vectorFill).descriptor; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); +}); +addHandler('GdFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && + (target.vectorFill.type === 'solid' || target.vectorFill.type === 'noise'); }, function (reader, target, left) { + var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.vectorFill = (0, descriptor_1.parseVectorContent)(descriptor); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var descriptor = (0, descriptor_1.serializeVectorContent)(target.vectorFill).descriptor; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); +}); +addHandler('PtFl', function (target) { return target.vectorFill !== undefined && target.vectorStroke === undefined && + target.vectorFill.type === 'pattern'; }, function (reader, target) { + var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.vectorFill = (0, descriptor_1.parseVectorContent)(descriptor); +}, function (writer, target) { + var descriptor = (0, descriptor_1.serializeVectorContent)(target.vectorFill).descriptor; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); +}); +addHandler('vscg', function (target) { return target.vectorFill !== undefined && target.vectorStroke !== undefined; }, function (reader, target, left) { + (0, psdReader_1.readSignature)(reader); // key + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.vectorFill = (0, descriptor_1.parseVectorContent)(desc); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a = (0, descriptor_1.serializeVectorContent)(target.vectorFill), descriptor = _a.descriptor, key = _a.key; + (0, psdWriter_1.writeSignature)(writer, key); + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', descriptor); +}); +function readBezierKnot(reader, width, height) { + var y0 = (0, psdReader_1.readFixedPointPath32)(reader) * height; + var x0 = (0, psdReader_1.readFixedPointPath32)(reader) * width; + var y1 = (0, psdReader_1.readFixedPointPath32)(reader) * height; + var x1 = (0, psdReader_1.readFixedPointPath32)(reader) * width; + var y2 = (0, psdReader_1.readFixedPointPath32)(reader) * height; + var x2 = (0, psdReader_1.readFixedPointPath32)(reader) * width; + return [x0, y0, x1, y1, x2, y2]; +} +exports.readBezierKnot = readBezierKnot; +function writeBezierKnot(writer, points, width, height) { + (0, psdWriter_1.writeFixedPointPath32)(writer, points[1] / height); // y0 + (0, psdWriter_1.writeFixedPointPath32)(writer, points[0] / width); // x0 + (0, psdWriter_1.writeFixedPointPath32)(writer, points[3] / height); // y1 + (0, psdWriter_1.writeFixedPointPath32)(writer, points[2] / width); // x1 + (0, psdWriter_1.writeFixedPointPath32)(writer, points[5] / height); // y2 + (0, psdWriter_1.writeFixedPointPath32)(writer, points[4] / width); // x2 +} +exports.booleanOperations = ['exclude', 'combine', 'subtract', 'intersect']; +function readVectorMask(reader, vectorMask, width, height, size) { + var end = reader.offset + size; + var paths = vectorMask.paths; + var path = undefined; + while ((end - reader.offset) >= 26) { + var selector = (0, psdReader_1.readUint16)(reader); + switch (selector) { + case 0: // Closed subpath length record + case 3: { // Open subpath length record + (0, psdReader_1.readUint16)(reader); // count + var boolOp = (0, psdReader_1.readInt16)(reader); + (0, psdReader_1.readUint16)(reader); // always 1 ? + (0, psdReader_1.skipBytes)(reader, 18); + // TODO: 'combine' here might be wrong + path = { open: selector === 3, operation: boolOp === -1 ? 'combine' : exports.booleanOperations[boolOp], knots: [] }; + paths.push(path); + break; + } + case 1: // Closed subpath Bezier knot, linked + case 2: // Closed subpath Bezier knot, unlinked + case 4: // Open subpath Bezier knot, linked + case 5: // Open subpath Bezier knot, unlinked + path.knots.push({ linked: (selector === 1 || selector === 4), points: readBezierKnot(reader, width, height) }); + break; + case 6: // Path fill rule record + (0, psdReader_1.skipBytes)(reader, 24); + break; + case 7: { // Clipboard record + // TODO: check if these need to be multiplied by document size + var top_1 = (0, psdReader_1.readFixedPointPath32)(reader); + var left = (0, psdReader_1.readFixedPointPath32)(reader); + var bottom = (0, psdReader_1.readFixedPointPath32)(reader); + var right = (0, psdReader_1.readFixedPointPath32)(reader); + var resolution = (0, psdReader_1.readFixedPointPath32)(reader); + (0, psdReader_1.skipBytes)(reader, 4); + vectorMask.clipboard = { top: top_1, left: left, bottom: bottom, right: right, resolution: resolution }; + break; + } + case 8: // Initial fill rule record + vectorMask.fillStartsWithAllPixels = !!(0, psdReader_1.readUint16)(reader); + (0, psdReader_1.skipBytes)(reader, 22); + break; + default: throw new Error('Invalid vmsk section'); + } + } + return paths; +} +exports.readVectorMask = readVectorMask; +addHandler('vmsk', hasKey('vectorMask'), function (reader, target, left, _a) { + var width = _a.width, height = _a.height; + if ((0, psdReader_1.readUint32)(reader) !== 3) + throw new Error('Invalid vmsk version'); + target.vectorMask = { paths: [] }; + var vectorMask = target.vectorMask; + var flags = (0, psdReader_1.readUint32)(reader); + vectorMask.invert = (flags & 1) !== 0; + vectorMask.notLink = (flags & 2) !== 0; + vectorMask.disable = (flags & 4) !== 0; + readVectorMask(reader, vectorMask, width, height, left()); + // drawBezierPaths(vectorMask.paths, width, height, 'out.png'); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target, _a) { + var width = _a.width, height = _a.height; + var vectorMask = target.vectorMask; + var flags = (vectorMask.invert ? 1 : 0) | + (vectorMask.notLink ? 2 : 0) | + (vectorMask.disable ? 4 : 0); + (0, psdWriter_1.writeUint32)(writer, 3); // version + (0, psdWriter_1.writeUint32)(writer, flags); + // initial entry + (0, psdWriter_1.writeUint16)(writer, 6); + (0, psdWriter_1.writeZeros)(writer, 24); + var clipboard = vectorMask.clipboard; + if (clipboard) { + (0, psdWriter_1.writeUint16)(writer, 7); + (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.top); + (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.left); + (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.bottom); + (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.right); + (0, psdWriter_1.writeFixedPointPath32)(writer, clipboard.resolution); + (0, psdWriter_1.writeZeros)(writer, 4); + } + if (vectorMask.fillStartsWithAllPixels !== undefined) { + (0, psdWriter_1.writeUint16)(writer, 8); + (0, psdWriter_1.writeUint16)(writer, vectorMask.fillStartsWithAllPixels ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 22); + } + for (var _i = 0, _b = vectorMask.paths; _i < _b.length; _i++) { + var path = _b[_i]; + (0, psdWriter_1.writeUint16)(writer, path.open ? 3 : 0); + (0, psdWriter_1.writeUint16)(writer, path.knots.length); + (0, psdWriter_1.writeUint16)(writer, Math.abs(exports.booleanOperations.indexOf(path.operation))); // default to 1 if not found + (0, psdWriter_1.writeUint16)(writer, 1); + (0, psdWriter_1.writeZeros)(writer, 18); // TODO: these are sometimes non-zero + var linkedKnot = path.open ? 4 : 1; + var unlinkedKnot = path.open ? 5 : 2; + for (var _c = 0, _d = path.knots; _c < _d.length; _c++) { + var _e = _d[_c], linked = _e.linked, points = _e.points; + (0, psdWriter_1.writeUint16)(writer, linked ? linkedKnot : unlinkedKnot); + writeBezierKnot(writer, points, width, height); + } + } +}); +// TODO: need to write vmsk if has outline ? +addHandlerAlias('vsms', 'vmsk'); +addHandler('vogk', hasKey('vectorOrigination'), function (reader, target, left) { + if ((0, psdReader_1.readInt32)(reader) !== 1) + throw new Error("Invalid vogk version"); + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + target.vectorOrigination = { keyDescriptorList: [] }; + for (var _i = 0, _a = desc.keyDescriptorList; _i < _a.length; _i++) { + var i = _a[_i]; + var item = {}; + if (i.keyShapeInvalidated != null) + item.keyShapeInvalidated = i.keyShapeInvalidated; + if (i.keyOriginType != null) + item.keyOriginType = i.keyOriginType; + if (i.keyOriginResolution != null) + item.keyOriginResolution = i.keyOriginResolution; + if (i.keyOriginShapeBBox) { + item.keyOriginShapeBoundingBox = { + top: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox['Top ']), + left: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox.Left), + bottom: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox.Btom), + right: (0, descriptor_1.parseUnits)(i.keyOriginShapeBBox.Rght), + }; + } + var rectRadii = i.keyOriginRRectRadii; + if (rectRadii) { + item.keyOriginRRectRadii = { + topRight: (0, descriptor_1.parseUnits)(rectRadii.topRight), + topLeft: (0, descriptor_1.parseUnits)(rectRadii.topLeft), + bottomLeft: (0, descriptor_1.parseUnits)(rectRadii.bottomLeft), + bottomRight: (0, descriptor_1.parseUnits)(rectRadii.bottomRight), + }; + } + var corners = i.keyOriginBoxCorners; + if (corners) { + item.keyOriginBoxCorners = [ + { x: corners.rectangleCornerA.Hrzn, y: corners.rectangleCornerA.Vrtc }, + { x: corners.rectangleCornerB.Hrzn, y: corners.rectangleCornerB.Vrtc }, + { x: corners.rectangleCornerC.Hrzn, y: corners.rectangleCornerC.Vrtc }, + { x: corners.rectangleCornerD.Hrzn, y: corners.rectangleCornerD.Vrtc }, + ]; + } + var trnf = i.Trnf; + if (trnf) { + item.transform = [trnf.xx, trnf.xy, trnf.xy, trnf.yy, trnf.tx, trnf.ty]; + } + target.vectorOrigination.keyDescriptorList.push(item); + } + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + target; + var orig = target.vectorOrigination; + var desc = { keyDescriptorList: [] }; + for (var i = 0; i < orig.keyDescriptorList.length; i++) { + var item = orig.keyDescriptorList[i]; + if (item.keyShapeInvalidated) { + desc.keyDescriptorList.push({ keyShapeInvalidated: true, keyOriginIndex: i }); + } + else { + desc.keyDescriptorList.push({}); // we're adding keyOriginIndex at the end + var out = desc.keyDescriptorList[desc.keyDescriptorList.length - 1]; + if (item.keyOriginType != null) + out.keyOriginType = item.keyOriginType; + if (item.keyOriginResolution != null) + out.keyOriginResolution = item.keyOriginResolution; + var radii = item.keyOriginRRectRadii; + if (radii) { + out.keyOriginRRectRadii = { + unitValueQuadVersion: 1, + topRight: (0, descriptor_1.unitsValue)(radii.topRight, 'topRight'), + topLeft: (0, descriptor_1.unitsValue)(radii.topLeft, 'topLeft'), + bottomLeft: (0, descriptor_1.unitsValue)(radii.bottomLeft, 'bottomLeft'), + bottomRight: (0, descriptor_1.unitsValue)(radii.bottomRight, 'bottomRight'), + }; + } + var box = item.keyOriginShapeBoundingBox; + if (box) { + out.keyOriginShapeBBox = { + unitValueQuadVersion: 1, + 'Top ': (0, descriptor_1.unitsValue)(box.top, 'top'), + Left: (0, descriptor_1.unitsValue)(box.left, 'left'), + Btom: (0, descriptor_1.unitsValue)(box.bottom, 'bottom'), + Rght: (0, descriptor_1.unitsValue)(box.right, 'right'), + }; + } + var corners = item.keyOriginBoxCorners; + if (corners && corners.length === 4) { + out.keyOriginBoxCorners = { + rectangleCornerA: { Hrzn: corners[0].x, Vrtc: corners[0].y }, + rectangleCornerB: { Hrzn: corners[1].x, Vrtc: corners[1].y }, + rectangleCornerC: { Hrzn: corners[2].x, Vrtc: corners[2].y }, + rectangleCornerD: { Hrzn: corners[3].x, Vrtc: corners[3].y }, + }; + } + var transform = item.transform; + if (transform && transform.length === 6) { + out.Trnf = { + xx: transform[0], + xy: transform[1], + yx: transform[2], + yy: transform[3], + tx: transform[4], + ty: transform[5], + }; + } + out.keyOriginIndex = i; + } + } + (0, psdWriter_1.writeInt32)(writer, 1); // version + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler('lmfx', function (target) { return target.effects !== undefined && hasMultiEffects(target.effects); }, function (reader, target, left, _, options) { + var version = (0, psdReader_1.readUint32)(reader); + if (version !== 0) + throw new Error('Invalid lmfx version'); + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(info, false, 99, true)); + // discard if read in 'lrFX' or 'lfx2' section + target.effects = (0, descriptor_1.parseEffects)(desc, !!options.logMissingFeatures); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target, _, options) { + var desc = (0, descriptor_1.serializeEffects)(target.effects, !!options.logMissingFeatures, true); + (0, psdWriter_1.writeUint32)(writer, 0); // version + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler('lrFX', hasKey('effects'), function (reader, target, left) { + if (!target.effects) + target.effects = (0, effectsHelpers_1.readEffects)(reader); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + (0, effectsHelpers_1.writeEffects)(writer, target.effects); +}); +addHandler('luni', hasKey('name'), function (reader, target, left) { + target.name = (0, psdReader_1.readUnicodeString)(reader); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeUnicodeString)(writer, target.name); + // writeUint16(writer, 0); // padding (but not extending string length) +}); +addHandler('lnsr', hasKey('nameSource'), function (reader, target) { return target.nameSource = (0, psdReader_1.readSignature)(reader); }, function (writer, target) { return (0, psdWriter_1.writeSignature)(writer, target.nameSource); }); +addHandler('lyid', hasKey('id'), function (reader, target) { return target.id = (0, psdReader_1.readUint32)(reader); }, function (writer, target, _psd, options) { + var id = target.id; + while (options.layerIds.has(id)) + id += 100; // make sure we don't have duplicate layer ids + (0, psdWriter_1.writeUint32)(writer, id); + options.layerIds.add(id); + options.layerToId.set(target, id); +}); +addHandler('lsct', hasKey('sectionDivider'), function (reader, target, left) { + target.sectionDivider = { type: (0, psdReader_1.readUint32)(reader) }; + if (left()) { + (0, psdReader_1.checkSignature)(reader, '8BIM'); + target.sectionDivider.key = (0, psdReader_1.readSignature)(reader); + } + if (left()) { + target.sectionDivider.subType = (0, psdReader_1.readUint32)(reader); + } +}, function (writer, target) { + (0, psdWriter_1.writeUint32)(writer, target.sectionDivider.type); + if (target.sectionDivider.key) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, target.sectionDivider.key); + if (target.sectionDivider.subType !== undefined) { + (0, psdWriter_1.writeUint32)(writer, target.sectionDivider.subType); + } + } +}); +// it seems lsdk is used when there's a layer is nested more than 6 levels, but I don't know why? +// maybe some limitation of old version of PS? +addHandlerAlias('lsdk', 'lsct'); +addHandler('clbl', hasKey('blendClippendElements'), function (reader, target) { + target.blendClippendElements = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.skipBytes)(reader, 3); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.blendClippendElements ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 3); +}); +addHandler('infx', hasKey('blendInteriorElements'), function (reader, target) { + target.blendInteriorElements = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.skipBytes)(reader, 3); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.blendInteriorElements ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 3); +}); +addHandler('knko', hasKey('knockout'), function (reader, target) { + target.knockout = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.skipBytes)(reader, 3); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.knockout ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 3); +}); +addHandler('lmgm', hasKey('layerMaskAsGlobalMask'), function (reader, target) { + target.layerMaskAsGlobalMask = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.skipBytes)(reader, 3); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.layerMaskAsGlobalMask ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 3); +}); +addHandler('lspf', hasKey('protected'), function (reader, target) { + var flags = (0, psdReader_1.readUint32)(reader); + target.protected = { + transparency: (flags & 0x01) !== 0, + composite: (flags & 0x02) !== 0, + position: (flags & 0x04) !== 0, + }; + if (flags & 0x08) + target.protected.artboards = true; +}, function (writer, target) { + var flags = (target.protected.transparency ? 0x01 : 0) | + (target.protected.composite ? 0x02 : 0) | + (target.protected.position ? 0x04 : 0) | + (target.protected.artboards ? 0x08 : 0); + (0, psdWriter_1.writeUint32)(writer, flags); +}); +addHandler('lclr', hasKey('layerColor'), function (reader, target) { + var color = (0, psdReader_1.readUint16)(reader); + (0, psdReader_1.skipBytes)(reader, 6); + target.layerColor = helpers_1.layerColors[color]; +}, function (writer, target) { + var index = helpers_1.layerColors.indexOf(target.layerColor); + (0, psdWriter_1.writeUint16)(writer, index === -1 ? 0 : index); + (0, psdWriter_1.writeZeros)(writer, 6); +}); +addHandler('shmd', function (target) { return target.timestamp !== undefined || target.animationFrames !== undefined || + target.animationFrameFlags !== undefined || target.timeline !== undefined; }, function (reader, target, left, _, options) { + var count = (0, psdReader_1.readUint32)(reader); + var _loop_1 = function (i) { + (0, psdReader_1.checkSignature)(reader, '8BIM'); + var key = (0, psdReader_1.readSignature)(reader); + (0, psdReader_1.readUint8)(reader); // copy + (0, psdReader_1.skipBytes)(reader, 3); + (0, psdReader_1.readSection)(reader, 1, function (left) { + if (key === 'cust') { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log('cust', target.name, require('util').inspect(desc, false, 99, true)); + if (desc.layerTime !== undefined) + target.timestamp = desc.layerTime; + } + else if (key === 'mlst') { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log('mlst', target.name, require('util').inspect(desc, false, 99, true)); + target.animationFrames = []; + for (var i_1 = 0; i_1 < desc.LaSt.length; i_1++) { + var f = desc.LaSt[i_1]; + var frame = { frames: f.FrLs }; + if (f.enab !== undefined) + frame.enable = f.enab; + if (f.Ofst) + frame.offset = (0, descriptor_1.horzVrtcToXY)(f.Ofst); + if (f.FXRf) + frame.referencePoint = (0, descriptor_1.horzVrtcToXY)(f.FXRf); + if (f.Lefx) + frame.effects = (0, descriptor_1.parseEffects)(f.Lefx, !!options.logMissingFeatures); + if (f.blendOptions && f.blendOptions.Opct) + frame.opacity = (0, descriptor_1.parsePercent)(f.blendOptions.Opct); + target.animationFrames.push(frame); + } + } + else if (key === 'mdyn') { + // frame flags + (0, psdReader_1.readUint16)(reader); // unknown + var propagate = (0, psdReader_1.readUint8)(reader); + var flags = (0, psdReader_1.readUint8)(reader); + target.animationFrameFlags = { + propagateFrameOne: !propagate, + unifyLayerPosition: (flags & 1) !== 0, + unifyLayerStyle: (flags & 2) !== 0, + unifyLayerVisibility: (flags & 4) !== 0, + }; + } + else if (key === 'tmln') { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + var timeScope = desc.timeScope; + // console.log('tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); + var timeline = { + start: timeScope.Strt, + duration: timeScope.duration, + inTime: timeScope.inTime, + outTime: timeScope.outTime, + autoScope: desc.autoScope, + audioLevel: desc.audioLevel, + }; + if (desc.trackList) { + timeline.tracks = (0, descriptor_1.parseTrackList)(desc.trackList, !!options.logMissingFeatures); + } + target.timeline = timeline; + // console.log('tmln:result', target.name, target.id, require('util').inspect(timeline, false, 99, true)); + } + else { + options.logDevFeatures && console.log('Unhandled "shmd" section key', key); + } + (0, psdReader_1.skipBytes)(reader, left()); + }); + }; + for (var i = 0; i < count; i++) { + _loop_1(i); + } + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target, _, options) { + var animationFrames = target.animationFrames, animationFrameFlags = target.animationFrameFlags, timestamp = target.timestamp, timeline = target.timeline; + var count = 0; + if (animationFrames) + count++; + if (animationFrameFlags) + count++; + if (timeline) + count++; + if (timestamp !== undefined) + count++; + (0, psdWriter_1.writeUint32)(writer, count); + if (animationFrames) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'mlst'); + (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) + (0, psdWriter_1.writeZeros)(writer, 3); + (0, psdWriter_1.writeSection)(writer, 2, function () { + var _a; + var desc = { + LaID: (_a = target.id) !== null && _a !== void 0 ? _a : 0, + LaSt: [], + }; + for (var i = 0; i < animationFrames.length; i++) { + var f = animationFrames[i]; + var frame = {}; + if (f.enable !== undefined) + frame.enab = f.enable; + frame.FrLs = f.frames; + if (f.offset) + frame.Ofst = (0, descriptor_1.xyToHorzVrtc)(f.offset); + if (f.referencePoint) + frame.FXRf = (0, descriptor_1.xyToHorzVrtc)(f.referencePoint); + if (f.effects) + frame.Lefx = (0, descriptor_1.serializeEffects)(f.effects, false, false); + if (f.opacity !== undefined) + frame.blendOptions = { Opct: (0, descriptor_1.unitsPercent)(f.opacity) }; + desc.LaSt.push(frame); + } + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + }, true); + } + if (animationFrameFlags) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'mdyn'); + (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) + (0, psdWriter_1.writeZeros)(writer, 3); + (0, psdWriter_1.writeSection)(writer, 2, function () { + (0, psdWriter_1.writeUint16)(writer, 0); // unknown + (0, psdWriter_1.writeUint8)(writer, animationFrameFlags.propagateFrameOne ? 0x0 : 0xf); + (0, psdWriter_1.writeUint8)(writer, (animationFrameFlags.unifyLayerPosition ? 1 : 0) | + (animationFrameFlags.unifyLayerStyle ? 2 : 0) | + (animationFrameFlags.unifyLayerVisibility ? 4 : 0)); + }); + } + if (timeline) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'tmln'); + (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) + (0, psdWriter_1.writeZeros)(writer, 3); + (0, psdWriter_1.writeSection)(writer, 2, function () { + var desc = { + Vrsn: 1, + timeScope: { + Vrsn: 1, + Strt: timeline.start, + duration: timeline.duration, + inTime: timeline.inTime, + outTime: timeline.outTime, + }, + autoScope: timeline.autoScope, + audioLevel: timeline.audioLevel, + }; + if (timeline.tracks) { + desc.trackList = (0, descriptor_1.serializeTrackList)(timeline.tracks); + } + var id = options.layerToId.get(target) || target.id || 0; + if (!id) + throw new Error('You need to provide layer.id value whan writing document with animations'); + desc.LyrI = id; + // console.log('WRITE:tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'anim'); + }, true); + } + if (timestamp !== undefined) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'cust'); + (0, psdWriter_1.writeUint8)(writer, 0); // copy (always false) + (0, psdWriter_1.writeZeros)(writer, 3); + (0, psdWriter_1.writeSection)(writer, 2, function () { + var desc = { + layerTime: timestamp, + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'metadata', desc); + }, true); + } +}); +addHandler('vstk', hasKey('vectorStroke'), function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + target.vectorStroke = { + strokeEnabled: desc.strokeEnabled, + fillEnabled: desc.fillEnabled, + lineWidth: (0, descriptor_1.parseUnits)(desc.strokeStyleLineWidth), + lineDashOffset: (0, descriptor_1.parseUnits)(desc.strokeStyleLineDashOffset), + miterLimit: desc.strokeStyleMiterLimit, + lineCapType: descriptor_1.strokeStyleLineCapType.decode(desc.strokeStyleLineCapType), + lineJoinType: descriptor_1.strokeStyleLineJoinType.decode(desc.strokeStyleLineJoinType), + lineAlignment: descriptor_1.strokeStyleLineAlignment.decode(desc.strokeStyleLineAlignment), + scaleLock: desc.strokeStyleScaleLock, + strokeAdjust: desc.strokeStyleStrokeAdjust, + lineDashSet: desc.strokeStyleLineDashSet.map(descriptor_1.parseUnits), + blendMode: descriptor_1.BlnM.decode(desc.strokeStyleBlendMode), + opacity: (0, descriptor_1.parsePercent)(desc.strokeStyleOpacity), + content: (0, descriptor_1.parseVectorContent)(desc.strokeStyleContent), + resolution: desc.strokeStyleResolution, + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a, _b, _c; + var stroke = target.vectorStroke; + var descriptor = { + strokeStyleVersion: 2, + strokeEnabled: !!stroke.strokeEnabled, + fillEnabled: !!stroke.fillEnabled, + strokeStyleLineWidth: stroke.lineWidth || { value: 3, units: 'Points' }, + strokeStyleLineDashOffset: stroke.lineDashOffset || { value: 0, units: 'Points' }, + strokeStyleMiterLimit: (_a = stroke.miterLimit) !== null && _a !== void 0 ? _a : 100, + strokeStyleLineCapType: descriptor_1.strokeStyleLineCapType.encode(stroke.lineCapType), + strokeStyleLineJoinType: descriptor_1.strokeStyleLineJoinType.encode(stroke.lineJoinType), + strokeStyleLineAlignment: descriptor_1.strokeStyleLineAlignment.encode(stroke.lineAlignment), + strokeStyleScaleLock: !!stroke.scaleLock, + strokeStyleStrokeAdjust: !!stroke.strokeAdjust, + strokeStyleLineDashSet: stroke.lineDashSet || [], + strokeStyleBlendMode: descriptor_1.BlnM.encode(stroke.blendMode), + strokeStyleOpacity: (0, descriptor_1.unitsPercent)((_b = stroke.opacity) !== null && _b !== void 0 ? _b : 1), + strokeStyleContent: (0, descriptor_1.serializeVectorContent)(stroke.content || { type: 'color', color: { r: 0, g: 0, b: 0 } }).descriptor, + strokeStyleResolution: (_c = stroke.resolution) !== null && _c !== void 0 ? _c : 72, + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'strokeStyle', descriptor); +}); +addHandler('artb', // per-layer arboard info +hasKey('artboard'), function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + var rect = desc.artboardRect; + target.artboard = { + rect: { top: rect['Top '], left: rect.Left, bottom: rect.Btom, right: rect.Rght }, + guideIndices: desc.guideIndeces, + presetName: desc.artboardPresetName, + color: (0, descriptor_1.parseColor)(desc['Clr ']), + backgroundType: desc.artboardBackgroundType, + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a; + var artboard = target.artboard; + var rect = artboard.rect; + var desc = { + artboardRect: { 'Top ': rect.top, Left: rect.left, Btom: rect.bottom, Rght: rect.right }, + guideIndeces: artboard.guideIndices || [], + artboardPresetName: artboard.presetName || '', + 'Clr ': (0, descriptor_1.serializeColor)(artboard.color), + artboardBackgroundType: (_a = artboard.backgroundType) !== null && _a !== void 0 ? _a : 1, + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'artboard', desc); +}); +addHandler('sn2P', hasKey('usingAlignedRendering'), function (reader, target) { return target.usingAlignedRendering = !!(0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.usingAlignedRendering ? 1 : 0); }); +var placedLayerTypes = ['unknown', 'vector', 'raster', 'image stack']; +function parseWarp(warp) { + var _a, _b, _c, _d, _e, _f; + var result = { + style: descriptor_1.warpStyle.decode(warp.warpStyle), + value: warp.warpValue || 0, + perspective: warp.warpPerspective || 0, + perspectiveOther: warp.warpPerspectiveOther || 0, + rotate: descriptor_1.Ornt.decode(warp.warpRotate), + bounds: warp.bounds && { + top: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds['Top ']), + left: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds.Left), + bottom: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds.Btom), + right: (0, descriptor_1.parseUnitsOrNumber)(warp.bounds.Rght), + }, + uOrder: warp.uOrder, + vOrder: warp.vOrder, + }; + if (warp.deformNumRows != null || warp.deformNumCols != null) { + result.deformNumRows = warp.deformNumRows; + result.deformNumCols = warp.deformNumCols; + } + var envelopeWarp = warp.customEnvelopeWarp; + if (envelopeWarp) { + result.customEnvelopeWarp = { + meshPoints: [], + }; + var xs = ((_a = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Hrzn'; })) === null || _a === void 0 ? void 0 : _a.values) || []; + var ys = ((_b = envelopeWarp.meshPoints.find(function (i) { return i.type === 'Vrtc'; })) === null || _b === void 0 ? void 0 : _b.values) || []; + for (var i = 0; i < xs.length; i++) { + result.customEnvelopeWarp.meshPoints.push({ x: xs[i], y: ys[i] }); + } + if (envelopeWarp.quiltSliceX || envelopeWarp.quiltSliceY) { + result.customEnvelopeWarp.quiltSliceX = ((_d = (_c = envelopeWarp.quiltSliceX) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.values) || []; + result.customEnvelopeWarp.quiltSliceY = ((_f = (_e = envelopeWarp.quiltSliceY) === null || _e === void 0 ? void 0 : _e[0]) === null || _f === void 0 ? void 0 : _f.values) || []; + } + } + return result; +} +function isQuiltWarp(warp) { + var _a, _b; + return warp.deformNumCols != null || warp.deformNumRows != null || + ((_a = warp.customEnvelopeWarp) === null || _a === void 0 ? void 0 : _a.quiltSliceX) || ((_b = warp.customEnvelopeWarp) === null || _b === void 0 ? void 0 : _b.quiltSliceY); +} +function encodeWarp(warp) { + var bounds = warp.bounds; + var desc = { + warpStyle: descriptor_1.warpStyle.encode(warp.style), + warpValue: warp.value || 0, + warpPerspective: warp.perspective || 0, + warpPerspectiveOther: warp.perspectiveOther || 0, + warpRotate: descriptor_1.Ornt.encode(warp.rotate), + bounds: { + 'Top ': (0, descriptor_1.unitsValue)(bounds && bounds.top || { units: 'Pixels', value: 0 }, 'bounds.top'), + Left: (0, descriptor_1.unitsValue)(bounds && bounds.left || { units: 'Pixels', value: 0 }, 'bounds.left'), + Btom: (0, descriptor_1.unitsValue)(bounds && bounds.bottom || { units: 'Pixels', value: 0 }, 'bounds.bottom'), + Rght: (0, descriptor_1.unitsValue)(bounds && bounds.right || { units: 'Pixels', value: 0 }, 'bounds.right'), + }, + uOrder: warp.uOrder || 0, + vOrder: warp.vOrder || 0, + }; + var isQuilt = isQuiltWarp(warp); + if (isQuilt) { + var desc2 = desc; + desc2.deformNumRows = warp.deformNumRows || 0; + desc2.deformNumCols = warp.deformNumCols || 0; + } + var customEnvelopeWarp = warp.customEnvelopeWarp; + if (customEnvelopeWarp) { + var meshPoints = customEnvelopeWarp.meshPoints || []; + if (isQuilt) { + var desc2 = desc; + desc2.customEnvelopeWarp = { + quiltSliceX: [{ + type: 'quiltSliceX', + values: customEnvelopeWarp.quiltSliceX || [], + }], + quiltSliceY: [{ + type: 'quiltSliceY', + values: customEnvelopeWarp.quiltSliceY || [], + }], + meshPoints: [ + { type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) }, + { type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) }, + ], + }; + } + else { + desc.customEnvelopeWarp = { + meshPoints: [ + { type: 'Hrzn', values: meshPoints.map(function (p) { return p.x; }) }, + { type: 'Vrtc', values: meshPoints.map(function (p) { return p.y; }) }, + ], + }; + } + } + return desc; +} +addHandler('PlLd', hasKey('placedLayer'), function (reader, target, left) { + if ((0, psdReader_1.readSignature)(reader) !== 'plcL') + throw new Error("Invalid PlLd signature"); + if ((0, psdReader_1.readInt32)(reader) !== 3) + throw new Error("Invalid PlLd version"); + var id = (0, psdReader_1.readPascalString)(reader, 1); + var pageNumber = (0, psdReader_1.readInt32)(reader); + var totalPages = (0, psdReader_1.readInt32)(reader); // TODO: check how this works ? + (0, psdReader_1.readInt32)(reader); // anitAliasPolicy 16 + var placedLayerType = (0, psdReader_1.readInt32)(reader); // 0 = unknown, 1 = vector, 2 = raster, 3 = image stack + if (!placedLayerTypes[placedLayerType]) + throw new Error('Invalid PlLd type'); + var transform = []; + for (var i = 0; i < 8; i++) + transform.push((0, psdReader_1.readFloat64)(reader)); // x, y of 4 corners of the transform + var warpVersion = (0, psdReader_1.readInt32)(reader); + if (warpVersion !== 0) + throw new Error("Invalid Warp version ".concat(warpVersion)); + var warp = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.placedLayer = target.placedLayer || { + id: id, + type: placedLayerTypes[placedLayerType], + pageNumber: pageNumber, + totalPages: totalPages, + transform: transform, + warp: parseWarp(warp), + }; + // console.log('PlLd warp', require('util').inspect(warp, false, 99, true)); + // console.log('PlLd', require('util').inspect(target.placedLayer, false, 99, true)); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var placed = target.placedLayer; + (0, psdWriter_1.writeSignature)(writer, 'plcL'); + (0, psdWriter_1.writeInt32)(writer, 3); // version + (0, psdWriter_1.writePascalString)(writer, placed.id, 1); + (0, psdWriter_1.writeInt32)(writer, 1); // pageNumber + (0, psdWriter_1.writeInt32)(writer, 1); // totalPages + (0, psdWriter_1.writeInt32)(writer, 16); // anitAliasPolicy + if (placedLayerTypes.indexOf(placed.type) === -1) + throw new Error('Invalid placedLayer type'); + (0, psdWriter_1.writeInt32)(writer, placedLayerTypes.indexOf(placed.type)); + for (var i = 0; i < 8; i++) + (0, psdWriter_1.writeFloat64)(writer, placed.transform[i]); + (0, psdWriter_1.writeInt32)(writer, 0); // warp version + var isQuilt = placed.warp && isQuiltWarp(placed.warp); + var type = isQuilt ? 'quiltWarp' : 'warp'; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', type, encodeWarp(placed.warp || {}), type); +}); +addHandler('SoLd', hasKey('placedLayer'), function (reader, target, left) { + if ((0, psdReader_1.readSignature)(reader) !== 'soLD') + throw new Error("Invalid SoLd type"); + if ((0, psdReader_1.readInt32)(reader) !== 4) + throw new Error("Invalid SoLd version"); + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log('SoLd', require('util').inspect(desc, false, 99, true)); + // console.log('SoLd.warp', require('util').inspect(desc.warp, false, 99, true)); + // console.log('SoLd.quiltWarp', require('util').inspect(desc.quiltWarp, false, 99, true)); + target.placedLayer = { + id: desc.Idnt, + placed: desc.placed, + type: placedLayerTypes[desc.Type], + pageNumber: desc.PgNm, + totalPages: desc.totalPages, + frameStep: desc.frameStep, + duration: desc.duration, + frameCount: desc.frameCount, + transform: desc.Trnf, + width: desc['Sz '].Wdth, + height: desc['Sz '].Hght, + resolution: (0, descriptor_1.parseUnits)(desc.Rslt), + warp: parseWarp((desc.quiltWarp || desc.warp)), + }; + if (desc.nonAffineTransform && desc.nonAffineTransform.some(function (x, i) { return x !== desc.Trnf[i]; })) { + target.placedLayer.nonAffineTransform = desc.nonAffineTransform; + } + if (desc.Crop) + target.placedLayer.crop = desc.Crop; + if (desc.comp) + target.placedLayer.comp = desc.comp; + if (desc.compInfo) + target.placedLayer.compInfo = desc.compInfo; + (0, psdReader_1.skipBytes)(reader, left()); // HACK +}, function (writer, target) { + var _a, _b; + (0, psdWriter_1.writeSignature)(writer, 'soLD'); + (0, psdWriter_1.writeInt32)(writer, 4); // version + var placed = target.placedLayer; + var desc = __assign(__assign({ Idnt: placed.id, placed: (_a = placed.placed) !== null && _a !== void 0 ? _a : placed.id, PgNm: placed.pageNumber || 1, totalPages: placed.totalPages || 1 }, (placed.crop ? { Crop: placed.crop } : {})), { frameStep: placed.frameStep || { numerator: 0, denominator: 600 }, duration: placed.duration || { numerator: 0, denominator: 600 }, frameCount: placed.frameCount || 0, Annt: 16, Type: placedLayerTypes.indexOf(placed.type), Trnf: placed.transform, nonAffineTransform: (_b = placed.nonAffineTransform) !== null && _b !== void 0 ? _b : placed.transform, quiltWarp: {}, warp: encodeWarp(placed.warp || {}), 'Sz ': { + Wdth: placed.width || 0, + Hght: placed.height || 0, // TODO: find size ? + }, Rslt: placed.resolution ? (0, descriptor_1.unitsValue)(placed.resolution, 'resolution') : { units: 'Density', value: 72 } }); + if (placed.warp && isQuiltWarp(placed.warp)) { + var quiltWarp = encodeWarp(placed.warp); + desc.quiltWarp = quiltWarp; + desc.warp = { + warpStyle: 'warpStyle.warpNone', + warpValue: quiltWarp.warpValue, + warpPerspective: quiltWarp.warpPerspective, + warpPerspectiveOther: quiltWarp.warpPerspectiveOther, + warpRotate: quiltWarp.warpRotate, + bounds: quiltWarp.bounds, + uOrder: quiltWarp.uOrder, + vOrder: quiltWarp.vOrder, + }; + } + else { + delete desc.quiltWarp; + } + if (placed.comp) + desc.comp = placed.comp; + if (placed.compInfo) + desc.compInfo = placed.compInfo; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, desc.quiltWarp ? 'quiltWarp' : 'warp'); +}); +addHandler('fxrp', hasKey('referencePoint'), function (reader, target) { + target.referencePoint = { + x: (0, psdReader_1.readFloat64)(reader), + y: (0, psdReader_1.readFloat64)(reader), + }; +}, function (writer, target) { + (0, psdWriter_1.writeFloat64)(writer, target.referencePoint.x); + (0, psdWriter_1.writeFloat64)(writer, target.referencePoint.y); +}); +if (helpers_1.MOCK_HANDLERS) { + addHandler('Patt', function (target) { return target._Patt !== undefined; }, function (reader, target, left) { + // console.log('additional info: Patt'); + target._Patt = (0, psdReader_1.readBytes)(reader, left()); + }, function (writer, target) { return false && (0, psdWriter_1.writeBytes)(writer, target._Patt); }); +} +else { + addHandler('Patt', // TODO: handle also Pat2 & Pat3 + function (// TODO: handle also Pat2 & Pat3 + target) { return !target; }, function (reader, target, left) { + if (!left()) + return; + (0, psdReader_1.skipBytes)(reader, left()); + return; // not supported yet + target; + psdReader_1.readPattern; + // if (!target.patterns) target.patterns = []; + // target.patterns.push(readPattern(reader)); + // skipBytes(reader, left()); + }, function (_writer, _target) { + }); +} +function readRect(reader) { + var top = (0, psdReader_1.readInt32)(reader); + var left = (0, psdReader_1.readInt32)(reader); + var bottom = (0, psdReader_1.readInt32)(reader); + var right = (0, psdReader_1.readInt32)(reader); + return { top: top, left: left, bottom: bottom, right: right }; +} +function writeRect(writer, rect) { + (0, psdWriter_1.writeInt32)(writer, rect.top); + (0, psdWriter_1.writeInt32)(writer, rect.left); + (0, psdWriter_1.writeInt32)(writer, rect.bottom); + (0, psdWriter_1.writeInt32)(writer, rect.right); +} +addHandler('Anno', function (target) { return target.annotations !== undefined; }, function (reader, target, left) { + var major = (0, psdReader_1.readUint16)(reader); + var minor = (0, psdReader_1.readUint16)(reader); + if (major !== 2 || minor !== 1) + throw new Error('Invalid Anno version'); + var count = (0, psdReader_1.readUint32)(reader); + var annotations = []; + for (var i = 0; i < count; i++) { + /*const length =*/ (0, psdReader_1.readUint32)(reader); + var type = (0, psdReader_1.readSignature)(reader); + var open_1 = !!(0, psdReader_1.readUint8)(reader); + /*const flags =*/ (0, psdReader_1.readUint8)(reader); // always 28 + /*const optionalBlocks =*/ (0, psdReader_1.readUint16)(reader); + var iconLocation = readRect(reader); + var popupLocation = readRect(reader); + var color = (0, psdReader_1.readColor)(reader); + var author = (0, psdReader_1.readPascalString)(reader, 2); + var name_1 = (0, psdReader_1.readPascalString)(reader, 2); + var date = (0, psdReader_1.readPascalString)(reader, 2); + /*const contentLength =*/ (0, psdReader_1.readUint32)(reader); + /*const dataType =*/ (0, psdReader_1.readSignature)(reader); + var dataLength = (0, psdReader_1.readUint32)(reader); + var data = void 0; + if (type === 'txtA') { + if (dataLength >= 2 && (0, psdReader_1.readUint16)(reader) === 0xfeff) { + data = (0, psdReader_1.readUnicodeStringWithLength)(reader, (dataLength - 2) / 2); + } + else { + reader.offset -= 2; + data = (0, psdReader_1.readAsciiString)(reader, dataLength); + } + data = data.replace(/\r/g, '\n'); + } + else if (type === 'sndA') { + data = (0, psdReader_1.readBytes)(reader, dataLength); + } + else { + throw new Error('Unknown annotation type'); + } + annotations.push({ + type: type === 'txtA' ? 'text' : 'sound', + open: open_1, + iconLocation: iconLocation, + popupLocation: popupLocation, + color: color, + author: author, + name: name_1, + date: date, + data: data, + }); + } + target.annotations = annotations; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var annotations = target.annotations; + (0, psdWriter_1.writeUint16)(writer, 2); + (0, psdWriter_1.writeUint16)(writer, 1); + (0, psdWriter_1.writeUint32)(writer, annotations.length); + for (var _i = 0, annotations_1 = annotations; _i < annotations_1.length; _i++) { + var annotation = annotations_1[_i]; + var sound = annotation.type === 'sound'; + if (sound && !(annotation.data instanceof Uint8Array)) + throw new Error('Sound annotation data should be Uint8Array'); + if (!sound && typeof annotation.data !== 'string') + throw new Error('Text annotation data should be string'); + var lengthOffset = writer.offset; + (0, psdWriter_1.writeUint32)(writer, 0); // length + (0, psdWriter_1.writeSignature)(writer, sound ? 'sndA' : 'txtA'); + (0, psdWriter_1.writeUint8)(writer, annotation.open ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, 28); + (0, psdWriter_1.writeUint16)(writer, 1); + writeRect(writer, annotation.iconLocation); + writeRect(writer, annotation.popupLocation); + (0, psdWriter_1.writeColor)(writer, annotation.color); + (0, psdWriter_1.writePascalString)(writer, annotation.author || '', 2); + (0, psdWriter_1.writePascalString)(writer, annotation.name || '', 2); + (0, psdWriter_1.writePascalString)(writer, annotation.date || '', 2); + var contentOffset = writer.offset; + (0, psdWriter_1.writeUint32)(writer, 0); // content length + (0, psdWriter_1.writeSignature)(writer, sound ? 'sndM' : 'txtC'); + (0, psdWriter_1.writeUint32)(writer, 0); // data length + var dataOffset = writer.offset; + if (sound) { + (0, psdWriter_1.writeBytes)(writer, annotation.data); + } + else { + (0, psdWriter_1.writeUint16)(writer, 0xfeff); // unicode string indicator + var text = annotation.data.replace(/\n/g, '\r'); + for (var i = 0; i < text.length; i++) + (0, psdWriter_1.writeUint16)(writer, text.charCodeAt(i)); + } + writer.view.setUint32(lengthOffset, writer.offset - lengthOffset, false); + writer.view.setUint32(contentOffset, writer.offset - contentOffset, false); + writer.view.setUint32(dataOffset - 4, writer.offset - dataOffset, false); + } +}); +addHandler('lnk2', function (target) { return !!target.linkedFiles && target.linkedFiles.length > 0; }, function (reader, target, left, _, options) { + var psd = target; + psd.linkedFiles = []; + while (left() > 8) { + var size = readLength64(reader); // size + var startOffset = reader.offset; + var type = (0, psdReader_1.readSignature)(reader); + var version = (0, psdReader_1.readInt32)(reader); + var id = (0, psdReader_1.readPascalString)(reader, 1); + var name_2 = (0, psdReader_1.readUnicodeString)(reader); + var fileType = (0, psdReader_1.readSignature)(reader).trim(); // ' ' if empty + var fileCreator = (0, psdReader_1.readSignature)(reader).trim(); // ' ' or '\0\0\0\0' if empty + var dataSize = readLength64(reader); + var hasFileOpenDescriptor = (0, psdReader_1.readUint8)(reader); + var fileOpenDescriptor = hasFileOpenDescriptor ? (0, descriptor_1.readVersionAndDescriptor)(reader) : undefined; + var linkedFileDescriptor = type === 'liFE' ? (0, descriptor_1.readVersionAndDescriptor)(reader) : undefined; + var file = { id: id, name: name_2, data: undefined }; + if (fileType) + file.type = fileType; + if (fileCreator) + file.creator = fileCreator; + if (fileOpenDescriptor) + file.descriptor = fileOpenDescriptor; + if (type === 'liFE' && version > 3) { + var year = (0, psdReader_1.readInt32)(reader); + var month = (0, psdReader_1.readUint8)(reader); + var day = (0, psdReader_1.readUint8)(reader); + var hour = (0, psdReader_1.readUint8)(reader); + var minute = (0, psdReader_1.readUint8)(reader); + var seconds = (0, psdReader_1.readFloat64)(reader); + var wholeSeconds = Math.floor(seconds); + var ms = (seconds - wholeSeconds) * 1000; + file.time = new Date(year, month, day, hour, minute, wholeSeconds, ms); + } + var fileSize = type === 'liFE' ? readLength64(reader) : 0; + if (type === 'liFA') + (0, psdReader_1.skipBytes)(reader, 8); + if (type === 'liFD') + file.data = (0, psdReader_1.readBytes)(reader, dataSize); + if (version >= 5) + file.childDocumentID = (0, psdReader_1.readUnicodeString)(reader); + if (version >= 6) + file.assetModTime = (0, psdReader_1.readFloat64)(reader); + if (version >= 7) + file.assetLockedState = (0, psdReader_1.readUint8)(reader); + if (type === 'liFE') + file.data = (0, psdReader_1.readBytes)(reader, fileSize); + if (options.skipLinkedFilesData) + file.data = undefined; + psd.linkedFiles.push(file); + linkedFileDescriptor; + while (size % 4) + size++; + reader.offset = startOffset + size; + } + (0, psdReader_1.skipBytes)(reader, left()); // ? +}, function (writer, target) { + var psd = target; + for (var _i = 0, _a = psd.linkedFiles; _i < _a.length; _i++) { + var file = _a[_i]; + var version = 2; + if (file.assetLockedState != null) + version = 7; + else if (file.assetModTime != null) + version = 6; + else if (file.childDocumentID != null) + version = 5; + // TODO: else if (file.time != null) version = 3; (only for liFE) + (0, psdWriter_1.writeUint32)(writer, 0); + (0, psdWriter_1.writeUint32)(writer, 0); // size + var sizeOffset = writer.offset; + (0, psdWriter_1.writeSignature)(writer, file.data ? 'liFD' : 'liFA'); + (0, psdWriter_1.writeInt32)(writer, version); + (0, psdWriter_1.writePascalString)(writer, file.id || '', 1); + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, file.name || ''); + (0, psdWriter_1.writeSignature)(writer, file.type ? "".concat(file.type, " ").substring(0, 4) : ' '); + (0, psdWriter_1.writeSignature)(writer, file.creator ? "".concat(file.creator, " ").substring(0, 4) : '\0\0\0\0'); + writeLength64(writer, file.data ? file.data.byteLength : 0); + if (file.descriptor && file.descriptor.compInfo) { + var desc = { + compInfo: file.descriptor.compInfo, + }; + (0, psdWriter_1.writeUint8)(writer, 1); + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + } + else { + (0, psdWriter_1.writeUint8)(writer, 0); + } + if (file.data) + (0, psdWriter_1.writeBytes)(writer, file.data); + else + writeLength64(writer, 0); + if (version >= 5) + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, file.childDocumentID || ''); + if (version >= 6) + (0, psdWriter_1.writeFloat64)(writer, file.assetModTime || 0); + if (version >= 7) + (0, psdWriter_1.writeUint8)(writer, file.assetLockedState || 0); + var size = writer.offset - sizeOffset; + writer.view.setUint32(sizeOffset - 4, size, false); // write size + while (size % 4) { + size++; + (0, psdWriter_1.writeUint8)(writer, 0); + } + } +}); +addHandlerAlias('lnkD', 'lnk2'); +addHandlerAlias('lnk3', 'lnk2'); +// this seems to just be zero size block, ignore it +addHandler('lnkE', function (target) { return target._lnkE !== undefined; }, function (reader, target, left, _psds, options) { + if (options.logMissingFeatures && left()) { + console.log("Non-empty lnkE layer info (".concat(left(), " bytes)")); + } + if (helpers_1.MOCK_HANDLERS) { + target._lnkE = (0, psdReader_1.readBytes)(reader, left()); + } +}, function (writer, target) { return helpers_1.MOCK_HANDLERS && (0, psdWriter_1.writeBytes)(writer, target._lnkE); }); +addHandler('pths', hasKey('pathList'), function (reader, target) { + var descriptor = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.pathList = []; // TODO: read paths (find example with non-empty list) + descriptor; + // console.log('pths', descriptor); // TODO: remove this +}, function (writer, _target) { + var descriptor = { + pathList: [], // TODO: write paths + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'pathsDataClass', descriptor); +}); +addHandler('lyvr', hasKey('version'), function (reader, target) { return target.version = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.version); }); +function adjustmentType(type) { + return function (target) { return !!target.adjustment && target.adjustment.type === type; }; +} +addHandler('brit', adjustmentType('brightness/contrast'), function (reader, target, left) { + if (!target.adjustment) { // ignore if got one from CgEd block + target.adjustment = { + type: 'brightness/contrast', + brightness: (0, psdReader_1.readInt16)(reader), + contrast: (0, psdReader_1.readInt16)(reader), + meanValue: (0, psdReader_1.readInt16)(reader), + labColorOnly: !!(0, psdReader_1.readUint8)(reader), + useLegacy: true, + }; + } + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a; + var info = target.adjustment; + (0, psdWriter_1.writeInt16)(writer, info.brightness || 0); + (0, psdWriter_1.writeInt16)(writer, info.contrast || 0); + (0, psdWriter_1.writeInt16)(writer, (_a = info.meanValue) !== null && _a !== void 0 ? _a : 127); + (0, psdWriter_1.writeUint8)(writer, info.labColorOnly ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 1); +}); +function readLevelsChannel(reader) { + var shadowInput = (0, psdReader_1.readInt16)(reader); + var highlightInput = (0, psdReader_1.readInt16)(reader); + var shadowOutput = (0, psdReader_1.readInt16)(reader); + var highlightOutput = (0, psdReader_1.readInt16)(reader); + var midtoneInput = (0, psdReader_1.readInt16)(reader) / 100; + return { shadowInput: shadowInput, highlightInput: highlightInput, shadowOutput: shadowOutput, highlightOutput: highlightOutput, midtoneInput: midtoneInput }; +} +function writeLevelsChannel(writer, channel) { + (0, psdWriter_1.writeInt16)(writer, channel.shadowInput); + (0, psdWriter_1.writeInt16)(writer, channel.highlightInput); + (0, psdWriter_1.writeInt16)(writer, channel.shadowOutput); + (0, psdWriter_1.writeInt16)(writer, channel.highlightOutput); + (0, psdWriter_1.writeInt16)(writer, Math.round(channel.midtoneInput * 100)); +} +addHandler('levl', adjustmentType('levels'), function (reader, target, left) { + if ((0, psdReader_1.readUint16)(reader) !== 2) + throw new Error('Invalid levl version'); + target.adjustment = __assign(__assign({}, target.adjustment), { type: 'levels', rgb: readLevelsChannel(reader), red: readLevelsChannel(reader), green: readLevelsChannel(reader), blue: readLevelsChannel(reader) }); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var defaultChannel = { + shadowInput: 0, + highlightInput: 255, + shadowOutput: 0, + highlightOutput: 255, + midtoneInput: 1, + }; + (0, psdWriter_1.writeUint16)(writer, 2); // version + writeLevelsChannel(writer, info.rgb || defaultChannel); + writeLevelsChannel(writer, info.red || defaultChannel); + writeLevelsChannel(writer, info.blue || defaultChannel); + writeLevelsChannel(writer, info.green || defaultChannel); + for (var i = 0; i < 59; i++) + writeLevelsChannel(writer, defaultChannel); +}); +function readCurveChannel(reader) { + var nodes = (0, psdReader_1.readUint16)(reader); + var channel = []; + for (var j = 0; j < nodes; j++) { + var output = (0, psdReader_1.readInt16)(reader); + var input = (0, psdReader_1.readInt16)(reader); + channel.push({ input: input, output: output }); + } + return channel; +} +function writeCurveChannel(writer, channel) { + (0, psdWriter_1.writeUint16)(writer, channel.length); + for (var _i = 0, channel_1 = channel; _i < channel_1.length; _i++) { + var n = channel_1[_i]; + (0, psdWriter_1.writeUint16)(writer, n.output); + (0, psdWriter_1.writeUint16)(writer, n.input); + } +} +addHandler('curv', adjustmentType('curves'), function (reader, target, left) { + (0, psdReader_1.readUint8)(reader); + if ((0, psdReader_1.readUint16)(reader) !== 1) + throw new Error('Invalid curv version'); + (0, psdReader_1.readUint16)(reader); + var channels = (0, psdReader_1.readUint16)(reader); + var info = { type: 'curves' }; + if (channels & 1) + info.rgb = readCurveChannel(reader); + if (channels & 2) + info.red = readCurveChannel(reader); + if (channels & 4) + info.green = readCurveChannel(reader); + if (channels & 8) + info.blue = readCurveChannel(reader); + target.adjustment = __assign(__assign({}, target.adjustment), info); + // ignoring, duplicate information + // checkSignature(reader, 'Crv '); + // const cVersion = readUint16(reader); + // readUint16(reader); + // const channelCount = readUint16(reader); + // for (let i = 0; i < channelCount; i++) { + // const index = readUint16(reader); + // const nodes = readUint16(reader); + // for (let j = 0; j < nodes; j++) { + // const output = readInt16(reader); + // const input = readInt16(reader); + // } + // } + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var rgb = info.rgb, red = info.red, green = info.green, blue = info.blue; + var channels = 0; + var channelCount = 0; + if (rgb && rgb.length) { + channels |= 1; + channelCount++; + } + if (red && red.length) { + channels |= 2; + channelCount++; + } + if (green && green.length) { + channels |= 4; + channelCount++; + } + if (blue && blue.length) { + channels |= 8; + channelCount++; + } + (0, psdWriter_1.writeUint8)(writer, 0); + (0, psdWriter_1.writeUint16)(writer, 1); // version + (0, psdWriter_1.writeUint16)(writer, 0); + (0, psdWriter_1.writeUint16)(writer, channels); + if (rgb && rgb.length) + writeCurveChannel(writer, rgb); + if (red && red.length) + writeCurveChannel(writer, red); + if (green && green.length) + writeCurveChannel(writer, green); + if (blue && blue.length) + writeCurveChannel(writer, blue); + (0, psdWriter_1.writeSignature)(writer, 'Crv '); + (0, psdWriter_1.writeUint16)(writer, 4); // version + (0, psdWriter_1.writeUint16)(writer, 0); + (0, psdWriter_1.writeUint16)(writer, channelCount); + if (rgb && rgb.length) { + (0, psdWriter_1.writeUint16)(writer, 0); + writeCurveChannel(writer, rgb); + } + if (red && red.length) { + (0, psdWriter_1.writeUint16)(writer, 1); + writeCurveChannel(writer, red); + } + if (green && green.length) { + (0, psdWriter_1.writeUint16)(writer, 2); + writeCurveChannel(writer, green); + } + if (blue && blue.length) { + (0, psdWriter_1.writeUint16)(writer, 3); + writeCurveChannel(writer, blue); + } + (0, psdWriter_1.writeZeros)(writer, 2); +}); +addHandler('expA', adjustmentType('exposure'), function (reader, target, left) { + if ((0, psdReader_1.readUint16)(reader) !== 1) + throw new Error('Invalid expA version'); + target.adjustment = __assign(__assign({}, target.adjustment), { type: 'exposure', exposure: (0, psdReader_1.readFloat32)(reader), offset: (0, psdReader_1.readFloat32)(reader), gamma: (0, psdReader_1.readFloat32)(reader) }); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, 1); // version + (0, psdWriter_1.writeFloat32)(writer, info.exposure); + (0, psdWriter_1.writeFloat32)(writer, info.offset); + (0, psdWriter_1.writeFloat32)(writer, info.gamma); + (0, psdWriter_1.writeZeros)(writer, 2); +}); +addHandler('vibA', adjustmentType('vibrance'), function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.adjustment = { type: 'vibrance' }; + if (desc.vibrance !== undefined) + target.adjustment.vibrance = desc.vibrance; + if (desc.Strt !== undefined) + target.adjustment.saturation = desc.Strt; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var desc = {}; + if (info.vibrance !== undefined) + desc.vibrance = info.vibrance; + if (info.saturation !== undefined) + desc.Strt = info.saturation; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +function readHueChannel(reader) { + return { + a: (0, psdReader_1.readInt16)(reader), + b: (0, psdReader_1.readInt16)(reader), + c: (0, psdReader_1.readInt16)(reader), + d: (0, psdReader_1.readInt16)(reader), + hue: (0, psdReader_1.readInt16)(reader), + saturation: (0, psdReader_1.readInt16)(reader), + lightness: (0, psdReader_1.readInt16)(reader), + }; +} +function writeHueChannel(writer, channel) { + var c = channel || {}; + (0, psdWriter_1.writeInt16)(writer, c.a || 0); + (0, psdWriter_1.writeInt16)(writer, c.b || 0); + (0, psdWriter_1.writeInt16)(writer, c.c || 0); + (0, psdWriter_1.writeInt16)(writer, c.d || 0); + (0, psdWriter_1.writeInt16)(writer, c.hue || 0); + (0, psdWriter_1.writeInt16)(writer, c.saturation || 0); + (0, psdWriter_1.writeInt16)(writer, c.lightness || 0); +} +addHandler('hue2', adjustmentType('hue/saturation'), function (reader, target, left) { + if ((0, psdReader_1.readUint16)(reader) !== 2) + throw new Error('Invalid hue2 version'); + target.adjustment = __assign(__assign({}, target.adjustment), { type: 'hue/saturation', master: readHueChannel(reader), reds: readHueChannel(reader), yellows: readHueChannel(reader), greens: readHueChannel(reader), cyans: readHueChannel(reader), blues: readHueChannel(reader), magentas: readHueChannel(reader) }); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, 2); // version + writeHueChannel(writer, info.master); + writeHueChannel(writer, info.reds); + writeHueChannel(writer, info.yellows); + writeHueChannel(writer, info.greens); + writeHueChannel(writer, info.cyans); + writeHueChannel(writer, info.blues); + writeHueChannel(writer, info.magentas); +}); +function readColorBalance(reader) { + return { + cyanRed: (0, psdReader_1.readInt16)(reader), + magentaGreen: (0, psdReader_1.readInt16)(reader), + yellowBlue: (0, psdReader_1.readInt16)(reader), + }; +} +function writeColorBalance(writer, value) { + (0, psdWriter_1.writeInt16)(writer, value.cyanRed || 0); + (0, psdWriter_1.writeInt16)(writer, value.magentaGreen || 0); + (0, psdWriter_1.writeInt16)(writer, value.yellowBlue || 0); +} +addHandler('blnc', adjustmentType('color balance'), function (reader, target, left) { + target.adjustment = { + type: 'color balance', + shadows: readColorBalance(reader), + midtones: readColorBalance(reader), + highlights: readColorBalance(reader), + preserveLuminosity: !!(0, psdReader_1.readUint8)(reader), + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + writeColorBalance(writer, info.shadows || {}); + writeColorBalance(writer, info.midtones || {}); + writeColorBalance(writer, info.highlights || {}); + (0, psdWriter_1.writeUint8)(writer, info.preserveLuminosity ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 1); +}); +addHandler('blwh', adjustmentType('black & white'), function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.adjustment = { + type: 'black & white', + reds: desc['Rd '], + yellows: desc.Yllw, + greens: desc['Grn '], + cyans: desc['Cyn '], + blues: desc['Bl '], + magentas: desc.Mgnt, + useTint: !!desc.useTint, + presetKind: desc.bwPresetKind, + presetFileName: desc.blackAndWhitePresetFileName, + }; + if (desc.tintColor !== undefined) + target.adjustment.tintColor = (0, descriptor_1.parseColor)(desc.tintColor); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var desc = { + 'Rd ': info.reds || 0, + Yllw: info.yellows || 0, + 'Grn ': info.greens || 0, + 'Cyn ': info.cyans || 0, + 'Bl ': info.blues || 0, + Mgnt: info.magentas || 0, + useTint: !!info.useTint, + tintColor: (0, descriptor_1.serializeColor)(info.tintColor), + bwPresetKind: info.presetKind || 0, + blackAndWhitePresetFileName: info.presetFileName || '', + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler('phfl', adjustmentType('photo filter'), function (reader, target, left) { + var version = (0, psdReader_1.readUint16)(reader); + if (version !== 2 && version !== 3) + throw new Error('Invalid phfl version'); + var color; + if (version === 2) { + color = (0, psdReader_1.readColor)(reader); + } + else { // version 3 + // TODO: test this, this is probably wrong + color = { + l: (0, psdReader_1.readInt32)(reader) / 100, + a: (0, psdReader_1.readInt32)(reader) / 100, + b: (0, psdReader_1.readInt32)(reader) / 100, + }; + } + target.adjustment = { + type: 'photo filter', + color: color, + density: (0, psdReader_1.readUint32)(reader) / 100, + preserveLuminosity: !!(0, psdReader_1.readUint8)(reader), + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, 2); // version + (0, psdWriter_1.writeColor)(writer, info.color || { l: 0, a: 0, b: 0 }); + (0, psdWriter_1.writeUint32)(writer, (info.density || 0) * 100); + (0, psdWriter_1.writeUint8)(writer, info.preserveLuminosity ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 3); +}); +function readMixrChannel(reader) { + var red = (0, psdReader_1.readInt16)(reader); + var green = (0, psdReader_1.readInt16)(reader); + var blue = (0, psdReader_1.readInt16)(reader); + (0, psdReader_1.skipBytes)(reader, 2); + var constant = (0, psdReader_1.readInt16)(reader); + return { red: red, green: green, blue: blue, constant: constant }; +} +function writeMixrChannel(writer, channel) { + var c = channel || {}; + (0, psdWriter_1.writeInt16)(writer, c.red); + (0, psdWriter_1.writeInt16)(writer, c.green); + (0, psdWriter_1.writeInt16)(writer, c.blue); + (0, psdWriter_1.writeZeros)(writer, 2); + (0, psdWriter_1.writeInt16)(writer, c.constant); +} +addHandler('mixr', adjustmentType('channel mixer'), function (reader, target, left) { + if ((0, psdReader_1.readUint16)(reader) !== 1) + throw new Error('Invalid mixr version'); + var adjustment = target.adjustment = __assign(__assign({}, target.adjustment), { type: 'channel mixer', monochrome: !!(0, psdReader_1.readUint16)(reader) }); + if (!adjustment.monochrome) { + adjustment.red = readMixrChannel(reader); + adjustment.green = readMixrChannel(reader); + adjustment.blue = readMixrChannel(reader); + } + adjustment.gray = readMixrChannel(reader); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, 1); // version + (0, psdWriter_1.writeUint16)(writer, info.monochrome ? 1 : 0); + if (info.monochrome) { + writeMixrChannel(writer, info.gray); + (0, psdWriter_1.writeZeros)(writer, 3 * 5 * 2); + } + else { + writeMixrChannel(writer, info.red); + writeMixrChannel(writer, info.green); + writeMixrChannel(writer, info.blue); + writeMixrChannel(writer, info.gray); + } +}); +var colorLookupType = (0, helpers_1.createEnum)('colorLookupType', '3DLUT', { + '3dlut': '3DLUT', + abstractProfile: 'abstractProfile', + deviceLinkProfile: 'deviceLinkProfile', +}); +var LUTFormatType = (0, helpers_1.createEnum)('LUTFormatType', 'look', { + look: 'LUTFormatLOOK', + cube: 'LUTFormatCUBE', + '3dl': 'LUTFormat3DL', +}); +var colorLookupOrder = (0, helpers_1.createEnum)('colorLookupOrder', 'rgb', { + rgb: 'rgbOrder', + bgr: 'bgrOrder', +}); +addHandler('clrL', adjustmentType('color lookup'), function (reader, target, left) { + if ((0, psdReader_1.readUint16)(reader) !== 1) + throw new Error('Invalid clrL version'); + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.adjustment = { type: 'color lookup' }; + var info = target.adjustment; + if (desc.lookupType !== undefined) + info.lookupType = colorLookupType.decode(desc.lookupType); + if (desc['Nm '] !== undefined) + info.name = desc['Nm ']; + if (desc.Dthr !== undefined) + info.dither = desc.Dthr; + if (desc.profile !== undefined) + info.profile = desc.profile; + if (desc.LUTFormat !== undefined) + info.lutFormat = LUTFormatType.decode(desc.LUTFormat); + if (desc.dataOrder !== undefined) + info.dataOrder = colorLookupOrder.decode(desc.dataOrder); + if (desc.tableOrder !== undefined) + info.tableOrder = colorLookupOrder.decode(desc.tableOrder); + if (desc.LUT3DFileData !== undefined) + info.lut3DFileData = desc.LUT3DFileData; + if (desc.LUT3DFileName !== undefined) + info.lut3DFileName = desc.LUT3DFileName; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var info = target.adjustment; + var desc = {}; + if (info.lookupType !== undefined) + desc.lookupType = colorLookupType.encode(info.lookupType); + if (info.name !== undefined) + desc['Nm '] = info.name; + if (info.dither !== undefined) + desc.Dthr = info.dither; + if (info.profile !== undefined) + desc.profile = info.profile; + if (info.lutFormat !== undefined) + desc.LUTFormat = LUTFormatType.encode(info.lutFormat); + if (info.dataOrder !== undefined) + desc.dataOrder = colorLookupOrder.encode(info.dataOrder); + if (info.tableOrder !== undefined) + desc.tableOrder = colorLookupOrder.encode(info.tableOrder); + if (info.lut3DFileData !== undefined) + desc.LUT3DFileData = info.lut3DFileData; + if (info.lut3DFileName !== undefined) + desc.LUT3DFileName = info.lut3DFileName; + (0, psdWriter_1.writeUint16)(writer, 1); // version + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler('nvrt', adjustmentType('invert'), function (reader, target, left) { + target.adjustment = { type: 'invert' }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function () { + // nothing to write here +}); +addHandler('post', adjustmentType('posterize'), function (reader, target, left) { + target.adjustment = { + type: 'posterize', + levels: (0, psdReader_1.readUint16)(reader), + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a; + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, (_a = info.levels) !== null && _a !== void 0 ? _a : 4); + (0, psdWriter_1.writeZeros)(writer, 2); +}); +addHandler('thrs', adjustmentType('threshold'), function (reader, target, left) { + target.adjustment = { + type: 'threshold', + level: (0, psdReader_1.readUint16)(reader), + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a; + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, (_a = info.level) !== null && _a !== void 0 ? _a : 128); + (0, psdWriter_1.writeZeros)(writer, 2); +}); +var grdmColorModels = ['', '', '', 'rgb', 'hsb', '', 'lab']; +addHandler('grdm', adjustmentType('gradient map'), function (reader, target, left) { + if ((0, psdReader_1.readUint16)(reader) !== 1) + throw new Error('Invalid grdm version'); + var info = { + type: 'gradient map', + gradientType: 'solid', + }; + info.reverse = !!(0, psdReader_1.readUint8)(reader); + info.dither = !!(0, psdReader_1.readUint8)(reader); + info.name = (0, psdReader_1.readUnicodeString)(reader); + info.colorStops = []; + info.opacityStops = []; + var stopsCount = (0, psdReader_1.readUint16)(reader); + for (var i = 0; i < stopsCount; i++) { + info.colorStops.push({ + location: (0, psdReader_1.readUint32)(reader), + midpoint: (0, psdReader_1.readUint32)(reader) / 100, + color: (0, psdReader_1.readColor)(reader), + }); + (0, psdReader_1.skipBytes)(reader, 2); + } + var opacityStopsCount = (0, psdReader_1.readUint16)(reader); + for (var i = 0; i < opacityStopsCount; i++) { + info.opacityStops.push({ + location: (0, psdReader_1.readUint32)(reader), + midpoint: (0, psdReader_1.readUint32)(reader) / 100, + opacity: (0, psdReader_1.readUint16)(reader) / 0xff, + }); + } + var expansionCount = (0, psdReader_1.readUint16)(reader); + if (expansionCount !== 2) + throw new Error('Invalid grdm expansion count'); + var interpolation = (0, psdReader_1.readUint16)(reader); + info.smoothness = interpolation / 4096; + var length = (0, psdReader_1.readUint16)(reader); + if (length !== 32) + throw new Error('Invalid grdm length'); + info.gradientType = (0, psdReader_1.readUint16)(reader) ? 'noise' : 'solid'; + info.randomSeed = (0, psdReader_1.readUint32)(reader); + info.addTransparency = !!(0, psdReader_1.readUint16)(reader); + info.restrictColors = !!(0, psdReader_1.readUint16)(reader); + info.roughness = (0, psdReader_1.readUint32)(reader) / 4096; + info.colorModel = (grdmColorModels[(0, psdReader_1.readUint16)(reader)] || 'rgb'); + info.min = [ + (0, psdReader_1.readUint16)(reader) / 0x8000, + (0, psdReader_1.readUint16)(reader) / 0x8000, + (0, psdReader_1.readUint16)(reader) / 0x8000, + (0, psdReader_1.readUint16)(reader) / 0x8000, + ]; + info.max = [ + (0, psdReader_1.readUint16)(reader) / 0x8000, + (0, psdReader_1.readUint16)(reader) / 0x8000, + (0, psdReader_1.readUint16)(reader) / 0x8000, + (0, psdReader_1.readUint16)(reader) / 0x8000, + ]; + (0, psdReader_1.skipBytes)(reader, left()); + for (var _i = 0, _a = info.colorStops; _i < _a.length; _i++) { + var s = _a[_i]; + s.location /= interpolation; + } + for (var _b = 0, _c = info.opacityStops; _b < _c.length; _b++) { + var s = _c[_b]; + s.location /= interpolation; + } + target.adjustment = info; +}, function (writer, target) { + var _a, _b, _c; + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, 1); // version + (0, psdWriter_1.writeUint8)(writer, info.reverse ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, info.dither ? 1 : 0); + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, info.name || ''); + (0, psdWriter_1.writeUint16)(writer, info.colorStops && info.colorStops.length || 0); + var interpolation = Math.round(((_a = info.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096); + for (var _i = 0, _d = info.colorStops || []; _i < _d.length; _i++) { + var s = _d[_i]; + (0, psdWriter_1.writeUint32)(writer, Math.round(s.location * interpolation)); + (0, psdWriter_1.writeUint32)(writer, Math.round(s.midpoint * 100)); + (0, psdWriter_1.writeColor)(writer, s.color); + (0, psdWriter_1.writeZeros)(writer, 2); + } + (0, psdWriter_1.writeUint16)(writer, info.opacityStops && info.opacityStops.length || 0); + for (var _e = 0, _f = info.opacityStops || []; _e < _f.length; _e++) { + var s = _f[_e]; + (0, psdWriter_1.writeUint32)(writer, Math.round(s.location * interpolation)); + (0, psdWriter_1.writeUint32)(writer, Math.round(s.midpoint * 100)); + (0, psdWriter_1.writeUint16)(writer, Math.round(s.opacity * 0xff)); + } + (0, psdWriter_1.writeUint16)(writer, 2); // expansion count + (0, psdWriter_1.writeUint16)(writer, interpolation); + (0, psdWriter_1.writeUint16)(writer, 32); // length + (0, psdWriter_1.writeUint16)(writer, info.gradientType === 'noise' ? 1 : 0); + (0, psdWriter_1.writeUint32)(writer, info.randomSeed || 0); + (0, psdWriter_1.writeUint16)(writer, info.addTransparency ? 1 : 0); + (0, psdWriter_1.writeUint16)(writer, info.restrictColors ? 1 : 0); + (0, psdWriter_1.writeUint32)(writer, Math.round(((_b = info.roughness) !== null && _b !== void 0 ? _b : 1) * 4096)); + var colorModel = grdmColorModels.indexOf((_c = info.colorModel) !== null && _c !== void 0 ? _c : 'rgb'); + (0, psdWriter_1.writeUint16)(writer, colorModel === -1 ? 3 : colorModel); + for (var i = 0; i < 4; i++) + (0, psdWriter_1.writeUint16)(writer, Math.round((info.min && info.min[i] || 0) * 0x8000)); + for (var i = 0; i < 4; i++) + (0, psdWriter_1.writeUint16)(writer, Math.round((info.max && info.max[i] || 0) * 0x8000)); + (0, psdWriter_1.writeZeros)(writer, 4); +}); +function readSelectiveColors(reader) { + return { + c: (0, psdReader_1.readInt16)(reader), + m: (0, psdReader_1.readInt16)(reader), + y: (0, psdReader_1.readInt16)(reader), + k: (0, psdReader_1.readInt16)(reader), + }; +} +function writeSelectiveColors(writer, cmyk) { + var c = cmyk || {}; + (0, psdWriter_1.writeInt16)(writer, c.c); + (0, psdWriter_1.writeInt16)(writer, c.m); + (0, psdWriter_1.writeInt16)(writer, c.y); + (0, psdWriter_1.writeInt16)(writer, c.k); +} +addHandler('selc', adjustmentType('selective color'), function (reader, target) { + if ((0, psdReader_1.readUint16)(reader) !== 1) + throw new Error('Invalid selc version'); + var mode = (0, psdReader_1.readUint16)(reader) ? 'absolute' : 'relative'; + (0, psdReader_1.skipBytes)(reader, 8); + target.adjustment = { + type: 'selective color', + mode: mode, + reds: readSelectiveColors(reader), + yellows: readSelectiveColors(reader), + greens: readSelectiveColors(reader), + cyans: readSelectiveColors(reader), + blues: readSelectiveColors(reader), + magentas: readSelectiveColors(reader), + whites: readSelectiveColors(reader), + neutrals: readSelectiveColors(reader), + blacks: readSelectiveColors(reader), + }; +}, function (writer, target) { + var info = target.adjustment; + (0, psdWriter_1.writeUint16)(writer, 1); // version + (0, psdWriter_1.writeUint16)(writer, info.mode === 'absolute' ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 8); + writeSelectiveColors(writer, info.reds); + writeSelectiveColors(writer, info.yellows); + writeSelectiveColors(writer, info.greens); + writeSelectiveColors(writer, info.cyans); + writeSelectiveColors(writer, info.blues); + writeSelectiveColors(writer, info.magentas); + writeSelectiveColors(writer, info.whites); + writeSelectiveColors(writer, info.neutrals); + writeSelectiveColors(writer, info.blacks); +}); +addHandler('CgEd', function (target) { + var a = target.adjustment; + if (!a) + return false; + return (a.type === 'brightness/contrast' && !a.useLegacy) || + ((a.type === 'levels' || a.type === 'curves' || a.type === 'exposure' || a.type === 'channel mixer' || + a.type === 'hue/saturation') && a.presetFileName !== undefined); +}, function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + if (desc.Vrsn !== 1) + throw new Error('Invalid CgEd version'); + // this section can specify preset file name for other adjustment types + if ('presetFileName' in desc) { + target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.presetKind, presetFileName: desc.presetFileName }); + } + else if ('curvesPresetFileName' in desc) { + target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.curvesPresetKind, presetFileName: desc.curvesPresetFileName }); + } + else if ('mixerPresetFileName' in desc) { + target.adjustment = __assign(__assign({}, target.adjustment), { presetKind: desc.mixerPresetKind, presetFileName: desc.mixerPresetFileName }); + } + else { + target.adjustment = { + type: 'brightness/contrast', + brightness: desc.Brgh, + contrast: desc.Cntr, + meanValue: desc.means, + useLegacy: !!desc.useLegacy, + labColorOnly: !!desc['Lab '], + auto: !!desc.Auto, + }; + } + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a, _b, _c, _d; + var info = target.adjustment; + if (info.type === 'levels' || info.type === 'exposure' || info.type === 'hue/saturation') { + var desc = { + Vrsn: 1, + presetKind: (_a = info.presetKind) !== null && _a !== void 0 ? _a : 1, + presetFileName: info.presetFileName || '', + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + } + else if (info.type === 'curves') { + var desc = { + Vrsn: 1, + curvesPresetKind: (_b = info.presetKind) !== null && _b !== void 0 ? _b : 1, + curvesPresetFileName: info.presetFileName || '', + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + } + else if (info.type === 'channel mixer') { + var desc = { + Vrsn: 1, + mixerPresetKind: (_c = info.presetKind) !== null && _c !== void 0 ? _c : 1, + mixerPresetFileName: info.presetFileName || '', + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + } + else if (info.type === 'brightness/contrast') { + var desc = { + Vrsn: 1, + Brgh: info.brightness || 0, + Cntr: info.contrast || 0, + means: (_d = info.meanValue) !== null && _d !== void 0 ? _d : 127, + 'Lab ': !!info.labColorOnly, + useLegacy: !!info.useLegacy, + Auto: !!info.auto, + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + } + else { + throw new Error('Unhandled CgEd case'); + } +}); +addHandler('Txt2', hasKey('engineData'), function (reader, target, left) { + var data = (0, psdReader_1.readBytes)(reader, left()); + target.engineData = (0, base64_js_1.fromByteArray)(data); + // const engineData = parseEngineData(data); + // console.log(require('util').inspect(engineData, false, 99, true)); + // require('fs').writeFileSync('resources/engineData2Simple.txt', require('util').inspect(engineData, false, 99, false), 'utf8'); + // require('fs').writeFileSync('test_data.json', JSON.stringify(ed, null, 2), 'utf8'); +}, function (writer, target) { + var buffer = (0, base64_js_1.toByteArray)(target.engineData); + (0, psdWriter_1.writeBytes)(writer, buffer); +}); +addHandler('FMsk', hasKey('filterMask'), function (reader, target) { + target.filterMask = { + colorSpace: (0, psdReader_1.readColor)(reader), + opacity: (0, psdReader_1.readUint16)(reader) / 0xff, + }; +}, function (writer, target) { + var _a; + (0, psdWriter_1.writeColor)(writer, target.filterMask.colorSpace); + (0, psdWriter_1.writeUint16)(writer, (0, helpers_1.clamp)((_a = target.filterMask.opacity) !== null && _a !== void 0 ? _a : 1, 0, 1) * 0xff); +}); +addHandler('artd', // document-wide artboard info +function (// document-wide artboard info +target) { return target.artboards !== undefined; }, function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.artboards = { + count: desc['Cnt '], + autoExpandOffset: { horizontal: desc.autoExpandOffset.Hrzn, vertical: desc.autoExpandOffset.Vrtc }, + origin: { horizontal: desc.origin.Hrzn, vertical: desc.origin.Vrtc }, + autoExpandEnabled: desc.autoExpandEnabled, + autoNestEnabled: desc.autoNestEnabled, + autoPositionEnabled: desc.autoPositionEnabled, + shrinkwrapOnSaveEnabled: desc.shrinkwrapOnSaveEnabled, + docDefaultNewArtboardBackgroundColor: (0, descriptor_1.parseColor)(desc.docDefaultNewArtboardBackgroundColor), + docDefaultNewArtboardBackgroundType: desc.docDefaultNewArtboardBackgroundType, + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var _a, _b, _c, _d, _e; + var artb = target.artboards; + var desc = { + 'Cnt ': artb.count, + autoExpandOffset: artb.autoExpandOffset ? { Hrzn: artb.autoExpandOffset.horizontal, Vrtc: artb.autoExpandOffset.vertical } : { Hrzn: 0, Vrtc: 0 }, + origin: artb.origin ? { Hrzn: artb.origin.horizontal, Vrtc: artb.origin.vertical } : { Hrzn: 0, Vrtc: 0 }, + autoExpandEnabled: (_a = artb.autoExpandEnabled) !== null && _a !== void 0 ? _a : true, + autoNestEnabled: (_b = artb.autoNestEnabled) !== null && _b !== void 0 ? _b : true, + autoPositionEnabled: (_c = artb.autoPositionEnabled) !== null && _c !== void 0 ? _c : true, + shrinkwrapOnSaveEnabled: (_d = artb.shrinkwrapOnSaveEnabled) !== null && _d !== void 0 ? _d : true, + docDefaultNewArtboardBackgroundColor: (0, descriptor_1.serializeColor)(artb.docDefaultNewArtboardBackgroundColor), + docDefaultNewArtboardBackgroundType: (_e = artb.docDefaultNewArtboardBackgroundType) !== null && _e !== void 0 ? _e : 1, + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'artd'); +}); +function hasMultiEffects(effects) { + return Object.keys(effects).map(function (key) { return effects[key]; }).some(function (v) { return Array.isArray(v) && v.length > 1; }); +} +exports.hasMultiEffects = hasMultiEffects; +addHandler('lfx2', function (target) { return target.effects !== undefined && !hasMultiEffects(target.effects); }, function (reader, target, left, _, options) { + var version = (0, psdReader_1.readUint32)(reader); + if (version !== 0) + throw new Error("Invalid lfx2 version"); + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + // TODO: don't discard if we got it from lmfx + // discard if read in 'lrFX' section + target.effects = (0, descriptor_1.parseEffects)(desc, !!options.logMissingFeatures); + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target, _, options) { + var desc = (0, descriptor_1.serializeEffects)(target.effects, !!options.logMissingFeatures, false); + // console.log(require('util').inspect(desc, false, 99, true)); + (0, psdWriter_1.writeUint32)(writer, 0); // version + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler('cinf', hasKey('compositorUsed'), function (reader, target, left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + target.compositorUsed = { + description: desc.description, + reason: desc.reason, + engine: desc.Engn.split('.')[1], + enableCompCore: desc.enableCompCore.split('.')[1], + enableCompCoreGPU: desc.enableCompCoreGPU.split('.')[1], + compCoreSupport: desc.compCoreSupport.split('.')[1], + compCoreGPUSupport: desc.compCoreGPUSupport.split('.')[1], + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var cinf = target.compositorUsed; + var desc = { + Vrsn: { major: 1, minor: 0, fix: 0 }, + // psVersion: { major: 22, minor: 3, fix: 1 }, // TESTING + description: cinf.description, + reason: cinf.reason, + Engn: "Engn.".concat(cinf.engine), + enableCompCore: "enable.".concat(cinf.enableCompCore), + enableCompCoreGPU: "enable.".concat(cinf.enableCompCoreGPU), + // enableCompCoreThreads: `enable.feature`, // TESTING + compCoreSupport: "reason.".concat(cinf.compCoreSupport), + compCoreGPUSupport: "reason.".concat(cinf.compCoreGPUSupport), + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +// extension settings ?, ignore it +addHandler('extn', function (target) { return target._extn !== undefined; }, function (reader, target) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + if (helpers_1.MOCK_HANDLERS) + target._extn = desc; +}, function (writer, target) { + // TODO: need to add correct types for desc fields (resources/src.psd) + if (helpers_1.MOCK_HANDLERS) + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', target._extn); +}); +addHandler('iOpa', hasKey('fillOpacity'), function (reader, target) { + target.fillOpacity = (0, psdReader_1.readUint8)(reader) / 0xff; + (0, psdReader_1.skipBytes)(reader, 3); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.fillOpacity * 0xff); + (0, psdWriter_1.writeZeros)(writer, 3); +}); +addHandler('brst', hasKey('channelBlendingRestrictions'), function (reader, target, left) { + target.channelBlendingRestrictions = []; + while (left() > 4) { + target.channelBlendingRestrictions.push((0, psdReader_1.readInt32)(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.channelBlendingRestrictions; _i < _a.length; _i++) { + var channel = _a[_i]; + (0, psdWriter_1.writeInt32)(writer, channel); + } +}); +addHandler('tsly', hasKey('transparencyShapesLayer'), function (reader, target) { + target.transparencyShapesLayer = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.skipBytes)(reader, 3); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.transparencyShapesLayer ? 1 : 0); + (0, psdWriter_1.writeZeros)(writer, 3); +}); + },{"./descriptor":4,"./effectsHelpers":5,"./engineData":6,"./helpers":7,"./psdReader":11,"./psdWriter":12,"./text":13,"base64-js":15}],3:[function(require,module,exports){ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readCsh = void 0; -var additionalInfo_1 = require("./additionalInfo"); -var psdReader_1 = require("./psdReader"); -function readCsh(buffer) { - var reader = (0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength); - var csh = { shapes: [] }; - (0, psdReader_1.checkSignature)(reader, 'cush'); - if ((0, psdReader_1.readUint32)(reader) !== 2) - throw new Error('Invalid version'); - var count = (0, psdReader_1.readUint32)(reader); - for (var i = 0; i < count; i++) { - var name_1 = (0, psdReader_1.readUnicodeString)(reader); - while (reader.offset % 4) - reader.offset++; // pad to 4byte bounds - if ((0, psdReader_1.readUint32)(reader) !== 1) - throw new Error('Invalid shape version'); - var size = (0, psdReader_1.readUint32)(reader); - var end = reader.offset + size; - var id = (0, psdReader_1.readPascalString)(reader, 1); - // this might not be correct ??? - var y1 = (0, psdReader_1.readUint32)(reader); - var x1 = (0, psdReader_1.readUint32)(reader); - var y2 = (0, psdReader_1.readUint32)(reader); - var x2 = (0, psdReader_1.readUint32)(reader); - var width = x2 - x1; - var height = y2 - y1; - var mask = { paths: [] }; - (0, additionalInfo_1.readVectorMask)(reader, mask, width, height, end - reader.offset); - csh.shapes.push(__assign({ name: name_1, id: id, width: width, height: height }, mask)); - reader.offset = end; - } - return csh; -} -exports.readCsh = readCsh; +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readCsh = void 0; +var additionalInfo_1 = require("./additionalInfo"); +var psdReader_1 = require("./psdReader"); +function readCsh(buffer) { + var reader = (0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength); + var csh = { shapes: [] }; + (0, psdReader_1.checkSignature)(reader, 'cush'); + if ((0, psdReader_1.readUint32)(reader) !== 2) + throw new Error('Invalid version'); + var count = (0, psdReader_1.readUint32)(reader); + for (var i = 0; i < count; i++) { + var name_1 = (0, psdReader_1.readUnicodeString)(reader); + while (reader.offset % 4) + reader.offset++; // pad to 4byte bounds + if ((0, psdReader_1.readUint32)(reader) !== 1) + throw new Error('Invalid shape version'); + var size = (0, psdReader_1.readUint32)(reader); + var end = reader.offset + size; + var id = (0, psdReader_1.readPascalString)(reader, 1); + // this might not be correct ??? + var y1 = (0, psdReader_1.readUint32)(reader); + var x1 = (0, psdReader_1.readUint32)(reader); + var y2 = (0, psdReader_1.readUint32)(reader); + var x2 = (0, psdReader_1.readUint32)(reader); + var width = x2 - x1; + var height = y2 - y1; + var mask = { paths: [] }; + (0, additionalInfo_1.readVectorMask)(reader, mask, width, height, end - reader.offset); + csh.shapes.push(__assign({ name: name_1, id: id, width: width, height: height }, mask)); + reader.offset = end; + } + return csh; +} +exports.readCsh = readCsh; + },{"./additionalInfo":2,"./psdReader":11}],4:[function(require,module,exports){ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.strokeStyleLineAlignment = exports.strokeStyleLineJoinType = exports.strokeStyleLineCapType = exports.ESliceBGColorType = exports.ESliceOrigin = exports.ESliceVertAlign = exports.ESliceHorzAlign = exports.ESliceType = exports.FrFl = exports.FStl = exports.ClrS = exports.gradientInterpolationMethodType = exports.stdTrackID = exports.animInterpStyleEnum = exports.GrdT = exports.IGSr = exports.BETE = exports.BESs = exports.bvlT = exports.BESl = exports.BlnM = exports.warpStyle = exports.Annt = exports.Ornt = exports.textGridding = exports.unitsValue = exports.unitsPercent = exports.unitsAngle = exports.parseUnitsToNumber = exports.parseUnitsOrNumber = exports.parseUnits = exports.parsePercentOrAngle = exports.parsePercent = exports.parseAngle = exports.serializeColor = exports.parseColor = exports.serializeVectorContent = exports.parseVectorContent = exports.serializeTrackList = exports.parseTrackList = exports.parseEffects = exports.serializeEffects = exports.xyToHorzVrtc = exports.horzVrtcToXY = exports.writeVersionAndDescriptor = exports.readVersionAndDescriptor = exports.writeDescriptorStructure = exports.readDescriptorStructure = exports.readAsciiStringOrClassId = exports.setLogErrors = void 0; -var helpers_1 = require("./helpers"); -var psdReader_1 = require("./psdReader"); -var psdWriter_1 = require("./psdWriter"); -function revMap(map) { - var result = {}; - Object.keys(map).forEach(function (key) { return result[map[key]] = key; }); - return result; -} -var unitsMap = { - '#Ang': 'Angle', - '#Rsl': 'Density', - '#Rlt': 'Distance', - '#Nne': 'None', - '#Prc': 'Percent', - '#Pxl': 'Pixels', - '#Mlm': 'Millimeters', - '#Pnt': 'Points', - 'RrPi': 'Picas', - 'RrIn': 'Inches', - 'RrCm': 'Centimeters', -}; -var unitsMapRev = revMap(unitsMap); -var logErrors = false; -function setLogErrors(value) { - logErrors = value; -} -exports.setLogErrors = setLogErrors; -function makeType(name, classID) { - return { name: name, classID: classID }; -} -var nullType = makeType('', 'null'); -var fieldToExtType = { - strokeStyleContent: makeType('', 'solidColorLayer'), - // printProofSetup: makeType('校样设置', 'proofSetup'), // TESTING - printProofSetup: makeType('Proof Setup', 'proofSetup'), - patternFill: makeType('', 'patternFill'), - Grad: makeType('Gradient', 'Grdn'), - ebbl: makeType('', 'ebbl'), - SoFi: makeType('', 'SoFi'), - GrFl: makeType('', 'GrFl'), - sdwC: makeType('', 'RGBC'), - hglC: makeType('', 'RGBC'), - 'Clr ': makeType('', 'RGBC'), - 'tintColor': makeType('', 'RGBC'), - Ofst: makeType('', 'Pnt '), - ChFX: makeType('', 'ChFX'), - MpgS: makeType('', 'ShpC'), - DrSh: makeType('', 'DrSh'), - IrSh: makeType('', 'IrSh'), - OrGl: makeType('', 'OrGl'), - IrGl: makeType('', 'IrGl'), - TrnS: makeType('', 'ShpC'), - Ptrn: makeType('', 'Ptrn'), - FrFX: makeType('', 'FrFX'), - phase: makeType('', 'Pnt '), - frameStep: nullType, - duration: nullType, - workInTime: nullType, - workOutTime: nullType, - audioClipGroupList: nullType, - bounds: makeType('', 'Rctn'), - customEnvelopeWarp: makeType('', 'customEnvelopeWarp'), - warp: makeType('', 'warp'), - 'Sz ': makeType('', 'Pnt '), - origin: makeType('', 'Pnt '), - autoExpandOffset: makeType('', 'Pnt '), - keyOriginShapeBBox: makeType('', 'unitRect'), - Vrsn: nullType, - psVersion: nullType, - docDefaultNewArtboardBackgroundColor: makeType('', 'RGBC'), - artboardRect: makeType('', 'classFloatRect'), - keyOriginRRectRadii: makeType('', 'radii'), - keyOriginBoxCorners: nullType, - rectangleCornerA: makeType('', 'Pnt '), - rectangleCornerB: makeType('', 'Pnt '), - rectangleCornerC: makeType('', 'Pnt '), - rectangleCornerD: makeType('', 'Pnt '), - compInfo: nullType, - Trnf: makeType('Transform', 'Trnf'), - quiltWarp: makeType('', 'quiltWarp'), - generatorSettings: nullType, - crema: nullType, - FrIn: nullType, - blendOptions: nullType, - FXRf: nullType, - Lefx: nullType, - time: nullType, - animKey: nullType, - timeScope: nullType, - inTime: nullType, - outTime: nullType, - sheetStyle: nullType, - translation: nullType, - Skew: nullType, - 'Lnk ': makeType('', 'ExternalFileLink'), - frameReader: makeType('', 'FrameReader'), - effectParams: makeType('', 'motionTrackEffectParams'), - Impr: makeType('None', 'none'), - Anch: makeType('', 'Pnt '), - 'Fwd ': makeType('', 'Pnt '), - 'Bwd ': makeType('', 'Pnt '), - meshBoundaryPath: makeType('', 'pathClass'), - filterFX: makeType('', 'filterFXStyle'), - Fltr: makeType('', 'rigidTransform'), - FrgC: makeType('', 'RGBC'), - BckC: makeType('', 'RGBC'), -}; -var fieldToArrayExtType = { - 'Crv ': makeType('', 'CrPt'), - Clrs: makeType('', 'Clrt'), - Trns: makeType('', 'TrnS'), - keyDescriptorList: nullType, - solidFillMulti: makeType('', 'SoFi'), - gradientFillMulti: makeType('', 'GrFl'), - dropShadowMulti: makeType('', 'DrSh'), - innerShadowMulti: makeType('', 'IrSh'), - frameFXMulti: makeType('', 'FrFX'), - FrIn: nullType, - FSts: nullType, - LaSt: nullType, - sheetTimelineOptions: nullType, - trackList: makeType('', 'animationTrack'), - globalTrackList: makeType('', 'animationTrack'), - keyList: nullType, - audioClipGroupList: nullType, - audioClipList: nullType, - countObjectList: makeType('', 'countObject'), - countGroupList: makeType('', 'countGroup'), - slices: makeType('', 'slice'), - 'Pts ': makeType('', 'Pthp'), - SbpL: makeType('', 'SbpL'), - pathComponents: makeType('', 'PaCm'), - filterFXList: makeType('', 'filterFX'), - puppetShapeList: makeType('', 'puppetShape'), -}; -var typeToField = { - 'TEXT': [ - 'Txt ', 'printerName', 'Nm ', 'Idnt', 'blackAndWhitePresetFileName', 'LUT3DFileName', - 'presetFileName', 'curvesPresetFileName', 'mixerPresetFileName', 'placed', 'description', 'reason', - 'artboardPresetName', 'json', 'clipID', 'relPath', 'fullPath', 'mediaDescriptor', 'Msge', - 'altTag', 'url', 'cellText', - ], - 'tdta': ['EngineData', 'LUT3DFileData', 'indexArray', 'originalVertexArray', 'deformedVertexArray'], - 'long': [ - 'TextIndex', 'RndS', 'Mdpn', 'Smth', 'Lctn', 'strokeStyleVersion', 'LaID', 'Vrsn', 'Cnt ', - 'Brgh', 'Cntr', 'means', 'vibrance', 'Strt', 'bwPresetKind', 'presetKind', 'comp', 'compID', 'originalCompID', - 'curvesPresetKind', 'mixerPresetKind', 'uOrder', 'vOrder', 'PgNm', 'totalPages', 'Crop', - 'numerator', 'denominator', 'frameCount', 'Annt', 'keyOriginType', 'unitValueQuadVersion', - 'keyOriginIndex', 'major', 'minor', 'fix', 'docDefaultNewArtboardBackgroundType', 'artboardBackgroundType', - 'numModifyingFX', 'deformNumRows', 'deformNumCols', 'FrID', 'FrDl', 'FsID', 'LCnt', 'AFrm', 'AFSt', - 'numBefore', 'numAfter', 'Spcn', 'minOpacity', 'maxOpacity', 'BlnM', 'sheetID', 'gblA', 'globalAltitude', - 'descVersion', 'frameReaderType', 'LyrI', 'zoomOrigin', 'fontSize', 'Rds ', 'sliceID', - 'topOutset', 'leftOutset', 'bottomOutset', 'rightOutset', 'filterID', 'meshQuality', - 'meshExpansion', 'meshRigidity', 'VrsM', 'VrsN', - ], - 'enum': [ - 'textGridding', 'Ornt', 'warpStyle', 'warpRotate', 'Inte', 'Bltn', 'ClrS', - 'sdwM', 'hglM', 'bvlT', 'bvlS', 'bvlD', 'Md ', 'glwS', 'GrdF', 'GlwT', - 'strokeStyleLineCapType', 'strokeStyleLineJoinType', 'strokeStyleLineAlignment', - 'strokeStyleBlendMode', 'PntT', 'Styl', 'lookupType', 'LUTFormat', 'dataOrder', - 'tableOrder', 'enableCompCore', 'enableCompCoreGPU', 'compCoreSupport', 'compCoreGPUSupport', 'Engn', - 'enableCompCoreThreads', 'gs99', 'FrDs', 'trackID', 'animInterpStyle', 'horzAlign', - 'vertAlign', 'bgColorType', 'shapeOperation', - ], - 'bool': [ - 'PstS', 'printSixteenBit', 'masterFXSwitch', 'enab', 'uglg', 'antialiasGloss', - 'useShape', 'useTexture', 'uglg', 'antialiasGloss', 'useShape', 'Vsbl', - 'useTexture', 'Algn', 'Rvrs', 'Dthr', 'Invr', 'VctC', 'ShTr', 'layerConceals', - 'strokeEnabled', 'fillEnabled', 'strokeStyleScaleLock', 'strokeStyleStrokeAdjust', - 'hardProof', 'MpBl', 'paperWhite', 'useLegacy', 'Auto', 'Lab ', 'useTint', 'keyShapeInvalidated', - 'autoExpandEnabled', 'autoNestEnabled', 'autoPositionEnabled', 'shrinkwrapOnSaveEnabled', - 'present', 'showInDialog', 'overprint', 'sheetDisclosed', 'lightsDisclosed', 'meshesDisclosed', - 'materialsDisclosed', 'hasMotion', 'muted', 'Effc', 'selected', 'autoScope', 'fillCanvas', - 'cellTextIsHTML', 'Smoo', 'Clsp', 'validAtPosition', 'rigidType', 'hasoptions', 'filterMaskEnable', - 'filterMaskLinked', 'filterMaskExtendWithWhite', - ], - 'doub': [ - 'warpValue', 'warpPerspective', 'warpPerspectiveOther', 'Intr', 'Wdth', 'Hght', - 'strokeStyleMiterLimit', 'strokeStyleResolution', 'layerTime', 'keyOriginResolution', - 'xx', 'xy', 'yx', 'yy', 'tx', 'ty', 'FrGA', 'frameRate', 'audioLevel', 'rotation', - 'X ', 'Y ', 'redFloat', 'greenFloat', 'blueFloat', 'imageResolution', - 'PuX0', 'PuX1', 'PuX2', 'PuX3', 'PuY0', 'PuY1', 'PuY2', 'PuY3' - ], - 'UntF': [ - 'Scl ', 'sdwO', 'hglO', 'lagl', 'Lald', 'srgR', 'blur', 'Sftn', 'Opct', 'Dstn', 'Angl', - 'Ckmt', 'Nose', 'Inpr', 'ShdN', 'strokeStyleLineWidth', 'strokeStyleLineDashOffset', - 'strokeStyleOpacity', 'H ', 'Top ', 'Left', 'Btom', 'Rght', 'Rslt', - 'topRight', 'topLeft', 'bottomLeft', 'bottomRight', - ], - 'VlLs': [ - 'Crv ', 'Clrs', 'Mnm ', 'Mxm ', 'Trns', 'pathList', 'strokeStyleLineDashSet', 'FrLs', 'slices', - 'LaSt', 'Trnf', 'nonAffineTransform', 'keyDescriptorList', 'guideIndeces', 'gradientFillMulti', - 'solidFillMulti', 'frameFXMulti', 'innerShadowMulti', 'dropShadowMulti', 'FrIn', 'FSts', 'FsFr', - 'sheetTimelineOptions', 'audioClipList', 'trackList', 'globalTrackList', 'keyList', 'audioClipList', - 'warpValues', 'selectedPin', 'Pts ', 'SbpL', 'pathComponents', 'pinOffsets', 'posFinalPins', - 'pinVertexIndices', 'PinP', 'PnRt', 'PnOv', 'PnDp', 'filterFXList', 'puppetShapeList', - ], - 'ObAr': ['meshPoints', 'quiltSliceX', 'quiltSliceY'], - 'obj ': ['null'], -}; -var channels = [ - 'Rd ', 'Grn ', 'Bl ', 'Yllw', 'Ylw ', 'Cyn ', 'Mgnt', 'Blck', 'Gry ', 'Lmnc', 'A ', 'B ', -]; -var fieldToArrayType = { - 'Mnm ': 'long', - 'Mxm ': 'long', - FrLs: 'long', - strokeStyleLineDashSet: 'UntF', - Trnf: 'doub', - nonAffineTransform: 'doub', - keyDescriptorList: 'Objc', - gradientFillMulti: 'Objc', - solidFillMulti: 'Objc', - frameFXMulti: 'Objc', - innerShadowMulti: 'Objc', - dropShadowMulti: 'Objc', - LaSt: 'Objc', - FrIn: 'Objc', - FSts: 'Objc', - FsFr: 'long', - blendOptions: 'Objc', - sheetTimelineOptions: 'Objc', - keyList: 'Objc', - warpValues: 'doub', - selectedPin: 'long', - 'Pts ': 'Objc', - SbpL: 'Objc', - pathComponents: 'Objc', - pinOffsets: 'doub', - posFinalPins: 'doub', - pinVertexIndices: 'long', - PinP: 'doub', - PnRt: 'long', - PnOv: 'bool', - PnDp: 'doub', - filterFXList: 'Objc', - puppetShapeList: 'Objc', -}; -var fieldToType = {}; -for (var _i = 0, _a = Object.keys(typeToField); _i < _a.length; _i++) { - var type = _a[_i]; - for (var _b = 0, _c = typeToField[type]; _b < _c.length; _b++) { - var field = _c[_b]; - fieldToType[field] = type; - } -} -for (var _d = 0, _e = Object.keys(fieldToExtType); _d < _e.length; _d++) { - var field = _e[_d]; - if (!fieldToType[field]) - fieldToType[field] = 'Objc'; -} -for (var _f = 0, _g = Object.keys(fieldToArrayExtType); _f < _g.length; _f++) { - var field = _g[_f]; - fieldToArrayType[field] = 'Objc'; -} -function getTypeByKey(key, value, root, parent) { - if (key === 'null' && root === 'slices') { - return 'TEXT'; - } - else if (key === 'groupID') { - return root === 'slices' ? 'long' : 'TEXT'; - } - else if (key === 'Sz ') { - return ('Wdth' in value) ? 'Objc' : (('units' in value) ? 'UntF' : 'doub'); - } - else if (key === 'Type') { - return typeof value === 'string' ? 'enum' : 'long'; - } - else if (key === 'AntA') { - return typeof value === 'string' ? 'enum' : 'bool'; - } - else if ((key === 'Hrzn' || key === 'Vrtc') && parent.Type === 'keyType.Pstn') { - return 'long'; - } - else if (key === 'Hrzn' || key === 'Vrtc' || key === 'Top ' || key === 'Left' || key === 'Btom' || key === 'Rght') { - if (root === 'slices') - return 'long'; - return typeof value === 'number' ? 'doub' : 'UntF'; - } - else if (key === 'Vrsn') { - return typeof value === 'number' ? 'long' : 'Objc'; - } - else if (key === 'Rd ' || key === 'Grn ' || key === 'Bl ') { - return root === 'artd' ? 'long' : 'doub'; - } - else if (key === 'Trnf') { - return Array.isArray(value) ? 'VlLs' : 'Objc'; - } - else { - return fieldToType[key]; - } -} -function readAsciiStringOrClassId(reader) { - var length = (0, psdReader_1.readInt32)(reader); - return (0, psdReader_1.readAsciiString)(reader, length || 4); -} -exports.readAsciiStringOrClassId = readAsciiStringOrClassId; -function writeAsciiStringOrClassId(writer, value) { - if (value.length === 4 && value !== 'warp' && value !== 'time' && value !== 'hold') { - // write classId - (0, psdWriter_1.writeInt32)(writer, 0); - (0, psdWriter_1.writeSignature)(writer, value); - } - else { - // write ascii string - (0, psdWriter_1.writeInt32)(writer, value.length); - for (var i = 0; i < value.length; i++) { - (0, psdWriter_1.writeUint8)(writer, value.charCodeAt(i)); - } - } -} -function readDescriptorStructure(reader) { - var object = {}; - // object.__struct = - readClassStructure(reader); - var itemsCount = (0, psdReader_1.readUint32)(reader); - // console.log('//', object.__struct); - for (var i = 0; i < itemsCount; i++) { - var key = readAsciiStringOrClassId(reader); - var type = (0, psdReader_1.readSignature)(reader); - // console.log(`> '${key}' '${type}'`); - var data = readOSType(reader, type); - // if (!getTypeByKey(key, data)) console.log(`> '${key}' '${type}'`, data); - object[key] = data; - } - return object; -} -exports.readDescriptorStructure = readDescriptorStructure; -function writeDescriptorStructure(writer, name, classId, value, root) { - if (logErrors && !classId) - console.log('Missing classId for: ', name, classId, value); - // write class structure - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, name); - writeAsciiStringOrClassId(writer, classId); - var keys = Object.keys(value); - (0, psdWriter_1.writeUint32)(writer, keys.length); - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - var type = getTypeByKey(key, value[key], root, value); - var extType = fieldToExtType[key]; - if (key === 'origin') { - type = root === 'slices' ? 'enum' : 'Objc'; - } - else if (key === 'bounds' && root === 'slices') { - type = 'Objc'; - extType = makeType('', 'Rct1'); - } - else if (key === 'Scl ' && 'Hrzn' in value[key]) { - type = 'Objc'; - extType = nullType; - } - else if (key === 'audioClipGroupList' && keys.length === 1) { - type = 'VlLs'; - } - else if ((key === 'Strt' || key === 'Brgh') && 'H ' in value) { - type = 'doub'; - } - else if (key === 'Strt') { - type = 'Objc'; - extType = nullType; - } - else if (channels.indexOf(key) !== -1) { - type = (classId === 'RGBC' && root !== 'artd') ? 'doub' : 'long'; - } - else if (key === 'profile') { - type = classId === 'printOutput' ? 'TEXT' : 'tdta'; - } - else if (key === 'strokeStyleContent') { - if (value[key]['Clr ']) { - extType = makeType('', 'solidColorLayer'); - } - else if (value[key].Grad) { - extType = makeType('', 'gradientLayer'); - } - else if (value[key].Ptrn) { - extType = makeType('', 'patternLayer'); - } - else { - logErrors && console.log('Invalid strokeStyleContent value', value[key]); - } - } - else if (key === 'bounds' && root === 'quiltWarp') { - extType = makeType('', 'classFloatRect'); - } - if (extType && extType.classID === 'RGBC') { - if ('H ' in value[key]) - extType = { classID: 'HSBC', name: '' }; - // TODO: other color spaces - } - writeAsciiStringOrClassId(writer, key); - (0, psdWriter_1.writeSignature)(writer, type || 'long'); - writeOSType(writer, type || 'long', value[key], key, extType, root); - if (logErrors && !type) - console.log("Missing descriptor field type for: '".concat(key, "' in"), value); - } -} -exports.writeDescriptorStructure = writeDescriptorStructure; -function readOSType(reader, type) { - switch (type) { - case 'obj ': // Reference - return readReferenceStructure(reader); - case 'Objc': // Descriptor - case 'GlbO': // GlobalObject same as Descriptor - return readDescriptorStructure(reader); - case 'VlLs': { // List - var length_1 = (0, psdReader_1.readInt32)(reader); - var items = []; - for (var i = 0; i < length_1; i++) { - var type_1 = (0, psdReader_1.readSignature)(reader); - // console.log(' >', type); - items.push(readOSType(reader, type_1)); - } - return items; - } - case 'doub': // Double - return (0, psdReader_1.readFloat64)(reader); - case 'UntF': { // Unit double - var units = (0, psdReader_1.readSignature)(reader); - var value = (0, psdReader_1.readFloat64)(reader); - if (!unitsMap[units]) - throw new Error("Invalid units: ".concat(units)); - return { units: unitsMap[units], value: value }; - } - case 'UnFl': { // Unit float - var units = (0, psdReader_1.readSignature)(reader); - var value = (0, psdReader_1.readFloat32)(reader); - if (!unitsMap[units]) - throw new Error("Invalid units: ".concat(units)); - return { units: unitsMap[units], value: value }; - } - case 'TEXT': // String - return (0, psdReader_1.readUnicodeString)(reader); - case 'enum': { // Enumerated - var type_2 = readAsciiStringOrClassId(reader); - var value = readAsciiStringOrClassId(reader); - return "".concat(type_2, ".").concat(value); - } - case 'long': // Integer - return (0, psdReader_1.readInt32)(reader); - case 'comp': { // Large Integer - var low = (0, psdReader_1.readUint32)(reader); - var high = (0, psdReader_1.readUint32)(reader); - return { low: low, high: high }; - } - case 'bool': // Boolean - return !!(0, psdReader_1.readUint8)(reader); - case 'type': // Class - case 'GlbC': // Class - return readClassStructure(reader); - case 'alis': { // Alias - var length_2 = (0, psdReader_1.readInt32)(reader); - return (0, psdReader_1.readAsciiString)(reader, length_2); - } - case 'tdta': { // Raw Data - var length_3 = (0, psdReader_1.readInt32)(reader); - return (0, psdReader_1.readBytes)(reader, length_3); - } - case 'ObAr': { // Object array - (0, psdReader_1.readInt32)(reader); // version: 16 - (0, psdReader_1.readUnicodeString)(reader); // name: '' - readAsciiStringOrClassId(reader); // 'rationalPoint' - var length_4 = (0, psdReader_1.readInt32)(reader); - var items = []; - for (var i = 0; i < length_4; i++) { - var type1 = readAsciiStringOrClassId(reader); // type Hrzn | Vrtc - (0, psdReader_1.readSignature)(reader); // UnFl - (0, psdReader_1.readSignature)(reader); // units ? '#Pxl' - var valuesCount = (0, psdReader_1.readInt32)(reader); - var values = []; - for (var j = 0; j < valuesCount; j++) { - values.push((0, psdReader_1.readFloat64)(reader)); - } - items.push({ type: type1, values: values }); - } - return items; - } - case 'Pth ': { // File path - /*const length =*/ (0, psdReader_1.readInt32)(reader); - var sig = (0, psdReader_1.readSignature)(reader); - /*const pathSize =*/ (0, psdReader_1.readInt32LE)(reader); - var charsCount = (0, psdReader_1.readInt32LE)(reader); - var path = (0, psdReader_1.readUnicodeStringWithLength)(reader, charsCount); - return { sig: sig, path: path }; - } - default: - throw new Error("Invalid TySh descriptor OSType: ".concat(type, " at ").concat(reader.offset.toString(16))); - } -} -var ObArTypes = { - meshPoints: 'rationalPoint', - quiltSliceX: 'UntF', - quiltSliceY: 'UntF', -}; -function writeOSType(writer, type, value, key, extType, root) { - switch (type) { - case 'obj ': // Reference - writeReferenceStructure(writer, key, value); - break; - case 'Objc': // Descriptor - case 'GlbO': // GlobalObject same as Descriptor - if (!extType) - throw new Error("Missing ext type for: '".concat(key, "' (").concat(JSON.stringify(value), ")")); - writeDescriptorStructure(writer, extType.name, extType.classID, value, root); - break; - case 'VlLs': // List - (0, psdWriter_1.writeInt32)(writer, value.length); - for (var i = 0; i < value.length; i++) { - var type_3 = fieldToArrayType[key]; - (0, psdWriter_1.writeSignature)(writer, type_3 || 'long'); - writeOSType(writer, type_3 || 'long', value[i], "".concat(key, "[]"), fieldToArrayExtType[key], root); - if (logErrors && !type_3) - console.log("Missing descriptor array type for: '".concat(key, "' in"), value); - } - break; - case 'doub': // Double - (0, psdWriter_1.writeFloat64)(writer, value); - break; - case 'UntF': // Unit double - if (!unitsMapRev[value.units]) - throw new Error("Invalid units: ".concat(value.units, " in ").concat(key)); - (0, psdWriter_1.writeSignature)(writer, unitsMapRev[value.units]); - (0, psdWriter_1.writeFloat64)(writer, value.value); - break; - case 'UnFl': // Unit float - if (!unitsMapRev[value.units]) - throw new Error("Invalid units: ".concat(value.units, " in ").concat(key)); - (0, psdWriter_1.writeSignature)(writer, unitsMapRev[value.units]); - (0, psdWriter_1.writeFloat32)(writer, value.value); - break; - case 'TEXT': // String - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, value); - break; - case 'enum': { // Enumerated - var _a = value.split('.'), _type = _a[0], val = _a[1]; - writeAsciiStringOrClassId(writer, _type); - writeAsciiStringOrClassId(writer, val); - break; - } - case 'long': // Integer - (0, psdWriter_1.writeInt32)(writer, value); - break; - // case 'comp': // Large Integer - // writeLargeInteger(reader); - case 'bool': // Boolean - (0, psdWriter_1.writeUint8)(writer, value ? 1 : 0); - break; - // case 'type': // Class - // case 'GlbC': // Class - // writeClassStructure(reader); - // case 'alis': // Alias - // writeAliasStructure(reader); - case 'tdta': // Raw Data - (0, psdWriter_1.writeInt32)(writer, value.byteLength); - (0, psdWriter_1.writeBytes)(writer, value); - break; - case 'ObAr': { // Object array - (0, psdWriter_1.writeInt32)(writer, 16); // version - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, ''); // name - var type_4 = ObArTypes[key]; - if (!type_4) - throw new Error("Not implemented ObArType for: ".concat(key)); - writeAsciiStringOrClassId(writer, type_4); - (0, psdWriter_1.writeInt32)(writer, value.length); - for (var i = 0; i < value.length; i++) { - writeAsciiStringOrClassId(writer, value[i].type); // Hrzn | Vrtc - (0, psdWriter_1.writeSignature)(writer, 'UnFl'); - (0, psdWriter_1.writeSignature)(writer, '#Pxl'); - (0, psdWriter_1.writeInt32)(writer, value[i].values.length); - for (var j = 0; j < value[i].values.length; j++) { - (0, psdWriter_1.writeFloat64)(writer, value[i].values[j]); - } - } - break; - } - // case 'Pth ': // File path - // writeFilePath(reader); - default: - throw new Error("Not implemented descriptor OSType: ".concat(type)); - } -} -function readReferenceStructure(reader) { - var itemsCount = (0, psdReader_1.readInt32)(reader); - var items = []; - for (var i = 0; i < itemsCount; i++) { - var type = (0, psdReader_1.readSignature)(reader); - switch (type) { - case 'prop': { // Property - readClassStructure(reader); - var keyID = readAsciiStringOrClassId(reader); - items.push(keyID); - break; - } - case 'Clss': // Class - items.push(readClassStructure(reader)); - break; - case 'Enmr': { // Enumerated Reference - readClassStructure(reader); - var typeID = readAsciiStringOrClassId(reader); - var value = readAsciiStringOrClassId(reader); - items.push("".concat(typeID, ".").concat(value)); - break; - } - case 'rele': { // Offset - // const { name, classID } = - readClassStructure(reader); - items.push((0, psdReader_1.readUint32)(reader)); - break; - } - case 'Idnt': // Identifier - items.push((0, psdReader_1.readInt32)(reader)); - break; - case 'indx': // Index - items.push((0, psdReader_1.readInt32)(reader)); - break; - case 'name': { // Name - readClassStructure(reader); - items.push((0, psdReader_1.readUnicodeString)(reader)); - break; - } - default: - throw new Error("Invalid descriptor reference type: ".concat(type)); - } - } - return items; -} -function writeReferenceStructure(writer, _key, items) { - (0, psdWriter_1.writeInt32)(writer, items.length); - for (var i = 0; i < items.length; i++) { - var value = items[i]; - var type = 'unknown'; - if (typeof value === 'string') { - if (/^[a-z]+\.[a-z]+$/i.test(value)) { - type = 'Enmr'; - } - else { - type = 'name'; - } - } - (0, psdWriter_1.writeSignature)(writer, type); - switch (type) { - // case 'prop': // Property - // case 'Clss': // Class - case 'Enmr': { // Enumerated Reference - var _a = value.split('.'), typeID = _a[0], enumValue = _a[1]; - writeClassStructure(writer, '\0', typeID); - writeAsciiStringOrClassId(writer, typeID); - writeAsciiStringOrClassId(writer, enumValue); - break; - } - // case 'rele': // Offset - // case 'Idnt': // Identifier - // case 'indx': // Index - case 'name': { // Name - writeClassStructure(writer, '\0', 'Lyr '); - (0, psdWriter_1.writeUnicodeString)(writer, value + '\0'); - break; - } - default: - throw new Error("Invalid descriptor reference type: ".concat(type)); - } - } - return items; -} -function readClassStructure(reader) { - var name = (0, psdReader_1.readUnicodeString)(reader); - var classID = readAsciiStringOrClassId(reader); - // console.log({ name, classID }); - return { name: name, classID: classID }; -} -function writeClassStructure(writer, name, classID) { - (0, psdWriter_1.writeUnicodeString)(writer, name); - writeAsciiStringOrClassId(writer, classID); -} -function readVersionAndDescriptor(reader) { - var version = (0, psdReader_1.readUint32)(reader); - if (version !== 16) - throw new Error("Invalid descriptor version: ".concat(version)); - var desc = readDescriptorStructure(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - return desc; -} -exports.readVersionAndDescriptor = readVersionAndDescriptor; -function writeVersionAndDescriptor(writer, name, classID, descriptor, root) { - if (root === void 0) { root = ''; } - (0, psdWriter_1.writeUint32)(writer, 16); // version - writeDescriptorStructure(writer, name, classID, descriptor, root); -} -exports.writeVersionAndDescriptor = writeVersionAndDescriptor; -function horzVrtcToXY(hv) { - return { x: hv.Hrzn, y: hv.Vrtc }; -} -exports.horzVrtcToXY = horzVrtcToXY; -function xyToHorzVrtc(xy) { - return { Hrzn: xy.x, Vrtc: xy.y }; -} -exports.xyToHorzVrtc = xyToHorzVrtc; -function parseFxObject(fx) { - var stroke = { - enabled: !!fx.enab, - position: exports.FStl.decode(fx.Styl), - fillType: exports.FrFl.decode(fx.PntT), - blendMode: exports.BlnM.decode(fx['Md ']), - opacity: parsePercent(fx.Opct), - size: parseUnits(fx['Sz ']), - }; - if (fx.present !== undefined) - stroke.present = fx.present; - if (fx.showInDialog !== undefined) - stroke.showInDialog = fx.showInDialog; - if (fx.overprint !== undefined) - stroke.overprint = fx.overprint; - if (fx['Clr ']) - stroke.color = parseColor(fx['Clr ']); - if (fx.Grad) - stroke.gradient = parseGradientContent(fx); - if (fx.Ptrn) - stroke.pattern = parsePatternContent(fx); - return stroke; -} -function serializeFxObject(stroke) { - var FrFX = {}; - FrFX.enab = !!stroke.enabled; - if (stroke.present !== undefined) - FrFX.present = !!stroke.present; - if (stroke.showInDialog !== undefined) - FrFX.showInDialog = !!stroke.showInDialog; - FrFX.Styl = exports.FStl.encode(stroke.position); - FrFX.PntT = exports.FrFl.encode(stroke.fillType); - FrFX['Md '] = exports.BlnM.encode(stroke.blendMode); - FrFX.Opct = unitsPercent(stroke.opacity); - FrFX['Sz '] = unitsValue(stroke.size, 'size'); - if (stroke.color) - FrFX['Clr '] = serializeColor(stroke.color); - if (stroke.gradient) - FrFX = __assign(__assign({}, FrFX), serializeGradientContent(stroke.gradient)); - if (stroke.pattern) - FrFX = __assign(__assign({}, FrFX), serializePatternContent(stroke.pattern)); - if (stroke.overprint !== undefined) - FrFX.overprint = !!stroke.overprint; - return FrFX; -} -function serializeEffects(e, log, multi) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; - var info = multi ? { - 'Scl ': unitsPercent((_a = e.scale) !== null && _a !== void 0 ? _a : 1), - masterFXSwitch: !e.disabled, - } : { - masterFXSwitch: !e.disabled, - 'Scl ': unitsPercent((_b = e.scale) !== null && _b !== void 0 ? _b : 1), - }; - var arrayKeys = ['dropShadow', 'innerShadow', 'solidFill', 'gradientOverlay', 'stroke']; - for (var _i = 0, arrayKeys_1 = arrayKeys; _i < arrayKeys_1.length; _i++) { - var key = arrayKeys_1[_i]; - if (e[key] && !Array.isArray(e[key])) - throw new Error("".concat(key, " should be an array")); - } - if (((_c = e.dropShadow) === null || _c === void 0 ? void 0 : _c[0]) && !multi) - info.DrSh = serializeEffectObject(e.dropShadow[0], 'dropShadow', log); - if (((_d = e.dropShadow) === null || _d === void 0 ? void 0 : _d[0]) && multi) - info.dropShadowMulti = e.dropShadow.map(function (i) { return serializeEffectObject(i, 'dropShadow', log); }); - if (((_e = e.innerShadow) === null || _e === void 0 ? void 0 : _e[0]) && !multi) - info.IrSh = serializeEffectObject(e.innerShadow[0], 'innerShadow', log); - if (((_f = e.innerShadow) === null || _f === void 0 ? void 0 : _f[0]) && multi) - info.innerShadowMulti = e.innerShadow.map(function (i) { return serializeEffectObject(i, 'innerShadow', log); }); - if (e.outerGlow) - info.OrGl = serializeEffectObject(e.outerGlow, 'outerGlow', log); - if (((_g = e.solidFill) === null || _g === void 0 ? void 0 : _g[0]) && multi) - info.solidFillMulti = e.solidFill.map(function (i) { return serializeEffectObject(i, 'solidFill', log); }); - if (((_h = e.gradientOverlay) === null || _h === void 0 ? void 0 : _h[0]) && multi) - info.gradientFillMulti = e.gradientOverlay.map(function (i) { return serializeEffectObject(i, 'gradientOverlay', log); }); - if (((_j = e.stroke) === null || _j === void 0 ? void 0 : _j[0]) && multi) - info.frameFXMulti = e.stroke.map(function (i) { return serializeFxObject(i); }); - if (e.innerGlow) - info.IrGl = serializeEffectObject(e.innerGlow, 'innerGlow', log); - if (e.bevel) - info.ebbl = serializeEffectObject(e.bevel, 'bevel', log); - if (((_k = e.solidFill) === null || _k === void 0 ? void 0 : _k[0]) && !multi) - info.SoFi = serializeEffectObject(e.solidFill[0], 'solidFill', log); - if (e.patternOverlay) - info.patternFill = serializeEffectObject(e.patternOverlay, 'patternOverlay', log); - if (((_l = e.gradientOverlay) === null || _l === void 0 ? void 0 : _l[0]) && !multi) - info.GrFl = serializeEffectObject(e.gradientOverlay[0], 'gradientOverlay', log); - if (e.satin) - info.ChFX = serializeEffectObject(e.satin, 'satin', log); - if (((_m = e.stroke) === null || _m === void 0 ? void 0 : _m[0]) && !multi) - info.FrFX = serializeFxObject((_o = e.stroke) === null || _o === void 0 ? void 0 : _o[0]); - if (multi) { - info.numModifyingFX = 0; - for (var _p = 0, _q = Object.keys(e); _p < _q.length; _p++) { - var key = _q[_p]; - var value = e[key]; - if (Array.isArray(value)) { - for (var _r = 0, value_1 = value; _r < value_1.length; _r++) { - var effect = value_1[_r]; - if (effect.enabled) - info.numModifyingFX++; - } - } - } - } - return info; -} -exports.serializeEffects = serializeEffects; -function parseEffects(info, log) { - var effects = {}; - if (!info.masterFXSwitch) - effects.disabled = true; - if (info['Scl ']) - effects.scale = parsePercent(info['Scl ']); - if (info.DrSh) - effects.dropShadow = [parseEffectObject(info.DrSh, log)]; - if (info.dropShadowMulti) - effects.dropShadow = info.dropShadowMulti.map(function (i) { return parseEffectObject(i, log); }); - if (info.IrSh) - effects.innerShadow = [parseEffectObject(info.IrSh, log)]; - if (info.innerShadowMulti) - effects.innerShadow = info.innerShadowMulti.map(function (i) { return parseEffectObject(i, log); }); - if (info.OrGl) - effects.outerGlow = parseEffectObject(info.OrGl, log); - if (info.IrGl) - effects.innerGlow = parseEffectObject(info.IrGl, log); - if (info.ebbl) - effects.bevel = parseEffectObject(info.ebbl, log); - if (info.SoFi) - effects.solidFill = [parseEffectObject(info.SoFi, log)]; - if (info.solidFillMulti) - effects.solidFill = info.solidFillMulti.map(function (i) { return parseEffectObject(i, log); }); - if (info.patternFill) - effects.patternOverlay = parseEffectObject(info.patternFill, log); - if (info.GrFl) - effects.gradientOverlay = [parseEffectObject(info.GrFl, log)]; - if (info.gradientFillMulti) - effects.gradientOverlay = info.gradientFillMulti.map(function (i) { return parseEffectObject(i, log); }); - if (info.ChFX) - effects.satin = parseEffectObject(info.ChFX, log); - if (info.FrFX) - effects.stroke = [parseFxObject(info.FrFX)]; - if (info.frameFXMulti) - effects.stroke = info.frameFXMulti.map(function (i) { return parseFxObject(i); }); - return effects; -} -exports.parseEffects = parseEffects; -function parseKeyList(keyList, logMissingFeatures) { - var keys = []; - for (var j = 0; j < keyList.length; j++) { - var key = keyList[j]; - var time = key.time, selected = key.selected, animKey = key.animKey; - var interpolation = exports.animInterpStyleEnum.decode(key.animInterpStyle); - switch (animKey.Type) { - case 'keyType.Opct': - keys.push({ interpolation: interpolation, time: time, selected: selected, type: 'opacity', value: parsePercent(animKey.Opct) }); - break; - case 'keyType.Pstn': - keys.push({ interpolation: interpolation, time: time, selected: selected, type: 'position', x: animKey.Hrzn, y: animKey.Vrtc }); - break; - case 'keyType.Trnf': - keys.push({ - interpolation: interpolation, - time: time, - selected: selected, - type: 'transform', - scale: horzVrtcToXY(animKey['Scl ']), skew: horzVrtcToXY(animKey.Skew), rotation: animKey.rotation, translation: horzVrtcToXY(animKey.translation) - }); - break; - case 'keyType.sheetStyle': { - var key_1 = { interpolation: interpolation, time: time, selected: selected, type: 'style' }; - if (animKey.sheetStyle.Lefx) - key_1.style = parseEffects(animKey.sheetStyle.Lefx, logMissingFeatures); - keys.push(key_1); - break; - } - case 'keyType.globalLighting': { - keys.push({ - interpolation: interpolation, - time: time, - selected: selected, - type: 'globalLighting', - globalAngle: animKey.gblA, globalAltitude: animKey.globalAltitude - }); - break; - } - default: throw new Error("Unsupported keyType value"); - } - } - return keys; -} -function serializeKeyList(keys) { - var keyList = []; - for (var j = 0; j < keys.length; j++) { - var key = keys[j]; - var time = key.time, _a = key.selected, selected = _a === void 0 ? false : _a, interpolation = key.interpolation; - var animInterpStyle = exports.animInterpStyleEnum.encode(interpolation); - var animKey = void 0; - switch (key.type) { - case 'opacity': - animKey = { Type: 'keyType.Opct', Opct: unitsPercent(key.value) }; - break; - case 'position': - animKey = { Type: 'keyType.Pstn', Hrzn: key.x, Vrtc: key.y }; - break; - case 'transform': - animKey = { Type: 'keyType.Trnf', 'Scl ': xyToHorzVrtc(key.scale), Skew: xyToHorzVrtc(key.skew), rotation: key.rotation, translation: xyToHorzVrtc(key.translation) }; - break; - case 'style': - animKey = { Type: 'keyType.sheetStyle', sheetStyle: { Vrsn: 1, blendOptions: {} } }; - if (key.style) - animKey.sheetStyle = { Vrsn: 1, Lefx: serializeEffects(key.style, false, false), blendOptions: {} }; - break; - case 'globalLighting': { - animKey = { Type: 'keyType.globalLighting', gblA: key.globalAngle, globalAltitude: key.globalAltitude }; - break; - } - default: throw new Error("Unsupported keyType value"); - } - keyList.push({ Vrsn: 1, animInterpStyle: animInterpStyle, time: time, animKey: animKey, selected: selected }); - } - return keyList; -} -function parseTrackList(trackList, logMissingFeatures) { - var tracks = []; - for (var i = 0; i < trackList.length; i++) { - var tr = trackList[i]; - var track = { - type: exports.stdTrackID.decode(tr.trackID), - enabled: tr.enab, - keys: parseKeyList(tr.keyList, logMissingFeatures), - }; - if (tr.effectParams) { - track.effectParams = { - fillCanvas: tr.effectParams.fillCanvas, - zoomOrigin: tr.effectParams.zoomOrigin, - keys: parseKeyList(tr.effectParams.keyList, logMissingFeatures), - }; - } - tracks.push(track); - } - return tracks; -} -exports.parseTrackList = parseTrackList; -function serializeTrackList(tracks) { - var trackList = []; - for (var i = 0; i < tracks.length; i++) { - var t = tracks[i]; - trackList.push(__assign(__assign({ trackID: exports.stdTrackID.encode(t.type), Vrsn: 1, enab: !!t.enabled, Effc: !!t.effectParams }, (t.effectParams ? { - effectParams: { - keyList: serializeKeyList(t.keys), - fillCanvas: t.effectParams.fillCanvas, - zoomOrigin: t.effectParams.zoomOrigin, - } - } : {})), { keyList: serializeKeyList(t.keys) })); - } - return trackList; -} -exports.serializeTrackList = serializeTrackList; -function parseEffectObject(obj, reportErrors) { - var result = {}; - for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) { - var key = _a[_i]; - var val = obj[key]; - switch (key) { - case 'enab': - result.enabled = !!val; - break; - case 'uglg': - result.useGlobalLight = !!val; - break; - case 'AntA': - result.antialiased = !!val; - break; - case 'Algn': - result.align = !!val; - break; - case 'Dthr': - result.dither = !!val; - break; - case 'Invr': - result.invert = !!val; - break; - case 'Rvrs': - result.reverse = !!val; - break; - case 'Clr ': - result.color = parseColor(val); - break; - case 'hglC': - result.highlightColor = parseColor(val); - break; - case 'sdwC': - result.shadowColor = parseColor(val); - break; - case 'Styl': - result.position = exports.FStl.decode(val); - break; - case 'Md ': - result.blendMode = exports.BlnM.decode(val); - break; - case 'hglM': - result.highlightBlendMode = exports.BlnM.decode(val); - break; - case 'sdwM': - result.shadowBlendMode = exports.BlnM.decode(val); - break; - case 'bvlS': - result.style = exports.BESl.decode(val); - break; - case 'bvlD': - result.direction = exports.BESs.decode(val); - break; - case 'bvlT': - result.technique = exports.bvlT.decode(val); - break; - case 'GlwT': - result.technique = exports.BETE.decode(val); - break; - case 'glwS': - result.source = exports.IGSr.decode(val); - break; - case 'Type': - result.type = exports.GrdT.decode(val); - break; - case 'gs99': - result.interpolationMethod = exports.gradientInterpolationMethodType.decode(val); - break; - case 'Opct': - result.opacity = parsePercent(val); - break; - case 'hglO': - result.highlightOpacity = parsePercent(val); - break; - case 'sdwO': - result.shadowOpacity = parsePercent(val); - break; - case 'lagl': - result.angle = parseAngle(val); - break; - case 'Angl': - result.angle = parseAngle(val); - break; - case 'Lald': - result.altitude = parseAngle(val); - break; - case 'Sftn': - result.soften = parseUnits(val); - break; - case 'srgR': - result.strength = parsePercent(val); - break; - case 'blur': - result.size = parseUnits(val); - break; - case 'Nose': - result.noise = parsePercent(val); - break; - case 'Inpr': - result.range = parsePercent(val); - break; - case 'Ckmt': - result.choke = parseUnits(val); - break; - case 'ShdN': - result.jitter = parsePercent(val); - break; - case 'Dstn': - result.distance = parseUnits(val); - break; - case 'Scl ': - result.scale = parsePercent(val); - break; - case 'Ptrn': - result.pattern = { name: val['Nm '], id: val.Idnt }; - break; - case 'phase': - result.phase = { x: val.Hrzn, y: val.Vrtc }; - break; - case 'Ofst': - result.offset = { x: parsePercent(val.Hrzn), y: parsePercent(val.Vrtc) }; - break; - case 'MpgS': - case 'TrnS': - result.contour = { - name: val['Nm '], - curve: val['Crv '].map(function (p) { return ({ x: p.Hrzn, y: p.Vrtc }); }), - }; - break; - case 'Grad': - result.gradient = parseGradient(val); - break; - case 'useTexture': - case 'useShape': - case 'layerConceals': - case 'present': - case 'showInDialog': - case 'antialiasGloss': - result[key] = val; - break; - default: - reportErrors && console.log("Invalid effect key: '".concat(key, "', value:"), val); - } - } - return result; -} -function serializeEffectObject(obj, objName, reportErrors) { - var result = {}; - for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) { - var objKey = _a[_i]; - var key = objKey; - var val = obj[key]; - switch (key) { - case 'enabled': - result.enab = !!val; - break; - case 'useGlobalLight': - result.uglg = !!val; - break; - case 'antialiased': - result.AntA = !!val; - break; - case 'align': - result.Algn = !!val; - break; - case 'dither': - result.Dthr = !!val; - break; - case 'invert': - result.Invr = !!val; - break; - case 'reverse': - result.Rvrs = !!val; - break; - case 'color': - result['Clr '] = serializeColor(val); - break; - case 'highlightColor': - result.hglC = serializeColor(val); - break; - case 'shadowColor': - result.sdwC = serializeColor(val); - break; - case 'position': - result.Styl = exports.FStl.encode(val); - break; - case 'blendMode': - result['Md '] = exports.BlnM.encode(val); - break; - case 'highlightBlendMode': - result.hglM = exports.BlnM.encode(val); - break; - case 'shadowBlendMode': - result.sdwM = exports.BlnM.encode(val); - break; - case 'style': - result.bvlS = exports.BESl.encode(val); - break; - case 'direction': - result.bvlD = exports.BESs.encode(val); - break; - case 'technique': - if (objName === 'bevel') { - result.bvlT = exports.bvlT.encode(val); - } - else { - result.GlwT = exports.BETE.encode(val); - } - break; - case 'source': - result.glwS = exports.IGSr.encode(val); - break; - case 'type': - result.Type = exports.GrdT.encode(val); - break; - case 'interpolationMethod': - result.gs99 = exports.gradientInterpolationMethodType.encode(val); - break; - case 'opacity': - result.Opct = unitsPercent(val); - break; - case 'highlightOpacity': - result.hglO = unitsPercent(val); - break; - case 'shadowOpacity': - result.sdwO = unitsPercent(val); - break; - case 'angle': - if (objName === 'gradientOverlay') { - result.Angl = unitsAngle(val); - } - else { - result.lagl = unitsAngle(val); - } - break; - case 'altitude': - result.Lald = unitsAngle(val); - break; - case 'soften': - result.Sftn = unitsValue(val, key); - break; - case 'strength': - result.srgR = unitsPercent(val); - break; - case 'size': - result.blur = unitsValue(val, key); - break; - case 'noise': - result.Nose = unitsPercent(val); - break; - case 'range': - result.Inpr = unitsPercent(val); - break; - case 'choke': - result.Ckmt = unitsValue(val, key); - break; - case 'jitter': - result.ShdN = unitsPercent(val); - break; - case 'distance': - result.Dstn = unitsValue(val, key); - break; - case 'scale': - result['Scl '] = unitsPercent(val); - break; - case 'pattern': - result.Ptrn = { 'Nm ': val.name, Idnt: val.id }; - break; - case 'phase': - result.phase = { Hrzn: val.x, Vrtc: val.y }; - break; - case 'offset': - result.Ofst = { Hrzn: unitsPercent(val.x), Vrtc: unitsPercent(val.y) }; - break; - case 'contour': { - result[objName === 'satin' ? 'MpgS' : 'TrnS'] = { - 'Nm ': val.name, - 'Crv ': val.curve.map(function (p) { return ({ Hrzn: p.x, Vrtc: p.y }); }), - }; - break; - } - case 'gradient': - result.Grad = serializeGradient(val); - break; - case 'useTexture': - case 'useShape': - case 'layerConceals': - case 'present': - case 'showInDialog': - case 'antialiasGloss': - result[key] = val; - break; - default: - reportErrors && console.log("Invalid effect key: '".concat(key, "', value:"), val); - } - } - return result; -} -function parseGradient(grad) { - if (grad.GrdF === 'GrdF.CstS') { - var samples_1 = grad.Intr || 4096; - return { - type: 'solid', - name: grad['Nm '], - smoothness: grad.Intr / 4096, - colorStops: grad.Clrs.map(function (s) { return ({ - color: parseColor(s['Clr ']), - location: s.Lctn / samples_1, - midpoint: s.Mdpn / 100, - }); }), - opacityStops: grad.Trns.map(function (s) { return ({ - opacity: parsePercent(s.Opct), - location: s.Lctn / samples_1, - midpoint: s.Mdpn / 100, - }); }), - }; - } - else { - return { - type: 'noise', - name: grad['Nm '], - roughness: grad.Smth / 4096, - colorModel: exports.ClrS.decode(grad.ClrS), - randomSeed: grad.RndS, - restrictColors: !!grad.VctC, - addTransparency: !!grad.ShTr, - min: grad['Mnm '].map(function (x) { return x / 100; }), - max: grad['Mxm '].map(function (x) { return x / 100; }), - }; - } -} -function serializeGradient(grad) { - var _a, _b; - if (grad.type === 'solid') { - var samples_2 = Math.round(((_a = grad.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096); - return { - 'Nm ': grad.name || '', - GrdF: 'GrdF.CstS', - Intr: samples_2, - Clrs: grad.colorStops.map(function (s) { - var _a; - return ({ - 'Clr ': serializeColor(s.color), - Type: 'Clry.UsrS', - Lctn: Math.round(s.location * samples_2), - Mdpn: Math.round(((_a = s.midpoint) !== null && _a !== void 0 ? _a : 0.5) * 100), - }); - }), - Trns: grad.opacityStops.map(function (s) { - var _a; - return ({ - Opct: unitsPercent(s.opacity), - Lctn: Math.round(s.location * samples_2), - Mdpn: Math.round(((_a = s.midpoint) !== null && _a !== void 0 ? _a : 0.5) * 100), - }); - }), - }; - } - else { - return { - GrdF: 'GrdF.ClNs', - 'Nm ': grad.name || '', - ShTr: !!grad.addTransparency, - VctC: !!grad.restrictColors, - ClrS: exports.ClrS.encode(grad.colorModel), - RndS: grad.randomSeed || 0, - Smth: Math.round(((_b = grad.roughness) !== null && _b !== void 0 ? _b : 1) * 4096), - 'Mnm ': (grad.min || [0, 0, 0, 0]).map(function (x) { return x * 100; }), - 'Mxm ': (grad.max || [1, 1, 1, 1]).map(function (x) { return x * 100; }), - }; - } -} -function parseGradientContent(descriptor) { - var result = parseGradient(descriptor.Grad); - result.style = exports.GrdT.decode(descriptor.Type); - if (descriptor.Dthr !== undefined) - result.dither = descriptor.Dthr; - if (descriptor.Rvrs !== undefined) - result.reverse = descriptor.Rvrs; - if (descriptor.Angl !== undefined) - result.angle = parseAngle(descriptor.Angl); - if (descriptor['Scl '] !== undefined) - result.scale = parsePercent(descriptor['Scl ']); - if (descriptor.Algn !== undefined) - result.align = descriptor.Algn; - if (descriptor.Ofst !== undefined) { - result.offset = { - x: parsePercent(descriptor.Ofst.Hrzn), - y: parsePercent(descriptor.Ofst.Vrtc) - }; - } - return result; -} -function parsePatternContent(descriptor) { - var result = { - name: descriptor.Ptrn['Nm '], - id: descriptor.Ptrn.Idnt, - }; - if (descriptor.Lnkd !== undefined) - result.linked = descriptor.Lnkd; - if (descriptor.phase !== undefined) - result.phase = { x: descriptor.phase.Hrzn, y: descriptor.phase.Vrtc }; - return result; -} -function parseVectorContent(descriptor) { - if ('Grad' in descriptor) { - return parseGradientContent(descriptor); - } - else if ('Ptrn' in descriptor) { - return __assign({ type: 'pattern' }, parsePatternContent(descriptor)); - } - else if ('Clr ' in descriptor) { - return { type: 'color', color: parseColor(descriptor['Clr ']) }; - } - else { - throw new Error('Invalid vector content'); - } -} -exports.parseVectorContent = parseVectorContent; -function serializeGradientContent(content) { - var result = {}; - if (content.dither !== undefined) - result.Dthr = content.dither; - if (content.reverse !== undefined) - result.Rvrs = content.reverse; - if (content.angle !== undefined) - result.Angl = unitsAngle(content.angle); - result.Type = exports.GrdT.encode(content.style); - if (content.align !== undefined) - result.Algn = content.align; - if (content.scale !== undefined) - result['Scl '] = unitsPercent(content.scale); - if (content.offset) { - result.Ofst = { - Hrzn: unitsPercent(content.offset.x), - Vrtc: unitsPercent(content.offset.y), - }; - } - result.Grad = serializeGradient(content); - return result; -} -function serializePatternContent(content) { - var result = { - Ptrn: { - 'Nm ': content.name || '', - Idnt: content.id || '', - } - }; - if (content.linked !== undefined) - result.Lnkd = !!content.linked; - if (content.phase !== undefined) - result.phase = { Hrzn: content.phase.x, Vrtc: content.phase.y }; - return result; -} -function serializeVectorContent(content) { - if (content.type === 'color') { - return { key: 'SoCo', descriptor: { 'Clr ': serializeColor(content.color) } }; - } - else if (content.type === 'pattern') { - return { key: 'PtFl', descriptor: serializePatternContent(content) }; - } - else { - return { key: 'GdFl', descriptor: serializeGradientContent(content) }; - } -} -exports.serializeVectorContent = serializeVectorContent; -function parseColor(color) { - if ('H ' in color) { - return { h: parsePercentOrAngle(color['H ']), s: color.Strt, b: color.Brgh }; - } - else if ('Rd ' in color) { - return { r: color['Rd '], g: color['Grn '], b: color['Bl '] }; - } - else if ('Cyn ' in color) { - return { c: color['Cyn '], m: color.Mgnt, y: color['Ylw '], k: color.Blck }; - } - else if ('Gry ' in color) { - return { k: color['Gry '] }; - } - else if ('Lmnc' in color) { - return { l: color.Lmnc, a: color['A '], b: color['B '] }; - } - else if ('redFloat' in color) { - return { fr: color.redFloat, fg: color.greenFloat, fb: color.blueFloat }; - } - else { - throw new Error('Unsupported color descriptor'); - } -} -exports.parseColor = parseColor; -function serializeColor(color) { - if (!color) { - return { 'Rd ': 0, 'Grn ': 0, 'Bl ': 0 }; - } - else if ('r' in color) { - return { 'Rd ': color.r || 0, 'Grn ': color.g || 0, 'Bl ': color.b || 0 }; - } - else if ('fr' in color) { - return { redFloat: color.fr, greenFloat: color.fg, blueFloat: color.fb }; - } - else if ('h' in color) { - return { 'H ': unitsAngle(color.h * 360), Strt: color.s || 0, Brgh: color.b || 0 }; - } - else if ('c' in color) { - return { 'Cyn ': color.c || 0, Mgnt: color.m || 0, 'Ylw ': color.y || 0, Blck: color.k || 0 }; - } - else if ('l' in color) { - return { Lmnc: color.l || 0, 'A ': color.a || 0, 'B ': color.b || 0 }; - } - else if ('k' in color) { - return { 'Gry ': color.k }; - } - else { - throw new Error('Invalid color value'); - } -} -exports.serializeColor = serializeColor; -function parseAngle(x) { - if (x === undefined) - return 0; - if (x.units !== 'Angle') - throw new Error("Invalid units: ".concat(x.units)); - return x.value; -} -exports.parseAngle = parseAngle; -function parsePercent(x) { - if (x === undefined) - return 1; - if (x.units !== 'Percent') - throw new Error("Invalid units: ".concat(x.units)); - return x.value / 100; -} -exports.parsePercent = parsePercent; -function parsePercentOrAngle(x) { - if (x === undefined) - return 1; - if (x.units === 'Percent') - return x.value / 100; - if (x.units === 'Angle') - return x.value / 360; - throw new Error("Invalid units: ".concat(x.units)); -} -exports.parsePercentOrAngle = parsePercentOrAngle; -function parseUnits(_a) { - var units = _a.units, value = _a.value; - if (units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && - units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density') { - throw new Error("Invalid units: ".concat(JSON.stringify({ units: units, value: value }))); - } - return { value: value, units: units }; -} -exports.parseUnits = parseUnits; -function parseUnitsOrNumber(value, units) { - if (units === void 0) { units = 'Pixels'; } - if (typeof value === 'number') - return { value: value, units: units }; - return parseUnits(value); -} -exports.parseUnitsOrNumber = parseUnitsOrNumber; -function parseUnitsToNumber(_a, expectedUnits) { - var units = _a.units, value = _a.value; - if (units !== expectedUnits) - throw new Error("Invalid units: ".concat(JSON.stringify({ units: units, value: value }))); - return value; -} -exports.parseUnitsToNumber = parseUnitsToNumber; -function unitsAngle(value) { - return { units: 'Angle', value: value || 0 }; -} -exports.unitsAngle = unitsAngle; -function unitsPercent(value) { - return { units: 'Percent', value: Math.round((value || 0) * 100) }; -} -exports.unitsPercent = unitsPercent; -function unitsValue(x, key) { - if (x == null) - return { units: 'Pixels', value: 0 }; - if (typeof x !== 'object') - throw new Error("Invalid value: ".concat(JSON.stringify(x), " (key: ").concat(key, ") (should have value and units)")); - var units = x.units, value = x.value; - if (typeof value !== 'number') - throw new Error("Invalid value in ".concat(JSON.stringify(x), " (key: ").concat(key, ")")); - if (units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && - units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density') { - throw new Error("Invalid units in ".concat(JSON.stringify(x), " (key: ").concat(key, ")")); - } - return { units: units, value: value }; -} -exports.unitsValue = unitsValue; -exports.textGridding = (0, helpers_1.createEnum)('textGridding', 'none', { - none: 'None', - round: 'Rnd ', -}); -exports.Ornt = (0, helpers_1.createEnum)('Ornt', 'horizontal', { - horizontal: 'Hrzn', - vertical: 'Vrtc', -}); -exports.Annt = (0, helpers_1.createEnum)('Annt', 'sharp', { - none: 'Anno', - sharp: 'antiAliasSharp', - crisp: 'AnCr', - strong: 'AnSt', - smooth: 'AnSm', - platform: 'antiAliasPlatformGray', - platformLCD: 'antiAliasPlatformLCD', -}); -exports.warpStyle = (0, helpers_1.createEnum)('warpStyle', 'none', { - none: 'warpNone', - arc: 'warpArc', - arcLower: 'warpArcLower', - arcUpper: 'warpArcUpper', - arch: 'warpArch', - bulge: 'warpBulge', - shellLower: 'warpShellLower', - shellUpper: 'warpShellUpper', - flag: 'warpFlag', - wave: 'warpWave', - fish: 'warpFish', - rise: 'warpRise', - fisheye: 'warpFisheye', - inflate: 'warpInflate', - squeeze: 'warpSqueeze', - twist: 'warpTwist', - cylinder: 'warpCylinder', - custom: 'warpCustom', -}); -exports.BlnM = (0, helpers_1.createEnum)('BlnM', 'normal', { - 'normal': 'Nrml', - 'dissolve': 'Dslv', - 'darken': 'Drkn', - 'multiply': 'Mltp', - 'color burn': 'CBrn', - 'linear burn': 'linearBurn', - 'darker color': 'darkerColor', - 'lighten': 'Lghn', - 'screen': 'Scrn', - 'color dodge': 'CDdg', - 'linear dodge': 'linearDodge', - 'lighter color': 'lighterColor', - 'overlay': 'Ovrl', - 'soft light': 'SftL', - 'hard light': 'HrdL', - 'vivid light': 'vividLight', - 'linear light': 'linearLight', - 'pin light': 'pinLight', - 'hard mix': 'hardMix', - 'difference': 'Dfrn', - 'exclusion': 'Xclu', - 'subtract': 'blendSubtraction', - 'divide': 'blendDivide', - 'hue': 'H ', - 'saturation': 'Strt', - 'color': 'Clr ', - 'luminosity': 'Lmns', - // used in ABR - 'linear height': 'linearHeight', - 'height': 'Hght', - 'subtraction': 'Sbtr', // 2nd version of subtract ? -}); -exports.BESl = (0, helpers_1.createEnum)('BESl', 'inner bevel', { - 'inner bevel': 'InrB', - 'outer bevel': 'OtrB', - 'emboss': 'Embs', - 'pillow emboss': 'PlEb', - 'stroke emboss': 'strokeEmboss', -}); -exports.bvlT = (0, helpers_1.createEnum)('bvlT', 'smooth', { - 'smooth': 'SfBL', - 'chisel hard': 'PrBL', - 'chisel soft': 'Slmt', -}); -exports.BESs = (0, helpers_1.createEnum)('BESs', 'up', { - up: 'In ', - down: 'Out ', -}); -exports.BETE = (0, helpers_1.createEnum)('BETE', 'softer', { - softer: 'SfBL', - precise: 'PrBL', -}); -exports.IGSr = (0, helpers_1.createEnum)('IGSr', 'edge', { - edge: 'SrcE', - center: 'SrcC', -}); -exports.GrdT = (0, helpers_1.createEnum)('GrdT', 'linear', { - linear: 'Lnr ', - radial: 'Rdl ', - angle: 'Angl', - reflected: 'Rflc', - diamond: 'Dmnd', -}); -exports.animInterpStyleEnum = (0, helpers_1.createEnum)('animInterpStyle', 'linear', { - linear: 'Lnr ', - hold: 'hold', -}); -exports.stdTrackID = (0, helpers_1.createEnum)('stdTrackID', 'opacity', { - opacity: 'opacityTrack', - style: 'styleTrack', - sheetTransform: 'sheetTransformTrack', - sheetPosition: 'sheetPositionTrack', - globalLighting: 'globalLightingTrack', -}); -exports.gradientInterpolationMethodType = (0, helpers_1.createEnum)('gradientInterpolationMethodType', 'perceptual', { - perceptual: 'Perc', - linear: 'Lnr', - classic: 'Gcls', -}); -exports.ClrS = (0, helpers_1.createEnum)('ClrS', 'rgb', { - rgb: 'RGBC', - hsb: 'HSBl', - lab: 'LbCl', -}); -exports.FStl = (0, helpers_1.createEnum)('FStl', 'outside', { - outside: 'OutF', - center: 'CtrF', - inside: 'InsF' -}); -exports.FrFl = (0, helpers_1.createEnum)('FrFl', 'color', { - color: 'SClr', - gradient: 'GrFl', - pattern: 'Ptrn', -}); -exports.ESliceType = (0, helpers_1.createEnum)('ESliceType', 'image', { - image: 'Img ', - noImage: 'noImage', -}); -exports.ESliceHorzAlign = (0, helpers_1.createEnum)('ESliceHorzAlign', 'default', { - default: 'default', -}); -exports.ESliceVertAlign = (0, helpers_1.createEnum)('ESliceVertAlign', 'default', { - default: 'default', -}); -exports.ESliceOrigin = (0, helpers_1.createEnum)('ESliceOrigin', 'userGenerated', { - userGenerated: 'userGenerated', - autoGenerated: 'autoGenerated', - layer: 'layer', -}); -exports.ESliceBGColorType = (0, helpers_1.createEnum)('ESliceBGColorType', 'none', { - none: 'None', - matte: 'matte', - color: 'Clr ', -}); -exports.strokeStyleLineCapType = (0, helpers_1.createEnum)('strokeStyleLineCapType', 'butt', { - butt: 'strokeStyleButtCap', - round: 'strokeStyleRoundCap', - square: 'strokeStyleSquareCap', -}); -exports.strokeStyleLineJoinType = (0, helpers_1.createEnum)('strokeStyleLineJoinType', 'miter', { - miter: 'strokeStyleMiterJoin', - round: 'strokeStyleRoundJoin', - bevel: 'strokeStyleBevelJoin', -}); -exports.strokeStyleLineAlignment = (0, helpers_1.createEnum)('strokeStyleLineAlignment', 'inside', { - inside: 'strokeStyleAlignInside', - center: 'strokeStyleAlignCenter', - outside: 'strokeStyleAlignOutside', -}); +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.strokeStyleLineAlignment = exports.strokeStyleLineJoinType = exports.strokeStyleLineCapType = exports.FrFl = exports.FStl = exports.ClrS = exports.gradientInterpolationMethodType = exports.stdTrackID = exports.animInterpStyleEnum = exports.GrdT = exports.IGSr = exports.BETE = exports.BESs = exports.bvlT = exports.BESl = exports.BlnM = exports.warpStyle = exports.Annt = exports.Ornt = exports.textGridding = exports.unitsValue = exports.unitsPercent = exports.unitsAngle = exports.parseUnitsToNumber = exports.parseUnitsOrNumber = exports.parseUnits = exports.parsePercentOrAngle = exports.parsePercent = exports.parseAngle = exports.serializeColor = exports.parseColor = exports.serializeVectorContent = exports.parseVectorContent = exports.serializeTrackList = exports.parseTrackList = exports.parseEffects = exports.serializeEffects = exports.xyToHorzVrtc = exports.horzVrtcToXY = exports.writeVersionAndDescriptor = exports.readVersionAndDescriptor = exports.writeDescriptorStructure = exports.readDescriptorStructure = exports.readAsciiStringOrClassId = exports.setLogErrors = void 0; +var helpers_1 = require("./helpers"); +var psdReader_1 = require("./psdReader"); +var psdWriter_1 = require("./psdWriter"); +function revMap(map) { + var result = {}; + Object.keys(map).forEach(function (key) { return result[map[key]] = key; }); + return result; +} +var unitsMap = { + '#Ang': 'Angle', + '#Rsl': 'Density', + '#Rlt': 'Distance', + '#Nne': 'None', + '#Prc': 'Percent', + '#Pxl': 'Pixels', + '#Mlm': 'Millimeters', + '#Pnt': 'Points', + 'RrPi': 'Picas', + 'RrIn': 'Inches', + 'RrCm': 'Centimeters', +}; +var unitsMapRev = revMap(unitsMap); +var logErrors = false; +function setLogErrors(value) { + logErrors = value; +} +exports.setLogErrors = setLogErrors; +function makeType(name, classID) { + return { name: name, classID: classID }; +} +var nullType = makeType('', 'null'); +var fieldToExtType = { + strokeStyleContent: makeType('', 'solidColorLayer'), + // printProofSetup: makeType('校样设置', 'proofSetup'), // TESTING + printProofSetup: makeType('Proof Setup', 'proofSetup'), + patternFill: makeType('', 'patternFill'), + Grad: makeType('Gradient', 'Grdn'), + ebbl: makeType('', 'ebbl'), + SoFi: makeType('', 'SoFi'), + GrFl: makeType('', 'GrFl'), + sdwC: makeType('', 'RGBC'), + hglC: makeType('', 'RGBC'), + 'Clr ': makeType('', 'RGBC'), + 'tintColor': makeType('', 'RGBC'), + Ofst: makeType('', 'Pnt '), + ChFX: makeType('', 'ChFX'), + MpgS: makeType('', 'ShpC'), + DrSh: makeType('', 'DrSh'), + IrSh: makeType('', 'IrSh'), + OrGl: makeType('', 'OrGl'), + IrGl: makeType('', 'IrGl'), + TrnS: makeType('', 'ShpC'), + Ptrn: makeType('', 'Ptrn'), + FrFX: makeType('', 'FrFX'), + phase: makeType('', 'Pnt '), + frameStep: nullType, + duration: nullType, + workInTime: nullType, + workOutTime: nullType, + audioClipGroupList: nullType, + bounds: makeType('', 'Rctn'), + customEnvelopeWarp: makeType('', 'customEnvelopeWarp'), + warp: makeType('', 'warp'), + 'Sz ': makeType('', 'Pnt '), + origin: makeType('', 'Pnt '), + autoExpandOffset: makeType('', 'Pnt '), + keyOriginShapeBBox: makeType('', 'unitRect'), + Vrsn: nullType, + psVersion: nullType, + docDefaultNewArtboardBackgroundColor: makeType('', 'RGBC'), + artboardRect: makeType('', 'classFloatRect'), + keyOriginRRectRadii: makeType('', 'radii'), + keyOriginBoxCorners: nullType, + rectangleCornerA: makeType('', 'Pnt '), + rectangleCornerB: makeType('', 'Pnt '), + rectangleCornerC: makeType('', 'Pnt '), + rectangleCornerD: makeType('', 'Pnt '), + compInfo: nullType, + Trnf: makeType('Transform', 'Trnf'), + quiltWarp: makeType('', 'quiltWarp'), + generatorSettings: nullType, + crema: nullType, + FrIn: nullType, + blendOptions: nullType, + FXRf: nullType, + Lefx: nullType, + time: nullType, + animKey: nullType, + timeScope: nullType, + inTime: nullType, + outTime: nullType, + sheetStyle: nullType, + translation: nullType, + Skew: nullType, + 'Lnk ': makeType('', 'ExternalFileLink'), + frameReader: makeType('', 'FrameReader'), + effectParams: makeType('', 'motionTrackEffectParams'), +}; +var fieldToArrayExtType = { + 'Crv ': makeType('', 'CrPt'), + Clrs: makeType('', 'Clrt'), + Trns: makeType('', 'TrnS'), + keyDescriptorList: nullType, + solidFillMulti: makeType('', 'SoFi'), + gradientFillMulti: makeType('', 'GrFl'), + dropShadowMulti: makeType('', 'DrSh'), + innerShadowMulti: makeType('', 'IrSh'), + frameFXMulti: makeType('', 'FrFX'), + FrIn: nullType, + FSts: nullType, + LaSt: nullType, + sheetTimelineOptions: nullType, + trackList: makeType('', 'animationTrack'), + globalTrackList: makeType('', 'animationTrack'), + keyList: nullType, + audioClipGroupList: nullType, + audioClipList: nullType, +}; +var typeToField = { + 'TEXT': [ + 'Txt ', 'printerName', 'Nm ', 'Idnt', 'blackAndWhitePresetFileName', 'LUT3DFileName', + 'presetFileName', 'curvesPresetFileName', 'mixerPresetFileName', 'placed', 'description', 'reason', + 'artboardPresetName', 'json', 'groupID', 'clipID', 'relPath', 'fullPath', 'mediaDescriptor', + ], + 'tdta': ['EngineData', 'LUT3DFileData'], + 'long': [ + 'TextIndex', 'RndS', 'Mdpn', 'Smth', 'Lctn', 'strokeStyleVersion', 'LaID', 'Vrsn', 'Cnt ', + 'Brgh', 'Cntr', 'means', 'vibrance', 'Strt', 'bwPresetKind', 'presetKind', 'comp', 'compID', 'originalCompID', + 'curvesPresetKind', 'mixerPresetKind', 'uOrder', 'vOrder', 'PgNm', 'totalPages', 'Crop', + 'numerator', 'denominator', 'frameCount', 'Annt', 'keyOriginType', 'unitValueQuadVersion', + 'keyOriginIndex', 'major', 'minor', 'fix', 'docDefaultNewArtboardBackgroundType', 'artboardBackgroundType', + 'numModifyingFX', 'deformNumRows', 'deformNumCols', 'FrID', 'FrDl', 'FsID', 'LCnt', 'AFrm', 'AFSt', + 'numBefore', 'numAfter', 'Spcn', 'minOpacity', 'maxOpacity', 'BlnM', 'sheetID', 'gblA', 'globalAltitude', + 'descVersion', 'frameReaderType', 'LyrI', 'zoomOrigin', + ], + 'enum': [ + 'textGridding', 'Ornt', 'warpStyle', 'warpRotate', 'Inte', 'Bltn', 'ClrS', + 'sdwM', 'hglM', 'bvlT', 'bvlS', 'bvlD', 'Md ', 'glwS', 'GrdF', 'GlwT', + 'strokeStyleLineCapType', 'strokeStyleLineJoinType', 'strokeStyleLineAlignment', + 'strokeStyleBlendMode', 'PntT', 'Styl', 'lookupType', 'LUTFormat', 'dataOrder', + 'tableOrder', 'enableCompCore', 'enableCompCoreGPU', 'compCoreSupport', 'compCoreGPUSupport', 'Engn', + 'enableCompCoreThreads', 'gs99', 'FrDs', 'trackID', 'animInterpStyle', + ], + 'bool': [ + 'PstS', 'printSixteenBit', 'masterFXSwitch', 'enab', 'uglg', 'antialiasGloss', + 'useShape', 'useTexture', 'uglg', 'antialiasGloss', 'useShape', + 'useTexture', 'Algn', 'Rvrs', 'Dthr', 'Invr', 'VctC', 'ShTr', 'layerConceals', + 'strokeEnabled', 'fillEnabled', 'strokeStyleScaleLock', 'strokeStyleStrokeAdjust', + 'hardProof', 'MpBl', 'paperWhite', 'useLegacy', 'Auto', 'Lab ', 'useTint', 'keyShapeInvalidated', + 'autoExpandEnabled', 'autoNestEnabled', 'autoPositionEnabled', 'shrinkwrapOnSaveEnabled', + 'present', 'showInDialog', 'overprint', 'sheetDisclosed', 'lightsDisclosed', 'meshesDisclosed', + 'materialsDisclosed', 'hasMotion', 'muted', 'Effc', 'selected', 'autoScope', 'fillCanvas', + ], + 'doub': [ + 'warpValue', 'warpPerspective', 'warpPerspectiveOther', 'Intr', 'Wdth', 'Hght', + 'strokeStyleMiterLimit', 'strokeStyleResolution', 'layerTime', 'keyOriginResolution', + 'xx', 'xy', 'yx', 'yy', 'tx', 'ty', 'FrGA', 'frameRate', 'audioLevel', 'rotation', + ], + 'UntF': [ + 'Scl ', 'sdwO', 'hglO', 'lagl', 'Lald', 'srgR', 'blur', 'Sftn', 'Opct', 'Dstn', 'Angl', + 'Ckmt', 'Nose', 'Inpr', 'ShdN', 'strokeStyleLineWidth', 'strokeStyleLineDashOffset', + 'strokeStyleOpacity', 'H ', 'Top ', 'Left', 'Btom', 'Rght', 'Rslt', + 'topRight', 'topLeft', 'bottomLeft', 'bottomRight', + ], + 'VlLs': [ + 'Crv ', 'Clrs', 'Mnm ', 'Mxm ', 'Trns', 'pathList', 'strokeStyleLineDashSet', 'FrLs', + 'LaSt', 'Trnf', 'nonAffineTransform', 'keyDescriptorList', 'guideIndeces', 'gradientFillMulti', + 'solidFillMulti', 'frameFXMulti', 'innerShadowMulti', 'dropShadowMulti', 'FrIn', 'FSts', 'FsFr', + 'sheetTimelineOptions', 'audioClipList', 'trackList', 'globalTrackList', 'keyList', 'audioClipList', + ], + 'ObAr': ['meshPoints', 'quiltSliceX', 'quiltSliceY'], + 'obj ': ['null'], +}; +var channels = [ + 'Rd ', 'Grn ', 'Bl ', 'Yllw', 'Ylw ', 'Cyn ', 'Mgnt', 'Blck', 'Gry ', 'Lmnc', 'A ', 'B ', +]; +var fieldToArrayType = { + 'Mnm ': 'long', + 'Mxm ': 'long', + 'FrLs': 'long', + 'strokeStyleLineDashSet': 'UntF', + 'Trnf': 'doub', + 'nonAffineTransform': 'doub', + 'keyDescriptorList': 'Objc', + 'gradientFillMulti': 'Objc', + 'solidFillMulti': 'Objc', + 'frameFXMulti': 'Objc', + 'innerShadowMulti': 'Objc', + 'dropShadowMulti': 'Objc', + 'LaSt': 'Objc', + 'FrIn': 'Objc', + 'FSts': 'Objc', + 'FsFr': 'long', + 'blendOptions': 'Objc', + 'sheetTimelineOptions': 'Objc', + 'keyList': 'Objc', +}; +var fieldToType = {}; +for (var _i = 0, _a = Object.keys(typeToField); _i < _a.length; _i++) { + var type = _a[_i]; + for (var _b = 0, _c = typeToField[type]; _b < _c.length; _b++) { + var field = _c[_b]; + fieldToType[field] = type; + } +} +for (var _d = 0, _e = Object.keys(fieldToExtType); _d < _e.length; _d++) { + var field = _e[_d]; + if (!fieldToType[field]) + fieldToType[field] = 'Objc'; +} +for (var _f = 0, _g = Object.keys(fieldToArrayExtType); _f < _g.length; _f++) { + var field = _g[_f]; + fieldToArrayType[field] = 'Objc'; +} +function getTypeByKey(key, value, root, parent) { + if (key === 'Sz ') { + return ('Wdth' in value) ? 'Objc' : (('units' in value) ? 'UntF' : 'doub'); + } + else if (key === 'Type') { + return typeof value === 'string' ? 'enum' : 'long'; + } + else if (key === 'AntA') { + return typeof value === 'string' ? 'enum' : 'bool'; + } + else if ((key === 'Hrzn' || key === 'Vrtc') && parent.Type === 'keyType.Pstn') { + return 'long'; + } + else if (key === 'Hrzn' || key === 'Vrtc' || key === 'Top ' || key === 'Left' || key === 'Btom' || key === 'Rght') { + return typeof value === 'number' ? 'doub' : 'UntF'; + } + else if (key === 'Vrsn') { + return typeof value === 'number' ? 'long' : 'Objc'; + } + else if (key === 'Rd ' || key === 'Grn ' || key === 'Bl ') { + return root === 'artd' ? 'long' : 'doub'; + } + else if (key === 'Trnf') { + return Array.isArray(value) ? 'VlLs' : 'Objc'; + } + else { + return fieldToType[key]; + } +} +function readAsciiStringOrClassId(reader) { + var length = (0, psdReader_1.readInt32)(reader); + return (0, psdReader_1.readAsciiString)(reader, length || 4); +} +exports.readAsciiStringOrClassId = readAsciiStringOrClassId; +function writeAsciiStringOrClassId(writer, value) { + if (value.length === 4 && value !== 'warp' && value !== 'time' && value !== 'hold') { + // write classId + (0, psdWriter_1.writeInt32)(writer, 0); + (0, psdWriter_1.writeSignature)(writer, value); + } + else { + // write ascii string + (0, psdWriter_1.writeInt32)(writer, value.length); + for (var i = 0; i < value.length; i++) { + (0, psdWriter_1.writeUint8)(writer, value.charCodeAt(i)); + } + } +} +function readDescriptorStructure(reader) { + var object = {}; + // object.__struct = + readClassStructure(reader); + var itemsCount = (0, psdReader_1.readUint32)(reader); + // console.log('//', object.__struct); + for (var i = 0; i < itemsCount; i++) { + var key = readAsciiStringOrClassId(reader); + var type = (0, psdReader_1.readSignature)(reader); + // console.log(`> '${key}' '${type}'`); + var data = readOSType(reader, type); + // if (!getTypeByKey(key, data)) console.log(`> '${key}' '${type}'`, data); + object[key] = data; + } + return object; +} +exports.readDescriptorStructure = readDescriptorStructure; +function writeDescriptorStructure(writer, name, classId, value, root) { + if (logErrors && !classId) + console.log('Missing classId for: ', name, classId, value); + // write class structure + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, name); + writeAsciiStringOrClassId(writer, classId); + var keys = Object.keys(value); + (0, psdWriter_1.writeUint32)(writer, keys.length); + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + var type = getTypeByKey(key, value[key], root, value); + var extType = fieldToExtType[key]; + if (key === 'Scl ' && 'Hrzn' in value[key]) { + type = 'Objc'; + extType = nullType; + } + else if (key === 'audioClipGroupList' && keys.length === 1) { + type = 'VlLs'; + } + else if ((key === 'Strt' || key === 'Brgh') && 'H ' in value) { + type = 'doub'; + } + else if (key === 'Strt') { + type = 'Objc'; + extType = nullType; + } + else if (channels.indexOf(key) !== -1) { + type = (classId === 'RGBC' && root !== 'artd') ? 'doub' : 'long'; + } + else if (key === 'profile') { + type = classId === 'printOutput' ? 'TEXT' : 'tdta'; + } + else if (key === 'strokeStyleContent') { + if (value[key]['Clr ']) { + extType = makeType('', 'solidColorLayer'); + } + else if (value[key].Grad) { + extType = makeType('', 'gradientLayer'); + } + else if (value[key].Ptrn) { + extType = makeType('', 'patternLayer'); + } + else { + logErrors && console.log('Invalid strokeStyleContent value', value[key]); + } + } + else if (key === 'bounds' && root === 'quiltWarp') { + extType = makeType('', 'classFloatRect'); + } + if (extType && extType.classID === 'RGBC') { + if ('H ' in value[key]) + extType = { classID: 'HSBC', name: '' }; + // TODO: other color spaces + } + writeAsciiStringOrClassId(writer, key); + (0, psdWriter_1.writeSignature)(writer, type || 'long'); + writeOSType(writer, type || 'long', value[key], key, extType, root); + if (logErrors && !type) + console.log("Missing descriptor field type for: '".concat(key, "' in"), value); + } +} +exports.writeDescriptorStructure = writeDescriptorStructure; +function readOSType(reader, type) { + switch (type) { + case 'obj ': // Reference + return readReferenceStructure(reader); + case 'Objc': // Descriptor + case 'GlbO': // GlobalObject same as Descriptor + return readDescriptorStructure(reader); + case 'VlLs': { // List + var length_1 = (0, psdReader_1.readInt32)(reader); + var items = []; + for (var i = 0; i < length_1; i++) { + var type_1 = (0, psdReader_1.readSignature)(reader); + // console.log(' >', type); + items.push(readOSType(reader, type_1)); + } + return items; + } + case 'doub': // Double + return (0, psdReader_1.readFloat64)(reader); + case 'UntF': { // Unit double + var units = (0, psdReader_1.readSignature)(reader); + var value = (0, psdReader_1.readFloat64)(reader); + if (!unitsMap[units]) + throw new Error("Invalid units: ".concat(units)); + return { units: unitsMap[units], value: value }; + } + case 'UnFl': { // Unit float + var units = (0, psdReader_1.readSignature)(reader); + var value = (0, psdReader_1.readFloat32)(reader); + if (!unitsMap[units]) + throw new Error("Invalid units: ".concat(units)); + return { units: unitsMap[units], value: value }; + } + case 'TEXT': // String + return (0, psdReader_1.readUnicodeString)(reader); + case 'enum': { // Enumerated + var type_2 = readAsciiStringOrClassId(reader); + var value = readAsciiStringOrClassId(reader); + return "".concat(type_2, ".").concat(value); + } + case 'long': // Integer + return (0, psdReader_1.readInt32)(reader); + case 'comp': { // Large Integer + var low = (0, psdReader_1.readUint32)(reader); + var high = (0, psdReader_1.readUint32)(reader); + return { low: low, high: high }; + } + case 'bool': // Boolean + return !!(0, psdReader_1.readUint8)(reader); + case 'type': // Class + case 'GlbC': // Class + return readClassStructure(reader); + case 'alis': { // Alias + var length_2 = (0, psdReader_1.readInt32)(reader); + return (0, psdReader_1.readAsciiString)(reader, length_2); + } + case 'tdta': { // Raw Data + var length_3 = (0, psdReader_1.readInt32)(reader); + return (0, psdReader_1.readBytes)(reader, length_3); + } + case 'ObAr': { // Object array + (0, psdReader_1.readInt32)(reader); // version: 16 + (0, psdReader_1.readUnicodeString)(reader); // name: '' + readAsciiStringOrClassId(reader); // 'rationalPoint' + var length_4 = (0, psdReader_1.readInt32)(reader); + var items = []; + for (var i = 0; i < length_4; i++) { + var type1 = readAsciiStringOrClassId(reader); // type Hrzn | Vrtc + (0, psdReader_1.readSignature)(reader); // UnFl + (0, psdReader_1.readSignature)(reader); // units ? '#Pxl' + var valuesCount = (0, psdReader_1.readInt32)(reader); + var values = []; + for (var j = 0; j < valuesCount; j++) { + values.push((0, psdReader_1.readFloat64)(reader)); + } + items.push({ type: type1, values: values }); + } + return items; + } + case 'Pth ': { // File path + /*const length =*/ (0, psdReader_1.readInt32)(reader); + var sig = (0, psdReader_1.readSignature)(reader); + /*const pathSize =*/ (0, psdReader_1.readInt32LE)(reader); + var charsCount = (0, psdReader_1.readInt32LE)(reader); + var path = (0, psdReader_1.readUnicodeStringWithLength)(reader, charsCount); + return { sig: sig, path: path }; + } + default: + throw new Error("Invalid TySh descriptor OSType: ".concat(type, " at ").concat(reader.offset.toString(16))); + } +} +var ObArTypes = { + meshPoints: 'rationalPoint', + quiltSliceX: 'UntF', + quiltSliceY: 'UntF', +}; +function writeOSType(writer, type, value, key, extType, root) { + switch (type) { + case 'obj ': // Reference + writeReferenceStructure(writer, key, value); + break; + case 'Objc': // Descriptor + case 'GlbO': // GlobalObject same as Descriptor + if (!extType) + throw new Error("Missing ext type for: '".concat(key, "' (").concat(JSON.stringify(value), ")")); + writeDescriptorStructure(writer, extType.name, extType.classID, value, root); + break; + case 'VlLs': // List + (0, psdWriter_1.writeInt32)(writer, value.length); + for (var i = 0; i < value.length; i++) { + var type_3 = fieldToArrayType[key]; + (0, psdWriter_1.writeSignature)(writer, type_3 || 'long'); + writeOSType(writer, type_3 || 'long', value[i], '', fieldToArrayExtType[key], root); + if (logErrors && !type_3) + console.log("Missing descriptor array type for: '".concat(key, "' in"), value); + } + break; + case 'doub': // Double + (0, psdWriter_1.writeFloat64)(writer, value); + break; + case 'UntF': // Unit double + if (!unitsMapRev[value.units]) + throw new Error("Invalid units: ".concat(value.units, " in ").concat(key)); + (0, psdWriter_1.writeSignature)(writer, unitsMapRev[value.units]); + (0, psdWriter_1.writeFloat64)(writer, value.value); + break; + case 'UnFl': // Unit float + if (!unitsMapRev[value.units]) + throw new Error("Invalid units: ".concat(value.units, " in ").concat(key)); + (0, psdWriter_1.writeSignature)(writer, unitsMapRev[value.units]); + (0, psdWriter_1.writeFloat32)(writer, value.value); + break; + case 'TEXT': // String + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, value); + break; + case 'enum': { // Enumerated + var _a = value.split('.'), _type = _a[0], val = _a[1]; + writeAsciiStringOrClassId(writer, _type); + writeAsciiStringOrClassId(writer, val); + break; + } + case 'long': // Integer + (0, psdWriter_1.writeInt32)(writer, value); + break; + // case 'comp': // Large Integer + // writeLargeInteger(reader); + case 'bool': // Boolean + (0, psdWriter_1.writeUint8)(writer, value ? 1 : 0); + break; + // case 'type': // Class + // case 'GlbC': // Class + // writeClassStructure(reader); + // case 'alis': // Alias + // writeAliasStructure(reader); + case 'tdta': // Raw Data + (0, psdWriter_1.writeInt32)(writer, value.byteLength); + (0, psdWriter_1.writeBytes)(writer, value); + break; + case 'ObAr': { // Object array + (0, psdWriter_1.writeInt32)(writer, 16); // version + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, ''); // name + var type_4 = ObArTypes[key]; + if (!type_4) + throw new Error("Not implemented ObArType for: ".concat(key)); + writeAsciiStringOrClassId(writer, type_4); + (0, psdWriter_1.writeInt32)(writer, value.length); + for (var i = 0; i < value.length; i++) { + writeAsciiStringOrClassId(writer, value[i].type); // Hrzn | Vrtc + (0, psdWriter_1.writeSignature)(writer, 'UnFl'); + (0, psdWriter_1.writeSignature)(writer, '#Pxl'); + (0, psdWriter_1.writeInt32)(writer, value[i].values.length); + for (var j = 0; j < value[i].values.length; j++) { + (0, psdWriter_1.writeFloat64)(writer, value[i].values[j]); + } + } + break; + } + // case 'Pth ': // File path + // writeFilePath(reader); + default: + throw new Error("Not implemented descriptor OSType: ".concat(type)); + } +} +function readReferenceStructure(reader) { + var itemsCount = (0, psdReader_1.readInt32)(reader); + var items = []; + for (var i = 0; i < itemsCount; i++) { + var type = (0, psdReader_1.readSignature)(reader); + switch (type) { + case 'prop': { // Property + readClassStructure(reader); + var keyID = readAsciiStringOrClassId(reader); + items.push(keyID); + break; + } + case 'Clss': // Class + items.push(readClassStructure(reader)); + break; + case 'Enmr': { // Enumerated Reference + readClassStructure(reader); + var typeID = readAsciiStringOrClassId(reader); + var value = readAsciiStringOrClassId(reader); + items.push("".concat(typeID, ".").concat(value)); + break; + } + case 'rele': { // Offset + // const { name, classID } = + readClassStructure(reader); + items.push((0, psdReader_1.readUint32)(reader)); + break; + } + case 'Idnt': // Identifier + items.push((0, psdReader_1.readInt32)(reader)); + break; + case 'indx': // Index + items.push((0, psdReader_1.readInt32)(reader)); + break; + case 'name': { // Name + readClassStructure(reader); + items.push((0, psdReader_1.readUnicodeString)(reader)); + break; + } + default: + throw new Error("Invalid descriptor reference type: ".concat(type)); + } + } + return items; +} +function writeReferenceStructure(writer, _key, items) { + (0, psdWriter_1.writeInt32)(writer, items.length); + for (var i = 0; i < items.length; i++) { + var value = items[i]; + var type = 'unknown'; + if (typeof value === 'string') { + if (/^[a-z]+\.[a-z]+$/i.test(value)) { + type = 'Enmr'; + } + else { + type = 'name'; + } + } + (0, psdWriter_1.writeSignature)(writer, type); + switch (type) { + // case 'prop': // Property + // case 'Clss': // Class + case 'Enmr': { // Enumerated Reference + var _a = value.split('.'), typeID = _a[0], enumValue = _a[1]; + writeClassStructure(writer, '\0', typeID); + writeAsciiStringOrClassId(writer, typeID); + writeAsciiStringOrClassId(writer, enumValue); + break; + } + // case 'rele': // Offset + // case 'Idnt': // Identifier + // case 'indx': // Index + case 'name': { // Name + writeClassStructure(writer, '\0', 'Lyr '); + (0, psdWriter_1.writeUnicodeString)(writer, value + '\0'); + break; + } + default: + throw new Error("Invalid descriptor reference type: ".concat(type)); + } + } + return items; +} +function readClassStructure(reader) { + var name = (0, psdReader_1.readUnicodeString)(reader); + var classID = readAsciiStringOrClassId(reader); + // console.log({ name, classID }); + return { name: name, classID: classID }; +} +function writeClassStructure(writer, name, classID) { + (0, psdWriter_1.writeUnicodeString)(writer, name); + writeAsciiStringOrClassId(writer, classID); +} +function readVersionAndDescriptor(reader) { + var version = (0, psdReader_1.readUint32)(reader); + if (version !== 16) + throw new Error("Invalid descriptor version: ".concat(version)); + var desc = readDescriptorStructure(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + return desc; +} +exports.readVersionAndDescriptor = readVersionAndDescriptor; +function writeVersionAndDescriptor(writer, name, classID, descriptor, root) { + if (root === void 0) { root = ''; } + (0, psdWriter_1.writeUint32)(writer, 16); // version + writeDescriptorStructure(writer, name, classID, descriptor, root); +} +exports.writeVersionAndDescriptor = writeVersionAndDescriptor; +function horzVrtcToXY(hv) { + return { x: hv.Hrzn, y: hv.Vrtc }; +} +exports.horzVrtcToXY = horzVrtcToXY; +function xyToHorzVrtc(xy) { + return { Hrzn: xy.x, Vrtc: xy.y }; +} +exports.xyToHorzVrtc = xyToHorzVrtc; +function parseFxObject(fx) { + var stroke = { + enabled: !!fx.enab, + position: exports.FStl.decode(fx.Styl), + fillType: exports.FrFl.decode(fx.PntT), + blendMode: exports.BlnM.decode(fx['Md ']), + opacity: parsePercent(fx.Opct), + size: parseUnits(fx['Sz ']), + }; + if (fx.present !== undefined) + stroke.present = fx.present; + if (fx.showInDialog !== undefined) + stroke.showInDialog = fx.showInDialog; + if (fx.overprint !== undefined) + stroke.overprint = fx.overprint; + if (fx['Clr ']) + stroke.color = parseColor(fx['Clr ']); + if (fx.Grad) + stroke.gradient = parseGradientContent(fx); + if (fx.Ptrn) + stroke.pattern = parsePatternContent(fx); + return stroke; +} +function serializeFxObject(stroke) { + var FrFX = {}; + FrFX.enab = !!stroke.enabled; + if (stroke.present !== undefined) + FrFX.present = !!stroke.present; + if (stroke.showInDialog !== undefined) + FrFX.showInDialog = !!stroke.showInDialog; + FrFX.Styl = exports.FStl.encode(stroke.position); + FrFX.PntT = exports.FrFl.encode(stroke.fillType); + FrFX['Md '] = exports.BlnM.encode(stroke.blendMode); + FrFX.Opct = unitsPercent(stroke.opacity); + FrFX['Sz '] = unitsValue(stroke.size, 'size'); + if (stroke.color) + FrFX['Clr '] = serializeColor(stroke.color); + if (stroke.gradient) + FrFX = __assign(__assign({}, FrFX), serializeGradientContent(stroke.gradient)); + if (stroke.pattern) + FrFX = __assign(__assign({}, FrFX), serializePatternContent(stroke.pattern)); + if (stroke.overprint !== undefined) + FrFX.overprint = !!stroke.overprint; + return FrFX; +} +function serializeEffects(e, log, multi) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; + var info = multi ? { + 'Scl ': unitsPercent((_a = e.scale) !== null && _a !== void 0 ? _a : 1), + masterFXSwitch: !e.disabled, + } : { + masterFXSwitch: !e.disabled, + 'Scl ': unitsPercent((_b = e.scale) !== null && _b !== void 0 ? _b : 1), + }; + var arrayKeys = ['dropShadow', 'innerShadow', 'solidFill', 'gradientOverlay', 'stroke']; + for (var _i = 0, arrayKeys_1 = arrayKeys; _i < arrayKeys_1.length; _i++) { + var key = arrayKeys_1[_i]; + if (e[key] && !Array.isArray(e[key])) + throw new Error("".concat(key, " should be an array")); + } + if (((_c = e.dropShadow) === null || _c === void 0 ? void 0 : _c[0]) && !multi) + info.DrSh = serializeEffectObject(e.dropShadow[0], 'dropShadow', log); + if (((_d = e.dropShadow) === null || _d === void 0 ? void 0 : _d[0]) && multi) + info.dropShadowMulti = e.dropShadow.map(function (i) { return serializeEffectObject(i, 'dropShadow', log); }); + if (((_e = e.innerShadow) === null || _e === void 0 ? void 0 : _e[0]) && !multi) + info.IrSh = serializeEffectObject(e.innerShadow[0], 'innerShadow', log); + if (((_f = e.innerShadow) === null || _f === void 0 ? void 0 : _f[0]) && multi) + info.innerShadowMulti = e.innerShadow.map(function (i) { return serializeEffectObject(i, 'innerShadow', log); }); + if (e.outerGlow) + info.OrGl = serializeEffectObject(e.outerGlow, 'outerGlow', log); + if (((_g = e.solidFill) === null || _g === void 0 ? void 0 : _g[0]) && multi) + info.solidFillMulti = e.solidFill.map(function (i) { return serializeEffectObject(i, 'solidFill', log); }); + if (((_h = e.gradientOverlay) === null || _h === void 0 ? void 0 : _h[0]) && multi) + info.gradientFillMulti = e.gradientOverlay.map(function (i) { return serializeEffectObject(i, 'gradientOverlay', log); }); + if (((_j = e.stroke) === null || _j === void 0 ? void 0 : _j[0]) && multi) + info.frameFXMulti = e.stroke.map(function (i) { return serializeFxObject(i); }); + if (e.innerGlow) + info.IrGl = serializeEffectObject(e.innerGlow, 'innerGlow', log); + if (e.bevel) + info.ebbl = serializeEffectObject(e.bevel, 'bevel', log); + if (((_k = e.solidFill) === null || _k === void 0 ? void 0 : _k[0]) && !multi) + info.SoFi = serializeEffectObject(e.solidFill[0], 'solidFill', log); + if (e.patternOverlay) + info.patternFill = serializeEffectObject(e.patternOverlay, 'patternOverlay', log); + if (((_l = e.gradientOverlay) === null || _l === void 0 ? void 0 : _l[0]) && !multi) + info.GrFl = serializeEffectObject(e.gradientOverlay[0], 'gradientOverlay', log); + if (e.satin) + info.ChFX = serializeEffectObject(e.satin, 'satin', log); + if (((_m = e.stroke) === null || _m === void 0 ? void 0 : _m[0]) && !multi) + info.FrFX = serializeFxObject((_o = e.stroke) === null || _o === void 0 ? void 0 : _o[0]); + if (multi) { + info.numModifyingFX = 0; + for (var _p = 0, _q = Object.keys(e); _p < _q.length; _p++) { + var key = _q[_p]; + var value = e[key]; + if (Array.isArray(value)) { + for (var _r = 0, value_1 = value; _r < value_1.length; _r++) { + var effect = value_1[_r]; + if (effect.enabled) + info.numModifyingFX++; + } + } + } + } + return info; +} +exports.serializeEffects = serializeEffects; +function parseEffects(info, log) { + var effects = {}; + if (!info.masterFXSwitch) + effects.disabled = true; + if (info['Scl ']) + effects.scale = parsePercent(info['Scl ']); + if (info.DrSh) + effects.dropShadow = [parseEffectObject(info.DrSh, log)]; + if (info.dropShadowMulti) + effects.dropShadow = info.dropShadowMulti.map(function (i) { return parseEffectObject(i, log); }); + if (info.IrSh) + effects.innerShadow = [parseEffectObject(info.IrSh, log)]; + if (info.innerShadowMulti) + effects.innerShadow = info.innerShadowMulti.map(function (i) { return parseEffectObject(i, log); }); + if (info.OrGl) + effects.outerGlow = parseEffectObject(info.OrGl, log); + if (info.IrGl) + effects.innerGlow = parseEffectObject(info.IrGl, log); + if (info.ebbl) + effects.bevel = parseEffectObject(info.ebbl, log); + if (info.SoFi) + effects.solidFill = [parseEffectObject(info.SoFi, log)]; + if (info.solidFillMulti) + effects.solidFill = info.solidFillMulti.map(function (i) { return parseEffectObject(i, log); }); + if (info.patternFill) + effects.patternOverlay = parseEffectObject(info.patternFill, log); + if (info.GrFl) + effects.gradientOverlay = [parseEffectObject(info.GrFl, log)]; + if (info.gradientFillMulti) + effects.gradientOverlay = info.gradientFillMulti.map(function (i) { return parseEffectObject(i, log); }); + if (info.ChFX) + effects.satin = parseEffectObject(info.ChFX, log); + if (info.FrFX) + effects.stroke = [parseFxObject(info.FrFX)]; + if (info.frameFXMulti) + effects.stroke = info.frameFXMulti.map(function (i) { return parseFxObject(i); }); + return effects; +} +exports.parseEffects = parseEffects; +function parseKeyList(keyList, logMissingFeatures) { + var keys = []; + for (var j = 0; j < keyList.length; j++) { + var key = keyList[j]; + var time = key.time, selected = key.selected, animKey = key.animKey; + var interpolation = exports.animInterpStyleEnum.decode(key.animInterpStyle); + switch (animKey.Type) { + case 'keyType.Opct': + keys.push({ interpolation: interpolation, time: time, selected: selected, type: 'opacity', value: parsePercent(animKey.Opct) }); + break; + case 'keyType.Pstn': + keys.push({ interpolation: interpolation, time: time, selected: selected, type: 'position', x: animKey.Hrzn, y: animKey.Vrtc }); + break; + case 'keyType.Trnf': + keys.push({ + interpolation: interpolation, + time: time, + selected: selected, + type: 'transform', + scale: horzVrtcToXY(animKey['Scl ']), skew: horzVrtcToXY(animKey.Skew), rotation: animKey.rotation, translation: horzVrtcToXY(animKey.translation) + }); + break; + case 'keyType.sheetStyle': { + var key_1 = { interpolation: interpolation, time: time, selected: selected, type: 'style' }; + if (animKey.sheetStyle.Lefx) + key_1.style = parseEffects(animKey.sheetStyle.Lefx, logMissingFeatures); + keys.push(key_1); + break; + } + case 'keyType.globalLighting': { + keys.push({ + interpolation: interpolation, + time: time, + selected: selected, + type: 'globalLighting', + globalAngle: animKey.gblA, globalAltitude: animKey.globalAltitude + }); + break; + } + default: throw new Error("Unsupported keyType value"); + } + } + return keys; +} +function serializeKeyList(keys) { + var keyList = []; + for (var j = 0; j < keys.length; j++) { + var key = keys[j]; + var time = key.time, _a = key.selected, selected = _a === void 0 ? false : _a, interpolation = key.interpolation; + var animInterpStyle = exports.animInterpStyleEnum.encode(interpolation); + var animKey = void 0; + switch (key.type) { + case 'opacity': + animKey = { Type: 'keyType.Opct', Opct: unitsPercent(key.value) }; + break; + case 'position': + animKey = { Type: 'keyType.Pstn', Hrzn: key.x, Vrtc: key.y }; + break; + case 'transform': + animKey = { Type: 'keyType.Trnf', 'Scl ': xyToHorzVrtc(key.scale), Skew: xyToHorzVrtc(key.skew), rotation: key.rotation, translation: xyToHorzVrtc(key.translation) }; + break; + case 'style': + animKey = { Type: 'keyType.sheetStyle', sheetStyle: { Vrsn: 1, blendOptions: {} } }; + if (key.style) + animKey.sheetStyle = { Vrsn: 1, Lefx: serializeEffects(key.style, false, false), blendOptions: {} }; + break; + case 'globalLighting': { + animKey = { Type: 'keyType.globalLighting', gblA: key.globalAngle, globalAltitude: key.globalAltitude }; + break; + } + default: throw new Error("Unsupported keyType value"); + } + keyList.push({ Vrsn: 1, animInterpStyle: animInterpStyle, time: time, animKey: animKey, selected: selected }); + } + return keyList; +} +function parseTrackList(trackList, logMissingFeatures) { + var tracks = []; + for (var i = 0; i < trackList.length; i++) { + var tr = trackList[i]; + var track = { + type: exports.stdTrackID.decode(tr.trackID), + enabled: tr.enab, + keys: parseKeyList(tr.keyList, logMissingFeatures), + }; + if (tr.effectParams) { + track.effectParams = { + fillCanvas: tr.effectParams.fillCanvas, + zoomOrigin: tr.effectParams.zoomOrigin, + keys: parseKeyList(tr.effectParams.keyList, logMissingFeatures), + }; + } + tracks.push(track); + } + return tracks; +} +exports.parseTrackList = parseTrackList; +function serializeTrackList(tracks) { + var trackList = []; + for (var i = 0; i < tracks.length; i++) { + var t = tracks[i]; + trackList.push(__assign(__assign({ trackID: exports.stdTrackID.encode(t.type), Vrsn: 1, enab: !!t.enabled, Effc: !!t.effectParams }, (t.effectParams ? { + effectParams: { + keyList: serializeKeyList(t.keys), + fillCanvas: t.effectParams.fillCanvas, + zoomOrigin: t.effectParams.zoomOrigin, + } + } : {})), { keyList: serializeKeyList(t.keys) })); + } + return trackList; +} +exports.serializeTrackList = serializeTrackList; +function parseEffectObject(obj, reportErrors) { + var result = {}; + for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) { + var key = _a[_i]; + var val = obj[key]; + switch (key) { + case 'enab': + result.enabled = !!val; + break; + case 'uglg': + result.useGlobalLight = !!val; + break; + case 'AntA': + result.antialiased = !!val; + break; + case 'Algn': + result.align = !!val; + break; + case 'Dthr': + result.dither = !!val; + break; + case 'Invr': + result.invert = !!val; + break; + case 'Rvrs': + result.reverse = !!val; + break; + case 'Clr ': + result.color = parseColor(val); + break; + case 'hglC': + result.highlightColor = parseColor(val); + break; + case 'sdwC': + result.shadowColor = parseColor(val); + break; + case 'Styl': + result.position = exports.FStl.decode(val); + break; + case 'Md ': + result.blendMode = exports.BlnM.decode(val); + break; + case 'hglM': + result.highlightBlendMode = exports.BlnM.decode(val); + break; + case 'sdwM': + result.shadowBlendMode = exports.BlnM.decode(val); + break; + case 'bvlS': + result.style = exports.BESl.decode(val); + break; + case 'bvlD': + result.direction = exports.BESs.decode(val); + break; + case 'bvlT': + result.technique = exports.bvlT.decode(val); + break; + case 'GlwT': + result.technique = exports.BETE.decode(val); + break; + case 'glwS': + result.source = exports.IGSr.decode(val); + break; + case 'Type': + result.type = exports.GrdT.decode(val); + break; + case 'gs99': + result.interpolationMethod = exports.gradientInterpolationMethodType.decode(val); + break; + case 'Opct': + result.opacity = parsePercent(val); + break; + case 'hglO': + result.highlightOpacity = parsePercent(val); + break; + case 'sdwO': + result.shadowOpacity = parsePercent(val); + break; + case 'lagl': + result.angle = parseAngle(val); + break; + case 'Angl': + result.angle = parseAngle(val); + break; + case 'Lald': + result.altitude = parseAngle(val); + break; + case 'Sftn': + result.soften = parseUnits(val); + break; + case 'srgR': + result.strength = parsePercent(val); + break; + case 'blur': + result.size = parseUnits(val); + break; + case 'Nose': + result.noise = parsePercent(val); + break; + case 'Inpr': + result.range = parsePercent(val); + break; + case 'Ckmt': + result.choke = parseUnits(val); + break; + case 'ShdN': + result.jitter = parsePercent(val); + break; + case 'Dstn': + result.distance = parseUnits(val); + break; + case 'Scl ': + result.scale = parsePercent(val); + break; + case 'Ptrn': + result.pattern = { name: val['Nm '], id: val.Idnt }; + break; + case 'phase': + result.phase = { x: val.Hrzn, y: val.Vrtc }; + break; + case 'Ofst': + result.offset = { x: parsePercent(val.Hrzn), y: parsePercent(val.Vrtc) }; + break; + case 'MpgS': + case 'TrnS': + result.contour = { + name: val['Nm '], + curve: val['Crv '].map(function (p) { return ({ x: p.Hrzn, y: p.Vrtc }); }), + }; + break; + case 'Grad': + result.gradient = parseGradient(val); + break; + case 'useTexture': + case 'useShape': + case 'layerConceals': + case 'present': + case 'showInDialog': + case 'antialiasGloss': + result[key] = val; + break; + default: + reportErrors && console.log("Invalid effect key: '".concat(key, "', value:"), val); + } + } + return result; +} +function serializeEffectObject(obj, objName, reportErrors) { + var result = {}; + for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) { + var objKey = _a[_i]; + var key = objKey; + var val = obj[key]; + switch (key) { + case 'enabled': + result.enab = !!val; + break; + case 'useGlobalLight': + result.uglg = !!val; + break; + case 'antialiased': + result.AntA = !!val; + break; + case 'align': + result.Algn = !!val; + break; + case 'dither': + result.Dthr = !!val; + break; + case 'invert': + result.Invr = !!val; + break; + case 'reverse': + result.Rvrs = !!val; + break; + case 'color': + result['Clr '] = serializeColor(val); + break; + case 'highlightColor': + result.hglC = serializeColor(val); + break; + case 'shadowColor': + result.sdwC = serializeColor(val); + break; + case 'position': + result.Styl = exports.FStl.encode(val); + break; + case 'blendMode': + result['Md '] = exports.BlnM.encode(val); + break; + case 'highlightBlendMode': + result.hglM = exports.BlnM.encode(val); + break; + case 'shadowBlendMode': + result.sdwM = exports.BlnM.encode(val); + break; + case 'style': + result.bvlS = exports.BESl.encode(val); + break; + case 'direction': + result.bvlD = exports.BESs.encode(val); + break; + case 'technique': + if (objName === 'bevel') { + result.bvlT = exports.bvlT.encode(val); + } + else { + result.GlwT = exports.BETE.encode(val); + } + break; + case 'source': + result.glwS = exports.IGSr.encode(val); + break; + case 'type': + result.Type = exports.GrdT.encode(val); + break; + case 'interpolationMethod': + result.gs99 = exports.gradientInterpolationMethodType.encode(val); + break; + case 'opacity': + result.Opct = unitsPercent(val); + break; + case 'highlightOpacity': + result.hglO = unitsPercent(val); + break; + case 'shadowOpacity': + result.sdwO = unitsPercent(val); + break; + case 'angle': + if (objName === 'gradientOverlay') { + result.Angl = unitsAngle(val); + } + else { + result.lagl = unitsAngle(val); + } + break; + case 'altitude': + result.Lald = unitsAngle(val); + break; + case 'soften': + result.Sftn = unitsValue(val, key); + break; + case 'strength': + result.srgR = unitsPercent(val); + break; + case 'size': + result.blur = unitsValue(val, key); + break; + case 'noise': + result.Nose = unitsPercent(val); + break; + case 'range': + result.Inpr = unitsPercent(val); + break; + case 'choke': + result.Ckmt = unitsValue(val, key); + break; + case 'jitter': + result.ShdN = unitsPercent(val); + break; + case 'distance': + result.Dstn = unitsValue(val, key); + break; + case 'scale': + result['Scl '] = unitsPercent(val); + break; + case 'pattern': + result.Ptrn = { 'Nm ': val.name, Idnt: val.id }; + break; + case 'phase': + result.phase = { Hrzn: val.x, Vrtc: val.y }; + break; + case 'offset': + result.Ofst = { Hrzn: unitsPercent(val.x), Vrtc: unitsPercent(val.y) }; + break; + case 'contour': { + result[objName === 'satin' ? 'MpgS' : 'TrnS'] = { + 'Nm ': val.name, + 'Crv ': val.curve.map(function (p) { return ({ Hrzn: p.x, Vrtc: p.y }); }), + }; + break; + } + case 'gradient': + result.Grad = serializeGradient(val); + break; + case 'useTexture': + case 'useShape': + case 'layerConceals': + case 'present': + case 'showInDialog': + case 'antialiasGloss': + result[key] = val; + break; + default: + reportErrors && console.log("Invalid effect key: '".concat(key, "', value:"), val); + } + } + return result; +} +function parseGradient(grad) { + if (grad.GrdF === 'GrdF.CstS') { + var samples_1 = grad.Intr || 4096; + return { + type: 'solid', + name: grad['Nm '], + smoothness: grad.Intr / 4096, + colorStops: grad.Clrs.map(function (s) { return ({ + color: parseColor(s['Clr ']), + location: s.Lctn / samples_1, + midpoint: s.Mdpn / 100, + }); }), + opacityStops: grad.Trns.map(function (s) { return ({ + opacity: parsePercent(s.Opct), + location: s.Lctn / samples_1, + midpoint: s.Mdpn / 100, + }); }), + }; + } + else { + return { + type: 'noise', + name: grad['Nm '], + roughness: grad.Smth / 4096, + colorModel: exports.ClrS.decode(grad.ClrS), + randomSeed: grad.RndS, + restrictColors: !!grad.VctC, + addTransparency: !!grad.ShTr, + min: grad['Mnm '].map(function (x) { return x / 100; }), + max: grad['Mxm '].map(function (x) { return x / 100; }), + }; + } +} +function serializeGradient(grad) { + var _a, _b; + if (grad.type === 'solid') { + var samples_2 = Math.round(((_a = grad.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096); + return { + 'Nm ': grad.name || '', + GrdF: 'GrdF.CstS', + Intr: samples_2, + Clrs: grad.colorStops.map(function (s) { + var _a; + return ({ + 'Clr ': serializeColor(s.color), + Type: 'Clry.UsrS', + Lctn: Math.round(s.location * samples_2), + Mdpn: Math.round(((_a = s.midpoint) !== null && _a !== void 0 ? _a : 0.5) * 100), + }); + }), + Trns: grad.opacityStops.map(function (s) { + var _a; + return ({ + Opct: unitsPercent(s.opacity), + Lctn: Math.round(s.location * samples_2), + Mdpn: Math.round(((_a = s.midpoint) !== null && _a !== void 0 ? _a : 0.5) * 100), + }); + }), + }; + } + else { + return { + GrdF: 'GrdF.ClNs', + 'Nm ': grad.name || '', + ShTr: !!grad.addTransparency, + VctC: !!grad.restrictColors, + ClrS: exports.ClrS.encode(grad.colorModel), + RndS: grad.randomSeed || 0, + Smth: Math.round(((_b = grad.roughness) !== null && _b !== void 0 ? _b : 1) * 4096), + 'Mnm ': (grad.min || [0, 0, 0, 0]).map(function (x) { return x * 100; }), + 'Mxm ': (grad.max || [1, 1, 1, 1]).map(function (x) { return x * 100; }), + }; + } +} +function parseGradientContent(descriptor) { + var result = parseGradient(descriptor.Grad); + result.style = exports.GrdT.decode(descriptor.Type); + if (descriptor.Dthr !== undefined) + result.dither = descriptor.Dthr; + if (descriptor.Rvrs !== undefined) + result.reverse = descriptor.Rvrs; + if (descriptor.Angl !== undefined) + result.angle = parseAngle(descriptor.Angl); + if (descriptor['Scl '] !== undefined) + result.scale = parsePercent(descriptor['Scl ']); + if (descriptor.Algn !== undefined) + result.align = descriptor.Algn; + if (descriptor.Ofst !== undefined) { + result.offset = { + x: parsePercent(descriptor.Ofst.Hrzn), + y: parsePercent(descriptor.Ofst.Vrtc) + }; + } + return result; +} +function parsePatternContent(descriptor) { + var result = { + name: descriptor.Ptrn['Nm '], + id: descriptor.Ptrn.Idnt, + }; + if (descriptor.Lnkd !== undefined) + result.linked = descriptor.Lnkd; + if (descriptor.phase !== undefined) + result.phase = { x: descriptor.phase.Hrzn, y: descriptor.phase.Vrtc }; + return result; +} +function parseVectorContent(descriptor) { + if ('Grad' in descriptor) { + return parseGradientContent(descriptor); + } + else if ('Ptrn' in descriptor) { + return __assign({ type: 'pattern' }, parsePatternContent(descriptor)); + } + else if ('Clr ' in descriptor) { + return { type: 'color', color: parseColor(descriptor['Clr ']) }; + } + else { + throw new Error('Invalid vector content'); + } +} +exports.parseVectorContent = parseVectorContent; +function serializeGradientContent(content) { + var result = {}; + if (content.dither !== undefined) + result.Dthr = content.dither; + if (content.reverse !== undefined) + result.Rvrs = content.reverse; + if (content.angle !== undefined) + result.Angl = unitsAngle(content.angle); + result.Type = exports.GrdT.encode(content.style); + if (content.align !== undefined) + result.Algn = content.align; + if (content.scale !== undefined) + result['Scl '] = unitsPercent(content.scale); + if (content.offset) { + result.Ofst = { + Hrzn: unitsPercent(content.offset.x), + Vrtc: unitsPercent(content.offset.y), + }; + } + result.Grad = serializeGradient(content); + return result; +} +function serializePatternContent(content) { + var result = { + Ptrn: { + 'Nm ': content.name || '', + Idnt: content.id || '', + } + }; + if (content.linked !== undefined) + result.Lnkd = !!content.linked; + if (content.phase !== undefined) + result.phase = { Hrzn: content.phase.x, Vrtc: content.phase.y }; + return result; +} +function serializeVectorContent(content) { + if (content.type === 'color') { + return { key: 'SoCo', descriptor: { 'Clr ': serializeColor(content.color) } }; + } + else if (content.type === 'pattern') { + return { key: 'PtFl', descriptor: serializePatternContent(content) }; + } + else { + return { key: 'GdFl', descriptor: serializeGradientContent(content) }; + } +} +exports.serializeVectorContent = serializeVectorContent; +function parseColor(color) { + if ('H ' in color) { + return { h: parsePercentOrAngle(color['H ']), s: color.Strt, b: color.Brgh }; + } + else if ('Rd ' in color) { + return { r: color['Rd '], g: color['Grn '], b: color['Bl '] }; + } + else if ('Cyn ' in color) { + return { c: color['Cyn '], m: color.Mgnt, y: color['Ylw '], k: color.Blck }; + } + else if ('Gry ' in color) { + return { k: color['Gry '] }; + } + else if ('Lmnc' in color) { + return { l: color.Lmnc, a: color['A '], b: color['B '] }; + } + else { + throw new Error('Unsupported color descriptor'); + } +} +exports.parseColor = parseColor; +function serializeColor(color) { + if (!color) { + return { 'Rd ': 0, 'Grn ': 0, 'Bl ': 0 }; + } + else if ('r' in color) { + return { 'Rd ': color.r || 0, 'Grn ': color.g || 0, 'Bl ': color.b || 0 }; + } + else if ('h' in color) { + return { 'H ': unitsAngle(color.h * 360), Strt: color.s || 0, Brgh: color.b || 0 }; + } + else if ('c' in color) { + return { 'Cyn ': color.c || 0, Mgnt: color.m || 0, 'Ylw ': color.y || 0, Blck: color.k || 0 }; + } + else if ('l' in color) { + return { Lmnc: color.l || 0, 'A ': color.a || 0, 'B ': color.b || 0 }; + } + else if ('k' in color) { + return { 'Gry ': color.k }; + } + else { + throw new Error('Invalid color value'); + } +} +exports.serializeColor = serializeColor; +function parseAngle(x) { + if (x === undefined) + return 0; + if (x.units !== 'Angle') + throw new Error("Invalid units: ".concat(x.units)); + return x.value; +} +exports.parseAngle = parseAngle; +function parsePercent(x) { + if (x === undefined) + return 1; + if (x.units !== 'Percent') + throw new Error("Invalid units: ".concat(x.units)); + return x.value / 100; +} +exports.parsePercent = parsePercent; +function parsePercentOrAngle(x) { + if (x === undefined) + return 1; + if (x.units === 'Percent') + return x.value / 100; + if (x.units === 'Angle') + return x.value / 360; + throw new Error("Invalid units: ".concat(x.units)); +} +exports.parsePercentOrAngle = parsePercentOrAngle; +function parseUnits(_a) { + var units = _a.units, value = _a.value; + if (units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && + units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density') { + throw new Error("Invalid units: ".concat(JSON.stringify({ units: units, value: value }))); + } + return { value: value, units: units }; +} +exports.parseUnits = parseUnits; +function parseUnitsOrNumber(value, units) { + if (units === void 0) { units = 'Pixels'; } + if (typeof value === 'number') + return { value: value, units: units }; + return parseUnits(value); +} +exports.parseUnitsOrNumber = parseUnitsOrNumber; +function parseUnitsToNumber(_a, expectedUnits) { + var units = _a.units, value = _a.value; + if (units !== expectedUnits) + throw new Error("Invalid units: ".concat(JSON.stringify({ units: units, value: value }))); + return value; +} +exports.parseUnitsToNumber = parseUnitsToNumber; +function unitsAngle(value) { + return { units: 'Angle', value: value || 0 }; +} +exports.unitsAngle = unitsAngle; +function unitsPercent(value) { + return { units: 'Percent', value: Math.round((value || 0) * 100) }; +} +exports.unitsPercent = unitsPercent; +function unitsValue(x, key) { + if (x == null) + return { units: 'Pixels', value: 0 }; + if (typeof x !== 'object') + throw new Error("Invalid value: ".concat(JSON.stringify(x), " (key: ").concat(key, ") (should have value and units)")); + var units = x.units, value = x.value; + if (typeof value !== 'number') + throw new Error("Invalid value in ".concat(JSON.stringify(x), " (key: ").concat(key, ")")); + if (units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && + units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density') { + throw new Error("Invalid units in ".concat(JSON.stringify(x), " (key: ").concat(key, ")")); + } + return { units: units, value: value }; +} +exports.unitsValue = unitsValue; +exports.textGridding = (0, helpers_1.createEnum)('textGridding', 'none', { + none: 'None', + round: 'Rnd ', +}); +exports.Ornt = (0, helpers_1.createEnum)('Ornt', 'horizontal', { + horizontal: 'Hrzn', + vertical: 'Vrtc', +}); +exports.Annt = (0, helpers_1.createEnum)('Annt', 'sharp', { + none: 'Anno', + sharp: 'antiAliasSharp', + crisp: 'AnCr', + strong: 'AnSt', + smooth: 'AnSm', + platform: 'antiAliasPlatformGray', + platformLCD: 'antiAliasPlatformLCD', +}); +exports.warpStyle = (0, helpers_1.createEnum)('warpStyle', 'none', { + none: 'warpNone', + arc: 'warpArc', + arcLower: 'warpArcLower', + arcUpper: 'warpArcUpper', + arch: 'warpArch', + bulge: 'warpBulge', + shellLower: 'warpShellLower', + shellUpper: 'warpShellUpper', + flag: 'warpFlag', + wave: 'warpWave', + fish: 'warpFish', + rise: 'warpRise', + fisheye: 'warpFisheye', + inflate: 'warpInflate', + squeeze: 'warpSqueeze', + twist: 'warpTwist', + custom: 'warpCustom', +}); +exports.BlnM = (0, helpers_1.createEnum)('BlnM', 'normal', { + 'normal': 'Nrml', + 'dissolve': 'Dslv', + 'darken': 'Drkn', + 'multiply': 'Mltp', + 'color burn': 'CBrn', + 'linear burn': 'linearBurn', + 'darker color': 'darkerColor', + 'lighten': 'Lghn', + 'screen': 'Scrn', + 'color dodge': 'CDdg', + 'linear dodge': 'linearDodge', + 'lighter color': 'lighterColor', + 'overlay': 'Ovrl', + 'soft light': 'SftL', + 'hard light': 'HrdL', + 'vivid light': 'vividLight', + 'linear light': 'linearLight', + 'pin light': 'pinLight', + 'hard mix': 'hardMix', + 'difference': 'Dfrn', + 'exclusion': 'Xclu', + 'subtract': 'blendSubtraction', + 'divide': 'blendDivide', + 'hue': 'H ', + 'saturation': 'Strt', + 'color': 'Clr ', + 'luminosity': 'Lmns', + // used in ABR + 'linear height': 'linearHeight', + 'height': 'Hght', + 'subtraction': 'Sbtr', // 2nd version of subtract ? +}); +exports.BESl = (0, helpers_1.createEnum)('BESl', 'inner bevel', { + 'inner bevel': 'InrB', + 'outer bevel': 'OtrB', + 'emboss': 'Embs', + 'pillow emboss': 'PlEb', + 'stroke emboss': 'strokeEmboss', +}); +exports.bvlT = (0, helpers_1.createEnum)('bvlT', 'smooth', { + 'smooth': 'SfBL', + 'chisel hard': 'PrBL', + 'chisel soft': 'Slmt', +}); +exports.BESs = (0, helpers_1.createEnum)('BESs', 'up', { + up: 'In ', + down: 'Out ', +}); +exports.BETE = (0, helpers_1.createEnum)('BETE', 'softer', { + softer: 'SfBL', + precise: 'PrBL', +}); +exports.IGSr = (0, helpers_1.createEnum)('IGSr', 'edge', { + edge: 'SrcE', + center: 'SrcC', +}); +exports.GrdT = (0, helpers_1.createEnum)('GrdT', 'linear', { + linear: 'Lnr ', + radial: 'Rdl ', + angle: 'Angl', + reflected: 'Rflc', + diamond: 'Dmnd', +}); +exports.animInterpStyleEnum = (0, helpers_1.createEnum)('animInterpStyle', 'linear', { + linear: 'Lnr ', + hold: 'hold', +}); +exports.stdTrackID = (0, helpers_1.createEnum)('stdTrackID', 'opacity', { + opacity: 'opacityTrack', + style: 'styleTrack', + sheetTransform: 'sheetTransformTrack', + sheetPosition: 'sheetPositionTrack', + globalLighting: 'globalLightingTrack', +}); +exports.gradientInterpolationMethodType = (0, helpers_1.createEnum)('gradientInterpolationMethodType', 'perceptual', { + perceptual: 'Perc', + linear: 'Lnr', + classic: 'Gcls', +}); +exports.ClrS = (0, helpers_1.createEnum)('ClrS', 'rgb', { + rgb: 'RGBC', + hsb: 'HSBl', + lab: 'LbCl', +}); +exports.FStl = (0, helpers_1.createEnum)('FStl', 'outside', { + outside: 'OutF', + center: 'CtrF', + inside: 'InsF' +}); +exports.FrFl = (0, helpers_1.createEnum)('FrFl', 'color', { + color: 'SClr', + gradient: 'GrFl', + pattern: 'Ptrn', +}); +exports.strokeStyleLineCapType = (0, helpers_1.createEnum)('strokeStyleLineCapType', 'butt', { + butt: 'strokeStyleButtCap', + round: 'strokeStyleRoundCap', + square: 'strokeStyleSquareCap', +}); +exports.strokeStyleLineJoinType = (0, helpers_1.createEnum)('strokeStyleLineJoinType', 'miter', { + miter: 'strokeStyleMiterJoin', + round: 'strokeStyleRoundJoin', + bevel: 'strokeStyleBevelJoin', +}); +exports.strokeStyleLineAlignment = (0, helpers_1.createEnum)('strokeStyleLineAlignment', 'inside', { + inside: 'strokeStyleAlignInside', + center: 'strokeStyleAlignCenter', + outside: 'strokeStyleAlignOutside', +}); + },{"./helpers":7,"./psdReader":11,"./psdWriter":12}],5:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.writeEffects = exports.readEffects = void 0; -var helpers_1 = require("./helpers"); -var psdReader_1 = require("./psdReader"); -var psdWriter_1 = require("./psdWriter"); -var bevelStyles = [ - undefined, 'outer bevel', 'inner bevel', 'emboss', 'pillow emboss', 'stroke emboss' -]; -function readBlendMode(reader) { - (0, psdReader_1.checkSignature)(reader, '8BIM'); - return helpers_1.toBlendMode[(0, psdReader_1.readSignature)(reader)] || 'normal'; -} -function writeBlendMode(writer, mode) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, helpers_1.fromBlendMode[mode] || 'norm'); -} -function readFixedPoint8(reader) { - return (0, psdReader_1.readUint8)(reader) / 0xff; -} -function writeFixedPoint8(writer, value) { - (0, psdWriter_1.writeUint8)(writer, Math.round(value * 0xff) | 0); -} -function readEffects(reader) { - var version = (0, psdReader_1.readUint16)(reader); - if (version !== 0) - throw new Error("Invalid effects layer version: ".concat(version)); - var effectsCount = (0, psdReader_1.readUint16)(reader); - var effects = {}; - for (var i = 0; i < effectsCount; i++) { - (0, psdReader_1.checkSignature)(reader, '8BIM'); - var type = (0, psdReader_1.readSignature)(reader); - switch (type) { - case 'cmnS': { // common state (see See Effects layer, common state info) - var size = (0, psdReader_1.readUint32)(reader); - var version_1 = (0, psdReader_1.readUint32)(reader); - var visible = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.skipBytes)(reader, 2); - if (size !== 7 || version_1 !== 0 || !visible) - throw new Error("Invalid effects common state"); - break; - } - case 'dsdw': // drop shadow (see See Effects layer, drop shadow and inner shadow info) - case 'isdw': { // inner shadow (see See Effects layer, drop shadow and inner shadow info) - var blockSize = (0, psdReader_1.readUint32)(reader); - var version_2 = (0, psdReader_1.readUint32)(reader); - if (blockSize !== 41 && blockSize !== 51) - throw new Error("Invalid shadow size: ".concat(blockSize)); - if (version_2 !== 0 && version_2 !== 2) - throw new Error("Invalid shadow version: ".concat(version_2)); - var size = (0, psdReader_1.readFixedPoint32)(reader); - (0, psdReader_1.readFixedPoint32)(reader); // intensity - var angle = (0, psdReader_1.readFixedPoint32)(reader); - var distance = (0, psdReader_1.readFixedPoint32)(reader); - var color = (0, psdReader_1.readColor)(reader); - var blendMode = readBlendMode(reader); - var enabled = !!(0, psdReader_1.readUint8)(reader); - var useGlobalLight = !!(0, psdReader_1.readUint8)(reader); - var opacity = readFixedPoint8(reader); - if (blockSize >= 51) - (0, psdReader_1.readColor)(reader); // native color - var shadowInfo = { - size: { units: 'Pixels', value: size }, - distance: { units: 'Pixels', value: distance }, - angle: angle, - color: color, - blendMode: blendMode, - enabled: enabled, - useGlobalLight: useGlobalLight, - opacity: opacity - }; - if (type === 'dsdw') { - effects.dropShadow = [shadowInfo]; - } - else { - effects.innerShadow = [shadowInfo]; - } - break; - } - case 'oglw': { // outer glow (see See Effects layer, outer glow info) - var blockSize = (0, psdReader_1.readUint32)(reader); - var version_3 = (0, psdReader_1.readUint32)(reader); - if (blockSize !== 32 && blockSize !== 42) - throw new Error("Invalid outer glow size: ".concat(blockSize)); - if (version_3 !== 0 && version_3 !== 2) - throw new Error("Invalid outer glow version: ".concat(version_3)); - var size = (0, psdReader_1.readFixedPoint32)(reader); - (0, psdReader_1.readFixedPoint32)(reader); // intensity - var color = (0, psdReader_1.readColor)(reader); - var blendMode = readBlendMode(reader); - var enabled = !!(0, psdReader_1.readUint8)(reader); - var opacity = readFixedPoint8(reader); - if (blockSize >= 42) - (0, psdReader_1.readColor)(reader); // native color - effects.outerGlow = { - size: { units: 'Pixels', value: size }, - color: color, - blendMode: blendMode, - enabled: enabled, - opacity: opacity - }; - break; - } - case 'iglw': { // inner glow (see See Effects layer, inner glow info) - var blockSize = (0, psdReader_1.readUint32)(reader); - var version_4 = (0, psdReader_1.readUint32)(reader); - if (blockSize !== 32 && blockSize !== 43) - throw new Error("Invalid inner glow size: ".concat(blockSize)); - if (version_4 !== 0 && version_4 !== 2) - throw new Error("Invalid inner glow version: ".concat(version_4)); - var size = (0, psdReader_1.readFixedPoint32)(reader); - (0, psdReader_1.readFixedPoint32)(reader); // intensity - var color = (0, psdReader_1.readColor)(reader); - var blendMode = readBlendMode(reader); - var enabled = !!(0, psdReader_1.readUint8)(reader); - var opacity = readFixedPoint8(reader); - if (blockSize >= 43) { - (0, psdReader_1.readUint8)(reader); // inverted - (0, psdReader_1.readColor)(reader); // native color - } - effects.innerGlow = { - size: { units: 'Pixels', value: size }, - color: color, - blendMode: blendMode, - enabled: enabled, - opacity: opacity - }; - break; - } - case 'bevl': { // bevel (see See Effects layer, bevel info) - var blockSize = (0, psdReader_1.readUint32)(reader); - var version_5 = (0, psdReader_1.readUint32)(reader); - if (blockSize !== 58 && blockSize !== 78) - throw new Error("Invalid bevel size: ".concat(blockSize)); - if (version_5 !== 0 && version_5 !== 2) - throw new Error("Invalid bevel version: ".concat(version_5)); - var angle = (0, psdReader_1.readFixedPoint32)(reader); - var strength = (0, psdReader_1.readFixedPoint32)(reader); - var size = (0, psdReader_1.readFixedPoint32)(reader); - var highlightBlendMode = readBlendMode(reader); - var shadowBlendMode = readBlendMode(reader); - var highlightColor = (0, psdReader_1.readColor)(reader); - var shadowColor = (0, psdReader_1.readColor)(reader); - var style = bevelStyles[(0, psdReader_1.readUint8)(reader)] || 'inner bevel'; - var highlightOpacity = readFixedPoint8(reader); - var shadowOpacity = readFixedPoint8(reader); - var enabled = !!(0, psdReader_1.readUint8)(reader); - var useGlobalLight = !!(0, psdReader_1.readUint8)(reader); - var direction = (0, psdReader_1.readUint8)(reader) ? 'down' : 'up'; - if (blockSize >= 78) { - (0, psdReader_1.readColor)(reader); // real highlight color - (0, psdReader_1.readColor)(reader); // real shadow color - } - effects.bevel = { - size: { units: 'Pixels', value: size }, - angle: angle, - strength: strength, - highlightBlendMode: highlightBlendMode, - shadowBlendMode: shadowBlendMode, - highlightColor: highlightColor, - shadowColor: shadowColor, - style: style, - highlightOpacity: highlightOpacity, - shadowOpacity: shadowOpacity, - enabled: enabled, - useGlobalLight: useGlobalLight, - direction: direction, - }; - break; - } - case 'sofi': { // solid fill (Photoshop 7.0) (see See Effects layer, solid fill (added in Photoshop 7.0)) - var size = (0, psdReader_1.readUint32)(reader); - var version_6 = (0, psdReader_1.readUint32)(reader); - if (size !== 34) - throw new Error("Invalid effects solid fill info size: ".concat(size)); - if (version_6 !== 2) - throw new Error("Invalid effects solid fill info version: ".concat(version_6)); - var blendMode = readBlendMode(reader); - var color = (0, psdReader_1.readColor)(reader); - var opacity = readFixedPoint8(reader); - var enabled = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.readColor)(reader); // native color - effects.solidFill = [{ blendMode: blendMode, color: color, opacity: opacity, enabled: enabled }]; - break; - } - default: - throw new Error("Invalid effect type: '".concat(type, "'")); - } - } - return effects; -} -exports.readEffects = readEffects; -function writeShadowInfo(writer, shadow) { - var _a; - (0, psdWriter_1.writeUint32)(writer, 51); - (0, psdWriter_1.writeUint32)(writer, 2); - (0, psdWriter_1.writeFixedPoint32)(writer, shadow.size && shadow.size.value || 0); - (0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity - (0, psdWriter_1.writeFixedPoint32)(writer, shadow.angle || 0); - (0, psdWriter_1.writeFixedPoint32)(writer, shadow.distance && shadow.distance.value || 0); - (0, psdWriter_1.writeColor)(writer, shadow.color); - writeBlendMode(writer, shadow.blendMode); - (0, psdWriter_1.writeUint8)(writer, shadow.enabled ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, shadow.useGlobalLight ? 1 : 0); - writeFixedPoint8(writer, (_a = shadow.opacity) !== null && _a !== void 0 ? _a : 1); - (0, psdWriter_1.writeColor)(writer, shadow.color); // native color -} -function writeEffects(writer, effects) { - var _a, _b, _c, _d, _e, _f; - var dropShadow = (_a = effects.dropShadow) === null || _a === void 0 ? void 0 : _a[0]; - var innerShadow = (_b = effects.innerShadow) === null || _b === void 0 ? void 0 : _b[0]; - var outerGlow = effects.outerGlow; - var innerGlow = effects.innerGlow; - var bevel = effects.bevel; - var solidFill = (_c = effects.solidFill) === null || _c === void 0 ? void 0 : _c[0]; - var count = 1; - if (dropShadow) - count++; - if (innerShadow) - count++; - if (outerGlow) - count++; - if (innerGlow) - count++; - if (bevel) - count++; - if (solidFill) - count++; - (0, psdWriter_1.writeUint16)(writer, 0); - (0, psdWriter_1.writeUint16)(writer, count); - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'cmnS'); - (0, psdWriter_1.writeUint32)(writer, 7); // size - (0, psdWriter_1.writeUint32)(writer, 0); // version - (0, psdWriter_1.writeUint8)(writer, 1); // visible - (0, psdWriter_1.writeZeros)(writer, 2); - if (dropShadow) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'dsdw'); - writeShadowInfo(writer, dropShadow); - } - if (innerShadow) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'isdw'); - writeShadowInfo(writer, innerShadow); - } - if (outerGlow) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'oglw'); - (0, psdWriter_1.writeUint32)(writer, 42); - (0, psdWriter_1.writeUint32)(writer, 2); - (0, psdWriter_1.writeFixedPoint32)(writer, ((_d = outerGlow.size) === null || _d === void 0 ? void 0 : _d.value) || 0); - (0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity - (0, psdWriter_1.writeColor)(writer, outerGlow.color); - writeBlendMode(writer, outerGlow.blendMode); - (0, psdWriter_1.writeUint8)(writer, outerGlow.enabled ? 1 : 0); - writeFixedPoint8(writer, outerGlow.opacity || 0); - (0, psdWriter_1.writeColor)(writer, outerGlow.color); - } - if (innerGlow) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'iglw'); - (0, psdWriter_1.writeUint32)(writer, 43); - (0, psdWriter_1.writeUint32)(writer, 2); - (0, psdWriter_1.writeFixedPoint32)(writer, ((_e = innerGlow.size) === null || _e === void 0 ? void 0 : _e.value) || 0); - (0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity - (0, psdWriter_1.writeColor)(writer, innerGlow.color); - writeBlendMode(writer, innerGlow.blendMode); - (0, psdWriter_1.writeUint8)(writer, innerGlow.enabled ? 1 : 0); - writeFixedPoint8(writer, innerGlow.opacity || 0); - (0, psdWriter_1.writeUint8)(writer, 0); // inverted - (0, psdWriter_1.writeColor)(writer, innerGlow.color); - } - if (bevel) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'bevl'); - (0, psdWriter_1.writeUint32)(writer, 78); - (0, psdWriter_1.writeUint32)(writer, 2); - (0, psdWriter_1.writeFixedPoint32)(writer, bevel.angle || 0); - (0, psdWriter_1.writeFixedPoint32)(writer, bevel.strength || 0); - (0, psdWriter_1.writeFixedPoint32)(writer, ((_f = bevel.size) === null || _f === void 0 ? void 0 : _f.value) || 0); - writeBlendMode(writer, bevel.highlightBlendMode); - writeBlendMode(writer, bevel.shadowBlendMode); - (0, psdWriter_1.writeColor)(writer, bevel.highlightColor); - (0, psdWriter_1.writeColor)(writer, bevel.shadowColor); - var style = bevelStyles.indexOf(bevel.style); - (0, psdWriter_1.writeUint8)(writer, style <= 0 ? 1 : style); - writeFixedPoint8(writer, bevel.highlightOpacity || 0); - writeFixedPoint8(writer, bevel.shadowOpacity || 0); - (0, psdWriter_1.writeUint8)(writer, bevel.enabled ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, bevel.useGlobalLight ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, bevel.direction === 'down' ? 1 : 0); - (0, psdWriter_1.writeColor)(writer, bevel.highlightColor); - (0, psdWriter_1.writeColor)(writer, bevel.shadowColor); - } - if (solidFill) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'sofi'); - (0, psdWriter_1.writeUint32)(writer, 34); - (0, psdWriter_1.writeUint32)(writer, 2); - writeBlendMode(writer, solidFill.blendMode); - (0, psdWriter_1.writeColor)(writer, solidFill.color); - writeFixedPoint8(writer, solidFill.opacity || 0); - (0, psdWriter_1.writeUint8)(writer, solidFill.enabled ? 1 : 0); - (0, psdWriter_1.writeColor)(writer, solidFill.color); - } -} -exports.writeEffects = writeEffects; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writeEffects = exports.readEffects = void 0; +var helpers_1 = require("./helpers"); +var psdReader_1 = require("./psdReader"); +var psdWriter_1 = require("./psdWriter"); +var bevelStyles = [ + undefined, 'outer bevel', 'inner bevel', 'emboss', 'pillow emboss', 'stroke emboss' +]; +function readBlendMode(reader) { + (0, psdReader_1.checkSignature)(reader, '8BIM'); + return helpers_1.toBlendMode[(0, psdReader_1.readSignature)(reader)] || 'normal'; +} +function writeBlendMode(writer, mode) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, helpers_1.fromBlendMode[mode] || 'norm'); +} +function readFixedPoint8(reader) { + return (0, psdReader_1.readUint8)(reader) / 0xff; +} +function writeFixedPoint8(writer, value) { + (0, psdWriter_1.writeUint8)(writer, Math.round(value * 0xff) | 0); +} +function readEffects(reader) { + var version = (0, psdReader_1.readUint16)(reader); + if (version !== 0) + throw new Error("Invalid effects layer version: ".concat(version)); + var effectsCount = (0, psdReader_1.readUint16)(reader); + var effects = {}; + for (var i = 0; i < effectsCount; i++) { + (0, psdReader_1.checkSignature)(reader, '8BIM'); + var type = (0, psdReader_1.readSignature)(reader); + switch (type) { + case 'cmnS': { // common state (see See Effects layer, common state info) + var size = (0, psdReader_1.readUint32)(reader); + var version_1 = (0, psdReader_1.readUint32)(reader); + var visible = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.skipBytes)(reader, 2); + if (size !== 7 || version_1 !== 0 || !visible) + throw new Error("Invalid effects common state"); + break; + } + case 'dsdw': // drop shadow (see See Effects layer, drop shadow and inner shadow info) + case 'isdw': { // inner shadow (see See Effects layer, drop shadow and inner shadow info) + var blockSize = (0, psdReader_1.readUint32)(reader); + var version_2 = (0, psdReader_1.readUint32)(reader); + if (blockSize !== 41 && blockSize !== 51) + throw new Error("Invalid shadow size: ".concat(blockSize)); + if (version_2 !== 0 && version_2 !== 2) + throw new Error("Invalid shadow version: ".concat(version_2)); + var size = (0, psdReader_1.readFixedPoint32)(reader); + (0, psdReader_1.readFixedPoint32)(reader); // intensity + var angle = (0, psdReader_1.readFixedPoint32)(reader); + var distance = (0, psdReader_1.readFixedPoint32)(reader); + var color = (0, psdReader_1.readColor)(reader); + var blendMode = readBlendMode(reader); + var enabled = !!(0, psdReader_1.readUint8)(reader); + var useGlobalLight = !!(0, psdReader_1.readUint8)(reader); + var opacity = readFixedPoint8(reader); + if (blockSize >= 51) + (0, psdReader_1.readColor)(reader); // native color + var shadowInfo = { + size: { units: 'Pixels', value: size }, + distance: { units: 'Pixels', value: distance }, + angle: angle, + color: color, + blendMode: blendMode, + enabled: enabled, + useGlobalLight: useGlobalLight, + opacity: opacity + }; + if (type === 'dsdw') { + effects.dropShadow = [shadowInfo]; + } + else { + effects.innerShadow = [shadowInfo]; + } + break; + } + case 'oglw': { // outer glow (see See Effects layer, outer glow info) + var blockSize = (0, psdReader_1.readUint32)(reader); + var version_3 = (0, psdReader_1.readUint32)(reader); + if (blockSize !== 32 && blockSize !== 42) + throw new Error("Invalid outer glow size: ".concat(blockSize)); + if (version_3 !== 0 && version_3 !== 2) + throw new Error("Invalid outer glow version: ".concat(version_3)); + var size = (0, psdReader_1.readFixedPoint32)(reader); + (0, psdReader_1.readFixedPoint32)(reader); // intensity + var color = (0, psdReader_1.readColor)(reader); + var blendMode = readBlendMode(reader); + var enabled = !!(0, psdReader_1.readUint8)(reader); + var opacity = readFixedPoint8(reader); + if (blockSize >= 42) + (0, psdReader_1.readColor)(reader); // native color + effects.outerGlow = { + size: { units: 'Pixels', value: size }, + color: color, + blendMode: blendMode, + enabled: enabled, + opacity: opacity + }; + break; + } + case 'iglw': { // inner glow (see See Effects layer, inner glow info) + var blockSize = (0, psdReader_1.readUint32)(reader); + var version_4 = (0, psdReader_1.readUint32)(reader); + if (blockSize !== 32 && blockSize !== 43) + throw new Error("Invalid inner glow size: ".concat(blockSize)); + if (version_4 !== 0 && version_4 !== 2) + throw new Error("Invalid inner glow version: ".concat(version_4)); + var size = (0, psdReader_1.readFixedPoint32)(reader); + (0, psdReader_1.readFixedPoint32)(reader); // intensity + var color = (0, psdReader_1.readColor)(reader); + var blendMode = readBlendMode(reader); + var enabled = !!(0, psdReader_1.readUint8)(reader); + var opacity = readFixedPoint8(reader); + if (blockSize >= 43) { + (0, psdReader_1.readUint8)(reader); // inverted + (0, psdReader_1.readColor)(reader); // native color + } + effects.innerGlow = { + size: { units: 'Pixels', value: size }, + color: color, + blendMode: blendMode, + enabled: enabled, + opacity: opacity + }; + break; + } + case 'bevl': { // bevel (see See Effects layer, bevel info) + var blockSize = (0, psdReader_1.readUint32)(reader); + var version_5 = (0, psdReader_1.readUint32)(reader); + if (blockSize !== 58 && blockSize !== 78) + throw new Error("Invalid bevel size: ".concat(blockSize)); + if (version_5 !== 0 && version_5 !== 2) + throw new Error("Invalid bevel version: ".concat(version_5)); + var angle = (0, psdReader_1.readFixedPoint32)(reader); + var strength = (0, psdReader_1.readFixedPoint32)(reader); + var size = (0, psdReader_1.readFixedPoint32)(reader); + var highlightBlendMode = readBlendMode(reader); + var shadowBlendMode = readBlendMode(reader); + var highlightColor = (0, psdReader_1.readColor)(reader); + var shadowColor = (0, psdReader_1.readColor)(reader); + var style = bevelStyles[(0, psdReader_1.readUint8)(reader)] || 'inner bevel'; + var highlightOpacity = readFixedPoint8(reader); + var shadowOpacity = readFixedPoint8(reader); + var enabled = !!(0, psdReader_1.readUint8)(reader); + var useGlobalLight = !!(0, psdReader_1.readUint8)(reader); + var direction = (0, psdReader_1.readUint8)(reader) ? 'down' : 'up'; + if (blockSize >= 78) { + (0, psdReader_1.readColor)(reader); // real highlight color + (0, psdReader_1.readColor)(reader); // real shadow color + } + effects.bevel = { + size: { units: 'Pixels', value: size }, + angle: angle, + strength: strength, + highlightBlendMode: highlightBlendMode, + shadowBlendMode: shadowBlendMode, + highlightColor: highlightColor, + shadowColor: shadowColor, + style: style, + highlightOpacity: highlightOpacity, + shadowOpacity: shadowOpacity, + enabled: enabled, + useGlobalLight: useGlobalLight, + direction: direction, + }; + break; + } + case 'sofi': { // solid fill (Photoshop 7.0) (see See Effects layer, solid fill (added in Photoshop 7.0)) + var size = (0, psdReader_1.readUint32)(reader); + var version_6 = (0, psdReader_1.readUint32)(reader); + if (size !== 34) + throw new Error("Invalid effects solid fill info size: ".concat(size)); + if (version_6 !== 2) + throw new Error("Invalid effects solid fill info version: ".concat(version_6)); + var blendMode = readBlendMode(reader); + var color = (0, psdReader_1.readColor)(reader); + var opacity = readFixedPoint8(reader); + var enabled = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.readColor)(reader); // native color + effects.solidFill = [{ blendMode: blendMode, color: color, opacity: opacity, enabled: enabled }]; + break; + } + default: + throw new Error("Invalid effect type: '".concat(type, "'")); + } + } + return effects; +} +exports.readEffects = readEffects; +function writeShadowInfo(writer, shadow) { + var _a; + (0, psdWriter_1.writeUint32)(writer, 51); + (0, psdWriter_1.writeUint32)(writer, 2); + (0, psdWriter_1.writeFixedPoint32)(writer, shadow.size && shadow.size.value || 0); + (0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity + (0, psdWriter_1.writeFixedPoint32)(writer, shadow.angle || 0); + (0, psdWriter_1.writeFixedPoint32)(writer, shadow.distance && shadow.distance.value || 0); + (0, psdWriter_1.writeColor)(writer, shadow.color); + writeBlendMode(writer, shadow.blendMode); + (0, psdWriter_1.writeUint8)(writer, shadow.enabled ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, shadow.useGlobalLight ? 1 : 0); + writeFixedPoint8(writer, (_a = shadow.opacity) !== null && _a !== void 0 ? _a : 1); + (0, psdWriter_1.writeColor)(writer, shadow.color); // native color +} +function writeEffects(writer, effects) { + var _a, _b, _c, _d, _e, _f; + var dropShadow = (_a = effects.dropShadow) === null || _a === void 0 ? void 0 : _a[0]; + var innerShadow = (_b = effects.innerShadow) === null || _b === void 0 ? void 0 : _b[0]; + var outerGlow = effects.outerGlow; + var innerGlow = effects.innerGlow; + var bevel = effects.bevel; + var solidFill = (_c = effects.solidFill) === null || _c === void 0 ? void 0 : _c[0]; + var count = 1; + if (dropShadow) + count++; + if (innerShadow) + count++; + if (outerGlow) + count++; + if (innerGlow) + count++; + if (bevel) + count++; + if (solidFill) + count++; + (0, psdWriter_1.writeUint16)(writer, 0); + (0, psdWriter_1.writeUint16)(writer, count); + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'cmnS'); + (0, psdWriter_1.writeUint32)(writer, 7); // size + (0, psdWriter_1.writeUint32)(writer, 0); // version + (0, psdWriter_1.writeUint8)(writer, 1); // visible + (0, psdWriter_1.writeZeros)(writer, 2); + if (dropShadow) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'dsdw'); + writeShadowInfo(writer, dropShadow); + } + if (innerShadow) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'isdw'); + writeShadowInfo(writer, innerShadow); + } + if (outerGlow) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'oglw'); + (0, psdWriter_1.writeUint32)(writer, 42); + (0, psdWriter_1.writeUint32)(writer, 2); + (0, psdWriter_1.writeFixedPoint32)(writer, ((_d = outerGlow.size) === null || _d === void 0 ? void 0 : _d.value) || 0); + (0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity + (0, psdWriter_1.writeColor)(writer, outerGlow.color); + writeBlendMode(writer, outerGlow.blendMode); + (0, psdWriter_1.writeUint8)(writer, outerGlow.enabled ? 1 : 0); + writeFixedPoint8(writer, outerGlow.opacity || 0); + (0, psdWriter_1.writeColor)(writer, outerGlow.color); + } + if (innerGlow) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'iglw'); + (0, psdWriter_1.writeUint32)(writer, 43); + (0, psdWriter_1.writeUint32)(writer, 2); + (0, psdWriter_1.writeFixedPoint32)(writer, ((_e = innerGlow.size) === null || _e === void 0 ? void 0 : _e.value) || 0); + (0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity + (0, psdWriter_1.writeColor)(writer, innerGlow.color); + writeBlendMode(writer, innerGlow.blendMode); + (0, psdWriter_1.writeUint8)(writer, innerGlow.enabled ? 1 : 0); + writeFixedPoint8(writer, innerGlow.opacity || 0); + (0, psdWriter_1.writeUint8)(writer, 0); // inverted + (0, psdWriter_1.writeColor)(writer, innerGlow.color); + } + if (bevel) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'bevl'); + (0, psdWriter_1.writeUint32)(writer, 78); + (0, psdWriter_1.writeUint32)(writer, 2); + (0, psdWriter_1.writeFixedPoint32)(writer, bevel.angle || 0); + (0, psdWriter_1.writeFixedPoint32)(writer, bevel.strength || 0); + (0, psdWriter_1.writeFixedPoint32)(writer, ((_f = bevel.size) === null || _f === void 0 ? void 0 : _f.value) || 0); + writeBlendMode(writer, bevel.highlightBlendMode); + writeBlendMode(writer, bevel.shadowBlendMode); + (0, psdWriter_1.writeColor)(writer, bevel.highlightColor); + (0, psdWriter_1.writeColor)(writer, bevel.shadowColor); + var style = bevelStyles.indexOf(bevel.style); + (0, psdWriter_1.writeUint8)(writer, style <= 0 ? 1 : style); + writeFixedPoint8(writer, bevel.highlightOpacity || 0); + writeFixedPoint8(writer, bevel.shadowOpacity || 0); + (0, psdWriter_1.writeUint8)(writer, bevel.enabled ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, bevel.useGlobalLight ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, bevel.direction === 'down' ? 1 : 0); + (0, psdWriter_1.writeColor)(writer, bevel.highlightColor); + (0, psdWriter_1.writeColor)(writer, bevel.shadowColor); + } + if (solidFill) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'sofi'); + (0, psdWriter_1.writeUint32)(writer, 34); + (0, psdWriter_1.writeUint32)(writer, 2); + writeBlendMode(writer, solidFill.blendMode); + (0, psdWriter_1.writeColor)(writer, solidFill.color); + writeFixedPoint8(writer, solidFill.opacity || 0); + (0, psdWriter_1.writeUint8)(writer, solidFill.enabled ? 1 : 0); + (0, psdWriter_1.writeColor)(writer, solidFill.color); + } +} +exports.writeEffects = writeEffects; + },{"./helpers":7,"./psdReader":11,"./psdWriter":12}],6:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.serializeEngineData = exports.parseEngineData = void 0; -function isWhitespace(char) { - // ' ', '\n', '\r', '\t' - return char === 32 || char === 10 || char === 13 || char === 9; -} -function isNumber(char) { - // 0123456789.- - return (char >= 48 && char <= 57) || char === 46 || char === 45; -} -function parseEngineData(data) { - var index = 0; - function skipWhitespace() { - while (index < data.length && isWhitespace(data[index])) { - index++; - } - } - function getTextByte() { - var byte = data[index]; - index++; - if (byte === 92) { // \ - byte = data[index]; - index++; - } - return byte; - } - function getText() { - var result = ''; - if (data[index] === 41) { // ) - index++; - return result; - } - // Strings start with utf-16 BOM - if (data[index] !== 0xFE || data[index + 1] !== 0xFF) { - throw new Error('Invalid utf-16 BOM'); - } - index += 2; - // ), ( and \ characters are escaped in ascii manner, remove the escapes before interpreting - // the bytes as utf-16 - while (index < data.length && data[index] !== 41) { // ) - var high = getTextByte(); - var low = getTextByte(); - var char = (high << 8) | low; - result += String.fromCharCode(char); - } - index++; - return result; - } - var root = null; - var stack = []; - function pushContainer(value) { - if (!stack.length) { - stack.push(value); - root = value; - } - else { - pushValue(value); - stack.push(value); - } - } - function pushValue(value) { - if (!stack.length) - throw new Error('Invalid data'); - var top = stack[stack.length - 1]; - if (typeof top === 'string') { - stack[stack.length - 2][top] = value; - pop(); - } - else if (Array.isArray(top)) { - top.push(value); - } - else { - throw new Error('Invalid data'); - } - } - function pushProperty(name) { - if (!stack.length) - pushContainer({}); - var top = stack[stack.length - 1]; - if (top && typeof top === 'string') { - if (name === 'nil') { - pushValue(null); - } - else { - pushValue("/".concat(name)); - } - } - else if (top && typeof top === 'object') { - stack.push(name); - } - else { - throw new Error('Invalid data'); - } - } - function pop() { - if (!stack.length) - throw new Error('Invalid data'); - stack.pop(); - } - skipWhitespace(); - while (index < data.length) { - var i = index; - var char = data[i]; - if (char === 60 && data[i + 1] === 60) { // << - index += 2; - pushContainer({}); - } - else if (char === 62 && data[i + 1] === 62) { // >> - index += 2; - pop(); - } - else if (char === 47) { // / - index += 1; - var start = index; - while (index < data.length && !isWhitespace(data[index])) { - index++; - } - var name_1 = ''; - for (var i_1 = start; i_1 < index; i_1++) { - name_1 += String.fromCharCode(data[i_1]); - } - pushProperty(name_1); - } - else if (char === 40) { // ( - index += 1; - pushValue(getText()); - } - else if (char === 91) { // [ - index += 1; - pushContainer([]); - } - else if (char === 93) { // ] - index += 1; - pop(); - } - else if (char === 110 && data[i + 1] === 117 && data[i + 2] === 108 && data[i + 3] === 108) { // null - index += 4; - pushValue(null); - } - else if (char === 116 && data[i + 1] === 114 && data[i + 2] === 117 && data[i + 3] === 101) { // true - index += 4; - pushValue(true); - } - else if (char === 102 && data[i + 1] === 97 && data[i + 2] === 108 && data[i + 3] === 115 && data[i + 4] === 101) { // false - index += 5; - pushValue(false); - } - else if (isNumber(char)) { - var value = ''; - while (index < data.length && isNumber(data[index])) { - value += String.fromCharCode(data[index]); - index++; - } - pushValue(parseFloat(value)); - } - else { - index += 1; - console.log("Invalid token ".concat(String.fromCharCode(char), " at ").concat(index)); - // ` near ${String.fromCharCode.apply(null, data.slice(index - 10, index + 20) as any)}` + - // `data [${Array.from(data.slice(index - 10, index + 20)).join(', ')}]` - } - skipWhitespace(); - } - return root; -} -exports.parseEngineData = parseEngineData; -var floatKeys = [ - 'Axis', 'XY', 'Zone', 'WordSpacing', 'FirstLineIndent', 'GlyphSpacing', 'StartIndent', 'EndIndent', 'SpaceBefore', - 'SpaceAfter', 'LetterSpacing', 'Values', 'GridSize', 'GridLeading', 'PointBase', 'BoxBounds', 'TransformPoint0', 'TransformPoint1', - 'TransformPoint2', 'FontSize', 'Leading', 'HorizontalScale', 'VerticalScale', 'BaselineShift', 'Tsume', - 'OutlineWidth', 'AutoLeading', -]; -var intArrays = ['RunLengthArray']; -// TODO: handle /nil -function serializeEngineData(data, condensed) { - if (condensed === void 0) { condensed = false; } - var buffer = new Uint8Array(1024); - var offset = 0; - var indent = 0; - function write(value) { - if (offset >= buffer.length) { - var newBuffer = new Uint8Array(buffer.length * 2); - newBuffer.set(buffer); - buffer = newBuffer; - } - buffer[offset] = value; - offset++; - } - function writeString(value) { - for (var i = 0; i < value.length; i++) { - write(value.charCodeAt(i)); - } - } - function writeIndent() { - if (condensed) { - writeString(' '); - } - else { - for (var i = 0; i < indent; i++) { - writeString('\t'); - } - } - } - function writeProperty(key, value) { - writeIndent(); - writeString("/".concat(key)); - writeValue(value, key, true); - if (!condensed) - writeString('\n'); - } - function serializeInt(value) { - return value.toString(); - } - function serializeFloat(value) { - return value.toFixed(5) - .replace(/(\d)0+$/g, '$1') - .replace(/^0+\.([1-9])/g, '.$1') - .replace(/^-0+\.0(\d)/g, '-.0$1'); - } - function serializeNumber(value, key) { - var isFloat = (key && floatKeys.indexOf(key) !== -1) || (value | 0) !== value; - return isFloat ? serializeFloat(value) : serializeInt(value); - } - function getKeys(value) { - var keys = Object.keys(value); - if (keys.indexOf('98') !== -1) - keys.unshift.apply(keys, keys.splice(keys.indexOf('99'), 1)); - if (keys.indexOf('99') !== -1) - keys.unshift.apply(keys, keys.splice(keys.indexOf('99'), 1)); - return keys; - } - function writeStringByte(value) { - if (value === 40 || value === 41 || value === 92) { // ( ) \ - write(92); // \ - } - write(value); - } - function writeValue(value, key, inProperty) { - if (inProperty === void 0) { inProperty = false; } - function writePrefix() { - if (inProperty) { - writeString(' '); - } - else { - writeIndent(); - } - } - if (value === null) { - writePrefix(); - writeString(condensed ? '/nil' : 'null'); - } - else if (typeof value === 'number') { - writePrefix(); - writeString(serializeNumber(value, key)); - } - else if (typeof value === 'boolean') { - writePrefix(); - writeString(value ? 'true' : 'false'); - } - else if (typeof value === 'string') { - writePrefix(); - if ((key === '99' || key === '98') && value.charAt(0) === '/') { - writeString(value); - } - else { - writeString('('); - write(0xfe); - write(0xff); - for (var i = 0; i < value.length; i++) { - var code = value.charCodeAt(i); - writeStringByte((code >> 8) & 0xff); - writeStringByte(code & 0xff); - } - writeString(')'); - } - } - else if (Array.isArray(value)) { - writePrefix(); - if (value.every(function (x) { return typeof x === 'number'; })) { - writeString('['); - var intArray = intArrays.indexOf(key) !== -1; - for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { - var x = value_1[_i]; - writeString(' '); - writeString(intArray ? serializeNumber(x) : serializeFloat(x)); - } - writeString(' ]'); - } - else { - writeString('['); - if (!condensed) - writeString('\n'); - for (var _a = 0, value_2 = value; _a < value_2.length; _a++) { - var x = value_2[_a]; - writeValue(x, key); - if (!condensed) - writeString('\n'); - } - writeIndent(); - writeString(']'); - } - } - else if (typeof value === 'object') { - if (inProperty && !condensed) - writeString('\n'); - writeIndent(); - writeString('<<'); - if (!condensed) - writeString('\n'); - indent++; - for (var _b = 0, _c = getKeys(value); _b < _c.length; _b++) { - var key_1 = _c[_b]; - writeProperty(key_1, value[key_1]); - } - indent--; - writeIndent(); - writeString('>>'); - } - return undefined; - } - if (condensed) { - if (typeof data === 'object') { - for (var _i = 0, _a = getKeys(data); _i < _a.length; _i++) { - var key = _a[_i]; - writeProperty(key, data[key]); - } - } - } - else { - writeString('\n\n'); - writeValue(data); - } - return buffer.slice(0, offset); -} -exports.serializeEngineData = serializeEngineData; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.serializeEngineData = exports.parseEngineData = void 0; +function isWhitespace(char) { + // ' ', '\n', '\r', '\t' + return char === 32 || char === 10 || char === 13 || char === 9; +} +function isNumber(char) { + // 0123456789.- + return (char >= 48 && char <= 57) || char === 46 || char === 45; +} +function parseEngineData(data) { + var index = 0; + function skipWhitespace() { + while (index < data.length && isWhitespace(data[index])) { + index++; + } + } + function getTextByte() { + var byte = data[index]; + index++; + if (byte === 92) { // \ + byte = data[index]; + index++; + } + return byte; + } + function getText() { + var result = ''; + if (data[index] === 41) { // ) + index++; + return result; + } + // Strings start with utf-16 BOM + if (data[index] !== 0xFE || data[index + 1] !== 0xFF) { + throw new Error('Invalid utf-16 BOM'); + } + index += 2; + // ), ( and \ characters are escaped in ascii manner, remove the escapes before interpreting + // the bytes as utf-16 + while (index < data.length && data[index] !== 41) { // ) + var high = getTextByte(); + var low = getTextByte(); + var char = (high << 8) | low; + result += String.fromCharCode(char); + } + index++; + return result; + } + var root = null; + var stack = []; + function pushContainer(value) { + if (!stack.length) { + stack.push(value); + root = value; + } + else { + pushValue(value); + stack.push(value); + } + } + function pushValue(value) { + if (!stack.length) + throw new Error('Invalid data'); + var top = stack[stack.length - 1]; + if (typeof top === 'string') { + stack[stack.length - 2][top] = value; + pop(); + } + else if (Array.isArray(top)) { + top.push(value); + } + else { + throw new Error('Invalid data'); + } + } + function pushProperty(name) { + if (!stack.length) + pushContainer({}); + var top = stack[stack.length - 1]; + if (top && typeof top === 'string') { + if (name === 'nil') { + pushValue(null); + } + else { + pushValue("/".concat(name)); + } + } + else if (top && typeof top === 'object') { + stack.push(name); + } + else { + throw new Error('Invalid data'); + } + } + function pop() { + if (!stack.length) + throw new Error('Invalid data'); + stack.pop(); + } + skipWhitespace(); + while (index < data.length) { + var i = index; + var char = data[i]; + if (char === 60 && data[i + 1] === 60) { // << + index += 2; + pushContainer({}); + } + else if (char === 62 && data[i + 1] === 62) { // >> + index += 2; + pop(); + } + else if (char === 47) { // / + index += 1; + var start = index; + while (index < data.length && !isWhitespace(data[index])) { + index++; + } + var name_1 = ''; + for (var i_1 = start; i_1 < index; i_1++) { + name_1 += String.fromCharCode(data[i_1]); + } + pushProperty(name_1); + } + else if (char === 40) { // ( + index += 1; + pushValue(getText()); + } + else if (char === 91) { // [ + index += 1; + pushContainer([]); + } + else if (char === 93) { // ] + index += 1; + pop(); + } + else if (char === 110 && data[i + 1] === 117 && data[i + 2] === 108 && data[i + 3] === 108) { // null + index += 4; + pushValue(null); + } + else if (char === 116 && data[i + 1] === 114 && data[i + 2] === 117 && data[i + 3] === 101) { // true + index += 4; + pushValue(true); + } + else if (char === 102 && data[i + 1] === 97 && data[i + 2] === 108 && data[i + 3] === 115 && data[i + 4] === 101) { // false + index += 5; + pushValue(false); + } + else if (isNumber(char)) { + var value = ''; + while (index < data.length && isNumber(data[index])) { + value += String.fromCharCode(data[index]); + index++; + } + pushValue(parseFloat(value)); + } + else { + index += 1; + console.log("Invalid token ".concat(String.fromCharCode(char), " at ").concat(index)); + // ` near ${String.fromCharCode.apply(null, data.slice(index - 10, index + 20) as any)}` + + // `data [${Array.from(data.slice(index - 10, index + 20)).join(', ')}]` + } + skipWhitespace(); + } + return root; +} +exports.parseEngineData = parseEngineData; +var floatKeys = [ + 'Axis', 'XY', 'Zone', 'WordSpacing', 'FirstLineIndent', 'GlyphSpacing', 'StartIndent', 'EndIndent', 'SpaceBefore', + 'SpaceAfter', 'LetterSpacing', 'Values', 'GridSize', 'GridLeading', 'PointBase', 'BoxBounds', 'TransformPoint0', 'TransformPoint1', + 'TransformPoint2', 'FontSize', 'Leading', 'HorizontalScale', 'VerticalScale', 'BaselineShift', 'Tsume', + 'OutlineWidth', 'AutoLeading', +]; +var intArrays = ['RunLengthArray']; +// TODO: handle /nil +function serializeEngineData(data, condensed) { + if (condensed === void 0) { condensed = false; } + var buffer = new Uint8Array(1024); + var offset = 0; + var indent = 0; + function write(value) { + if (offset >= buffer.length) { + var newBuffer = new Uint8Array(buffer.length * 2); + newBuffer.set(buffer); + buffer = newBuffer; + } + buffer[offset] = value; + offset++; + } + function writeString(value) { + for (var i = 0; i < value.length; i++) { + write(value.charCodeAt(i)); + } + } + function writeIndent() { + if (condensed) { + writeString(' '); + } + else { + for (var i = 0; i < indent; i++) { + writeString('\t'); + } + } + } + function writeProperty(key, value) { + writeIndent(); + writeString("/".concat(key)); + writeValue(value, key, true); + if (!condensed) + writeString('\n'); + } + function serializeInt(value) { + return value.toString(); + } + function serializeFloat(value) { + return value.toFixed(5) + .replace(/(\d)0+$/g, '$1') + .replace(/^0+\.([1-9])/g, '.$1') + .replace(/^-0+\.0(\d)/g, '-.0$1'); + } + function serializeNumber(value, key) { + var isFloat = (key && floatKeys.indexOf(key) !== -1) || (value | 0) !== value; + return isFloat ? serializeFloat(value) : serializeInt(value); + } + function getKeys(value) { + var keys = Object.keys(value); + if (keys.indexOf('98') !== -1) + keys.unshift.apply(keys, keys.splice(keys.indexOf('99'), 1)); + if (keys.indexOf('99') !== -1) + keys.unshift.apply(keys, keys.splice(keys.indexOf('99'), 1)); + return keys; + } + function writeStringByte(value) { + if (value === 40 || value === 41 || value === 92) { // ( ) \ + write(92); // \ + } + write(value); + } + function writeValue(value, key, inProperty) { + if (inProperty === void 0) { inProperty = false; } + function writePrefix() { + if (inProperty) { + writeString(' '); + } + else { + writeIndent(); + } + } + if (value === null) { + writePrefix(); + writeString(condensed ? '/nil' : 'null'); + } + else if (typeof value === 'number') { + writePrefix(); + writeString(serializeNumber(value, key)); + } + else if (typeof value === 'boolean') { + writePrefix(); + writeString(value ? 'true' : 'false'); + } + else if (typeof value === 'string') { + writePrefix(); + if ((key === '99' || key === '98') && value.charAt(0) === '/') { + writeString(value); + } + else { + writeString('('); + write(0xfe); + write(0xff); + for (var i = 0; i < value.length; i++) { + var code = value.charCodeAt(i); + writeStringByte((code >> 8) & 0xff); + writeStringByte(code & 0xff); + } + writeString(')'); + } + } + else if (Array.isArray(value)) { + writePrefix(); + if (value.every(function (x) { return typeof x === 'number'; })) { + writeString('['); + var intArray = intArrays.indexOf(key) !== -1; + for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { + var x = value_1[_i]; + writeString(' '); + writeString(intArray ? serializeNumber(x) : serializeFloat(x)); + } + writeString(' ]'); + } + else { + writeString('['); + if (!condensed) + writeString('\n'); + for (var _a = 0, value_2 = value; _a < value_2.length; _a++) { + var x = value_2[_a]; + writeValue(x, key); + if (!condensed) + writeString('\n'); + } + writeIndent(); + writeString(']'); + } + } + else if (typeof value === 'object') { + if (inProperty && !condensed) + writeString('\n'); + writeIndent(); + writeString('<<'); + if (!condensed) + writeString('\n'); + indent++; + for (var _b = 0, _c = getKeys(value); _b < _c.length; _b++) { + var key_1 = _c[_b]; + writeProperty(key_1, value[key_1]); + } + indent--; + writeIndent(); + writeString('>>'); + } + return undefined; + } + if (condensed) { + if (typeof data === 'object') { + for (var _i = 0, _a = getKeys(data); _i < _a.length; _i++) { + var key = _a[_i]; + writeProperty(key, data[key]); + } + } + } + else { + writeString('\n\n'); + writeValue(data); + } + return buffer.slice(0, offset); +} +exports.serializeEngineData = serializeEngineData; + },{}],7:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.initializeCanvas = exports.createImageData = exports.createCanvasFromData = exports.createCanvas = exports.writeDataZipWithoutPrediction = exports.writeDataRLE = exports.writeDataRaw = exports.decodeBitmap = exports.resetImageData = exports.hasAlpha = exports.clamp = exports.offsetForChannel = exports.Compression = exports.ChannelID = exports.MaskParams = exports.LayerMaskFlags = exports.ColorSpace = exports.createEnum = exports.revMap = exports.largeAdditionalInfoKeys = exports.layerColors = exports.toBlendMode = exports.fromBlendMode = exports.RAW_IMAGE_DATA = exports.MOCK_HANDLERS = void 0; -var base64_js_1 = require("base64-js"); -var pako_1 = require("pako"); -exports.MOCK_HANDLERS = false; -exports.RAW_IMAGE_DATA = false; -exports.fromBlendMode = {}; -exports.toBlendMode = { - 'pass': 'pass through', - 'norm': 'normal', - 'diss': 'dissolve', - 'dark': 'darken', - 'mul ': 'multiply', - 'idiv': 'color burn', - 'lbrn': 'linear burn', - 'dkCl': 'darker color', - 'lite': 'lighten', - 'scrn': 'screen', - 'div ': 'color dodge', - 'lddg': 'linear dodge', - 'lgCl': 'lighter color', - 'over': 'overlay', - 'sLit': 'soft light', - 'hLit': 'hard light', - 'vLit': 'vivid light', - 'lLit': 'linear light', - 'pLit': 'pin light', - 'hMix': 'hard mix', - 'diff': 'difference', - 'smud': 'exclusion', - 'fsub': 'subtract', - 'fdiv': 'divide', - 'hue ': 'hue', - 'sat ': 'saturation', - 'colr': 'color', - 'lum ': 'luminosity', -}; -Object.keys(exports.toBlendMode).forEach(function (key) { return exports.fromBlendMode[exports.toBlendMode[key]] = key; }); -exports.layerColors = [ - 'none', 'red', 'orange', 'yellow', 'green', 'blue', 'violet', 'gray' -]; -exports.largeAdditionalInfoKeys = [ - // from documentation - 'LMsk', 'Lr16', 'Lr32', 'Layr', 'Mt16', 'Mt32', 'Mtrn', 'Alph', 'FMsk', 'lnk2', 'FEid', 'FXid', 'PxSD', - // from guessing - 'cinf', -]; -function revMap(map) { - var result = {}; - Object.keys(map).forEach(function (key) { return result[map[key]] = key; }); - return result; -} -exports.revMap = revMap; -function createEnum(prefix, def, map) { - var rev = revMap(map); - var decode = function (val) { - var value = val.split('.')[1]; - if (value && !rev[value]) - throw new Error("Unrecognized value for enum: '".concat(val, "'")); - return rev[value] || def; - }; - var encode = function (val) { - if (val && !map[val]) - throw new Error("Invalid value for enum: '".concat(val, "'")); - return "".concat(prefix, ".").concat(map[val] || map[def]); - }; - return { decode: decode, encode: encode }; -} -exports.createEnum = createEnum; -var ColorSpace; -(function (ColorSpace) { - ColorSpace[ColorSpace["RGB"] = 0] = "RGB"; - ColorSpace[ColorSpace["HSB"] = 1] = "HSB"; - ColorSpace[ColorSpace["CMYK"] = 2] = "CMYK"; - ColorSpace[ColorSpace["Lab"] = 7] = "Lab"; - ColorSpace[ColorSpace["Grayscale"] = 8] = "Grayscale"; -})(ColorSpace = exports.ColorSpace || (exports.ColorSpace = {})); -var LayerMaskFlags; -(function (LayerMaskFlags) { - LayerMaskFlags[LayerMaskFlags["PositionRelativeToLayer"] = 1] = "PositionRelativeToLayer"; - LayerMaskFlags[LayerMaskFlags["LayerMaskDisabled"] = 2] = "LayerMaskDisabled"; - LayerMaskFlags[LayerMaskFlags["InvertLayerMaskWhenBlending"] = 4] = "InvertLayerMaskWhenBlending"; - LayerMaskFlags[LayerMaskFlags["LayerMaskFromRenderingOtherData"] = 8] = "LayerMaskFromRenderingOtherData"; - LayerMaskFlags[LayerMaskFlags["MaskHasParametersAppliedToIt"] = 16] = "MaskHasParametersAppliedToIt"; -})(LayerMaskFlags = exports.LayerMaskFlags || (exports.LayerMaskFlags = {})); -var MaskParams; -(function (MaskParams) { - MaskParams[MaskParams["UserMaskDensity"] = 1] = "UserMaskDensity"; - MaskParams[MaskParams["UserMaskFeather"] = 2] = "UserMaskFeather"; - MaskParams[MaskParams["VectorMaskDensity"] = 4] = "VectorMaskDensity"; - MaskParams[MaskParams["VectorMaskFeather"] = 8] = "VectorMaskFeather"; -})(MaskParams = exports.MaskParams || (exports.MaskParams = {})); -var ChannelID; -(function (ChannelID) { - ChannelID[ChannelID["Color0"] = 0] = "Color0"; - ChannelID[ChannelID["Color1"] = 1] = "Color1"; - ChannelID[ChannelID["Color2"] = 2] = "Color2"; - ChannelID[ChannelID["Color3"] = 3] = "Color3"; - ChannelID[ChannelID["Transparency"] = -1] = "Transparency"; - ChannelID[ChannelID["UserMask"] = -2] = "UserMask"; - ChannelID[ChannelID["RealUserMask"] = -3] = "RealUserMask"; -})(ChannelID = exports.ChannelID || (exports.ChannelID = {})); -var Compression; -(function (Compression) { - Compression[Compression["RawData"] = 0] = "RawData"; - Compression[Compression["RleCompressed"] = 1] = "RleCompressed"; - Compression[Compression["ZipWithoutPrediction"] = 2] = "ZipWithoutPrediction"; - Compression[Compression["ZipWithPrediction"] = 3] = "ZipWithPrediction"; -})(Compression = exports.Compression || (exports.Compression = {})); -function offsetForChannel(channelId, cmyk) { - switch (channelId) { - case 0 /* ChannelID.Color0 */: return 0; - case 1 /* ChannelID.Color1 */: return 1; - case 2 /* ChannelID.Color2 */: return 2; - case 3 /* ChannelID.Color3 */: return cmyk ? 3 : channelId + 1; - case -1 /* ChannelID.Transparency */: return cmyk ? 4 : 3; - default: return channelId + 1; - } -} -exports.offsetForChannel = offsetForChannel; -function clamp(value, min, max) { - return value < min ? min : (value > max ? max : value); -} -exports.clamp = clamp; -function hasAlpha(data) { - var size = data.width * data.height * 4; - for (var i = 3; i < size; i += 4) { - if (data.data[i] !== 255) { - return true; - } - } - return false; -} -exports.hasAlpha = hasAlpha; -function resetImageData(_a) { - var data = _a.data; - var buffer = new Uint32Array(data.buffer); - var size = buffer.length | 0; - for (var p = 0; p < size; p = (p + 1) | 0) { - buffer[p] = 0xff000000; - } -} -exports.resetImageData = resetImageData; -function decodeBitmap(input, output, width, height) { - for (var y = 0, p = 0, o = 0; y < height; y++) { - for (var x = 0; x < width;) { - var b = input[o++]; - for (var i = 0; i < 8 && x < width; i++, x++) { - var v = b & 0x80 ? 0 : 255; - b = b << 1; - output[p++] = v; - output[p++] = v; - output[p++] = v; - output[p++] = 255; - } - } - } -} -exports.decodeBitmap = decodeBitmap; -function writeDataRaw(data, offset, width, height) { - if (!width || !height) - return undefined; - var array = new Uint8Array(width * height); - for (var i = 0; i < array.length; i++) { - array[i] = data.data[i * 4 + offset]; - } - return array; -} -exports.writeDataRaw = writeDataRaw; -function writeDataRLE(buffer, _a, offsets, large) { - var data = _a.data, width = _a.width, height = _a.height; - if (!width || !height) - return undefined; - var stride = (4 * width) | 0; - var ol = 0; - var o = (offsets.length * (large ? 4 : 2) * height) | 0; - for (var _i = 0, offsets_1 = offsets; _i < offsets_1.length; _i++) { - var offset = offsets_1[_i]; - for (var y = 0, p = offset | 0; y < height; y++) { - var strideStart = (y * stride) | 0; - var strideEnd = (strideStart + stride) | 0; - var lastIndex = (strideEnd + offset - 4) | 0; - var lastIndex2 = (lastIndex - 4) | 0; - var startOffset = o; - for (p = (strideStart + offset) | 0; p < strideEnd; p = (p + 4) | 0) { - if (p < lastIndex2) { - var value1 = data[p]; - p = (p + 4) | 0; - var value2 = data[p]; - p = (p + 4) | 0; - var value3 = data[p]; - if (value1 === value2 && value1 === value3) { - var count = 3; - while (count < 128 && p < lastIndex && data[(p + 4) | 0] === value1) { - count = (count + 1) | 0; - p = (p + 4) | 0; - } - buffer[o++] = 1 - count; - buffer[o++] = value1; - } - else { - var countIndex = o; - var writeLast = true; - var count = 1; - buffer[o++] = 0; - buffer[o++] = value1; - while (p < lastIndex && count < 128) { - p = (p + 4) | 0; - value1 = value2; - value2 = value3; - value3 = data[p]; - if (value1 === value2 && value1 === value3) { - p = (p - 12) | 0; - writeLast = false; - break; - } - else { - count++; - buffer[o++] = value1; - } - } - if (writeLast) { - if (count < 127) { - buffer[o++] = value2; - buffer[o++] = value3; - count += 2; - } - else if (count < 128) { - buffer[o++] = value2; - count++; - p = (p - 4) | 0; - } - else { - p = (p - 8) | 0; - } - } - buffer[countIndex] = count - 1; - } - } - else if (p === lastIndex) { - buffer[o++] = 0; - buffer[o++] = data[p]; - } - else { // p === lastIndex2 - buffer[o++] = 1; - buffer[o++] = data[p]; - p = (p + 4) | 0; - buffer[o++] = data[p]; - } - } - var length_1 = o - startOffset; - if (large) { - buffer[ol++] = (length_1 >> 24) & 0xff; - buffer[ol++] = (length_1 >> 16) & 0xff; - } - buffer[ol++] = (length_1 >> 8) & 0xff; - buffer[ol++] = length_1 & 0xff; - } - } - return buffer.slice(0, o); -} -exports.writeDataRLE = writeDataRLE; -function writeDataZipWithoutPrediction(_a, offsets) { - var data = _a.data, width = _a.width, height = _a.height; - var size = width * height; - var channel = new Uint8Array(size); - var buffers = []; - var totalLength = 0; - for (var _i = 0, offsets_2 = offsets; _i < offsets_2.length; _i++) { - var offset = offsets_2[_i]; - for (var i = 0, o = offset; i < size; i++, o += 4) { - channel[i] = data[o]; - } - var buffer = (0, pako_1.deflate)(channel); - buffers.push(buffer); - totalLength += buffer.byteLength; - } - if (buffers.length > 0) { - var buffer = new Uint8Array(totalLength); - var offset = 0; - for (var _b = 0, buffers_1 = buffers; _b < buffers_1.length; _b++) { - var b = buffers_1[_b]; - buffer.set(b, offset); - offset += b.byteLength; - } - return buffer; - } - else { - return buffers[0]; - } -} -exports.writeDataZipWithoutPrediction = writeDataZipWithoutPrediction; -var createCanvas = function () { - throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvas method'); -}; -exports.createCanvas = createCanvas; -var createCanvasFromData = function () { - throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvasFromData method'); -}; -exports.createCanvasFromData = createCanvasFromData; -var tempCanvas = undefined; -var createImageData = function (width, height) { - if (!tempCanvas) - tempCanvas = (0, exports.createCanvas)(1, 1); - return tempCanvas.getContext('2d').createImageData(width, height); -}; -exports.createImageData = createImageData; -if (typeof document !== 'undefined') { - exports.createCanvas = function (width, height) { - var canvas = document.createElement('canvas'); - canvas.width = width; - canvas.height = height; - return canvas; - }; - exports.createCanvasFromData = function (data) { - var image = new Image(); - image.src = 'data:image/jpeg;base64,' + (0, base64_js_1.fromByteArray)(data); - var canvas = document.createElement('canvas'); - canvas.width = image.width; - canvas.height = image.height; - canvas.getContext('2d').drawImage(image, 0, 0); - return canvas; - }; -} -function initializeCanvas(createCanvasMethod, createCanvasFromDataMethod, createImageDataMethod) { - exports.createCanvas = createCanvasMethod; - exports.createCanvasFromData = createCanvasFromDataMethod || exports.createCanvasFromData; - exports.createImageData = createImageDataMethod || exports.createImageData; -} -exports.initializeCanvas = initializeCanvas; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initializeCanvas = exports.createImageData = exports.createCanvasFromData = exports.createCanvas = exports.writeDataZipWithoutPrediction = exports.writeDataRLE = exports.writeDataRaw = exports.decodeBitmap = exports.resetImageData = exports.hasAlpha = exports.clamp = exports.offsetForChannel = exports.Compression = exports.ChannelID = exports.MaskParams = exports.LayerMaskFlags = exports.ColorSpace = exports.createEnum = exports.revMap = exports.largeAdditionalInfoKeys = exports.layerColors = exports.toBlendMode = exports.fromBlendMode = exports.RAW_IMAGE_DATA = exports.MOCK_HANDLERS = void 0; +var base64_js_1 = require("base64-js"); +var pako_1 = require("pako"); +exports.MOCK_HANDLERS = false; +exports.RAW_IMAGE_DATA = false; +exports.fromBlendMode = {}; +exports.toBlendMode = { + 'pass': 'pass through', + 'norm': 'normal', + 'diss': 'dissolve', + 'dark': 'darken', + 'mul ': 'multiply', + 'idiv': 'color burn', + 'lbrn': 'linear burn', + 'dkCl': 'darker color', + 'lite': 'lighten', + 'scrn': 'screen', + 'div ': 'color dodge', + 'lddg': 'linear dodge', + 'lgCl': 'lighter color', + 'over': 'overlay', + 'sLit': 'soft light', + 'hLit': 'hard light', + 'vLit': 'vivid light', + 'lLit': 'linear light', + 'pLit': 'pin light', + 'hMix': 'hard mix', + 'diff': 'difference', + 'smud': 'exclusion', + 'fsub': 'subtract', + 'fdiv': 'divide', + 'hue ': 'hue', + 'sat ': 'saturation', + 'colr': 'color', + 'lum ': 'luminosity', +}; +Object.keys(exports.toBlendMode).forEach(function (key) { return exports.fromBlendMode[exports.toBlendMode[key]] = key; }); +exports.layerColors = [ + 'none', 'red', 'orange', 'yellow', 'green', 'blue', 'violet', 'gray' +]; +exports.largeAdditionalInfoKeys = [ + // from documentation + 'LMsk', 'Lr16', 'Lr32', 'Layr', 'Mt16', 'Mt32', 'Mtrn', 'Alph', 'FMsk', 'lnk2', 'FEid', 'FXid', 'PxSD', + // from guessing + 'cinf', +]; +function revMap(map) { + var result = {}; + Object.keys(map).forEach(function (key) { return result[map[key]] = key; }); + return result; +} +exports.revMap = revMap; +function createEnum(prefix, def, map) { + var rev = revMap(map); + var decode = function (val) { + var value = val.split('.')[1]; + if (value && !rev[value]) + throw new Error("Unrecognized value for enum: '".concat(val, "'")); + return rev[value] || def; + }; + var encode = function (val) { + if (val && !map[val]) + throw new Error("Invalid value for enum: '".concat(val, "'")); + return "".concat(prefix, ".").concat(map[val] || map[def]); + }; + return { decode: decode, encode: encode }; +} +exports.createEnum = createEnum; +var ColorSpace; +(function (ColorSpace) { + ColorSpace[ColorSpace["RGB"] = 0] = "RGB"; + ColorSpace[ColorSpace["HSB"] = 1] = "HSB"; + ColorSpace[ColorSpace["CMYK"] = 2] = "CMYK"; + ColorSpace[ColorSpace["Lab"] = 7] = "Lab"; + ColorSpace[ColorSpace["Grayscale"] = 8] = "Grayscale"; +})(ColorSpace = exports.ColorSpace || (exports.ColorSpace = {})); +var LayerMaskFlags; +(function (LayerMaskFlags) { + LayerMaskFlags[LayerMaskFlags["PositionRelativeToLayer"] = 1] = "PositionRelativeToLayer"; + LayerMaskFlags[LayerMaskFlags["LayerMaskDisabled"] = 2] = "LayerMaskDisabled"; + LayerMaskFlags[LayerMaskFlags["InvertLayerMaskWhenBlending"] = 4] = "InvertLayerMaskWhenBlending"; + LayerMaskFlags[LayerMaskFlags["LayerMaskFromRenderingOtherData"] = 8] = "LayerMaskFromRenderingOtherData"; + LayerMaskFlags[LayerMaskFlags["MaskHasParametersAppliedToIt"] = 16] = "MaskHasParametersAppliedToIt"; +})(LayerMaskFlags = exports.LayerMaskFlags || (exports.LayerMaskFlags = {})); +var MaskParams; +(function (MaskParams) { + MaskParams[MaskParams["UserMaskDensity"] = 1] = "UserMaskDensity"; + MaskParams[MaskParams["UserMaskFeather"] = 2] = "UserMaskFeather"; + MaskParams[MaskParams["VectorMaskDensity"] = 4] = "VectorMaskDensity"; + MaskParams[MaskParams["VectorMaskFeather"] = 8] = "VectorMaskFeather"; +})(MaskParams = exports.MaskParams || (exports.MaskParams = {})); +var ChannelID; +(function (ChannelID) { + ChannelID[ChannelID["Color0"] = 0] = "Color0"; + ChannelID[ChannelID["Color1"] = 1] = "Color1"; + ChannelID[ChannelID["Color2"] = 2] = "Color2"; + ChannelID[ChannelID["Color3"] = 3] = "Color3"; + ChannelID[ChannelID["Transparency"] = -1] = "Transparency"; + ChannelID[ChannelID["UserMask"] = -2] = "UserMask"; + ChannelID[ChannelID["RealUserMask"] = -3] = "RealUserMask"; +})(ChannelID = exports.ChannelID || (exports.ChannelID = {})); +var Compression; +(function (Compression) { + Compression[Compression["RawData"] = 0] = "RawData"; + Compression[Compression["RleCompressed"] = 1] = "RleCompressed"; + Compression[Compression["ZipWithoutPrediction"] = 2] = "ZipWithoutPrediction"; + Compression[Compression["ZipWithPrediction"] = 3] = "ZipWithPrediction"; +})(Compression = exports.Compression || (exports.Compression = {})); +function offsetForChannel(channelId, cmyk) { + switch (channelId) { + case 0 /* ChannelID.Color0 */: return 0; + case 1 /* ChannelID.Color1 */: return 1; + case 2 /* ChannelID.Color2 */: return 2; + case 3 /* ChannelID.Color3 */: return cmyk ? 3 : channelId + 1; + case -1 /* ChannelID.Transparency */: return cmyk ? 4 : 3; + default: return channelId + 1; + } +} +exports.offsetForChannel = offsetForChannel; +function clamp(value, min, max) { + return value < min ? min : (value > max ? max : value); +} +exports.clamp = clamp; +function hasAlpha(data) { + var size = data.width * data.height * 4; + for (var i = 3; i < size; i += 4) { + if (data.data[i] !== 255) { + return true; + } + } + return false; +} +exports.hasAlpha = hasAlpha; +function resetImageData(_a) { + var data = _a.data; + var buffer = new Uint32Array(data.buffer); + var size = buffer.length | 0; + for (var p = 0; p < size; p = (p + 1) | 0) { + buffer[p] = 0xff000000; + } +} +exports.resetImageData = resetImageData; +function decodeBitmap(input, output, width, height) { + for (var y = 0, p = 0, o = 0; y < height; y++) { + for (var x = 0; x < width;) { + var b = input[o++]; + for (var i = 0; i < 8 && x < width; i++, x++) { + var v = b & 0x80 ? 0 : 255; + b = b << 1; + output[p++] = v; + output[p++] = v; + output[p++] = v; + output[p++] = 255; + } + } + } +} +exports.decodeBitmap = decodeBitmap; +function writeDataRaw(data, offset, width, height) { + if (!width || !height) + return undefined; + var array = new Uint8Array(width * height); + for (var i = 0; i < array.length; i++) { + array[i] = data.data[i * 4 + offset]; + } + return array; +} +exports.writeDataRaw = writeDataRaw; +function writeDataRLE(buffer, _a, offsets, large) { + var data = _a.data, width = _a.width, height = _a.height; + if (!width || !height) + return undefined; + var stride = (4 * width) | 0; + var ol = 0; + var o = (offsets.length * (large ? 4 : 2) * height) | 0; + for (var _i = 0, offsets_1 = offsets; _i < offsets_1.length; _i++) { + var offset = offsets_1[_i]; + for (var y = 0, p = offset | 0; y < height; y++) { + var strideStart = (y * stride) | 0; + var strideEnd = (strideStart + stride) | 0; + var lastIndex = (strideEnd + offset - 4) | 0; + var lastIndex2 = (lastIndex - 4) | 0; + var startOffset = o; + for (p = (strideStart + offset) | 0; p < strideEnd; p = (p + 4) | 0) { + if (p < lastIndex2) { + var value1 = data[p]; + p = (p + 4) | 0; + var value2 = data[p]; + p = (p + 4) | 0; + var value3 = data[p]; + if (value1 === value2 && value1 === value3) { + var count = 3; + while (count < 128 && p < lastIndex && data[(p + 4) | 0] === value1) { + count = (count + 1) | 0; + p = (p + 4) | 0; + } + buffer[o++] = 1 - count; + buffer[o++] = value1; + } + else { + var countIndex = o; + var writeLast = true; + var count = 1; + buffer[o++] = 0; + buffer[o++] = value1; + while (p < lastIndex && count < 128) { + p = (p + 4) | 0; + value1 = value2; + value2 = value3; + value3 = data[p]; + if (value1 === value2 && value1 === value3) { + p = (p - 12) | 0; + writeLast = false; + break; + } + else { + count++; + buffer[o++] = value1; + } + } + if (writeLast) { + if (count < 127) { + buffer[o++] = value2; + buffer[o++] = value3; + count += 2; + } + else if (count < 128) { + buffer[o++] = value2; + count++; + p = (p - 4) | 0; + } + else { + p = (p - 8) | 0; + } + } + buffer[countIndex] = count - 1; + } + } + else if (p === lastIndex) { + buffer[o++] = 0; + buffer[o++] = data[p]; + } + else { // p === lastIndex2 + buffer[o++] = 1; + buffer[o++] = data[p]; + p = (p + 4) | 0; + buffer[o++] = data[p]; + } + } + var length_1 = o - startOffset; + if (large) { + buffer[ol++] = (length_1 >> 24) & 0xff; + buffer[ol++] = (length_1 >> 16) & 0xff; + } + buffer[ol++] = (length_1 >> 8) & 0xff; + buffer[ol++] = length_1 & 0xff; + } + } + return buffer.slice(0, o); +} +exports.writeDataRLE = writeDataRLE; +function writeDataZipWithoutPrediction(_a, offsets) { + var data = _a.data, width = _a.width, height = _a.height; + var size = width * height; + var channel = new Uint8Array(size); + var buffers = []; + var totalLength = 0; + for (var _i = 0, offsets_2 = offsets; _i < offsets_2.length; _i++) { + var offset = offsets_2[_i]; + for (var i = 0, o = offset; i < size; i++, o += 4) { + channel[i] = data[o]; + } + var buffer = (0, pako_1.deflate)(channel); + buffers.push(buffer); + totalLength += buffer.byteLength; + } + if (buffers.length > 0) { + var buffer = new Uint8Array(totalLength); + var offset = 0; + for (var _b = 0, buffers_1 = buffers; _b < buffers_1.length; _b++) { + var b = buffers_1[_b]; + buffer.set(b, offset); + offset += b.byteLength; + } + return buffer; + } + else { + return buffers[0]; + } +} +exports.writeDataZipWithoutPrediction = writeDataZipWithoutPrediction; +var createCanvas = function () { + throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvas method'); +}; +exports.createCanvas = createCanvas; +var createCanvasFromData = function () { + throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvasFromData method'); +}; +exports.createCanvasFromData = createCanvasFromData; +var tempCanvas = undefined; +var createImageData = function (width, height) { + if (!tempCanvas) + tempCanvas = (0, exports.createCanvas)(1, 1); + return tempCanvas.getContext('2d').createImageData(width, height); +}; +exports.createImageData = createImageData; +if (typeof document !== 'undefined') { + exports.createCanvas = function (width, height) { + var canvas = document.createElement('canvas'); + canvas.width = width; + canvas.height = height; + return canvas; + }; + exports.createCanvasFromData = function (data) { + var image = new Image(); + image.src = 'data:image/jpeg;base64,' + (0, base64_js_1.fromByteArray)(data); + var canvas = document.createElement('canvas'); + canvas.width = image.width; + canvas.height = image.height; + canvas.getContext('2d').drawImage(image, 0, 0); + return canvas; + }; +} +function initializeCanvas(createCanvasMethod, createCanvasFromDataMethod, createImageDataMethod) { + exports.createCanvas = createCanvasMethod; + exports.createCanvasFromData = createCanvasFromDataMethod || exports.createCanvasFromData; + exports.createImageData = createImageDataMethod || exports.createImageData; +} +exports.initializeCanvas = initializeCanvas; + },{"base64-js":15,"pako":18}],8:[function(require,module,exports){ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resourceHandlersMap = exports.resourceHandlers = void 0; -var base64_js_1 = require("base64-js"); -var psdReader_1 = require("./psdReader"); -var psdWriter_1 = require("./psdWriter"); -var helpers_1 = require("./helpers"); -var utf8_1 = require("./utf8"); -var descriptor_1 = require("./descriptor"); -exports.resourceHandlers = []; -exports.resourceHandlersMap = {}; -function addHandler(key, has, read, write) { - var handler = { key: key, has: has, read: read, write: write }; - exports.resourceHandlers.push(handler); - exports.resourceHandlersMap[handler.key] = handler; -} -var LOG_MOCK_HANDLERS = false; -var RESOLUTION_UNITS = [undefined, 'PPI', 'PPCM']; -var MEASUREMENT_UNITS = [undefined, 'Inches', 'Centimeters', 'Points', 'Picas', 'Columns']; -var hex = '0123456789abcdef'; -function charToNibble(code) { - return code <= 57 ? code - 48 : code - 87; -} -function byteAt(value, index) { - return (charToNibble(value.charCodeAt(index)) << 4) | charToNibble(value.charCodeAt(index + 1)); -} -function readUtf8String(reader, length) { - var buffer = (0, psdReader_1.readBytes)(reader, length); - return (0, utf8_1.decodeString)(buffer); -} -function writeUtf8String(writer, value) { - var buffer = (0, utf8_1.encodeString)(value); - (0, psdWriter_1.writeBytes)(writer, buffer); -} -helpers_1.MOCK_HANDLERS && addHandler(1028, // IPTC-NAA record -function (// IPTC-NAA record -target) { return target._ir1028 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1028', left()); - target._ir1028 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1028); -}); -addHandler(1061, function (target) { return target.captionDigest !== undefined; }, function (reader, target) { - var captionDigest = ''; - for (var i = 0; i < 16; i++) { - var byte = (0, psdReader_1.readUint8)(reader); - captionDigest += hex[byte >> 4]; - captionDigest += hex[byte & 0xf]; - } - target.captionDigest = captionDigest; -}, function (writer, target) { - for (var i = 0; i < 16; i++) { - (0, psdWriter_1.writeUint8)(writer, byteAt(target.captionDigest, i * 2)); - } -}); -addHandler(1060, function (target) { return target.xmpMetadata !== undefined; }, function (reader, target, left) { return target.xmpMetadata = readUtf8String(reader, left()); }, function (writer, target) { return writeUtf8String(writer, target.xmpMetadata); }); -var Inte = (0, helpers_1.createEnum)('Inte', 'perceptual', { - 'perceptual': 'Img ', - 'saturation': 'Grp ', - 'relative colorimetric': 'Clrm', - 'absolute colorimetric': 'AClr', -}); -addHandler(1082, function (target) { return target.printInformation !== undefined; }, function (reader, target) { - var _a, _b; - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.printInformation = { - printerName: desc.printerName || '', - renderingIntent: Inte.decode((_a = desc.Inte) !== null && _a !== void 0 ? _a : 'Inte.Img '), - }; - var info = target.printInformation; - if (desc.PstS !== undefined) - info.printerManagesColors = desc.PstS; - if (desc['Nm '] !== undefined) - info.printerProfile = desc['Nm ']; - if (desc.MpBl !== undefined) - info.blackPointCompensation = desc.MpBl; - if (desc.printSixteenBit !== undefined) - info.printSixteenBit = desc.printSixteenBit; - if (desc.hardProof !== undefined) - info.hardProof = desc.hardProof; - if (desc.printProofSetup) { - if ('Bltn' in desc.printProofSetup) { - info.proofSetup = { builtin: desc.printProofSetup.Bltn.split('.')[1] }; - } - else { - info.proofSetup = { - profile: desc.printProofSetup.profile, - renderingIntent: Inte.decode((_b = desc.printProofSetup.Inte) !== null && _b !== void 0 ? _b : 'Inte.Img '), - blackPointCompensation: !!desc.printProofSetup.MpBl, - paperWhite: !!desc.printProofSetup.paperWhite, - }; - } - } -}, function (writer, target) { - var _a, _b; - var info = target.printInformation; - var desc = {}; - if (info.printerManagesColors) { - desc.PstS = true; - } - else { - if (info.hardProof !== undefined) - desc.hardProof = !!info.hardProof; - desc.ClrS = 'ClrS.RGBC'; // TODO: ??? - desc['Nm '] = (_a = info.printerProfile) !== null && _a !== void 0 ? _a : 'CIE RGB'; - } - desc.Inte = Inte.encode(info.renderingIntent); - if (!info.printerManagesColors) - desc.MpBl = !!info.blackPointCompensation; - desc.printSixteenBit = !!info.printSixteenBit; - desc.printerName = info.printerName || ''; - if (info.proofSetup && 'profile' in info.proofSetup) { - desc.printProofSetup = { - profile: info.proofSetup.profile || '', - Inte: Inte.encode(info.proofSetup.renderingIntent), - MpBl: !!info.proofSetup.blackPointCompensation, - paperWhite: !!info.proofSetup.paperWhite, - }; - } - else { - desc.printProofSetup = { - Bltn: ((_b = info.proofSetup) === null || _b === void 0 ? void 0 : _b.builtin) ? "builtinProof.".concat(info.proofSetup.builtin) : 'builtinProof.proofCMYK', - }; - } - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'printOutput', desc); -}); -helpers_1.MOCK_HANDLERS && addHandler(1083, // Print style -function (// Print style -target) { return target._ir1083 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1083', left()); - target._ir1083 = (0, psdReader_1.readBytes)(reader, left()); - // TODO: - // const desc = readVersionAndDescriptor(reader); - // console.log('1083', require('util').inspect(desc, false, 99, true)); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1083); -}); -addHandler(1005, function (target) { return target.resolutionInfo !== undefined; }, function (reader, target) { - var horizontalResolution = (0, psdReader_1.readFixedPoint32)(reader); - var horizontalResolutionUnit = (0, psdReader_1.readUint16)(reader); - var widthUnit = (0, psdReader_1.readUint16)(reader); - var verticalResolution = (0, psdReader_1.readFixedPoint32)(reader); - var verticalResolutionUnit = (0, psdReader_1.readUint16)(reader); - var heightUnit = (0, psdReader_1.readUint16)(reader); - target.resolutionInfo = { - horizontalResolution: horizontalResolution, - horizontalResolutionUnit: RESOLUTION_UNITS[horizontalResolutionUnit] || 'PPI', - widthUnit: MEASUREMENT_UNITS[widthUnit] || 'Inches', - verticalResolution: verticalResolution, - verticalResolutionUnit: RESOLUTION_UNITS[verticalResolutionUnit] || 'PPI', - heightUnit: MEASUREMENT_UNITS[heightUnit] || 'Inches', - }; -}, function (writer, target) { - var info = target.resolutionInfo; - (0, psdWriter_1.writeFixedPoint32)(writer, info.horizontalResolution || 0); - (0, psdWriter_1.writeUint16)(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.horizontalResolutionUnit))); - (0, psdWriter_1.writeUint16)(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.widthUnit))); - (0, psdWriter_1.writeFixedPoint32)(writer, info.verticalResolution || 0); - (0, psdWriter_1.writeUint16)(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.verticalResolutionUnit))); - (0, psdWriter_1.writeUint16)(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.heightUnit))); -}); -var printScaleStyles = ['centered', 'size to fit', 'user defined']; -addHandler(1062, function (target) { return target.printScale !== undefined; }, function (reader, target) { - target.printScale = { - style: printScaleStyles[(0, psdReader_1.readInt16)(reader)], - x: (0, psdReader_1.readFloat32)(reader), - y: (0, psdReader_1.readFloat32)(reader), - scale: (0, psdReader_1.readFloat32)(reader), - }; -}, function (writer, target) { - var _a = target.printScale, style = _a.style, x = _a.x, y = _a.y, scale = _a.scale; - (0, psdWriter_1.writeInt16)(writer, Math.max(0, printScaleStyles.indexOf(style))); - (0, psdWriter_1.writeFloat32)(writer, x || 0); - (0, psdWriter_1.writeFloat32)(writer, y || 0); - (0, psdWriter_1.writeFloat32)(writer, scale || 0); -}); -addHandler(1006, function (target) { return target.alphaChannelNames !== undefined; }, function (reader, target, left) { - target.alphaChannelNames = []; - while (left()) { - var value = (0, psdReader_1.readPascalString)(reader, 1); - target.alphaChannelNames.push(value); - } -}, function (writer, target) { - for (var _i = 0, _a = target.alphaChannelNames; _i < _a.length; _i++) { - var name_1 = _a[_i]; - (0, psdWriter_1.writePascalString)(writer, name_1, 1); - } -}); -addHandler(1045, function (target) { return target.alphaChannelNames !== undefined; }, function (reader, target, left) { - target.alphaChannelNames = []; - while (left()) { - target.alphaChannelNames.push((0, psdReader_1.readUnicodeString)(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.alphaChannelNames; _i < _a.length; _i++) { - var name_2 = _a[_i]; - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, name_2); - } -}); -helpers_1.MOCK_HANDLERS && addHandler(1077, function (target) { return target._ir1077 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1077', left()); - target._ir1077 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1077); -}); -addHandler(1053, function (target) { return target.alphaIdentifiers !== undefined; }, function (reader, target, left) { - target.alphaIdentifiers = []; - while (left() >= 4) { - target.alphaIdentifiers.push((0, psdReader_1.readUint32)(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.alphaIdentifiers; _i < _a.length; _i++) { - var id = _a[_i]; - (0, psdWriter_1.writeUint32)(writer, id); - } -}); -addHandler(1010, function (target) { return target.backgroundColor !== undefined; }, function (reader, target) { return target.backgroundColor = (0, psdReader_1.readColor)(reader); }, function (writer, target) { return (0, psdWriter_1.writeColor)(writer, target.backgroundColor); }); -addHandler(1037, function (target) { return target.globalAngle !== undefined; }, function (reader, target) { return target.globalAngle = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.globalAngle); }); -addHandler(1049, function (target) { return target.globalAltitude !== undefined; }, function (reader, target) { return target.globalAltitude = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.globalAltitude); }); -addHandler(1011, function (target) { return target.printFlags !== undefined; }, function (reader, target) { - target.printFlags = { - labels: !!(0, psdReader_1.readUint8)(reader), - cropMarks: !!(0, psdReader_1.readUint8)(reader), - colorBars: !!(0, psdReader_1.readUint8)(reader), - registrationMarks: !!(0, psdReader_1.readUint8)(reader), - negative: !!(0, psdReader_1.readUint8)(reader), - flip: !!(0, psdReader_1.readUint8)(reader), - interpolate: !!(0, psdReader_1.readUint8)(reader), - caption: !!(0, psdReader_1.readUint8)(reader), - printFlags: !!(0, psdReader_1.readUint8)(reader), - }; -}, function (writer, target) { - var flags = target.printFlags; - (0, psdWriter_1.writeUint8)(writer, flags.labels ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.cropMarks ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.colorBars ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.registrationMarks ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.negative ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.flip ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.interpolate ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.caption ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.printFlags ? 1 : 0); -}); -helpers_1.MOCK_HANDLERS && addHandler(10000, // Print flags -function (// Print flags -target) { return target._ir10000 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 10000', left()); - target._ir10000 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir10000); -}); -helpers_1.MOCK_HANDLERS && addHandler(1013, // Color halftoning -function (// Color halftoning -target) { return target._ir1013 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1013', left()); - target._ir1013 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1013); -}); -helpers_1.MOCK_HANDLERS && addHandler(1016, // Color transfer functions -function (// Color transfer functions -target) { return target._ir1016 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1016', left()); - target._ir1016 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1016); -}); -addHandler(1080, // Count Information -function (// Count Information -target) { return target.countInformation !== undefined; }, function (reader, target) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.countInformation = desc.countGroupList.map(function (g) { return ({ - color: { r: g['Rd '], g: g['Grn '], b: g['Bl '] }, - name: g['Nm '], - size: g['Rds '], - fontSize: g.fontSize, - visible: g.Vsbl, - points: g.countObjectList.map(function (p) { return ({ x: p['X '], y: p['Y '] }); }), - }); }); -}, function (writer, target) { - var desc = { - Vrsn: 1, - countGroupList: target.countInformation.map(function (g) { return ({ - 'Rd ': g.color.r, - 'Grn ': g.color.g, - 'Bl ': g.color.b, - 'Nm ': g.name, - 'Rds ': g.size, - fontSize: g.fontSize, - Vsbl: g.visible, - countObjectList: g.points.map(function (p) { return ({ 'X ': p.x, 'Y ': p.y }); }), - }); }), - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'Cnt ', desc); -}); -addHandler(1024, function (target) { return target.layerState !== undefined; }, function (reader, target) { return target.layerState = (0, psdReader_1.readUint16)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint16)(writer, target.layerState); }); -addHandler(1026, function (target) { return target.layersGroup !== undefined; }, function (reader, target, left) { - target.layersGroup = []; - while (left()) { - target.layersGroup.push((0, psdReader_1.readUint16)(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.layersGroup; _i < _a.length; _i++) { - var g = _a[_i]; - (0, psdWriter_1.writeUint16)(writer, g); - } -}); -addHandler(1072, function (target) { return target.layerGroupsEnabledId !== undefined; }, function (reader, target, left) { - target.layerGroupsEnabledId = []; - while (left()) { - target.layerGroupsEnabledId.push((0, psdReader_1.readUint8)(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.layerGroupsEnabledId; _i < _a.length; _i++) { - var id = _a[_i]; - (0, psdWriter_1.writeUint8)(writer, id); - } -}); -addHandler(1069, function (target) { return target.layerSelectionIds !== undefined; }, function (reader, target) { - var count = (0, psdReader_1.readUint16)(reader); - target.layerSelectionIds = []; - while (count--) { - target.layerSelectionIds.push((0, psdReader_1.readUint32)(reader)); - } -}, function (writer, target) { - (0, psdWriter_1.writeUint16)(writer, target.layerSelectionIds.length); - for (var _i = 0, _a = target.layerSelectionIds; _i < _a.length; _i++) { - var id = _a[_i]; - (0, psdWriter_1.writeUint32)(writer, id); - } -}); -addHandler(1032, function (target) { return target.gridAndGuidesInformation !== undefined; }, function (reader, target) { - var version = (0, psdReader_1.readUint32)(reader); - var horizontal = (0, psdReader_1.readUint32)(reader); - var vertical = (0, psdReader_1.readUint32)(reader); - var count = (0, psdReader_1.readUint32)(reader); - if (version !== 1) - throw new Error("Invalid 1032 resource version: ".concat(version)); - target.gridAndGuidesInformation = { - grid: { horizontal: horizontal, vertical: vertical }, - guides: [], - }; - for (var i = 0; i < count; i++) { - target.gridAndGuidesInformation.guides.push({ - location: (0, psdReader_1.readUint32)(reader) / 32, - direction: (0, psdReader_1.readUint8)(reader) ? 'horizontal' : 'vertical' - }); - } -}, function (writer, target) { - var info = target.gridAndGuidesInformation; - var grid = info.grid || { horizontal: 18 * 32, vertical: 18 * 32 }; - var guides = info.guides || []; - (0, psdWriter_1.writeUint32)(writer, 1); - (0, psdWriter_1.writeUint32)(writer, grid.horizontal); - (0, psdWriter_1.writeUint32)(writer, grid.vertical); - (0, psdWriter_1.writeUint32)(writer, guides.length); - for (var _i = 0, guides_1 = guides; _i < guides_1.length; _i++) { - var g = guides_1[_i]; - (0, psdWriter_1.writeUint32)(writer, g.location * 32); - (0, psdWriter_1.writeUint8)(writer, g.direction === 'horizontal' ? 1 : 0); - } -}); -// 0 - normal, 7 - multiply, 8 - screen, 23 - difference -var onionSkinsBlendModes = [ - 'normal', undefined, undefined, undefined, undefined, undefined, undefined, 'multiply', - 'screen', undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, 'difference', -]; -addHandler(1078, // Onion Skins -function (// Onion Skins -target) { return target.onionSkins !== undefined; }, function (reader, target) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log('1078', require('util').inspect(desc, false, 99, true)); - target.onionSkins = { - enabled: desc.enab, - framesBefore: desc.numBefore, - framesAfter: desc.numAfter, - frameSpacing: desc.Spcn, - minOpacity: desc.minOpacity / 100, - maxOpacity: desc.maxOpacity / 100, - blendMode: onionSkinsBlendModes[desc.BlnM] || 'normal', - }; -}, function (writer, target) { - var onionSkins = target.onionSkins; - var desc = { - Vrsn: 1, - enab: onionSkins.enabled, - numBefore: onionSkins.framesBefore, - numAfter: onionSkins.framesAfter, - Spcn: onionSkins.frameSpacing, - minOpacity: (onionSkins.minOpacity * 100) | 0, - maxOpacity: (onionSkins.maxOpacity * 100) | 0, - BlnM: Math.max(0, onionSkinsBlendModes.indexOf(onionSkins.blendMode)), - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler(1075, // Timeline Information -function (// Timeline Information -target) { return target.timelineInformation !== undefined; }, function (reader, target, _, options) { - var _a, _b; - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log('1075', require('util').inspect(desc, false, 99, true)); - target.timelineInformation = { - enabled: desc.enab, - frameStep: desc.frameStep, - frameRate: desc.frameRate, - time: desc.time, - duration: desc.duration, - workInTime: desc.workInTime, - workOutTime: desc.workOutTime, - repeats: desc.LCnt, - hasMotion: desc.hasMotion, - globalTracks: (0, descriptor_1.parseTrackList)(desc.globalTrackList, !!options.logMissingFeatures), - }; - if ((_b = (_a = desc.audioClipGroupList) === null || _a === void 0 ? void 0 : _a.audioClipGroupList) === null || _b === void 0 ? void 0 : _b.length) { - target.timelineInformation.audioClipGroups = desc.audioClipGroupList.audioClipGroupList.map(function (g) { return ({ - id: g.groupID, - muted: g.muted, - audioClips: g.audioClipList.map(function (_a) { - var clipID = _a.clipID, timeScope = _a.timeScope, muted = _a.muted, audioLevel = _a.audioLevel, frameReader = _a.frameReader; - return ({ - id: clipID, - start: timeScope.Strt, - duration: timeScope.duration, - inTime: timeScope.inTime, - outTime: timeScope.outTime, - muted: muted, - audioLevel: audioLevel, - frameReader: { - type: frameReader.frameReaderType, - mediaDescriptor: frameReader.mediaDescriptor, - link: { - name: frameReader['Lnk ']['Nm '], - fullPath: frameReader['Lnk '].fullPath, - relativePath: frameReader['Lnk '].relPath, - }, - }, - }); - }), - }); }); - } -}, function (writer, target) { - var _a; - var timeline = target.timelineInformation; - var desc = { - Vrsn: 1, - enab: timeline.enabled, - frameStep: timeline.frameStep, - frameRate: timeline.frameRate, - time: timeline.time, - duration: timeline.duration, - workInTime: timeline.workInTime, - workOutTime: timeline.workOutTime, - LCnt: timeline.repeats, - globalTrackList: (0, descriptor_1.serializeTrackList)(timeline.globalTracks), - audioClipGroupList: { - audioClipGroupList: (_a = timeline.audioClipGroups) === null || _a === void 0 ? void 0 : _a.map(function (a) { return ({ - groupID: a.id, - muted: a.muted, - audioClipList: a.audioClips.map(function (c) { return ({ - clipID: c.id, - timeScope: { - Vrsn: 1, - Strt: c.start, - duration: c.duration, - inTime: c.inTime, - outTime: c.outTime, - }, - frameReader: { - frameReaderType: c.frameReader.type, - descVersion: 1, - 'Lnk ': { - descVersion: 1, - 'Nm ': c.frameReader.link.name, - fullPath: c.frameReader.link.fullPath, - relPath: c.frameReader.link.relativePath, - }, - mediaDescriptor: c.frameReader.mediaDescriptor, - }, - muted: c.muted, - audioLevel: c.audioLevel, - }); }), - }); }), - }, - hasMotion: timeline.hasMotion, - }; - // console.log('WRITE:1075', require('util').inspect(desc, false, 99, true)); - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'anim'); -}); -addHandler(1076, // Sheet Disclosure -function (// Sheet Disclosure -target) { return target.sheetDisclosure !== undefined; }, function (reader, target) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log('1076', require('util').inspect(desc, false, 99, true)); - target.sheetDisclosure = {}; - if (desc.sheetTimelineOptions) { - target.sheetDisclosure.sheetTimelineOptions = desc.sheetTimelineOptions.map(function (o) { return ({ - sheetID: o.sheetID, - sheetDisclosed: o.sheetDisclosed, - lightsDisclosed: o.lightsDisclosed, - meshesDisclosed: o.meshesDisclosed, - materialsDisclosed: o.materialsDisclosed, - }); }); - } -}, function (writer, target) { - var disclosure = target.sheetDisclosure; - var desc = { Vrsn: 1 }; - if (disclosure.sheetTimelineOptions) { - desc.sheetTimelineOptions = disclosure.sheetTimelineOptions.map(function (d) { return ({ - Vrsn: 2, - sheetID: d.sheetID, - sheetDisclosed: d.sheetDisclosed, - lightsDisclosed: d.lightsDisclosed, - meshesDisclosed: d.meshesDisclosed, - materialsDisclosed: d.materialsDisclosed, - }); }); - } - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler(1054, // URL List -function (// URL List -target) { return target.urlsList !== undefined; }, function (reader, target, _, options) { - var count = (0, psdReader_1.readUint32)(reader); - target.urlsList = []; - for (var i = 0; i < count; i++) { - var long = (0, psdReader_1.readSignature)(reader); - if (long !== 'slic' && options.throwForMissingFeatures) - throw new Error('Unknown long'); - var id = (0, psdReader_1.readUint32)(reader); - var url = (0, psdReader_1.readUnicodeString)(reader); - target.urlsList.push({ id: id, url: url, ref: 'slice' }); - } -}, function (writer, target) { - var list = target.urlsList; - (0, psdWriter_1.writeUint32)(writer, list.length); - for (var i = 0; i < list.length; i++) { - (0, psdWriter_1.writeSignature)(writer, 'slic'); - (0, psdWriter_1.writeUint32)(writer, list[i].id); - (0, psdWriter_1.writeUnicodeString)(writer, list[i].url); - } -}); -function boundsToBounds(bounds) { - return { 'Top ': bounds.top, Left: bounds.left, Btom: bounds.bottom, Rght: bounds.right }; -} -function boundsFromBounds(bounds) { - return { top: bounds['Top '], left: bounds.Left, bottom: bounds.Btom, right: bounds.Rght }; -} -function clamped(array, index) { - return array[Math.max(0, Math.min(array.length - 1, index))]; -} -var sliceOrigins = ['autoGenerated', 'layer', 'userGenerated']; -var sliceTypes = ['noImage', 'image']; -var sliceAlignments = ['default']; -addHandler(1050, // Slices -function (// Slices -target) { return target.slices ? target.slices.length : 0; }, function (reader, target) { - var version = (0, psdReader_1.readUint32)(reader); - if (version == 6) { - if (!target.slices) - target.slices = []; - var top_1 = (0, psdReader_1.readInt32)(reader); - var left = (0, psdReader_1.readInt32)(reader); - var bottom = (0, psdReader_1.readInt32)(reader); - var right = (0, psdReader_1.readInt32)(reader); - var groupName = (0, psdReader_1.readUnicodeString)(reader); - var count = (0, psdReader_1.readUint32)(reader); - target.slices.push({ bounds: { top: top_1, left: left, bottom: bottom, right: right }, groupName: groupName, slices: [] }); - var slices_1 = target.slices[target.slices.length - 1].slices; - for (var i = 0; i < count; i++) { - var id = (0, psdReader_1.readUint32)(reader); - var groupId = (0, psdReader_1.readUint32)(reader); - var origin_1 = clamped(sliceOrigins, (0, psdReader_1.readUint32)(reader)); - var associatedLayerId = origin_1 == 'layer' ? (0, psdReader_1.readUint32)(reader) : 0; - var name_3 = (0, psdReader_1.readUnicodeString)(reader); - var type = clamped(sliceTypes, (0, psdReader_1.readUint32)(reader)); - var top_2 = (0, psdReader_1.readInt32)(reader); - var left_1 = (0, psdReader_1.readInt32)(reader); - var bottom_1 = (0, psdReader_1.readInt32)(reader); - var right_1 = (0, psdReader_1.readInt32)(reader); - var url = (0, psdReader_1.readUnicodeString)(reader); - var target_1 = (0, psdReader_1.readUnicodeString)(reader); - var message = (0, psdReader_1.readUnicodeString)(reader); - var altTag = (0, psdReader_1.readUnicodeString)(reader); - var cellTextIsHTML = !!(0, psdReader_1.readUint8)(reader); - var cellText = (0, psdReader_1.readUnicodeString)(reader); - var horizontalAlignment = clamped(sliceAlignments, (0, psdReader_1.readUint32)(reader)); - var verticalAlignment = clamped(sliceAlignments, (0, psdReader_1.readUint32)(reader)); - var a = (0, psdReader_1.readUint8)(reader); - var r = (0, psdReader_1.readUint8)(reader); - var g = (0, psdReader_1.readUint8)(reader); - var b = (0, psdReader_1.readUint8)(reader); - var backgroundColorType = ((a + r + g + b) === 0) ? 'none' : (a === 0 ? 'matte' : 'color'); - slices_1.push({ - id: id, - groupId: groupId, - origin: origin_1, - associatedLayerId: associatedLayerId, - name: name_3, - target: target_1, - message: message, - altTag: altTag, - cellTextIsHTML: cellTextIsHTML, - cellText: cellText, - horizontalAlignment: horizontalAlignment, - verticalAlignment: verticalAlignment, - type: type, - url: url, - bounds: { top: top_2, left: left_1, bottom: bottom_1, right: right_1 }, - backgroundColorType: backgroundColorType, - backgroundColor: { r: r, g: g, b: b, a: a }, - }); - // console.log(require('util').inspect(slices[slices.length - 1], false, 99, true)); - } - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - desc.slices.forEach(function (d) { - var slice = slices_1.find(function (s) { return d.sliceID == s.id; }); - if (slice) { - slice.topOutset = d.topOutset; - slice.leftOutset = d.leftOutset; - slice.bottomOutset = d.bottomOutset; - slice.rightOutset = d.rightOutset; - } - }); - // console.log(require('util').inspect(desc, false, 99, true)); - // console.log(require('util').inspect(target.slices, false, 99, true)); - } - else if (version == 7 || version == 8) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - if (!target.slices) - target.slices = []; - target.slices.push({ - groupName: desc.baseName, - bounds: boundsFromBounds(desc.bounds), - slices: desc.slices.map(function (s) { return ({ - name: '', - id: s.sliceID, - groupId: s.groupID, - associatedLayerId: 0, - origin: descriptor_1.ESliceOrigin.decode(s.origin), - type: descriptor_1.ESliceType.decode(s.Type), - bounds: boundsFromBounds(s.bounds), - url: s.url, - target: s.null, - message: s.Msge, - altTag: s.altTag, - cellTextIsHTML: s.cellTextIsHTML, - cellText: s.cellText, - horizontalAlignment: descriptor_1.ESliceHorzAlign.decode(s.horzAlign), - verticalAlignment: descriptor_1.ESliceVertAlign.decode(s.vertAlign), - backgroundColorType: descriptor_1.ESliceBGColorType.decode(s.bgColorType), - backgroundColor: s.bgColor ? { r: s.bgColor['Rd '], g: s.bgColor['Grn '], b: s.bgColor['Bl '], a: s.bgColor.alpha } : { r: 0, g: 0, b: 0, a: 0 }, - topOutset: s.topOutset || 0, - leftOutset: s.leftOutset || 0, - bottomOutset: s.bottomOutset || 0, - rightOutset: s.rightOutset || 0, - }); }), - }); - } - else { - throw new Error("Invalid slices version (".concat(version, ")")); - } -}, function (writer, target, index) { - var _a = target.slices[index], bounds = _a.bounds, groupName = _a.groupName, slices = _a.slices; - (0, psdWriter_1.writeUint32)(writer, 6); // version - (0, psdWriter_1.writeInt32)(writer, bounds.top); - (0, psdWriter_1.writeInt32)(writer, bounds.left); - (0, psdWriter_1.writeInt32)(writer, bounds.bottom); - (0, psdWriter_1.writeInt32)(writer, bounds.right); - (0, psdWriter_1.writeUnicodeString)(writer, groupName); - (0, psdWriter_1.writeUint32)(writer, slices.length); - for (var i = 0; i < slices.length; i++) { - var slice = slices[i]; - var _b = slice.backgroundColor, a = _b.a, r = _b.r, g = _b.g, b = _b.b; - if (slice.backgroundColorType === 'none') { - a = r = g = b = 0; - } - else if (slice.backgroundColorType === 'matte') { - a = 0; - r = g = b = 255; - } - (0, psdWriter_1.writeUint32)(writer, slice.id); - (0, psdWriter_1.writeUint32)(writer, slice.groupId); - (0, psdWriter_1.writeUint32)(writer, sliceOrigins.indexOf(slice.origin)); - if (slice.origin === 'layer') - (0, psdWriter_1.writeUint32)(writer, slice.associatedLayerId); - (0, psdWriter_1.writeUnicodeString)(writer, slice.name); - (0, psdWriter_1.writeUint32)(writer, sliceTypes.indexOf(slice.type)); - (0, psdWriter_1.writeInt32)(writer, slice.bounds.top); - (0, psdWriter_1.writeInt32)(writer, slice.bounds.left); - (0, psdWriter_1.writeInt32)(writer, slice.bounds.bottom); - (0, psdWriter_1.writeInt32)(writer, slice.bounds.right); - (0, psdWriter_1.writeUnicodeString)(writer, slice.url); - (0, psdWriter_1.writeUnicodeString)(writer, slice.target); - (0, psdWriter_1.writeUnicodeString)(writer, slice.message); - (0, psdWriter_1.writeUnicodeString)(writer, slice.altTag); - (0, psdWriter_1.writeUint8)(writer, slice.cellTextIsHTML ? 1 : 0); - (0, psdWriter_1.writeUnicodeString)(writer, slice.cellText); - (0, psdWriter_1.writeUint32)(writer, sliceAlignments.indexOf(slice.horizontalAlignment)); - (0, psdWriter_1.writeUint32)(writer, sliceAlignments.indexOf(slice.verticalAlignment)); - (0, psdWriter_1.writeUint8)(writer, a); - (0, psdWriter_1.writeUint8)(writer, r); - (0, psdWriter_1.writeUint8)(writer, g); - (0, psdWriter_1.writeUint8)(writer, b); - } - var desc = { - bounds: boundsToBounds(bounds), - slices: [], - }; - slices.forEach(function (s) { - var slice = __assign(__assign({ sliceID: s.id, groupID: s.groupId, origin: descriptor_1.ESliceOrigin.encode(s.origin), Type: descriptor_1.ESliceType.encode(s.type), bounds: boundsToBounds(s.bounds) }, (s.name ? { 'Nm ': s.name } : {})), { url: s.url, null: s.target, Msge: s.message, altTag: s.altTag, cellTextIsHTML: s.cellTextIsHTML, cellText: s.cellText, horzAlign: descriptor_1.ESliceHorzAlign.encode(s.horizontalAlignment), vertAlign: descriptor_1.ESliceVertAlign.encode(s.verticalAlignment), bgColorType: descriptor_1.ESliceBGColorType.encode(s.backgroundColorType) }); - if (s.backgroundColorType === 'color') { - var _a = s.backgroundColor, r = _a.r, g = _a.g, b = _a.b, a = _a.a; - slice.bgColor = { 'Rd ': r, 'Grn ': g, 'Bl ': b, alpha: a }; - } - slice.topOutset = s.topOutset || 0; - slice.leftOutset = s.leftOutset || 0; - slice.bottomOutset = s.bottomOutset || 0; - slice.rightOutset = s.rightOutset || 0; - desc.slices.push(slice); - }); - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'slices'); -}); -addHandler(1064, function (target) { return target.pixelAspectRatio !== undefined; }, function (reader, target) { - if ((0, psdReader_1.readUint32)(reader) > 2) - throw new Error('Invalid pixelAspectRatio version'); - target.pixelAspectRatio = { aspect: (0, psdReader_1.readFloat64)(reader) }; -}, function (writer, target) { - (0, psdWriter_1.writeUint32)(writer, 2); // version - (0, psdWriter_1.writeFloat64)(writer, target.pixelAspectRatio.aspect); -}); -addHandler(1041, function (target) { return target.iccUntaggedProfile !== undefined; }, function (reader, target) { - target.iccUntaggedProfile = !!(0, psdReader_1.readUint8)(reader); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.iccUntaggedProfile ? 1 : 0); -}); -helpers_1.MOCK_HANDLERS && addHandler(1039, // ICC Profile -function (// ICC Profile -target) { return target._ir1039 !== undefined; }, function (reader, target, left) { - // TODO: this is raw bytes, just return as a byte array - LOG_MOCK_HANDLERS && console.log('image resource 1039', left()); - target._ir1039 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1039); -}); -addHandler(1044, function (target) { return target.idsSeedNumber !== undefined; }, function (reader, target) { return target.idsSeedNumber = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.idsSeedNumber); }); -addHandler(1036, function (target) { return target.thumbnail !== undefined || target.thumbnailRaw !== undefined; }, function (reader, target, left, options) { - var format = (0, psdReader_1.readUint32)(reader); // 1 = kJpegRGB, 0 = kRawRGB - var width = (0, psdReader_1.readUint32)(reader); - var height = (0, psdReader_1.readUint32)(reader); - (0, psdReader_1.readUint32)(reader); // widthBytes = (width * bits_per_pixel + 31) / 32 * 4. - (0, psdReader_1.readUint32)(reader); // totalSize = widthBytes * height * planes - (0, psdReader_1.readUint32)(reader); // sizeAfterCompression - var bitsPerPixel = (0, psdReader_1.readUint16)(reader); // 24 - var planes = (0, psdReader_1.readUint16)(reader); // 1 - if (format !== 1 || bitsPerPixel !== 24 || planes !== 1) { - options.logMissingFeatures && console.log("Invalid thumbnail data (format: ".concat(format, ", bitsPerPixel: ").concat(bitsPerPixel, ", planes: ").concat(planes, ")")); - (0, psdReader_1.skipBytes)(reader, left()); - return; - } - var size = left(); - var data = (0, psdReader_1.readBytes)(reader, size); - if (options.useRawThumbnail) { - target.thumbnailRaw = { width: width, height: height, data: data }; - } - else if (data.byteLength) { - target.thumbnail = (0, helpers_1.createCanvasFromData)(data); - } -}, function (writer, target) { - var _a; - var width = 0; - var height = 0; - var data; - if (target.thumbnailRaw) { - width = target.thumbnailRaw.width; - height = target.thumbnailRaw.height; - data = target.thumbnailRaw.data; - } - else { - var dataUrl = (_a = target.thumbnail.toDataURL('image/jpeg', 1)) === null || _a === void 0 ? void 0 : _a.substring('data:image/jpeg;base64,'.length); - if (dataUrl) { - width = target.thumbnail.width; - height = target.thumbnail.height; - data = (0, base64_js_1.toByteArray)(dataUrl); - } - else { - data = new Uint8Array(0); - } - } - var bitsPerPixel = 24; - var widthBytes = Math.floor((width * bitsPerPixel + 31) / 32) * 4; - var planes = 1; - var totalSize = widthBytes * height * planes; - var sizeAfterCompression = data.length; - (0, psdWriter_1.writeUint32)(writer, 1); // 1 = kJpegRGB - (0, psdWriter_1.writeUint32)(writer, width); - (0, psdWriter_1.writeUint32)(writer, height); - (0, psdWriter_1.writeUint32)(writer, widthBytes); - (0, psdWriter_1.writeUint32)(writer, totalSize); - (0, psdWriter_1.writeUint32)(writer, sizeAfterCompression); - (0, psdWriter_1.writeUint16)(writer, bitsPerPixel); - (0, psdWriter_1.writeUint16)(writer, planes); - (0, psdWriter_1.writeBytes)(writer, data); -}); -addHandler(1057, function (target) { return target.versionInfo !== undefined; }, function (reader, target, left) { - var version = (0, psdReader_1.readUint32)(reader); - if (version !== 1) - throw new Error('Invalid versionInfo version'); - target.versionInfo = { - hasRealMergedData: !!(0, psdReader_1.readUint8)(reader), - writerName: (0, psdReader_1.readUnicodeString)(reader), - readerName: (0, psdReader_1.readUnicodeString)(reader), - fileVersion: (0, psdReader_1.readUint32)(reader), - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var versionInfo = target.versionInfo; - (0, psdWriter_1.writeUint32)(writer, 1); // version - (0, psdWriter_1.writeUint8)(writer, versionInfo.hasRealMergedData ? 1 : 0); - (0, psdWriter_1.writeUnicodeString)(writer, versionInfo.writerName); - (0, psdWriter_1.writeUnicodeString)(writer, versionInfo.readerName); - (0, psdWriter_1.writeUint32)(writer, versionInfo.fileVersion); -}); -helpers_1.MOCK_HANDLERS && addHandler(1058, // EXIF data 1. -function (// EXIF data 1. -target) { return target._ir1058 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1058', left()); - target._ir1058 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1058); -}); -addHandler(7000, function (target) { return target.imageReadyVariables !== undefined; }, function (reader, target, left) { - target.imageReadyVariables = readUtf8String(reader, left()); -}, function (writer, target) { - writeUtf8String(writer, target.imageReadyVariables); -}); -addHandler(7001, function (target) { return target.imageReadyDataSets !== undefined; }, function (reader, target, left) { - target.imageReadyDataSets = readUtf8String(reader, left()); -}, function (writer, target) { - writeUtf8String(writer, target.imageReadyDataSets); -}); -addHandler(1088, function (target) { return target.pathSelectionState !== undefined; }, function (reader, target, _left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - target.pathSelectionState = desc['null']; -}, function (writer, target) { - var desc = { 'null': target.pathSelectionState }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -helpers_1.MOCK_HANDLERS && addHandler(1025, function (target) { return target._ir1025 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1025', left()); - target._ir1025 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1025); -}); -var FrmD = (0, helpers_1.createEnum)('FrmD', '', { - auto: 'Auto', - none: 'None', - dispose: 'Disp', -}); -addHandler(4000, // Plug-In resource(s) -function (// Plug-In resource(s) -target) { return target.animations !== undefined; }, function (reader, target, left, _a) { - var logMissingFeatures = _a.logMissingFeatures, logDevFeatures = _a.logDevFeatures; - var key = (0, psdReader_1.readSignature)(reader); - if (key === 'mani') { - (0, psdReader_1.checkSignature)(reader, 'IRFR'); - (0, psdReader_1.readSection)(reader, 1, function (left) { - var _loop_1 = function () { - (0, psdReader_1.checkSignature)(reader, '8BIM'); - var key_1 = (0, psdReader_1.readSignature)(reader); - (0, psdReader_1.readSection)(reader, 1, function (left) { - if (key_1 === 'AnDs') { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.animations = { - // desc.AFSt ??? - frames: desc.FrIn.map(function (x) { return ({ - id: x.FrID, - delay: (x.FrDl || 0) / 100, - dispose: x.FrDs ? FrmD.decode(x.FrDs) : 'auto', // missing == auto - // x.FrGA ??? - }); }), - animations: desc.FSts.map(function (x) { return ({ - id: x.FsID, - frames: x.FsFr, - repeats: x.LCnt, - activeFrame: x.AFrm || 0, - }); }), - }; - // console.log('#4000 AnDs', require('util').inspect(desc, false, 99, true)); - // console.log('#4000 AnDs:result', require('util').inspect(target.animations, false, 99, true)); - } - else if (key_1 === 'Roll') { - var bytes = (0, psdReader_1.readBytes)(reader, left()); - logDevFeatures && console.log('#4000 Roll', bytes); - } - else { - logMissingFeatures && console.log('Unhandled subsection in #4000', key_1); - } - }); - }; - while (left()) { - _loop_1(); - } - }); - } - else if (key === 'mopt') { - var bytes = (0, psdReader_1.readBytes)(reader, left()); - logDevFeatures && console.log('#4000 mopt', bytes); - } - else { - logMissingFeatures && console.log('Unhandled key in #4000:', key); - } -}, function (writer, target) { - if (target.animations) { - (0, psdWriter_1.writeSignature)(writer, 'mani'); - (0, psdWriter_1.writeSignature)(writer, 'IRFR'); - (0, psdWriter_1.writeSection)(writer, 1, function () { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'AnDs'); - (0, psdWriter_1.writeSection)(writer, 1, function () { - var desc = { - // AFSt: 0, // ??? - FrIn: [], - FSts: [], - }; - for (var i = 0; i < target.animations.frames.length; i++) { - var f = target.animations.frames[i]; - var frame = { - FrID: f.id, - }; - if (f.delay) - frame.FrDl = (f.delay * 100) | 0; - frame.FrDs = FrmD.encode(f.dispose); - // if (i === 0) frame.FrGA = 30; // ??? - desc.FrIn.push(frame); - } - for (var i = 0; i < target.animations.animations.length; i++) { - var a = target.animations.animations[i]; - var anim = { - FsID: a.id, - AFrm: a.activeFrame | 0, - FsFr: a.frames, - LCnt: a.repeats | 0, - }; - desc.FSts.push(anim); - } - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - }); - // writeSignature(writer, '8BIM'); - // writeSignature(writer, 'Roll'); - // writeSection(writer, 1, () => { - // writeZeros(writer, 8); - // }); - }); - } -}); -// TODO: Unfinished -helpers_1.MOCK_HANDLERS && addHandler(4001, // Plug-In resource(s) -function (// Plug-In resource(s) -target) { return target._ir4001 !== undefined; }, function (reader, target, left, _a) { - var logMissingFeatures = _a.logMissingFeatures, logDevFeatures = _a.logDevFeatures; - if (helpers_1.MOCK_HANDLERS) { - LOG_MOCK_HANDLERS && console.log('image resource 4001', left()); - target._ir4001 = (0, psdReader_1.readBytes)(reader, left()); - return; - } - var key = (0, psdReader_1.readSignature)(reader); - if (key === 'mfri') { - var version = (0, psdReader_1.readUint32)(reader); - if (version !== 2) - throw new Error('Invalid mfri version'); - var length_1 = (0, psdReader_1.readUint32)(reader); - var bytes = (0, psdReader_1.readBytes)(reader, length_1); - logDevFeatures && console.log('mfri', bytes); - } - else if (key === 'mset') { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - logDevFeatures && console.log('mset', desc); - } - else { - logMissingFeatures && console.log('Unhandled key in #4001', key); - } -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir4001); -}); -// TODO: Unfinished -helpers_1.MOCK_HANDLERS && addHandler(4002, // Plug-In resource(s) -function (// Plug-In resource(s) -target) { return target._ir4002 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 4002', left()); - target._ir4002 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir4002); -}); +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resourceHandlersMap = exports.resourceHandlers = void 0; +var base64_js_1 = require("base64-js"); +var psdReader_1 = require("./psdReader"); +var psdWriter_1 = require("./psdWriter"); +var helpers_1 = require("./helpers"); +var utf8_1 = require("./utf8"); +var descriptor_1 = require("./descriptor"); +exports.resourceHandlers = []; +exports.resourceHandlersMap = {}; +function addHandler(key, has, read, write) { + var handler = { key: key, has: has, read: read, write: write }; + exports.resourceHandlers.push(handler); + exports.resourceHandlersMap[handler.key] = handler; +} +var LOG_MOCK_HANDLERS = false; +var RESOLUTION_UNITS = [undefined, 'PPI', 'PPCM']; +var MEASUREMENT_UNITS = [undefined, 'Inches', 'Centimeters', 'Points', 'Picas', 'Columns']; +var hex = '0123456789abcdef'; +function charToNibble(code) { + return code <= 57 ? code - 48 : code - 87; +} +function byteAt(value, index) { + return (charToNibble(value.charCodeAt(index)) << 4) | charToNibble(value.charCodeAt(index + 1)); +} +function readUtf8String(reader, length) { + var buffer = (0, psdReader_1.readBytes)(reader, length); + return (0, utf8_1.decodeString)(buffer); +} +function writeUtf8String(writer, value) { + var buffer = (0, utf8_1.encodeString)(value); + (0, psdWriter_1.writeBytes)(writer, buffer); +} +helpers_1.MOCK_HANDLERS && addHandler(1028, // IPTC-NAA record +function (// IPTC-NAA record +target) { return target._ir1028 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1028', left()); + target._ir1028 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1028); +}); +addHandler(1061, function (target) { return target.captionDigest !== undefined; }, function (reader, target) { + var captionDigest = ''; + for (var i = 0; i < 16; i++) { + var byte = (0, psdReader_1.readUint8)(reader); + captionDigest += hex[byte >> 4]; + captionDigest += hex[byte & 0xf]; + } + target.captionDigest = captionDigest; +}, function (writer, target) { + for (var i = 0; i < 16; i++) { + (0, psdWriter_1.writeUint8)(writer, byteAt(target.captionDigest, i * 2)); + } +}); +addHandler(1060, function (target) { return target.xmpMetadata !== undefined; }, function (reader, target, left) { return target.xmpMetadata = readUtf8String(reader, left()); }, function (writer, target) { return writeUtf8String(writer, target.xmpMetadata); }); +var Inte = (0, helpers_1.createEnum)('Inte', 'perceptual', { + 'perceptual': 'Img ', + 'saturation': 'Grp ', + 'relative colorimetric': 'Clrm', + 'absolute colorimetric': 'AClr', +}); +addHandler(1082, function (target) { return target.printInformation !== undefined; }, function (reader, target) { + var _a, _b; + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.printInformation = { + printerName: desc.printerName || '', + renderingIntent: Inte.decode((_a = desc.Inte) !== null && _a !== void 0 ? _a : 'Inte.Img '), + }; + var info = target.printInformation; + if (desc.PstS !== undefined) + info.printerManagesColors = desc.PstS; + if (desc['Nm '] !== undefined) + info.printerProfile = desc['Nm ']; + if (desc.MpBl !== undefined) + info.blackPointCompensation = desc.MpBl; + if (desc.printSixteenBit !== undefined) + info.printSixteenBit = desc.printSixteenBit; + if (desc.hardProof !== undefined) + info.hardProof = desc.hardProof; + if (desc.printProofSetup) { + if ('Bltn' in desc.printProofSetup) { + info.proofSetup = { builtin: desc.printProofSetup.Bltn.split('.')[1] }; + } + else { + info.proofSetup = { + profile: desc.printProofSetup.profile, + renderingIntent: Inte.decode((_b = desc.printProofSetup.Inte) !== null && _b !== void 0 ? _b : 'Inte.Img '), + blackPointCompensation: !!desc.printProofSetup.MpBl, + paperWhite: !!desc.printProofSetup.paperWhite, + }; + } + } +}, function (writer, target) { + var _a, _b; + var info = target.printInformation; + var desc = {}; + if (info.printerManagesColors) { + desc.PstS = true; + } + else { + if (info.hardProof !== undefined) + desc.hardProof = !!info.hardProof; + desc.ClrS = 'ClrS.RGBC'; // TODO: ??? + desc['Nm '] = (_a = info.printerProfile) !== null && _a !== void 0 ? _a : 'CIE RGB'; + } + desc.Inte = Inte.encode(info.renderingIntent); + if (!info.printerManagesColors) + desc.MpBl = !!info.blackPointCompensation; + desc.printSixteenBit = !!info.printSixteenBit; + desc.printerName = info.printerName || ''; + if (info.proofSetup && 'profile' in info.proofSetup) { + desc.printProofSetup = { + profile: info.proofSetup.profile || '', + Inte: Inte.encode(info.proofSetup.renderingIntent), + MpBl: !!info.proofSetup.blackPointCompensation, + paperWhite: !!info.proofSetup.paperWhite, + }; + } + else { + desc.printProofSetup = { + Bltn: ((_b = info.proofSetup) === null || _b === void 0 ? void 0 : _b.builtin) ? "builtinProof.".concat(info.proofSetup.builtin) : 'builtinProof.proofCMYK', + }; + } + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'printOutput', desc); +}); +helpers_1.MOCK_HANDLERS && addHandler(1083, // Print style +function (// Print style +target) { return target._ir1083 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1083', left()); + target._ir1083 = (0, psdReader_1.readBytes)(reader, left()); + // TODO: + // const desc = readVersionAndDescriptor(reader); + // console.log('1083', require('util').inspect(desc, false, 99, true)); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1083); +}); +addHandler(1005, function (target) { return target.resolutionInfo !== undefined; }, function (reader, target) { + var horizontalResolution = (0, psdReader_1.readFixedPoint32)(reader); + var horizontalResolutionUnit = (0, psdReader_1.readUint16)(reader); + var widthUnit = (0, psdReader_1.readUint16)(reader); + var verticalResolution = (0, psdReader_1.readFixedPoint32)(reader); + var verticalResolutionUnit = (0, psdReader_1.readUint16)(reader); + var heightUnit = (0, psdReader_1.readUint16)(reader); + target.resolutionInfo = { + horizontalResolution: horizontalResolution, + horizontalResolutionUnit: RESOLUTION_UNITS[horizontalResolutionUnit] || 'PPI', + widthUnit: MEASUREMENT_UNITS[widthUnit] || 'Inches', + verticalResolution: verticalResolution, + verticalResolutionUnit: RESOLUTION_UNITS[verticalResolutionUnit] || 'PPI', + heightUnit: MEASUREMENT_UNITS[heightUnit] || 'Inches', + }; +}, function (writer, target) { + var info = target.resolutionInfo; + (0, psdWriter_1.writeFixedPoint32)(writer, info.horizontalResolution || 0); + (0, psdWriter_1.writeUint16)(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.horizontalResolutionUnit))); + (0, psdWriter_1.writeUint16)(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.widthUnit))); + (0, psdWriter_1.writeFixedPoint32)(writer, info.verticalResolution || 0); + (0, psdWriter_1.writeUint16)(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.verticalResolutionUnit))); + (0, psdWriter_1.writeUint16)(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.heightUnit))); +}); +var printScaleStyles = ['centered', 'size to fit', 'user defined']; +addHandler(1062, function (target) { return target.printScale !== undefined; }, function (reader, target) { + target.printScale = { + style: printScaleStyles[(0, psdReader_1.readInt16)(reader)], + x: (0, psdReader_1.readFloat32)(reader), + y: (0, psdReader_1.readFloat32)(reader), + scale: (0, psdReader_1.readFloat32)(reader), + }; +}, function (writer, target) { + var _a = target.printScale, style = _a.style, x = _a.x, y = _a.y, scale = _a.scale; + (0, psdWriter_1.writeInt16)(writer, Math.max(0, printScaleStyles.indexOf(style))); + (0, psdWriter_1.writeFloat32)(writer, x || 0); + (0, psdWriter_1.writeFloat32)(writer, y || 0); + (0, psdWriter_1.writeFloat32)(writer, scale || 0); +}); +addHandler(1006, function (target) { return target.alphaChannelNames !== undefined; }, function (reader, target, left) { + target.alphaChannelNames = []; + while (left()) { + var value = (0, psdReader_1.readPascalString)(reader, 1); + target.alphaChannelNames.push(value); + } +}, function (writer, target) { + for (var _i = 0, _a = target.alphaChannelNames; _i < _a.length; _i++) { + var name_1 = _a[_i]; + (0, psdWriter_1.writePascalString)(writer, name_1, 1); + } +}); +addHandler(1045, function (target) { return target.alphaChannelNames !== undefined; }, function (reader, target, left) { + target.alphaChannelNames = []; + while (left()) { + target.alphaChannelNames.push((0, psdReader_1.readUnicodeString)(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.alphaChannelNames; _i < _a.length; _i++) { + var name_2 = _a[_i]; + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, name_2); + } +}); +helpers_1.MOCK_HANDLERS && addHandler(1077, function (target) { return target._ir1077 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1077', left()); + target._ir1077 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1077); +}); +addHandler(1053, function (target) { return target.alphaIdentifiers !== undefined; }, function (reader, target, left) { + target.alphaIdentifiers = []; + while (left() >= 4) { + target.alphaIdentifiers.push((0, psdReader_1.readUint32)(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.alphaIdentifiers; _i < _a.length; _i++) { + var id = _a[_i]; + (0, psdWriter_1.writeUint32)(writer, id); + } +}); +addHandler(1010, function (target) { return target.backgroundColor !== undefined; }, function (reader, target) { return target.backgroundColor = (0, psdReader_1.readColor)(reader); }, function (writer, target) { return (0, psdWriter_1.writeColor)(writer, target.backgroundColor); }); +addHandler(1037, function (target) { return target.globalAngle !== undefined; }, function (reader, target) { return target.globalAngle = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.globalAngle); }); +addHandler(1049, function (target) { return target.globalAltitude !== undefined; }, function (reader, target) { return target.globalAltitude = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.globalAltitude); }); +addHandler(1011, function (target) { return target.printFlags !== undefined; }, function (reader, target) { + target.printFlags = { + labels: !!(0, psdReader_1.readUint8)(reader), + cropMarks: !!(0, psdReader_1.readUint8)(reader), + colorBars: !!(0, psdReader_1.readUint8)(reader), + registrationMarks: !!(0, psdReader_1.readUint8)(reader), + negative: !!(0, psdReader_1.readUint8)(reader), + flip: !!(0, psdReader_1.readUint8)(reader), + interpolate: !!(0, psdReader_1.readUint8)(reader), + caption: !!(0, psdReader_1.readUint8)(reader), + printFlags: !!(0, psdReader_1.readUint8)(reader), + }; +}, function (writer, target) { + var flags = target.printFlags; + (0, psdWriter_1.writeUint8)(writer, flags.labels ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.cropMarks ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.colorBars ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.registrationMarks ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.negative ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.flip ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.interpolate ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.caption ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.printFlags ? 1 : 0); +}); +helpers_1.MOCK_HANDLERS && addHandler(10000, // Print flags +function (// Print flags +target) { return target._ir10000 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 10000', left()); + target._ir10000 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir10000); +}); +helpers_1.MOCK_HANDLERS && addHandler(1013, // Color halftoning +function (// Color halftoning +target) { return target._ir1013 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1013', left()); + target._ir1013 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1013); +}); +helpers_1.MOCK_HANDLERS && addHandler(1016, // Color transfer functions +function (// Color transfer functions +target) { return target._ir1016 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1016', left()); + target._ir1016 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1016); +}); +addHandler(1024, function (target) { return target.layerState !== undefined; }, function (reader, target) { return target.layerState = (0, psdReader_1.readUint16)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint16)(writer, target.layerState); }); +addHandler(1026, function (target) { return target.layersGroup !== undefined; }, function (reader, target, left) { + target.layersGroup = []; + while (left()) { + target.layersGroup.push((0, psdReader_1.readUint16)(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.layersGroup; _i < _a.length; _i++) { + var g = _a[_i]; + (0, psdWriter_1.writeUint16)(writer, g); + } +}); +addHandler(1072, function (target) { return target.layerGroupsEnabledId !== undefined; }, function (reader, target, left) { + target.layerGroupsEnabledId = []; + while (left()) { + target.layerGroupsEnabledId.push((0, psdReader_1.readUint8)(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.layerGroupsEnabledId; _i < _a.length; _i++) { + var id = _a[_i]; + (0, psdWriter_1.writeUint8)(writer, id); + } +}); +addHandler(1069, function (target) { return target.layerSelectionIds !== undefined; }, function (reader, target) { + var count = (0, psdReader_1.readUint16)(reader); + target.layerSelectionIds = []; + while (count--) { + target.layerSelectionIds.push((0, psdReader_1.readUint32)(reader)); + } +}, function (writer, target) { + (0, psdWriter_1.writeUint16)(writer, target.layerSelectionIds.length); + for (var _i = 0, _a = target.layerSelectionIds; _i < _a.length; _i++) { + var id = _a[_i]; + (0, psdWriter_1.writeUint32)(writer, id); + } +}); +addHandler(1032, function (target) { return target.gridAndGuidesInformation !== undefined; }, function (reader, target) { + var version = (0, psdReader_1.readUint32)(reader); + var horizontal = (0, psdReader_1.readUint32)(reader); + var vertical = (0, psdReader_1.readUint32)(reader); + var count = (0, psdReader_1.readUint32)(reader); + if (version !== 1) + throw new Error("Invalid 1032 resource version: ".concat(version)); + target.gridAndGuidesInformation = { + grid: { horizontal: horizontal, vertical: vertical }, + guides: [], + }; + for (var i = 0; i < count; i++) { + target.gridAndGuidesInformation.guides.push({ + location: (0, psdReader_1.readUint32)(reader) / 32, + direction: (0, psdReader_1.readUint8)(reader) ? 'horizontal' : 'vertical' + }); + } +}, function (writer, target) { + var info = target.gridAndGuidesInformation; + var grid = info.grid || { horizontal: 18 * 32, vertical: 18 * 32 }; + var guides = info.guides || []; + (0, psdWriter_1.writeUint32)(writer, 1); + (0, psdWriter_1.writeUint32)(writer, grid.horizontal); + (0, psdWriter_1.writeUint32)(writer, grid.vertical); + (0, psdWriter_1.writeUint32)(writer, guides.length); + for (var _i = 0, guides_1 = guides; _i < guides_1.length; _i++) { + var g = guides_1[_i]; + (0, psdWriter_1.writeUint32)(writer, g.location * 32); + (0, psdWriter_1.writeUint8)(writer, g.direction === 'horizontal' ? 1 : 0); + } +}); +// 0 - normal, 7 - multiply, 8 - screen, 23 - difference +var onionSkinsBlendModes = [ + 'normal', undefined, undefined, undefined, undefined, undefined, undefined, 'multiply', + 'screen', undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, 'difference', +]; +addHandler(1078, // Onion Skins +function (// Onion Skins +target) { return target.onionSkins !== undefined; }, function (reader, target) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log('1078', require('util').inspect(desc, false, 99, true)); + target.onionSkins = { + enabled: desc.enab, + framesBefore: desc.numBefore, + framesAfter: desc.numAfter, + frameSpacing: desc.Spcn, + minOpacity: desc.minOpacity / 100, + maxOpacity: desc.maxOpacity / 100, + blendMode: onionSkinsBlendModes[desc.BlnM] || 'normal', + }; +}, function (writer, target) { + var onionSkins = target.onionSkins; + var desc = { + Vrsn: 1, + enab: onionSkins.enabled, + numBefore: onionSkins.framesBefore, + numAfter: onionSkins.framesAfter, + Spcn: onionSkins.frameSpacing, + minOpacity: (onionSkins.minOpacity * 100) | 0, + maxOpacity: (onionSkins.maxOpacity * 100) | 0, + BlnM: Math.max(0, onionSkinsBlendModes.indexOf(onionSkins.blendMode)), + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler(1075, // Timeline Information +function (// Timeline Information +target) { return target.timelineInformation !== undefined; }, function (reader, target, _, options) { + var _a, _b; + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log('1075', require('util').inspect(desc, false, 99, true)); + target.timelineInformation = { + enabled: desc.enab, + frameStep: desc.frameStep, + frameRate: desc.frameRate, + time: desc.time, + duration: desc.duration, + workInTime: desc.workInTime, + workOutTime: desc.workOutTime, + repeats: desc.LCnt, + hasMotion: desc.hasMotion, + globalTracks: (0, descriptor_1.parseTrackList)(desc.globalTrackList, !!options.logMissingFeatures), + }; + if ((_b = (_a = desc.audioClipGroupList) === null || _a === void 0 ? void 0 : _a.audioClipGroupList) === null || _b === void 0 ? void 0 : _b.length) { + target.timelineInformation.audioClipGroups = desc.audioClipGroupList.audioClipGroupList.map(function (g) { return ({ + id: g.groupID, + muted: g.muted, + audioClips: g.audioClipList.map(function (_a) { + var clipID = _a.clipID, timeScope = _a.timeScope, muted = _a.muted, audioLevel = _a.audioLevel, frameReader = _a.frameReader; + return ({ + id: clipID, + start: timeScope.Strt, + duration: timeScope.duration, + inTime: timeScope.inTime, + outTime: timeScope.outTime, + muted: muted, + audioLevel: audioLevel, + frameReader: { + type: frameReader.frameReaderType, + mediaDescriptor: frameReader.mediaDescriptor, + link: { + name: frameReader['Lnk ']['Nm '], + fullPath: frameReader['Lnk '].fullPath, + relativePath: frameReader['Lnk '].relPath, + }, + }, + }); + }), + }); }); + } +}, function (writer, target) { + var _a; + var timeline = target.timelineInformation; + var desc = { + Vrsn: 1, + enab: timeline.enabled, + frameStep: timeline.frameStep, + frameRate: timeline.frameRate, + time: timeline.time, + duration: timeline.duration, + workInTime: timeline.workInTime, + workOutTime: timeline.workOutTime, + LCnt: timeline.repeats, + globalTrackList: (0, descriptor_1.serializeTrackList)(timeline.globalTracks), + audioClipGroupList: { + audioClipGroupList: (_a = timeline.audioClipGroups) === null || _a === void 0 ? void 0 : _a.map(function (a) { return ({ + groupID: a.id, + muted: a.muted, + audioClipList: a.audioClips.map(function (c) { return ({ + clipID: c.id, + timeScope: { + Vrsn: 1, + Strt: c.start, + duration: c.duration, + inTime: c.inTime, + outTime: c.outTime, + }, + frameReader: { + frameReaderType: c.frameReader.type, + descVersion: 1, + 'Lnk ': { + descVersion: 1, + 'Nm ': c.frameReader.link.name, + fullPath: c.frameReader.link.fullPath, + relPath: c.frameReader.link.relativePath, + }, + mediaDescriptor: c.frameReader.mediaDescriptor, + }, + muted: c.muted, + audioLevel: c.audioLevel, + }); }), + }); }), + }, + hasMotion: timeline.hasMotion, + }; + // console.log('WRITE:1075', require('util').inspect(desc, false, 99, true)); + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'anim'); +}); +addHandler(1076, // Sheet Disclosure +function (// Sheet Disclosure +target) { return target.sheetDisclosure !== undefined; }, function (reader, target) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log('1076', require('util').inspect(desc, false, 99, true)); + target.sheetDisclosure = {}; + if (desc.sheetTimelineOptions) { + target.sheetDisclosure.sheetTimelineOptions = desc.sheetTimelineOptions.map(function (o) { return ({ + sheetID: o.sheetID, + sheetDisclosed: o.sheetDisclosed, + lightsDisclosed: o.lightsDisclosed, + meshesDisclosed: o.meshesDisclosed, + materialsDisclosed: o.materialsDisclosed, + }); }); + } +}, function (writer, target) { + var disclosure = target.sheetDisclosure; + var desc = { Vrsn: 1 }; + if (disclosure.sheetTimelineOptions) { + desc.sheetTimelineOptions = disclosure.sheetTimelineOptions.map(function (d) { return ({ + Vrsn: 2, + sheetID: d.sheetID, + sheetDisclosed: d.sheetDisclosed, + lightsDisclosed: d.lightsDisclosed, + meshesDisclosed: d.meshesDisclosed, + materialsDisclosed: d.materialsDisclosed, + }); }); + } + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler(1054, function (target) { return target.urlsList !== undefined; }, function (reader, target, _, options) { + var count = (0, psdReader_1.readUint32)(reader); + if (count) { + if (!options.throwForMissingFeatures) + return; + throw new Error('Not implemented: URL List'); + } + // TODO: read actual URL list + target.urlsList = []; +}, function (writer, target) { + (0, psdWriter_1.writeUint32)(writer, target.urlsList.length); + // TODO: write actual URL list + if (target.urlsList.length) { + throw new Error('Not implemented: URL List'); + } +}); +helpers_1.MOCK_HANDLERS && addHandler(1050, // Slices +function (// Slices +target) { return target._ir1050 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1050', left()); + target._ir1050 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1050); +}); +addHandler(1064, function (target) { return target.pixelAspectRatio !== undefined; }, function (reader, target) { + if ((0, psdReader_1.readUint32)(reader) > 2) + throw new Error('Invalid pixelAspectRatio version'); + target.pixelAspectRatio = { aspect: (0, psdReader_1.readFloat64)(reader) }; +}, function (writer, target) { + (0, psdWriter_1.writeUint32)(writer, 2); // version + (0, psdWriter_1.writeFloat64)(writer, target.pixelAspectRatio.aspect); +}); +addHandler(1041, function (target) { return target.iccUntaggedProfile !== undefined; }, function (reader, target) { + target.iccUntaggedProfile = !!(0, psdReader_1.readUint8)(reader); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.iccUntaggedProfile ? 1 : 0); +}); +helpers_1.MOCK_HANDLERS && addHandler(1039, // ICC Profile +function (// ICC Profile +target) { return target._ir1039 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1039', left()); + target._ir1039 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1039); +}); +addHandler(1044, function (target) { return target.idsSeedNumber !== undefined; }, function (reader, target) { return target.idsSeedNumber = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.idsSeedNumber); }); +addHandler(1036, function (target) { return target.thumbnail !== undefined || target.thumbnailRaw !== undefined; }, function (reader, target, left, options) { + var format = (0, psdReader_1.readUint32)(reader); // 1 = kJpegRGB, 0 = kRawRGB + var width = (0, psdReader_1.readUint32)(reader); + var height = (0, psdReader_1.readUint32)(reader); + (0, psdReader_1.readUint32)(reader); // widthBytes = (width * bits_per_pixel + 31) / 32 * 4. + (0, psdReader_1.readUint32)(reader); // totalSize = widthBytes * height * planes + (0, psdReader_1.readUint32)(reader); // sizeAfterCompression + var bitsPerPixel = (0, psdReader_1.readUint16)(reader); // 24 + var planes = (0, psdReader_1.readUint16)(reader); // 1 + if (format !== 1 || bitsPerPixel !== 24 || planes !== 1) { + options.logMissingFeatures && console.log("Invalid thumbnail data (format: ".concat(format, ", bitsPerPixel: ").concat(bitsPerPixel, ", planes: ").concat(planes, ")")); + (0, psdReader_1.skipBytes)(reader, left()); + return; + } + var size = left(); + var data = (0, psdReader_1.readBytes)(reader, size); + if (options.useRawThumbnail) { + target.thumbnailRaw = { width: width, height: height, data: data }; + } + else if (data.byteLength) { + target.thumbnail = (0, helpers_1.createCanvasFromData)(data); + } +}, function (writer, target) { + var _a; + var width = 0; + var height = 0; + var data; + if (target.thumbnailRaw) { + width = target.thumbnailRaw.width; + height = target.thumbnailRaw.height; + data = target.thumbnailRaw.data; + } + else { + var dataUrl = (_a = target.thumbnail.toDataURL('image/jpeg', 1)) === null || _a === void 0 ? void 0 : _a.substring('data:image/jpeg;base64,'.length); + if (dataUrl) { + width = target.thumbnail.width; + height = target.thumbnail.height; + data = (0, base64_js_1.toByteArray)(dataUrl); + } + else { + data = new Uint8Array(0); + } + } + var bitsPerPixel = 24; + var widthBytes = Math.floor((width * bitsPerPixel + 31) / 32) * 4; + var planes = 1; + var totalSize = widthBytes * height * planes; + var sizeAfterCompression = data.length; + (0, psdWriter_1.writeUint32)(writer, 1); // 1 = kJpegRGB + (0, psdWriter_1.writeUint32)(writer, width); + (0, psdWriter_1.writeUint32)(writer, height); + (0, psdWriter_1.writeUint32)(writer, widthBytes); + (0, psdWriter_1.writeUint32)(writer, totalSize); + (0, psdWriter_1.writeUint32)(writer, sizeAfterCompression); + (0, psdWriter_1.writeUint16)(writer, bitsPerPixel); + (0, psdWriter_1.writeUint16)(writer, planes); + (0, psdWriter_1.writeBytes)(writer, data); +}); +addHandler(1057, function (target) { return target.versionInfo !== undefined; }, function (reader, target, left) { + var version = (0, psdReader_1.readUint32)(reader); + if (version !== 1) + throw new Error('Invalid versionInfo version'); + target.versionInfo = { + hasRealMergedData: !!(0, psdReader_1.readUint8)(reader), + writerName: (0, psdReader_1.readUnicodeString)(reader), + readerName: (0, psdReader_1.readUnicodeString)(reader), + fileVersion: (0, psdReader_1.readUint32)(reader), + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var versionInfo = target.versionInfo; + (0, psdWriter_1.writeUint32)(writer, 1); // version + (0, psdWriter_1.writeUint8)(writer, versionInfo.hasRealMergedData ? 1 : 0); + (0, psdWriter_1.writeUnicodeString)(writer, versionInfo.writerName); + (0, psdWriter_1.writeUnicodeString)(writer, versionInfo.readerName); + (0, psdWriter_1.writeUint32)(writer, versionInfo.fileVersion); +}); +helpers_1.MOCK_HANDLERS && addHandler(1058, // EXIF data 1. +function (// EXIF data 1. +target) { return target._ir1058 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1058', left()); + target._ir1058 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1058); +}); +addHandler(7000, function (target) { return target.imageReadyVariables !== undefined; }, function (reader, target, left) { + target.imageReadyVariables = readUtf8String(reader, left()); +}, function (writer, target) { + writeUtf8String(writer, target.imageReadyVariables); +}); +addHandler(7001, function (target) { return target.imageReadyDataSets !== undefined; }, function (reader, target, left) { + target.imageReadyDataSets = readUtf8String(reader, left()); +}, function (writer, target) { + writeUtf8String(writer, target.imageReadyDataSets); +}); +addHandler(1088, function (target) { return target.pathSelectionState !== undefined; }, function (reader, target, _left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + target.pathSelectionState = desc['null']; +}, function (writer, target) { + var desc = { 'null': target.pathSelectionState }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +helpers_1.MOCK_HANDLERS && addHandler(1025, function (target) { return target._ir1025 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1025', left()); + target._ir1025 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1025); +}); +var FrmD = (0, helpers_1.createEnum)('FrmD', '', { + auto: 'Auto', + none: 'None', + dispose: 'Disp', +}); +addHandler(4000, // Plug-In resource(s) +function (// Plug-In resource(s) +target) { return target.animations !== undefined; }, function (reader, target, left, _a) { + var logMissingFeatures = _a.logMissingFeatures, logDevFeatures = _a.logDevFeatures; + var key = (0, psdReader_1.readSignature)(reader); + if (key === 'mani') { + (0, psdReader_1.checkSignature)(reader, 'IRFR'); + (0, psdReader_1.readSection)(reader, 1, function (left) { + var _loop_1 = function () { + (0, psdReader_1.checkSignature)(reader, '8BIM'); + var key_1 = (0, psdReader_1.readSignature)(reader); + (0, psdReader_1.readSection)(reader, 1, function (left) { + if (key_1 === 'AnDs') { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.animations = { + // desc.AFSt ??? + frames: desc.FrIn.map(function (x) { return ({ + id: x.FrID, + delay: (x.FrDl || 0) / 100, + dispose: x.FrDs ? FrmD.decode(x.FrDs) : 'auto', // missing == auto + // x.FrGA ??? + }); }), + animations: desc.FSts.map(function (x) { return ({ + id: x.FsID, + frames: x.FsFr, + repeats: x.LCnt, + activeFrame: x.AFrm || 0, + }); }), + }; + // console.log('#4000 AnDs', require('util').inspect(desc, false, 99, true)); + // console.log('#4000 AnDs:result', require('util').inspect(target.animations, false, 99, true)); + } + else if (key_1 === 'Roll') { + var bytes = (0, psdReader_1.readBytes)(reader, left()); + logDevFeatures && console.log('#4000 Roll', bytes); + } + else { + logMissingFeatures && console.log('Unhandled subsection in #4000', key_1); + } + }); + }; + while (left()) { + _loop_1(); + } + }); + } + else if (key === 'mopt') { + var bytes = (0, psdReader_1.readBytes)(reader, left()); + logDevFeatures && console.log('#4000 mopt', bytes); + } + else { + logMissingFeatures && console.log('Unhandled key in #4000:', key); + } +}, function (writer, target) { + if (target.animations) { + (0, psdWriter_1.writeSignature)(writer, 'mani'); + (0, psdWriter_1.writeSignature)(writer, 'IRFR'); + (0, psdWriter_1.writeSection)(writer, 1, function () { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'AnDs'); + (0, psdWriter_1.writeSection)(writer, 1, function () { + var desc = { + // AFSt: 0, // ??? + FrIn: [], + FSts: [], + }; + for (var i = 0; i < target.animations.frames.length; i++) { + var f = target.animations.frames[i]; + var frame = { + FrID: f.id, + }; + if (f.delay) + frame.FrDl = (f.delay * 100) | 0; + frame.FrDs = FrmD.encode(f.dispose); + // if (i === 0) frame.FrGA = 30; // ??? + desc.FrIn.push(frame); + } + for (var i = 0; i < target.animations.animations.length; i++) { + var a = target.animations.animations[i]; + var anim = { + FsID: a.id, + AFrm: a.activeFrame | 0, + FsFr: a.frames, + LCnt: a.repeats | 0, + }; + desc.FSts.push(anim); + } + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + }); + // writeSignature(writer, '8BIM'); + // writeSignature(writer, 'Roll'); + // writeSection(writer, 1, () => { + // writeZeros(writer, 8); + // }); + }); + } +}); +// TODO: Unfinished +helpers_1.MOCK_HANDLERS && addHandler(4001, // Plug-In resource(s) +function (// Plug-In resource(s) +target) { return target._ir4001 !== undefined; }, function (reader, target, left, _a) { + var logMissingFeatures = _a.logMissingFeatures, logDevFeatures = _a.logDevFeatures; + if (helpers_1.MOCK_HANDLERS) { + LOG_MOCK_HANDLERS && console.log('image resource 4001', left()); + target._ir4001 = (0, psdReader_1.readBytes)(reader, left()); + return; + } + var key = (0, psdReader_1.readSignature)(reader); + if (key === 'mfri') { + var version = (0, psdReader_1.readUint32)(reader); + if (version !== 2) + throw new Error('Invalid mfri version'); + var length_1 = (0, psdReader_1.readUint32)(reader); + var bytes = (0, psdReader_1.readBytes)(reader, length_1); + logDevFeatures && console.log('mfri', bytes); + } + else if (key === 'mset') { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + logDevFeatures && console.log('mset', desc); + } + else { + logMissingFeatures && console.log('Unhandled key in #4001', key); + } +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir4001); +}); +// TODO: Unfinished +helpers_1.MOCK_HANDLERS && addHandler(4002, // Plug-In resource(s) +function (// Plug-In resource(s) +target) { return target._ir4002 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 4002', left()); + target._ir4002 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir4002); +}); + },{"./descriptor":4,"./helpers":7,"./psdReader":11,"./psdWriter":12,"./utf8":14,"base64-js":15}],9:[function(require,module,exports){ (function (Buffer){(function (){ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.writePsdBuffer = exports.writePsdUint8Array = exports.writePsd = exports.readPsd = exports.byteArrayToBase64 = exports.initializeCanvas = void 0; -var psdWriter_1 = require("./psdWriter"); -var psdReader_1 = require("./psdReader"); -__exportStar(require("./abr"), exports); -__exportStar(require("./csh"), exports); -var helpers_1 = require("./helpers"); -Object.defineProperty(exports, "initializeCanvas", { enumerable: true, get: function () { return helpers_1.initializeCanvas; } }); -__exportStar(require("./psd"), exports); -var base64_js_1 = require("base64-js"); -exports.byteArrayToBase64 = base64_js_1.fromByteArray; -function readPsd(buffer, options) { - var reader = 'buffer' in buffer ? - (0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength) : - (0, psdReader_1.createReader)(buffer); - return (0, psdReader_1.readPsd)(reader, options); -} -exports.readPsd = readPsd; -function writePsd(psd, options) { - var writer = (0, psdWriter_1.createWriter)(); - (0, psdWriter_1.writePsd)(writer, psd, options); - return (0, psdWriter_1.getWriterBuffer)(writer); -} -exports.writePsd = writePsd; -function writePsdUint8Array(psd, options) { - var writer = (0, psdWriter_1.createWriter)(); - (0, psdWriter_1.writePsd)(writer, psd, options); - return (0, psdWriter_1.getWriterBufferNoCopy)(writer); -} -exports.writePsdUint8Array = writePsdUint8Array; -function writePsdBuffer(psd, options) { - if (typeof Buffer === 'undefined') { - throw new Error('Buffer not supported on this platform'); - } - return Buffer.from(writePsdUint8Array(psd, options)); -} -exports.writePsdBuffer = writePsdBuffer; +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writePsdBuffer = exports.writePsdUint8Array = exports.writePsd = exports.readPsd = exports.byteArrayToBase64 = exports.initializeCanvas = void 0; +var psdWriter_1 = require("./psdWriter"); +var psdReader_1 = require("./psdReader"); +__exportStar(require("./abr"), exports); +__exportStar(require("./csh"), exports); +var helpers_1 = require("./helpers"); +Object.defineProperty(exports, "initializeCanvas", { enumerable: true, get: function () { return helpers_1.initializeCanvas; } }); +__exportStar(require("./psd"), exports); +var base64_js_1 = require("base64-js"); +exports.byteArrayToBase64 = base64_js_1.fromByteArray; +function readPsd(buffer, options) { + var reader = 'buffer' in buffer ? + (0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength) : + (0, psdReader_1.createReader)(buffer); + return (0, psdReader_1.readPsd)(reader, options); +} +exports.readPsd = readPsd; +function writePsd(psd, options) { + var writer = (0, psdWriter_1.createWriter)(); + (0, psdWriter_1.writePsd)(writer, psd, options); + return (0, psdWriter_1.getWriterBuffer)(writer); +} +exports.writePsd = writePsd; +function writePsdUint8Array(psd, options) { + var writer = (0, psdWriter_1.createWriter)(); + (0, psdWriter_1.writePsd)(writer, psd, options); + return (0, psdWriter_1.getWriterBufferNoCopy)(writer); +} +exports.writePsdUint8Array = writePsdUint8Array; +function writePsdBuffer(psd, options) { + if (typeof Buffer === 'undefined') { + throw new Error('Buffer not supported on this platform'); + } + return Buffer.from(writePsdUint8Array(psd, options)); +} +exports.writePsdBuffer = writePsdBuffer; + }).call(this)}).call(this,require("buffer").Buffer) },{"./abr":1,"./csh":3,"./helpers":7,"./psd":10,"./psdReader":11,"./psdWriter":12,"base64-js":15,"buffer":16}],10:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SectionDividerType = exports.ColorMode = void 0; -var ColorMode; -(function (ColorMode) { - ColorMode[ColorMode["Bitmap"] = 0] = "Bitmap"; - ColorMode[ColorMode["Grayscale"] = 1] = "Grayscale"; - ColorMode[ColorMode["Indexed"] = 2] = "Indexed"; - ColorMode[ColorMode["RGB"] = 3] = "RGB"; - ColorMode[ColorMode["CMYK"] = 4] = "CMYK"; - ColorMode[ColorMode["Multichannel"] = 7] = "Multichannel"; - ColorMode[ColorMode["Duotone"] = 8] = "Duotone"; - ColorMode[ColorMode["Lab"] = 9] = "Lab"; -})(ColorMode = exports.ColorMode || (exports.ColorMode = {})); -var SectionDividerType; -(function (SectionDividerType) { - SectionDividerType[SectionDividerType["Other"] = 0] = "Other"; - SectionDividerType[SectionDividerType["OpenFolder"] = 1] = "OpenFolder"; - SectionDividerType[SectionDividerType["ClosedFolder"] = 2] = "ClosedFolder"; - SectionDividerType[SectionDividerType["BoundingSectionDivider"] = 3] = "BoundingSectionDivider"; -})(SectionDividerType = exports.SectionDividerType || (exports.SectionDividerType = {})); +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SectionDividerType = exports.ColorMode = void 0; +var ColorMode; +(function (ColorMode) { + ColorMode[ColorMode["Bitmap"] = 0] = "Bitmap"; + ColorMode[ColorMode["Grayscale"] = 1] = "Grayscale"; + ColorMode[ColorMode["Indexed"] = 2] = "Indexed"; + ColorMode[ColorMode["RGB"] = 3] = "RGB"; + ColorMode[ColorMode["CMYK"] = 4] = "CMYK"; + ColorMode[ColorMode["Multichannel"] = 7] = "Multichannel"; + ColorMode[ColorMode["Duotone"] = 8] = "Duotone"; + ColorMode[ColorMode["Lab"] = 9] = "Lab"; +})(ColorMode = exports.ColorMode || (exports.ColorMode = {})); +var SectionDividerType; +(function (SectionDividerType) { + SectionDividerType[SectionDividerType["Other"] = 0] = "Other"; + SectionDividerType[SectionDividerType["OpenFolder"] = 1] = "OpenFolder"; + SectionDividerType[SectionDividerType["ClosedFolder"] = 2] = "ClosedFolder"; + SectionDividerType[SectionDividerType["BoundingSectionDivider"] = 3] = "BoundingSectionDivider"; +})(SectionDividerType = exports.SectionDividerType || (exports.SectionDividerType = {})); + },{}],11:[function(require,module,exports){ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readPattern = exports.readColor = exports.readSection = exports.readDataRLE = exports.readDataZipWithoutPrediction = exports.readPsd = exports.checkSignature = exports.skipBytes = exports.readAsciiString = exports.readUnicodeStringWithLength = exports.readUnicodeString = exports.readPascalString = exports.readSignature = exports.readBytes = exports.readFixedPointPath32 = exports.readFixedPoint32 = exports.readFloat64 = exports.readFloat32 = exports.readUint32 = exports.readInt32LE = exports.readInt32 = exports.readUint16 = exports.readInt16 = exports.peekUint8 = exports.readUint8 = exports.warnOrThrow = exports.createReader = exports.supportedColorModes = void 0; -var pako_1 = require("pako"); -var helpers_1 = require("./helpers"); -var additionalInfo_1 = require("./additionalInfo"); -var imageResources_1 = require("./imageResources"); -exports.supportedColorModes = [0 /* ColorMode.Bitmap */, 1 /* ColorMode.Grayscale */, 3 /* ColorMode.RGB */]; -var colorModes = ['bitmap', 'grayscale', 'indexed', 'RGB', 'CMYK', 'multichannel', 'duotone', 'lab']; -function setupGrayscale(data) { - var size = data.width * data.height * 4; - for (var i = 0; i < size; i += 4) { - data.data[i + 1] = data.data[i]; - data.data[i + 2] = data.data[i]; - } -} -function createReader(buffer, offset, length) { - var view = new DataView(buffer, offset, length); - return { view: view, offset: 0, strict: false, debug: false }; -} -exports.createReader = createReader; -function warnOrThrow(reader, message) { - if (reader.strict) - throw new Error(message); - if (reader.debug) - console.warn(message); -} -exports.warnOrThrow = warnOrThrow; -function readUint8(reader) { - reader.offset += 1; - return reader.view.getUint8(reader.offset - 1); -} -exports.readUint8 = readUint8; -function peekUint8(reader) { - return reader.view.getUint8(reader.offset); -} -exports.peekUint8 = peekUint8; -function readInt16(reader) { - reader.offset += 2; - return reader.view.getInt16(reader.offset - 2, false); -} -exports.readInt16 = readInt16; -function readUint16(reader) { - reader.offset += 2; - return reader.view.getUint16(reader.offset - 2, false); -} -exports.readUint16 = readUint16; -function readInt32(reader) { - reader.offset += 4; - return reader.view.getInt32(reader.offset - 4, false); -} -exports.readInt32 = readInt32; -function readInt32LE(reader) { - reader.offset += 4; - return reader.view.getInt32(reader.offset - 4, true); -} -exports.readInt32LE = readInt32LE; -function readUint32(reader) { - reader.offset += 4; - return reader.view.getUint32(reader.offset - 4, false); -} -exports.readUint32 = readUint32; -function readFloat32(reader) { - reader.offset += 4; - return reader.view.getFloat32(reader.offset - 4, false); -} -exports.readFloat32 = readFloat32; -function readFloat64(reader) { - reader.offset += 8; - return reader.view.getFloat64(reader.offset - 8, false); -} -exports.readFloat64 = readFloat64; -// 32-bit fixed-point number 16.16 -function readFixedPoint32(reader) { - return readInt32(reader) / (1 << 16); -} -exports.readFixedPoint32 = readFixedPoint32; -// 32-bit fixed-point number 8.24 -function readFixedPointPath32(reader) { - return readInt32(reader) / (1 << 24); -} -exports.readFixedPointPath32 = readFixedPointPath32; -function readBytes(reader, length) { - var start = reader.view.byteOffset + reader.offset; - reader.offset += length; - if ((start + length) > reader.view.buffer.byteLength) { - // fix for broken PSD files that are missing part of file at the end - warnOrThrow(reader, 'Reading bytes exceeding buffer length'); - if (length > (100 * 1024 * 1024)) - throw new Error('Reading past end of file'); // limit to 100MB - var result = new Uint8Array(length); - var len = Math.min(length, reader.view.byteLength - start); - if (len > 0) - result.set(new Uint8Array(reader.view.buffer, start, len)); - return result; - } - else { - return new Uint8Array(reader.view.buffer, start, length); - } -} -exports.readBytes = readBytes; -function readSignature(reader) { - return readShortString(reader, 4); -} -exports.readSignature = readSignature; -function readPascalString(reader, padTo) { - var length = readUint8(reader); - var text = length ? readShortString(reader, length) : ''; - while (++length % padTo) { - reader.offset++; - } - return text; -} -exports.readPascalString = readPascalString; -function readUnicodeString(reader) { - var length = readUint32(reader); - return readUnicodeStringWithLength(reader, length); -} -exports.readUnicodeString = readUnicodeString; -function readUnicodeStringWithLength(reader, length) { - var text = ''; - while (length--) { - var value = readUint16(reader); - if (value || length > 0) { // remove trailing \0 - text += String.fromCharCode(value); - } - } - return text; -} -exports.readUnicodeStringWithLength = readUnicodeStringWithLength; -function readAsciiString(reader, length) { - var text = ''; - while (length--) { - text += String.fromCharCode(readUint8(reader)); - } - return text; -} -exports.readAsciiString = readAsciiString; -function skipBytes(reader, count) { - reader.offset += count; -} -exports.skipBytes = skipBytes; -function checkSignature(reader, a, b) { - var offset = reader.offset; - var signature = readSignature(reader); - if (signature !== a && signature !== b) { - throw new Error("Invalid signature: '".concat(signature, "' at 0x").concat(offset.toString(16))); - } -} -exports.checkSignature = checkSignature; -function readShortString(reader, length) { - var buffer = readBytes(reader, length); - var result = ''; - for (var i = 0; i < buffer.length; i++) { - result += String.fromCharCode(buffer[i]); - } - return result; -} -function isValidSignature(sig) { - return sig === '8BIM' || sig === 'MeSa' || sig === 'AgHg' || sig === 'PHUT' || sig === 'DCSR'; -} -function readPsd(reader, options) { - var _a; - if (options === void 0) { options = {}; } - // header - checkSignature(reader, '8BPS'); - var version = readUint16(reader); - if (version !== 1 && version !== 2) - throw new Error("Invalid PSD file version: ".concat(version)); - skipBytes(reader, 6); - var channels = readUint16(reader); - var height = readUint32(reader); - var width = readUint32(reader); - var bitsPerChannel = readUint16(reader); - var colorMode = readUint16(reader); - var maxSize = version === 1 ? 30000 : 300000; - if (width > maxSize || height > maxSize) - throw new Error("Invalid size"); - if (channels > 16) - throw new Error("Invalid channel count"); - if (bitsPerChannel > 32) - throw new Error("Invalid bitsPerChannel count"); - if (exports.supportedColorModes.indexOf(colorMode) === -1) - throw new Error("Color mode not supported: ".concat((_a = colorModes[colorMode]) !== null && _a !== void 0 ? _a : colorMode)); - var psd = { width: width, height: height, channels: channels, bitsPerChannel: bitsPerChannel, colorMode: colorMode }; - var opt = __assign(__assign({}, options), { large: version === 2 }); - var fixOffsets = [0, 1, -1, 2, -2, 3, -3, 4, -4]; - // color mode data - readSection(reader, 1, function (left) { - if (opt.throwForMissingFeatures) - throw new Error('Color mode data not supported'); - skipBytes(reader, left()); - }); - // image resources - readSection(reader, 1, function (left) { - var _loop_1 = function () { - var sigOffset = reader.offset; - var sig = ''; - // attempt to fix broken document by realigning with the signature - for (var _i = 0, fixOffsets_1 = fixOffsets; _i < fixOffsets_1.length; _i++) { - var offset = fixOffsets_1[_i]; - try { - reader.offset = sigOffset + offset; - sig = readSignature(reader); - } - catch (_a) { } - if (isValidSignature(sig)) - break; - } - if (!isValidSignature(sig)) { - throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((sigOffset).toString(16))); - } - var id = readUint16(reader); - readPascalString(reader, 2); // name - readSection(reader, 2, function (left) { - var handler = imageResources_1.resourceHandlersMap[id]; - var skip = id === 1036 && !!opt.skipThumbnail; - if (!psd.imageResources) { - psd.imageResources = {}; - } - if (handler && !skip) { - try { - handler.read(reader, psd.imageResources, left, opt); - } - catch (e) { - if (opt.throwForMissingFeatures) - throw e; - skipBytes(reader, left()); - } - } - else { - // options.logMissingFeatures && console.log(`Unhandled image resource: ${id}`); - skipBytes(reader, left()); - } - }); - }; - while (left()) { - _loop_1(); - } - }); - // layer and mask info - var globalAlpha = false; - readSection(reader, 1, function (left) { - globalAlpha = readLayerInfo(reader, psd, opt); - // SAI does not include this section - if (left() > 0) { - var globalLayerMaskInfo = readGlobalLayerMaskInfo(reader); - if (globalLayerMaskInfo) - psd.globalLayerMaskInfo = globalLayerMaskInfo; - } - else { - // revert back to end of section if exceeded section limits - // opt.logMissingFeatures && console.log('reverting to end of section'); - skipBytes(reader, left()); - } - while (left() > 0) { - // sometimes there are empty bytes here - while (left() && peekUint8(reader) === 0) { - // opt.logMissingFeatures && console.log('skipping 0 byte'); - skipBytes(reader, 1); - } - if (left() >= 12) { - readAdditionalLayerInfo(reader, psd, psd, opt); - } - else { - // opt.logMissingFeatures && console.log('skipping leftover bytes', left()); - skipBytes(reader, left()); - } - } - }, undefined, opt.large); - var hasChildren = psd.children && psd.children.length; - var skipComposite = opt.skipCompositeImageData && (opt.skipLayerImageData || hasChildren); - if (!skipComposite) { - readImageData(reader, psd, globalAlpha, opt); - } - // TODO: show converted color mode instead of original PSD file color mode - // but add option to preserve file color mode (need to return image data instead of canvas in that case) - // psd.colorMode = ColorMode.RGB; // we convert all color modes to RGB - return psd; -} -exports.readPsd = readPsd; -function readLayerInfo(reader, psd, options) { - var globalAlpha = false; - readSection(reader, 2, function (left) { - var layerCount = readInt16(reader); - if (layerCount < 0) { - globalAlpha = true; - layerCount = -layerCount; - } - var layers = []; - var layerChannels = []; - for (var i = 0; i < layerCount; i++) { - var _a = readLayerRecord(reader, psd, options), layer = _a.layer, channels = _a.channels; - layers.push(layer); - layerChannels.push(channels); - } - if (!options.skipLayerImageData) { - for (var i = 0; i < layerCount; i++) { - readLayerChannelImageData(reader, psd, layers[i], layerChannels[i], options); - } - } - skipBytes(reader, left()); - if (!psd.children) - psd.children = []; - var stack = [psd]; - for (var i = layers.length - 1; i >= 0; i--) { - var l = layers[i]; - var type = l.sectionDivider ? l.sectionDivider.type : 0 /* SectionDividerType.Other */; - if (type === 1 /* SectionDividerType.OpenFolder */ || type === 2 /* SectionDividerType.ClosedFolder */) { - l.opened = type === 1 /* SectionDividerType.OpenFolder */; - l.children = []; - stack[stack.length - 1].children.unshift(l); - stack.push(l); - } - else if (type === 3 /* SectionDividerType.BoundingSectionDivider */) { - stack.pop(); - // this was workaround because I didn't know what `lsdk` section was, now it's probably not needed anymore - // } else if (l.name === '' && !l.sectionDivider && !l.top && !l.left && !l.bottom && !l.right) { - // // sometimes layer group terminator doesn't have sectionDivider, so we just guess here (PS bug ?) - // stack.pop(); - } - else { - stack[stack.length - 1].children.unshift(l); - } - } - }, undefined, options.large); - return globalAlpha; -} -function readLayerRecord(reader, psd, options) { - var layer = {}; - layer.top = readInt32(reader); - layer.left = readInt32(reader); - layer.bottom = readInt32(reader); - layer.right = readInt32(reader); - var channelCount = readUint16(reader); - var channels = []; - for (var i = 0; i < channelCount; i++) { - var channelID = readInt16(reader); - var channelLength = readUint32(reader); - if (options.large) { - if (channelLength !== 0) - throw new Error('Sizes larger than 4GB are not supported'); - channelLength = readUint32(reader); - } - channels.push({ id: channelID, length: channelLength }); - } - checkSignature(reader, '8BIM'); - var blendMode = readSignature(reader); - if (!helpers_1.toBlendMode[blendMode]) - throw new Error("Invalid blend mode: '".concat(blendMode, "'")); - layer.blendMode = helpers_1.toBlendMode[blendMode]; - layer.opacity = readUint8(reader) / 0xff; - layer.clipping = readUint8(reader) === 1; - var flags = readUint8(reader); - layer.transparencyProtected = (flags & 0x01) !== 0; - layer.hidden = (flags & 0x02) !== 0; - // 0x04 - obsolete - // 0x08 - 1 for Photoshop 5.0 and later, tells if bit 4 has useful information - // 0x10 - pixel data irrelevant to appearance of document - // 0x20 - ??? - // if (flags & 0x20) (layer as any)._2 = true; // TEMP !!!! - skipBytes(reader, 1); - readSection(reader, 1, function (left) { - var mask = readLayerMaskData(reader, options); - if (mask) - layer.mask = mask; - /*const blendingRanges =*/ readLayerBlendingRanges(reader); - layer.name = readPascalString(reader, 4); - while (left()) { - readAdditionalLayerInfo(reader, layer, psd, options); - } - }); - return { layer: layer, channels: channels }; -} -function readLayerMaskData(reader, options) { - return readSection(reader, 1, function (left) { - if (!left()) - return undefined; - var mask = {}; - mask.top = readInt32(reader); - mask.left = readInt32(reader); - mask.bottom = readInt32(reader); - mask.right = readInt32(reader); - mask.defaultColor = readUint8(reader); - var flags = readUint8(reader); - mask.positionRelativeToLayer = (flags & 1 /* LayerMaskFlags.PositionRelativeToLayer */) !== 0; - mask.disabled = (flags & 2 /* LayerMaskFlags.LayerMaskDisabled */) !== 0; - mask.fromVectorData = (flags & 8 /* LayerMaskFlags.LayerMaskFromRenderingOtherData */) !== 0; - if (flags & 16 /* LayerMaskFlags.MaskHasParametersAppliedToIt */) { - var params = readUint8(reader); - if (params & 1 /* MaskParams.UserMaskDensity */) - mask.userMaskDensity = readUint8(reader) / 0xff; - if (params & 2 /* MaskParams.UserMaskFeather */) - mask.userMaskFeather = readFloat64(reader); - if (params & 4 /* MaskParams.VectorMaskDensity */) - mask.vectorMaskDensity = readUint8(reader) / 0xff; - if (params & 8 /* MaskParams.VectorMaskFeather */) - mask.vectorMaskFeather = readFloat64(reader); - } - if (left() > 2) { - options.logMissingFeatures && console.log('Unhandled extra mask params'); - // TODO: handle these values - /*const realFlags =*/ readUint8(reader); - /*const realUserMaskBackground =*/ readUint8(reader); - /*const top2 =*/ readInt32(reader); - /*const left2 =*/ readInt32(reader); - /*const bottom2 =*/ readInt32(reader); - /*const right2 =*/ readInt32(reader); - } - skipBytes(reader, left()); - return mask; - }); -} -function readLayerBlendingRanges(reader) { - return readSection(reader, 1, function (left) { - var compositeGrayBlendSource = readUint32(reader); - var compositeGraphBlendDestinationRange = readUint32(reader); - var ranges = []; - while (left()) { - var sourceRange = readUint32(reader); - var destRange = readUint32(reader); - ranges.push({ sourceRange: sourceRange, destRange: destRange }); - } - return { compositeGrayBlendSource: compositeGrayBlendSource, compositeGraphBlendDestinationRange: compositeGraphBlendDestinationRange, ranges: ranges }; - }); -} -function readLayerChannelImageData(reader, psd, layer, channels, options) { - var layerWidth = (layer.right || 0) - (layer.left || 0); - var layerHeight = (layer.bottom || 0) - (layer.top || 0); - var cmyk = psd.colorMode === 4 /* ColorMode.CMYK */; - var imageData; - if (layerWidth && layerHeight) { - if (cmyk) { - imageData = { width: layerWidth, height: layerHeight, data: new Uint8ClampedArray(layerWidth * layerHeight * 5) }; - for (var p = 4; p < imageData.data.byteLength; p += 5) - imageData.data[p] = 255; - } - else { - imageData = (0, helpers_1.createImageData)(layerWidth, layerHeight); - (0, helpers_1.resetImageData)(imageData); - } - } - if (helpers_1.RAW_IMAGE_DATA) - layer.imageDataRaw = []; - for (var _i = 0, channels_1 = channels; _i < channels_1.length; _i++) { - var channel = channels_1[_i]; - if (channel.length === 0) - continue; - if (channel.length < 2) - throw new Error('Invalid channel length'); - var start = reader.offset; - var compression = readUint16(reader); - // try to fix broken files where there's 1 byte shift of channel - if (compression > 3) { - reader.offset -= 1; - compression = readUint16(reader); - } - // try to fix broken files where there's 1 byte shift of channel - if (compression > 3) { - reader.offset -= 3; - compression = readUint16(reader); - } - if (compression > 3) - throw new Error("Invalid compression: ".concat(compression)); - if (channel.id === -2 /* ChannelID.UserMask */) { - var mask = layer.mask; - if (!mask) - throw new Error("Missing layer mask data"); - var maskWidth = (mask.right || 0) - (mask.left || 0); - var maskHeight = (mask.bottom || 0) - (mask.top || 0); - if (maskWidth && maskHeight) { - var maskData = (0, helpers_1.createImageData)(maskWidth, maskHeight); - (0, helpers_1.resetImageData)(maskData); - var start_1 = reader.offset; - readData(reader, channel.length, maskData, compression, maskWidth, maskHeight, 0, options.large, 4); - if (helpers_1.RAW_IMAGE_DATA) { - layer.maskDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start_1, reader.offset - start_1); - } - setupGrayscale(maskData); - if (options.useImageData) { - mask.imageData = maskData; - } - else { - mask.canvas = (0, helpers_1.createCanvas)(maskWidth, maskHeight); - mask.canvas.getContext('2d').putImageData(maskData, 0, 0); - } - } - } - else { - var offset = (0, helpers_1.offsetForChannel)(channel.id, cmyk); - var targetData = imageData; - if (offset < 0) { - targetData = undefined; - if (options.throwForMissingFeatures) { - throw new Error("Channel not supported: ".concat(channel.id)); - } - } - readData(reader, channel.length, targetData, compression, layerWidth, layerHeight, offset, options.large, cmyk ? 5 : 4); - if (helpers_1.RAW_IMAGE_DATA) { - layer.imageDataRaw[channel.id] = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start + 2, channel.length - 2); - } - reader.offset = start + channel.length; - if (targetData && psd.colorMode === 1 /* ColorMode.Grayscale */) { - setupGrayscale(targetData); - } - } - } - if (imageData) { - if (cmyk) { - var cmykData = imageData; - imageData = (0, helpers_1.createImageData)(cmykData.width, cmykData.height); - cmykToRgb(cmykData, imageData, false); - } - if (options.useImageData) { - layer.imageData = imageData; - } - else { - layer.canvas = (0, helpers_1.createCanvas)(layerWidth, layerHeight); - layer.canvas.getContext('2d').putImageData(imageData, 0, 0); - } - } -} -function readData(reader, length, data, compression, width, height, offset, large, step) { - if (compression === 0 /* Compression.RawData */) { - readDataRaw(reader, data, width, height, step, offset); - } - else if (compression === 1 /* Compression.RleCompressed */) { - readDataRLE(reader, data, width, height, step, [offset], large); - } - else if (compression === 2 /* Compression.ZipWithoutPrediction */) { - readDataZipWithoutPrediction(reader, length, data, width, height, step, offset); - } - else if (compression === 3 /* Compression.ZipWithPrediction */) { - throw new Error("Compression type not supported: ".concat(compression)); - } - else { - throw new Error("Invalid Compression type: ".concat(compression)); - } -} -function readGlobalLayerMaskInfo(reader) { - return readSection(reader, 1, function (left) { - if (!left()) - return undefined; - var overlayColorSpace = readUint16(reader); - var colorSpace1 = readUint16(reader); - var colorSpace2 = readUint16(reader); - var colorSpace3 = readUint16(reader); - var colorSpace4 = readUint16(reader); - var opacity = readUint16(reader) / 0xff; - var kind = readUint8(reader); - skipBytes(reader, left()); // 3 bytes of padding ? - return { overlayColorSpace: overlayColorSpace, colorSpace1: colorSpace1, colorSpace2: colorSpace2, colorSpace3: colorSpace3, colorSpace4: colorSpace4, opacity: opacity, kind: kind }; - }); -} -function readAdditionalLayerInfo(reader, target, psd, options) { - var sig = readSignature(reader); - if (sig !== '8BIM' && sig !== '8B64') - throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((reader.offset - 4).toString(16))); - var key = readSignature(reader); - // `largeAdditionalInfoKeys` fallback, because some keys don't have 8B64 signature even when they are 64bit - var u64 = sig === '8B64' || (options.large && helpers_1.largeAdditionalInfoKeys.indexOf(key) !== -1); - readSection(reader, 2, function (left) { - var handler = additionalInfo_1.infoHandlersMap[key]; - if (handler) { - try { - handler.read(reader, target, left, psd, options); - } - catch (e) { - if (options.throwForMissingFeatures) - throw e; - } - } - else { - options.logMissingFeatures && console.log("Unhandled additional info: ".concat(key)); - skipBytes(reader, left()); - } - if (left()) { - options.logMissingFeatures && console.log("Unread ".concat(left(), " bytes left for additional info: ").concat(key)); - skipBytes(reader, left()); - } - }, false, u64); -} -function readImageData(reader, psd, globalAlpha, options) { - var compression = readUint16(reader); - if (exports.supportedColorModes.indexOf(psd.colorMode) === -1) - throw new Error("Color mode not supported: ".concat(psd.colorMode)); - if (compression !== 0 /* Compression.RawData */ && compression !== 1 /* Compression.RleCompressed */) - throw new Error("Compression type not supported: ".concat(compression)); - var imageData = (0, helpers_1.createImageData)(psd.width, psd.height); - (0, helpers_1.resetImageData)(imageData); - switch (psd.colorMode) { - case 0 /* ColorMode.Bitmap */: { - var bytes = void 0; - if (compression === 0 /* Compression.RawData */) { - bytes = readBytes(reader, Math.ceil(psd.width / 8) * psd.height); - } - else if (compression === 1 /* Compression.RleCompressed */) { - bytes = new Uint8Array(psd.width * psd.height); - readDataRLE(reader, { data: bytes, width: psd.width, height: psd.height }, psd.width, psd.height, 1, [0], options.large); - } - else { - throw new Error("Bitmap compression not supported: ".concat(compression)); - } - (0, helpers_1.decodeBitmap)(bytes, imageData.data, psd.width, psd.height); - break; - } - case 3 /* ColorMode.RGB */: - case 1 /* ColorMode.Grayscale */: { - var channels = psd.colorMode === 1 /* ColorMode.Grayscale */ ? [0] : [0, 1, 2]; - if (psd.channels && psd.channels > 3) { - for (var i = 3; i < psd.channels; i++) { - // TODO: store these channels in additional image data - channels.push(i); - } - } - else if (globalAlpha) { - channels.push(3); - } - if (compression === 0 /* Compression.RawData */) { - for (var i = 0; i < channels.length; i++) { - readDataRaw(reader, imageData, psd.width, psd.height, 4, channels[i]); - } - } - else if (compression === 1 /* Compression.RleCompressed */) { - var start = reader.offset; - readDataRLE(reader, imageData, psd.width, psd.height, 4, channels, options.large); - if (helpers_1.RAW_IMAGE_DATA) - psd.imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); - } - if (psd.colorMode === 1 /* ColorMode.Grayscale */) { - setupGrayscale(imageData); - } - break; - } - case 4 /* ColorMode.CMYK */: { - if (psd.channels !== 4) - throw new Error("Invalid channel count"); - var channels = [0, 1, 2, 3]; - if (globalAlpha) - channels.push(4); - if (compression === 0 /* Compression.RawData */) { - throw new Error("Not implemented"); - // TODO: ... - // for (let i = 0; i < channels.length; i++) { - // readDataRaw(reader, imageData, channels[i], psd.width, psd.height); - // } - } - else if (compression === 1 /* Compression.RleCompressed */) { - var cmykImageData = { - width: imageData.width, - height: imageData.height, - data: new Uint8Array(imageData.width * imageData.height * 5), - }; - var start = reader.offset; - readDataRLE(reader, cmykImageData, psd.width, psd.height, 5, channels, options.large); - cmykToRgb(cmykImageData, imageData, true); - if (helpers_1.RAW_IMAGE_DATA) - psd.imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); - } - break; - } - default: throw new Error("Color mode not supported: ".concat(psd.colorMode)); - } - // remove weird white matte - if (globalAlpha) { - var p = imageData.data; - var size = imageData.width * imageData.height * 4; - for (var i = 0; i < size; i += 4) { - var pa = p[i + 3]; - if (pa != 0 && pa != 255) { - var a = pa / 255; - var ra = 1 / a; - var invA = 255 * (1 - ra); - p[i + 0] = p[i + 0] * ra + invA; - p[i + 1] = p[i + 1] * ra + invA; - p[i + 2] = p[i + 2] * ra + invA; - } - } - } - if (options.useImageData) { - psd.imageData = imageData; - } - else { - psd.canvas = (0, helpers_1.createCanvas)(psd.width, psd.height); - psd.canvas.getContext('2d').putImageData(imageData, 0, 0); - } -} -function cmykToRgb(cmyk, rgb, reverseAlpha) { - var size = rgb.width * rgb.height * 4; - var srcData = cmyk.data; - var dstData = rgb.data; - for (var src = 0, dst = 0; dst < size; src += 5, dst += 4) { - var c = srcData[src]; - var m = srcData[src + 1]; - var y = srcData[src + 2]; - var k = srcData[src + 3]; - dstData[dst] = ((((c * k) | 0) / 255) | 0); - dstData[dst + 1] = ((((m * k) | 0) / 255) | 0); - dstData[dst + 2] = ((((y * k) | 0) / 255) | 0); - dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; - } - // for (let src = 0, dst = 0; dst < size; src += 5, dst += 4) { - // const c = 1 - (srcData[src + 0] / 255); - // const m = 1 - (srcData[src + 1] / 255); - // const y = 1 - (srcData[src + 2] / 255); - // // const k = srcData[src + 3] / 255; - // dstData[dst + 0] = ((1 - c * 0.8) * 255) | 0; - // dstData[dst + 1] = ((1 - m * 0.8) * 255) | 0; - // dstData[dst + 2] = ((1 - y * 0.8) * 255) | 0; - // dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; - // } -} -function readDataRaw(reader, pixelData, width, height, step, offset) { - var size = width * height; - var buffer = readBytes(reader, size); - if (pixelData && offset < step) { - var data = pixelData.data; - for (var i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { - data[p] = buffer[i]; - } - } -} -function readDataZipWithoutPrediction(reader, length, pixelData, width, height, step, offset) { - var compressed = readBytes(reader, length); - var decompressed = (0, pako_1.inflate)(compressed); - var size = width * height; - if (pixelData && offset < step) { - var data = pixelData.data; - for (var i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { - data[p] = decompressed[i]; - } - } -} -exports.readDataZipWithoutPrediction = readDataZipWithoutPrediction; -function readDataRLE(reader, pixelData, _width, height, step, offsets, large) { - var data = pixelData && pixelData.data; - var lengths; - if (large) { - lengths = new Uint32Array(offsets.length * height); - for (var o = 0, li = 0; o < offsets.length; o++) { - for (var y = 0; y < height; y++, li++) { - lengths[li] = readUint32(reader); - } - } - } - else { - lengths = new Uint16Array(offsets.length * height); - for (var o = 0, li = 0; o < offsets.length; o++) { - for (var y = 0; y < height; y++, li++) { - lengths[li] = readUint16(reader); - } - } - } - var extraLimit = (step - 1) | 0; // 3 for rgb, 4 for cmyk - for (var c = 0, li = 0; c < offsets.length; c++) { - var offset = offsets[c] | 0; - var extra = c > extraLimit || offset > extraLimit; - if (!data || extra) { - for (var y = 0; y < height; y++, li++) { - skipBytes(reader, lengths[li]); - } - } - else { - for (var y = 0, p = offset | 0; y < height; y++, li++) { - var length_1 = lengths[li]; - var buffer = readBytes(reader, length_1); - for (var i = 0; i < length_1; i++) { - var header = buffer[i]; - if (header > 128) { - var value = buffer[++i]; - header = (256 - header) | 0; - for (var j = 0; j <= header; j = (j + 1) | 0) { - data[p] = value; - p = (p + step) | 0; - } - } - else if (header < 128) { - for (var j = 0; j <= header; j = (j + 1) | 0) { - data[p] = buffer[++i]; - p = (p + step) | 0; - } - } - else { - // ignore 128 - } - // This showed up on some images from non-photoshop programs, ignoring it seems to work just fine. - // if (i >= length) throw new Error(`Invalid RLE data: exceeded buffer size ${i}/${length}`); - } - } - } - } -} -exports.readDataRLE = readDataRLE; -function readSection(reader, round, func, skipEmpty, eightBytes) { - if (skipEmpty === void 0) { skipEmpty = true; } - if (eightBytes === void 0) { eightBytes = false; } - var length = readUint32(reader); - if (eightBytes) { - if (length !== 0) - throw new Error('Sizes larger than 4GB are not supported'); - length = readUint32(reader); - } - if (length <= 0 && skipEmpty) - return undefined; - var end = reader.offset + length; - if (end > reader.view.byteLength) - throw new Error('Section exceeds file size'); - var result = func(function () { return end - reader.offset; }); - if (reader.offset !== end) { - if (reader.offset > end) { - warnOrThrow(reader, 'Exceeded section limits'); - } - else { - warnOrThrow(reader, "Unread section data"); // : ${end - reader.offset} bytes at 0x${reader.offset.toString(16)}`); - } - } - while (end % round) - end++; - reader.offset = end; - return result; -} -exports.readSection = readSection; -function readColor(reader) { - var colorSpace = readUint16(reader); - switch (colorSpace) { - case 0 /* ColorSpace.RGB */: { - var r = readUint16(reader) / 257; - var g = readUint16(reader) / 257; - var b = readUint16(reader) / 257; - skipBytes(reader, 2); - return { r: r, g: g, b: b }; - } - case 1 /* ColorSpace.HSB */: { - var h = readUint16(reader) / 0xffff; - var s = readUint16(reader) / 0xffff; - var b = readUint16(reader) / 0xffff; - skipBytes(reader, 2); - return { h: h, s: s, b: b }; - } - case 2 /* ColorSpace.CMYK */: { - var c = readUint16(reader) / 257; - var m = readUint16(reader) / 257; - var y = readUint16(reader) / 257; - var k = readUint16(reader) / 257; - return { c: c, m: m, y: y, k: k }; - } - case 7 /* ColorSpace.Lab */: { - var l = readInt16(reader) / 10000; - var ta = readInt16(reader); - var tb = readInt16(reader); - var a = ta < 0 ? (ta / 12800) : (ta / 12700); - var b = tb < 0 ? (tb / 12800) : (tb / 12700); - skipBytes(reader, 2); - return { l: l, a: a, b: b }; - } - case 8 /* ColorSpace.Grayscale */: { - var k = readUint16(reader) * 255 / 10000; - skipBytes(reader, 6); - return { k: k }; - } - default: - throw new Error('Invalid color space'); - } -} -exports.readColor = readColor; -function readPattern(reader) { - readUint32(reader); // length - var version = readUint32(reader); - if (version !== 1) - throw new Error("Invalid pattern version: ".concat(version)); - var colorMode = readUint32(reader); - var x = readInt16(reader); - var y = readInt16(reader); - // we only support RGB and grayscale for now - if (colorMode !== 3 /* ColorMode.RGB */ && colorMode !== 1 /* ColorMode.Grayscale */ && colorMode !== 2 /* ColorMode.Indexed */) { - throw new Error("Unsupported pattern color mode: ".concat(colorMode)); - } - var name = readUnicodeString(reader); - var id = readPascalString(reader, 1); - var palette = []; - if (colorMode === 2 /* ColorMode.Indexed */) { - for (var i = 0; i < 256; i++) { - palette.push({ - r: readUint8(reader), - g: readUint8(reader), - b: readUint8(reader), - }); - } - skipBytes(reader, 4); // no idea what this is - } - // virtual memory array list - var version2 = readUint32(reader); - if (version2 !== 3) - throw new Error("Invalid pattern VMAL version: ".concat(version2)); - readUint32(reader); // length - var top = readUint32(reader); - var left = readUint32(reader); - var bottom = readUint32(reader); - var right = readUint32(reader); - var channelsCount = readUint32(reader); - var width = right - left; - var height = bottom - top; - var data = new Uint8Array(width * height * 4); - for (var i = 3; i < data.byteLength; i += 4) { - data[i] = 255; - } - for (var i = 0, ch = 0; i < (channelsCount + 2); i++) { - var has = readUint32(reader); - if (!has) - continue; - var length_2 = readUint32(reader); - var pixelDepth = readUint32(reader); - var ctop = readUint32(reader); - var cleft = readUint32(reader); - var cbottom = readUint32(reader); - var cright = readUint32(reader); - var pixelDepth2 = readUint16(reader); - var compressionMode = readUint8(reader); // 0 - raw, 1 - zip - var dataLength = length_2 - (4 + 16 + 2 + 1); - var cdata = readBytes(reader, dataLength); - if (pixelDepth !== 8 || pixelDepth2 !== 8) { - throw new Error('16bit pixel depth not supported for patterns'); - } - var w = cright - cleft; - var h = cbottom - ctop; - var ox = cleft - left; - var oy = ctop - top; - if (compressionMode === 0) { - if (colorMode === 3 /* ColorMode.RGB */ && ch < 3) { - for (var y_1 = 0; y_1 < h; y_1++) { - for (var x_1 = 0; x_1 < w; x_1++) { - var src = x_1 + y_1 * w; - var dst = (ox + x_1 + (y_1 + oy) * width) * 4; - data[dst + ch] = cdata[src]; - } - } - } - if (colorMode === 1 /* ColorMode.Grayscale */ && ch < 1) { - for (var y_2 = 0; y_2 < h; y_2++) { - for (var x_2 = 0; x_2 < w; x_2++) { - var src = x_2 + y_2 * w; - var dst = (ox + x_2 + (y_2 + oy) * width) * 4; - var value = cdata[src]; - data[dst + 0] = value; - data[dst + 1] = value; - data[dst + 2] = value; - } - } - } - if (colorMode === 2 /* ColorMode.Indexed */) { - // TODO: - throw new Error('Indexed pattern color mode not implemented'); - } - } - else if (compressionMode === 1) { - // console.log({ colorMode }); - // require('fs').writeFileSync('zip.bin', Buffer.from(cdata)); - // const data = require('zlib').inflateRawSync(cdata); - // const data = require('zlib').unzipSync(cdata); - // console.log(data); - // throw new Error('Zip compression not supported for pattern'); - // throw new Error('Unsupported pattern compression'); - console.error('Unsupported pattern compression'); - name += ' (failed to decode)'; - } - else { - throw new Error('Invalid pattern compression mode'); - } - ch++; - } - // TODO: use canvas instead of data ? - return { id: id, name: name, x: x, y: y, bounds: { x: left, y: top, w: width, h: height }, data: data }; -} -exports.readPattern = readPattern; +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readPattern = exports.readColor = exports.readSection = exports.readDataRLE = exports.readDataZipWithoutPrediction = exports.readPsd = exports.checkSignature = exports.skipBytes = exports.readAsciiString = exports.readUnicodeStringWithLength = exports.readUnicodeString = exports.readPascalString = exports.readSignature = exports.readBytes = exports.readFixedPointPath32 = exports.readFixedPoint32 = exports.readFloat64 = exports.readFloat32 = exports.readUint32 = exports.readInt32LE = exports.readInt32 = exports.readUint16 = exports.readInt16 = exports.peekUint8 = exports.readUint8 = exports.warnOrThrow = exports.createReader = exports.supportedColorModes = void 0; +var pako_1 = require("pako"); +var helpers_1 = require("./helpers"); +var additionalInfo_1 = require("./additionalInfo"); +var imageResources_1 = require("./imageResources"); +exports.supportedColorModes = [0 /* ColorMode.Bitmap */, 1 /* ColorMode.Grayscale */, 3 /* ColorMode.RGB */]; +var colorModes = ['bitmap', 'grayscale', 'indexed', 'RGB', 'CMYK', 'multichannel', 'duotone', 'lab']; +function setupGrayscale(data) { + var size = data.width * data.height * 4; + for (var i = 0; i < size; i += 4) { + data.data[i + 1] = data.data[i]; + data.data[i + 2] = data.data[i]; + } +} +function createReader(buffer, offset, length) { + var view = new DataView(buffer, offset, length); + return { view: view, offset: 0, strict: false, debug: false }; +} +exports.createReader = createReader; +function warnOrThrow(reader, message) { + if (reader.strict) + throw new Error(message); + if (reader.debug) + console.warn(message); +} +exports.warnOrThrow = warnOrThrow; +function readUint8(reader) { + reader.offset += 1; + return reader.view.getUint8(reader.offset - 1); +} +exports.readUint8 = readUint8; +function peekUint8(reader) { + return reader.view.getUint8(reader.offset); +} +exports.peekUint8 = peekUint8; +function readInt16(reader) { + reader.offset += 2; + return reader.view.getInt16(reader.offset - 2, false); +} +exports.readInt16 = readInt16; +function readUint16(reader) { + reader.offset += 2; + return reader.view.getUint16(reader.offset - 2, false); +} +exports.readUint16 = readUint16; +function readInt32(reader) { + reader.offset += 4; + return reader.view.getInt32(reader.offset - 4, false); +} +exports.readInt32 = readInt32; +function readInt32LE(reader) { + reader.offset += 4; + return reader.view.getInt32(reader.offset - 4, true); +} +exports.readInt32LE = readInt32LE; +function readUint32(reader) { + reader.offset += 4; + return reader.view.getUint32(reader.offset - 4, false); +} +exports.readUint32 = readUint32; +function readFloat32(reader) { + reader.offset += 4; + return reader.view.getFloat32(reader.offset - 4, false); +} +exports.readFloat32 = readFloat32; +function readFloat64(reader) { + reader.offset += 8; + return reader.view.getFloat64(reader.offset - 8, false); +} +exports.readFloat64 = readFloat64; +// 32-bit fixed-point number 16.16 +function readFixedPoint32(reader) { + return readInt32(reader) / (1 << 16); +} +exports.readFixedPoint32 = readFixedPoint32; +// 32-bit fixed-point number 8.24 +function readFixedPointPath32(reader) { + return readInt32(reader) / (1 << 24); +} +exports.readFixedPointPath32 = readFixedPointPath32; +function readBytes(reader, length) { + var start = reader.view.byteOffset + reader.offset; + reader.offset += length; + if ((start + length) > reader.view.buffer.byteLength) { + // fix for broken PSD files that are missing part of file at the end + warnOrThrow(reader, 'Reading bytes exceeding buffer length'); + if (length > (100 * 1024 * 1024)) + throw new Error('Reading past end of file'); // limit to 100MB + var result = new Uint8Array(length); + var len = Math.min(length, reader.view.byteLength - start); + if (len > 0) + result.set(new Uint8Array(reader.view.buffer, start, len)); + return result; + } + else { + return new Uint8Array(reader.view.buffer, start, length); + } +} +exports.readBytes = readBytes; +function readSignature(reader) { + return readShortString(reader, 4); +} +exports.readSignature = readSignature; +function readPascalString(reader, padTo) { + var length = readUint8(reader); + var text = length ? readShortString(reader, length) : ''; + while (++length % padTo) { + reader.offset++; + } + return text; +} +exports.readPascalString = readPascalString; +function readUnicodeString(reader) { + var length = readUint32(reader); + return readUnicodeStringWithLength(reader, length); +} +exports.readUnicodeString = readUnicodeString; +function readUnicodeStringWithLength(reader, length) { + var text = ''; + while (length--) { + var value = readUint16(reader); + if (value || length > 0) { // remove trailing \0 + text += String.fromCharCode(value); + } + } + return text; +} +exports.readUnicodeStringWithLength = readUnicodeStringWithLength; +function readAsciiString(reader, length) { + var text = ''; + while (length--) { + text += String.fromCharCode(readUint8(reader)); + } + return text; +} +exports.readAsciiString = readAsciiString; +function skipBytes(reader, count) { + reader.offset += count; +} +exports.skipBytes = skipBytes; +function checkSignature(reader, a, b) { + var offset = reader.offset; + var signature = readSignature(reader); + if (signature !== a && signature !== b) { + throw new Error("Invalid signature: '".concat(signature, "' at 0x").concat(offset.toString(16))); + } +} +exports.checkSignature = checkSignature; +function readShortString(reader, length) { + var buffer = readBytes(reader, length); + var result = ''; + for (var i = 0; i < buffer.length; i++) { + result += String.fromCharCode(buffer[i]); + } + return result; +} +function isValidSignature(sig) { + return sig === '8BIM' || sig === 'MeSa' || sig === 'AgHg' || sig === 'PHUT' || sig === 'DCSR'; +} +function readPsd(reader, options) { + var _a; + if (options === void 0) { options = {}; } + // header + checkSignature(reader, '8BPS'); + var version = readUint16(reader); + if (version !== 1 && version !== 2) + throw new Error("Invalid PSD file version: ".concat(version)); + skipBytes(reader, 6); + var channels = readUint16(reader); + var height = readUint32(reader); + var width = readUint32(reader); + var bitsPerChannel = readUint16(reader); + var colorMode = readUint16(reader); + var maxSize = version === 1 ? 30000 : 300000; + if (width > maxSize || height > maxSize) + throw new Error("Invalid size"); + if (channels > 16) + throw new Error("Invalid channel count"); + if (bitsPerChannel > 32) + throw new Error("Invalid bitsPerChannel count"); + if (exports.supportedColorModes.indexOf(colorMode) === -1) + throw new Error("Color mode not supported: ".concat((_a = colorModes[colorMode]) !== null && _a !== void 0 ? _a : colorMode)); + var psd = { width: width, height: height, channels: channels, bitsPerChannel: bitsPerChannel, colorMode: colorMode }; + var opt = __assign(__assign({}, options), { large: version === 2 }); + var fixOffsets = [0, 1, -1, 2, -2, 3, -3, 4, -4]; + // color mode data + readSection(reader, 1, function (left) { + if (opt.throwForMissingFeatures) + throw new Error('Color mode data not supported'); + skipBytes(reader, left()); + }); + // image resources + readSection(reader, 1, function (left) { + var _loop_1 = function () { + var sigOffset = reader.offset; + var sig = ''; + // attempt to fix broken document by realigning with the signature + for (var _i = 0, fixOffsets_1 = fixOffsets; _i < fixOffsets_1.length; _i++) { + var offset = fixOffsets_1[_i]; + try { + reader.offset = sigOffset + offset; + sig = readSignature(reader); + } + catch (_a) { } + if (isValidSignature(sig)) + break; + } + if (!isValidSignature(sig)) { + throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((sigOffset).toString(16))); + } + var id = readUint16(reader); + readPascalString(reader, 2); // name + readSection(reader, 2, function (left) { + var handler = imageResources_1.resourceHandlersMap[id]; + var skip = id === 1036 && !!opt.skipThumbnail; + if (!psd.imageResources) { + psd.imageResources = {}; + } + if (handler && !skip) { + try { + handler.read(reader, psd.imageResources, left, opt); + } + catch (e) { + if (opt.throwForMissingFeatures) + throw e; + skipBytes(reader, left()); + } + } + else { + // options.logMissingFeatures && console.log(`Unhandled image resource: ${id}`); + skipBytes(reader, left()); + } + }); + }; + while (left()) { + _loop_1(); + } + }); + // layer and mask info + var globalAlpha = false; + readSection(reader, 1, function (left) { + globalAlpha = readLayerInfo(reader, psd, opt); + // SAI does not include this section + if (left() > 0) { + var globalLayerMaskInfo = readGlobalLayerMaskInfo(reader); + if (globalLayerMaskInfo) + psd.globalLayerMaskInfo = globalLayerMaskInfo; + } + else { + // revert back to end of section if exceeded section limits + // opt.logMissingFeatures && console.log('reverting to end of section'); + skipBytes(reader, left()); + } + while (left() > 0) { + // sometimes there are empty bytes here + while (left() && peekUint8(reader) === 0) { + // opt.logMissingFeatures && console.log('skipping 0 byte'); + skipBytes(reader, 1); + } + if (left() >= 12) { + readAdditionalLayerInfo(reader, psd, psd, opt); + } + else { + // opt.logMissingFeatures && console.log('skipping leftover bytes', left()); + skipBytes(reader, left()); + } + } + }, undefined, opt.large); + var hasChildren = psd.children && psd.children.length; + var skipComposite = opt.skipCompositeImageData && (opt.skipLayerImageData || hasChildren); + if (!skipComposite) { + readImageData(reader, psd, globalAlpha, opt); + } + // TODO: show converted color mode instead of original PSD file color mode + // but add option to preserve file color mode (need to return image data instead of canvas in that case) + // psd.colorMode = ColorMode.RGB; // we convert all color modes to RGB + return psd; +} +exports.readPsd = readPsd; +function readLayerInfo(reader, psd, options) { + var globalAlpha = false; + readSection(reader, 2, function (left) { + var layerCount = readInt16(reader); + if (layerCount < 0) { + globalAlpha = true; + layerCount = -layerCount; + } + var layers = []; + var layerChannels = []; + for (var i = 0; i < layerCount; i++) { + var _a = readLayerRecord(reader, psd, options), layer = _a.layer, channels = _a.channels; + layers.push(layer); + layerChannels.push(channels); + } + if (!options.skipLayerImageData) { + for (var i = 0; i < layerCount; i++) { + readLayerChannelImageData(reader, psd, layers[i], layerChannels[i], options); + } + } + skipBytes(reader, left()); + if (!psd.children) + psd.children = []; + var stack = [psd]; + for (var i = layers.length - 1; i >= 0; i--) { + var l = layers[i]; + var type = l.sectionDivider ? l.sectionDivider.type : 0 /* SectionDividerType.Other */; + if (type === 1 /* SectionDividerType.OpenFolder */ || type === 2 /* SectionDividerType.ClosedFolder */) { + l.opened = type === 1 /* SectionDividerType.OpenFolder */; + l.children = []; + stack[stack.length - 1].children.unshift(l); + stack.push(l); + } + else if (type === 3 /* SectionDividerType.BoundingSectionDivider */) { + stack.pop(); + // this was workaround because I didn't know what `lsdk` section was, now it's probably not needed anymore + // } else if (l.name === '' && !l.sectionDivider && !l.top && !l.left && !l.bottom && !l.right) { + // // sometimes layer group terminator doesn't have sectionDivider, so we just guess here (PS bug ?) + // stack.pop(); + } + else { + stack[stack.length - 1].children.unshift(l); + } + } + }, undefined, options.large); + return globalAlpha; +} +function readLayerRecord(reader, psd, options) { + var layer = {}; + layer.top = readInt32(reader); + layer.left = readInt32(reader); + layer.bottom = readInt32(reader); + layer.right = readInt32(reader); + var channelCount = readUint16(reader); + var channels = []; + for (var i = 0; i < channelCount; i++) { + var channelID = readInt16(reader); + var channelLength = readUint32(reader); + if (options.large) { + if (channelLength !== 0) + throw new Error('Sizes larger than 4GB are not supported'); + channelLength = readUint32(reader); + } + channels.push({ id: channelID, length: channelLength }); + } + checkSignature(reader, '8BIM'); + var blendMode = readSignature(reader); + if (!helpers_1.toBlendMode[blendMode]) + throw new Error("Invalid blend mode: '".concat(blendMode, "'")); + layer.blendMode = helpers_1.toBlendMode[blendMode]; + layer.opacity = readUint8(reader) / 0xff; + layer.clipping = readUint8(reader) === 1; + var flags = readUint8(reader); + layer.transparencyProtected = (flags & 0x01) !== 0; + layer.hidden = (flags & 0x02) !== 0; + // 0x04 - obsolete + // 0x08 - 1 for Photoshop 5.0 and later, tells if bit 4 has useful information + // 0x10 - pixel data irrelevant to appearance of document + // 0x20 - ??? + // if (flags & 0x20) (layer as any)._2 = true; // TEMP !!!! + skipBytes(reader, 1); + readSection(reader, 1, function (left) { + var mask = readLayerMaskData(reader, options); + if (mask) + layer.mask = mask; + /*const blendingRanges =*/ readLayerBlendingRanges(reader); + layer.name = readPascalString(reader, 4); + while (left()) { + readAdditionalLayerInfo(reader, layer, psd, options); + } + }); + return { layer: layer, channels: channels }; +} +function readLayerMaskData(reader, options) { + return readSection(reader, 1, function (left) { + if (!left()) + return undefined; + var mask = {}; + mask.top = readInt32(reader); + mask.left = readInt32(reader); + mask.bottom = readInt32(reader); + mask.right = readInt32(reader); + mask.defaultColor = readUint8(reader); + var flags = readUint8(reader); + mask.positionRelativeToLayer = (flags & 1 /* LayerMaskFlags.PositionRelativeToLayer */) !== 0; + mask.disabled = (flags & 2 /* LayerMaskFlags.LayerMaskDisabled */) !== 0; + mask.fromVectorData = (flags & 8 /* LayerMaskFlags.LayerMaskFromRenderingOtherData */) !== 0; + if (flags & 16 /* LayerMaskFlags.MaskHasParametersAppliedToIt */) { + var params = readUint8(reader); + if (params & 1 /* MaskParams.UserMaskDensity */) + mask.userMaskDensity = readUint8(reader) / 0xff; + if (params & 2 /* MaskParams.UserMaskFeather */) + mask.userMaskFeather = readFloat64(reader); + if (params & 4 /* MaskParams.VectorMaskDensity */) + mask.vectorMaskDensity = readUint8(reader) / 0xff; + if (params & 8 /* MaskParams.VectorMaskFeather */) + mask.vectorMaskFeather = readFloat64(reader); + } + if (left() > 2) { + options.logMissingFeatures && console.log('Unhandled extra mask params'); + // TODO: handle these values + /*const realFlags =*/ readUint8(reader); + /*const realUserMaskBackground =*/ readUint8(reader); + /*const top2 =*/ readInt32(reader); + /*const left2 =*/ readInt32(reader); + /*const bottom2 =*/ readInt32(reader); + /*const right2 =*/ readInt32(reader); + } + skipBytes(reader, left()); + return mask; + }); +} +function readLayerBlendingRanges(reader) { + return readSection(reader, 1, function (left) { + var compositeGrayBlendSource = readUint32(reader); + var compositeGraphBlendDestinationRange = readUint32(reader); + var ranges = []; + while (left()) { + var sourceRange = readUint32(reader); + var destRange = readUint32(reader); + ranges.push({ sourceRange: sourceRange, destRange: destRange }); + } + return { compositeGrayBlendSource: compositeGrayBlendSource, compositeGraphBlendDestinationRange: compositeGraphBlendDestinationRange, ranges: ranges }; + }); +} +function readLayerChannelImageData(reader, psd, layer, channels, options) { + var layerWidth = (layer.right || 0) - (layer.left || 0); + var layerHeight = (layer.bottom || 0) - (layer.top || 0); + var cmyk = psd.colorMode === 4 /* ColorMode.CMYK */; + var imageData; + if (layerWidth && layerHeight) { + if (cmyk) { + imageData = { width: layerWidth, height: layerHeight, data: new Uint8ClampedArray(layerWidth * layerHeight * 5) }; + for (var p = 4; p < imageData.data.byteLength; p += 5) + imageData.data[p] = 255; + } + else { + imageData = (0, helpers_1.createImageData)(layerWidth, layerHeight); + (0, helpers_1.resetImageData)(imageData); + } + } + if (helpers_1.RAW_IMAGE_DATA) + layer.imageDataRaw = []; + for (var _i = 0, channels_1 = channels; _i < channels_1.length; _i++) { + var channel = channels_1[_i]; + if (channel.length === 0) + continue; + if (channel.length < 2) + throw new Error('Invalid channel length'); + var start = reader.offset; + var compression = readUint16(reader); + if (channel.id === -2 /* ChannelID.UserMask */) { + var mask = layer.mask; + if (!mask) + throw new Error("Missing layer mask data"); + var maskWidth = (mask.right || 0) - (mask.left || 0); + var maskHeight = (mask.bottom || 0) - (mask.top || 0); + if (maskWidth && maskHeight) { + var maskData = (0, helpers_1.createImageData)(maskWidth, maskHeight); + (0, helpers_1.resetImageData)(maskData); + var start_1 = reader.offset; + readData(reader, channel.length, maskData, compression, maskWidth, maskHeight, 0, options.large, 4); + if (helpers_1.RAW_IMAGE_DATA) { + layer.maskDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start_1, reader.offset - start_1); + } + setupGrayscale(maskData); + if (options.useImageData) { + mask.imageData = maskData; + } + else { + mask.canvas = (0, helpers_1.createCanvas)(maskWidth, maskHeight); + mask.canvas.getContext('2d').putImageData(maskData, 0, 0); + } + } + } + else { + var offset = (0, helpers_1.offsetForChannel)(channel.id, cmyk); + var targetData = imageData; + if (offset < 0) { + targetData = undefined; + if (options.throwForMissingFeatures) { + throw new Error("Channel not supported: ".concat(channel.id)); + } + } + readData(reader, channel.length, targetData, compression, layerWidth, layerHeight, offset, options.large, cmyk ? 5 : 4); + if (helpers_1.RAW_IMAGE_DATA) { + layer.imageDataRaw[channel.id] = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start + 2, channel.length - 2); + } + reader.offset = start + channel.length; + if (targetData && psd.colorMode === 1 /* ColorMode.Grayscale */) { + setupGrayscale(targetData); + } + } + } + if (imageData) { + if (cmyk) { + var cmykData = imageData; + imageData = (0, helpers_1.createImageData)(cmykData.width, cmykData.height); + cmykToRgb(cmykData, imageData, false); + } + if (options.useImageData) { + layer.imageData = imageData; + } + else { + layer.canvas = (0, helpers_1.createCanvas)(layerWidth, layerHeight); + layer.canvas.getContext('2d').putImageData(imageData, 0, 0); + } + } +} +function readData(reader, length, data, compression, width, height, offset, large, step) { + if (compression === 0 /* Compression.RawData */) { + readDataRaw(reader, data, width, height, step, offset); + } + else if (compression === 1 /* Compression.RleCompressed */) { + readDataRLE(reader, data, width, height, step, [offset], large); + } + else if (compression === 2 /* Compression.ZipWithoutPrediction */) { + readDataZipWithoutPrediction(reader, length, data, width, height, step, offset); + } + else if (compression === 3 /* Compression.ZipWithPrediction */) { + throw new Error("Compression type not supported: ".concat(compression)); + } + else { + throw new Error("Invalid Compression type: ".concat(compression)); + } +} +function readGlobalLayerMaskInfo(reader) { + return readSection(reader, 1, function (left) { + if (!left()) + return undefined; + var overlayColorSpace = readUint16(reader); + var colorSpace1 = readUint16(reader); + var colorSpace2 = readUint16(reader); + var colorSpace3 = readUint16(reader); + var colorSpace4 = readUint16(reader); + var opacity = readUint16(reader) / 0xff; + var kind = readUint8(reader); + skipBytes(reader, left()); // 3 bytes of padding ? + return { overlayColorSpace: overlayColorSpace, colorSpace1: colorSpace1, colorSpace2: colorSpace2, colorSpace3: colorSpace3, colorSpace4: colorSpace4, opacity: opacity, kind: kind }; + }); +} +function readAdditionalLayerInfo(reader, target, psd, options) { + var sig = readSignature(reader); + if (sig !== '8BIM' && sig !== '8B64') + throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((reader.offset - 4).toString(16))); + var key = readSignature(reader); + // `largeAdditionalInfoKeys` fallback, because some keys don't have 8B64 signature even when they are 64bit + var u64 = sig === '8B64' || (options.large && helpers_1.largeAdditionalInfoKeys.indexOf(key) !== -1); + readSection(reader, 2, function (left) { + var handler = additionalInfo_1.infoHandlersMap[key]; + if (handler) { + try { + handler.read(reader, target, left, psd, options); + } + catch (e) { + if (options.throwForMissingFeatures) + throw e; + } + } + else { + options.logMissingFeatures && console.log("Unhandled additional info: ".concat(key)); + skipBytes(reader, left()); + } + if (left()) { + options.logMissingFeatures && console.log("Unread ".concat(left(), " bytes left for additional info: ").concat(key)); + skipBytes(reader, left()); + } + }, false, u64); +} +function readImageData(reader, psd, globalAlpha, options) { + var compression = readUint16(reader); + if (exports.supportedColorModes.indexOf(psd.colorMode) === -1) + throw new Error("Color mode not supported: ".concat(psd.colorMode)); + if (compression !== 0 /* Compression.RawData */ && compression !== 1 /* Compression.RleCompressed */) + throw new Error("Compression type not supported: ".concat(compression)); + var imageData = (0, helpers_1.createImageData)(psd.width, psd.height); + (0, helpers_1.resetImageData)(imageData); + switch (psd.colorMode) { + case 0 /* ColorMode.Bitmap */: { + var bytes = void 0; + if (compression === 0 /* Compression.RawData */) { + bytes = readBytes(reader, Math.ceil(psd.width / 8) * psd.height); + } + else if (compression === 1 /* Compression.RleCompressed */) { + bytes = new Uint8Array(psd.width * psd.height); + readDataRLE(reader, { data: bytes, width: psd.width, height: psd.height }, psd.width, psd.height, 1, [0], options.large); + } + else { + throw new Error("Bitmap compression not supported: ".concat(compression)); + } + (0, helpers_1.decodeBitmap)(bytes, imageData.data, psd.width, psd.height); + break; + } + case 3 /* ColorMode.RGB */: + case 1 /* ColorMode.Grayscale */: { + var channels = psd.colorMode === 1 /* ColorMode.Grayscale */ ? [0] : [0, 1, 2]; + if (psd.channels && psd.channels > 3) { + for (var i = 3; i < psd.channels; i++) { + // TODO: store these channels in additional image data + channels.push(i); + } + } + else if (globalAlpha) { + channels.push(3); + } + if (compression === 0 /* Compression.RawData */) { + for (var i = 0; i < channels.length; i++) { + readDataRaw(reader, imageData, psd.width, psd.height, 4, channels[i]); + } + } + else if (compression === 1 /* Compression.RleCompressed */) { + var start = reader.offset; + readDataRLE(reader, imageData, psd.width, psd.height, 4, channels, options.large); + if (helpers_1.RAW_IMAGE_DATA) + psd.imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); + } + if (psd.colorMode === 1 /* ColorMode.Grayscale */) { + setupGrayscale(imageData); + } + break; + } + case 4 /* ColorMode.CMYK */: { + if (psd.channels !== 4) + throw new Error("Invalid channel count"); + var channels = [0, 1, 2, 3]; + if (globalAlpha) + channels.push(4); + if (compression === 0 /* Compression.RawData */) { + throw new Error("Not implemented"); + // TODO: ... + // for (let i = 0; i < channels.length; i++) { + // readDataRaw(reader, imageData, channels[i], psd.width, psd.height); + // } + } + else if (compression === 1 /* Compression.RleCompressed */) { + var cmykImageData = { + width: imageData.width, + height: imageData.height, + data: new Uint8Array(imageData.width * imageData.height * 5), + }; + var start = reader.offset; + readDataRLE(reader, cmykImageData, psd.width, psd.height, 5, channels, options.large); + cmykToRgb(cmykImageData, imageData, true); + if (helpers_1.RAW_IMAGE_DATA) + psd.imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); + } + break; + } + default: throw new Error("Color mode not supported: ".concat(psd.colorMode)); + } + if (options.useImageData) { + psd.imageData = imageData; + } + else { + psd.canvas = (0, helpers_1.createCanvas)(psd.width, psd.height); + psd.canvas.getContext('2d').putImageData(imageData, 0, 0); + } +} +function cmykToRgb(cmyk, rgb, reverseAlpha) { + var size = rgb.width * rgb.height * 4; + var srcData = cmyk.data; + var dstData = rgb.data; + for (var src = 0, dst = 0; dst < size; src += 5, dst += 4) { + var c = srcData[src]; + var m = srcData[src + 1]; + var y = srcData[src + 2]; + var k = srcData[src + 3]; + dstData[dst] = ((((c * k) | 0) / 255) | 0); + dstData[dst + 1] = ((((m * k) | 0) / 255) | 0); + dstData[dst + 2] = ((((y * k) | 0) / 255) | 0); + dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; + } + // for (let src = 0, dst = 0; dst < size; src += 5, dst += 4) { + // const c = 1 - (srcData[src + 0] / 255); + // const m = 1 - (srcData[src + 1] / 255); + // const y = 1 - (srcData[src + 2] / 255); + // // const k = srcData[src + 3] / 255; + // dstData[dst + 0] = ((1 - c * 0.8) * 255) | 0; + // dstData[dst + 1] = ((1 - m * 0.8) * 255) | 0; + // dstData[dst + 2] = ((1 - y * 0.8) * 255) | 0; + // dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; + // } +} +function readDataRaw(reader, pixelData, width, height, step, offset) { + var size = width * height; + var buffer = readBytes(reader, size); + if (pixelData && offset < step) { + var data = pixelData.data; + for (var i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { + data[p] = buffer[i]; + } + } +} +function readDataZipWithoutPrediction(reader, length, pixelData, width, height, step, offset) { + var compressed = readBytes(reader, length); + var decompressed = (0, pako_1.inflate)(compressed); + var size = width * height; + if (pixelData && offset < step) { + var data = pixelData.data; + for (var i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { + data[p] = decompressed[i]; + } + } +} +exports.readDataZipWithoutPrediction = readDataZipWithoutPrediction; +function readDataRLE(reader, pixelData, _width, height, step, offsets, large) { + var data = pixelData && pixelData.data; + var lengths; + if (large) { + lengths = new Uint32Array(offsets.length * height); + for (var o = 0, li = 0; o < offsets.length; o++) { + for (var y = 0; y < height; y++, li++) { + lengths[li] = readUint32(reader); + } + } + } + else { + lengths = new Uint16Array(offsets.length * height); + for (var o = 0, li = 0; o < offsets.length; o++) { + for (var y = 0; y < height; y++, li++) { + lengths[li] = readUint16(reader); + } + } + } + var extraLimit = (step - 1) | 0; // 3 for rgb, 4 for cmyk + for (var c = 0, li = 0; c < offsets.length; c++) { + var offset = offsets[c] | 0; + var extra = c > extraLimit || offset > extraLimit; + if (!data || extra) { + for (var y = 0; y < height; y++, li++) { + skipBytes(reader, lengths[li]); + } + } + else { + for (var y = 0, p = offset | 0; y < height; y++, li++) { + var length_1 = lengths[li]; + var buffer = readBytes(reader, length_1); + for (var i = 0; i < length_1; i++) { + var header = buffer[i]; + if (header > 128) { + var value = buffer[++i]; + header = (256 - header) | 0; + for (var j = 0; j <= header; j = (j + 1) | 0) { + data[p] = value; + p = (p + step) | 0; + } + } + else if (header < 128) { + for (var j = 0; j <= header; j = (j + 1) | 0) { + data[p] = buffer[++i]; + p = (p + step) | 0; + } + } + else { + // ignore 128 + } + // This showed up on some images from non-photoshop programs, ignoring it seems to work just fine. + // if (i >= length) throw new Error(`Invalid RLE data: exceeded buffer size ${i}/${length}`); + } + } + } + } +} +exports.readDataRLE = readDataRLE; +function readSection(reader, round, func, skipEmpty, eightBytes) { + if (skipEmpty === void 0) { skipEmpty = true; } + if (eightBytes === void 0) { eightBytes = false; } + var length = readUint32(reader); + if (eightBytes) { + if (length !== 0) + throw new Error('Sizes larger than 4GB are not supported'); + length = readUint32(reader); + } + if (length <= 0 && skipEmpty) + return undefined; + var end = reader.offset + length; + if (end > reader.view.byteLength) + throw new Error('Section exceeds file size'); + var result = func(function () { return end - reader.offset; }); + if (reader.offset !== end) { + if (reader.offset > end) { + warnOrThrow(reader, 'Exceeded section limits'); + } + else { + warnOrThrow(reader, "Unread section data"); // : ${end - reader.offset} bytes at 0x${reader.offset.toString(16)}`); + } + } + while (end % round) + end++; + reader.offset = end; + return result; +} +exports.readSection = readSection; +function readColor(reader) { + var colorSpace = readUint16(reader); + switch (colorSpace) { + case 0 /* ColorSpace.RGB */: { + var r = readUint16(reader) / 257; + var g = readUint16(reader) / 257; + var b = readUint16(reader) / 257; + skipBytes(reader, 2); + return { r: r, g: g, b: b }; + } + case 1 /* ColorSpace.HSB */: { + var h = readUint16(reader) / 0xffff; + var s = readUint16(reader) / 0xffff; + var b = readUint16(reader) / 0xffff; + skipBytes(reader, 2); + return { h: h, s: s, b: b }; + } + case 2 /* ColorSpace.CMYK */: { + var c = readUint16(reader) / 257; + var m = readUint16(reader) / 257; + var y = readUint16(reader) / 257; + var k = readUint16(reader) / 257; + return { c: c, m: m, y: y, k: k }; + } + case 7 /* ColorSpace.Lab */: { + var l = readInt16(reader) / 10000; + var ta = readInt16(reader); + var tb = readInt16(reader); + var a = ta < 0 ? (ta / 12800) : (ta / 12700); + var b = tb < 0 ? (tb / 12800) : (tb / 12700); + skipBytes(reader, 2); + return { l: l, a: a, b: b }; + } + case 8 /* ColorSpace.Grayscale */: { + var k = readUint16(reader) * 255 / 10000; + skipBytes(reader, 6); + return { k: k }; + } + default: + throw new Error('Invalid color space'); + } +} +exports.readColor = readColor; +function readPattern(reader) { + readUint32(reader); // length + var version = readUint32(reader); + if (version !== 1) + throw new Error("Invalid pattern version: ".concat(version)); + var colorMode = readUint32(reader); + var x = readInt16(reader); + var y = readInt16(reader); + // we only support RGB and grayscale for now + if (colorMode !== 3 /* ColorMode.RGB */ && colorMode !== 1 /* ColorMode.Grayscale */ && colorMode !== 2 /* ColorMode.Indexed */) { + throw new Error("Unsupported pattern color mode: ".concat(colorMode)); + } + var name = readUnicodeString(reader); + var id = readPascalString(reader, 1); + var palette = []; + if (colorMode === 2 /* ColorMode.Indexed */) { + for (var i = 0; i < 256; i++) { + palette.push({ + r: readUint8(reader), + g: readUint8(reader), + b: readUint8(reader), + }); + } + skipBytes(reader, 4); // no idea what this is + } + // virtual memory array list + var version2 = readUint32(reader); + if (version2 !== 3) + throw new Error("Invalid pattern VMAL version: ".concat(version2)); + readUint32(reader); // length + var top = readUint32(reader); + var left = readUint32(reader); + var bottom = readUint32(reader); + var right = readUint32(reader); + var channelsCount = readUint32(reader); + var width = right - left; + var height = bottom - top; + var data = new Uint8Array(width * height * 4); + for (var i = 3; i < data.byteLength; i += 4) { + data[i] = 255; + } + for (var i = 0, ch = 0; i < (channelsCount + 2); i++) { + var has = readUint32(reader); + if (!has) + continue; + var length_2 = readUint32(reader); + var pixelDepth = readUint32(reader); + var ctop = readUint32(reader); + var cleft = readUint32(reader); + var cbottom = readUint32(reader); + var cright = readUint32(reader); + var pixelDepth2 = readUint16(reader); + var compressionMode = readUint8(reader); // 0 - raw, 1 - zip + var dataLength = length_2 - (4 + 16 + 2 + 1); + var cdata = readBytes(reader, dataLength); + if (pixelDepth !== 8 || pixelDepth2 !== 8) { + throw new Error('16bit pixel depth not supported for patterns'); + } + var w = cright - cleft; + var h = cbottom - ctop; + var ox = cleft - left; + var oy = ctop - top; + if (compressionMode === 0) { + if (colorMode === 3 /* ColorMode.RGB */ && ch < 3) { + for (var y_1 = 0; y_1 < h; y_1++) { + for (var x_1 = 0; x_1 < w; x_1++) { + var src = x_1 + y_1 * w; + var dst = (ox + x_1 + (y_1 + oy) * width) * 4; + data[dst + ch] = cdata[src]; + } + } + } + if (colorMode === 1 /* ColorMode.Grayscale */ && ch < 1) { + for (var y_2 = 0; y_2 < h; y_2++) { + for (var x_2 = 0; x_2 < w; x_2++) { + var src = x_2 + y_2 * w; + var dst = (ox + x_2 + (y_2 + oy) * width) * 4; + var value = cdata[src]; + data[dst + 0] = value; + data[dst + 1] = value; + data[dst + 2] = value; + } + } + } + if (colorMode === 2 /* ColorMode.Indexed */) { + // TODO: + throw new Error('Indexed pattern color mode not implemented'); + } + } + else if (compressionMode === 1) { + // console.log({ colorMode }); + // require('fs').writeFileSync('zip.bin', Buffer.from(cdata)); + // const data = require('zlib').inflateRawSync(cdata); + // const data = require('zlib').unzipSync(cdata); + // console.log(data); + // throw new Error('Zip compression not supported for pattern'); + // throw new Error('Unsupported pattern compression'); + console.error('Unsupported pattern compression'); + name += ' (failed to decode)'; + } + else { + throw new Error('Invalid pattern compression mode'); + } + ch++; + } + // TODO: use canvas instead of data ? + return { id: id, name: name, x: x, y: y, bounds: { x: left, y: top, w: width, h: height }, data: data }; +} +exports.readPattern = readPattern; + },{"./additionalInfo":2,"./helpers":7,"./imageResources":8,"pako":18}],12:[function(require,module,exports){ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.writeColor = exports.writePsd = exports.writeSection = exports.writeUnicodeStringWithPadding = exports.writeUnicodeString = exports.writePascalString = exports.writeSignature = exports.writeZeros = exports.writeBytes = exports.writeFixedPointPath32 = exports.writeFixedPoint32 = exports.writeFloat64 = exports.writeFloat32 = exports.writeUint32 = exports.writeInt32 = exports.writeUint16 = exports.writeInt16 = exports.writeUint8 = exports.getWriterBufferNoCopy = exports.getWriterBuffer = exports.createWriter = void 0; -var helpers_1 = require("./helpers"); -var additionalInfo_1 = require("./additionalInfo"); -var imageResources_1 = require("./imageResources"); -function createWriter(size) { - if (size === void 0) { size = 4096; } - var buffer = new ArrayBuffer(size); - var view = new DataView(buffer); - var offset = 0; - return { buffer: buffer, view: view, offset: offset }; -} -exports.createWriter = createWriter; -function getWriterBuffer(writer) { - return writer.buffer.slice(0, writer.offset); -} -exports.getWriterBuffer = getWriterBuffer; -function getWriterBufferNoCopy(writer) { - return new Uint8Array(writer.buffer, 0, writer.offset); -} -exports.getWriterBufferNoCopy = getWriterBufferNoCopy; -function writeUint8(writer, value) { - var offset = addSize(writer, 1); - writer.view.setUint8(offset, value); -} -exports.writeUint8 = writeUint8; -function writeInt16(writer, value) { - var offset = addSize(writer, 2); - writer.view.setInt16(offset, value, false); -} -exports.writeInt16 = writeInt16; -function writeUint16(writer, value) { - var offset = addSize(writer, 2); - writer.view.setUint16(offset, value, false); -} -exports.writeUint16 = writeUint16; -function writeInt32(writer, value) { - var offset = addSize(writer, 4); - writer.view.setInt32(offset, value, false); -} -exports.writeInt32 = writeInt32; -function writeUint32(writer, value) { - var offset = addSize(writer, 4); - writer.view.setUint32(offset, value, false); -} -exports.writeUint32 = writeUint32; -function writeFloat32(writer, value) { - var offset = addSize(writer, 4); - writer.view.setFloat32(offset, value, false); -} -exports.writeFloat32 = writeFloat32; -function writeFloat64(writer, value) { - var offset = addSize(writer, 8); - writer.view.setFloat64(offset, value, false); -} -exports.writeFloat64 = writeFloat64; -// 32-bit fixed-point number 16.16 -function writeFixedPoint32(writer, value) { - writeInt32(writer, value * (1 << 16)); -} -exports.writeFixedPoint32 = writeFixedPoint32; -// 32-bit fixed-point number 8.24 -function writeFixedPointPath32(writer, value) { - writeInt32(writer, value * (1 << 24)); -} -exports.writeFixedPointPath32 = writeFixedPointPath32; -function writeBytes(writer, buffer) { - if (buffer) { - ensureSize(writer, writer.offset + buffer.length); - var bytes = new Uint8Array(writer.buffer); - bytes.set(buffer, writer.offset); - writer.offset += buffer.length; - } -} -exports.writeBytes = writeBytes; -function writeZeros(writer, count) { - for (var i = 0; i < count; i++) { - writeUint8(writer, 0); - } -} -exports.writeZeros = writeZeros; -function writeSignature(writer, signature) { - if (signature.length !== 4) - throw new Error("Invalid signature: '".concat(signature, "'")); - for (var i = 0; i < 4; i++) { - writeUint8(writer, signature.charCodeAt(i)); - } -} -exports.writeSignature = writeSignature; -function writePascalString(writer, text, padTo) { - var length = text.length; - writeUint8(writer, length); - for (var i = 0; i < length; i++) { - var code = text.charCodeAt(i); - writeUint8(writer, code < 128 ? code : '?'.charCodeAt(0)); - } - while (++length % padTo) { - writeUint8(writer, 0); - } -} -exports.writePascalString = writePascalString; -function writeUnicodeString(writer, text) { - writeUint32(writer, text.length); - for (var i = 0; i < text.length; i++) { - writeUint16(writer, text.charCodeAt(i)); - } -} -exports.writeUnicodeString = writeUnicodeString; -function writeUnicodeStringWithPadding(writer, text) { - writeUint32(writer, text.length + 1); - for (var i = 0; i < text.length; i++) { - writeUint16(writer, text.charCodeAt(i)); - } - writeUint16(writer, 0); -} -exports.writeUnicodeStringWithPadding = writeUnicodeStringWithPadding; -function getLargestLayerSize(layers) { - if (layers === void 0) { layers = []; } - var max = 0; - for (var _i = 0, layers_1 = layers; _i < layers_1.length; _i++) { - var layer = layers_1[_i]; - if (layer.canvas || layer.imageData) { - var _a = getLayerDimentions(layer), width = _a.width, height = _a.height; - max = Math.max(max, 2 * height + 2 * width * height); - } - if (layer.children) { - max = Math.max(max, getLargestLayerSize(layer.children)); - } - } - return max; -} -function writeSection(writer, round, func, writeTotalLength, large) { - if (writeTotalLength === void 0) { writeTotalLength = false; } - if (large === void 0) { large = false; } - if (large) - writeUint32(writer, 0); - var offset = writer.offset; - writeUint32(writer, 0); - func(); - var length = writer.offset - offset - 4; - var len = length; - while ((len % round) !== 0) { - writeUint8(writer, 0); - len++; - } - if (writeTotalLength) { - length = len; - } - writer.view.setUint32(offset, length, false); -} -exports.writeSection = writeSection; -function writePsd(writer, psd, options) { - if (options === void 0) { options = {}; } - if (!(+psd.width > 0 && +psd.height > 0)) - throw new Error('Invalid document size'); - if ((psd.width > 30000 || psd.height > 30000) && !options.psb) - throw new Error('Document size is too large (max is 30000x30000, use PSB format instead)'); - var imageResources = psd.imageResources || {}; - var opt = __assign(__assign({}, options), { layerIds: new Set(), layerToId: new Map() }); - if (opt.generateThumbnail) { - imageResources = __assign(__assign({}, imageResources), { thumbnail: createThumbnail(psd) }); - } - var imageData = psd.imageData; - if (!imageData && psd.canvas) { - imageData = psd.canvas.getContext('2d').getImageData(0, 0, psd.canvas.width, psd.canvas.height); - } - if (imageData && (psd.width !== imageData.width || psd.height !== imageData.height)) - throw new Error('Document canvas must have the same size as document'); - var globalAlpha = !!imageData && (0, helpers_1.hasAlpha)(imageData); - var maxBufferSize = Math.max(getLargestLayerSize(psd.children), 4 * 2 * psd.width * psd.height + 2 * psd.height); - var tempBuffer = new Uint8Array(maxBufferSize); - // header - writeSignature(writer, '8BPS'); - writeUint16(writer, options.psb ? 2 : 1); // version - writeZeros(writer, 6); - writeUint16(writer, globalAlpha ? 4 : 3); // channels - writeUint32(writer, psd.height); - writeUint32(writer, psd.width); - writeUint16(writer, 8); // bits per channel - writeUint16(writer, 3 /* ColorMode.RGB */); // we only support saving RGB right now - // color mode data - writeSection(writer, 1, function () { - // TODO: implement - }); - // image resources - writeSection(writer, 1, function () { - var _loop_1 = function (handler) { - var has = handler.has(imageResources); - var count = has === false ? 0 : (has === true ? 1 : has); - var _loop_2 = function (i) { - writeSignature(writer, '8BIM'); - writeUint16(writer, handler.key); - writePascalString(writer, '', 2); - writeSection(writer, 2, function () { return handler.write(writer, imageResources, i); }); - }; - for (var i = 0; i < count; i++) { - _loop_2(i); - } - }; - for (var _i = 0, resourceHandlers_1 = imageResources_1.resourceHandlers; _i < resourceHandlers_1.length; _i++) { - var handler = resourceHandlers_1[_i]; - _loop_1(handler); - } - }); - // layer and mask info - writeSection(writer, 2, function () { - writeLayerInfo(tempBuffer, writer, psd, globalAlpha, opt); - writeGlobalLayerMaskInfo(writer, psd.globalLayerMaskInfo); - writeAdditionalLayerInfo(writer, psd, psd, opt); - }, undefined, !!opt.psb); - // image data - var channels = globalAlpha ? [0, 1, 2, 3] : [0, 1, 2]; - var width = imageData ? imageData.width : psd.width; - var height = imageData ? imageData.height : psd.height; - var data = { data: new Uint8Array(width * height * 4), width: width, height: height }; - writeUint16(writer, 1 /* Compression.RleCompressed */); // Photoshop doesn't support zip compression of composite image data - if (helpers_1.RAW_IMAGE_DATA && psd.imageDataRaw) { - console.log('writing raw image data'); - writeBytes(writer, psd.imageDataRaw); - } - else { - if (imageData) - data.data.set(new Uint8Array(imageData.data.buffer, imageData.data.byteOffset, imageData.data.byteLength)); - // add weird white matte - if (globalAlpha) { - var size = data.width * data.height * 4; - var p = data.data; - for (var i = 0; i < size; i += 4) { - var pa = p[i + 3]; - if (pa != 0 && pa != 255) { - var a = pa / 255; - var ra = 255 * (1 - a); - p[i + 0] = p[i + 0] * a + ra; - p[i + 1] = p[i + 1] * a + ra; - p[i + 2] = p[i + 2] * a + ra; - } - } - } - writeBytes(writer, (0, helpers_1.writeDataRLE)(tempBuffer, data, channels, !!options.psb)); - } -} -exports.writePsd = writePsd; -function writeLayerInfo(tempBuffer, writer, psd, globalAlpha, options) { - writeSection(writer, 4, function () { - var _a; - var layers = []; - addChildren(layers, psd.children); - if (!layers.length) - layers.push({}); - writeInt16(writer, globalAlpha ? -layers.length : layers.length); - var layersData = layers.map(function (l, i) { return getChannels(tempBuffer, l, i === 0, options); }); - var _loop_3 = function (layerData) { - var layer = layerData.layer, top_1 = layerData.top, left = layerData.left, bottom = layerData.bottom, right = layerData.right, channels = layerData.channels; - writeInt32(writer, top_1); - writeInt32(writer, left); - writeInt32(writer, bottom); - writeInt32(writer, right); - writeUint16(writer, channels.length); - for (var _e = 0, channels_1 = channels; _e < channels_1.length; _e++) { - var c = channels_1[_e]; - writeInt16(writer, c.channelId); - if (options.psb) - writeUint32(writer, 0); - writeUint32(writer, c.length); - } - writeSignature(writer, '8BIM'); - writeSignature(writer, helpers_1.fromBlendMode[layer.blendMode] || 'norm'); - writeUint8(writer, Math.round((0, helpers_1.clamp)((_a = layer.opacity) !== null && _a !== void 0 ? _a : 1, 0, 1) * 255)); - writeUint8(writer, layer.clipping ? 1 : 0); - var flags = 0x08; // 1 for Photoshop 5.0 and later, tells if bit 4 has useful information - if (layer.transparencyProtected) - flags |= 0x01; - if (layer.hidden) - flags |= 0x02; - if (layer.vectorMask || (layer.sectionDivider && layer.sectionDivider.type !== 0 /* SectionDividerType.Other */)) { - flags |= 0x10; // pixel data irrelevant to appearance of document - } - if (layer.effects && (0, additionalInfo_1.hasMultiEffects)(layer.effects)) { // TODO: this is not correct - flags |= 0x20; // just guessing this one, might be completely incorrect - } - // if ('_2' in layer) flags |= 0x20; // TEMP!!! - writeUint8(writer, flags); - writeUint8(writer, 0); // filler - writeSection(writer, 1, function () { - writeLayerMaskData(writer, layer, layerData); - writeLayerBlendingRanges(writer, psd); - writePascalString(writer, layer.name || '', 4); - writeAdditionalLayerInfo(writer, layer, psd, options); - }); - }; - // layer records - for (var _i = 0, layersData_1 = layersData; _i < layersData_1.length; _i++) { - var layerData = layersData_1[_i]; - _loop_3(layerData); - } - // layer channel image data - for (var _b = 0, layersData_2 = layersData; _b < layersData_2.length; _b++) { - var layerData = layersData_2[_b]; - for (var _c = 0, _d = layerData.channels; _c < _d.length; _c++) { - var channel = _d[_c]; - writeUint16(writer, channel.compression); - if (channel.buffer) { - writeBytes(writer, channel.buffer); - } - } - } - }, true, options.psb); -} -function writeLayerMaskData(writer, _a, layerData) { - var mask = _a.mask; - writeSection(writer, 1, function () { - if (!mask) - return; - var m = layerData.mask || {}; - writeInt32(writer, m.top); - writeInt32(writer, m.left); - writeInt32(writer, m.bottom); - writeInt32(writer, m.right); - writeUint8(writer, mask.defaultColor); - var params = 0; - if (mask.userMaskDensity !== undefined) - params |= 1 /* MaskParams.UserMaskDensity */; - if (mask.userMaskFeather !== undefined) - params |= 2 /* MaskParams.UserMaskFeather */; - if (mask.vectorMaskDensity !== undefined) - params |= 4 /* MaskParams.VectorMaskDensity */; - if (mask.vectorMaskFeather !== undefined) - params |= 8 /* MaskParams.VectorMaskFeather */; - var flags = 0; - if (mask.disabled) - flags |= 2 /* LayerMaskFlags.LayerMaskDisabled */; - if (mask.positionRelativeToLayer) - flags |= 1 /* LayerMaskFlags.PositionRelativeToLayer */; - if (mask.fromVectorData) - flags |= 8 /* LayerMaskFlags.LayerMaskFromRenderingOtherData */; - if (params) - flags |= 16 /* LayerMaskFlags.MaskHasParametersAppliedToIt */; - writeUint8(writer, flags); - if (params) { - writeUint8(writer, params); - if (mask.userMaskDensity !== undefined) - writeUint8(writer, Math.round(mask.userMaskDensity * 0xff)); - if (mask.userMaskFeather !== undefined) - writeFloat64(writer, mask.userMaskFeather); - if (mask.vectorMaskDensity !== undefined) - writeUint8(writer, Math.round(mask.vectorMaskDensity * 0xff)); - if (mask.vectorMaskFeather !== undefined) - writeFloat64(writer, mask.vectorMaskFeather); - } - // TODO: handle rest of the fields - writeZeros(writer, 2); - }); -} -function writeLayerBlendingRanges(writer, psd) { - writeSection(writer, 1, function () { - writeUint32(writer, 65535); - writeUint32(writer, 65535); - var channels = psd.channels || 0; // TODO: use always 4 instead ? - // channels = 4; // TESTING - for (var i = 0; i < channels; i++) { - writeUint32(writer, 65535); - writeUint32(writer, 65535); - } - }); -} -function writeGlobalLayerMaskInfo(writer, info) { - writeSection(writer, 1, function () { - if (info) { - writeUint16(writer, info.overlayColorSpace); - writeUint16(writer, info.colorSpace1); - writeUint16(writer, info.colorSpace2); - writeUint16(writer, info.colorSpace3); - writeUint16(writer, info.colorSpace4); - writeUint16(writer, info.opacity * 0xff); - writeUint8(writer, info.kind); - writeZeros(writer, 3); - } - }); -} -function writeAdditionalLayerInfo(writer, target, psd, options) { - var _loop_4 = function (handler) { - var key = handler.key; - if (key === 'Txt2' && options.invalidateTextLayers) - return "continue"; - if (key === 'vmsk' && options.psb) - key = 'vsms'; - if (handler.has(target)) { - var large = options.psb && helpers_1.largeAdditionalInfoKeys.indexOf(key) !== -1; - writeSignature(writer, large ? '8B64' : '8BIM'); - writeSignature(writer, key); - var fourBytes = key === 'Txt2' || key === 'luni' || key === 'vmsk' || key === 'artb' || key === 'artd' || - key === 'vogk' || key === 'SoLd' || key === 'lnk2' || key === 'vscg' || key === 'vsms' || key === 'GdFl' || - key === 'lmfx' || key === 'lrFX' || key === 'cinf' || key === 'PlLd' || key === 'Anno'; - writeSection(writer, fourBytes ? 4 : 2, function () { - handler.write(writer, target, psd, options); - }, key !== 'Txt2' && key !== 'cinf' && key !== 'extn', large); - } - }; - for (var _i = 0, infoHandlers_1 = additionalInfo_1.infoHandlers; _i < infoHandlers_1.length; _i++) { - var handler = infoHandlers_1[_i]; - _loop_4(handler); - } -} -function addChildren(layers, children) { - if (!children) - return; - for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { - var c = children_1[_i]; - if (c.children && c.canvas) - throw new Error("Invalid layer, cannot have both 'canvas' and 'children' properties"); - if (c.children && c.imageData) - throw new Error("Invalid layer, cannot have both 'imageData' and 'children' properties"); - if (c.children) { - layers.push({ - name: '', - sectionDivider: { - type: 3 /* SectionDividerType.BoundingSectionDivider */, - }, - // TESTING - // nameSource: 'lset', - // id: [4, 0, 0, 8, 11, 0, 0, 0, 0, 14][layers.length] || 0, - // layerColor: 'none', - // timestamp: [1611346817.349021, 0, 0, 1611346817.349175, 1611346817.3491833, 0, 0, 0, 0, 1611346817.349832][layers.length] || 0, - // protected: {}, - // referencePoint: { x: 0, y: 0 }, - }); - addChildren(layers, c.children); - layers.push(__assign({ sectionDivider: { - type: c.opened === false ? 2 /* SectionDividerType.ClosedFolder */ : 1 /* SectionDividerType.OpenFolder */, - key: helpers_1.fromBlendMode[c.blendMode] || 'pass', - subType: 0, - } }, c)); - } - else { - layers.push(__assign({}, c)); - } - } -} -function resizeBuffer(writer, size) { - var newLength = writer.buffer.byteLength; - do { - newLength *= 2; - } while (size > newLength); - var newBuffer = new ArrayBuffer(newLength); - var newBytes = new Uint8Array(newBuffer); - var oldBytes = new Uint8Array(writer.buffer); - newBytes.set(oldBytes); - writer.buffer = newBuffer; - writer.view = new DataView(writer.buffer); -} -function ensureSize(writer, size) { - if (size > writer.buffer.byteLength) { - resizeBuffer(writer, size); - } -} -function addSize(writer, size) { - var offset = writer.offset; - ensureSize(writer, writer.offset += size); - return offset; -} -function createThumbnail(psd) { - var canvas = (0, helpers_1.createCanvas)(10, 10); - var scale = 1; - if (psd.width > psd.height) { - canvas.width = 160; - canvas.height = Math.floor(psd.height * (canvas.width / psd.width)); - scale = canvas.width / psd.width; - } - else { - canvas.height = 160; - canvas.width = Math.floor(psd.width * (canvas.height / psd.height)); - scale = canvas.height / psd.height; - } - var context = canvas.getContext('2d'); - context.scale(scale, scale); - if (psd.imageData) { - var temp = (0, helpers_1.createCanvas)(psd.imageData.width, psd.imageData.height); - temp.getContext('2d').putImageData(psd.imageData, 0, 0); - context.drawImage(temp, 0, 0); - } - else if (psd.canvas) { - context.drawImage(psd.canvas, 0, 0); - } - return canvas; -} -function getChannels(tempBuffer, layer, background, options) { - var layerData = getLayerChannels(tempBuffer, layer, background, options); - var mask = layer.mask; - if (mask) { - var top_2 = mask.top | 0; - var left = mask.left | 0; - var right = mask.right | 0; - var bottom = mask.bottom | 0; - var _a = getLayerDimentions(mask), width = _a.width, height = _a.height; - var imageData = mask.imageData; - if (!imageData && mask.canvas && width && height) { - imageData = mask.canvas.getContext('2d').getImageData(0, 0, width, height); - } - if (width && height && imageData) { - right = left + width; - bottom = top_2 + height; - if (imageData.width !== width || imageData.height !== height) { - throw new Error('Invalid imageData dimentions'); - } - var buffer = void 0; - var compression = void 0; - if (helpers_1.RAW_IMAGE_DATA && layer.maskDataRaw) { - // console.log('written raw layer image data'); - buffer = layer.maskDataRaw; - compression = 1 /* Compression.RleCompressed */; - } - else if (options.compress) { - buffer = (0, helpers_1.writeDataZipWithoutPrediction)(imageData, [0]); - compression = 2 /* Compression.ZipWithoutPrediction */; - } - else { - buffer = (0, helpers_1.writeDataRLE)(tempBuffer, imageData, [0], !!options.psb); - compression = 1 /* Compression.RleCompressed */; - } - layerData.mask = { top: top_2, left: left, right: right, bottom: bottom }; - layerData.channels.push({ channelId: -2 /* ChannelID.UserMask */, compression: compression, buffer: buffer, length: 2 + buffer.length }); - } - else { - layerData.mask = { top: 0, left: 0, right: 0, bottom: 0 }; - layerData.channels.push({ channelId: -2 /* ChannelID.UserMask */, compression: 0 /* Compression.RawData */, buffer: new Uint8Array(0), length: 0 }); - } - } - return layerData; -} -function getLayerDimentions(_a) { - var canvas = _a.canvas, imageData = _a.imageData; - return imageData || canvas || { width: 0, height: 0 }; -} -function cropImageData(data, left, top, width, height) { - var croppedData = (0, helpers_1.createImageData)(width, height); - var srcData = data.data; - var dstData = croppedData.data; - for (var y = 0; y < height; y++) { - for (var x = 0; x < width; x++) { - var src = ((x + left) + (y + top) * width) * 4; - var dst = (x + y * width) * 4; - dstData[dst] = srcData[src]; - dstData[dst + 1] = srcData[src + 1]; - dstData[dst + 2] = srcData[src + 2]; - dstData[dst + 3] = srcData[src + 3]; - } - } - return croppedData; -} -function getLayerChannels(tempBuffer, layer, background, options) { - var _a; - var top = layer.top | 0; - var left = layer.left | 0; - var right = layer.right | 0; - var bottom = layer.bottom | 0; - var channels = [ - { channelId: -1 /* ChannelID.Transparency */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, - { channelId: 0 /* ChannelID.Color0 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, - { channelId: 1 /* ChannelID.Color1 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, - { channelId: 2 /* ChannelID.Color2 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, - ]; - var _b = getLayerDimentions(layer), width = _b.width, height = _b.height; - if (!(layer.canvas || layer.imageData) || !width || !height) { - right = left; - bottom = top; - return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; - } - right = left + width; - bottom = top + height; - var data = layer.imageData || layer.canvas.getContext('2d').getImageData(0, 0, width, height); - if (options.trimImageData) { - var trimmed = trimData(data); - if (trimmed.left !== 0 || trimmed.top !== 0 || trimmed.right !== data.width || trimmed.bottom !== data.height) { - left += trimmed.left; - top += trimmed.top; - right -= (data.width - trimmed.right); - bottom -= (data.height - trimmed.bottom); - width = right - left; - height = bottom - top; - if (!width || !height) { - return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; - } - if (layer.imageData) { - data = cropImageData(data, trimmed.left, trimmed.top, width, height); - } - else { - data = layer.canvas.getContext('2d').getImageData(trimmed.left, trimmed.top, width, height); - } - } - } - var channelIds = [ - 0 /* ChannelID.Color0 */, - 1 /* ChannelID.Color1 */, - 2 /* ChannelID.Color2 */, - ]; - if (!background || options.noBackground || layer.mask || (0, helpers_1.hasAlpha)(data) || (helpers_1.RAW_IMAGE_DATA && ((_a = layer.imageDataRaw) === null || _a === void 0 ? void 0 : _a['-1']))) { - channelIds.unshift(-1 /* ChannelID.Transparency */); - } - channels = channelIds.map(function (channelId) { - var offset = (0, helpers_1.offsetForChannel)(channelId, false); // TODO: psd.colorMode === ColorMode.CMYK); - var buffer; - var compression; - if (helpers_1.RAW_IMAGE_DATA && layer.imageDataRaw) { - // console.log('written raw layer image data'); - buffer = layer.imageDataRaw[channelId]; - compression = 1 /* Compression.RleCompressed */; - } - else if (options.compress) { - buffer = (0, helpers_1.writeDataZipWithoutPrediction)(data, [offset]); - compression = 2 /* Compression.ZipWithoutPrediction */; - } - else { - buffer = (0, helpers_1.writeDataRLE)(tempBuffer, data, [offset], !!options.psb); - compression = 1 /* Compression.RleCompressed */; - } - return { channelId: channelId, compression: compression, buffer: buffer, length: 2 + buffer.length }; - }); - return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; -} -function isRowEmpty(_a, y, left, right) { - var data = _a.data, width = _a.width; - var start = ((y * width + left) * 4 + 3) | 0; - var end = (start + (right - left) * 4) | 0; - for (var i = start; i < end; i = (i + 4) | 0) { - if (data[i] !== 0) { - return false; - } - } - return true; -} -function isColEmpty(_a, x, top, bottom) { - var data = _a.data, width = _a.width; - var stride = (width * 4) | 0; - var start = (top * stride + x * 4 + 3) | 0; - for (var y = top, i = start; y < bottom; y++, i = (i + stride) | 0) { - if (data[i] !== 0) { - return false; - } - } - return true; -} -function trimData(data) { - var top = 0; - var left = 0; - var right = data.width; - var bottom = data.height; - while (top < bottom && isRowEmpty(data, top, left, right)) - top++; - while (bottom > top && isRowEmpty(data, bottom - 1, left, right)) - bottom--; - while (left < right && isColEmpty(data, left, top, bottom)) - left++; - while (right > left && isColEmpty(data, right - 1, top, bottom)) - right--; - return { top: top, left: left, right: right, bottom: bottom }; -} -function writeColor(writer, color) { - if (!color) { - writeUint16(writer, 0 /* ColorSpace.RGB */); - writeZeros(writer, 8); - } - else if ('r' in color) { - writeUint16(writer, 0 /* ColorSpace.RGB */); - writeUint16(writer, Math.round(color.r * 257)); - writeUint16(writer, Math.round(color.g * 257)); - writeUint16(writer, Math.round(color.b * 257)); - writeUint16(writer, 0); - } - else if ('fr' in color) { - writeUint16(writer, 0 /* ColorSpace.RGB */); - writeUint16(writer, Math.round(color.fr * 255 * 257)); - writeUint16(writer, Math.round(color.fg * 255 * 257)); - writeUint16(writer, Math.round(color.fb * 255 * 257)); - writeUint16(writer, 0); - } - else if ('l' in color) { - writeUint16(writer, 7 /* ColorSpace.Lab */); - writeInt16(writer, Math.round(color.l * 10000)); - writeInt16(writer, Math.round(color.a < 0 ? (color.a * 12800) : (color.a * 12700))); - writeInt16(writer, Math.round(color.b < 0 ? (color.b * 12800) : (color.b * 12700))); - writeUint16(writer, 0); - } - else if ('h' in color) { - writeUint16(writer, 1 /* ColorSpace.HSB */); - writeUint16(writer, Math.round(color.h * 0xffff)); - writeUint16(writer, Math.round(color.s * 0xffff)); - writeUint16(writer, Math.round(color.b * 0xffff)); - writeUint16(writer, 0); - } - else if ('c' in color) { - writeUint16(writer, 2 /* ColorSpace.CMYK */); - writeUint16(writer, Math.round(color.c * 257)); - writeUint16(writer, Math.round(color.m * 257)); - writeUint16(writer, Math.round(color.y * 257)); - writeUint16(writer, Math.round(color.k * 257)); - } - else { - writeUint16(writer, 8 /* ColorSpace.Grayscale */); - writeUint16(writer, Math.round(color.k * 10000 / 255)); - writeZeros(writer, 6); - } -} -exports.writeColor = writeColor; +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writeColor = exports.writePsd = exports.writeSection = exports.writeUnicodeStringWithPadding = exports.writeUnicodeString = exports.writePascalString = exports.writeSignature = exports.writeZeros = exports.writeBytes = exports.writeFixedPointPath32 = exports.writeFixedPoint32 = exports.writeFloat64 = exports.writeFloat32 = exports.writeUint32 = exports.writeInt32 = exports.writeUint16 = exports.writeInt16 = exports.writeUint8 = exports.getWriterBufferNoCopy = exports.getWriterBuffer = exports.createWriter = void 0; +var helpers_1 = require("./helpers"); +var additionalInfo_1 = require("./additionalInfo"); +var imageResources_1 = require("./imageResources"); +function createWriter(size) { + if (size === void 0) { size = 4096; } + var buffer = new ArrayBuffer(size); + var view = new DataView(buffer); + var offset = 0; + return { buffer: buffer, view: view, offset: offset }; +} +exports.createWriter = createWriter; +function getWriterBuffer(writer) { + return writer.buffer.slice(0, writer.offset); +} +exports.getWriterBuffer = getWriterBuffer; +function getWriterBufferNoCopy(writer) { + return new Uint8Array(writer.buffer, 0, writer.offset); +} +exports.getWriterBufferNoCopy = getWriterBufferNoCopy; +function writeUint8(writer, value) { + var offset = addSize(writer, 1); + writer.view.setUint8(offset, value); +} +exports.writeUint8 = writeUint8; +function writeInt16(writer, value) { + var offset = addSize(writer, 2); + writer.view.setInt16(offset, value, false); +} +exports.writeInt16 = writeInt16; +function writeUint16(writer, value) { + var offset = addSize(writer, 2); + writer.view.setUint16(offset, value, false); +} +exports.writeUint16 = writeUint16; +function writeInt32(writer, value) { + var offset = addSize(writer, 4); + writer.view.setInt32(offset, value, false); +} +exports.writeInt32 = writeInt32; +function writeUint32(writer, value) { + var offset = addSize(writer, 4); + writer.view.setUint32(offset, value, false); +} +exports.writeUint32 = writeUint32; +function writeFloat32(writer, value) { + var offset = addSize(writer, 4); + writer.view.setFloat32(offset, value, false); +} +exports.writeFloat32 = writeFloat32; +function writeFloat64(writer, value) { + var offset = addSize(writer, 8); + writer.view.setFloat64(offset, value, false); +} +exports.writeFloat64 = writeFloat64; +// 32-bit fixed-point number 16.16 +function writeFixedPoint32(writer, value) { + writeInt32(writer, value * (1 << 16)); +} +exports.writeFixedPoint32 = writeFixedPoint32; +// 32-bit fixed-point number 8.24 +function writeFixedPointPath32(writer, value) { + writeInt32(writer, value * (1 << 24)); +} +exports.writeFixedPointPath32 = writeFixedPointPath32; +function writeBytes(writer, buffer) { + if (buffer) { + ensureSize(writer, writer.offset + buffer.length); + var bytes = new Uint8Array(writer.buffer); + bytes.set(buffer, writer.offset); + writer.offset += buffer.length; + } +} +exports.writeBytes = writeBytes; +function writeZeros(writer, count) { + for (var i = 0; i < count; i++) { + writeUint8(writer, 0); + } +} +exports.writeZeros = writeZeros; +function writeSignature(writer, signature) { + if (signature.length !== 4) + throw new Error("Invalid signature: '".concat(signature, "'")); + for (var i = 0; i < 4; i++) { + writeUint8(writer, signature.charCodeAt(i)); + } +} +exports.writeSignature = writeSignature; +function writePascalString(writer, text, padTo) { + var length = text.length; + writeUint8(writer, length); + for (var i = 0; i < length; i++) { + var code = text.charCodeAt(i); + writeUint8(writer, code < 128 ? code : '?'.charCodeAt(0)); + } + while (++length % padTo) { + writeUint8(writer, 0); + } +} +exports.writePascalString = writePascalString; +function writeUnicodeString(writer, text) { + writeUint32(writer, text.length); + for (var i = 0; i < text.length; i++) { + writeUint16(writer, text.charCodeAt(i)); + } +} +exports.writeUnicodeString = writeUnicodeString; +function writeUnicodeStringWithPadding(writer, text) { + writeUint32(writer, text.length + 1); + for (var i = 0; i < text.length; i++) { + writeUint16(writer, text.charCodeAt(i)); + } + writeUint16(writer, 0); +} +exports.writeUnicodeStringWithPadding = writeUnicodeStringWithPadding; +function getLargestLayerSize(layers) { + if (layers === void 0) { layers = []; } + var max = 0; + for (var _i = 0, layers_1 = layers; _i < layers_1.length; _i++) { + var layer = layers_1[_i]; + if (layer.canvas || layer.imageData) { + var _a = getLayerDimentions(layer), width = _a.width, height = _a.height; + max = Math.max(max, 2 * height + 2 * width * height); + } + if (layer.children) { + max = Math.max(max, getLargestLayerSize(layer.children)); + } + } + return max; +} +function writeSection(writer, round, func, writeTotalLength, large) { + if (writeTotalLength === void 0) { writeTotalLength = false; } + if (large === void 0) { large = false; } + if (large) + writeUint32(writer, 0); + var offset = writer.offset; + writeUint32(writer, 0); + func(); + var length = writer.offset - offset - 4; + var len = length; + while ((len % round) !== 0) { + writeUint8(writer, 0); + len++; + } + if (writeTotalLength) { + length = len; + } + writer.view.setUint32(offset, length, false); +} +exports.writeSection = writeSection; +function writePsd(writer, psd, options) { + if (options === void 0) { options = {}; } + if (!(+psd.width > 0 && +psd.height > 0)) + throw new Error('Invalid document size'); + if ((psd.width > 30000 || psd.height > 30000) && !options.psb) + throw new Error('Document size is too large (max is 30000x30000, use PSB format instead)'); + var imageResources = psd.imageResources || {}; + var opt = __assign(__assign({}, options), { layerIds: new Set(), layerToId: new Map() }); + if (opt.generateThumbnail) { + imageResources = __assign(__assign({}, imageResources), { thumbnail: createThumbnail(psd) }); + } + var imageData = psd.imageData; + if (!imageData && psd.canvas) { + imageData = psd.canvas.getContext('2d').getImageData(0, 0, psd.canvas.width, psd.canvas.height); + } + if (imageData && (psd.width !== imageData.width || psd.height !== imageData.height)) + throw new Error('Document canvas must have the same size as document'); + var globalAlpha = !!imageData && (0, helpers_1.hasAlpha)(imageData); + var maxBufferSize = Math.max(getLargestLayerSize(psd.children), 4 * 2 * psd.width * psd.height + 2 * psd.height); + var tempBuffer = new Uint8Array(maxBufferSize); + // header + writeSignature(writer, '8BPS'); + writeUint16(writer, options.psb ? 2 : 1); // version + writeZeros(writer, 6); + writeUint16(writer, globalAlpha ? 4 : 3); // channels + writeUint32(writer, psd.height); + writeUint32(writer, psd.width); + writeUint16(writer, 8); // bits per channel + writeUint16(writer, 3 /* ColorMode.RGB */); // we only support saving RGB right now + // color mode data + writeSection(writer, 1, function () { + // TODO: implement + }); + // image resources + writeSection(writer, 1, function () { + var _loop_1 = function (handler) { + if (handler.has(imageResources)) { + writeSignature(writer, '8BIM'); + writeUint16(writer, handler.key); + writePascalString(writer, '', 2); + writeSection(writer, 2, function () { return handler.write(writer, imageResources); }); + } + }; + for (var _i = 0, resourceHandlers_1 = imageResources_1.resourceHandlers; _i < resourceHandlers_1.length; _i++) { + var handler = resourceHandlers_1[_i]; + _loop_1(handler); + } + }); + // layer and mask info + writeSection(writer, 2, function () { + writeLayerInfo(tempBuffer, writer, psd, globalAlpha, opt); + writeGlobalLayerMaskInfo(writer, psd.globalLayerMaskInfo); + writeAdditionalLayerInfo(writer, psd, psd, opt); + }, undefined, !!opt.psb); + // image data + var channels = globalAlpha ? [0, 1, 2, 3] : [0, 1, 2]; + var data = imageData || { + data: new Uint8Array(4 * psd.width * psd.height), + width: psd.width, + height: psd.height, + }; + writeUint16(writer, 1 /* Compression.RleCompressed */); // Photoshop doesn't support zip compression of composite image data + if (helpers_1.RAW_IMAGE_DATA && psd.imageDataRaw) { + console.log('writing raw image data'); + writeBytes(writer, psd.imageDataRaw); + } + else { + writeBytes(writer, (0, helpers_1.writeDataRLE)(tempBuffer, data, channels, !!options.psb)); + } +} +exports.writePsd = writePsd; +function writeLayerInfo(tempBuffer, writer, psd, globalAlpha, options) { + writeSection(writer, 4, function () { + var _a; + var layers = []; + addChildren(layers, psd.children); + if (!layers.length) + layers.push({}); + writeInt16(writer, globalAlpha ? -layers.length : layers.length); + var layersData = layers.map(function (l, i) { return getChannels(tempBuffer, l, i === 0, options); }); + var _loop_2 = function (layerData) { + var layer = layerData.layer, top_1 = layerData.top, left = layerData.left, bottom = layerData.bottom, right = layerData.right, channels = layerData.channels; + writeInt32(writer, top_1); + writeInt32(writer, left); + writeInt32(writer, bottom); + writeInt32(writer, right); + writeUint16(writer, channels.length); + for (var _e = 0, channels_1 = channels; _e < channels_1.length; _e++) { + var c = channels_1[_e]; + writeInt16(writer, c.channelId); + if (options.psb) + writeUint32(writer, 0); + writeUint32(writer, c.length); + } + writeSignature(writer, '8BIM'); + writeSignature(writer, helpers_1.fromBlendMode[layer.blendMode] || 'norm'); + writeUint8(writer, Math.round((0, helpers_1.clamp)((_a = layer.opacity) !== null && _a !== void 0 ? _a : 1, 0, 1) * 255)); + writeUint8(writer, layer.clipping ? 1 : 0); + var flags = 0x08; // 1 for Photoshop 5.0 and later, tells if bit 4 has useful information + if (layer.transparencyProtected) + flags |= 0x01; + if (layer.hidden) + flags |= 0x02; + if (layer.vectorMask || (layer.sectionDivider && layer.sectionDivider.type !== 0 /* SectionDividerType.Other */)) { + flags |= 0x10; // pixel data irrelevant to appearance of document + } + if (layer.effects && (0, additionalInfo_1.hasMultiEffects)(layer.effects)) { // TODO: this is not correct + flags |= 0x20; // just guessing this one, might be completely incorrect + } + // if ('_2' in layer) flags |= 0x20; // TEMP!!! + writeUint8(writer, flags); + writeUint8(writer, 0); // filler + writeSection(writer, 1, function () { + writeLayerMaskData(writer, layer, layerData); + writeLayerBlendingRanges(writer, psd); + writePascalString(writer, layer.name || '', 4); + writeAdditionalLayerInfo(writer, layer, psd, options); + }); + }; + // layer records + for (var _i = 0, layersData_1 = layersData; _i < layersData_1.length; _i++) { + var layerData = layersData_1[_i]; + _loop_2(layerData); + } + // layer channel image data + for (var _b = 0, layersData_2 = layersData; _b < layersData_2.length; _b++) { + var layerData = layersData_2[_b]; + for (var _c = 0, _d = layerData.channels; _c < _d.length; _c++) { + var channel = _d[_c]; + writeUint16(writer, channel.compression); + if (channel.buffer) { + writeBytes(writer, channel.buffer); + } + } + } + }, true, options.psb); +} +function writeLayerMaskData(writer, _a, layerData) { + var mask = _a.mask; + writeSection(writer, 1, function () { + if (!mask) + return; + var m = layerData.mask || {}; + writeInt32(writer, m.top); + writeInt32(writer, m.left); + writeInt32(writer, m.bottom); + writeInt32(writer, m.right); + writeUint8(writer, mask.defaultColor); + var params = 0; + if (mask.userMaskDensity !== undefined) + params |= 1 /* MaskParams.UserMaskDensity */; + if (mask.userMaskFeather !== undefined) + params |= 2 /* MaskParams.UserMaskFeather */; + if (mask.vectorMaskDensity !== undefined) + params |= 4 /* MaskParams.VectorMaskDensity */; + if (mask.vectorMaskFeather !== undefined) + params |= 8 /* MaskParams.VectorMaskFeather */; + var flags = 0; + if (mask.disabled) + flags |= 2 /* LayerMaskFlags.LayerMaskDisabled */; + if (mask.positionRelativeToLayer) + flags |= 1 /* LayerMaskFlags.PositionRelativeToLayer */; + if (mask.fromVectorData) + flags |= 8 /* LayerMaskFlags.LayerMaskFromRenderingOtherData */; + if (params) + flags |= 16 /* LayerMaskFlags.MaskHasParametersAppliedToIt */; + writeUint8(writer, flags); + if (params) { + writeUint8(writer, params); + if (mask.userMaskDensity !== undefined) + writeUint8(writer, Math.round(mask.userMaskDensity * 0xff)); + if (mask.userMaskFeather !== undefined) + writeFloat64(writer, mask.userMaskFeather); + if (mask.vectorMaskDensity !== undefined) + writeUint8(writer, Math.round(mask.vectorMaskDensity * 0xff)); + if (mask.vectorMaskFeather !== undefined) + writeFloat64(writer, mask.vectorMaskFeather); + } + // TODO: handle rest of the fields + writeZeros(writer, 2); + }); +} +function writeLayerBlendingRanges(writer, psd) { + writeSection(writer, 1, function () { + writeUint32(writer, 65535); + writeUint32(writer, 65535); + var channels = psd.channels || 0; // TODO: use always 4 instead ? + // channels = 4; // TESTING + for (var i = 0; i < channels; i++) { + writeUint32(writer, 65535); + writeUint32(writer, 65535); + } + }); +} +function writeGlobalLayerMaskInfo(writer, info) { + writeSection(writer, 1, function () { + if (info) { + writeUint16(writer, info.overlayColorSpace); + writeUint16(writer, info.colorSpace1); + writeUint16(writer, info.colorSpace2); + writeUint16(writer, info.colorSpace3); + writeUint16(writer, info.colorSpace4); + writeUint16(writer, info.opacity * 0xff); + writeUint8(writer, info.kind); + writeZeros(writer, 3); + } + }); +} +function writeAdditionalLayerInfo(writer, target, psd, options) { + var _loop_3 = function (handler) { + var key = handler.key; + if (key === 'Txt2' && options.invalidateTextLayers) + return "continue"; + if (key === 'vmsk' && options.psb) + key = 'vsms'; + if (handler.has(target)) { + var large = options.psb && helpers_1.largeAdditionalInfoKeys.indexOf(key) !== -1; + writeSignature(writer, large ? '8B64' : '8BIM'); + writeSignature(writer, key); + var fourBytes = key === 'Txt2' || key === 'luni' || key === 'vmsk' || key === 'artb' || key === 'artd' || + key === 'vogk' || key === 'SoLd' || key === 'lnk2' || key === 'vscg' || key === 'vsms' || key === 'GdFl' || + key === 'lmfx' || key === 'lrFX' || key === 'cinf' || key === 'PlLd' || key === 'Anno'; + writeSection(writer, fourBytes ? 4 : 2, function () { + handler.write(writer, target, psd, options); + }, key !== 'Txt2' && key !== 'cinf' && key !== 'extn', large); + } + }; + for (var _i = 0, infoHandlers_1 = additionalInfo_1.infoHandlers; _i < infoHandlers_1.length; _i++) { + var handler = infoHandlers_1[_i]; + _loop_3(handler); + } +} +function addChildren(layers, children) { + if (!children) + return; + for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { + var c = children_1[_i]; + if (c.children && c.canvas) + throw new Error("Invalid layer, cannot have both 'canvas' and 'children' properties"); + if (c.children && c.imageData) + throw new Error("Invalid layer, cannot have both 'imageData' and 'children' properties"); + if (c.children) { + layers.push({ + name: '', + sectionDivider: { + type: 3 /* SectionDividerType.BoundingSectionDivider */, + }, + // TESTING + // nameSource: 'lset', + // id: [4, 0, 0, 8, 11, 0, 0, 0, 0, 14][layers.length] || 0, + // layerColor: 'none', + // timestamp: [1611346817.349021, 0, 0, 1611346817.349175, 1611346817.3491833, 0, 0, 0, 0, 1611346817.349832][layers.length] || 0, + // protected: {}, + // referencePoint: { x: 0, y: 0 }, + }); + addChildren(layers, c.children); + layers.push(__assign({ sectionDivider: { + type: c.opened === false ? 2 /* SectionDividerType.ClosedFolder */ : 1 /* SectionDividerType.OpenFolder */, + key: helpers_1.fromBlendMode[c.blendMode] || 'pass', + subType: 0, + } }, c)); + } + else { + layers.push(__assign({}, c)); + } + } +} +function resizeBuffer(writer, size) { + var newLength = writer.buffer.byteLength; + do { + newLength *= 2; + } while (size > newLength); + var newBuffer = new ArrayBuffer(newLength); + var newBytes = new Uint8Array(newBuffer); + var oldBytes = new Uint8Array(writer.buffer); + newBytes.set(oldBytes); + writer.buffer = newBuffer; + writer.view = new DataView(writer.buffer); +} +function ensureSize(writer, size) { + if (size > writer.buffer.byteLength) { + resizeBuffer(writer, size); + } +} +function addSize(writer, size) { + var offset = writer.offset; + ensureSize(writer, writer.offset += size); + return offset; +} +function createThumbnail(psd) { + var canvas = (0, helpers_1.createCanvas)(10, 10); + var scale = 1; + if (psd.width > psd.height) { + canvas.width = 160; + canvas.height = Math.floor(psd.height * (canvas.width / psd.width)); + scale = canvas.width / psd.width; + } + else { + canvas.height = 160; + canvas.width = Math.floor(psd.width * (canvas.height / psd.height)); + scale = canvas.height / psd.height; + } + var context = canvas.getContext('2d'); + context.scale(scale, scale); + if (psd.imageData) { + var temp = (0, helpers_1.createCanvas)(psd.imageData.width, psd.imageData.height); + temp.getContext('2d').putImageData(psd.imageData, 0, 0); + context.drawImage(temp, 0, 0); + } + else if (psd.canvas) { + context.drawImage(psd.canvas, 0, 0); + } + return canvas; +} +function getChannels(tempBuffer, layer, background, options) { + var layerData = getLayerChannels(tempBuffer, layer, background, options); + var mask = layer.mask; + if (mask) { + var top_2 = mask.top | 0; + var left = mask.left | 0; + var right = mask.right | 0; + var bottom = mask.bottom | 0; + var _a = getLayerDimentions(mask), width = _a.width, height = _a.height; + var imageData = mask.imageData; + if (!imageData && mask.canvas && width && height) { + imageData = mask.canvas.getContext('2d').getImageData(0, 0, width, height); + } + if (width && height && imageData) { + right = left + width; + bottom = top_2 + height; + if (imageData.width !== width || imageData.height !== height) { + throw new Error('Invalid imageData dimentions'); + } + var buffer = void 0; + var compression = void 0; + if (helpers_1.RAW_IMAGE_DATA && layer.maskDataRaw) { + // console.log('written raw layer image data'); + buffer = layer.maskDataRaw; + compression = 1 /* Compression.RleCompressed */; + } + else if (options.compress) { + buffer = (0, helpers_1.writeDataZipWithoutPrediction)(imageData, [0]); + compression = 2 /* Compression.ZipWithoutPrediction */; + } + else { + buffer = (0, helpers_1.writeDataRLE)(tempBuffer, imageData, [0], !!options.psb); + compression = 1 /* Compression.RleCompressed */; + } + layerData.mask = { top: top_2, left: left, right: right, bottom: bottom }; + layerData.channels.push({ channelId: -2 /* ChannelID.UserMask */, compression: compression, buffer: buffer, length: 2 + buffer.length }); + } + else { + layerData.mask = { top: 0, left: 0, right: 0, bottom: 0 }; + layerData.channels.push({ channelId: -2 /* ChannelID.UserMask */, compression: 0 /* Compression.RawData */, buffer: new Uint8Array(0), length: 0 }); + } + } + return layerData; +} +function getLayerDimentions(_a) { + var canvas = _a.canvas, imageData = _a.imageData; + return imageData || canvas || { width: 0, height: 0 }; +} +function cropImageData(data, left, top, width, height) { + var croppedData = (0, helpers_1.createImageData)(width, height); + var srcData = data.data; + var dstData = croppedData.data; + for (var y = 0; y < height; y++) { + for (var x = 0; x < width; x++) { + var src = ((x + left) + (y + top) * width) * 4; + var dst = (x + y * width) * 4; + dstData[dst] = srcData[src]; + dstData[dst + 1] = srcData[src + 1]; + dstData[dst + 2] = srcData[src + 2]; + dstData[dst + 3] = srcData[src + 3]; + } + } + return croppedData; +} +function getLayerChannels(tempBuffer, layer, background, options) { + var _a; + var top = layer.top | 0; + var left = layer.left | 0; + var right = layer.right | 0; + var bottom = layer.bottom | 0; + var channels = [ + { channelId: -1 /* ChannelID.Transparency */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, + { channelId: 0 /* ChannelID.Color0 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, + { channelId: 1 /* ChannelID.Color1 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, + { channelId: 2 /* ChannelID.Color2 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, + ]; + var _b = getLayerDimentions(layer), width = _b.width, height = _b.height; + if (!(layer.canvas || layer.imageData) || !width || !height) { + right = left; + bottom = top; + return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; + } + right = left + width; + bottom = top + height; + var data = layer.imageData || layer.canvas.getContext('2d').getImageData(0, 0, width, height); + if (options.trimImageData) { + var trimmed = trimData(data); + if (trimmed.left !== 0 || trimmed.top !== 0 || trimmed.right !== data.width || trimmed.bottom !== data.height) { + left += trimmed.left; + top += trimmed.top; + right -= (data.width - trimmed.right); + bottom -= (data.height - trimmed.bottom); + width = right - left; + height = bottom - top; + if (!width || !height) { + return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; + } + if (layer.imageData) { + data = cropImageData(data, trimmed.left, trimmed.top, width, height); + } + else { + data = layer.canvas.getContext('2d').getImageData(trimmed.left, trimmed.top, width, height); + } + } + } + var channelIds = [ + 0 /* ChannelID.Color0 */, + 1 /* ChannelID.Color1 */, + 2 /* ChannelID.Color2 */, + ]; + if (!background || options.noBackground || layer.mask || (0, helpers_1.hasAlpha)(data) || (helpers_1.RAW_IMAGE_DATA && ((_a = layer.imageDataRaw) === null || _a === void 0 ? void 0 : _a['-1']))) { + channelIds.unshift(-1 /* ChannelID.Transparency */); + } + channels = channelIds.map(function (channelId) { + var offset = (0, helpers_1.offsetForChannel)(channelId, false); // TODO: psd.colorMode === ColorMode.CMYK); + var buffer; + var compression; + if (helpers_1.RAW_IMAGE_DATA && layer.imageDataRaw) { + // console.log('written raw layer image data'); + buffer = layer.imageDataRaw[channelId]; + compression = 1 /* Compression.RleCompressed */; + } + else if (options.compress) { + buffer = (0, helpers_1.writeDataZipWithoutPrediction)(data, [offset]); + compression = 2 /* Compression.ZipWithoutPrediction */; + } + else { + buffer = (0, helpers_1.writeDataRLE)(tempBuffer, data, [offset], !!options.psb); + compression = 1 /* Compression.RleCompressed */; + } + return { channelId: channelId, compression: compression, buffer: buffer, length: 2 + buffer.length }; + }); + return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; +} +function isRowEmpty(_a, y, left, right) { + var data = _a.data, width = _a.width; + var start = ((y * width + left) * 4 + 3) | 0; + var end = (start + (right - left) * 4) | 0; + for (var i = start; i < end; i = (i + 4) | 0) { + if (data[i] !== 0) { + return false; + } + } + return true; +} +function isColEmpty(_a, x, top, bottom) { + var data = _a.data, width = _a.width; + var stride = (width * 4) | 0; + var start = (top * stride + x * 4 + 3) | 0; + for (var y = top, i = start; y < bottom; y++, i = (i + stride) | 0) { + if (data[i] !== 0) { + return false; + } + } + return true; +} +function trimData(data) { + var top = 0; + var left = 0; + var right = data.width; + var bottom = data.height; + while (top < bottom && isRowEmpty(data, top, left, right)) + top++; + while (bottom > top && isRowEmpty(data, bottom - 1, left, right)) + bottom--; + while (left < right && isColEmpty(data, left, top, bottom)) + left++; + while (right > left && isColEmpty(data, right - 1, top, bottom)) + right--; + return { top: top, left: left, right: right, bottom: bottom }; +} +function writeColor(writer, color) { + if (!color) { + writeUint16(writer, 0 /* ColorSpace.RGB */); + writeZeros(writer, 8); + } + else if ('r' in color) { + writeUint16(writer, 0 /* ColorSpace.RGB */); + writeUint16(writer, Math.round(color.r * 257)); + writeUint16(writer, Math.round(color.g * 257)); + writeUint16(writer, Math.round(color.b * 257)); + writeUint16(writer, 0); + } + else if ('l' in color) { + writeUint16(writer, 7 /* ColorSpace.Lab */); + writeInt16(writer, Math.round(color.l * 10000)); + writeInt16(writer, Math.round(color.a < 0 ? (color.a * 12800) : (color.a * 12700))); + writeInt16(writer, Math.round(color.b < 0 ? (color.b * 12800) : (color.b * 12700))); + writeUint16(writer, 0); + } + else if ('h' in color) { + writeUint16(writer, 1 /* ColorSpace.HSB */); + writeUint16(writer, Math.round(color.h * 0xffff)); + writeUint16(writer, Math.round(color.s * 0xffff)); + writeUint16(writer, Math.round(color.b * 0xffff)); + writeUint16(writer, 0); + } + else if ('c' in color) { + writeUint16(writer, 2 /* ColorSpace.CMYK */); + writeUint16(writer, Math.round(color.c * 257)); + writeUint16(writer, Math.round(color.m * 257)); + writeUint16(writer, Math.round(color.y * 257)); + writeUint16(writer, Math.round(color.k * 257)); + } + else { + writeUint16(writer, 8 /* ColorSpace.Grayscale */); + writeUint16(writer, Math.round(color.k * 10000 / 255)); + writeZeros(writer, 6); + } +} +exports.writeColor = writeColor; + },{"./additionalInfo":2,"./helpers":7,"./imageResources":8}],13:[function(require,module,exports){ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.encodeEngineData = exports.decodeEngineData = void 0; -var defaultFont = { - name: 'MyriadPro-Regular', - script: 0, - type: 0, - synthetic: 0, -}; -var defaultParagraphStyle = { - justification: 'left', - firstLineIndent: 0, - startIndent: 0, - endIndent: 0, - spaceBefore: 0, - spaceAfter: 0, - autoHyphenate: true, - hyphenatedWordSize: 6, - preHyphen: 2, - postHyphen: 2, - consecutiveHyphens: 8, - zone: 36, - wordSpacing: [0.8, 1, 1.33], - letterSpacing: [0, 0, 0], - glyphSpacing: [1, 1, 1], - autoLeading: 1.2, - leadingType: 0, - hanging: false, - burasagari: false, - kinsokuOrder: 0, - everyLineComposer: false, -}; -var defaultStyle = { - font: defaultFont, - fontSize: 12, - fauxBold: false, - fauxItalic: false, - autoLeading: true, - leading: 0, - horizontalScale: 1, - verticalScale: 1, - tracking: 0, - autoKerning: true, - kerning: 0, - baselineShift: 0, - fontCaps: 0, - fontBaseline: 0, - underline: false, - strikethrough: false, - ligatures: true, - dLigatures: false, - baselineDirection: 2, - tsume: 0, - styleRunAlignment: 2, - language: 0, - noBreak: false, - fillColor: { r: 0, g: 0, b: 0 }, - strokeColor: { r: 0, g: 0, b: 0 }, - fillFlag: true, - strokeFlag: false, - fillFirst: true, - yUnderline: 1, - outlineWidth: 1, - characterDirection: 0, - hindiNumbers: false, - kashida: 1, - diacriticPos: 2, -}; -var defaultGridInfo = { - isOn: false, - show: false, - size: 18, - leading: 22, - color: { r: 0, g: 0, b: 255 }, - leadingFillColor: { r: 0, g: 0, b: 255 }, - alignLineHeightToGridFlags: false, -}; -var paragraphStyleKeys = [ - 'justification', 'firstLineIndent', 'startIndent', 'endIndent', 'spaceBefore', 'spaceAfter', - 'autoHyphenate', 'hyphenatedWordSize', 'preHyphen', 'postHyphen', 'consecutiveHyphens', - 'zone', 'wordSpacing', 'letterSpacing', 'glyphSpacing', 'autoLeading', 'leadingType', - 'hanging', 'burasagari', 'kinsokuOrder', 'everyLineComposer', -]; -var styleKeys = [ - 'font', 'fontSize', 'fauxBold', 'fauxItalic', 'autoLeading', 'leading', 'horizontalScale', - 'verticalScale', 'tracking', 'autoKerning', 'kerning', 'baselineShift', 'fontCaps', 'fontBaseline', - 'underline', 'strikethrough', 'ligatures', 'dLigatures', 'baselineDirection', 'tsume', - 'styleRunAlignment', 'language', 'noBreak', 'fillColor', 'strokeColor', 'fillFlag', - 'strokeFlag', 'fillFirst', 'yUnderline', 'outlineWidth', 'characterDirection', 'hindiNumbers', - 'kashida', 'diacriticPos', -]; -var antialias = ['none', 'crisp', 'strong', 'smooth', 'sharp']; -var justification = ['left', 'right', 'center']; -function upperFirst(value) { - return value.substr(0, 1).toUpperCase() + value.substr(1); -} -function decodeColor(color) { - var c = color.Values; - if (color.Type === 0) { // grayscale - return { r: c[1] * 255, g: c[1] * 255, b: c[1] * 255 }; // , c[0] * 255]; - } - else { // rgb - return { r: c[1] * 255, g: c[2] * 255, b: c[3] * 255, a: c[0] }; // , c[0] * 255]; - } -} -function encodeColor(color) { - if (color && 'r' in color) { - return ['a' in color ? color.a : 1, color.r / 255, color.g / 255, color.b / 255]; - } - else { - return [0, 0, 0, 0]; - } -} -function arraysEqual(a, b) { - if (!a || !b) - return false; - if (a.length !== b.length) - return false; - for (var i = 0; i < a.length; i++) - if (a[i] !== b[i]) - return false; - return true; -} -function objectsEqual(a, b) { - if (!a || !b) - return false; - for (var _i = 0, _a = Object.keys(a); _i < _a.length; _i++) { - var key = _a[_i]; - if (a[key] !== b[key]) - return false; - } - for (var _b = 0, _c = Object.keys(b); _b < _c.length; _b++) { - var key = _c[_b]; - if (a[key] !== b[key]) - return false; - } - return true; -} -function findOrAddFont(fonts, font) { - for (var i = 0; i < fonts.length; i++) { - if (fonts[i].name === font.name) - return i; - } - fonts.push(font); - return fonts.length - 1; -} -function decodeObject(obj, keys, fonts) { - var result = {}; - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - var Key = upperFirst(key); - if (obj[Key] === undefined) - continue; - if (key === 'justification') { - result[key] = justification[obj[Key]]; - } - else if (key === 'font') { - result[key] = fonts[obj[Key]]; - } - else if (key === 'fillColor' || key === 'strokeColor') { - result[key] = decodeColor(obj[Key]); - } - else { - result[key] = obj[Key]; - } - } - return result; -} -function encodeObject(obj, keys, fonts) { - var _a; - var result = {}; - for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) { - var key = keys_2[_i]; - var Key = upperFirst(key); - if (obj[key] === undefined) - continue; - if (key === 'justification') { - result[Key] = justification.indexOf((_a = obj[key]) !== null && _a !== void 0 ? _a : 'left'); - } - else if (key === 'font') { - result[Key] = findOrAddFont(fonts, obj[key]); - } - else if (key === 'fillColor' || key === 'strokeColor') { - result[Key] = { Type: 1, Values: encodeColor(obj[key]) }; - } - else { - result[Key] = obj[key]; - } - } - return result; -} -function decodeParagraphStyle(obj, fonts) { - return decodeObject(obj, paragraphStyleKeys, fonts); -} -function decodeStyle(obj, fonts) { - return decodeObject(obj, styleKeys, fonts); -} -function encodeParagraphStyle(obj, fonts) { - return encodeObject(obj, paragraphStyleKeys, fonts); -} -function encodeStyle(obj, fonts) { - return encodeObject(obj, styleKeys, fonts); -} -function deduplicateValues(base, runs, keys) { - if (!runs.length) - return; - var _loop_1 = function (key) { - var value = runs[0].style[key]; - if (value !== undefined) { - var identical = false; - if (Array.isArray(value)) { - identical = runs.every(function (r) { return arraysEqual(r.style[key], value); }); - } - else if (typeof value === 'object') { - identical = runs.every(function (r) { return objectsEqual(r.style[key], value); }); - } - else { - identical = runs.every(function (r) { return r.style[key] === value; }); - } - if (identical) { - base[key] = value; - } - } - var styleValue = base[key]; - if (styleValue !== undefined) { - for (var _a = 0, runs_1 = runs; _a < runs_1.length; _a++) { - var r = runs_1[_a]; - var same = false; - if (Array.isArray(value)) { - same = arraysEqual(r.style[key], value); - } - else if (typeof value === 'object') { - same = objectsEqual(r.style[key], value); - } - else { - same = r.style[key] === value; - } - if (same) - delete r.style[key]; - } - } - }; - for (var _i = 0, keys_3 = keys; _i < keys_3.length; _i++) { - var key = keys_3[_i]; - _loop_1(key); - } - if (runs.every(function (x) { return Object.keys(x.style).length === 0; })) { - runs.length = 0; - } -} -function decodeEngineData(engineData) { - var _a, _b, _c, _d, _e, _f; - // console.log('engineData', require('util').inspect(engineData, false, 99, true)); - var engineDict = engineData.EngineDict; - var resourceDict = engineData.ResourceDict; - var fonts = resourceDict.FontSet.map(function (f) { return ({ - name: f.Name, - script: f.Script, - type: f.FontType, - synthetic: f.Synthetic, - }); }); - var text = engineDict.Editor.Text.replace(/\r/g, '\n'); - var removedCharacters = 0; - while (/\n$/.test(text)) { - text = text.substr(0, text.length - 1); - removedCharacters++; - } - var result = { - text: text, - antiAlias: (_a = antialias[engineDict.AntiAlias]) !== null && _a !== void 0 ? _a : 'smooth', - useFractionalGlyphWidths: !!engineDict.UseFractionalGlyphWidths, - superscriptSize: resourceDict.SuperscriptSize, - superscriptPosition: resourceDict.SuperscriptPosition, - subscriptSize: resourceDict.SubscriptSize, - subscriptPosition: resourceDict.SubscriptPosition, - smallCapSize: resourceDict.SmallCapSize, - }; - // shape - var photoshop = (_f = (_e = (_d = (_c = (_b = engineDict.Rendered) === null || _b === void 0 ? void 0 : _b.Shapes) === null || _c === void 0 ? void 0 : _c.Children) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.Cookie) === null || _f === void 0 ? void 0 : _f.Photoshop; - if (photoshop) { - result.shapeType = photoshop.ShapeType === 1 ? 'box' : 'point'; - if (photoshop.PointBase) - result.pointBase = photoshop.PointBase; - if (photoshop.BoxBounds) - result.boxBounds = photoshop.BoxBounds; - } - // paragraph style - // const theNormalParagraphSheet = resourceDict.TheNormalParagraphSheet; - // const paragraphSheetSet = resourceDict.ParagraphSheetSet; - // const paragraphProperties = paragraphSheetSet[theNormalParagraphSheet].Properties; - var paragraphRun = engineData.EngineDict.ParagraphRun; - result.paragraphStyle = {}; // decodeParagraphStyle(paragraphProperties, fonts); - result.paragraphStyleRuns = []; - for (var i = 0; i < paragraphRun.RunArray.length; i++) { - var run_1 = paragraphRun.RunArray[i]; - var length_1 = paragraphRun.RunLengthArray[i]; - var style = decodeParagraphStyle(run_1.ParagraphSheet.Properties, fonts); - // const adjustments = { - // axis: run.Adjustments.Axis, - // xy: run.Adjustments.XY, - // }; - result.paragraphStyleRuns.push({ length: length_1, style: style /*, adjustments*/ }); - } - for (var counter = removedCharacters; result.paragraphStyleRuns.length && counter > 0; counter--) { - if (--result.paragraphStyleRuns[result.paragraphStyleRuns.length - 1].length === 0) { - result.paragraphStyleRuns.pop(); - } - } - deduplicateValues(result.paragraphStyle, result.paragraphStyleRuns, paragraphStyleKeys); - if (!result.paragraphStyleRuns.length) - delete result.paragraphStyleRuns; - // style - // const theNormalStyleSheet = resourceDict.TheNormalStyleSheet; - // const styleSheetSet = resourceDict.StyleSheetSet; - // const styleSheetData = styleSheetSet[theNormalStyleSheet].StyleSheetData; - var styleRun = engineData.EngineDict.StyleRun; - result.style = {}; // decodeStyle(styleSheetData, fonts); - result.styleRuns = []; - for (var i = 0; i < styleRun.RunArray.length; i++) { - var length_2 = styleRun.RunLengthArray[i]; - var style = decodeStyle(styleRun.RunArray[i].StyleSheet.StyleSheetData, fonts); - if (!style.font) - style.font = fonts[0]; - result.styleRuns.push({ length: length_2, style: style }); - } - for (var counter = removedCharacters; result.styleRuns.length && counter > 0; counter--) { - if (--result.styleRuns[result.styleRuns.length - 1].length === 0) { - result.styleRuns.pop(); - } - } - deduplicateValues(result.style, result.styleRuns, styleKeys); - if (!result.styleRuns.length) - delete result.styleRuns; - return result; -} -exports.decodeEngineData = decodeEngineData; -function encodeEngineData(data) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; - var text = "".concat((data.text || '').replace(/\r?\n/g, '\r'), "\r"); - var fonts = [ - { name: 'AdobeInvisFont', script: 0, type: 0, synthetic: 0 }, - ]; - var defFont = ((_a = data.style) === null || _a === void 0 ? void 0 : _a.font) || ((_c = (_b = data.styleRuns) === null || _b === void 0 ? void 0 : _b.find(function (s) { return s.style.font; })) === null || _c === void 0 ? void 0 : _c.style.font) || defaultFont; - var paragraphRunArray = []; - var paragraphRunLengthArray = []; - var paragraphRuns = data.paragraphStyleRuns; - if (paragraphRuns && paragraphRuns.length) { - var leftLength_1 = text.length; - for (var _i = 0, paragraphRuns_1 = paragraphRuns; _i < paragraphRuns_1.length; _i++) { - var run_2 = paragraphRuns_1[_i]; - var runLength = Math.min(run_2.length, leftLength_1); - leftLength_1 -= runLength; - if (!runLength) - continue; // ignore 0 size runs - // extend last run if it's only for trailing \r - if (leftLength_1 === 1 && run_2 === paragraphRuns[paragraphRuns.length - 1]) { - runLength++; - leftLength_1--; - } - paragraphRunLengthArray.push(runLength); - paragraphRunArray.push({ - ParagraphSheet: { - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle(__assign(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), run_2.style), fonts), - }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }); - } - if (leftLength_1) { - paragraphRunLengthArray.push(leftLength_1); - paragraphRunArray.push({ - ParagraphSheet: { - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), - }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }); - } - } - else { - for (var i = 0, last = 0; i < text.length; i++) { - if (text.charCodeAt(i) === 13) { // \r - paragraphRunLengthArray.push(i - last + 1); - paragraphRunArray.push({ - ParagraphSheet: { - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), - }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }); - last = i + 1; - } - } - } - var styleSheetData = encodeStyle(__assign(__assign({}, defaultStyle), { font: defFont }), fonts); - var styleRuns = data.styleRuns || [{ length: text.length, style: data.style || {} }]; - var styleRunArray = []; - var styleRunLengthArray = []; - var leftLength = text.length; - for (var _o = 0, styleRuns_1 = styleRuns; _o < styleRuns_1.length; _o++) { - var run_3 = styleRuns_1[_o]; - var runLength = Math.min(run_3.length, leftLength); - leftLength -= runLength; - if (!runLength) - continue; // ignore 0 size runs - // extend last run if it's only for trailing \r - if (leftLength === 1 && run_3 === styleRuns[styleRuns.length - 1]) { - runLength++; - leftLength--; - } - styleRunLengthArray.push(runLength); - styleRunArray.push({ - StyleSheet: { - StyleSheetData: encodeStyle(__assign(__assign({ kerning: 0, autoKerning: true, fillColor: { r: 0, g: 0, b: 0 } }, data.style), run_3.style), fonts), - }, - }); - } - // add extra run to the end if existing ones didn't fill it up - if (leftLength && styleRuns.length) { - styleRunLengthArray.push(leftLength); - styleRunArray.push({ - StyleSheet: { - StyleSheetData: encodeStyle(__assign({ kerning: 0, autoKerning: true, fillColor: { r: 0, g: 0, b: 0 } }, data.style), fonts), - }, - }); - } - var gridInfo = __assign(__assign({}, defaultGridInfo), data.gridInfo); - var WritingDirection = data.orientation === 'vertical' ? 2 : 0; - var Procession = data.orientation === 'vertical' ? 1 : 0; - var ShapeType = data.shapeType === 'box' ? 1 : 0; - var Photoshop = { - ShapeType: ShapeType, - }; - if (ShapeType === 0) { - Photoshop.PointBase = data.pointBase || [0, 0]; - } - else { - Photoshop.BoxBounds = data.boxBounds || [0, 0, 0, 0]; - } - // needed for correct order of properties - Photoshop.Base = { - ShapeType: ShapeType, - TransformPoint0: [1, 0], - TransformPoint1: [0, 1], - TransformPoint2: [0, 0], - }; - var defaultResources = { - KinsokuSet: [ - { - Name: 'PhotoshopKinsokuHard', - NoStart: '、。,.・:;?!ー―’”)〕]}〉》」』】ヽヾゝゞ々ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ゛゜?!)]},.:;℃℉¢%‰', - NoEnd: '‘“(〔[{〈《「『【([{¥$£@§〒#', - Keep: '―‥', - Hanging: '、。.,', - }, - { - Name: 'PhotoshopKinsokuSoft', - NoStart: '、。,.・:;?!’”)〕]}〉》」』】ヽヾゝゞ々', - NoEnd: '‘“(〔[{〈《「『【', - Keep: '―‥', - Hanging: '、。.,', - }, - ], - MojiKumiSet: [ - { InternalName: 'Photoshop6MojiKumiSet1' }, - { InternalName: 'Photoshop6MojiKumiSet2' }, - { InternalName: 'Photoshop6MojiKumiSet3' }, - { InternalName: 'Photoshop6MojiKumiSet4' }, - ], - TheNormalStyleSheet: 0, - TheNormalParagraphSheet: 0, - ParagraphSheetSet: [ - { - Name: 'Normal RGB', - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), - }, - ], - StyleSheetSet: [ - { - Name: 'Normal RGB', - StyleSheetData: styleSheetData, - }, - ], - FontSet: fonts.map(function (f) { return ({ - Name: f.name, - Script: f.script || 0, - FontType: f.type || 0, - Synthetic: f.synthetic || 0, - }); }), - SuperscriptSize: (_d = data.superscriptSize) !== null && _d !== void 0 ? _d : 0.583, - SuperscriptPosition: (_e = data.superscriptPosition) !== null && _e !== void 0 ? _e : 0.333, - SubscriptSize: (_f = data.subscriptSize) !== null && _f !== void 0 ? _f : 0.583, - SubscriptPosition: (_g = data.subscriptPosition) !== null && _g !== void 0 ? _g : 0.333, - SmallCapSize: (_h = data.smallCapSize) !== null && _h !== void 0 ? _h : 0.7, - }; - var engineData = { - EngineDict: { - Editor: { Text: text }, - ParagraphRun: { - DefaultRunData: { - ParagraphSheet: { DefaultStyleSheet: 0, Properties: {} }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }, - RunArray: paragraphRunArray, - RunLengthArray: paragraphRunLengthArray, - IsJoinable: 1, - }, - StyleRun: { - DefaultRunData: { StyleSheet: { StyleSheetData: {} } }, - RunArray: styleRunArray, - RunLengthArray: styleRunLengthArray, - IsJoinable: 2, - }, - GridInfo: { - GridIsOn: !!gridInfo.isOn, - ShowGrid: !!gridInfo.show, - GridSize: (_j = gridInfo.size) !== null && _j !== void 0 ? _j : 18, - GridLeading: (_k = gridInfo.leading) !== null && _k !== void 0 ? _k : 22, - GridColor: { Type: 1, Values: encodeColor(gridInfo.color) }, - GridLeadingFillColor: { Type: 1, Values: encodeColor(gridInfo.color) }, - AlignLineHeightToGridFlags: !!gridInfo.alignLineHeightToGridFlags, - }, - AntiAlias: antialias.indexOf((_l = data.antiAlias) !== null && _l !== void 0 ? _l : 'sharp'), - UseFractionalGlyphWidths: (_m = data.useFractionalGlyphWidths) !== null && _m !== void 0 ? _m : true, - Rendered: { - Version: 1, - Shapes: { - WritingDirection: WritingDirection, - Children: [ - { - ShapeType: ShapeType, - Procession: Procession, - Lines: { WritingDirection: WritingDirection, Children: [] }, - Cookie: { Photoshop: Photoshop }, - }, - ], - }, - }, - }, - ResourceDict: __assign({}, defaultResources), - DocumentResources: __assign({}, defaultResources), - }; - // console.log('encodeEngineData', require('util').inspect(engineData, false, 99, true)); - return engineData; -} -exports.encodeEngineData = encodeEngineData; +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.encodeEngineData = exports.decodeEngineData = void 0; +var defaultFont = { + name: 'MyriadPro-Regular', + script: 0, + type: 0, + synthetic: 0, +}; +var defaultParagraphStyle = { + justification: 'left', + firstLineIndent: 0, + startIndent: 0, + endIndent: 0, + spaceBefore: 0, + spaceAfter: 0, + autoHyphenate: true, + hyphenatedWordSize: 6, + preHyphen: 2, + postHyphen: 2, + consecutiveHyphens: 8, + zone: 36, + wordSpacing: [0.8, 1, 1.33], + letterSpacing: [0, 0, 0], + glyphSpacing: [1, 1, 1], + autoLeading: 1.2, + leadingType: 0, + hanging: false, + burasagari: false, + kinsokuOrder: 0, + everyLineComposer: false, +}; +var defaultStyle = { + font: defaultFont, + fontSize: 12, + fauxBold: false, + fauxItalic: false, + autoLeading: true, + leading: 0, + horizontalScale: 1, + verticalScale: 1, + tracking: 0, + autoKerning: true, + kerning: 0, + baselineShift: 0, + fontCaps: 0, + fontBaseline: 0, + underline: false, + strikethrough: false, + ligatures: true, + dLigatures: false, + baselineDirection: 2, + tsume: 0, + styleRunAlignment: 2, + language: 0, + noBreak: false, + fillColor: { r: 0, g: 0, b: 0 }, + strokeColor: { r: 0, g: 0, b: 0 }, + fillFlag: true, + strokeFlag: false, + fillFirst: true, + yUnderline: 1, + outlineWidth: 1, + characterDirection: 0, + hindiNumbers: false, + kashida: 1, + diacriticPos: 2, +}; +var defaultGridInfo = { + isOn: false, + show: false, + size: 18, + leading: 22, + color: { r: 0, g: 0, b: 255 }, + leadingFillColor: { r: 0, g: 0, b: 255 }, + alignLineHeightToGridFlags: false, +}; +var paragraphStyleKeys = [ + 'justification', 'firstLineIndent', 'startIndent', 'endIndent', 'spaceBefore', 'spaceAfter', + 'autoHyphenate', 'hyphenatedWordSize', 'preHyphen', 'postHyphen', 'consecutiveHyphens', + 'zone', 'wordSpacing', 'letterSpacing', 'glyphSpacing', 'autoLeading', 'leadingType', + 'hanging', 'burasagari', 'kinsokuOrder', 'everyLineComposer', +]; +var styleKeys = [ + 'font', 'fontSize', 'fauxBold', 'fauxItalic', 'autoLeading', 'leading', 'horizontalScale', + 'verticalScale', 'tracking', 'autoKerning', 'kerning', 'baselineShift', 'fontCaps', 'fontBaseline', + 'underline', 'strikethrough', 'ligatures', 'dLigatures', 'baselineDirection', 'tsume', + 'styleRunAlignment', 'language', 'noBreak', 'fillColor', 'strokeColor', 'fillFlag', + 'strokeFlag', 'fillFirst', 'yUnderline', 'outlineWidth', 'characterDirection', 'hindiNumbers', + 'kashida', 'diacriticPos', +]; +var antialias = ['none', 'crisp', 'strong', 'smooth', 'sharp']; +var justification = ['left', 'right', 'center']; +function upperFirst(value) { + return value.substr(0, 1).toUpperCase() + value.substr(1); +} +function decodeColor(color) { + var c = color.Values; + if (color.Type === 0) { // grayscale + return { r: c[1] * 255, g: c[1] * 255, b: c[1] * 255 }; // , c[0] * 255]; + } + else { // rgb + return { r: c[1] * 255, g: c[2] * 255, b: c[3] * 255, a: c[0] }; // , c[0] * 255]; + } +} +function encodeColor(color) { + if (color && 'r' in color) { + return ['a' in color ? color.a : 1, color.r / 255, color.g / 255, color.b / 255]; + } + else { + return [0, 0, 0, 0]; + } +} +function arraysEqual(a, b) { + if (!a || !b) + return false; + if (a.length !== b.length) + return false; + for (var i = 0; i < a.length; i++) + if (a[i] !== b[i]) + return false; + return true; +} +function objectsEqual(a, b) { + if (!a || !b) + return false; + for (var _i = 0, _a = Object.keys(a); _i < _a.length; _i++) { + var key = _a[_i]; + if (a[key] !== b[key]) + return false; + } + for (var _b = 0, _c = Object.keys(b); _b < _c.length; _b++) { + var key = _c[_b]; + if (a[key] !== b[key]) + return false; + } + return true; +} +function findOrAddFont(fonts, font) { + for (var i = 0; i < fonts.length; i++) { + if (fonts[i].name === font.name) + return i; + } + fonts.push(font); + return fonts.length - 1; +} +function decodeObject(obj, keys, fonts) { + var result = {}; + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + var Key = upperFirst(key); + if (obj[Key] === undefined) + continue; + if (key === 'justification') { + result[key] = justification[obj[Key]]; + } + else if (key === 'font') { + result[key] = fonts[obj[Key]]; + } + else if (key === 'fillColor' || key === 'strokeColor') { + result[key] = decodeColor(obj[Key]); + } + else { + result[key] = obj[Key]; + } + } + return result; +} +function encodeObject(obj, keys, fonts) { + var _a; + var result = {}; + for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) { + var key = keys_2[_i]; + var Key = upperFirst(key); + if (obj[key] === undefined) + continue; + if (key === 'justification') { + result[Key] = justification.indexOf((_a = obj[key]) !== null && _a !== void 0 ? _a : 'left'); + } + else if (key === 'font') { + result[Key] = findOrAddFont(fonts, obj[key]); + } + else if (key === 'fillColor' || key === 'strokeColor') { + result[Key] = { Type: 1, Values: encodeColor(obj[key]) }; + } + else { + result[Key] = obj[key]; + } + } + return result; +} +function decodeParagraphStyle(obj, fonts) { + return decodeObject(obj, paragraphStyleKeys, fonts); +} +function decodeStyle(obj, fonts) { + return decodeObject(obj, styleKeys, fonts); +} +function encodeParagraphStyle(obj, fonts) { + return encodeObject(obj, paragraphStyleKeys, fonts); +} +function encodeStyle(obj, fonts) { + return encodeObject(obj, styleKeys, fonts); +} +function deduplicateValues(base, runs, keys) { + if (!runs.length) + return; + var _loop_1 = function (key) { + var value = runs[0].style[key]; + if (value !== undefined) { + var identical = false; + if (Array.isArray(value)) { + identical = runs.every(function (r) { return arraysEqual(r.style[key], value); }); + } + else if (typeof value === 'object') { + identical = runs.every(function (r) { return objectsEqual(r.style[key], value); }); + } + else { + identical = runs.every(function (r) { return r.style[key] === value; }); + } + if (identical) { + base[key] = value; + } + } + var styleValue = base[key]; + if (styleValue !== undefined) { + for (var _a = 0, runs_1 = runs; _a < runs_1.length; _a++) { + var r = runs_1[_a]; + var same = false; + if (Array.isArray(value)) { + same = arraysEqual(r.style[key], value); + } + else if (typeof value === 'object') { + same = objectsEqual(r.style[key], value); + } + else { + same = r.style[key] === value; + } + if (same) + delete r.style[key]; + } + } + }; + for (var _i = 0, keys_3 = keys; _i < keys_3.length; _i++) { + var key = keys_3[_i]; + _loop_1(key); + } + if (runs.every(function (x) { return Object.keys(x.style).length === 0; })) { + runs.length = 0; + } +} +function decodeEngineData(engineData) { + var _a, _b, _c, _d, _e, _f; + // console.log('engineData', require('util').inspect(engineData, false, 99, true)); + var engineDict = engineData.EngineDict; + var resourceDict = engineData.ResourceDict; + var fonts = resourceDict.FontSet.map(function (f) { return ({ + name: f.Name, + script: f.Script, + type: f.FontType, + synthetic: f.Synthetic, + }); }); + var text = engineDict.Editor.Text.replace(/\r/g, '\n'); + var removedCharacters = 0; + while (/\n$/.test(text)) { + text = text.substr(0, text.length - 1); + removedCharacters++; + } + var result = { + text: text, + antiAlias: (_a = antialias[engineDict.AntiAlias]) !== null && _a !== void 0 ? _a : 'smooth', + useFractionalGlyphWidths: !!engineDict.UseFractionalGlyphWidths, + superscriptSize: resourceDict.SuperscriptSize, + superscriptPosition: resourceDict.SuperscriptPosition, + subscriptSize: resourceDict.SubscriptSize, + subscriptPosition: resourceDict.SubscriptPosition, + smallCapSize: resourceDict.SmallCapSize, + }; + // shape + var photoshop = (_f = (_e = (_d = (_c = (_b = engineDict.Rendered) === null || _b === void 0 ? void 0 : _b.Shapes) === null || _c === void 0 ? void 0 : _c.Children) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.Cookie) === null || _f === void 0 ? void 0 : _f.Photoshop; + if (photoshop) { + result.shapeType = photoshop.ShapeType === 1 ? 'box' : 'point'; + if (photoshop.PointBase) + result.pointBase = photoshop.PointBase; + if (photoshop.BoxBounds) + result.boxBounds = photoshop.BoxBounds; + } + // paragraph style + // const theNormalParagraphSheet = resourceDict.TheNormalParagraphSheet; + // const paragraphSheetSet = resourceDict.ParagraphSheetSet; + // const paragraphProperties = paragraphSheetSet[theNormalParagraphSheet].Properties; + var paragraphRun = engineData.EngineDict.ParagraphRun; + result.paragraphStyle = {}; // decodeParagraphStyle(paragraphProperties, fonts); + result.paragraphStyleRuns = []; + for (var i = 0; i < paragraphRun.RunArray.length; i++) { + var run_1 = paragraphRun.RunArray[i]; + var length_1 = paragraphRun.RunLengthArray[i]; + var style = decodeParagraphStyle(run_1.ParagraphSheet.Properties, fonts); + // const adjustments = { + // axis: run.Adjustments.Axis, + // xy: run.Adjustments.XY, + // }; + result.paragraphStyleRuns.push({ length: length_1, style: style /*, adjustments*/ }); + } + for (var counter = removedCharacters; result.paragraphStyleRuns.length && counter > 0; counter--) { + if (--result.paragraphStyleRuns[result.paragraphStyleRuns.length - 1].length === 0) { + result.paragraphStyleRuns.pop(); + } + } + deduplicateValues(result.paragraphStyle, result.paragraphStyleRuns, paragraphStyleKeys); + if (!result.paragraphStyleRuns.length) + delete result.paragraphStyleRuns; + // style + // const theNormalStyleSheet = resourceDict.TheNormalStyleSheet; + // const styleSheetSet = resourceDict.StyleSheetSet; + // const styleSheetData = styleSheetSet[theNormalStyleSheet].StyleSheetData; + var styleRun = engineData.EngineDict.StyleRun; + result.style = {}; // decodeStyle(styleSheetData, fonts); + result.styleRuns = []; + for (var i = 0; i < styleRun.RunArray.length; i++) { + var length_2 = styleRun.RunLengthArray[i]; + var style = decodeStyle(styleRun.RunArray[i].StyleSheet.StyleSheetData, fonts); + result.styleRuns.push({ length: length_2, style: style }); + } + for (var counter = removedCharacters; result.styleRuns.length && counter > 0; counter--) { + if (--result.styleRuns[result.styleRuns.length - 1].length === 0) { + result.styleRuns.pop(); + } + } + deduplicateValues(result.style, result.styleRuns, styleKeys); + if (!result.styleRuns.length) + delete result.styleRuns; + return result; +} +exports.decodeEngineData = decodeEngineData; +function encodeEngineData(data) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; + var text = "".concat((data.text || '').replace(/\r?\n/g, '\r'), "\r"); + var fonts = [ + { name: 'AdobeInvisFont', script: 0, type: 0, synthetic: 0 }, + ]; + var defFont = ((_a = data.style) === null || _a === void 0 ? void 0 : _a.font) || ((_c = (_b = data.styleRuns) === null || _b === void 0 ? void 0 : _b.find(function (s) { return s.style.font; })) === null || _c === void 0 ? void 0 : _c.style.font) || defaultFont; + var paragraphRunArray = []; + var paragraphRunLengthArray = []; + var paragraphRuns = data.paragraphStyleRuns; + if (paragraphRuns && paragraphRuns.length) { + var leftLength_1 = text.length; + for (var _i = 0, paragraphRuns_1 = paragraphRuns; _i < paragraphRuns_1.length; _i++) { + var run_2 = paragraphRuns_1[_i]; + var runLength = Math.min(run_2.length, leftLength_1); + leftLength_1 -= runLength; + if (!runLength) + continue; // ignore 0 size runs + // extend last run if it's only for trailing \r + if (leftLength_1 === 1 && run_2 === paragraphRuns[paragraphRuns.length - 1]) { + runLength++; + leftLength_1--; + } + paragraphRunLengthArray.push(runLength); + paragraphRunArray.push({ + ParagraphSheet: { + DefaultStyleSheet: 0, + Properties: encodeParagraphStyle(__assign(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), run_2.style), fonts), + }, + Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, + }); + } + if (leftLength_1) { + paragraphRunLengthArray.push(leftLength_1); + paragraphRunArray.push({ + ParagraphSheet: { + DefaultStyleSheet: 0, + Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), + }, + Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, + }); + } + } + else { + for (var i = 0, last = 0; i < text.length; i++) { + if (text.charCodeAt(i) === 13) { // \r + paragraphRunLengthArray.push(i - last + 1); + paragraphRunArray.push({ + ParagraphSheet: { + DefaultStyleSheet: 0, + Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), + }, + Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, + }); + last = i + 1; + } + } + } + var styleSheetData = encodeStyle(__assign(__assign({}, defaultStyle), { font: defFont }), fonts); + var styleRuns = data.styleRuns || [{ length: text.length, style: data.style || {} }]; + var styleRunArray = []; + var styleRunLengthArray = []; + var leftLength = text.length; + for (var _o = 0, styleRuns_1 = styleRuns; _o < styleRuns_1.length; _o++) { + var run_3 = styleRuns_1[_o]; + var runLength = Math.min(run_3.length, leftLength); + leftLength -= runLength; + if (!runLength) + continue; // ignore 0 size runs + // extend last run if it's only for trailing \r + if (leftLength === 1 && run_3 === styleRuns[styleRuns.length - 1]) { + runLength++; + leftLength--; + } + styleRunLengthArray.push(runLength); + styleRunArray.push({ + StyleSheet: { + StyleSheetData: encodeStyle(__assign(__assign({ kerning: 0, autoKerning: true, fillColor: { r: 0, g: 0, b: 0 } }, data.style), run_3.style), fonts), + }, + }); + } + // add extra run to the end if existing ones didn't fill it up + if (leftLength && styleRuns.length) { + styleRunLengthArray.push(leftLength); + styleRunArray.push({ + StyleSheet: { + StyleSheetData: encodeStyle(__assign({ kerning: 0, autoKerning: true, fillColor: { r: 0, g: 0, b: 0 } }, data.style), fonts), + }, + }); + } + var gridInfo = __assign(__assign({}, defaultGridInfo), data.gridInfo); + var WritingDirection = data.orientation === 'vertical' ? 2 : 0; + var Procession = data.orientation === 'vertical' ? 1 : 0; + var ShapeType = data.shapeType === 'box' ? 1 : 0; + var Photoshop = { + ShapeType: ShapeType, + }; + if (ShapeType === 0) { + Photoshop.PointBase = data.pointBase || [0, 0]; + } + else { + Photoshop.BoxBounds = data.boxBounds || [0, 0, 0, 0]; + } + // needed for correct order of properties + Photoshop.Base = { + ShapeType: ShapeType, + TransformPoint0: [1, 0], + TransformPoint1: [0, 1], + TransformPoint2: [0, 0], + }; + var defaultResources = { + KinsokuSet: [ + { + Name: 'PhotoshopKinsokuHard', + NoStart: '、。,.・:;?!ー―’”)〕]}〉》」』】ヽヾゝゞ々ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ゛゜?!)]},.:;℃℉¢%‰', + NoEnd: '‘“(〔[{〈《「『【([{¥$£@§〒#', + Keep: '―‥', + Hanging: '、。.,', + }, + { + Name: 'PhotoshopKinsokuSoft', + NoStart: '、。,.・:;?!’”)〕]}〉》」』】ヽヾゝゞ々', + NoEnd: '‘“(〔[{〈《「『【', + Keep: '―‥', + Hanging: '、。.,', + }, + ], + MojiKumiSet: [ + { InternalName: 'Photoshop6MojiKumiSet1' }, + { InternalName: 'Photoshop6MojiKumiSet2' }, + { InternalName: 'Photoshop6MojiKumiSet3' }, + { InternalName: 'Photoshop6MojiKumiSet4' }, + ], + TheNormalStyleSheet: 0, + TheNormalParagraphSheet: 0, + ParagraphSheetSet: [ + { + Name: 'Normal RGB', + DefaultStyleSheet: 0, + Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), + }, + ], + StyleSheetSet: [ + { + Name: 'Normal RGB', + StyleSheetData: styleSheetData, + }, + ], + FontSet: fonts.map(function (f) { return ({ + Name: f.name, + Script: f.script || 0, + FontType: f.type || 0, + Synthetic: f.synthetic || 0, + }); }), + SuperscriptSize: (_d = data.superscriptSize) !== null && _d !== void 0 ? _d : 0.583, + SuperscriptPosition: (_e = data.superscriptPosition) !== null && _e !== void 0 ? _e : 0.333, + SubscriptSize: (_f = data.subscriptSize) !== null && _f !== void 0 ? _f : 0.583, + SubscriptPosition: (_g = data.subscriptPosition) !== null && _g !== void 0 ? _g : 0.333, + SmallCapSize: (_h = data.smallCapSize) !== null && _h !== void 0 ? _h : 0.7, + }; + var engineData = { + EngineDict: { + Editor: { Text: text }, + ParagraphRun: { + DefaultRunData: { + ParagraphSheet: { DefaultStyleSheet: 0, Properties: {} }, + Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, + }, + RunArray: paragraphRunArray, + RunLengthArray: paragraphRunLengthArray, + IsJoinable: 1, + }, + StyleRun: { + DefaultRunData: { StyleSheet: { StyleSheetData: {} } }, + RunArray: styleRunArray, + RunLengthArray: styleRunLengthArray, + IsJoinable: 2, + }, + GridInfo: { + GridIsOn: !!gridInfo.isOn, + ShowGrid: !!gridInfo.show, + GridSize: (_j = gridInfo.size) !== null && _j !== void 0 ? _j : 18, + GridLeading: (_k = gridInfo.leading) !== null && _k !== void 0 ? _k : 22, + GridColor: { Type: 1, Values: encodeColor(gridInfo.color) }, + GridLeadingFillColor: { Type: 1, Values: encodeColor(gridInfo.color) }, + AlignLineHeightToGridFlags: !!gridInfo.alignLineHeightToGridFlags, + }, + AntiAlias: antialias.indexOf((_l = data.antiAlias) !== null && _l !== void 0 ? _l : 'sharp'), + UseFractionalGlyphWidths: (_m = data.useFractionalGlyphWidths) !== null && _m !== void 0 ? _m : true, + Rendered: { + Version: 1, + Shapes: { + WritingDirection: WritingDirection, + Children: [ + { + ShapeType: ShapeType, + Procession: Procession, + Lines: { WritingDirection: WritingDirection, Children: [] }, + Cookie: { Photoshop: Photoshop }, + }, + ], + }, + }, + }, + ResourceDict: __assign({}, defaultResources), + DocumentResources: __assign({}, defaultResources), + }; + // console.log('encodeEngineData', require('util').inspect(engineData, false, 99, true)); + return engineData; +} +exports.encodeEngineData = encodeEngineData; + },{}],14:[function(require,module,exports){ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeString = exports.encodeString = exports.encodeStringTo = exports.stringLengthInBytes = void 0; -function charLengthInBytes(code) { - if ((code & 0xffffff80) === 0) { - return 1; - } - else if ((code & 0xfffff800) === 0) { - return 2; - } - else if ((code & 0xffff0000) === 0) { - return 3; - } - else { - return 4; - } -} -function stringLengthInBytes(value) { - var result = 0; - for (var i = 0; i < value.length; i++) { - var code = value.charCodeAt(i); - // high surrogate - if (code >= 0xd800 && code <= 0xdbff) { - if ((i + 1) < value.length) { - var extra = value.charCodeAt(i + 1); - // low surrogate - if ((extra & 0xfc00) === 0xdc00) { - i++; - result += charLengthInBytes(((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000); - } - } - } - else { - result += charLengthInBytes(code); - } - } - return result; -} -exports.stringLengthInBytes = stringLengthInBytes; -function writeCharacter(buffer, offset, code) { - var length = charLengthInBytes(code); - switch (length) { - case 1: - buffer[offset] = code; - break; - case 2: - buffer[offset] = ((code >> 6) & 0x1f) | 0xc0; - buffer[offset + 1] = (code & 0x3f) | 0x80; - break; - case 3: - buffer[offset] = ((code >> 12) & 0x0f) | 0xe0; - buffer[offset + 1] = ((code >> 6) & 0x3f) | 0x80; - buffer[offset + 2] = (code & 0x3f) | 0x80; - break; - default: - buffer[offset] = ((code >> 18) & 0x07) | 0xf0; - buffer[offset + 1] = ((code >> 12) & 0x3f) | 0x80; - buffer[offset + 2] = ((code >> 6) & 0x3f) | 0x80; - buffer[offset + 3] = (code & 0x3f) | 0x80; - break; - } - return length; -} -function encodeStringTo(buffer, offset, value) { - for (var i = 0; i < value.length; i++) { - var code = value.charCodeAt(i); - // high surrogate - if (code >= 0xd800 && code <= 0xdbff) { - if ((i + 1) < value.length) { - var extra = value.charCodeAt(i + 1); - // low surrogate - if ((extra & 0xfc00) === 0xdc00) { - i++; - var fullCode = ((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; - offset += writeCharacter(buffer, offset, fullCode); - } - } - } - else { - offset += writeCharacter(buffer, offset, code); - } - } - return offset; -} -exports.encodeStringTo = encodeStringTo; -function encodeString(value) { - var buffer = new Uint8Array(stringLengthInBytes(value)); - encodeStringTo(buffer, 0, value); - return buffer; -} -exports.encodeString = encodeString; -function continuationByte(buffer, index) { - if (index >= buffer.length) { - throw Error('Invalid byte index'); - } - var continuationByte = buffer[index]; - if ((continuationByte & 0xC0) === 0x80) { - return continuationByte & 0x3F; - } - else { - throw Error('Invalid continuation byte'); - } -} -function decodeString(value) { - var result = ''; - for (var i = 0; i < value.length;) { - var byte1 = value[i++]; - var code = void 0; - if ((byte1 & 0x80) === 0) { - code = byte1; - } - else if ((byte1 & 0xe0) === 0xc0) { - var byte2 = continuationByte(value, i++); - code = ((byte1 & 0x1f) << 6) | byte2; - if (code < 0x80) { - throw Error('Invalid continuation byte'); - } - } - else if ((byte1 & 0xf0) === 0xe0) { - var byte2 = continuationByte(value, i++); - var byte3 = continuationByte(value, i++); - code = ((byte1 & 0x0f) << 12) | (byte2 << 6) | byte3; - if (code < 0x0800) { - throw Error('Invalid continuation byte'); - } - if (code >= 0xd800 && code <= 0xdfff) { - throw Error("Lone surrogate U+".concat(code.toString(16).toUpperCase(), " is not a scalar value")); - } - } - else if ((byte1 & 0xf8) === 0xf0) { - var byte2 = continuationByte(value, i++); - var byte3 = continuationByte(value, i++); - var byte4 = continuationByte(value, i++); - code = ((byte1 & 0x0f) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; - if (code < 0x010000 || code > 0x10ffff) { - throw Error('Invalid continuation byte'); - } - } - else { - throw Error('Invalid UTF-8 detected'); - } - if (code > 0xffff) { - code -= 0x10000; - result += String.fromCharCode(code >>> 10 & 0x3ff | 0xd800); - code = 0xdc00 | code & 0x3ff; - } - result += String.fromCharCode(code); - } - return result; -} -exports.decodeString = decodeString; +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decodeString = exports.encodeString = exports.encodeStringTo = exports.stringLengthInBytes = void 0; +function charLengthInBytes(code) { + if ((code & 0xffffff80) === 0) { + return 1; + } + else if ((code & 0xfffff800) === 0) { + return 2; + } + else if ((code & 0xffff0000) === 0) { + return 3; + } + else { + return 4; + } +} +function stringLengthInBytes(value) { + var result = 0; + for (var i = 0; i < value.length; i++) { + var code = value.charCodeAt(i); + // high surrogate + if (code >= 0xd800 && code <= 0xdbff) { + if ((i + 1) < value.length) { + var extra = value.charCodeAt(i + 1); + // low surrogate + if ((extra & 0xfc00) === 0xdc00) { + i++; + result += charLengthInBytes(((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000); + } + } + } + else { + result += charLengthInBytes(code); + } + } + return result; +} +exports.stringLengthInBytes = stringLengthInBytes; +function writeCharacter(buffer, offset, code) { + var length = charLengthInBytes(code); + switch (length) { + case 1: + buffer[offset] = code; + break; + case 2: + buffer[offset] = ((code >> 6) & 0x1f) | 0xc0; + buffer[offset + 1] = (code & 0x3f) | 0x80; + break; + case 3: + buffer[offset] = ((code >> 12) & 0x0f) | 0xe0; + buffer[offset + 1] = ((code >> 6) & 0x3f) | 0x80; + buffer[offset + 2] = (code & 0x3f) | 0x80; + break; + default: + buffer[offset] = ((code >> 18) & 0x07) | 0xf0; + buffer[offset + 1] = ((code >> 12) & 0x3f) | 0x80; + buffer[offset + 2] = ((code >> 6) & 0x3f) | 0x80; + buffer[offset + 3] = (code & 0x3f) | 0x80; + break; + } + return length; +} +function encodeStringTo(buffer, offset, value) { + for (var i = 0; i < value.length; i++) { + var code = value.charCodeAt(i); + // high surrogate + if (code >= 0xd800 && code <= 0xdbff) { + if ((i + 1) < value.length) { + var extra = value.charCodeAt(i + 1); + // low surrogate + if ((extra & 0xfc00) === 0xdc00) { + i++; + var fullCode = ((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; + offset += writeCharacter(buffer, offset, fullCode); + } + } + } + else { + offset += writeCharacter(buffer, offset, code); + } + } + return offset; +} +exports.encodeStringTo = encodeStringTo; +function encodeString(value) { + var buffer = new Uint8Array(stringLengthInBytes(value)); + encodeStringTo(buffer, 0, value); + return buffer; +} +exports.encodeString = encodeString; +function continuationByte(buffer, index) { + if (index >= buffer.length) { + throw Error('Invalid byte index'); + } + var continuationByte = buffer[index]; + if ((continuationByte & 0xC0) === 0x80) { + return continuationByte & 0x3F; + } + else { + throw Error('Invalid continuation byte'); + } +} +function decodeString(value) { + var result = ''; + for (var i = 0; i < value.length;) { + var byte1 = value[i++]; + var code = void 0; + if ((byte1 & 0x80) === 0) { + code = byte1; + } + else if ((byte1 & 0xe0) === 0xc0) { + var byte2 = continuationByte(value, i++); + code = ((byte1 & 0x1f) << 6) | byte2; + if (code < 0x80) { + throw Error('Invalid continuation byte'); + } + } + else if ((byte1 & 0xf0) === 0xe0) { + var byte2 = continuationByte(value, i++); + var byte3 = continuationByte(value, i++); + code = ((byte1 & 0x0f) << 12) | (byte2 << 6) | byte3; + if (code < 0x0800) { + throw Error('Invalid continuation byte'); + } + if (code >= 0xd800 && code <= 0xdfff) { + throw Error("Lone surrogate U+".concat(code.toString(16).toUpperCase(), " is not a scalar value")); + } + } + else if ((byte1 & 0xf8) === 0xf0) { + var byte2 = continuationByte(value, i++); + var byte3 = continuationByte(value, i++); + var byte4 = continuationByte(value, i++); + code = ((byte1 & 0x0f) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; + if (code < 0x010000 || code > 0x10ffff) { + throw Error('Invalid continuation byte'); + } + } + else { + throw Error('Invalid UTF-8 detected'); + } + if (code > 0xffff) { + code -= 0x10000; + result += String.fromCharCode(code >>> 10 & 0x3ff | 0xd800); + code = 0xdc00 | code & 0x3ff; + } + result += String.fromCharCode(code); + } + return result; +} +exports.decodeString = decodeString; + },{}],15:[function(require,module,exports){ 'use strict' @@ -11151,7 +10573,7 @@ Deflate.prototype.onEnd = function (status) { /** * deflate(data[, options]) -> Uint8Array - * - data (Uint8Array|ArrayBuffer|String): input data to compress. + * - data (Uint8Array|String): input data to compress. * - options (Object): zlib deflate options. * * Compress `data` with deflate algorithm and `options`. @@ -11195,7 +10617,7 @@ function deflate(input, options) { /** * deflateRaw(data[, options]) -> Uint8Array - * - data (Uint8Array|ArrayBuffer|String): input data to compress. + * - data (Uint8Array|String): input data to compress. * - options (Object): zlib deflate options. * * The same as [[deflate]], but creates raw data, without wrapper @@ -11210,7 +10632,7 @@ function deflateRaw(input, options) { /** * gzip(data[, options]) -> Uint8Array - * - data (Uint8Array|ArrayBuffer|String): input data to compress. + * - data (Uint8Array|String): input data to compress. * - options (Object): zlib deflate options. * * The same as [[deflate]], but create gzip wrapper instead of @@ -11570,7 +10992,7 @@ Inflate.prototype.onEnd = function (status) { /** * inflate(data[, options]) -> Uint8Array|String - * - data (Uint8Array|ArrayBuffer): input data to decompress. + * - data (Uint8Array): input data to decompress. * - options (Object): zlib inflate options. * * Decompress `data` with inflate/ungzip and `options`. Autodetect @@ -11621,7 +11043,7 @@ function inflate(input, options) { /** * inflateRaw(data[, options]) -> Uint8Array|String - * - data (Uint8Array|ArrayBuffer): input data to decompress. + * - data (Uint8Array): input data to decompress. * - options (Object): zlib inflate options. * * The same as [[inflate]], but creates raw data, without wrapper @@ -11636,7 +11058,7 @@ function inflateRaw(input, options) { /** * ungzip(data[, options]) -> Uint8Array|String - * - data (Uint8Array|ArrayBuffer): input data to decompress. + * - data (Uint8Array): input data to decompress. * - options (Object): zlib inflate options. * * Just shortcut to [[inflate]], because it autodetects format @@ -12130,16 +11552,13 @@ const MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); const PRESET_DICT = 0x20; -const INIT_STATE = 42; /* zlib header -> BUSY_STATE */ -//#ifdef GZIP -const GZIP_STATE = 57; /* gzip header -> BUSY_STATE | EXTRA_STATE */ -//#endif -const EXTRA_STATE = 69; /* gzip extra block -> NAME_STATE */ -const NAME_STATE = 73; /* gzip file name -> COMMENT_STATE */ -const COMMENT_STATE = 91; /* gzip comment -> HCRC_STATE */ -const HCRC_STATE = 103; /* gzip header CRC -> BUSY_STATE */ -const BUSY_STATE = 113; /* deflate -> FINISH_STATE */ -const FINISH_STATE = 666; /* stream complete */ +const INIT_STATE = 42; +const EXTRA_STATE = 69; +const NAME_STATE = 73; +const COMMENT_STATE = 91; +const HCRC_STATE = 103; +const BUSY_STATE = 113; +const FINISH_STATE = 666; const BS_NEED_MORE = 1; /* block not completed, need more input or more output */ const BS_BLOCK_DONE = 2; /* block flush performed */ @@ -12154,41 +11573,13 @@ const err = (strm, errorCode) => { }; const rank = (f) => { - return ((f) * 2) - ((f) > 4 ? 9 : 0); + return ((f) << 1) - ((f) > 4 ? 9 : 0); }; const zero = (buf) => { let len = buf.length; while (--len >= 0) { buf[len] = 0; } }; -/* =========================================================================== - * Slide the hash table when sliding the window down (could be avoided with 32 - * bit values at the expense of memory usage). We slide even when level == 0 to - * keep the hash table consistent if we switch back to level > 0 later. - */ -const slide_hash = (s) => { - let n, m; - let p; - let wsize = s.w_size; - - n = s.hash_size; - p = n; - do { - m = s.head[--p]; - s.head[p] = (m >= wsize ? m - wsize : 0); - } while (--n); - n = wsize; -//#ifndef FASTEST - p = n; - do { - m = s.prev[--p]; - s.prev[p] = (m >= wsize ? m - wsize : 0); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); -//#endif -}; /* eslint-disable new-cap */ let HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask; @@ -12197,12 +11588,11 @@ let HASH_ZLIB = (s, prev, data) => ((prev << s.hash_shift) ^ data) & s.hash_mask //let HASH_FAST = (s, prev, data) => ((prev << 8) + (prev >> 8) + (data << 4)) & s.hash_mask; let HASH = HASH_ZLIB; - /* ========================================================================= - * Flush as much pending output as possible. All deflate() output, except for - * some deflate_stored() output, goes through this function so some - * applications may wish to modify it to avoid allocating a large - * strm->next_out buffer and copying into it. (See also read_buf()). + * Flush as much pending output as possible. All deflate() output goes + * through this function so some applications may wish to modify it + * to avoid allocating a large strm->output buffer and copying into it. + * (See also read_buf()). */ const flush_pending = (strm) => { const s = strm.state; @@ -12215,11 +11605,11 @@ const flush_pending = (strm) => { if (len === 0) { return; } strm.output.set(s.pending_buf.subarray(s.pending_out, s.pending_out + len), strm.next_out); - strm.next_out += len; - s.pending_out += len; + strm.next_out += len; + s.pending_out += len; strm.total_out += len; strm.avail_out -= len; - s.pending -= len; + s.pending -= len; if (s.pending === 0) { s.pending_out = 0; } @@ -12411,7 +11801,7 @@ const longest_match = (s, cur_match) => { const fill_window = (s) => { const _w_size = s.w_size; - let n, more, str; + let p, n, m, more, str; //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); @@ -12438,15 +11828,38 @@ const fill_window = (s) => { */ if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { - s.window.set(s.window.subarray(_w_size, _w_size + _w_size - more), 0); + s.window.set(s.window.subarray(_w_size, _w_size + _w_size), 0); s.match_start -= _w_size; s.strstart -= _w_size; /* we now have strstart >= MAX_DIST */ s.block_start -= _w_size; - if (s.insert > s.strstart) { - s.insert = s.strstart; - } - slide_hash(s); + + /* Slide the hash table (could be avoided with 32 bit values + at the expense of memory usage). We slide even when level == 0 + to keep the hash table consistent if we switch back to level > 0 + later. (Using level 0 permanently is not an optimal usage of + zlib, so we don't care about this pathological case.) + */ + + n = s.hash_size; + p = n; + + do { + m = s.head[--p]; + s.head[p] = (m >= _w_size ? m - _w_size : 0); + } while (--n); + + n = _w_size; + p = n; + + do { + m = s.prev[--p]; + s.prev[p] = (m >= _w_size ? m - _w_size : 0); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); + more += _w_size; } if (s.strm.avail_in === 0) { @@ -12538,216 +11951,104 @@ const fill_window = (s) => { /* =========================================================================== * Copy without compression as much as possible from the input stream, return * the current block state. - * - * In case deflateParams() is used to later switch to a non-zero compression - * level, s->matches (otherwise unused when storing) keeps track of the number - * of hash table slides to perform. If s->matches is 1, then one hash table - * slide will be done when switching. If s->matches is 2, the maximum value - * allowed here, then the hash table will be cleared, since two or more slides - * is the same as a clear. - * - * deflate_stored() is written to minimize the number of times an input byte is - * copied. It is most efficient with large input and output buffers, which - * maximizes the opportunites to have a single copy from next_in to next_out. + * This function does not insert new strings in the dictionary since + * uncompressible data is probably not useful. This function is used + * only for the level=0 compression option. + * NOTE: this function should be optimized to avoid extra copying from + * window to pending_buf. */ const deflate_stored = (s, flush) => { - /* Smallest worthy block size when not flushing or finishing. By default - * this is 32K. This can be as small as 507 bytes for memLevel == 1. For - * large input and output buffers, the stored block size will be larger. + /* Stored blocks are limited to 0xffff bytes, pending_buf is limited + * to pending_buf_size, and each stored block has a 5 byte header: */ - let min_block = s.pending_buf_size - 5 > s.w_size ? s.w_size : s.pending_buf_size - 5; + let max_block_size = 0xffff; - /* Copy as many min_block or larger stored blocks directly to next_out as - * possible. If flushing, copy the remaining available input to next_out as - * stored blocks, if there is enough space. - */ - let len, left, have, last = 0; - let used = s.strm.avail_in; - do { - /* Set len to the maximum size block that we can copy directly with the - * available input data and output space. Set left to how much of that - * would be copied from what's left in the window. - */ - len = 65535/* MAX_STORED */; /* maximum deflate stored block length */ - have = (s.bi_valid + 42) >> 3; /* number of header bytes */ - if (s.strm.avail_out < have) { /* need room for header */ - break; - } - /* maximum stored block length that will fit in avail_out: */ - have = s.strm.avail_out - have; - left = s.strstart - s.block_start; /* bytes left in window */ - if (len > left + s.strm.avail_in) { - len = left + s.strm.avail_in; /* limit len to the input */ - } - if (len > have) { - len = have; /* limit len to the output */ - } - - /* If the stored block would be less than min_block in length, or if - * unable to copy all of the available input when flushing, then try - * copying to the window and the pending buffer instead. Also don't - * write an empty block when flushing -- deflate() does that. - */ - if (len < min_block && ((len === 0 && flush !== Z_FINISH) || - flush === Z_NO_FLUSH || - len !== left + s.strm.avail_in)) { - break; - } - - /* Make a dummy stored block in pending to get the header bytes, - * including any pending bits. This also updates the debugging counts. - */ - last = flush === Z_FINISH && len === left + s.strm.avail_in ? 1 : 0; - _tr_stored_block(s, 0, 0, last); - - /* Replace the lengths in the dummy stored block with len. */ - s.pending_buf[s.pending - 4] = len; - s.pending_buf[s.pending - 3] = len >> 8; - s.pending_buf[s.pending - 2] = ~len; - s.pending_buf[s.pending - 1] = ~len >> 8; - - /* Write the stored block header bytes. */ - flush_pending(s.strm); - -//#ifdef ZLIB_DEBUG -// /* Update debugging counts for the data about to be copied. */ -// s->compressed_len += len << 3; -// s->bits_sent += len << 3; -//#endif - - /* Copy uncompressed bytes from the window to next_out. */ - if (left) { - if (left > len) { - left = len; - } - //zmemcpy(s->strm->next_out, s->window + s->block_start, left); - s.strm.output.set(s.window.subarray(s.block_start, s.block_start + left), s.strm.next_out); - s.strm.next_out += left; - s.strm.avail_out -= left; - s.strm.total_out += left; - s.block_start += left; - len -= left; - } - - /* Copy uncompressed bytes directly from next_in to next_out, updating - * the check value. - */ - if (len) { - read_buf(s.strm, s.strm.output, s.strm.next_out, len); - s.strm.next_out += len; - s.strm.avail_out -= len; - s.strm.total_out += len; - } - } while (last === 0); - - /* Update the sliding window with the last s->w_size bytes of the copied - * data, or append all of the copied data to the existing window if less - * than s->w_size bytes were copied. Also update the number of bytes to - * insert in the hash tables, in the event that deflateParams() switches to - * a non-zero compression level. - */ - used -= s.strm.avail_in; /* number of input bytes directly copied */ - if (used) { - /* If any input was used, then no unused input remains in the window, - * therefore s->block_start == s->strstart. - */ - if (used >= s.w_size) { /* supplant the previous history */ - s.matches = 2; /* clear hash */ - //zmemcpy(s->window, s->strm->next_in - s->w_size, s->w_size); - s.window.set(s.strm.input.subarray(s.strm.next_in - s.w_size, s.strm.next_in), 0); - s.strstart = s.w_size; - s.insert = s.strstart; - } - else { - if (s.window_size - s.strstart <= used) { - /* Slide the window down. */ - s.strstart -= s.w_size; - //zmemcpy(s->window, s->window + s->w_size, s->strstart); - s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0); - if (s.matches < 2) { - s.matches++; /* add a pending slide_hash() */ - } - if (s.insert > s.strstart) { - s.insert = s.strstart; - } - } - //zmemcpy(s->window + s->strstart, s->strm->next_in - used, used); - s.window.set(s.strm.input.subarray(s.strm.next_in - used, s.strm.next_in), s.strstart); - s.strstart += used; - s.insert += used > s.w_size - s.insert ? s.w_size - s.insert : used; - } - s.block_start = s.strstart; - } - if (s.high_water < s.strstart) { - s.high_water = s.strstart; + if (max_block_size > s.pending_buf_size - 5) { + max_block_size = s.pending_buf_size - 5; } - /* If the last block was written to next_out, then done. */ - if (last) { + /* Copy as much as possible from input to output: */ + for (;;) { + /* Fill the window as much as possible: */ + if (s.lookahead <= 1) { + + //Assert(s->strstart < s->w_size+MAX_DIST(s) || + // s->block_start >= (long)s->w_size, "slide too late"); +// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || +// s.block_start >= s.w_size)) { +// throw new Error("slide too late"); +// } + + fill_window(s); + if (s.lookahead === 0 && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + + if (s.lookahead === 0) { + break; + } + /* flush the current block */ + } + //Assert(s->block_start >= 0L, "block gone"); +// if (s.block_start < 0) throw new Error("block gone"); + + s.strstart += s.lookahead; + s.lookahead = 0; + + /* Emit a stored block if pending_buf will be full: */ + const max_start = s.block_start + max_block_size; + + if (s.strstart === 0 || s.strstart >= max_start) { + /* strstart == 0 is possible when wraparound on 16-bit machine */ + s.lookahead = s.strstart - max_start; + s.strstart = max_start; + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + + + } + /* Flush if we may have to slide, otherwise block_start may become + * negative and the data will be gone: + */ + if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + + s.insert = 0; + + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ return BS_FINISH_DONE; } - /* If flushing and all input has been consumed, then done. */ - if (flush !== Z_NO_FLUSH && flush !== Z_FINISH && - s.strm.avail_in === 0 && s.strstart === s.block_start) { - return BS_BLOCK_DONE; - } - - /* Fill the window with any remaining input. */ - have = s.window_size - s.strstart; - if (s.strm.avail_in > have && s.block_start >= s.w_size) { - /* Slide the window down. */ - s.block_start -= s.w_size; - s.strstart -= s.w_size; - //zmemcpy(s->window, s->window + s->w_size, s->strstart); - s.window.set(s.window.subarray(s.w_size, s.w_size + s.strstart), 0); - if (s.matches < 2) { - s.matches++; /* add a pending slide_hash() */ + if (s.strstart > s.block_start) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; } - have += s.w_size; /* more space now */ - if (s.insert > s.strstart) { - s.insert = s.strstart; - } - } - if (have > s.strm.avail_in) { - have = s.strm.avail_in; - } - if (have) { - read_buf(s.strm, s.window, s.strstart, have); - s.strstart += have; - s.insert += have > s.w_size - s.insert ? s.w_size - s.insert : have; - } - if (s.high_water < s.strstart) { - s.high_water = s.strstart; + /***/ } - /* There was not enough avail_out to write a complete worthy or flushed - * stored block to next_out. Write a stored block to pending instead, if we - * have enough input for a worthy block, or if flushing and there is enough - * room for the remaining input as a stored block in the pending buffer. - */ - have = (s.bi_valid + 42) >> 3; /* number of header bytes */ - /* maximum stored block length that will fit in pending: */ - have = s.pending_buf_size - have > 65535/* MAX_STORED */ ? 65535/* MAX_STORED */ : s.pending_buf_size - have; - min_block = have > s.w_size ? s.w_size : have; - left = s.strstart - s.block_start; - if (left >= min_block || - ((left || flush === Z_FINISH) && flush !== Z_NO_FLUSH && - s.strm.avail_in === 0 && left <= have)) { - len = left > have ? have : left; - last = flush === Z_FINISH && s.strm.avail_in === 0 && - len === left ? 1 : 0; - _tr_stored_block(s, s.block_start, len, last); - s.block_start += len; - flush_pending(s.strm); - } - - /* We've done all we can with the available input and output. */ - return last ? BS_FINISH_STARTED : BS_NEED_MORE; + return BS_NEED_MORE; }; - /* =========================================================================== * Compress as much as possible from the input stream, return the current * block state. @@ -12868,7 +12169,7 @@ const deflate_fast = (s, flush) => { /***/ return BS_FINISH_DONE; } - if (s.sym_next) { + if (s.last_lit) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { @@ -13029,7 +12330,7 @@ const deflate_slow = (s, flush) => { /***/ return BS_FINISH_DONE; } - if (s.sym_next) { + if (s.last_lit) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { @@ -13128,7 +12429,7 @@ const deflate_rle = (s, flush) => { /***/ return BS_FINISH_DONE; } - if (s.sym_next) { + if (s.last_lit) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { @@ -13185,7 +12486,7 @@ const deflate_huff = (s, flush) => { /***/ return BS_FINISH_DONE; } - if (s.sym_next) { + if (s.last_lit) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { @@ -13386,7 +12687,7 @@ function DeflateState() { /* Depth of each subtree used as tie breaker for trees of equal frequency */ - this.sym_buf = 0; /* buffer for distances and literals/lengths */ + this.l_buf = 0; /* buffer index for literals or lengths */ this.lit_bufsize = 0; /* Size of match buffer for literals/lengths. There are 4 reasons for @@ -13408,8 +12709,13 @@ function DeflateState() { * - I can't count above 4 */ - this.sym_next = 0; /* running index in sym_buf */ - this.sym_end = 0; /* symbol table full when sym_next reaches this */ + this.last_lit = 0; /* running index in l_buf */ + + this.d_buf = 0; + /* Buffer index for distances. To simplify the code, d_buf and l_buf have + * the same number of elements. To use different lengths, an extra flag + * array would be necessary. + */ this.opt_len = 0; /* bit length of current block with optimal trees */ this.static_len = 0; /* bit length of current block with static trees */ @@ -13437,34 +12743,9 @@ function DeflateState() { } -/* ========================================================================= - * Check for a valid deflate stream state. Return 0 if ok, 1 if not. - */ -const deflateStateCheck = (strm) => { - - if (!strm) { - return 1; - } - const s = strm.state; - if (!s || s.strm !== strm || (s.status !== INIT_STATE && -//#ifdef GZIP - s.status !== GZIP_STATE && -//#endif - s.status !== EXTRA_STATE && - s.status !== NAME_STATE && - s.status !== COMMENT_STATE && - s.status !== HCRC_STATE && - s.status !== BUSY_STATE && - s.status !== FINISH_STATE)) { - return 1; - } - return 0; -}; - - const deflateResetKeep = (strm) => { - if (deflateStateCheck(strm)) { + if (!strm || !strm.state) { return err(strm, Z_STREAM_ERROR); } @@ -13479,16 +12760,12 @@ const deflateResetKeep = (strm) => { s.wrap = -s.wrap; /* was made negative by deflate(..., Z_FINISH); */ } - s.status = -//#ifdef GZIP - s.wrap === 2 ? GZIP_STATE : -//#endif - s.wrap ? INIT_STATE : BUSY_STATE; + s.status = (s.wrap ? INIT_STATE : BUSY_STATE); strm.adler = (s.wrap === 2) ? 0 // crc32(0, Z_NULL, 0) : 1; // adler32(0, Z_NULL, 0) - s.last_flush = -2; + s.last_flush = Z_NO_FLUSH; _tr_init(s); return Z_OK; }; @@ -13506,9 +12783,8 @@ const deflateReset = (strm) => { const deflateSetHeader = (strm, head) => { - if (deflateStateCheck(strm) || strm.state.wrap !== 2) { - return Z_STREAM_ERROR; - } + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } strm.state.gzhead = head; return Z_OK; }; @@ -13538,7 +12814,7 @@ const deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => { if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED || (windowBits === 8 && wrap !== 1)) { + strategy < 0 || strategy > Z_FIXED) { return err(strm, Z_STREAM_ERROR); } @@ -13552,7 +12828,6 @@ const deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => { strm.state = s; s.strm = strm; - s.status = INIT_STATE; /* to pass state test in deflateReset() */ s.wrap = wrap; s.gzhead = null; @@ -13574,58 +12849,18 @@ const deflateInit2 = (strm, level, method, windowBits, memLevel, strategy) => { s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - /* We overlay pending_buf and sym_buf. This works since the average size - * for length/distance pairs over any compressed block is assured to be 31 - * bits or less. - * - * Analysis: The longest fixed codes are a length code of 8 bits plus 5 - * extra bits, for lengths 131 to 257. The longest fixed distance codes are - * 5 bits plus 13 extra bits, for distances 16385 to 32768. The longest - * possible fixed-codes length/distance pair is then 31 bits total. - * - * sym_buf starts one-fourth of the way into pending_buf. So there are - * three bytes in sym_buf for every four bytes in pending_buf. Each symbol - * in sym_buf is three bytes -- two for the distance and one for the - * literal/length. As each symbol is consumed, the pointer to the next - * sym_buf value to read moves forward three bytes. From that symbol, up to - * 31 bits are written to pending_buf. The closest the written pending_buf - * bits gets to the next sym_buf symbol to read is just before the last - * code is written. At that time, 31*(n-2) bits have been written, just - * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at - * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1 - * symbols are written.) The closest the writing gets to what is unread is - * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and - * can range from 128 to 32768. - * - * Therefore, at a minimum, there are 142 bits of space between what is - * written and what is read in the overlain buffers, so the symbols cannot - * be overwritten by the compressed data. That space is actually 139 bits, - * due to the three-bit fixed-code block header. - * - * That covers the case where either Z_FIXED is specified, forcing fixed - * codes, or when the use of fixed codes is chosen, because that choice - * results in a smaller compressed block than dynamic codes. That latter - * condition then assures that the above analysis also covers all dynamic - * blocks. A dynamic-code block will only be chosen to be emitted if it has - * fewer bits than a fixed-code block would for the same set of symbols. - * Therefore its average symbol length is assured to be less than 31. So - * the compressed data for a dynamic block also cannot overwrite the - * symbols from which it is being constructed. - */ - s.pending_buf_size = s.lit_bufsize * 4; + + //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); + //s->pending_buf = (uchf *) overlay; s.pending_buf = new Uint8Array(s.pending_buf_size); // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) - //s->sym_buf = s->pending_buf + s->lit_bufsize; - s.sym_buf = s.lit_bufsize; + //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); + s.d_buf = 1 * s.lit_bufsize; - //s->sym_end = (s->lit_bufsize - 1) * 3; - s.sym_end = (s.lit_bufsize - 1) * 3; - /* We avoid equality with lit_bufsize*3 because of wraparound at 64K - * on 16 bit machines and because stored blocks are restricted to - * 64K-1 bytes. - */ + //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; + s.l_buf = (1 + 2) * s.lit_bufsize; s.level = level; s.strategy = strategy; @@ -13640,24 +12875,227 @@ const deflateInit = (strm, level) => { }; -/* ========================================================================= */ const deflate = (strm, flush) => { - if (deflateStateCheck(strm) || flush > Z_BLOCK || flush < 0) { + let beg, val; // for gzip header write only + + if (!strm || !strm.state || + flush > Z_BLOCK || flush < 0) { return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; } const s = strm.state; if (!strm.output || - (strm.avail_in !== 0 && !strm.input) || + (!strm.input && strm.avail_in !== 0) || (s.status === FINISH_STATE && flush !== Z_FINISH)) { return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); } + s.strm = strm; /* just in case */ const old_flush = s.last_flush; s.last_flush = flush; + /* Write the header */ + if (s.status === INIT_STATE) { + + if (s.wrap === 2) { // GZIP header + strm.adler = 0; //crc32(0L, Z_NULL, 0); + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (!s.gzhead) { // s->gzhead == Z_NULL + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, OS_CODE); + s.status = BUSY_STATE; + } + else { + put_byte(s, (s.gzhead.text ? 1 : 0) + + (s.gzhead.hcrc ? 2 : 0) + + (!s.gzhead.extra ? 0 : 4) + + (!s.gzhead.name ? 0 : 8) + + (!s.gzhead.comment ? 0 : 16) + ); + put_byte(s, s.gzhead.time & 0xff); + put_byte(s, (s.gzhead.time >> 8) & 0xff); + put_byte(s, (s.gzhead.time >> 16) & 0xff); + put_byte(s, (s.gzhead.time >> 24) & 0xff); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, s.gzhead.os & 0xff); + if (s.gzhead.extra && s.gzhead.extra.length) { + put_byte(s, s.gzhead.extra.length & 0xff); + put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); + } + if (s.gzhead.hcrc) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); + } + s.gzindex = 0; + s.status = EXTRA_STATE; + } + } + else // DEFLATE header + { + let header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; + let level_flags = -1; + + if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { + level_flags = 0; + } else if (s.level < 6) { + level_flags = 1; + } else if (s.level === 6) { + level_flags = 2; + } else { + level_flags = 3; + } + header |= (level_flags << 6); + if (s.strstart !== 0) { header |= PRESET_DICT; } + header += 31 - (header % 31); + + s.status = BUSY_STATE; + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s.strstart !== 0) { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + strm.adler = 1; // adler32(0L, Z_NULL, 0); + } + } + +//#ifdef GZIP + if (s.status === EXTRA_STATE) { + if (s.gzhead.extra/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + + while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + break; + } + } + put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); + s.gzindex++; + } + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (s.gzindex === s.gzhead.extra.length) { + s.gzindex = 0; + s.status = NAME_STATE; + } + } + else { + s.status = NAME_STATE; + } + } + if (s.status === NAME_STATE) { + if (s.gzhead.name/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.name.length) { + val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.gzindex = 0; + s.status = COMMENT_STATE; + } + } + else { + s.status = COMMENT_STATE; + } + } + if (s.status === COMMENT_STATE) { + if (s.gzhead.comment/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.comment.length) { + val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.status = HCRC_STATE; + } + } + else { + s.status = HCRC_STATE; + } + } + if (s.status === HCRC_STATE) { + if (s.gzhead.hcrc) { + if (s.pending + 2 > s.pending_buf_size) { + flush_pending(strm); + } + if (s.pending + 2 <= s.pending_buf_size) { + put_byte(s, strm.adler & 0xff); + put_byte(s, (strm.adler >> 8) & 0xff); + strm.adler = 0; //crc32(0L, Z_NULL, 0); + s.status = BUSY_STATE; + } + } + else { + s.status = BUSY_STATE; + } + } +//#endif + /* Flush as much pending output as possible */ if (s.pending !== 0) { flush_pending(strm); @@ -13686,238 +13124,13 @@ const deflate = (strm, flush) => { return err(strm, Z_BUF_ERROR); } - /* Write the header */ - if (s.status === INIT_STATE && s.wrap === 0) { - s.status = BUSY_STATE; - } - if (s.status === INIT_STATE) { - /* zlib header */ - let header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; - let level_flags = -1; - - if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { - level_flags = 0; - } else if (s.level < 6) { - level_flags = 1; - } else if (s.level === 6) { - level_flags = 2; - } else { - level_flags = 3; - } - header |= (level_flags << 6); - if (s.strstart !== 0) { header |= PRESET_DICT; } - header += 31 - (header % 31); - - putShortMSB(s, header); - - /* Save the adler32 of the preset dictionary: */ - if (s.strstart !== 0) { - putShortMSB(s, strm.adler >>> 16); - putShortMSB(s, strm.adler & 0xffff); - } - strm.adler = 1; // adler32(0L, Z_NULL, 0); - s.status = BUSY_STATE; - - /* Compression must start with an empty pending buffer */ - flush_pending(strm); - if (s.pending !== 0) { - s.last_flush = -1; - return Z_OK; - } - } -//#ifdef GZIP - if (s.status === GZIP_STATE) { - /* gzip header */ - strm.adler = 0; //crc32(0L, Z_NULL, 0); - put_byte(s, 31); - put_byte(s, 139); - put_byte(s, 8); - if (!s.gzhead) { // s->gzhead == Z_NULL - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, 0); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, OS_CODE); - s.status = BUSY_STATE; - - /* Compression must start with an empty pending buffer */ - flush_pending(strm); - if (s.pending !== 0) { - s.last_flush = -1; - return Z_OK; - } - } - else { - put_byte(s, (s.gzhead.text ? 1 : 0) + - (s.gzhead.hcrc ? 2 : 0) + - (!s.gzhead.extra ? 0 : 4) + - (!s.gzhead.name ? 0 : 8) + - (!s.gzhead.comment ? 0 : 16) - ); - put_byte(s, s.gzhead.time & 0xff); - put_byte(s, (s.gzhead.time >> 8) & 0xff); - put_byte(s, (s.gzhead.time >> 16) & 0xff); - put_byte(s, (s.gzhead.time >> 24) & 0xff); - put_byte(s, s.level === 9 ? 2 : - (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? - 4 : 0)); - put_byte(s, s.gzhead.os & 0xff); - if (s.gzhead.extra && s.gzhead.extra.length) { - put_byte(s, s.gzhead.extra.length & 0xff); - put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); - } - if (s.gzhead.hcrc) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); - } - s.gzindex = 0; - s.status = EXTRA_STATE; - } - } - if (s.status === EXTRA_STATE) { - if (s.gzhead.extra/* != Z_NULL*/) { - let beg = s.pending; /* start of bytes to update crc */ - let left = (s.gzhead.extra.length & 0xffff) - s.gzindex; - while (s.pending + left > s.pending_buf_size) { - let copy = s.pending_buf_size - s.pending; - // zmemcpy(s.pending_buf + s.pending, - // s.gzhead.extra + s.gzindex, copy); - s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex, s.gzindex + copy), s.pending); - s.pending = s.pending_buf_size; - //--- HCRC_UPDATE(beg) ---// - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - //---// - s.gzindex += copy; - flush_pending(strm); - if (s.pending !== 0) { - s.last_flush = -1; - return Z_OK; - } - beg = 0; - left -= copy; - } - // JS specific: s.gzhead.extra may be TypedArray or Array for backward compatibility - // TypedArray.slice and TypedArray.from don't exist in IE10-IE11 - let gzhead_extra = new Uint8Array(s.gzhead.extra); - // zmemcpy(s->pending_buf + s->pending, - // s->gzhead->extra + s->gzindex, left); - s.pending_buf.set(gzhead_extra.subarray(s.gzindex, s.gzindex + left), s.pending); - s.pending += left; - //--- HCRC_UPDATE(beg) ---// - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - //---// - s.gzindex = 0; - } - s.status = NAME_STATE; - } - if (s.status === NAME_STATE) { - if (s.gzhead.name/* != Z_NULL*/) { - let beg = s.pending; /* start of bytes to update crc */ - let val; - do { - if (s.pending === s.pending_buf_size) { - //--- HCRC_UPDATE(beg) ---// - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - //---// - flush_pending(strm); - if (s.pending !== 0) { - s.last_flush = -1; - return Z_OK; - } - beg = 0; - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.name.length) { - val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - //--- HCRC_UPDATE(beg) ---// - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - //---// - s.gzindex = 0; - } - s.status = COMMENT_STATE; - } - if (s.status === COMMENT_STATE) { - if (s.gzhead.comment/* != Z_NULL*/) { - let beg = s.pending; /* start of bytes to update crc */ - let val; - do { - if (s.pending === s.pending_buf_size) { - //--- HCRC_UPDATE(beg) ---// - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - //---// - flush_pending(strm); - if (s.pending !== 0) { - s.last_flush = -1; - return Z_OK; - } - beg = 0; - } - // JS specific: little magic to add zero terminator to end of string - if (s.gzindex < s.gzhead.comment.length) { - val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; - } else { - val = 0; - } - put_byte(s, val); - } while (val !== 0); - //--- HCRC_UPDATE(beg) ---// - if (s.gzhead.hcrc && s.pending > beg) { - strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); - } - //---// - } - s.status = HCRC_STATE; - } - if (s.status === HCRC_STATE) { - if (s.gzhead.hcrc) { - if (s.pending + 2 > s.pending_buf_size) { - flush_pending(strm); - if (s.pending !== 0) { - s.last_flush = -1; - return Z_OK; - } - } - put_byte(s, strm.adler & 0xff); - put_byte(s, (strm.adler >> 8) & 0xff); - strm.adler = 0; //crc32(0L, Z_NULL, 0); - } - s.status = BUSY_STATE; - - /* Compression must start with an empty pending buffer */ - flush_pending(strm); - if (s.pending !== 0) { - s.last_flush = -1; - return Z_OK; - } - } -//#endif - /* Start a new block or continue the current one. */ if (strm.avail_in !== 0 || s.lookahead !== 0 || (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { - let bstate = s.level === 0 ? deflate_stored(s, flush) : - s.strategy === Z_HUFFMAN_ONLY ? deflate_huff(s, flush) : - s.strategy === Z_RLE ? deflate_rle(s, flush) : - configuration_table[s.level].func(s, flush); + let bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : + (s.strategy === Z_RLE ? deflate_rle(s, flush) : + configuration_table[s.level].func(s, flush)); if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { s.status = FINISH_STATE; @@ -13964,6 +13177,8 @@ const deflate = (strm, flush) => { } } } + //Assert(strm->avail_out > 0, "bug2"); + //if (strm.avail_out <= 0) { throw new Error("bug2");} if (flush !== Z_FINISH) { return Z_OK; } if (s.wrap <= 0) { return Z_STREAM_END; } @@ -13997,11 +13212,21 @@ const deflate = (strm, flush) => { const deflateEnd = (strm) => { - if (deflateStateCheck(strm)) { + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { return Z_STREAM_ERROR; } const status = strm.state.status; + if (status !== INIT_STATE && + status !== EXTRA_STATE && + status !== NAME_STATE && + status !== COMMENT_STATE && + status !== HCRC_STATE && + status !== BUSY_STATE && + status !== FINISH_STATE + ) { + return err(strm, Z_STREAM_ERROR); + } strm.state = null; @@ -14017,7 +13242,7 @@ const deflateSetDictionary = (strm, dictionary) => { let dictLength = dictionary.length; - if (deflateStateCheck(strm)) { + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { return Z_STREAM_ERROR; } @@ -14103,7 +13328,6 @@ module.exports.deflateInfo = 'pako deflate (from Nodeca project)'; /* Not implemented module.exports.deflateBound = deflateBound; module.exports.deflateCopy = deflateCopy; -module.exports.deflateGetDictionary = deflateGetDictionary; module.exports.deflateParams = deflateParams; module.exports.deflatePending = deflatePending; module.exports.deflatePrime = deflatePrime; @@ -14193,8 +13417,8 @@ module.exports = GZheader; // 3. This notice may not be removed or altered from any source distribution. // See state defs from inflate.js -const BAD = 16209; /* got a data error -- remain here until reset */ -const TYPE = 16191; /* i: waiting for type bits, including last-flag bit */ +const BAD = 30; /* got a data error -- remain here until reset */ +const TYPE = 12; /* i: waiting for type bits, including last-flag bit */ /* Decode literal, length, and distance codes and write out the resulting @@ -14561,38 +13785,38 @@ const { /* ===========================================================================*/ -const HEAD = 16180; /* i: waiting for magic header */ -const FLAGS = 16181; /* i: waiting for method and flags (gzip) */ -const TIME = 16182; /* i: waiting for modification time (gzip) */ -const OS = 16183; /* i: waiting for extra flags and operating system (gzip) */ -const EXLEN = 16184; /* i: waiting for extra length (gzip) */ -const EXTRA = 16185; /* i: waiting for extra bytes (gzip) */ -const NAME = 16186; /* i: waiting for end of file name (gzip) */ -const COMMENT = 16187; /* i: waiting for end of comment (gzip) */ -const HCRC = 16188; /* i: waiting for header crc (gzip) */ -const DICTID = 16189; /* i: waiting for dictionary check value */ -const DICT = 16190; /* waiting for inflateSetDictionary() call */ -const TYPE = 16191; /* i: waiting for type bits, including last-flag bit */ -const TYPEDO = 16192; /* i: same, but skip check to exit inflate on new block */ -const STORED = 16193; /* i: waiting for stored size (length and complement) */ -const COPY_ = 16194; /* i/o: same as COPY below, but only first time in */ -const COPY = 16195; /* i/o: waiting for input or output to copy stored block */ -const TABLE = 16196; /* i: waiting for dynamic block table lengths */ -const LENLENS = 16197; /* i: waiting for code length code lengths */ -const CODELENS = 16198; /* i: waiting for length/lit and distance code lengths */ -const LEN_ = 16199; /* i: same as LEN below, but only first time in */ -const LEN = 16200; /* i: waiting for length/lit/eob code */ -const LENEXT = 16201; /* i: waiting for length extra bits */ -const DIST = 16202; /* i: waiting for distance code */ -const DISTEXT = 16203; /* i: waiting for distance extra bits */ -const MATCH = 16204; /* o: waiting for output space to copy string */ -const LIT = 16205; /* o: waiting for output space to write literal */ -const CHECK = 16206; /* i: waiting for 32-bit check value */ -const LENGTH = 16207; /* i: waiting for 32-bit length (gzip) */ -const DONE = 16208; /* finished check, done -- remain here until reset */ -const BAD = 16209; /* got a data error -- remain here until reset */ -const MEM = 16210; /* got an inflate() memory error -- remain here until reset */ -const SYNC = 16211; /* looking for synchronization bytes to restart inflate() */ +const HEAD = 1; /* i: waiting for magic header */ +const FLAGS = 2; /* i: waiting for method and flags (gzip) */ +const TIME = 3; /* i: waiting for modification time (gzip) */ +const OS = 4; /* i: waiting for extra flags and operating system (gzip) */ +const EXLEN = 5; /* i: waiting for extra length (gzip) */ +const EXTRA = 6; /* i: waiting for extra bytes (gzip) */ +const NAME = 7; /* i: waiting for end of file name (gzip) */ +const COMMENT = 8; /* i: waiting for end of comment (gzip) */ +const HCRC = 9; /* i: waiting for header crc (gzip) */ +const DICTID = 10; /* i: waiting for dictionary check value */ +const DICT = 11; /* waiting for inflateSetDictionary() call */ +const TYPE = 12; /* i: waiting for type bits, including last-flag bit */ +const TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ +const STORED = 14; /* i: waiting for stored size (length and complement) */ +const COPY_ = 15; /* i/o: same as COPY below, but only first time in */ +const COPY = 16; /* i/o: waiting for input or output to copy stored block */ +const TABLE = 17; /* i: waiting for dynamic block table lengths */ +const LENLENS = 18; /* i: waiting for code length code lengths */ +const CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ +const LEN_ = 20; /* i: same as LEN below, but only first time in */ +const LEN = 21; /* i: waiting for length/lit/eob code */ +const LENEXT = 22; /* i: waiting for length extra bits */ +const DIST = 23; /* i: waiting for distance code */ +const DISTEXT = 24; /* i: waiting for distance extra bits */ +const MATCH = 25; /* o: waiting for output space to copy string */ +const LIT = 26; /* o: waiting for output space to write literal */ +const CHECK = 27; /* i: waiting for 32-bit check value */ +const LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ +const DONE = 29; /* finished check, done -- remain here until reset */ +const BAD = 30; /* got a data error -- remain here until reset */ +const MEM = 31; /* got an inflate() memory error -- remain here until reset */ +const SYNC = 32; /* looking for synchronization bytes to restart inflate() */ /* ===========================================================================*/ @@ -14617,14 +13841,11 @@ const zswap32 = (q) => { function InflateState() { - this.strm = null; /* pointer back to this zlib stream */ - this.mode = 0; /* current inflate mode */ + this.mode = 0; /* current inflate mode */ this.last = false; /* true if processing last block */ - this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip, - bit 2 true to validate check value */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ this.havedict = false; /* true if dictionary provided */ - this.flags = 0; /* gzip header method and flags (0 if zlib), or - -1 if raw or no header yet */ + this.flags = 0; /* gzip header method and flags (0 if zlib) */ this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ this.check = 0; /* protected copy of check value */ this.total = 0; /* protected copy of output count */ @@ -14678,23 +13899,9 @@ function InflateState() { } -const inflateStateCheck = (strm) => { - - if (!strm) { - return 1; - } - const state = strm.state; - if (!state || state.strm !== strm || - state.mode < HEAD || state.mode > SYNC) { - return 1; - } - return 0; -}; - - const inflateResetKeep = (strm) => { - if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; } + if (!strm || !strm.state) { return Z_STREAM_ERROR; } const state = strm.state; strm.total_in = strm.total_out = state.total = 0; strm.msg = ''; /*Z_NULL*/ @@ -14704,7 +13911,6 @@ const inflateResetKeep = (strm) => { state.mode = HEAD; state.last = 0; state.havedict = 0; - state.flags = -1; state.dmax = 32768; state.head = null/*Z_NULL*/; state.hold = 0; @@ -14722,7 +13928,7 @@ const inflateResetKeep = (strm) => { const inflateReset = (strm) => { - if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; } + if (!strm || !strm.state) { return Z_STREAM_ERROR; } const state = strm.state; state.wsize = 0; state.whave = 0; @@ -14736,7 +13942,7 @@ const inflateReset2 = (strm, windowBits) => { let wrap; /* get the state */ - if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; } + if (!strm || !strm.state) { return Z_STREAM_ERROR; } const state = strm.state; /* extract wrap request from windowBits parameter */ @@ -14745,7 +13951,7 @@ const inflateReset2 = (strm, windowBits) => { windowBits = -windowBits; } else { - wrap = (windowBits >> 4) + 5; + wrap = (windowBits >> 4) + 1; if (windowBits < 48) { windowBits &= 15; } @@ -14776,9 +13982,7 @@ const inflateInit2 = (strm, windowBits) => { //if (state === Z_NULL) return Z_MEM_ERROR; //Tracev((stderr, "inflate: allocated\n")); strm.state = state; - state.strm = strm; state.window = null/*Z_NULL*/; - state.mode = HEAD; /* to pass state test in inflateReset2() */ const ret = inflateReset2(strm, windowBits); if (ret !== Z_OK) { strm.state = null/*Z_NULL*/; @@ -14927,7 +14131,7 @@ const inflate = (strm, flush) => { new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]); - if (inflateStateCheck(strm) || !strm.output || + if (!strm || !strm.state || !strm.output || (!strm.input && strm.avail_in !== 0)) { return Z_STREAM_ERROR; } @@ -14968,9 +14172,6 @@ const inflate = (strm, flush) => { } //===// if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ - if (state.wbits === 0) { - state.wbits = 15; - } state.check = 0/*crc32(0L, Z_NULL, 0)*/; //=== CRC2(state.check, hold); hbuf[0] = hold & 0xff; @@ -14985,6 +14186,7 @@ const inflate = (strm, flush) => { state.mode = FLAGS; break; } + state.flags = 0; /* expect zlib header */ if (state.head) { state.head.done = false; } @@ -15007,7 +14209,7 @@ const inflate = (strm, flush) => { if (state.wbits === 0) { state.wbits = len; } - if (len > 15 || len > state.wbits) { + else if (len > state.wbits) { strm.msg = 'invalid window size'; state.mode = BAD; break; @@ -15018,7 +14220,6 @@ const inflate = (strm, flush) => { state.dmax = 1 << state.wbits; //state.dmax = 1 << len; - state.flags = 0; /* indicate zlib header */ //Tracev((stderr, "inflate: zlib header ok\n")); strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; state.mode = hold & 0x200 ? DICTID : TYPE; @@ -15050,7 +14251,7 @@ const inflate = (strm, flush) => { if (state.head) { state.head.text = ((hold >> 8) & 1); } - if ((state.flags & 0x0200) && (state.wrap & 4)) { + if (state.flags & 0x0200) { //=== CRC2(state.check, hold); hbuf[0] = hold & 0xff; hbuf[1] = (hold >>> 8) & 0xff; @@ -15075,7 +14276,7 @@ const inflate = (strm, flush) => { if (state.head) { state.head.time = hold; } - if ((state.flags & 0x0200) && (state.wrap & 4)) { + if (state.flags & 0x0200) { //=== CRC4(state.check, hold) hbuf[0] = hold & 0xff; hbuf[1] = (hold >>> 8) & 0xff; @@ -15103,7 +14304,7 @@ const inflate = (strm, flush) => { state.head.xflags = (hold & 0xff); state.head.os = (hold >> 8); } - if ((state.flags & 0x0200) && (state.wrap & 4)) { + if (state.flags & 0x0200) { //=== CRC2(state.check, hold); hbuf[0] = hold & 0xff; hbuf[1] = (hold >>> 8) & 0xff; @@ -15130,7 +14331,7 @@ const inflate = (strm, flush) => { if (state.head) { state.head.extra_len = hold; } - if ((state.flags & 0x0200) && (state.wrap & 4)) { + if (state.flags & 0x0200) { //=== CRC2(state.check, hold); hbuf[0] = hold & 0xff; hbuf[1] = (hold >>> 8) & 0xff; @@ -15172,7 +14373,7 @@ const inflate = (strm, flush) => { // len + copy > state.head.extra_max ? // state.head.extra_max - len : copy); } - if ((state.flags & 0x0200) && (state.wrap & 4)) { + if (state.flags & 0x0200) { state.check = crc32(state.check, input, copy, next); } have -= copy; @@ -15198,7 +14399,7 @@ const inflate = (strm, flush) => { } } while (len && copy < have); - if ((state.flags & 0x0200) && (state.wrap & 4)) { + if (state.flags & 0x0200) { state.check = crc32(state.check, input, copy, next); } have -= copy; @@ -15223,7 +14424,7 @@ const inflate = (strm, flush) => { state.head.comment += String.fromCharCode(len); } } while (len && copy < have); - if ((state.flags & 0x0200) && (state.wrap & 4)) { + if (state.flags & 0x0200) { state.check = crc32(state.check, input, copy, next); } have -= copy; @@ -15245,7 +14446,7 @@ const inflate = (strm, flush) => { bits += 8; } //===// - if ((state.wrap & 4) && hold !== (state.check & 0xffff)) { + if (hold !== (state.check & 0xffff)) { strm.msg = 'header crc mismatch'; state.mode = BAD; break; @@ -15898,15 +15099,15 @@ const inflate = (strm, flush) => { _out -= left; strm.total_out += _out; state.total += _out; - if ((state.wrap & 4) && _out) { + if (_out) { strm.adler = state.check = - /*UPDATE_CHECK(state.check, put - _out, _out);*/ + /*UPDATE(state.check, put - _out, _out);*/ (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); } _out = left; // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too - if ((state.wrap & 4) && (state.flags ? hold : zswap32(hold)) !== state.check) { + if ((state.flags ? hold : zswap32(hold)) !== state.check) { strm.msg = 'incorrect data check'; state.mode = BAD; break; @@ -15929,7 +15130,7 @@ const inflate = (strm, flush) => { bits += 8; } //===// - if ((state.wrap & 4) && hold !== (state.total & 0xffffffff)) { + if (hold !== (state.total & 0xffffffff)) { strm.msg = 'incorrect length check'; state.mode = BAD; break; @@ -15987,8 +15188,8 @@ const inflate = (strm, flush) => { strm.total_in += _in; strm.total_out += _out; state.total += _out; - if ((state.wrap & 4) && _out) { - strm.adler = state.check = /*UPDATE_CHECK(state.check, strm.next_out - _out, _out);*/ + if (state.wrap && _out) { + strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); } strm.data_type = state.bits + (state.last ? 64 : 0) + @@ -16003,7 +15204,7 @@ const inflate = (strm, flush) => { const inflateEnd = (strm) => { - if (inflateStateCheck(strm)) { + if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { return Z_STREAM_ERROR; } @@ -16019,7 +15220,7 @@ const inflateEnd = (strm) => { const inflateGetHeader = (strm, head) => { /* check state */ - if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; } + if (!strm || !strm.state) { return Z_STREAM_ERROR; } const state = strm.state; if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } @@ -16038,7 +15239,7 @@ const inflateSetDictionary = (strm, dictionary) => { let ret; /* check state */ - if (inflateStateCheck(strm)) { return Z_STREAM_ERROR; } + if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } state = strm.state; if (state.wrap !== 0 && state.mode !== DICT) { @@ -16079,7 +15280,6 @@ module.exports.inflateSetDictionary = inflateSetDictionary; module.exports.inflateInfo = 'pako inflate (from Nodeca project)'; /* Not implemented -module.exports.inflateCodesUsed = inflateCodesUsed; module.exports.inflateCopy = inflateCopy; module.exports.inflateGetDictionary = inflateGetDictionary; module.exports.inflateMark = inflateMark; @@ -16087,7 +15287,6 @@ module.exports.inflatePrime = inflatePrime; module.exports.inflateSync = inflateSync; module.exports.inflateSyncPoint = inflateSyncPoint; module.exports.inflateUndermine = inflateUndermine; -module.exports.inflateValidate = inflateValidate; */ },{"./adler32":23,"./constants":24,"./crc32":25,"./inffast":28,"./inftrees":30}],30:[function(require,module,exports){ @@ -16163,11 +15362,13 @@ const inflate_table = (type, lens, lens_index, codes, table, table_index, work, let mask; /* mask for low root bits */ let next; /* next available space in table */ let base = null; /* base value table to use */ + let base_index = 0; // let shoextra; /* extra bits table to use */ - let match; /* use base and extra for symbol >= match */ + let end; /* use base and extra for symbol > end */ const count = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ const offs = new Uint16Array(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ let extra = null; + let extra_index = 0; let here_bits, here_op, here_val; @@ -16302,17 +15503,19 @@ const inflate_table = (type, lens, lens_index, codes, table, table_index, work, // to avoid deopts in old v8 if (type === CODES) { base = extra = work; /* dummy value--not used */ - match = 20; + end = 19; } else if (type === LENS) { base = lbase; + base_index -= 257; extra = lext; - match = 257; + extra_index -= 257; + end = 256; } else { /* DISTS */ base = dbase; extra = dext; - match = 0; + end = -1; } /* initialize opts for loop */ @@ -16336,13 +15539,13 @@ const inflate_table = (type, lens, lens_index, codes, table, table_index, work, for (;;) { /* create table entry */ here_bits = len - drop; - if (work[sym] + 1 < match) { + if (work[sym] < end) { here_op = 0; here_val = work[sym]; } - else if (work[sym] >= match) { - here_op = extra[work[sym] - match]; - here_val = base[work[sym] - match]; + else if (work[sym] > end) { + here_op = extra[extra_index + work[sym]]; + here_val = base[base_index + work[sym]]; } else { here_op = 32 + 64; /* end of block */ @@ -16745,10 +15948,10 @@ const bi_flush = (s) => { * The length opt_len is updated; static_len is also updated if stree is * not null. */ -const gen_bitlen = (s, desc) => { +const gen_bitlen = (s, desc) => // deflate_state *s; // tree_desc *desc; /* the tree descriptor */ - +{ const tree = desc.dyn_tree; const max_code = desc.max_code; const stree = desc.stat_desc.static_tree; @@ -16797,7 +16000,7 @@ const gen_bitlen = (s, desc) => { } if (overflow === 0) { return; } - // Tracev((stderr,"\nbit length overflow\n")); + // Trace((stderr,"\nbit length overflow\n")); /* This happens for example on obj2 and pic of the Calgary corpus */ /* Find the first bit length which could increase: */ @@ -16824,7 +16027,7 @@ const gen_bitlen = (s, desc) => { m = s.heap[--h]; if (m > max_code) { continue; } if (tree[m * 2 + 1]/*.Len*/ !== bits) { - // Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; tree[m * 2 + 1]/*.Len*/ = bits; } @@ -16842,11 +16045,11 @@ const gen_bitlen = (s, desc) => { * OUT assertion: the field code is set for all tree elements of non * zero code length. */ -const gen_codes = (tree, max_code, bl_count) => { +const gen_codes = (tree, max_code, bl_count) => // ct_data *tree; /* the tree to decorate */ // int max_code; /* largest code with non zero frequency */ // ushf *bl_count; /* number of codes at each bit length */ - +{ const next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ let code = 0; /* running code value */ let bits; /* bit index */ @@ -16856,8 +16059,7 @@ const gen_codes = (tree, max_code, bl_count) => { * without bit reversal. */ for (bits = 1; bits <= MAX_BITS; bits++) { - code = (code + bl_count[bits - 1]) << 1; - next_code[bits] = code; + next_code[bits] = code = (code + bl_count[bits - 1]) << 1; } /* Check that the bit counts in bl_count are consistent. The last code * must be all ones. @@ -16997,7 +16199,7 @@ const init_block = (s) => { s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; s.opt_len = s.static_len = 0; - s.sym_next = s.matches = 0; + s.last_lit = s.matches = 0; }; @@ -17016,6 +16218,29 @@ const bi_windup = (s) => s.bi_valid = 0; }; +/* =========================================================================== + * Copy a stored block, storing first the length and its + * one's complement if requested. + */ +const copy_block = (s, buf, len, header) => +//DeflateState *s; +//charf *buf; /* the input data */ +//unsigned len; /* its length */ +//int header; /* true if block header must be written */ +{ + bi_windup(s); /* align on byte boundary */ + + if (header) { + put_short(s, len); + put_short(s, ~len); + } +// while (len--) { +// put_byte(s, *buf++); +// } + s.pending_buf.set(s.window.subarray(buf, buf + len), s.pending); + s.pending += len; +}; + /* =========================================================================== * Compares to subtrees, using the tree depth as tie breaker when * the subtrees have equal frequency. This minimizes the worst case length. @@ -17034,11 +16259,11 @@ const smaller = (tree, n, m, depth) => { * when the heap property is re-established (each father smaller than its * two sons). */ -const pqdownheap = (s, tree, k) => { +const pqdownheap = (s, tree, k) => // deflate_state *s; // ct_data *tree; /* the tree to restore */ // int k; /* node to move down */ - +{ const v = s.heap[k]; let j = k << 1; /* left son of k */ while (j <= s.heap_len) { @@ -17067,22 +16292,23 @@ const pqdownheap = (s, tree, k) => { /* =========================================================================== * Send the block data compressed using the given Huffman trees */ -const compress_block = (s, ltree, dtree) => { +const compress_block = (s, ltree, dtree) => // deflate_state *s; // const ct_data *ltree; /* literal tree */ // const ct_data *dtree; /* distance tree */ - +{ let dist; /* distance of matched string */ let lc; /* match length or unmatched char (if dist == 0) */ - let sx = 0; /* running index in sym_buf */ + let lx = 0; /* running index in l_buf */ let code; /* the code to send */ let extra; /* number of extra bits to send */ - if (s.sym_next !== 0) { + if (s.last_lit !== 0) { do { - dist = s.pending_buf[s.sym_buf + sx++] & 0xff; - dist += (s.pending_buf[s.sym_buf + sx++] & 0xff) << 8; - lc = s.pending_buf[s.sym_buf + sx++]; + dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); + lc = s.pending_buf[s.l_buf + lx]; + lx++; + if (dist === 0) { send_code(s, lc, ltree); /* send a literal byte */ //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); @@ -17107,10 +16333,11 @@ const compress_block = (s, ltree, dtree) => { } } /* literal or match pair ? */ - /* Check that the overlay between pending_buf and sym_buf is ok: */ - //Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow"); + /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ + //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, + // "pendingBuf overflow"); - } while (sx < s.sym_next); + } while (lx < s.last_lit); } send_code(s, END_BLOCK, ltree); @@ -17125,10 +16352,10 @@ const compress_block = (s, ltree, dtree) => { * and corresponding code. The length opt_len is updated; static_len is * also updated if stree is not null. The field max_code is set. */ -const build_tree = (s, desc) => { +const build_tree = (s, desc) => // deflate_state *s; // tree_desc *desc; /* the tree descriptor */ - +{ const tree = desc.dyn_tree; const stree = desc.stat_desc.static_tree; const has_stree = desc.stat_desc.has_stree; @@ -17221,11 +16448,11 @@ const build_tree = (s, desc) => { * Scan a literal or distance tree to determine the frequencies of the codes * in the bit length tree. */ -const scan_tree = (s, tree, max_code) => { +const scan_tree = (s, tree, max_code) => // deflate_state *s; // ct_data *tree; /* the tree to be scanned */ // int max_code; /* and its largest code of non zero frequency */ - +{ let n; /* iterates over all tree elements */ let prevlen = -1; /* last emitted length */ let curlen; /* length of current code */ @@ -17287,11 +16514,11 @@ const scan_tree = (s, tree, max_code) => { * Send a literal or distance tree in compressed form, using the codes in * bl_tree. */ -const send_tree = (s, tree, max_code) => { +const send_tree = (s, tree, max_code) => // deflate_state *s; // ct_data *tree; /* the tree to be scanned */ // int max_code; /* and its largest code of non zero frequency */ - +{ let n; /* iterates over all tree elements */ let prevlen = -1; /* last emitted length */ let curlen; /* length of current code */ @@ -17395,10 +16622,10 @@ const build_bl_tree = (s) => { * lengths of the bit length codes, the literal tree and the distance tree. * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. */ -const send_all_trees = (s, lcodes, dcodes, blcodes) => { +const send_all_trees = (s, lcodes, dcodes, blcodes) => // deflate_state *s; // int lcodes, dcodes, blcodes; /* number of codes for each tree */ - +{ let rank; /* index in bl_order */ //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); @@ -17426,9 +16653,9 @@ const send_all_trees = (s, lcodes, dcodes, blcodes) => { * Check if the data type is TEXT or BINARY, using the following algorithm: * - TEXT if the two conditions below are satisfied: * a) There are no non-portable control characters belonging to the - * "block list" (0..6, 14..25, 28..31). + * "black list" (0..6, 14..25, 28..31). * b) There is at least one printable character belonging to the - * "allow list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). + * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). * - BINARY otherwise. * - The following partially-portable control characters form a * "gray list" that is ignored in this detection algorithm: @@ -17436,21 +16663,21 @@ const send_all_trees = (s, lcodes, dcodes, blcodes) => { * IN assertion: the fields Freq of dyn_ltree are set. */ const detect_data_type = (s) => { - /* block_mask is the bit mask of block-listed bytes + /* black_mask is the bit mask of black-listed bytes * set bits 0..6, 14..25, and 28..31 * 0xf3ffc07f = binary 11110011111111111100000001111111 */ - let block_mask = 0xf3ffc07f; + let black_mask = 0xf3ffc07f; let n; - /* Check for non-textual ("block-listed") bytes. */ - for (n = 0; n <= 31; n++, block_mask >>>= 1) { - if ((block_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { + /* Check for non-textual ("black-listed") bytes. */ + for (n = 0; n <= 31; n++, black_mask >>>= 1) { + if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { return Z_BINARY; } } - /* Check for textual ("allow-listed") bytes. */ + /* Check for textual ("white-listed") bytes. */ if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { return Z_TEXT; @@ -17461,7 +16688,7 @@ const detect_data_type = (s) => { } } - /* There are no "block-listed" or "allow-listed" bytes: + /* There are no "black-listed" or "white-listed" bytes: * this stream either is empty or has tolerated ("gray-listed") bytes only. */ return Z_BINARY; @@ -17496,20 +16723,14 @@ const _tr_init = (s) => /* =========================================================================== * Send a stored block */ -const _tr_stored_block = (s, buf, stored_len, last) => { +const _tr_stored_block = (s, buf, stored_len, last) => //DeflateState *s; //charf *buf; /* input block */ //ulg stored_len; /* length of input block */ //int last; /* one if this is the last block for a file */ - +{ send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ - bi_windup(s); /* align on byte boundary */ - put_short(s, stored_len); - put_short(s, ~stored_len); - if (stored_len) { - s.pending_buf.set(s.window.subarray(buf, buf + stored_len), s.pending); - } - s.pending += stored_len; + copy_block(s, buf, stored_len, true); /* with header */ }; @@ -17526,14 +16747,14 @@ const _tr_align = (s) => { /* =========================================================================== * Determine the best encoding for the current block: dynamic trees, static - * trees or store, and write out the encoded block. + * trees or store, and output the encoded block to the zip file. */ -const _tr_flush_block = (s, buf, stored_len, last) => { +const _tr_flush_block = (s, buf, stored_len, last) => //DeflateState *s; //charf *buf; /* input block, or NULL if too old */ //ulg stored_len; /* length of input block */ //int last; /* one if this is the last block for a file */ - +{ let opt_lenb, static_lenb; /* opt_len and static_len in bytes */ let max_blindex = 0; /* index of last bit length code of non zero freq */ @@ -17568,7 +16789,7 @@ const _tr_flush_block = (s, buf, stored_len, last) => { // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - // s->sym_next / 3)); + // s->last_lit)); if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } @@ -17615,14 +16836,19 @@ const _tr_flush_block = (s, buf, stored_len, last) => { * Save the match info and tally the frequency counts. Return true if * the current block must be flushed. */ -const _tr_tally = (s, dist, lc) => { +const _tr_tally = (s, dist, lc) => // deflate_state *s; // unsigned dist; /* distance of matched string */ // unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +{ + //let out_length, in_length, dcode; + + s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; + s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; + + s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; + s.last_lit++; - s.pending_buf[s.sym_buf + s.sym_next++] = dist; - s.pending_buf[s.sym_buf + s.sym_next++] = dist >> 8; - s.pending_buf[s.sym_buf + s.sym_next++] = lc; if (dist === 0) { /* lc is the unmatched char */ s.dyn_ltree[lc * 2]/*.Freq*/++; @@ -17638,7 +16864,34 @@ const _tr_tally = (s, dist, lc) => { s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; } - return (s.sym_next === s.sym_end); +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility + +//#ifdef TRUNCATE_BLOCK +// /* Try to guess if it is profitable to stop the current block here */ +// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { +// /* Compute an upper bound for the compressed length */ +// out_length = s.last_lit*8; +// in_length = s.strstart - s.block_start; +// +// for (dcode = 0; dcode < D_CODES; dcode++) { +// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); +// } +// out_length >>>= 3; +// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", +// // s->last_lit, in_length, out_length, +// // 100L - out_length*100L/in_length)); +// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { +// return true; +// } +// } +//#endif + + return (s.last_lit === s.lit_bufsize - 1); + /* We avoid equality with lit_bufsize because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ }; module.exports._tr_init = _tr_init; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/csh.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/csh.d.ts index 027615f..557e38e 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/csh.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/csh.d.ts @@ -1,10 +1,10 @@ -import { LayerVectorMask } from './psd'; -export interface Csh { - shapes: (LayerVectorMask & { - name: string; - id: string; - width: number; - height: number; - })[]; -} -export declare function readCsh(buffer: ArrayBufferView): Csh; +import { LayerVectorMask } from './psd'; +export interface Csh { + shapes: (LayerVectorMask & { + name: string; + id: string; + width: number; + height: number; + })[]; +} +export declare function readCsh(buffer: ArrayBufferView): Csh; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/csh.js b/npm-packages/mac-v2.4.x/ag-psd/dist/csh.js index c9466d4..1d69706 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/csh.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/csh.js @@ -1,48 +1,49 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readCsh = void 0; -var additionalInfo_1 = require("./additionalInfo"); -var psdReader_1 = require("./psdReader"); -function readCsh(buffer) { - var reader = (0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength); - var csh = { shapes: [] }; - (0, psdReader_1.checkSignature)(reader, 'cush'); - if ((0, psdReader_1.readUint32)(reader) !== 2) - throw new Error('Invalid version'); - var count = (0, psdReader_1.readUint32)(reader); - for (var i = 0; i < count; i++) { - var name_1 = (0, psdReader_1.readUnicodeString)(reader); - while (reader.offset % 4) - reader.offset++; // pad to 4byte bounds - if ((0, psdReader_1.readUint32)(reader) !== 1) - throw new Error('Invalid shape version'); - var size = (0, psdReader_1.readUint32)(reader); - var end = reader.offset + size; - var id = (0, psdReader_1.readPascalString)(reader, 1); - // this might not be correct ??? - var y1 = (0, psdReader_1.readUint32)(reader); - var x1 = (0, psdReader_1.readUint32)(reader); - var y2 = (0, psdReader_1.readUint32)(reader); - var x2 = (0, psdReader_1.readUint32)(reader); - var width = x2 - x1; - var height = y2 - y1; - var mask = { paths: [] }; - (0, additionalInfo_1.readVectorMask)(reader, mask, width, height, end - reader.offset); - csh.shapes.push(__assign({ name: name_1, id: id, width: width, height: height }, mask)); - reader.offset = end; - } - return csh; -} -exports.readCsh = readCsh; -//# sourceMappingURL=csh.js.map \ No newline at end of file +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readCsh = void 0; +var additionalInfo_1 = require("./additionalInfo"); +var psdReader_1 = require("./psdReader"); +function readCsh(buffer) { + var reader = (0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength); + var csh = { shapes: [] }; + (0, psdReader_1.checkSignature)(reader, 'cush'); + if ((0, psdReader_1.readUint32)(reader) !== 2) + throw new Error('Invalid version'); + var count = (0, psdReader_1.readUint32)(reader); + for (var i = 0; i < count; i++) { + var name_1 = (0, psdReader_1.readUnicodeString)(reader); + while (reader.offset % 4) + reader.offset++; // pad to 4byte bounds + if ((0, psdReader_1.readUint32)(reader) !== 1) + throw new Error('Invalid shape version'); + var size = (0, psdReader_1.readUint32)(reader); + var end = reader.offset + size; + var id = (0, psdReader_1.readPascalString)(reader, 1); + // this might not be correct ??? + var y1 = (0, psdReader_1.readUint32)(reader); + var x1 = (0, psdReader_1.readUint32)(reader); + var y2 = (0, psdReader_1.readUint32)(reader); + var x2 = (0, psdReader_1.readUint32)(reader); + var width = x2 - x1; + var height = y2 - y1; + var mask = { paths: [] }; + (0, additionalInfo_1.readVectorMask)(reader, mask, width, height, end - reader.offset); + csh.shapes.push(__assign({ name: name_1, id: id, width: width, height: height }, mask)); + reader.offset = end; + } + return csh; +} +exports.readCsh = readCsh; + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzaC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUFBLG1EQUFrRDtBQUVsRCx5Q0FBNEc7QUFXNUcsU0FBZ0IsT0FBTyxDQUFDLE1BQXVCO0lBQzlDLElBQU0sTUFBTSxHQUFHLElBQUEsd0JBQVksRUFBQyxNQUFNLENBQUMsTUFBTSxFQUFFLE1BQU0sQ0FBQyxVQUFVLEVBQUUsTUFBTSxDQUFDLFVBQVUsQ0FBQyxDQUFDO0lBQ2pGLElBQU0sR0FBRyxHQUFRLEVBQUUsTUFBTSxFQUFFLEVBQUUsRUFBRSxDQUFDO0lBRWhDLElBQUEsMEJBQWMsRUFBQyxNQUFNLEVBQUUsTUFBTSxDQUFDLENBQUM7SUFDL0IsSUFBSSxJQUFBLHNCQUFVLEVBQUMsTUFBTSxDQUFDLEtBQUssQ0FBQztRQ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yXG5cdFx0Y29uc3QgeDEgPSByZWFkVWludDMyKHJlYWRlcik7XHJcblx0XHRjb25zdCB5MiA9IHJlYWRVaW50MzIocmVhZGVyKTtcclxuXHRcdGNvbnN0IHgyID0gcmVhZFVpbnQzMihyZWFkZXIpO1xyXG5cdFx0Y29uc3Qgd2lkdGggPSB4MiAtIHgxO1xyXG5cdFx0Y29uc3QgaGVpZ2h0ID0geTIgLSB5MTtcclxuXHRcdGNvbnN0IG1hc2s6IExheWVyVmVjdG9yTWFzayA9IHsgcGF0aHM6IFtdIH07XHJcblx0XHRyZWFkVmVjdG9yTWFzayhyZWFkZXIsIG1hc2ssIHdpZHRoLCBoZWlnaHQsIGVuZCAtIHJlYWRlci5vZmZzZXQpO1xyXG5cdFx0Y3NoLnNoYXBlcy5wdXNoKHsgbmFtZSwgaWQsIHdpZHRoLCBoZWlnaHQsIC4uLm1hc2sgfSk7XHJcblxyXG5cdFx0cmVhZGVyLm9mZnNldCA9IGVuZDtcclxuXHR9XHJcblxyXG5cdHJldHVybiBjc2g7XHJcbn1cclxuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/csh.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/csh.js.map deleted file mode 100644 index 26715d2..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/csh.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"csh.js","sourceRoot":"../src/","sources":["csh.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,mDAAkD;AAElD,yCAA4G;AAW5G,SAAgB,OAAO,CAAC,MAAuB;IAC9C,IAAM,MAAM,GAAG,IAAA,wBAAY,EAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IACjF,IAAM,GAAG,GAAQ,EAAE,MAAM,EAAE,EAAE,EA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,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;QACjE,GAAG,CAAC,MAAM,CAAC,IAAI,YAAG,IAAI,QAAA,EAAE,EAAE,IAAA,EAAE,KAAK,OAAA,EAAE,MAAM,QAAA,IAAK,IAAI,EAAG,CAAC;QAEtD,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC;KACpB;IAED,OAAO,GAAG,CAAC;AACZ,CAAC;AA9BD,0BA8BC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/descriptor.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/descriptor.d.ts index 8a11dff..5ba490e 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/descriptor.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/descriptor.d.ts @@ -1,415 +1,390 @@ -import { AntiAlias, BevelDirection, BevelStyle, BevelTechnique, BlendMode, Color, GlowSource, GlowTechnique, GradientStyle, InterpolationMethod, LayerEffectsInfo, LineAlignment, LineCapType, LineJoinType, Orientation, TextGridding, TimelineKeyInterpolation, TimelineTrack, TimelineTrackType, Units, UnitsValue, VectorContent, WarpStyle } from './psd'; -import { PsdReader } from './psdReader'; -import { PsdWriter } from './psdWriter'; -export declare function setLogErrors(value: boolean): void; -export declare function readAsciiStringOrClassId(reader: PsdReader): string; -export declare function readDescriptorStructure(reader: PsdReader): any; -export declare function writeDescriptorStructure(writer: PsdWriter, name: string, classId: string, value: any, root: string): void; -export declare function readVersionAndDescriptor(reader: PsdReader): any; -export declare function writeVersionAndDescriptor(writer: PsdWriter, name: string, classID: string, descriptor: any, root?: string): void; -export type DescriptorUnits = 'Angle' | 'Density' | 'Distance' | 'None' | 'Percent' | 'Pixels' | 'Millimeters' | 'Points' | 'Picas' | 'Inches' | 'Centimeters'; -export interface DescriptorUnitsValue { - units: DescriptorUnits; - value: number; -} -export type DescriptorColor = { - 'Rd ': number; - 'Grn ': number; - 'Bl ': number; -} | { - 'H ': DescriptorUnitsValue; - Strt: number; - Brgh: number; -} | { - 'Cyn ': number; - Mgnt: number; - 'Ylw ': number; - Blck: number; -} | { - 'Gry ': number; -} | { - Lmnc: number; - 'A ': number; - 'B ': number; -} | { - redFloat: number; - greenFloat: number; - blueFloat: number; -}; -export interface DesciptorPattern { - 'Nm ': string; - Idnt: string; -} -export type DesciptorGradient = { - 'Nm ': string; - GrdF: 'GrdF.CstS'; - Intr: number; - Clrs: { - 'Clr ': DescriptorColor; - Type: 'Clry.UsrS'; - Lctn: number; - Mdpn: number; - }[]; - Trns: { - Opct: DescriptorUnitsValue; - Lctn: number; - Mdpn: number; - }[]; -} | { - GrdF: 'GrdF.ClNs'; - Smth: number; - 'Nm ': string; - ClrS: string; - RndS: number; - VctC?: boolean; - ShTr?: boolean; - 'Mnm ': number[]; - 'Mxm ': number[]; -}; -export interface DescriptorColorContent { - 'Clr ': DescriptorColor; -} -export interface DescriptorGradientContent { - Grad: DesciptorGradient; - Type: string; - Dthr?: boolean; - Rvrs?: boolean; - Angl?: DescriptorUnitsValue; - 'Scl '?: DescriptorUnitsValue; - Algn?: boolean; - Ofst?: { - Hrzn: DescriptorUnitsValue; - Vrtc: DescriptorUnitsValue; - }; -} -export interface DescriptorPatternContent { - Ptrn: DesciptorPattern; - Lnkd?: boolean; - phase?: { - Hrzn: number; - Vrtc: number; - }; -} -export type DescriptorVectorContent = DescriptorColorContent | DescriptorGradientContent | DescriptorPatternContent; -export interface StrokeDescriptor { - strokeStyleVersion: number; - strokeEnabled: boolean; - fillEnabled: boolean; - strokeStyleLineWidth: DescriptorUnitsValue; - strokeStyleLineDashOffset: DescriptorUnitsValue; - strokeStyleMiterLimit: number; - strokeStyleLineCapType: string; - strokeStyleLineJoinType: string; - strokeStyleLineAlignment: string; - strokeStyleScaleLock: boolean; - strokeStyleStrokeAdjust: boolean; - strokeStyleLineDashSet: DescriptorUnitsValue[]; - strokeStyleBlendMode: string; - strokeStyleOpacity: DescriptorUnitsValue; - strokeStyleContent: DescriptorVectorContent; - strokeStyleResolution: number; -} -export interface TextDescriptor { - 'Txt ': string; - textGridding: string; - Ornt: string; - AntA: string; - TextIndex: number; - EngineData?: Uint8Array; -} -export interface WarpDescriptor { - warpStyle: string; - warpValue?: number; - warpValues?: number[]; - warpPerspective: number; - warpPerspectiveOther: number; - warpRotate: string; - bounds?: { - 'Top ': DescriptorUnitsValue; - Left: DescriptorUnitsValue; - Btom: DescriptorUnitsValue; - Rght: DescriptorUnitsValue; - }; - uOrder: number; - vOrder: number; - customEnvelopeWarp?: { - meshPoints: { - type: 'Hrzn' | 'Vrtc'; - values: number[]; - }[]; - }; -} -export interface QuiltWarpDescriptor extends WarpDescriptor { - deformNumRows: number; - deformNumCols: number; - customEnvelopeWarp: { - quiltSliceX: { - type: 'quiltSliceX'; - values: number[]; - }[]; - quiltSliceY: { - type: 'quiltSliceY'; - values: number[]; - }[]; - meshPoints: { - type: 'Hrzn' | 'Vrtc'; - values: number[]; - }[]; - }; -} -export interface FractionDescriptor { - numerator: number; - denominator: number; -} -export interface HrznVrtcDescriptor { - Hrzn: number; - Vrtc: number; -} -export interface FrameDescriptor { - FrLs: number[]; - enab?: boolean; - IMsk?: { - Ofst: HrznVrtcDescriptor; - }; - VMsk?: { - Ofst: HrznVrtcDescriptor; - }; - Ofst?: HrznVrtcDescriptor; - FXRf?: HrznVrtcDescriptor; - Lefx?: Lfx2Descriptor; - blendOptions?: { - Opct: DescriptorUnitsValue; - }; -} -export interface FrameListDescriptor { - LaID: number; - LaSt: FrameDescriptor[]; -} -export declare function horzVrtcToXY(hv: HrznVrtcDescriptor): { - x: number; - y: number; -}; -export declare function xyToHorzVrtc(xy: { - x: number; - y: number; -}): HrznVrtcDescriptor; -export type TimelineAnimKeyDescriptor = { - Type: 'keyType.Opct'; - Opct: DescriptorUnitsValue; -} | { - Type: 'keyType.Trnf'; - 'Scl ': HrznVrtcDescriptor; - Skew: HrznVrtcDescriptor; - rotation: number; - translation: HrznVrtcDescriptor; -} | { - Type: 'keyType.Pstn'; - Hrzn: number; - Vrtc: number; -} | { - Type: 'keyType.sheetStyle'; - sheetStyle: { - Vrsn: number; - Lefx?: Lfx2Descriptor; - blendOptions: {}; - }; -} | { - Type: 'keyType.globalLighting'; - gblA: number; - globalAltitude: number; -}; -export interface TimelineKeyDescriptor { - Vrsn: 1; - animInterpStyle: 'animInterpStyle.Lnr ' | 'animInterpStyle.hold'; - time: FractionDescriptor; - animKey: TimelineAnimKeyDescriptor; - selected: boolean; -} -export interface TimelineTrackDescriptor { - trackID: 'stdTrackID.globalLightingTrack' | 'stdTrackID.opacityTrack' | 'stdTrackID.styleTrack' | 'stdTrackID.sheetTransformTrack' | 'stdTrackID.sheetPositionTrack'; - Vrsn: 1; - enab: boolean; - Effc: boolean; - effectParams?: { - keyList: TimelineKeyDescriptor[]; - fillCanvas: boolean; - zoomOrigin: number; - }; - keyList: TimelineKeyDescriptor[]; -} -export interface TimeScopeDescriptor { - Vrsn: 1; - Strt: FractionDescriptor; - duration: FractionDescriptor; - inTime: FractionDescriptor; - outTime: FractionDescriptor; -} -export interface TimelineDescriptor { - Vrsn: 1; - timeScope: TimeScopeDescriptor; - autoScope: boolean; - audioLevel: number; - LyrI: number; - trackList?: TimelineTrackDescriptor[]; -} -export interface EffectDescriptor extends Partial, Partial { - enab?: boolean; - Styl: string; - PntT?: string; - 'Md '?: string; - Opct?: DescriptorUnitsValue; - 'Sz '?: DescriptorUnitsValue; - 'Clr '?: DescriptorColor; - present?: boolean; - showInDialog?: boolean; - overprint?: boolean; -} -export interface Lfx2Descriptor { - 'Scl '?: DescriptorUnitsValue; - masterFXSwitch?: boolean; - DrSh?: EffectDescriptor; - IrSh?: EffectDescriptor; - OrGl?: EffectDescriptor; - IrGl?: EffectDescriptor; - ebbl?: EffectDescriptor; - SoFi?: EffectDescriptor; - patternFill?: EffectDescriptor; - GrFl?: EffectDescriptor; - ChFX?: EffectDescriptor; - FrFX?: EffectDescriptor; -} -export interface LmfxDescriptor { - 'Scl '?: DescriptorUnitsValue; - masterFXSwitch?: boolean; - numModifyingFX?: number; - OrGl?: EffectDescriptor; - IrGl?: EffectDescriptor; - ebbl?: EffectDescriptor; - ChFX?: EffectDescriptor; - dropShadowMulti?: EffectDescriptor[]; - innerShadowMulti?: EffectDescriptor[]; - solidFillMulti?: EffectDescriptor[]; - gradientFillMulti?: EffectDescriptor[]; - frameFXMulti?: EffectDescriptor[]; - patternFill?: EffectDescriptor; -} -export declare function serializeEffects(e: LayerEffectsInfo, log: boolean, multi: boolean): Lfx2Descriptor & LmfxDescriptor; -export declare function parseEffects(info: Lfx2Descriptor & LmfxDescriptor, log: boolean): LayerEffectsInfo; -export declare function parseTrackList(trackList: TimelineTrackDescriptor[], logMissingFeatures: boolean): TimelineTrack[]; -export declare function serializeTrackList(tracks: TimelineTrack[]): TimelineTrackDescriptor[]; -export declare function parseVectorContent(descriptor: DescriptorVectorContent): VectorContent; -export declare function serializeVectorContent(content: VectorContent): { - descriptor: DescriptorVectorContent; - key: string; -}; -export declare function parseColor(color: DescriptorColor): Color; -export declare function serializeColor(color: Color | undefined): DescriptorColor; -export declare function parseAngle(x: DescriptorUnitsValue): number; -export declare function parsePercent(x: DescriptorUnitsValue | undefined): number; -export declare function parsePercentOrAngle(x: DescriptorUnitsValue | undefined): number; -export declare function parseUnits({ units, value }: DescriptorUnitsValue): UnitsValue; -export declare function parseUnitsOrNumber(value: DescriptorUnitsValue | number, units?: Units): UnitsValue; -export declare function parseUnitsToNumber({ units, value }: DescriptorUnitsValue, expectedUnits: string): number; -export declare function unitsAngle(value: number | undefined): DescriptorUnitsValue; -export declare function unitsPercent(value: number | undefined): DescriptorUnitsValue; -export declare function unitsValue(x: UnitsValue | undefined, key: string): DescriptorUnitsValue; -export declare const textGridding: { - decode: (val: string) => TextGridding; - encode: (val: TextGridding | undefined) => string; -}; -export declare const Ornt: { - decode: (val: string) => Orientation; - encode: (val: Orientation | undefined) => string; -}; -export declare const Annt: { - decode: (val: string) => AntiAlias; - encode: (val: AntiAlias | undefined) => string; -}; -export declare const warpStyle: { - decode: (val: string) => WarpStyle; - encode: (val: WarpStyle | undefined) => string; -}; -export declare const BlnM: { - decode: (val: string) => BlendMode; - encode: (val: BlendMode | undefined) => string; -}; -export declare const BESl: { - decode: (val: string) => BevelStyle; - encode: (val: BevelStyle | undefined) => string; -}; -export declare const bvlT: { - decode: (val: string) => BevelTechnique; - encode: (val: BevelTechnique | undefined) => string; -}; -export declare const BESs: { - decode: (val: string) => BevelDirection; - encode: (val: BevelDirection | undefined) => string; -}; -export declare const BETE: { - decode: (val: string) => GlowTechnique; - encode: (val: GlowTechnique | undefined) => string; -}; -export declare const IGSr: { - decode: (val: string) => GlowSource; - encode: (val: GlowSource | undefined) => string; -}; -export declare const GrdT: { - decode: (val: string) => GradientStyle; - encode: (val: GradientStyle | undefined) => string; -}; -export declare const animInterpStyleEnum: { - decode: (val: string) => TimelineKeyInterpolation; - encode: (val: TimelineKeyInterpolation | undefined) => string; -}; -export declare const stdTrackID: { - decode: (val: string) => TimelineTrackType; - encode: (val: TimelineTrackType | undefined) => string; -}; -export declare const gradientInterpolationMethodType: { - decode: (val: string) => InterpolationMethod; - encode: (val: InterpolationMethod | undefined) => string; -}; -export declare const ClrS: { - decode: (val: string) => "rgb" | "hsb" | "lab"; - encode: (val: "rgb" | "hsb" | "lab" | undefined) => string; -}; -export declare const FStl: { - decode: (val: string) => "center" | "inside" | "outside"; - encode: (val: "center" | "inside" | "outside" | undefined) => string; -}; -export declare const FrFl: { - decode: (val: string) => "color" | "pattern" | "gradient"; - encode: (val: "color" | "pattern" | "gradient" | undefined) => string; -}; -export declare const ESliceType: { - decode: (val: string) => "image" | "noImage"; - encode: (val: "image" | "noImage" | undefined) => string; -}; -export declare const ESliceHorzAlign: { - decode: (val: string) => "default"; - encode: (val: "default" | undefined) => string; -}; -export declare const ESliceVertAlign: { - decode: (val: string) => "default"; - encode: (val: "default" | undefined) => string; -}; -export declare const ESliceOrigin: { - decode: (val: string) => "userGenerated" | "autoGenerated" | "layer"; - encode: (val: "userGenerated" | "autoGenerated" | "layer" | undefined) => string; -}; -export declare const ESliceBGColorType: { - decode: (val: string) => "none" | "color" | "matte"; - encode: (val: "none" | "color" | "matte" | undefined) => string; -}; -export declare const strokeStyleLineCapType: { - decode: (val: string) => LineCapType; - encode: (val: LineCapType | undefined) => string; -}; -export declare const strokeStyleLineJoinType: { - decode: (val: string) => LineJoinType; - encode: (val: LineJoinType | undefined) => string; -}; -export declare const strokeStyleLineAlignment: { - decode: (val: string) => LineAlignment; - encode: (val: LineAlignment | undefined) => string; -}; +import { AntiAlias, BevelDirection, BevelStyle, BevelTechnique, BlendMode, Color, GlowSource, GlowTechnique, GradientStyle, InterpolationMethod, LayerEffectsInfo, LineAlignment, LineCapType, LineJoinType, Orientation, TextGridding, TimelineKeyInterpolation, TimelineTrack, TimelineTrackType, Units, UnitsValue, VectorContent, WarpStyle } from './psd'; +import { PsdReader } from './psdReader'; +import { PsdWriter } from './psdWriter'; +export declare function setLogErrors(value: boolean): void; +export declare function readAsciiStringOrClassId(reader: PsdReader): string; +export declare function readDescriptorStructure(reader: PsdReader): any; +export declare function writeDescriptorStructure(writer: PsdWriter, name: string, classId: string, value: any, root: string): void; +export declare function readVersionAndDescriptor(reader: PsdReader): any; +export declare function writeVersionAndDescriptor(writer: PsdWriter, name: string, classID: string, descriptor: any, root?: string): void; +export declare type DescriptorUnits = 'Angle' | 'Density' | 'Distance' | 'None' | 'Percent' | 'Pixels' | 'Millimeters' | 'Points' | 'Picas' | 'Inches' | 'Centimeters'; +export interface DescriptorUnitsValue { + units: DescriptorUnits; + value: number; +} +export declare type DescriptorColor = { + 'Rd ': number; + 'Grn ': number; + 'Bl ': number; +} | { + 'H ': DescriptorUnitsValue; + Strt: number; + Brgh: number; +} | { + 'Cyn ': number; + Mgnt: number; + 'Ylw ': number; + Blck: number; +} | { + 'Gry ': number; +} | { + Lmnc: number; + 'A ': number; + 'B ': number; +}; +export interface DesciptorPattern { + 'Nm ': string; + Idnt: string; +} +export declare type DesciptorGradient = { + 'Nm ': string; + GrdF: 'GrdF.CstS'; + Intr: number; + Clrs: { + 'Clr ': DescriptorColor; + Type: 'Clry.UsrS'; + Lctn: number; + Mdpn: number; + }[]; + Trns: { + Opct: DescriptorUnitsValue; + Lctn: number; + Mdpn: number; + }[]; +} | { + GrdF: 'GrdF.ClNs'; + Smth: number; + 'Nm ': string; + ClrS: string; + RndS: number; + VctC?: boolean; + ShTr?: boolean; + 'Mnm ': number[]; + 'Mxm ': number[]; +}; +export interface DescriptorColorContent { + 'Clr ': DescriptorColor; +} +export interface DescriptorGradientContent { + Grad: DesciptorGradient; + Type: string; + Dthr?: boolean; + Rvrs?: boolean; + Angl?: DescriptorUnitsValue; + 'Scl '?: DescriptorUnitsValue; + Algn?: boolean; + Ofst?: { + Hrzn: DescriptorUnitsValue; + Vrtc: DescriptorUnitsValue; + }; +} +export interface DescriptorPatternContent { + Ptrn: DesciptorPattern; + Lnkd?: boolean; + phase?: { + Hrzn: number; + Vrtc: number; + }; +} +export declare type DescriptorVectorContent = DescriptorColorContent | DescriptorGradientContent | DescriptorPatternContent; +export interface StrokeDescriptor { + strokeStyleVersion: number; + strokeEnabled: boolean; + fillEnabled: boolean; + strokeStyleLineWidth: DescriptorUnitsValue; + strokeStyleLineDashOffset: DescriptorUnitsValue; + strokeStyleMiterLimit: number; + strokeStyleLineCapType: string; + strokeStyleLineJoinType: string; + strokeStyleLineAlignment: string; + strokeStyleScaleLock: boolean; + strokeStyleStrokeAdjust: boolean; + strokeStyleLineDashSet: DescriptorUnitsValue[]; + strokeStyleBlendMode: string; + strokeStyleOpacity: DescriptorUnitsValue; + strokeStyleContent: DescriptorVectorContent; + strokeStyleResolution: number; +} +export interface TextDescriptor { + 'Txt ': string; + textGridding: string; + Ornt: string; + AntA: string; + TextIndex: number; + EngineData?: Uint8Array; +} +export interface WarpDescriptor { + warpStyle: string; + warpValue: number; + warpPerspective: number; + warpPerspectiveOther: number; + warpRotate: string; + bounds?: { + 'Top ': DescriptorUnitsValue; + Left: DescriptorUnitsValue; + Btom: DescriptorUnitsValue; + Rght: DescriptorUnitsValue; + }; + uOrder: number; + vOrder: number; + customEnvelopeWarp?: { + meshPoints: { + type: 'Hrzn' | 'Vrtc'; + values: number[]; + }[]; + }; +} +export interface QuiltWarpDescriptor extends WarpDescriptor { + deformNumRows: number; + deformNumCols: number; + customEnvelopeWarp: { + quiltSliceX: { + type: 'quiltSliceX'; + values: number[]; + }[]; + quiltSliceY: { + type: 'quiltSliceY'; + values: number[]; + }[]; + meshPoints: { + type: 'Hrzn' | 'Vrtc'; + values: number[]; + }[]; + }; +} +export interface FractionDescriptor { + numerator: number; + denominator: number; +} +export interface HrznVrtcDescriptor { + Hrzn: number; + Vrtc: number; +} +export interface FrameDescriptor { + FrLs: number[]; + enab?: boolean; + IMsk?: { + Ofst: HrznVrtcDescriptor; + }; + VMsk?: { + Ofst: HrznVrtcDescriptor; + }; + Ofst?: HrznVrtcDescriptor; + FXRf?: HrznVrtcDescriptor; + Lefx?: Lfx2Descriptor; + blendOptions?: { + Opct: DescriptorUnitsValue; + }; +} +export interface FrameListDescriptor { + LaID: number; + LaSt: FrameDescriptor[]; +} +export declare function horzVrtcToXY(hv: HrznVrtcDescriptor): { + x: number; + y: number; +}; +export declare function xyToHorzVrtc(xy: { + x: number; + y: number; +}): HrznVrtcDescriptor; +export declare type TimelineAnimKeyDescriptor = { + Type: 'keyType.Opct'; + Opct: DescriptorUnitsValue; +} | { + Type: 'keyType.Trnf'; + 'Scl ': HrznVrtcDescriptor; + Skew: HrznVrtcDescriptor; + rotation: number; + translation: HrznVrtcDescriptor; +} | { + Type: 'keyType.Pstn'; + Hrzn: number; + Vrtc: number; +} | { + Type: 'keyType.sheetStyle'; + sheetStyle: { + Vrsn: number; + Lefx?: Lfx2Descriptor; + blendOptions: {}; + }; +} | { + Type: 'keyType.globalLighting'; + gblA: number; + globalAltitude: number; +}; +export interface TimelineKeyDescriptor { + Vrsn: 1; + animInterpStyle: 'animInterpStyle.Lnr ' | 'animInterpStyle.hold'; + time: FractionDescriptor; + animKey: TimelineAnimKeyDescriptor; + selected: boolean; +} +export interface TimelineTrackDescriptor { + trackID: 'stdTrackID.globalLightingTrack' | 'stdTrackID.opacityTrack' | 'stdTrackID.styleTrack' | 'stdTrackID.sheetTransformTrack' | 'stdTrackID.sheetPositionTrack'; + Vrsn: 1; + enab: boolean; + Effc: boolean; + effectParams?: { + keyList: TimelineKeyDescriptor[]; + fillCanvas: boolean; + zoomOrigin: number; + }; + keyList: TimelineKeyDescriptor[]; +} +export interface TimeScopeDescriptor { + Vrsn: 1; + Strt: FractionDescriptor; + duration: FractionDescriptor; + inTime: FractionDescriptor; + outTime: FractionDescriptor; +} +export interface TimelineDescriptor { + Vrsn: 1; + timeScope: TimeScopeDescriptor; + autoScope: boolean; + audioLevel: number; + LyrI: number; + trackList?: TimelineTrackDescriptor[]; +} +export interface EffectDescriptor extends Partial, Partial { + enab?: boolean; + Styl: string; + PntT?: string; + 'Md '?: string; + Opct?: DescriptorUnitsValue; + 'Sz '?: DescriptorUnitsValue; + 'Clr '?: DescriptorColor; + present?: boolean; + showInDialog?: boolean; + overprint?: boolean; +} +export interface Lfx2Descriptor { + 'Scl '?: DescriptorUnitsValue; + masterFXSwitch?: boolean; + DrSh?: EffectDescriptor; + IrSh?: EffectDescriptor; + OrGl?: EffectDescriptor; + IrGl?: EffectDescriptor; + ebbl?: EffectDescriptor; + SoFi?: EffectDescriptor; + patternFill?: EffectDescriptor; + GrFl?: EffectDescriptor; + ChFX?: EffectDescriptor; + FrFX?: EffectDescriptor; +} +export interface LmfxDescriptor { + 'Scl '?: DescriptorUnitsValue; + masterFXSwitch?: boolean; + numModifyingFX?: number; + OrGl?: EffectDescriptor; + IrGl?: EffectDescriptor; + ebbl?: EffectDescriptor; + ChFX?: EffectDescriptor; + dropShadowMulti?: EffectDescriptor[]; + innerShadowMulti?: EffectDescriptor[]; + solidFillMulti?: EffectDescriptor[]; + gradientFillMulti?: EffectDescriptor[]; + frameFXMulti?: EffectDescriptor[]; + patternFill?: EffectDescriptor; +} +export declare function serializeEffects(e: LayerEffectsInfo, log: boolean, multi: boolean): Lfx2Descriptor & LmfxDescriptor; +export declare function parseEffects(info: Lfx2Descriptor & LmfxDescriptor, log: boolean): LayerEffectsInfo; +export declare function parseTrackList(trackList: TimelineTrackDescriptor[], logMissingFeatures: boolean): TimelineTrack[]; +export declare function serializeTrackList(tracks: TimelineTrack[]): TimelineTrackDescriptor[]; +export declare function parseVectorContent(descriptor: DescriptorVectorContent): VectorContent; +export declare function serializeVectorContent(content: VectorContent): { + descriptor: DescriptorVectorContent; + key: string; +}; +export declare function parseColor(color: DescriptorColor): Color; +export declare function serializeColor(color: Color | undefined): DescriptorColor; +export declare function parseAngle(x: DescriptorUnitsValue): number; +export declare function parsePercent(x: DescriptorUnitsValue | undefined): number; +export declare function parsePercentOrAngle(x: DescriptorUnitsValue | undefined): number; +export declare function parseUnits({ units, value }: DescriptorUnitsValue): UnitsValue; +export declare function parseUnitsOrNumber(value: DescriptorUnitsValue | number, units?: Units): UnitsValue; +export declare function parseUnitsToNumber({ units, value }: DescriptorUnitsValue, expectedUnits: string): number; +export declare function unitsAngle(value: number | undefined): DescriptorUnitsValue; +export declare function unitsPercent(value: number | undefined): DescriptorUnitsValue; +export declare function unitsValue(x: UnitsValue | undefined, key: string): DescriptorUnitsValue; +export declare const textGridding: { + decode: (val: string) => TextGridding; + encode: (val: TextGridding | undefined) => string; +}; +export declare const Ornt: { + decode: (val: string) => Orientation; + encode: (val: Orientation | undefined) => string; +}; +export declare const Annt: { + decode: (val: string) => AntiAlias; + encode: (val: AntiAlias | undefined) => string; +}; +export declare const warpStyle: { + decode: (val: string) => WarpStyle; + encode: (val: WarpStyle | undefined) => string; +}; +export declare const BlnM: { + decode: (val: string) => BlendMode; + encode: (val: BlendMode | undefined) => string; +}; +export declare const BESl: { + decode: (val: string) => BevelStyle; + encode: (val: BevelStyle | undefined) => string; +}; +export declare const bvlT: { + decode: (val: string) => BevelTechnique; + encode: (val: BevelTechnique | undefined) => string; +}; +export declare const BESs: { + decode: (val: string) => BevelDirection; + encode: (val: BevelDirection | undefined) => string; +}; +export declare const BETE: { + decode: (val: string) => GlowTechnique; + encode: (val: GlowTechnique | undefined) => string; +}; +export declare const IGSr: { + decode: (val: string) => GlowSource; + encode: (val: GlowSource | undefined) => string; +}; +export declare const GrdT: { + decode: (val: string) => GradientStyle; + encode: (val: GradientStyle | undefined) => string; +}; +export declare const animInterpStyleEnum: { + decode: (val: string) => TimelineKeyInterpolation; + encode: (val: TimelineKeyInterpolation | undefined) => string; +}; +export declare const stdTrackID: { + decode: (val: string) => TimelineTrackType; + encode: (val: TimelineTrackType | undefined) => string; +}; +export declare const gradientInterpolationMethodType: { + decode: (val: string) => InterpolationMethod; + encode: (val: InterpolationMethod | undefined) => string; +}; +export declare const ClrS: { + decode: (val: string) => "rgb" | "hsb" | "lab"; + encode: (val: "rgb" | "hsb" | "lab" | undefined) => string; +}; +export declare const FStl: { + decode: (val: string) => "center" | "inside" | "outside"; + encode: (val: "center" | "inside" | "outside" | undefined) => string; +}; +export declare const FrFl: { + decode: (val: string) => "color" | "pattern" | "gradient"; + encode: (val: "color" | "pattern" | "gradient" | undefined) => string; +}; +export declare const strokeStyleLineCapType: { + decode: (val: string) => LineCapType; + encode: (val: LineCapType | undefined) => string; +}; +export declare const strokeStyleLineJoinType: { + decode: (val: string) => LineJoinType; + encode: (val: LineJoinType | undefined) => string; +}; +export declare const strokeStyleLineAlignment: { + decode: (val: string) => LineAlignment; + encode: (val: LineAlignment | undefined) => string; +}; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/descriptor.js b/npm-packages/mac-v2.4.x/ag-psd/dist/descriptor.js index eebfdd4..b2150f3 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/descriptor.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/descriptor.js @@ -1,1726 +1,1644 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.strokeStyleLineAlignment = exports.strokeStyleLineJoinType = exports.strokeStyleLineCapType = exports.ESliceBGColorType = exports.ESliceOrigin = exports.ESliceVertAlign = exports.ESliceHorzAlign = exports.ESliceType = exports.FrFl = exports.FStl = exports.ClrS = exports.gradientInterpolationMethodType = exports.stdTrackID = exports.animInterpStyleEnum = exports.GrdT = exports.IGSr = exports.BETE = exports.BESs = exports.bvlT = exports.BESl = exports.BlnM = exports.warpStyle = exports.Annt = exports.Ornt = exports.textGridding = exports.unitsValue = exports.unitsPercent = exports.unitsAngle = exports.parseUnitsToNumber = exports.parseUnitsOrNumber = exports.parseUnits = exports.parsePercentOrAngle = exports.parsePercent = exports.parseAngle = exports.serializeColor = exports.parseColor = exports.serializeVectorContent = exports.parseVectorContent = exports.serializeTrackList = exports.parseTrackList = exports.parseEffects = exports.serializeEffects = exports.xyToHorzVrtc = exports.horzVrtcToXY = exports.writeVersionAndDescriptor = exports.readVersionAndDescriptor = exports.writeDescriptorStructure = exports.readDescriptorStructure = exports.readAsciiStringOrClassId = exports.setLogErrors = void 0; -var helpers_1 = require("./helpers"); -var psdReader_1 = require("./psdReader"); -var psdWriter_1 = require("./psdWriter"); -function revMap(map) { - var result = {}; - Object.keys(map).forEach(function (key) { return result[map[key]] = key; }); - return result; -} -var unitsMap = { - '#Ang': 'Angle', - '#Rsl': 'Density', - '#Rlt': 'Distance', - '#Nne': 'None', - '#Prc': 'Percent', - '#Pxl': 'Pixels', - '#Mlm': 'Millimeters', - '#Pnt': 'Points', - 'RrPi': 'Picas', - 'RrIn': 'Inches', - 'RrCm': 'Centimeters', -}; -var unitsMapRev = revMap(unitsMap); -var logErrors = false; -function setLogErrors(value) { - logErrors = value; -} -exports.setLogErrors = setLogErrors; -function makeType(name, classID) { - return { name: name, classID: classID }; -} -var nullType = makeType('', 'null'); -var fieldToExtType = { - strokeStyleContent: makeType('', 'solidColorLayer'), - // printProofSetup: makeType('校样设置', 'proofSetup'), // TESTING - printProofSetup: makeType('Proof Setup', 'proofSetup'), - patternFill: makeType('', 'patternFill'), - Grad: makeType('Gradient', 'Grdn'), - ebbl: makeType('', 'ebbl'), - SoFi: makeType('', 'SoFi'), - GrFl: makeType('', 'GrFl'), - sdwC: makeType('', 'RGBC'), - hglC: makeType('', 'RGBC'), - 'Clr ': makeType('', 'RGBC'), - 'tintColor': makeType('', 'RGBC'), - Ofst: makeType('', 'Pnt '), - ChFX: makeType('', 'ChFX'), - MpgS: makeType('', 'ShpC'), - DrSh: makeType('', 'DrSh'), - IrSh: makeType('', 'IrSh'), - OrGl: makeType('', 'OrGl'), - IrGl: makeType('', 'IrGl'), - TrnS: makeType('', 'ShpC'), - Ptrn: makeType('', 'Ptrn'), - FrFX: makeType('', 'FrFX'), - phase: makeType('', 'Pnt '), - frameStep: nullType, - duration: nullType, - workInTime: nullType, - workOutTime: nullType, - audioClipGroupList: nullType, - bounds: makeType('', 'Rctn'), - customEnvelopeWarp: makeType('', 'customEnvelopeWarp'), - warp: makeType('', 'warp'), - 'Sz ': makeType('', 'Pnt '), - origin: makeType('', 'Pnt '), - autoExpandOffset: makeType('', 'Pnt '), - keyOriginShapeBBox: makeType('', 'unitRect'), - Vrsn: nullType, - psVersion: nullType, - docDefaultNewArtboardBackgroundColor: makeType('', 'RGBC'), - artboardRect: makeType('', 'classFloatRect'), - keyOriginRRectRadii: makeType('', 'radii'), - keyOriginBoxCorners: nullType, - rectangleCornerA: makeType('', 'Pnt '), - rectangleCornerB: makeType('', 'Pnt '), - rectangleCornerC: makeType('', 'Pnt '), - rectangleCornerD: makeType('', 'Pnt '), - compInfo: nullType, - Trnf: makeType('Transform', 'Trnf'), - quiltWarp: makeType('', 'quiltWarp'), - generatorSettings: nullType, - crema: nullType, - FrIn: nullType, - blendOptions: nullType, - FXRf: nullType, - Lefx: nullType, - time: nullType, - animKey: nullType, - timeScope: nullType, - inTime: nullType, - outTime: nullType, - sheetStyle: nullType, - translation: nullType, - Skew: nullType, - 'Lnk ': makeType('', 'ExternalFileLink'), - frameReader: makeType('', 'FrameReader'), - effectParams: makeType('', 'motionTrackEffectParams'), - Impr: makeType('None', 'none'), - Anch: makeType('', 'Pnt '), - 'Fwd ': makeType('', 'Pnt '), - 'Bwd ': makeType('', 'Pnt '), - meshBoundaryPath: makeType('', 'pathClass'), - filterFX: makeType('', 'filterFXStyle'), - Fltr: makeType('', 'rigidTransform'), - FrgC: makeType('', 'RGBC'), - BckC: makeType('', 'RGBC'), -}; -var fieldToArrayExtType = { - 'Crv ': makeType('', 'CrPt'), - Clrs: makeType('', 'Clrt'), - Trns: makeType('', 'TrnS'), - keyDescriptorList: nullType, - solidFillMulti: makeType('', 'SoFi'), - gradientFillMulti: makeType('', 'GrFl'), - dropShadowMulti: makeType('', 'DrSh'), - innerShadowMulti: makeType('', 'IrSh'), - frameFXMulti: makeType('', 'FrFX'), - FrIn: nullType, - FSts: nullType, - LaSt: nullType, - sheetTimelineOptions: nullType, - trackList: makeType('', 'animationTrack'), - globalTrackList: makeType('', 'animationTrack'), - keyList: nullType, - audioClipGroupList: nullType, - audioClipList: nullType, - countObjectList: makeType('', 'countObject'), - countGroupList: makeType('', 'countGroup'), - slices: makeType('', 'slice'), - 'Pts ': makeType('', 'Pthp'), - SbpL: makeType('', 'SbpL'), - pathComponents: makeType('', 'PaCm'), - filterFXList: makeType('', 'filterFX'), - puppetShapeList: makeType('', 'puppetShape'), -}; -var typeToField = { - 'TEXT': [ - 'Txt ', 'printerName', 'Nm ', 'Idnt', 'blackAndWhitePresetFileName', 'LUT3DFileName', - 'presetFileName', 'curvesPresetFileName', 'mixerPresetFileName', 'placed', 'description', 'reason', - 'artboardPresetName', 'json', 'clipID', 'relPath', 'fullPath', 'mediaDescriptor', 'Msge', - 'altTag', 'url', 'cellText', - ], - 'tdta': ['EngineData', 'LUT3DFileData', 'indexArray', 'originalVertexArray', 'deformedVertexArray'], - 'long': [ - 'TextIndex', 'RndS', 'Mdpn', 'Smth', 'Lctn', 'strokeStyleVersion', 'LaID', 'Vrsn', 'Cnt ', - 'Brgh', 'Cntr', 'means', 'vibrance', 'Strt', 'bwPresetKind', 'presetKind', 'comp', 'compID', 'originalCompID', - 'curvesPresetKind', 'mixerPresetKind', 'uOrder', 'vOrder', 'PgNm', 'totalPages', 'Crop', - 'numerator', 'denominator', 'frameCount', 'Annt', 'keyOriginType', 'unitValueQuadVersion', - 'keyOriginIndex', 'major', 'minor', 'fix', 'docDefaultNewArtboardBackgroundType', 'artboardBackgroundType', - 'numModifyingFX', 'deformNumRows', 'deformNumCols', 'FrID', 'FrDl', 'FsID', 'LCnt', 'AFrm', 'AFSt', - 'numBefore', 'numAfter', 'Spcn', 'minOpacity', 'maxOpacity', 'BlnM', 'sheetID', 'gblA', 'globalAltitude', - 'descVersion', 'frameReaderType', 'LyrI', 'zoomOrigin', 'fontSize', 'Rds ', 'sliceID', - 'topOutset', 'leftOutset', 'bottomOutset', 'rightOutset', 'filterID', 'meshQuality', - 'meshExpansion', 'meshRigidity', 'VrsM', 'VrsN', - ], - 'enum': [ - 'textGridding', 'Ornt', 'warpStyle', 'warpRotate', 'Inte', 'Bltn', 'ClrS', - 'sdwM', 'hglM', 'bvlT', 'bvlS', 'bvlD', 'Md ', 'glwS', 'GrdF', 'GlwT', - 'strokeStyleLineCapType', 'strokeStyleLineJoinType', 'strokeStyleLineAlignment', - 'strokeStyleBlendMode', 'PntT', 'Styl', 'lookupType', 'LUTFormat', 'dataOrder', - 'tableOrder', 'enableCompCore', 'enableCompCoreGPU', 'compCoreSupport', 'compCoreGPUSupport', 'Engn', - 'enableCompCoreThreads', 'gs99', 'FrDs', 'trackID', 'animInterpStyle', 'horzAlign', - 'vertAlign', 'bgColorType', 'shapeOperation', - ], - 'bool': [ - 'PstS', 'printSixteenBit', 'masterFXSwitch', 'enab', 'uglg', 'antialiasGloss', - 'useShape', 'useTexture', 'uglg', 'antialiasGloss', 'useShape', 'Vsbl', - 'useTexture', 'Algn', 'Rvrs', 'Dthr', 'Invr', 'VctC', 'ShTr', 'layerConceals', - 'strokeEnabled', 'fillEnabled', 'strokeStyleScaleLock', 'strokeStyleStrokeAdjust', - 'hardProof', 'MpBl', 'paperWhite', 'useLegacy', 'Auto', 'Lab ', 'useTint', 'keyShapeInvalidated', - 'autoExpandEnabled', 'autoNestEnabled', 'autoPositionEnabled', 'shrinkwrapOnSaveEnabled', - 'present', 'showInDialog', 'overprint', 'sheetDisclosed', 'lightsDisclosed', 'meshesDisclosed', - 'materialsDisclosed', 'hasMotion', 'muted', 'Effc', 'selected', 'autoScope', 'fillCanvas', - 'cellTextIsHTML', 'Smoo', 'Clsp', 'validAtPosition', 'rigidType', 'hasoptions', 'filterMaskEnable', - 'filterMaskLinked', 'filterMaskExtendWithWhite', - ], - 'doub': [ - 'warpValue', 'warpPerspective', 'warpPerspectiveOther', 'Intr', 'Wdth', 'Hght', - 'strokeStyleMiterLimit', 'strokeStyleResolution', 'layerTime', 'keyOriginResolution', - 'xx', 'xy', 'yx', 'yy', 'tx', 'ty', 'FrGA', 'frameRate', 'audioLevel', 'rotation', - 'X ', 'Y ', 'redFloat', 'greenFloat', 'blueFloat', 'imageResolution', - 'PuX0', 'PuX1', 'PuX2', 'PuX3', 'PuY0', 'PuY1', 'PuY2', 'PuY3' - ], - 'UntF': [ - 'Scl ', 'sdwO', 'hglO', 'lagl', 'Lald', 'srgR', 'blur', 'Sftn', 'Opct', 'Dstn', 'Angl', - 'Ckmt', 'Nose', 'Inpr', 'ShdN', 'strokeStyleLineWidth', 'strokeStyleLineDashOffset', - 'strokeStyleOpacity', 'H ', 'Top ', 'Left', 'Btom', 'Rght', 'Rslt', - 'topRight', 'topLeft', 'bottomLeft', 'bottomRight', - ], - 'VlLs': [ - 'Crv ', 'Clrs', 'Mnm ', 'Mxm ', 'Trns', 'pathList', 'strokeStyleLineDashSet', 'FrLs', 'slices', - 'LaSt', 'Trnf', 'nonAffineTransform', 'keyDescriptorList', 'guideIndeces', 'gradientFillMulti', - 'solidFillMulti', 'frameFXMulti', 'innerShadowMulti', 'dropShadowMulti', 'FrIn', 'FSts', 'FsFr', - 'sheetTimelineOptions', 'audioClipList', 'trackList', 'globalTrackList', 'keyList', 'audioClipList', - 'warpValues', 'selectedPin', 'Pts ', 'SbpL', 'pathComponents', 'pinOffsets', 'posFinalPins', - 'pinVertexIndices', 'PinP', 'PnRt', 'PnOv', 'PnDp', 'filterFXList', 'puppetShapeList', - ], - 'ObAr': ['meshPoints', 'quiltSliceX', 'quiltSliceY'], - 'obj ': ['null'], -}; -var channels = [ - 'Rd ', 'Grn ', 'Bl ', 'Yllw', 'Ylw ', 'Cyn ', 'Mgnt', 'Blck', 'Gry ', 'Lmnc', 'A ', 'B ', -]; -var fieldToArrayType = { - 'Mnm ': 'long', - 'Mxm ': 'long', - FrLs: 'long', - strokeStyleLineDashSet: 'UntF', - Trnf: 'doub', - nonAffineTransform: 'doub', - keyDescriptorList: 'Objc', - gradientFillMulti: 'Objc', - solidFillMulti: 'Objc', - frameFXMulti: 'Objc', - innerShadowMulti: 'Objc', - dropShadowMulti: 'Objc', - LaSt: 'Objc', - FrIn: 'Objc', - FSts: 'Objc', - FsFr: 'long', - blendOptions: 'Objc', - sheetTimelineOptions: 'Objc', - keyList: 'Objc', - warpValues: 'doub', - selectedPin: 'long', - 'Pts ': 'Objc', - SbpL: 'Objc', - pathComponents: 'Objc', - pinOffsets: 'doub', - posFinalPins: 'doub', - pinVertexIndices: 'long', - PinP: 'doub', - PnRt: 'long', - PnOv: 'bool', - PnDp: 'doub', - filterFXList: 'Objc', - puppetShapeList: 'Objc', -}; -var fieldToType = {}; -for (var _i = 0, _a = Object.keys(typeToField); _i < _a.length; _i++) { - var type = _a[_i]; - for (var _b = 0, _c = typeToField[type]; _b < _c.length; _b++) { - var field = _c[_b]; - fieldToType[field] = type; - } -} -for (var _d = 0, _e = Object.keys(fieldToExtType); _d < _e.length; _d++) { - var field = _e[_d]; - if (!fieldToType[field]) - fieldToType[field] = 'Objc'; -} -for (var _f = 0, _g = Object.keys(fieldToArrayExtType); _f < _g.length; _f++) { - var field = _g[_f]; - fieldToArrayType[field] = 'Objc'; -} -function getTypeByKey(key, value, root, parent) { - if (key === 'null' && root === 'slices') { - return 'TEXT'; - } - else if (key === 'groupID') { - return root === 'slices' ? 'long' : 'TEXT'; - } - else if (key === 'Sz ') { - return ('Wdth' in value) ? 'Objc' : (('units' in value) ? 'UntF' : 'doub'); - } - else if (key === 'Type') { - return typeof value === 'string' ? 'enum' : 'long'; - } - else if (key === 'AntA') { - return typeof value === 'string' ? 'enum' : 'bool'; - } - else if ((key === 'Hrzn' || key === 'Vrtc') && parent.Type === 'keyType.Pstn') { - return 'long'; - } - else if (key === 'Hrzn' || key === 'Vrtc' || key === 'Top ' || key === 'Left' || key === 'Btom' || key === 'Rght') { - if (root === 'slices') - return 'long'; - return typeof value === 'number' ? 'doub' : 'UntF'; - } - else if (key === 'Vrsn') { - return typeof value === 'number' ? 'long' : 'Objc'; - } - else if (key === 'Rd ' || key === 'Grn ' || key === 'Bl ') { - return root === 'artd' ? 'long' : 'doub'; - } - else if (key === 'Trnf') { - return Array.isArray(value) ? 'VlLs' : 'Objc'; - } - else { - return fieldToType[key]; - } -} -function readAsciiStringOrClassId(reader) { - var length = (0, psdReader_1.readInt32)(reader); - return (0, psdReader_1.readAsciiString)(reader, length || 4); -} -exports.readAsciiStringOrClassId = readAsciiStringOrClassId; -function writeAsciiStringOrClassId(writer, value) { - if (value.length === 4 && value !== 'warp' && value !== 'time' && value !== 'hold') { - // write classId - (0, psdWriter_1.writeInt32)(writer, 0); - (0, psdWriter_1.writeSignature)(writer, value); - } - else { - // write ascii string - (0, psdWriter_1.writeInt32)(writer, value.length); - for (var i = 0; i < value.length; i++) { - (0, psdWriter_1.writeUint8)(writer, value.charCodeAt(i)); - } - } -} -function readDescriptorStructure(reader) { - var object = {}; - // object.__struct = - readClassStructure(reader); - var itemsCount = (0, psdReader_1.readUint32)(reader); - // console.log('//', object.__struct); - for (var i = 0; i < itemsCount; i++) { - var key = readAsciiStringOrClassId(reader); - var type = (0, psdReader_1.readSignature)(reader); - // console.log(`> '${key}' '${type}'`); - var data = readOSType(reader, type); - // if (!getTypeByKey(key, data)) console.log(`> '${key}' '${type}'`, data); - object[key] = data; - } - return object; -} -exports.readDescriptorStructure = readDescriptorStructure; -function writeDescriptorStructure(writer, name, classId, value, root) { - if (logErrors && !classId) - console.log('Missing classId for: ', name, classId, value); - // write class structure - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, name); - writeAsciiStringOrClassId(writer, classId); - var keys = Object.keys(value); - (0, psdWriter_1.writeUint32)(writer, keys.length); - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - var type = getTypeByKey(key, value[key], root, value); - var extType = fieldToExtType[key]; - if (key === 'origin') { - type = root === 'slices' ? 'enum' : 'Objc'; - } - else if (key === 'bounds' && root === 'slices') { - type = 'Objc'; - extType = makeType('', 'Rct1'); - } - else if (key === 'Scl ' && 'Hrzn' in value[key]) { - type = 'Objc'; - extType = nullType; - } - else if (key === 'audioClipGroupList' && keys.length === 1) { - type = 'VlLs'; - } - else if ((key === 'Strt' || key === 'Brgh') && 'H ' in value) { - type = 'doub'; - } - else if (key === 'Strt') { - type = 'Objc'; - extType = nullType; - } - else if (channels.indexOf(key) !== -1) { - type = (classId === 'RGBC' && root !== 'artd') ? 'doub' : 'long'; - } - else if (key === 'profile') { - type = classId === 'printOutput' ? 'TEXT' : 'tdta'; - } - else if (key === 'strokeStyleContent') { - if (value[key]['Clr ']) { - extType = makeType('', 'solidColorLayer'); - } - else if (value[key].Grad) { - extType = makeType('', 'gradientLayer'); - } - else if (value[key].Ptrn) { - extType = makeType('', 'patternLayer'); - } - else { - logErrors && console.log('Invalid strokeStyleContent value', value[key]); - } - } - else if (key === 'bounds' && root === 'quiltWarp') { - extType = makeType('', 'classFloatRect'); - } - if (extType && extType.classID === 'RGBC') { - if ('H ' in value[key]) - extType = { classID: 'HSBC', name: '' }; - // TODO: other color spaces - } - writeAsciiStringOrClassId(writer, key); - (0, psdWriter_1.writeSignature)(writer, type || 'long'); - writeOSType(writer, type || 'long', value[key], key, extType, root); - if (logErrors && !type) - console.log("Missing descriptor field type for: '".concat(key, "' in"), value); - } -} -exports.writeDescriptorStructure = writeDescriptorStructure; -function readOSType(reader, type) { - switch (type) { - case 'obj ': // Reference - return readReferenceStructure(reader); - case 'Objc': // Descriptor - case 'GlbO': // GlobalObject same as Descriptor - return readDescriptorStructure(reader); - case 'VlLs': { // List - var length_1 = (0, psdReader_1.readInt32)(reader); - var items = []; - for (var i = 0; i < length_1; i++) { - var type_1 = (0, psdReader_1.readSignature)(reader); - // console.log(' >', type); - items.push(readOSType(reader, type_1)); - } - return items; - } - case 'doub': // Double - return (0, psdReader_1.readFloat64)(reader); - case 'UntF': { // Unit double - var units = (0, psdReader_1.readSignature)(reader); - var value = (0, psdReader_1.readFloat64)(reader); - if (!unitsMap[units]) - throw new Error("Invalid units: ".concat(units)); - return { units: unitsMap[units], value: value }; - } - case 'UnFl': { // Unit float - var units = (0, psdReader_1.readSignature)(reader); - var value = (0, psdReader_1.readFloat32)(reader); - if (!unitsMap[units]) - throw new Error("Invalid units: ".concat(units)); - return { units: unitsMap[units], value: value }; - } - case 'TEXT': // String - return (0, psdReader_1.readUnicodeString)(reader); - case 'enum': { // Enumerated - var type_2 = readAsciiStringOrClassId(reader); - var value = readAsciiStringOrClassId(reader); - return "".concat(type_2, ".").concat(value); - } - case 'long': // Integer - return (0, psdReader_1.readInt32)(reader); - case 'comp': { // Large Integer - var low = (0, psdReader_1.readUint32)(reader); - var high = (0, psdReader_1.readUint32)(reader); - return { low: low, high: high }; - } - case 'bool': // Boolean - return !!(0, psdReader_1.readUint8)(reader); - case 'type': // Class - case 'GlbC': // Class - return readClassStructure(reader); - case 'alis': { // Alias - var length_2 = (0, psdReader_1.readInt32)(reader); - return (0, psdReader_1.readAsciiString)(reader, length_2); - } - case 'tdta': { // Raw Data - var length_3 = (0, psdReader_1.readInt32)(reader); - return (0, psdReader_1.readBytes)(reader, length_3); - } - case 'ObAr': { // Object array - (0, psdReader_1.readInt32)(reader); // version: 16 - (0, psdReader_1.readUnicodeString)(reader); // name: '' - readAsciiStringOrClassId(reader); // 'rationalPoint' - var length_4 = (0, psdReader_1.readInt32)(reader); - var items = []; - for (var i = 0; i < length_4; i++) { - var type1 = readAsciiStringOrClassId(reader); // type Hrzn | Vrtc - (0, psdReader_1.readSignature)(reader); // UnFl - (0, psdReader_1.readSignature)(reader); // units ? '#Pxl' - var valuesCount = (0, psdReader_1.readInt32)(reader); - var values = []; - for (var j = 0; j < valuesCount; j++) { - values.push((0, psdReader_1.readFloat64)(reader)); - } - items.push({ type: type1, values: values }); - } - return items; - } - case 'Pth ': { // File path - /*const length =*/ (0, psdReader_1.readInt32)(reader); - var sig = (0, psdReader_1.readSignature)(reader); - /*const pathSize =*/ (0, psdReader_1.readInt32LE)(reader); - var charsCount = (0, psdReader_1.readInt32LE)(reader); - var path = (0, psdReader_1.readUnicodeStringWithLength)(reader, charsCount); - return { sig: sig, path: path }; - } - default: - throw new Error("Invalid TySh descriptor OSType: ".concat(type, " at ").concat(reader.offset.toString(16))); - } -} -var ObArTypes = { - meshPoints: 'rationalPoint', - quiltSliceX: 'UntF', - quiltSliceY: 'UntF', -}; -function writeOSType(writer, type, value, key, extType, root) { - switch (type) { - case 'obj ': // Reference - writeReferenceStructure(writer, key, value); - break; - case 'Objc': // Descriptor - case 'GlbO': // GlobalObject same as Descriptor - if (!extType) - throw new Error("Missing ext type for: '".concat(key, "' (").concat(JSON.stringify(value), ")")); - writeDescriptorStructure(writer, extType.name, extType.classID, value, root); - break; - case 'VlLs': // List - (0, psdWriter_1.writeInt32)(writer, value.length); - for (var i = 0; i < value.length; i++) { - var type_3 = fieldToArrayType[key]; - (0, psdWriter_1.writeSignature)(writer, type_3 || 'long'); - writeOSType(writer, type_3 || 'long', value[i], "".concat(key, "[]"), fieldToArrayExtType[key], root); - if (logErrors && !type_3) - console.log("Missing descriptor array type for: '".concat(key, "' in"), value); - } - break; - case 'doub': // Double - (0, psdWriter_1.writeFloat64)(writer, value); - break; - case 'UntF': // Unit double - if (!unitsMapRev[value.units]) - throw new Error("Invalid units: ".concat(value.units, " in ").concat(key)); - (0, psdWriter_1.writeSignature)(writer, unitsMapRev[value.units]); - (0, psdWriter_1.writeFloat64)(writer, value.value); - break; - case 'UnFl': // Unit float - if (!unitsMapRev[value.units]) - throw new Error("Invalid units: ".concat(value.units, " in ").concat(key)); - (0, psdWriter_1.writeSignature)(writer, unitsMapRev[value.units]); - (0, psdWriter_1.writeFloat32)(writer, value.value); - break; - case 'TEXT': // String - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, value); - break; - case 'enum': { // Enumerated - var _a = value.split('.'), _type = _a[0], val = _a[1]; - writeAsciiStringOrClassId(writer, _type); - writeAsciiStringOrClassId(writer, val); - break; - } - case 'long': // Integer - (0, psdWriter_1.writeInt32)(writer, value); - break; - // case 'comp': // Large Integer - // writeLargeInteger(reader); - case 'bool': // Boolean - (0, psdWriter_1.writeUint8)(writer, value ? 1 : 0); - break; - // case 'type': // Class - // case 'GlbC': // Class - // writeClassStructure(reader); - // case 'alis': // Alias - // writeAliasStructure(reader); - case 'tdta': // Raw Data - (0, psdWriter_1.writeInt32)(writer, value.byteLength); - (0, psdWriter_1.writeBytes)(writer, value); - break; - case 'ObAr': { // Object array - (0, psdWriter_1.writeInt32)(writer, 16); // version - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, ''); // name - var type_4 = ObArTypes[key]; - if (!type_4) - throw new Error("Not implemented ObArType for: ".concat(key)); - writeAsciiStringOrClassId(writer, type_4); - (0, psdWriter_1.writeInt32)(writer, value.length); - for (var i = 0; i < value.length; i++) { - writeAsciiStringOrClassId(writer, value[i].type); // Hrzn | Vrtc - (0, psdWriter_1.writeSignature)(writer, 'UnFl'); - (0, psdWriter_1.writeSignature)(writer, '#Pxl'); - (0, psdWriter_1.writeInt32)(writer, value[i].values.length); - for (var j = 0; j < value[i].values.length; j++) { - (0, psdWriter_1.writeFloat64)(writer, value[i].values[j]); - } - } - break; - } - // case 'Pth ': // File path - // writeFilePath(reader); - default: - throw new Error("Not implemented descriptor OSType: ".concat(type)); - } -} -function readReferenceStructure(reader) { - var itemsCount = (0, psdReader_1.readInt32)(reader); - var items = []; - for (var i = 0; i < itemsCount; i++) { - var type = (0, psdReader_1.readSignature)(reader); - switch (type) { - case 'prop': { // Property - readClassStructure(reader); - var keyID = readAsciiStringOrClassId(reader); - items.push(keyID); - break; - } - case 'Clss': // Class - items.push(readClassStructure(reader)); - break; - case 'Enmr': { // Enumerated Reference - readClassStructure(reader); - var typeID = readAsciiStringOrClassId(reader); - var value = readAsciiStringOrClassId(reader); - items.push("".concat(typeID, ".").concat(value)); - break; - } - case 'rele': { // Offset - // const { name, classID } = - readClassStructure(reader); - items.push((0, psdReader_1.readUint32)(reader)); - break; - } - case 'Idnt': // Identifier - items.push((0, psdReader_1.readInt32)(reader)); - break; - case 'indx': // Index - items.push((0, psdReader_1.readInt32)(reader)); - break; - case 'name': { // Name - readClassStructure(reader); - items.push((0, psdReader_1.readUnicodeString)(reader)); - break; - } - default: - throw new Error("Invalid descriptor reference type: ".concat(type)); - } - } - return items; -} -function writeReferenceStructure(writer, _key, items) { - (0, psdWriter_1.writeInt32)(writer, items.length); - for (var i = 0; i < items.length; i++) { - var value = items[i]; - var type = 'unknown'; - if (typeof value === 'string') { - if (/^[a-z]+\.[a-z]+$/i.test(value)) { - type = 'Enmr'; - } - else { - type = 'name'; - } - } - (0, psdWriter_1.writeSignature)(writer, type); - switch (type) { - // case 'prop': // Property - // case 'Clss': // Class - case 'Enmr': { // Enumerated Reference - var _a = value.split('.'), typeID = _a[0], enumValue = _a[1]; - writeClassStructure(writer, '\0', typeID); - writeAsciiStringOrClassId(writer, typeID); - writeAsciiStringOrClassId(writer, enumValue); - break; - } - // case 'rele': // Offset - // case 'Idnt': // Identifier - // case 'indx': // Index - case 'name': { // Name - writeClassStructure(writer, '\0', 'Lyr '); - (0, psdWriter_1.writeUnicodeString)(writer, value + '\0'); - break; - } - default: - throw new Error("Invalid descriptor reference type: ".concat(type)); - } - } - return items; -} -function readClassStructure(reader) { - var name = (0, psdReader_1.readUnicodeString)(reader); - var classID = readAsciiStringOrClassId(reader); - // console.log({ name, classID }); - return { name: name, classID: classID }; -} -function writeClassStructure(writer, name, classID) { - (0, psdWriter_1.writeUnicodeString)(writer, name); - writeAsciiStringOrClassId(writer, classID); -} -function readVersionAndDescriptor(reader) { - var version = (0, psdReader_1.readUint32)(reader); - if (version !== 16) - throw new Error("Invalid descriptor version: ".concat(version)); - var desc = readDescriptorStructure(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - return desc; -} -exports.readVersionAndDescriptor = readVersionAndDescriptor; -function writeVersionAndDescriptor(writer, name, classID, descriptor, root) { - if (root === void 0) { root = ''; } - (0, psdWriter_1.writeUint32)(writer, 16); // version - writeDescriptorStructure(writer, name, classID, descriptor, root); -} -exports.writeVersionAndDescriptor = writeVersionAndDescriptor; -function horzVrtcToXY(hv) { - return { x: hv.Hrzn, y: hv.Vrtc }; -} -exports.horzVrtcToXY = horzVrtcToXY; -function xyToHorzVrtc(xy) { - return { Hrzn: xy.x, Vrtc: xy.y }; -} -exports.xyToHorzVrtc = xyToHorzVrtc; -function parseFxObject(fx) { - var stroke = { - enabled: !!fx.enab, - position: exports.FStl.decode(fx.Styl), - fillType: exports.FrFl.decode(fx.PntT), - blendMode: exports.BlnM.decode(fx['Md ']), - opacity: parsePercent(fx.Opct), - size: parseUnits(fx['Sz ']), - }; - if (fx.present !== undefined) - stroke.present = fx.present; - if (fx.showInDialog !== undefined) - stroke.showInDialog = fx.showInDialog; - if (fx.overprint !== undefined) - stroke.overprint = fx.overprint; - if (fx['Clr ']) - stroke.color = parseColor(fx['Clr ']); - if (fx.Grad) - stroke.gradient = parseGradientContent(fx); - if (fx.Ptrn) - stroke.pattern = parsePatternContent(fx); - return stroke; -} -function serializeFxObject(stroke) { - var FrFX = {}; - FrFX.enab = !!stroke.enabled; - if (stroke.present !== undefined) - FrFX.present = !!stroke.present; - if (stroke.showInDialog !== undefined) - FrFX.showInDialog = !!stroke.showInDialog; - FrFX.Styl = exports.FStl.encode(stroke.position); - FrFX.PntT = exports.FrFl.encode(stroke.fillType); - FrFX['Md '] = exports.BlnM.encode(stroke.blendMode); - FrFX.Opct = unitsPercent(stroke.opacity); - FrFX['Sz '] = unitsValue(stroke.size, 'size'); - if (stroke.color) - FrFX['Clr '] = serializeColor(stroke.color); - if (stroke.gradient) - FrFX = __assign(__assign({}, FrFX), serializeGradientContent(stroke.gradient)); - if (stroke.pattern) - FrFX = __assign(__assign({}, FrFX), serializePatternContent(stroke.pattern)); - if (stroke.overprint !== undefined) - FrFX.overprint = !!stroke.overprint; - return FrFX; -} -function serializeEffects(e, log, multi) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; - var info = multi ? { - 'Scl ': unitsPercent((_a = e.scale) !== null && _a !== void 0 ? _a : 1), - masterFXSwitch: !e.disabled, - } : { - masterFXSwitch: !e.disabled, - 'Scl ': unitsPercent((_b = e.scale) !== null && _b !== void 0 ? _b : 1), - }; - var arrayKeys = ['dropShadow', 'innerShadow', 'solidFill', 'gradientOverlay', 'stroke']; - for (var _i = 0, arrayKeys_1 = arrayKeys; _i < arrayKeys_1.length; _i++) { - var key = arrayKeys_1[_i]; - if (e[key] && !Array.isArray(e[key])) - throw new Error("".concat(key, " should be an array")); - } - if (((_c = e.dropShadow) === null || _c === void 0 ? void 0 : _c[0]) && !multi) - info.DrSh = serializeEffectObject(e.dropShadow[0], 'dropShadow', log); - if (((_d = e.dropShadow) === null || _d === void 0 ? void 0 : _d[0]) && multi) - info.dropShadowMulti = e.dropShadow.map(function (i) { return serializeEffectObject(i, 'dropShadow', log); }); - if (((_e = e.innerShadow) === null || _e === void 0 ? void 0 : _e[0]) && !multi) - info.IrSh = serializeEffectObject(e.innerShadow[0], 'innerShadow', log); - if (((_f = e.innerShadow) === null || _f === void 0 ? void 0 : _f[0]) && multi) - info.innerShadowMulti = e.innerShadow.map(function (i) { return serializeEffectObject(i, 'innerShadow', log); }); - if (e.outerGlow) - info.OrGl = serializeEffectObject(e.outerGlow, 'outerGlow', log); - if (((_g = e.solidFill) === null || _g === void 0 ? void 0 : _g[0]) && multi) - info.solidFillMulti = e.solidFill.map(function (i) { return serializeEffectObject(i, 'solidFill', log); }); - if (((_h = e.gradientOverlay) === null || _h === void 0 ? void 0 : _h[0]) && multi) - info.gradientFillMulti = e.gradientOverlay.map(function (i) { return serializeEffectObject(i, 'gradientOverlay', log); }); - if (((_j = e.stroke) === null || _j === void 0 ? void 0 : _j[0]) && multi) - info.frameFXMulti = e.stroke.map(function (i) { return serializeFxObject(i); }); - if (e.innerGlow) - info.IrGl = serializeEffectObject(e.innerGlow, 'innerGlow', log); - if (e.bevel) - info.ebbl = serializeEffectObject(e.bevel, 'bevel', log); - if (((_k = e.solidFill) === null || _k === void 0 ? void 0 : _k[0]) && !multi) - info.SoFi = serializeEffectObject(e.solidFill[0], 'solidFill', log); - if (e.patternOverlay) - info.patternFill = serializeEffectObject(e.patternOverlay, 'patternOverlay', log); - if (((_l = e.gradientOverlay) === null || _l === void 0 ? void 0 : _l[0]) && !multi) - info.GrFl = serializeEffectObject(e.gradientOverlay[0], 'gradientOverlay', log); - if (e.satin) - info.ChFX = serializeEffectObject(e.satin, 'satin', log); - if (((_m = e.stroke) === null || _m === void 0 ? void 0 : _m[0]) && !multi) - info.FrFX = serializeFxObject((_o = e.stroke) === null || _o === void 0 ? void 0 : _o[0]); - if (multi) { - info.numModifyingFX = 0; - for (var _p = 0, _q = Object.keys(e); _p < _q.length; _p++) { - var key = _q[_p]; - var value = e[key]; - if (Array.isArray(value)) { - for (var _r = 0, value_1 = value; _r < value_1.length; _r++) { - var effect = value_1[_r]; - if (effect.enabled) - info.numModifyingFX++; - } - } - } - } - return info; -} -exports.serializeEffects = serializeEffects; -function parseEffects(info, log) { - var effects = {}; - if (!info.masterFXSwitch) - effects.disabled = true; - if (info['Scl ']) - effects.scale = parsePercent(info['Scl ']); - if (info.DrSh) - effects.dropShadow = [parseEffectObject(info.DrSh, log)]; - if (info.dropShadowMulti) - effects.dropShadow = info.dropShadowMulti.map(function (i) { return parseEffectObject(i, log); }); - if (info.IrSh) - effects.innerShadow = [parseEffectObject(info.IrSh, log)]; - if (info.innerShadowMulti) - effects.innerShadow = info.innerShadowMulti.map(function (i) { return parseEffectObject(i, log); }); - if (info.OrGl) - effects.outerGlow = parseEffectObject(info.OrGl, log); - if (info.IrGl) - effects.innerGlow = parseEffectObject(info.IrGl, log); - if (info.ebbl) - effects.bevel = parseEffectObject(info.ebbl, log); - if (info.SoFi) - effects.solidFill = [parseEffectObject(info.SoFi, log)]; - if (info.solidFillMulti) - effects.solidFill = info.solidFillMulti.map(function (i) { return parseEffectObject(i, log); }); - if (info.patternFill) - effects.patternOverlay = parseEffectObject(info.patternFill, log); - if (info.GrFl) - effects.gradientOverlay = [parseEffectObject(info.GrFl, log)]; - if (info.gradientFillMulti) - effects.gradientOverlay = info.gradientFillMulti.map(function (i) { return parseEffectObject(i, log); }); - if (info.ChFX) - effects.satin = parseEffectObject(info.ChFX, log); - if (info.FrFX) - effects.stroke = [parseFxObject(info.FrFX)]; - if (info.frameFXMulti) - effects.stroke = info.frameFXMulti.map(function (i) { return parseFxObject(i); }); - return effects; -} -exports.parseEffects = parseEffects; -function parseKeyList(keyList, logMissingFeatures) { - var keys = []; - for (var j = 0; j < keyList.length; j++) { - var key = keyList[j]; - var time = key.time, selected = key.selected, animKey = key.animKey; - var interpolation = exports.animInterpStyleEnum.decode(key.animInterpStyle); - switch (animKey.Type) { - case 'keyType.Opct': - keys.push({ interpolation: interpolation, time: time, selected: selected, type: 'opacity', value: parsePercent(animKey.Opct) }); - break; - case 'keyType.Pstn': - keys.push({ interpolation: interpolation, time: time, selected: selected, type: 'position', x: animKey.Hrzn, y: animKey.Vrtc }); - break; - case 'keyType.Trnf': - keys.push({ - interpolation: interpolation, - time: time, - selected: selected, - type: 'transform', - scale: horzVrtcToXY(animKey['Scl ']), skew: horzVrtcToXY(animKey.Skew), rotation: animKey.rotation, translation: horzVrtcToXY(animKey.translation) - }); - break; - case 'keyType.sheetStyle': { - var key_1 = { interpolation: interpolation, time: time, selected: selected, type: 'style' }; - if (animKey.sheetStyle.Lefx) - key_1.style = parseEffects(animKey.sheetStyle.Lefx, logMissingFeatures); - keys.push(key_1); - break; - } - case 'keyType.globalLighting': { - keys.push({ - interpolation: interpolation, - time: time, - selected: selected, - type: 'globalLighting', - globalAngle: animKey.gblA, globalAltitude: animKey.globalAltitude - }); - break; - } - default: throw new Error("Unsupported keyType value"); - } - } - return keys; -} -function serializeKeyList(keys) { - var keyList = []; - for (var j = 0; j < keys.length; j++) { - var key = keys[j]; - var time = key.time, _a = key.selected, selected = _a === void 0 ? false : _a, interpolation = key.interpolation; - var animInterpStyle = exports.animInterpStyleEnum.encode(interpolation); - var animKey = void 0; - switch (key.type) { - case 'opacity': - animKey = { Type: 'keyType.Opct', Opct: unitsPercent(key.value) }; - break; - case 'position': - animKey = { Type: 'keyType.Pstn', Hrzn: key.x, Vrtc: key.y }; - break; - case 'transform': - animKey = { Type: 'keyType.Trnf', 'Scl ': xyToHorzVrtc(key.scale), Skew: xyToHorzVrtc(key.skew), rotation: key.rotation, translation: xyToHorzVrtc(key.translation) }; - break; - case 'style': - animKey = { Type: 'keyType.sheetStyle', sheetStyle: { Vrsn: 1, blendOptions: {} } }; - if (key.style) - animKey.sheetStyle = { Vrsn: 1, Lefx: serializeEffects(key.style, false, false), blendOptions: {} }; - break; - case 'globalLighting': { - animKey = { Type: 'keyType.globalLighting', gblA: key.globalAngle, globalAltitude: key.globalAltitude }; - break; - } - default: throw new Error("Unsupported keyType value"); - } - keyList.push({ Vrsn: 1, animInterpStyle: animInterpStyle, time: time, animKey: animKey, selected: selected }); - } - return keyList; -} -function parseTrackList(trackList, logMissingFeatures) { - var tracks = []; - for (var i = 0; i < trackList.length; i++) { - var tr = trackList[i]; - var track = { - type: exports.stdTrackID.decode(tr.trackID), - enabled: tr.enab, - keys: parseKeyList(tr.keyList, logMissingFeatures), - }; - if (tr.effectParams) { - track.effectParams = { - fillCanvas: tr.effectParams.fillCanvas, - zoomOrigin: tr.effectParams.zoomOrigin, - keys: parseKeyList(tr.effectParams.keyList, logMissingFeatures), - }; - } - tracks.push(track); - } - return tracks; -} -exports.parseTrackList = parseTrackList; -function serializeTrackList(tracks) { - var trackList = []; - for (var i = 0; i < tracks.length; i++) { - var t = tracks[i]; - trackList.push(__assign(__assign({ trackID: exports.stdTrackID.encode(t.type), Vrsn: 1, enab: !!t.enabled, Effc: !!t.effectParams }, (t.effectParams ? { - effectParams: { - keyList: serializeKeyList(t.keys), - fillCanvas: t.effectParams.fillCanvas, - zoomOrigin: t.effectParams.zoomOrigin, - } - } : {})), { keyList: serializeKeyList(t.keys) })); - } - return trackList; -} -exports.serializeTrackList = serializeTrackList; -function parseEffectObject(obj, reportErrors) { - var result = {}; - for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) { - var key = _a[_i]; - var val = obj[key]; - switch (key) { - case 'enab': - result.enabled = !!val; - break; - case 'uglg': - result.useGlobalLight = !!val; - break; - case 'AntA': - result.antialiased = !!val; - break; - case 'Algn': - result.align = !!val; - break; - case 'Dthr': - result.dither = !!val; - break; - case 'Invr': - result.invert = !!val; - break; - case 'Rvrs': - result.reverse = !!val; - break; - case 'Clr ': - result.color = parseColor(val); - break; - case 'hglC': - result.highlightColor = parseColor(val); - break; - case 'sdwC': - result.shadowColor = parseColor(val); - break; - case 'Styl': - result.position = exports.FStl.decode(val); - break; - case 'Md ': - result.blendMode = exports.BlnM.decode(val); - break; - case 'hglM': - result.highlightBlendMode = exports.BlnM.decode(val); - break; - case 'sdwM': - result.shadowBlendMode = exports.BlnM.decode(val); - break; - case 'bvlS': - result.style = exports.BESl.decode(val); - break; - case 'bvlD': - result.direction = exports.BESs.decode(val); - break; - case 'bvlT': - result.technique = exports.bvlT.decode(val); - break; - case 'GlwT': - result.technique = exports.BETE.decode(val); - break; - case 'glwS': - result.source = exports.IGSr.decode(val); - break; - case 'Type': - result.type = exports.GrdT.decode(val); - break; - case 'gs99': - result.interpolationMethod = exports.gradientInterpolationMethodType.decode(val); - break; - case 'Opct': - result.opacity = parsePercent(val); - break; - case 'hglO': - result.highlightOpacity = parsePercent(val); - break; - case 'sdwO': - result.shadowOpacity = parsePercent(val); - break; - case 'lagl': - result.angle = parseAngle(val); - break; - case 'Angl': - result.angle = parseAngle(val); - break; - case 'Lald': - result.altitude = parseAngle(val); - break; - case 'Sftn': - result.soften = parseUnits(val); - break; - case 'srgR': - result.strength = parsePercent(val); - break; - case 'blur': - result.size = parseUnits(val); - break; - case 'Nose': - result.noise = parsePercent(val); - break; - case 'Inpr': - result.range = parsePercent(val); - break; - case 'Ckmt': - result.choke = parseUnits(val); - break; - case 'ShdN': - result.jitter = parsePercent(val); - break; - case 'Dstn': - result.distance = parseUnits(val); - break; - case 'Scl ': - result.scale = parsePercent(val); - break; - case 'Ptrn': - result.pattern = { name: val['Nm '], id: val.Idnt }; - break; - case 'phase': - result.phase = { x: val.Hrzn, y: val.Vrtc }; - break; - case 'Ofst': - result.offset = { x: parsePercent(val.Hrzn), y: parsePercent(val.Vrtc) }; - break; - case 'MpgS': - case 'TrnS': - result.contour = { - name: val['Nm '], - curve: val['Crv '].map(function (p) { return ({ x: p.Hrzn, y: p.Vrtc }); }), - }; - break; - case 'Grad': - result.gradient = parseGradient(val); - break; - case 'useTexture': - case 'useShape': - case 'layerConceals': - case 'present': - case 'showInDialog': - case 'antialiasGloss': - result[key] = val; - break; - default: - reportErrors && console.log("Invalid effect key: '".concat(key, "', value:"), val); - } - } - return result; -} -function serializeEffectObject(obj, objName, reportErrors) { - var result = {}; - for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) { - var objKey = _a[_i]; - var key = objKey; - var val = obj[key]; - switch (key) { - case 'enabled': - result.enab = !!val; - break; - case 'useGlobalLight': - result.uglg = !!val; - break; - case 'antialiased': - result.AntA = !!val; - break; - case 'align': - result.Algn = !!val; - break; - case 'dither': - result.Dthr = !!val; - break; - case 'invert': - result.Invr = !!val; - break; - case 'reverse': - result.Rvrs = !!val; - break; - case 'color': - result['Clr '] = serializeColor(val); - break; - case 'highlightColor': - result.hglC = serializeColor(val); - break; - case 'shadowColor': - result.sdwC = serializeColor(val); - break; - case 'position': - result.Styl = exports.FStl.encode(val); - break; - case 'blendMode': - result['Md '] = exports.BlnM.encode(val); - break; - case 'highlightBlendMode': - result.hglM = exports.BlnM.encode(val); - break; - case 'shadowBlendMode': - result.sdwM = exports.BlnM.encode(val); - break; - case 'style': - result.bvlS = exports.BESl.encode(val); - break; - case 'direction': - result.bvlD = exports.BESs.encode(val); - break; - case 'technique': - if (objName === 'bevel') { - result.bvlT = exports.bvlT.encode(val); - } - else { - result.GlwT = exports.BETE.encode(val); - } - break; - case 'source': - result.glwS = exports.IGSr.encode(val); - break; - case 'type': - result.Type = exports.GrdT.encode(val); - break; - case 'interpolationMethod': - result.gs99 = exports.gradientInterpolationMethodType.encode(val); - break; - case 'opacity': - result.Opct = unitsPercent(val); - break; - case 'highlightOpacity': - result.hglO = unitsPercent(val); - break; - case 'shadowOpacity': - result.sdwO = unitsPercent(val); - break; - case 'angle': - if (objName === 'gradientOverlay') { - result.Angl = unitsAngle(val); - } - else { - result.lagl = unitsAngle(val); - } - break; - case 'altitude': - result.Lald = unitsAngle(val); - break; - case 'soften': - result.Sftn = unitsValue(val, key); - break; - case 'strength': - result.srgR = unitsPercent(val); - break; - case 'size': - result.blur = unitsValue(val, key); - break; - case 'noise': - result.Nose = unitsPercent(val); - break; - case 'range': - result.Inpr = unitsPercent(val); - break; - case 'choke': - result.Ckmt = unitsValue(val, key); - break; - case 'jitter': - result.ShdN = unitsPercent(val); - break; - case 'distance': - result.Dstn = unitsValue(val, key); - break; - case 'scale': - result['Scl '] = unitsPercent(val); - break; - case 'pattern': - result.Ptrn = { 'Nm ': val.name, Idnt: val.id }; - break; - case 'phase': - result.phase = { Hrzn: val.x, Vrtc: val.y }; - break; - case 'offset': - result.Ofst = { Hrzn: unitsPercent(val.x), Vrtc: unitsPercent(val.y) }; - break; - case 'contour': { - result[objName === 'satin' ? 'MpgS' : 'TrnS'] = { - 'Nm ': val.name, - 'Crv ': val.curve.map(function (p) { return ({ Hrzn: p.x, Vrtc: p.y }); }), - }; - break; - } - case 'gradient': - result.Grad = serializeGradient(val); - break; - case 'useTexture': - case 'useShape': - case 'layerConceals': - case 'present': - case 'showInDialog': - case 'antialiasGloss': - result[key] = val; - break; - default: - reportErrors && console.log("Invalid effect key: '".concat(key, "', value:"), val); - } - } - return result; -} -function parseGradient(grad) { - if (grad.GrdF === 'GrdF.CstS') { - var samples_1 = grad.Intr || 4096; - return { - type: 'solid', - name: grad['Nm '], - smoothness: grad.Intr / 4096, - colorStops: grad.Clrs.map(function (s) { return ({ - color: parseColor(s['Clr ']), - location: s.Lctn / samples_1, - midpoint: s.Mdpn / 100, - }); }), - opacityStops: grad.Trns.map(function (s) { return ({ - opacity: parsePercent(s.Opct), - location: s.Lctn / samples_1, - midpoint: s.Mdpn / 100, - }); }), - }; - } - else { - return { - type: 'noise', - name: grad['Nm '], - roughness: grad.Smth / 4096, - colorModel: exports.ClrS.decode(grad.ClrS), - randomSeed: grad.RndS, - restrictColors: !!grad.VctC, - addTransparency: !!grad.ShTr, - min: grad['Mnm '].map(function (x) { return x / 100; }), - max: grad['Mxm '].map(function (x) { return x / 100; }), - }; - } -} -function serializeGradient(grad) { - var _a, _b; - if (grad.type === 'solid') { - var samples_2 = Math.round(((_a = grad.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096); - return { - 'Nm ': grad.name || '', - GrdF: 'GrdF.CstS', - Intr: samples_2, - Clrs: grad.colorStops.map(function (s) { - var _a; - return ({ - 'Clr ': serializeColor(s.color), - Type: 'Clry.UsrS', - Lctn: Math.round(s.location * samples_2), - Mdpn: Math.round(((_a = s.midpoint) !== null && _a !== void 0 ? _a : 0.5) * 100), - }); - }), - Trns: grad.opacityStops.map(function (s) { - var _a; - return ({ - Opct: unitsPercent(s.opacity), - Lctn: Math.round(s.location * samples_2), - Mdpn: Math.round(((_a = s.midpoint) !== null && _a !== void 0 ? _a : 0.5) * 100), - }); - }), - }; - } - else { - return { - GrdF: 'GrdF.ClNs', - 'Nm ': grad.name || '', - ShTr: !!grad.addTransparency, - VctC: !!grad.restrictColors, - ClrS: exports.ClrS.encode(grad.colorModel), - RndS: grad.randomSeed || 0, - Smth: Math.round(((_b = grad.roughness) !== null && _b !== void 0 ? _b : 1) * 4096), - 'Mnm ': (grad.min || [0, 0, 0, 0]).map(function (x) { return x * 100; }), - 'Mxm ': (grad.max || [1, 1, 1, 1]).map(function (x) { return x * 100; }), - }; - } -} -function parseGradientContent(descriptor) { - var result = parseGradient(descriptor.Grad); - result.style = exports.GrdT.decode(descriptor.Type); - if (descriptor.Dthr !== undefined) - result.dither = descriptor.Dthr; - if (descriptor.Rvrs !== undefined) - result.reverse = descriptor.Rvrs; - if (descriptor.Angl !== undefined) - result.angle = parseAngle(descriptor.Angl); - if (descriptor['Scl '] !== undefined) - result.scale = parsePercent(descriptor['Scl ']); - if (descriptor.Algn !== undefined) - result.align = descriptor.Algn; - if (descriptor.Ofst !== undefined) { - result.offset = { - x: parsePercent(descriptor.Ofst.Hrzn), - y: parsePercent(descriptor.Ofst.Vrtc) - }; - } - return result; -} -function parsePatternContent(descriptor) { - var result = { - name: descriptor.Ptrn['Nm '], - id: descriptor.Ptrn.Idnt, - }; - if (descriptor.Lnkd !== undefined) - result.linked = descriptor.Lnkd; - if (descriptor.phase !== undefined) - result.phase = { x: descriptor.phase.Hrzn, y: descriptor.phase.Vrtc }; - return result; -} -function parseVectorContent(descriptor) { - if ('Grad' in descriptor) { - return parseGradientContent(descriptor); - } - else if ('Ptrn' in descriptor) { - return __assign({ type: 'pattern' }, parsePatternContent(descriptor)); - } - else if ('Clr ' in descriptor) { - return { type: 'color', color: parseColor(descriptor['Clr ']) }; - } - else { - throw new Error('Invalid vector content'); - } -} -exports.parseVectorContent = parseVectorContent; -function serializeGradientContent(content) { - var result = {}; - if (content.dither !== undefined) - result.Dthr = content.dither; - if (content.reverse !== undefined) - result.Rvrs = content.reverse; - if (content.angle !== undefined) - result.Angl = unitsAngle(content.angle); - result.Type = exports.GrdT.encode(content.style); - if (content.align !== undefined) - result.Algn = content.align; - if (content.scale !== undefined) - result['Scl '] = unitsPercent(content.scale); - if (content.offset) { - result.Ofst = { - Hrzn: unitsPercent(content.offset.x), - Vrtc: unitsPercent(content.offset.y), - }; - } - result.Grad = serializeGradient(content); - return result; -} -function serializePatternContent(content) { - var result = { - Ptrn: { - 'Nm ': content.name || '', - Idnt: content.id || '', - } - }; - if (content.linked !== undefined) - result.Lnkd = !!content.linked; - if (content.phase !== undefined) - result.phase = { Hrzn: content.phase.x, Vrtc: content.phase.y }; - return result; -} -function serializeVectorContent(content) { - if (content.type === 'color') { - return { key: 'SoCo', descriptor: { 'Clr ': serializeColor(content.color) } }; - } - else if (content.type === 'pattern') { - return { key: 'PtFl', descriptor: serializePatternContent(content) }; - } - else { - return { key: 'GdFl', descriptor: serializeGradientContent(content) }; - } -} -exports.serializeVectorContent = serializeVectorContent; -function parseColor(color) { - if ('H ' in color) { - return { h: parsePercentOrAngle(color['H ']), s: color.Strt, b: color.Brgh }; - } - else if ('Rd ' in color) { - return { r: color['Rd '], g: color['Grn '], b: color['Bl '] }; - } - else if ('Cyn ' in color) { - return { c: color['Cyn '], m: color.Mgnt, y: color['Ylw '], k: color.Blck }; - } - else if ('Gry ' in color) { - return { k: color['Gry '] }; - } - else if ('Lmnc' in color) { - return { l: color.Lmnc, a: color['A '], b: color['B '] }; - } - else if ('redFloat' in color) { - return { fr: color.redFloat, fg: color.greenFloat, fb: color.blueFloat }; - } - else { - throw new Error('Unsupported color descriptor'); - } -} -exports.parseColor = parseColor; -function serializeColor(color) { - if (!color) { - return { 'Rd ': 0, 'Grn ': 0, 'Bl ': 0 }; - } - else if ('r' in color) { - return { 'Rd ': color.r || 0, 'Grn ': color.g || 0, 'Bl ': color.b || 0 }; - } - else if ('fr' in color) { - return { redFloat: color.fr, greenFloat: color.fg, blueFloat: color.fb }; - } - else if ('h' in color) { - return { 'H ': unitsAngle(color.h * 360), Strt: color.s || 0, Brgh: color.b || 0 }; - } - else if ('c' in color) { - return { 'Cyn ': color.c || 0, Mgnt: color.m || 0, 'Ylw ': color.y || 0, Blck: color.k || 0 }; - } - else if ('l' in color) { - return { Lmnc: color.l || 0, 'A ': color.a || 0, 'B ': color.b || 0 }; - } - else if ('k' in color) { - return { 'Gry ': color.k }; - } - else { - throw new Error('Invalid color value'); - } -} -exports.serializeColor = serializeColor; -function parseAngle(x) { - if (x === undefined) - return 0; - if (x.units !== 'Angle') - throw new Error("Invalid units: ".concat(x.units)); - return x.value; -} -exports.parseAngle = parseAngle; -function parsePercent(x) { - if (x === undefined) - return 1; - if (x.units !== 'Percent') - throw new Error("Invalid units: ".concat(x.units)); - return x.value / 100; -} -exports.parsePercent = parsePercent; -function parsePercentOrAngle(x) { - if (x === undefined) - return 1; - if (x.units === 'Percent') - return x.value / 100; - if (x.units === 'Angle') - return x.value / 360; - throw new Error("Invalid units: ".concat(x.units)); -} -exports.parsePercentOrAngle = parsePercentOrAngle; -function parseUnits(_a) { - var units = _a.units, value = _a.value; - if (units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && - units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density') { - throw new Error("Invalid units: ".concat(JSON.stringify({ units: units, value: value }))); - } - return { value: value, units: units }; -} -exports.parseUnits = parseUnits; -function parseUnitsOrNumber(value, units) { - if (units === void 0) { units = 'Pixels'; } - if (typeof value === 'number') - return { value: value, units: units }; - return parseUnits(value); -} -exports.parseUnitsOrNumber = parseUnitsOrNumber; -function parseUnitsToNumber(_a, expectedUnits) { - var units = _a.units, value = _a.value; - if (units !== expectedUnits) - throw new Error("Invalid units: ".concat(JSON.stringify({ units: units, value: value }))); - return value; -} -exports.parseUnitsToNumber = parseUnitsToNumber; -function unitsAngle(value) { - return { units: 'Angle', value: value || 0 }; -} -exports.unitsAngle = unitsAngle; -function unitsPercent(value) { - return { units: 'Percent', value: Math.round((value || 0) * 100) }; -} -exports.unitsPercent = unitsPercent; -function unitsValue(x, key) { - if (x == null) - return { units: 'Pixels', value: 0 }; - if (typeof x !== 'object') - throw new Error("Invalid value: ".concat(JSON.stringify(x), " (key: ").concat(key, ") (should have value and units)")); - var units = x.units, value = x.value; - if (typeof value !== 'number') - throw new Error("Invalid value in ".concat(JSON.stringify(x), " (key: ").concat(key, ")")); - if (units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && - units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density') { - throw new Error("Invalid units in ".concat(JSON.stringify(x), " (key: ").concat(key, ")")); - } - return { units: units, value: value }; -} -exports.unitsValue = unitsValue; -exports.textGridding = (0, helpers_1.createEnum)('textGridding', 'none', { - none: 'None', - round: 'Rnd ', -}); -exports.Ornt = (0, helpers_1.createEnum)('Ornt', 'horizontal', { - horizontal: 'Hrzn', - vertical: 'Vrtc', -}); -exports.Annt = (0, helpers_1.createEnum)('Annt', 'sharp', { - none: 'Anno', - sharp: 'antiAliasSharp', - crisp: 'AnCr', - strong: 'AnSt', - smooth: 'AnSm', - platform: 'antiAliasPlatformGray', - platformLCD: 'antiAliasPlatformLCD', -}); -exports.warpStyle = (0, helpers_1.createEnum)('warpStyle', 'none', { - none: 'warpNone', - arc: 'warpArc', - arcLower: 'warpArcLower', - arcUpper: 'warpArcUpper', - arch: 'warpArch', - bulge: 'warpBulge', - shellLower: 'warpShellLower', - shellUpper: 'warpShellUpper', - flag: 'warpFlag', - wave: 'warpWave', - fish: 'warpFish', - rise: 'warpRise', - fisheye: 'warpFisheye', - inflate: 'warpInflate', - squeeze: 'warpSqueeze', - twist: 'warpTwist', - cylinder: 'warpCylinder', - custom: 'warpCustom', -}); -exports.BlnM = (0, helpers_1.createEnum)('BlnM', 'normal', { - 'normal': 'Nrml', - 'dissolve': 'Dslv', - 'darken': 'Drkn', - 'multiply': 'Mltp', - 'color burn': 'CBrn', - 'linear burn': 'linearBurn', - 'darker color': 'darkerColor', - 'lighten': 'Lghn', - 'screen': 'Scrn', - 'color dodge': 'CDdg', - 'linear dodge': 'linearDodge', - 'lighter color': 'lighterColor', - 'overlay': 'Ovrl', - 'soft light': 'SftL', - 'hard light': 'HrdL', - 'vivid light': 'vividLight', - 'linear light': 'linearLight', - 'pin light': 'pinLight', - 'hard mix': 'hardMix', - 'difference': 'Dfrn', - 'exclusion': 'Xclu', - 'subtract': 'blendSubtraction', - 'divide': 'blendDivide', - 'hue': 'H ', - 'saturation': 'Strt', - 'color': 'Clr ', - 'luminosity': 'Lmns', - // used in ABR - 'linear height': 'linearHeight', - 'height': 'Hght', - 'subtraction': 'Sbtr', // 2nd version of subtract ? -}); -exports.BESl = (0, helpers_1.createEnum)('BESl', 'inner bevel', { - 'inner bevel': 'InrB', - 'outer bevel': 'OtrB', - 'emboss': 'Embs', - 'pillow emboss': 'PlEb', - 'stroke emboss': 'strokeEmboss', -}); -exports.bvlT = (0, helpers_1.createEnum)('bvlT', 'smooth', { - 'smooth': 'SfBL', - 'chisel hard': 'PrBL', - 'chisel soft': 'Slmt', -}); -exports.BESs = (0, helpers_1.createEnum)('BESs', 'up', { - up: 'In ', - down: 'Out ', -}); -exports.BETE = (0, helpers_1.createEnum)('BETE', 'softer', { - softer: 'SfBL', - precise: 'PrBL', -}); -exports.IGSr = (0, helpers_1.createEnum)('IGSr', 'edge', { - edge: 'SrcE', - center: 'SrcC', -}); -exports.GrdT = (0, helpers_1.createEnum)('GrdT', 'linear', { - linear: 'Lnr ', - radial: 'Rdl ', - angle: 'Angl', - reflected: 'Rflc', - diamond: 'Dmnd', -}); -exports.animInterpStyleEnum = (0, helpers_1.createEnum)('animInterpStyle', 'linear', { - linear: 'Lnr ', - hold: 'hold', -}); -exports.stdTrackID = (0, helpers_1.createEnum)('stdTrackID', 'opacity', { - opacity: 'opacityTrack', - style: 'styleTrack', - sheetTransform: 'sheetTransformTrack', - sheetPosition: 'sheetPositionTrack', - globalLighting: 'globalLightingTrack', -}); -exports.gradientInterpolationMethodType = (0, helpers_1.createEnum)('gradientInterpolationMethodType', 'perceptual', { - perceptual: 'Perc', - linear: 'Lnr', - classic: 'Gcls', -}); -exports.ClrS = (0, helpers_1.createEnum)('ClrS', 'rgb', { - rgb: 'RGBC', - hsb: 'HSBl', - lab: 'LbCl', -}); -exports.FStl = (0, helpers_1.createEnum)('FStl', 'outside', { - outside: 'OutF', - center: 'CtrF', - inside: 'InsF' -}); -exports.FrFl = (0, helpers_1.createEnum)('FrFl', 'color', { - color: 'SClr', - gradient: 'GrFl', - pattern: 'Ptrn', -}); -exports.ESliceType = (0, helpers_1.createEnum)('ESliceType', 'image', { - image: 'Img ', - noImage: 'noImage', -}); -exports.ESliceHorzAlign = (0, helpers_1.createEnum)('ESliceHorzAlign', 'default', { - default: 'default', -}); -exports.ESliceVertAlign = (0, helpers_1.createEnum)('ESliceVertAlign', 'default', { - default: 'default', -}); -exports.ESliceOrigin = (0, helpers_1.createEnum)('ESliceOrigin', 'userGenerated', { - userGenerated: 'userGenerated', - autoGenerated: 'autoGenerated', - layer: 'layer', -}); -exports.ESliceBGColorType = (0, helpers_1.createEnum)('ESliceBGColorType', 'none', { - none: 'None', - matte: 'matte', - color: 'Clr ', -}); -exports.strokeStyleLineCapType = (0, helpers_1.createEnum)('strokeStyleLineCapType', 'butt', { - butt: 'strokeStyleButtCap', - round: 'strokeStyleRoundCap', - square: 'strokeStyleSquareCap', -}); -exports.strokeStyleLineJoinType = (0, helpers_1.createEnum)('strokeStyleLineJoinType', 'miter', { - miter: 'strokeStyleMiterJoin', - round: 'strokeStyleRoundJoin', - bevel: 'strokeStyleBevelJoin', -}); -exports.strokeStyleLineAlignment = (0, helpers_1.createEnum)('strokeStyleLineAlignment', 'inside', { - inside: 'strokeStyleAlignInside', - center: 'strokeStyleAlignCenter', - outside: 'strokeStyleAlignOutside', -}); -//# sourceMappingURL=descriptor.js.map \ No newline at end of file +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.strokeStyleLineAlignment = exports.strokeStyleLineJoinType = exports.strokeStyleLineCapType = exports.FrFl = exports.FStl = exports.ClrS = exports.gradientInterpolationMethodType = exports.stdTrackID = exports.animInterpStyleEnum = exports.GrdT = exports.IGSr = exports.BETE = exports.BESs = exports.bvlT = exports.BESl = exports.BlnM = exports.warpStyle = exports.Annt = exports.Ornt = exports.textGridding = exports.unitsValue = exports.unitsPercent = exports.unitsAngle = exports.parseUnitsToNumber = exports.parseUnitsOrNumber = exports.parseUnits = exports.parsePercentOrAngle = exports.parsePercent = exports.parseAngle = exports.serializeColor = exports.parseColor = exports.serializeVectorContent = exports.parseVectorContent = exports.serializeTrackList = exports.parseTrackList = exports.parseEffects = exports.serializeEffects = exports.xyToHorzVrtc = exports.horzVrtcToXY = exports.writeVersionAndDescriptor = exports.readVersionAndDescriptor = exports.writeDescriptorStructure = exports.readDescriptorStructure = exports.readAsciiStringOrClassId = exports.setLogErrors = void 0; +var helpers_1 = require("./helpers"); +var psdReader_1 = require("./psdReader"); +var psdWriter_1 = require("./psdWriter"); +function revMap(map) { + var result = {}; + Object.keys(map).forEach(function (key) { return result[map[key]] = key; }); + return result; +} +var unitsMap = { + '#Ang': 'Angle', + '#Rsl': 'Density', + '#Rlt': 'Distance', + '#Nne': 'None', + '#Prc': 'Percent', + '#Pxl': 'Pixels', + '#Mlm': 'Millimeters', + '#Pnt': 'Points', + 'RrPi': 'Picas', + 'RrIn': 'Inches', + 'RrCm': 'Centimeters', +}; +var unitsMapRev = revMap(unitsMap); +var logErrors = false; +function setLogErrors(value) { + logErrors = value; +} +exports.setLogErrors = setLogErrors; +function makeType(name, classID) { + return { name: name, classID: classID }; +} +var nullType = makeType('', 'null'); +var fieldToExtType = { + strokeStyleContent: makeType('', 'solidColorLayer'), + // printProofSetup: makeType('校样设置', 'proofSetup'), // TESTING + printProofSetup: makeType('Proof Setup', 'proofSetup'), + patternFill: makeType('', 'patternFill'), + Grad: makeType('Gradient', 'Grdn'), + ebbl: makeType('', 'ebbl'), + SoFi: makeType('', 'SoFi'), + GrFl: makeType('', 'GrFl'), + sdwC: makeType('', 'RGBC'), + hglC: makeType('', 'RGBC'), + 'Clr ': makeType('', 'RGBC'), + 'tintColor': makeType('', 'RGBC'), + Ofst: makeType('', 'Pnt '), + ChFX: makeType('', 'ChFX'), + MpgS: makeType('', 'ShpC'), + DrSh: makeType('', 'DrSh'), + IrSh: makeType('', 'IrSh'), + OrGl: makeType('', 'OrGl'), + IrGl: makeType('', 'IrGl'), + TrnS: makeType('', 'ShpC'), + Ptrn: makeType('', 'Ptrn'), + FrFX: makeType('', 'FrFX'), + phase: makeType('', 'Pnt '), + frameStep: nullType, + duration: nullType, + workInTime: nullType, + workOutTime: nullType, + audioClipGroupList: nullType, + bounds: makeType('', 'Rctn'), + customEnvelopeWarp: makeType('', 'customEnvelopeWarp'), + warp: makeType('', 'warp'), + 'Sz ': makeType('', 'Pnt '), + origin: makeType('', 'Pnt '), + autoExpandOffset: makeType('', 'Pnt '), + keyOriginShapeBBox: makeType('', 'unitRect'), + Vrsn: nullType, + psVersion: nullType, + docDefaultNewArtboardBackgroundColor: makeType('', 'RGBC'), + artboardRect: makeType('', 'classFloatRect'), + keyOriginRRectRadii: makeType('', 'radii'), + keyOriginBoxCorners: nullType, + rectangleCornerA: makeType('', 'Pnt '), + rectangleCornerB: makeType('', 'Pnt '), + rectangleCornerC: makeType('', 'Pnt '), + rectangleCornerD: makeType('', 'Pnt '), + compInfo: nullType, + Trnf: makeType('Transform', 'Trnf'), + quiltWarp: makeType('', 'quiltWarp'), + generatorSettings: nullType, + crema: nullType, + FrIn: nullType, + blendOptions: nullType, + FXRf: nullType, + Lefx: nullType, + time: nullType, + animKey: nullType, + timeScope: nullType, + inTime: nullType, + outTime: nullType, + sheetStyle: nullType, + translation: nullType, + Skew: nullType, + 'Lnk ': makeType('', 'ExternalFileLink'), + frameReader: makeType('', 'FrameReader'), + effectParams: makeType('', 'motionTrackEffectParams'), +}; +var fieldToArrayExtType = { + 'Crv ': makeType('', 'CrPt'), + Clrs: makeType('', 'Clrt'), + Trns: makeType('', 'TrnS'), + keyDescriptorList: nullType, + solidFillMulti: makeType('', 'SoFi'), + gradientFillMulti: makeType('', 'GrFl'), + dropShadowMulti: makeType('', 'DrSh'), + innerShadowMulti: makeType('', 'IrSh'), + frameFXMulti: makeType('', 'FrFX'), + FrIn: nullType, + FSts: nullType, + LaSt: nullType, + sheetTimelineOptions: nullType, + trackList: makeType('', 'animationTrack'), + globalTrackList: makeType('', 'animationTrack'), + keyList: nullType, + audioClipGroupList: nullType, + audioClipList: nullType, +}; +var typeToField = { + 'TEXT': [ + 'Txt ', 'printerName', 'Nm ', 'Idnt', 'blackAndWhitePresetFileName', 'LUT3DFileName', + 'presetFileName', 'curvesPresetFileName', 'mixerPresetFileName', 'placed', 'description', 'reason', + 'artboardPresetName', 'json', 'groupID', 'clipID', 'relPath', 'fullPath', 'mediaDescriptor', + ], + 'tdta': ['EngineData', 'LUT3DFileData'], + 'long': [ + 'TextIndex', 'RndS', 'Mdpn', 'Smth', 'Lctn', 'strokeStyleVersion', 'LaID', 'Vrsn', 'Cnt ', + 'Brgh', 'Cntr', 'means', 'vibrance', 'Strt', 'bwPresetKind', 'presetKind', 'comp', 'compID', 'originalCompID', + 'curvesPresetKind', 'mixerPresetKind', 'uOrder', 'vOrder', 'PgNm', 'totalPages', 'Crop', + 'numerator', 'denominator', 'frameCount', 'Annt', 'keyOriginType', 'unitValueQuadVersion', + 'keyOriginIndex', 'major', 'minor', 'fix', 'docDefaultNewArtboardBackgroundType', 'artboardBackgroundType', + 'numModifyingFX', 'deformNumRows', 'deformNumCols', 'FrID', 'FrDl', 'FsID', 'LCnt', 'AFrm', 'AFSt', + 'numBefore', 'numAfter', 'Spcn', 'minOpacity', 'maxOpacity', 'BlnM', 'sheetID', 'gblA', 'globalAltitude', + 'descVersion', 'frameReaderType', 'LyrI', 'zoomOrigin', + ], + 'enum': [ + 'textGridding', 'Ornt', 'warpStyle', 'warpRotate', 'Inte', 'Bltn', 'ClrS', + 'sdwM', 'hglM', 'bvlT', 'bvlS', 'bvlD', 'Md ', 'glwS', 'GrdF', 'GlwT', + 'strokeStyleLineCapType', 'strokeStyleLineJoinType', 'strokeStyleLineAlignment', + 'strokeStyleBlendMode', 'PntT', 'Styl', 'lookupType', 'LUTFormat', 'dataOrder', + 'tableOrder', 'enableCompCore', 'enableCompCoreGPU', 'compCoreSupport', 'compCoreGPUSupport', 'Engn', + 'enableCompCoreThreads', 'gs99', 'FrDs', 'trackID', 'animInterpStyle', + ], + 'bool': [ + 'PstS', 'printSixteenBit', 'masterFXSwitch', 'enab', 'uglg', 'antialiasGloss', + 'useShape', 'useTexture', 'uglg', 'antialiasGloss', 'useShape', + 'useTexture', 'Algn', 'Rvrs', 'Dthr', 'Invr', 'VctC', 'ShTr', 'layerConceals', + 'strokeEnabled', 'fillEnabled', 'strokeStyleScaleLock', 'strokeStyleStrokeAdjust', + 'hardProof', 'MpBl', 'paperWhite', 'useLegacy', 'Auto', 'Lab ', 'useTint', 'keyShapeInvalidated', + 'autoExpandEnabled', 'autoNestEnabled', 'autoPositionEnabled', 'shrinkwrapOnSaveEnabled', + 'present', 'showInDialog', 'overprint', 'sheetDisclosed', 'lightsDisclosed', 'meshesDisclosed', + 'materialsDisclosed', 'hasMotion', 'muted', 'Effc', 'selected', 'autoScope', 'fillCanvas', + ], + 'doub': [ + 'warpValue', 'warpPerspective', 'warpPerspectiveOther', 'Intr', 'Wdth', 'Hght', + 'strokeStyleMiterLimit', 'strokeStyleResolution', 'layerTime', 'keyOriginResolution', + 'xx', 'xy', 'yx', 'yy', 'tx', 'ty', 'FrGA', 'frameRate', 'audioLevel', 'rotation', + ], + 'UntF': [ + 'Scl ', 'sdwO', 'hglO', 'lagl', 'Lald', 'srgR', 'blur', 'Sftn', 'Opct', 'Dstn', 'Angl', + 'Ckmt', 'Nose', 'Inpr', 'ShdN', 'strokeStyleLineWidth', 'strokeStyleLineDashOffset', + 'strokeStyleOpacity', 'H ', 'Top ', 'Left', 'Btom', 'Rght', 'Rslt', + 'topRight', 'topLeft', 'bottomLeft', 'bottomRight', + ], + 'VlLs': [ + 'Crv ', 'Clrs', 'Mnm ', 'Mxm ', 'Trns', 'pathList', 'strokeStyleLineDashSet', 'FrLs', + 'LaSt', 'Trnf', 'nonAffineTransform', 'keyDescriptorList', 'guideIndeces', 'gradientFillMulti', + 'solidFillMulti', 'frameFXMulti', 'innerShadowMulti', 'dropShadowMulti', 'FrIn', 'FSts', 'FsFr', + 'sheetTimelineOptions', 'audioClipList', 'trackList', 'globalTrackList', 'keyList', 'audioClipList', + ], + 'ObAr': ['meshPoints', 'quiltSliceX', 'quiltSliceY'], + 'obj ': ['null'], +}; +var channels = [ + 'Rd ', 'Grn ', 'Bl ', 'Yllw', 'Ylw ', 'Cyn ', 'Mgnt', 'Blck', 'Gry ', 'Lmnc', 'A ', 'B ', +]; +var fieldToArrayType = { + 'Mnm ': 'long', + 'Mxm ': 'long', + 'FrLs': 'long', + 'strokeStyleLineDashSet': 'UntF', + 'Trnf': 'doub', + 'nonAffineTransform': 'doub', + 'keyDescriptorList': 'Objc', + 'gradientFillMulti': 'Objc', + 'solidFillMulti': 'Objc', + 'frameFXMulti': 'Objc', + 'innerShadowMulti': 'Objc', + 'dropShadowMulti': 'Objc', + 'LaSt': 'Objc', + 'FrIn': 'Objc', + 'FSts': 'Objc', + 'FsFr': 'long', + 'blendOptions': 'Objc', + 'sheetTimelineOptions': 'Objc', + 'keyList': 'Objc', +}; +var fieldToType = {}; +for (var _i = 0, _a = Object.keys(typeToField); _i < _a.length; _i++) { + var type = _a[_i]; + for (var _b = 0, _c = typeToField[type]; _b < _c.length; _b++) { + var field = _c[_b]; + fieldToType[field] = type; + } +} +for (var _d = 0, _e = Object.keys(fieldToExtType); _d < _e.length; _d++) { + var field = _e[_d]; + if (!fieldToType[field]) + fieldToType[field] = 'Objc'; +} +for (var _f = 0, _g = Object.keys(fieldToArrayExtType); _f < _g.length; _f++) { + var field = _g[_f]; + fieldToArrayType[field] = 'Objc'; +} +function getTypeByKey(key, value, root, parent) { + if (key === 'Sz ') { + return ('Wdth' in value) ? 'Objc' : (('units' in value) ? 'UntF' : 'doub'); + } + else if (key === 'Type') { + return typeof value === 'string' ? 'enum' : 'long'; + } + else if (key === 'AntA') { + return typeof value === 'string' ? 'enum' : 'bool'; + } + else if ((key === 'Hrzn' || key === 'Vrtc') && parent.Type === 'keyType.Pstn') { + return 'long'; + } + else if (key === 'Hrzn' || key === 'Vrtc' || key === 'Top ' || key === 'Left' || key === 'Btom' || key === 'Rght') { + return typeof value === 'number' ? 'doub' : 'UntF'; + } + else if (key === 'Vrsn') { + return typeof value === 'number' ? 'long' : 'Objc'; + } + else if (key === 'Rd ' || key === 'Grn ' || key === 'Bl ') { + return root === 'artd' ? 'long' : 'doub'; + } + else if (key === 'Trnf') { + return Array.isArray(value) ? 'VlLs' : 'Objc'; + } + else { + return fieldToType[key]; + } +} +function readAsciiStringOrClassId(reader) { + var length = (0, psdReader_1.readInt32)(reader); + return (0, psdReader_1.readAsciiString)(reader, length || 4); +} +exports.readAsciiStringOrClassId = readAsciiStringOrClassId; +function writeAsciiStringOrClassId(writer, value) { + if (value.length === 4 && value !== 'warp' && value !== 'time' && value !== 'hold') { + // write classId + (0, psdWriter_1.writeInt32)(writer, 0); + (0, psdWriter_1.writeSignature)(writer, value); + } + else { + // write ascii string + (0, psdWriter_1.writeInt32)(writer, value.length); + for (var i = 0; i < value.length; i++) { + (0, psdWriter_1.writeUint8)(writer, value.charCodeAt(i)); + } + } +} +function readDescriptorStructure(reader) { + var object = {}; + // object.__struct = + readClassStructure(reader); + var itemsCount = (0, psdReader_1.readUint32)(reader); + // console.log('//', object.__struct); + for (var i = 0; i < itemsCount; i++) { + var key = readAsciiStringOrClassId(reader); + var type = (0, psdReader_1.readSignature)(reader); + // console.log(`> '${key}' '${type}'`); + var data = readOSType(reader, type); + // if (!getTypeByKey(key, data)) console.log(`> '${key}' '${type}'`, data); + object[key] = data; + } + return object; +} +exports.readDescriptorStructure = readDescriptorStructure; +function writeDescriptorStructure(writer, name, classId, value, root) { + if (logErrors && !classId) + console.log('Missing classId for: ', name, classId, value); + // write class structure + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, name); + writeAsciiStringOrClassId(writer, classId); + var keys = Object.keys(value); + (0, psdWriter_1.writeUint32)(writer, keys.length); + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + var type = getTypeByKey(key, value[key], root, value); + var extType = fieldToExtType[key]; + if (key === 'Scl ' && 'Hrzn' in value[key]) { + type = 'Objc'; + extType = nullType; + } + else if (key === 'audioClipGroupList' && keys.length === 1) { + type = 'VlLs'; + } + else if ((key === 'Strt' || key === 'Brgh') && 'H ' in value) { + type = 'doub'; + } + else if (key === 'Strt') { + type = 'Objc'; + extType = nullType; + } + else if (channels.indexOf(key) !== -1) { + type = (classId === 'RGBC' && root !== 'artd') ? 'doub' : 'long'; + } + else if (key === 'profile') { + type = classId === 'printOutput' ? 'TEXT' : 'tdta'; + } + else if (key === 'strokeStyleContent') { + if (value[key]['Clr ']) { + extType = makeType('', 'solidColorLayer'); + } + else if (value[key].Grad) { + extType = makeType('', 'gradientLayer'); + } + else if (value[key].Ptrn) { + extType = makeType('', 'patternLayer'); + } + else { + logErrors && console.log('Invalid strokeStyleContent value', value[key]); + } + } + else if (key === 'bounds' && root === 'quiltWarp') { + extType = makeType('', 'classFloatRect'); + } + if (extType && extType.classID === 'RGBC') { + if ('H ' in value[key]) + extType = { classID: 'HSBC', name: '' }; + // TODO: other color spaces + } + writeAsciiStringOrClassId(writer, key); + (0, psdWriter_1.writeSignature)(writer, type || 'long'); + writeOSType(writer, type || 'long', value[key], key, extType, root); + if (logErrors && !type) + console.log("Missing descriptor field type for: '".concat(key, "' in"), value); + } +} +exports.writeDescriptorStructure = writeDescriptorStructure; +function readOSType(reader, type) { + switch (type) { + case 'obj ': // Reference + return readReferenceStructure(reader); + case 'Objc': // Descriptor + case 'GlbO': // GlobalObject same as Descriptor + return readDescriptorStructure(reader); + case 'VlLs': { // List + var length_1 = (0, psdReader_1.readInt32)(reader); + var items = []; + for (var i = 0; i < length_1; i++) { + var type_1 = (0, psdReader_1.readSignature)(reader); + // console.log(' >', type); + items.push(readOSType(reader, type_1)); + } + return items; + } + case 'doub': // Double + return (0, psdReader_1.readFloat64)(reader); + case 'UntF': { // Unit double + var units = (0, psdReader_1.readSignature)(reader); + var value = (0, psdReader_1.readFloat64)(reader); + if (!unitsMap[units]) + throw new Error("Invalid units: ".concat(units)); + return { units: unitsMap[units], value: value }; + } + case 'UnFl': { // Unit float + var units = (0, psdReader_1.readSignature)(reader); + var value = (0, psdReader_1.readFloat32)(reader); + if (!unitsMap[units]) + throw new Error("Invalid units: ".concat(units)); + return { units: unitsMap[units], value: value }; + } + case 'TEXT': // String + return (0, psdReader_1.readUnicodeString)(reader); + case 'enum': { // Enumerated + var type_2 = readAsciiStringOrClassId(reader); + var value = readAsciiStringOrClassId(reader); + return "".concat(type_2, ".").concat(value); + } + case 'long': // Integer + return (0, psdReader_1.readInt32)(reader); + case 'comp': { // Large Integer + var low = (0, psdReader_1.readUint32)(reader); + var high = (0, psdReader_1.readUint32)(reader); + return { low: low, high: high }; + } + case 'bool': // Boolean + return !!(0, psdReader_1.readUint8)(reader); + case 'type': // Class + case 'GlbC': // Class + return readClassStructure(reader); + case 'alis': { // Alias + var length_2 = (0, psdReader_1.readInt32)(reader); + return (0, psdReader_1.readAsciiString)(reader, length_2); + } + case 'tdta': { // Raw Data + var length_3 = (0, psdReader_1.readInt32)(reader); + return (0, psdReader_1.readBytes)(reader, length_3); + } + case 'ObAr': { // Object array + (0, psdReader_1.readInt32)(reader); // version: 16 + (0, psdReader_1.readUnicodeString)(reader); // name: '' + readAsciiStringOrClassId(reader); // 'rationalPoint' + var length_4 = (0, psdReader_1.readInt32)(reader); + var items = []; + for (var i = 0; i < length_4; i++) { + var type1 = readAsciiStringOrClassId(reader); // type Hrzn | Vrtc + (0, psdReader_1.readSignature)(reader); // UnFl + (0, psdReader_1.readSignature)(reader); // units ? '#Pxl' + var valuesCount = (0, psdReader_1.readInt32)(reader); + var values = []; + for (var j = 0; j < valuesCount; j++) { + values.push((0, psdReader_1.readFloat64)(reader)); + } + items.push({ type: type1, values: values }); + } + return items; + } + case 'Pth ': { // File path + /*const length =*/ (0, psdReader_1.readInt32)(reader); + var sig = (0, psdReader_1.readSignature)(reader); + /*const pathSize =*/ (0, psdReader_1.readInt32LE)(reader); + var charsCount = (0, psdReader_1.readInt32LE)(reader); + var path = (0, psdReader_1.readUnicodeStringWithLength)(reader, charsCount); + return { sig: sig, path: path }; + } + default: + throw new Error("Invalid TySh descriptor OSType: ".concat(type, " at ").concat(reader.offset.toString(16))); + } +} +var ObArTypes = { + meshPoints: 'rationalPoint', + quiltSliceX: 'UntF', + quiltSliceY: 'UntF', +}; +function writeOSType(writer, type, value, key, extType, root) { + switch (type) { + case 'obj ': // Reference + writeReferenceStructure(writer, key, value); + break; + case 'Objc': // Descriptor + case 'GlbO': // GlobalObject same as Descriptor + if (!extType) + throw new Error("Missing ext type for: '".concat(key, "' (").concat(JSON.stringify(value), ")")); + writeDescriptorStructure(writer, extType.name, extType.classID, value, root); + break; + case 'VlLs': // List + (0, psdWriter_1.writeInt32)(writer, value.length); + for (var i = 0; i < value.length; i++) { + var type_3 = fieldToArrayType[key]; + (0, psdWriter_1.writeSignature)(writer, type_3 || 'long'); + writeOSType(writer, type_3 || 'long', value[i], '', fieldToArrayExtType[key], root); + if (logErrors && !type_3) + console.log("Missing descriptor array type for: '".concat(key, "' in"), value); + } + break; + case 'doub': // Double + (0, psdWriter_1.writeFloat64)(writer, value); + break; + case 'UntF': // Unit double + if (!unitsMapRev[value.units]) + throw new Error("Invalid units: ".concat(value.units, " in ").concat(key)); + (0, psdWriter_1.writeSignature)(writer, unitsMapRev[value.units]); + (0, psdWriter_1.writeFloat64)(writer, value.value); + break; + case 'UnFl': // Unit float + if (!unitsMapRev[value.units]) + throw new Error("Invalid units: ".concat(value.units, " in ").concat(key)); + (0, psdWriter_1.writeSignature)(writer, unitsMapRev[value.units]); + (0, psdWriter_1.writeFloat32)(writer, value.value); + break; + case 'TEXT': // String + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, value); + break; + case 'enum': { // Enumerated + var _a = value.split('.'), _type = _a[0], val = _a[1]; + writeAsciiStringOrClassId(writer, _type); + writeAsciiStringOrClassId(writer, val); + break; + } + case 'long': // Integer + (0, psdWriter_1.writeInt32)(writer, value); + break; + // case 'comp': // Large Integer + // writeLargeInteger(reader); + case 'bool': // Boolean + (0, psdWriter_1.writeUint8)(writer, value ? 1 : 0); + break; + // case 'type': // Class + // case 'GlbC': // Class + // writeClassStructure(reader); + // case 'alis': // Alias + // writeAliasStructure(reader); + case 'tdta': // Raw Data + (0, psdWriter_1.writeInt32)(writer, value.byteLength); + (0, psdWriter_1.writeBytes)(writer, value); + break; + case 'ObAr': { // Object array + (0, psdWriter_1.writeInt32)(writer, 16); // version + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, ''); // name + var type_4 = ObArTypes[key]; + if (!type_4) + throw new Error("Not implemented ObArType for: ".concat(key)); + writeAsciiStringOrClassId(writer, type_4); + (0, psdWriter_1.writeInt32)(writer, value.length); + for (var i = 0; i < value.length; i++) { + writeAsciiStringOrClassId(writer, value[i].type); // Hrzn | Vrtc + (0, psdWriter_1.writeSignature)(writer, 'UnFl'); + (0, psdWriter_1.writeSignature)(writer, '#Pxl'); + (0, psdWriter_1.writeInt32)(writer, value[i].values.length); + for (var j = 0; j < value[i].values.length; j++) { + (0, psdWriter_1.writeFloat64)(writer, value[i].values[j]); + } + } + break; + } + // case 'Pth ': // File path + // writeFilePath(reader); + default: + throw new Error("Not implemented descriptor OSType: ".concat(type)); + } +} +function readReferenceStructure(reader) { + var itemsCount = (0, psdReader_1.readInt32)(reader); + var items = []; + for (var i = 0; i < itemsCount; i++) { + var type = (0, psdReader_1.readSignature)(reader); + switch (type) { + case 'prop': { // Property + readClassStructure(reader); + var keyID = readAsciiStringOrClassId(reader); + items.push(keyID); + break; + } + case 'Clss': // Class + items.push(readClassStructure(reader)); + break; + case 'Enmr': { // Enumerated Reference + readClassStructure(reader); + var typeID = readAsciiStringOrClassId(reader); + var value = readAsciiStringOrClassId(reader); + items.push("".concat(typeID, ".").concat(value)); + break; + } + case 'rele': { // Offset + // const { name, classID } = + readClassStructure(reader); + items.push((0, psdReader_1.readUint32)(reader)); + break; + } + case 'Idnt': // Identifier + items.push((0, psdReader_1.readInt32)(reader)); + break; + case 'indx': // Index + items.push((0, psdReader_1.readInt32)(reader)); + break; + case 'name': { // Name + readClassStructure(reader); + items.push((0, psdReader_1.readUnicodeString)(reader)); + break; + } + default: + throw new Error("Invalid descriptor reference type: ".concat(type)); + } + } + return items; +} +function writeReferenceStructure(writer, _key, items) { + (0, psdWriter_1.writeInt32)(writer, items.length); + for (var i = 0; i < items.length; i++) { + var value = items[i]; + var type = 'unknown'; + if (typeof value === 'string') { + if (/^[a-z]+\.[a-z]+$/i.test(value)) { + type = 'Enmr'; + } + else { + type = 'name'; + } + } + (0, psdWriter_1.writeSignature)(writer, type); + switch (type) { + // case 'prop': // Property + // case 'Clss': // Class + case 'Enmr': { // Enumerated Reference + var _a = value.split('.'), typeID = _a[0], enumValue = _a[1]; + writeClassStructure(writer, '\0', typeID); + writeAsciiStringOrClassId(writer, typeID); + writeAsciiStringOrClassId(writer, enumValue); + break; + } + // case 'rele': // Offset + // case 'Idnt': // Identifier + // case 'indx': // Index + case 'name': { // Name + writeClassStructure(writer, '\0', 'Lyr '); + (0, psdWriter_1.writeUnicodeString)(writer, value + '\0'); + break; + } + default: + throw new Error("Invalid descriptor reference type: ".concat(type)); + } + } + return items; +} +function readClassStructure(reader) { + var name = (0, psdReader_1.readUnicodeString)(reader); + var classID = readAsciiStringOrClassId(reader); + // console.log({ name, classID }); + return { name: name, classID: classID }; +} +function writeClassStructure(writer, name, classID) { + (0, psdWriter_1.writeUnicodeString)(writer, name); + writeAsciiStringOrClassId(writer, classID); +} +function readVersionAndDescriptor(reader) { + var version = (0, psdReader_1.readUint32)(reader); + if (version !== 16) + throw new Error("Invalid descriptor version: ".concat(version)); + var desc = readDescriptorStructure(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + return desc; +} +exports.readVersionAndDescriptor = readVersionAndDescriptor; +function writeVersionAndDescriptor(writer, name, classID, descriptor, root) { + if (root === void 0) { root = ''; } + (0, psdWriter_1.writeUint32)(writer, 16); // version + writeDescriptorStructure(writer, name, classID, descriptor, root); +} +exports.writeVersionAndDescriptor = writeVersionAndDescriptor; +function horzVrtcToXY(hv) { + return { x: hv.Hrzn, y: hv.Vrtc }; +} +exports.horzVrtcToXY = horzVrtcToXY; +function xyToHorzVrtc(xy) { + return { Hrzn: xy.x, Vrtc: xy.y }; +} +exports.xyToHorzVrtc = xyToHorzVrtc; +function parseFxObject(fx) { + var stroke = { + enabled: !!fx.enab, + position: exports.FStl.decode(fx.Styl), + fillType: exports.FrFl.decode(fx.PntT), + blendMode: exports.BlnM.decode(fx['Md ']), + opacity: parsePercent(fx.Opct), + size: parseUnits(fx['Sz ']), + }; + if (fx.present !== undefined) + stroke.present = fx.present; + if (fx.showInDialog !== undefined) + stroke.showInDialog = fx.showInDialog; + if (fx.overprint !== undefined) + stroke.overprint = fx.overprint; + if (fx['Clr ']) + stroke.color = parseColor(fx['Clr ']); + if (fx.Grad) + stroke.gradient = parseGradientContent(fx); + if (fx.Ptrn) + stroke.pattern = parsePatternContent(fx); + return stroke; +} +function serializeFxObject(stroke) { + var FrFX = {}; + FrFX.enab = !!stroke.enabled; + if (stroke.present !== undefined) + FrFX.present = !!stroke.present; + if (stroke.showInDialog !== undefined) + FrFX.showInDialog = !!stroke.showInDialog; + FrFX.Styl = exports.FStl.encode(stroke.position); + FrFX.PntT = exports.FrFl.encode(stroke.fillType); + FrFX['Md '] = exports.BlnM.encode(stroke.blendMode); + FrFX.Opct = unitsPercent(stroke.opacity); + FrFX['Sz '] = unitsValue(stroke.size, 'size'); + if (stroke.color) + FrFX['Clr '] = serializeColor(stroke.color); + if (stroke.gradient) + FrFX = __assign(__assign({}, FrFX), serializeGradientContent(stroke.gradient)); + if (stroke.pattern) + FrFX = __assign(__assign({}, FrFX), serializePatternContent(stroke.pattern)); + if (stroke.overprint !== undefined) + FrFX.overprint = !!stroke.overprint; + return FrFX; +} +function serializeEffects(e, log, multi) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o; + var info = multi ? { + 'Scl ': unitsPercent((_a = e.scale) !== null && _a !== void 0 ? _a : 1), + masterFXSwitch: !e.disabled, + } : { + masterFXSwitch: !e.disabled, + 'Scl ': unitsPercent((_b = e.scale) !== null && _b !== void 0 ? _b : 1), + }; + var arrayKeys = ['dropShadow', 'innerShadow', 'solidFill', 'gradientOverlay', 'stroke']; + for (var _i = 0, arrayKeys_1 = arrayKeys; _i < arrayKeys_1.length; _i++) { + var key = arrayKeys_1[_i]; + if (e[key] && !Array.isArray(e[key])) + throw new Error("".concat(key, " should be an array")); + } + if (((_c = e.dropShadow) === null || _c === void 0 ? void 0 : _c[0]) && !multi) + info.DrSh = serializeEffectObject(e.dropShadow[0], 'dropShadow', log); + if (((_d = e.dropShadow) === null || _d === void 0 ? void 0 : _d[0]) && multi) + info.dropShadowMulti = e.dropShadow.map(function (i) { return serializeEffectObject(i, 'dropShadow', log); }); + if (((_e = e.innerShadow) === null || _e === void 0 ? void 0 : _e[0]) && !multi) + info.IrSh = serializeEffectObject(e.innerShadow[0], 'innerShadow', log); + if (((_f = e.innerShadow) === null || _f === void 0 ? void 0 : _f[0]) && multi) + info.innerShadowMulti = e.innerShadow.map(function (i) { return serializeEffectObject(i, 'innerShadow', log); }); + if (e.outerGlow) + info.OrGl = serializeEffectObject(e.outerGlow, 'outerGlow', log); + if (((_g = e.solidFill) === null || _g === void 0 ? void 0 : _g[0]) && multi) + info.solidFillMulti = e.solidFill.map(function (i) { return serializeEffectObject(i, 'solidFill', log); }); + if (((_h = e.gradientOverlay) === null || _h === void 0 ? void 0 : _h[0]) && multi) + info.gradientFillMulti = e.gradientOverlay.map(function (i) { return serializeEffectObject(i, 'gradientOverlay', log); }); + if (((_j = e.stroke) === null || _j === void 0 ? void 0 : _j[0]) && multi) + info.frameFXMulti = e.stroke.map(function (i) { return serializeFxObject(i); }); + if (e.innerGlow) + info.IrGl = serializeEffectObject(e.innerGlow, 'innerGlow', log); + if (e.bevel) + info.ebbl = serializeEffectObject(e.bevel, 'bevel', log); + if (((_k = e.solidFill) === null || _k === void 0 ? void 0 : _k[0]) && !multi) + info.SoFi = serializeEffectObject(e.solidFill[0], 'solidFill', log); + if (e.patternOverlay) + info.patternFill = serializeEffectObject(e.patternOverlay, 'patternOverlay', log); + if (((_l = e.gradientOverlay) === null || _l === void 0 ? void 0 : _l[0]) && !multi) + info.GrFl = serializeEffectObject(e.gradientOverlay[0], 'gradientOverlay', log); + if (e.satin) + info.ChFX = serializeEffectObject(e.satin, 'satin', log); + if (((_m = e.stroke) === null || _m === void 0 ? void 0 : _m[0]) && !multi) + info.FrFX = serializeFxObject((_o = e.stroke) === null || _o === void 0 ? void 0 : _o[0]); + if (multi) { + info.numModifyingFX = 0; + for (var _p = 0, _q = Object.keys(e); _p < _q.length; _p++) { + var key = _q[_p]; + var value = e[key]; + if (Array.isArray(value)) { + for (var _r = 0, value_1 = value; _r < value_1.length; _r++) { + var effect = value_1[_r]; + if (effect.enabled) + info.numModifyingFX++; + } + } + } + } + return info; +} +exports.serializeEffects = serializeEffects; +function parseEffects(info, log) { + var effects = {}; + if (!info.masterFXSwitch) + effects.disabled = true; + if (info['Scl ']) + effects.scale = parsePercent(info['Scl ']); + if (info.DrSh) + effects.dropShadow = [parseEffectObject(info.DrSh, log)]; + if (info.dropShadowMulti) + effects.dropShadow = info.dropShadowMulti.map(function (i) { return parseEffectObject(i, log); }); + if (info.IrSh) + effects.innerShadow = [parseEffectObject(info.IrSh, log)]; + if (info.innerShadowMulti) + effects.innerShadow = info.innerShadowMulti.map(function (i) { return parseEffectObject(i, log); }); + if (info.OrGl) + effects.outerGlow = parseEffectObject(info.OrGl, log); + if (info.IrGl) + effects.innerGlow = parseEffectObject(info.IrGl, log); + if (info.ebbl) + effects.bevel = parseEffectObject(info.ebbl, log); + if (info.SoFi) + effects.solidFill = [parseEffectObject(info.SoFi, log)]; + if (info.solidFillMulti) + effects.solidFill = info.solidFillMulti.map(function (i) { return parseEffectObject(i, log); }); + if (info.patternFill) + effects.patternOverlay = parseEffectObject(info.patternFill, log); + if (info.GrFl) + effects.gradientOverlay = [parseEffectObject(info.GrFl, log)]; + if (info.gradientFillMulti) + effects.gradientOverlay = info.gradientFillMulti.map(function (i) { return parseEffectObject(i, log); }); + if (info.ChFX) + effects.satin = parseEffectObject(info.ChFX, log); + if (info.FrFX) + effects.stroke = [parseFxObject(info.FrFX)]; + if (info.frameFXMulti) + effects.stroke = info.frameFXMulti.map(function (i) { return parseFxObject(i); }); + return effects; +} +exports.parseEffects = parseEffects; +function parseKeyList(keyList, logMissingFeatures) { + var keys = []; + for (var j = 0; j < keyList.length; j++) { + var key = keyList[j]; + var time = key.time, selected = key.selected, animKey = key.animKey; + var interpolation = exports.animInterpStyleEnum.decode(key.animInterpStyle); + switch (animKey.Type) { + case 'keyType.Opct': + keys.push({ interpolation: interpolation, time: time, selected: selected, type: 'opacity', value: parsePercent(animKey.Opct) }); + break; + case 'keyType.Pstn': + keys.push({ interpolation: interpolation, time: time, selected: selected, type: 'position', x: animKey.Hrzn, y: animKey.Vrtc }); + break; + case 'keyType.Trnf': + keys.push({ + interpolation: interpolation, + time: time, + selected: selected, + type: 'transform', + scale: horzVrtcToXY(animKey['Scl ']), skew: horzVrtcToXY(animKey.Skew), rotation: animKey.rotation, translation: horzVrtcToXY(animKey.translation) + }); + break; + case 'keyType.sheetStyle': { + var key_1 = { interpolation: interpolation, time: time, selected: selected, type: 'style' }; + if (animKey.sheetStyle.Lefx) + key_1.style = parseEffects(animKey.sheetStyle.Lefx, logMissingFeatures); + keys.push(key_1); + break; + } + case 'keyType.globalLighting': { + keys.push({ + interpolation: interpolation, + time: time, + selected: selected, + type: 'globalLighting', + globalAngle: animKey.gblA, globalAltitude: animKey.globalAltitude + }); + break; + } + default: throw new Error("Unsupported keyType value"); + } + } + return keys; +} +function serializeKeyList(keys) { + var keyList = []; + for (var j = 0; j < keys.length; j++) { + var key = keys[j]; + var time = key.time, _a = key.selected, selected = _a === void 0 ? false : _a, interpolation = key.interpolation; + var animInterpStyle = exports.animInterpStyleEnum.encode(interpolation); + var animKey = void 0; + switch (key.type) { + case 'opacity': + animKey = { Type: 'keyType.Opct', Opct: unitsPercent(key.value) }; + break; + case 'position': + animKey = { Type: 'keyType.Pstn', Hrzn: key.x, Vrtc: key.y }; + break; + case 'transform': + animKey = { Type: 'keyType.Trnf', 'Scl ': xyToHorzVrtc(key.scale), Skew: xyToHorzVrtc(key.skew), rotation: key.rotation, translation: xyToHorzVrtc(key.translation) }; + break; + case 'style': + animKey = { Type: 'keyType.sheetStyle', sheetStyle: { Vrsn: 1, blendOptions: {} } }; + if (key.style) + animKey.sheetStyle = { Vrsn: 1, Lefx: serializeEffects(key.style, false, false), blendOptions: {} }; + break; + case 'globalLighting': { + animKey = { Type: 'keyType.globalLighting', gblA: key.globalAngle, globalAltitude: key.globalAltitude }; + break; + } + default: throw new Error("Unsupported keyType value"); + } + keyList.push({ Vrsn: 1, animInterpStyle: animInterpStyle, time: time, animKey: animKey, selected: selected }); + } + return keyList; +} +function parseTrackList(trackList, logMissingFeatures) { + var tracks = []; + for (var i = 0; i < trackList.length; i++) { + var tr = trackList[i]; + var track = { + type: exports.stdTrackID.decode(tr.trackID), + enabled: tr.enab, + keys: parseKeyList(tr.keyList, logMissingFeatures), + }; + if (tr.effectParams) { + track.effectParams = { + fillCanvas: tr.effectParams.fillCanvas, + zoomOrigin: tr.effectParams.zoomOrigin, + keys: parseKeyList(tr.effectParams.keyList, logMissingFeatures), + }; + } + tracks.push(track); + } + return tracks; +} +exports.parseTrackList = parseTrackList; +function serializeTrackList(tracks) { + var trackList = []; + for (var i = 0; i < tracks.length; i++) { + var t = tracks[i]; + trackList.push(__assign(__assign({ trackID: exports.stdTrackID.encode(t.type), Vrsn: 1, enab: !!t.enabled, Effc: !!t.effectParams }, (t.effectParams ? { + effectParams: { + keyList: serializeKeyList(t.keys), + fillCanvas: t.effectParams.fillCanvas, + zoomOrigin: t.effectParams.zoomOrigin, + } + } : {})), { keyList: serializeKeyList(t.keys) })); + } + return trackList; +} +exports.serializeTrackList = serializeTrackList; +function parseEffectObject(obj, reportErrors) { + var result = {}; + for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) { + var key = _a[_i]; + var val = obj[key]; + switch (key) { + case 'enab': + result.enabled = !!val; + break; + case 'uglg': + result.useGlobalLight = !!val; + break; + case 'AntA': + result.antialiased = !!val; + break; + case 'Algn': + result.align = !!val; + break; + case 'Dthr': + result.dither = !!val; + break; + case 'Invr': + result.invert = !!val; + break; + case 'Rvrs': + result.reverse = !!val; + break; + case 'Clr ': + result.color = parseColor(val); + break; + case 'hglC': + result.highlightColor = parseColor(val); + break; + case 'sdwC': + result.shadowColor = parseColor(val); + break; + case 'Styl': + result.position = exports.FStl.decode(val); + break; + case 'Md ': + result.blendMode = exports.BlnM.decode(val); + break; + case 'hglM': + result.highlightBlendMode = exports.BlnM.decode(val); + break; + case 'sdwM': + result.shadowBlendMode = exports.BlnM.decode(val); + break; + case 'bvlS': + result.style = exports.BESl.decode(val); + break; + case 'bvlD': + result.direction = exports.BESs.decode(val); + break; + case 'bvlT': + result.technique = exports.bvlT.decode(val); + break; + case 'GlwT': + result.technique = exports.BETE.decode(val); + break; + case 'glwS': + result.source = exports.IGSr.decode(val); + break; + case 'Type': + result.type = exports.GrdT.decode(val); + break; + case 'gs99': + result.interpolationMethod = exports.gradientInterpolationMethodType.decode(val); + break; + case 'Opct': + result.opacity = parsePercent(val); + break; + case 'hglO': + result.highlightOpacity = parsePercent(val); + break; + case 'sdwO': + result.shadowOpacity = parsePercent(val); + break; + case 'lagl': + result.angle = parseAngle(val); + break; + case 'Angl': + result.angle = parseAngle(val); + break; + case 'Lald': + result.altitude = parseAngle(val); + break; + case 'Sftn': + result.soften = parseUnits(val); + break; + case 'srgR': + result.strength = parsePercent(val); + break; + case 'blur': + result.size = parseUnits(val); + break; + case 'Nose': + result.noise = parsePercent(val); + break; + case 'Inpr': + result.range = parsePercent(val); + break; + case 'Ckmt': + result.choke = parseUnits(val); + break; + case 'ShdN': + result.jitter = parsePercent(val); + break; + case 'Dstn': + result.distance = parseUnits(val); + break; + case 'Scl ': + result.scale = parsePercent(val); + break; + case 'Ptrn': + result.pattern = { name: val['Nm '], id: val.Idnt }; + break; + case 'phase': + result.phase = { x: val.Hrzn, y: val.Vrtc }; + break; + case 'Ofst': + result.offset = { x: parsePercent(val.Hrzn), y: parsePercent(val.Vrtc) }; + break; + case 'MpgS': + case 'TrnS': + result.contour = { + name: val['Nm '], + curve: val['Crv '].map(function (p) { return ({ x: p.Hrzn, y: p.Vrtc }); }), + }; + break; + case 'Grad': + result.gradient = parseGradient(val); + break; + case 'useTexture': + case 'useShape': + case 'layerConceals': + case 'present': + case 'showInDialog': + case 'antialiasGloss': + result[key] = val; + break; + default: + reportErrors && console.log("Invalid effect key: '".concat(key, "', value:"), val); + } + } + return result; +} +function serializeEffectObject(obj, objName, reportErrors) { + var result = {}; + for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) { + var objKey = _a[_i]; + var key = objKey; + var val = obj[key]; + switch (key) { + case 'enabled': + result.enab = !!val; + break; + case 'useGlobalLight': + result.uglg = !!val; + break; + case 'antialiased': + result.AntA = !!val; + break; + case 'align': + result.Algn = !!val; + break; + case 'dither': + result.Dthr = !!val; + break; + case 'invert': + result.Invr = !!val; + break; + case 'reverse': + result.Rvrs = !!val; + break; + case 'color': + result['Clr '] = serializeColor(val); + break; + case 'highlightColor': + result.hglC = serializeColor(val); + break; + case 'shadowColor': + result.sdwC = serializeColor(val); + break; + case 'position': + result.Styl = exports.FStl.encode(val); + break; + case 'blendMode': + result['Md '] = exports.BlnM.encode(val); + break; + case 'highlightBlendMode': + result.hglM = exports.BlnM.encode(val); + break; + case 'shadowBlendMode': + result.sdwM = exports.BlnM.encode(val); + break; + case 'style': + result.bvlS = exports.BESl.encode(val); + break; + case 'direction': + result.bvlD = exports.BESs.encode(val); + break; + case 'technique': + if (objName === 'bevel') { + result.bvlT = exports.bvlT.encode(val); + } + else { + result.GlwT = exports.BETE.encode(val); + } + break; + case 'source': + result.glwS = exports.IGSr.encode(val); + break; + case 'type': + result.Type = exports.GrdT.encode(val); + break; + case 'interpolationMethod': + result.gs99 = exports.gradientInterpolationMethodType.encode(val); + break; + case 'opacity': + result.Opct = unitsPercent(val); + break; + case 'highlightOpacity': + result.hglO = unitsPercent(val); + break; + case 'shadowOpacity': + result.sdwO = unitsPercent(val); + break; + case 'angle': + if (objName === 'gradientOverlay') { + result.Angl = unitsAngle(val); + } + else { + result.lagl = unitsAngle(val); + } + break; + case 'altitude': + result.Lald = unitsAngle(val); + break; + case 'soften': + result.Sftn = unitsValue(val, key); + break; + case 'strength': + result.srgR = unitsPercent(val); + break; + case 'size': + result.blur = unitsValue(val, key); + break; + case 'noise': + result.Nose = unitsPercent(val); + break; + case 'range': + result.Inpr = unitsPercent(val); + break; + case 'choke': + result.Ckmt = unitsValue(val, key); + break; + case 'jitter': + result.ShdN = unitsPercent(val); + break; + case 'distance': + result.Dstn = unitsValue(val, key); + break; + case 'scale': + result['Scl '] = unitsPercent(val); + break; + case 'pattern': + result.Ptrn = { 'Nm ': val.name, Idnt: val.id }; + break; + case 'phase': + result.phase = { Hrzn: val.x, Vrtc: val.y }; + break; + case 'offset': + result.Ofst = { Hrzn: unitsPercent(val.x), Vrtc: unitsPercent(val.y) }; + break; + case 'contour': { + result[objName === 'satin' ? 'MpgS' : 'TrnS'] = { + 'Nm ': val.name, + 'Crv ': val.curve.map(function (p) { return ({ Hrzn: p.x, Vrtc: p.y }); }), + }; + break; + } + case 'gradient': + result.Grad = serializeGradient(val); + break; + case 'useTexture': + case 'useShape': + case 'layerConceals': + case 'present': + case 'showInDialog': + case 'antialiasGloss': + result[key] = val; + break; + default: + reportErrors && console.log("Invalid effect key: '".concat(key, "', value:"), val); + } + } + return result; +} +function parseGradient(grad) { + if (grad.GrdF === 'GrdF.CstS') { + var samples_1 = grad.Intr || 4096; + return { + type: 'solid', + name: grad['Nm '], + smoothness: grad.Intr / 4096, + colorStops: grad.Clrs.map(function (s) { return ({ + color: parseColor(s['Clr ']), + location: s.Lctn / samples_1, + midpoint: s.Mdpn / 100, + }); }), + opacityStops: grad.Trns.map(function (s) { return ({ + opacity: parsePercent(s.Opct), + location: s.Lctn / samples_1, + midpoint: s.Mdpn / 100, + }); }), + }; + } + else { + return { + type: 'noise', + name: grad['Nm '], + roughness: grad.Smth / 4096, + colorModel: exports.ClrS.decode(grad.ClrS), + randomSeed: grad.RndS, + restrictColors: !!grad.VctC, + addTransparency: !!grad.ShTr, + min: grad['Mnm '].map(function (x) { return x / 100; }), + max: grad['Mxm '].map(function (x) { return x / 100; }), + }; + } +} +function serializeGradient(grad) { + var _a, _b; + if (grad.type === 'solid') { + var samples_2 = Math.round(((_a = grad.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096); + return { + 'Nm ': grad.name || '', + GrdF: 'GrdF.CstS', + Intr: samples_2, + Clrs: grad.colorStops.map(function (s) { + var _a; + return ({ + 'Clr ': serializeColor(s.color), + Type: 'Clry.UsrS', + Lctn: Math.round(s.location * samples_2), + Mdpn: Math.round(((_a = s.midpoint) !== null && _a !== void 0 ? _a : 0.5) * 100), + }); + }), + Trns: grad.opacityStops.map(function (s) { + var _a; + return ({ + Opct: unitsPercent(s.opacity), + Lctn: Math.round(s.location * samples_2), + Mdpn: Math.round(((_a = s.midpoint) !== null && _a !== void 0 ? _a : 0.5) * 100), + }); + }), + }; + } + else { + return { + GrdF: 'GrdF.ClNs', + 'Nm ': grad.name || '', + ShTr: !!grad.addTransparency, + VctC: !!grad.restrictColors, + ClrS: exports.ClrS.encode(grad.colorModel), + RndS: grad.randomSeed || 0, + Smth: Math.round(((_b = grad.roughness) !== null && _b !== void 0 ? _b : 1) * 4096), + 'Mnm ': (grad.min || [0, 0, 0, 0]).map(function (x) { return x * 100; }), + 'Mxm ': (grad.max || [1, 1, 1, 1]).map(function (x) { return x * 100; }), + }; + } +} +function parseGradientContent(descriptor) { + var result = parseGradient(descriptor.Grad); + result.style = exports.GrdT.decode(descriptor.Type); + if (descriptor.Dthr !== undefined) + result.dither = descriptor.Dthr; + if (descriptor.Rvrs !== undefined) + result.reverse = descriptor.Rvrs; + if (descriptor.Angl !== undefined) + result.angle = parseAngle(descriptor.Angl); + if (descriptor['Scl '] !== undefined) + result.scale = parsePercent(descriptor['Scl ']); + if (descriptor.Algn !== undefined) + result.align = descriptor.Algn; + if (descriptor.Ofst !== undefined) { + result.offset = { + x: parsePercent(descriptor.Ofst.Hrzn), + y: parsePercent(descriptor.Ofst.Vrtc) + }; + } + return result; +} +function parsePatternContent(descriptor) { + var result = { + name: descriptor.Ptrn['Nm '], + id: descriptor.Ptrn.Idnt, + }; + if (descriptor.Lnkd !== undefined) + result.linked = descriptor.Lnkd; + if (descriptor.phase !== undefined) + result.phase = { x: descriptor.phase.Hrzn, y: descriptor.phase.Vrtc }; + return result; +} +function parseVectorContent(descriptor) { + if ('Grad' in descriptor) { + return parseGradientContent(descriptor); + } + else if ('Ptrn' in descriptor) { + return __assign({ type: 'pattern' }, parsePatternContent(descriptor)); + } + else if ('Clr ' in descriptor) { + return { type: 'color', color: parseColor(descriptor['Clr ']) }; + } + else { + throw new Error('Invalid vector content'); + } +} +exports.parseVectorContent = parseVectorContent; +function serializeGradientContent(content) { + var result = {}; + if (content.dither !== undefined) + result.Dthr = content.dither; + if (content.reverse !== undefined) + result.Rvrs = content.reverse; + if (content.angle !== undefined) + result.Angl = unitsAngle(content.angle); + result.Type = exports.GrdT.encode(content.style); + if (content.align !== undefined) + result.Algn = content.align; + if (content.scale !== undefined) + result['Scl '] = unitsPercent(content.scale); + if (content.offset) { + result.Ofst = { + Hrzn: unitsPercent(content.offset.x), + Vrtc: unitsPercent(content.offset.y), + }; + } + result.Grad = serializeGradient(content); + return result; +} +function serializePatternContent(content) { + var result = { + Ptrn: { + 'Nm ': content.name || '', + Idnt: content.id || '', + } + }; + if (content.linked !== undefined) + result.Lnkd = !!content.linked; + if (content.phase !== undefined) + result.phase = { Hrzn: content.phase.x, Vrtc: content.phase.y }; + return result; +} +function serializeVectorContent(content) { + if (content.type === 'color') { + return { key: 'SoCo', descriptor: { 'Clr ': serializeColor(content.color) } }; + } + else if (content.type === 'pattern') { + return { key: 'PtFl', descriptor: serializePatternContent(content) }; + } + else { + return { key: 'GdFl', descriptor: serializeGradientContent(content) }; + } +} +exports.serializeVectorContent = serializeVectorContent; +function parseColor(color) { + if ('H ' in color) { + return { h: parsePercentOrAngle(color['H ']), s: color.Strt, b: color.Brgh }; + } + else if ('Rd ' in color) { + return { r: color['Rd '], g: color['Grn '], b: color['Bl '] }; + } + else if ('Cyn ' in color) { + return { c: color['Cyn '], m: color.Mgnt, y: color['Ylw '], k: color.Blck }; + } + else if ('Gry ' in color) { + return { k: color['Gry '] }; + } + else if ('Lmnc' in color) { + return { l: color.Lmnc, a: color['A '], b: color['B '] }; + } + else { + throw new Error('Unsupported color descriptor'); + } +} +exports.parseColor = parseColor; +function serializeColor(color) { + if (!color) { + return { 'Rd ': 0, 'Grn ': 0, 'Bl ': 0 }; + } + else if ('r' in color) { + return { 'Rd ': color.r || 0, 'Grn ': color.g || 0, 'Bl ': color.b || 0 }; + } + else if ('h' in color) { + return { 'H ': unitsAngle(color.h * 360), Strt: color.s || 0, Brgh: color.b || 0 }; + } + else if ('c' in color) { + return { 'Cyn ': color.c || 0, Mgnt: color.m || 0, 'Ylw ': color.y || 0, Blck: color.k || 0 }; + } + else if ('l' in color) { + return { Lmnc: color.l || 0, 'A ': color.a || 0, 'B ': color.b || 0 }; + } + else if ('k' in color) { + return { 'Gry ': color.k }; + } + else { + throw new Error('Invalid color value'); + } +} +exports.serializeColor = serializeColor; +function parseAngle(x) { + if (x === undefined) + return 0; + if (x.units !== 'Angle') + throw new Error("Invalid units: ".concat(x.units)); + return x.value; +} +exports.parseAngle = parseAngle; +function parsePercent(x) { + if (x === undefined) + return 1; + if (x.units !== 'Percent') + throw new Error("Invalid units: ".concat(x.units)); + return x.value / 100; +} +exports.parsePercent = parsePercent; +function parsePercentOrAngle(x) { + if (x === undefined) + return 1; + if (x.units === 'Percent') + return x.value / 100; + if (x.units === 'Angle') + return x.value / 360; + throw new Error("Invalid units: ".concat(x.units)); +} +exports.parsePercentOrAngle = parsePercentOrAngle; +function parseUnits(_a) { + var units = _a.units, value = _a.value; + if (units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && + units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density') { + throw new Error("Invalid units: ".concat(JSON.stringify({ units: units, value: value }))); + } + return { value: value, units: units }; +} +exports.parseUnits = parseUnits; +function parseUnitsOrNumber(value, units) { + if (units === void 0) { units = 'Pixels'; } + if (typeof value === 'number') + return { value: value, units: units }; + return parseUnits(value); +} +exports.parseUnitsOrNumber = parseUnitsOrNumber; +function parseUnitsToNumber(_a, expectedUnits) { + var units = _a.units, value = _a.value; + if (units !== expectedUnits) + throw new Error("Invalid units: ".concat(JSON.stringify({ units: units, value: value }))); + return value; +} +exports.parseUnitsToNumber = parseUnitsToNumber; +function unitsAngle(value) { + return { units: 'Angle', value: value || 0 }; +} +exports.unitsAngle = unitsAngle; +function unitsPercent(value) { + return { units: 'Percent', value: Math.round((value || 0) * 100) }; +} +exports.unitsPercent = unitsPercent; +function unitsValue(x, key) { + if (x == null) + return { units: 'Pixels', value: 0 }; + if (typeof x !== 'object') + throw new Error("Invalid value: ".concat(JSON.stringify(x), " (key: ").concat(key, ") (should have value and units)")); + var units = x.units, value = x.value; + if (typeof value !== 'number') + throw new Error("Invalid value in ".concat(JSON.stringify(x), " (key: ").concat(key, ")")); + if (units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && + units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density') { + throw new Error("Invalid units in ".concat(JSON.stringify(x), " (key: ").concat(key, ")")); + } + return { units: units, value: value }; +} +exports.unitsValue = unitsValue; +exports.textGridding = (0, helpers_1.createEnum)('textGridding', 'none', { + none: 'None', + round: 'Rnd ', +}); +exports.Ornt = (0, helpers_1.createEnum)('Ornt', 'horizontal', { + horizontal: 'Hrzn', + vertical: 'Vrtc', +}); +exports.Annt = (0, helpers_1.createEnum)('Annt', 'sharp', { + none: 'Anno', + sharp: 'antiAliasSharp', + crisp: 'AnCr', + strong: 'AnSt', + smooth: 'AnSm', + platform: 'antiAliasPlatformGray', + platformLCD: 'antiAliasPlatformLCD', +}); +exports.warpStyle = (0, helpers_1.createEnum)('warpStyle', 'none', { + none: 'warpNone', + arc: 'warpArc', + arcLower: 'warpArcLower', + arcUpper: 'warpArcUpper', + arch: 'warpArch', + bulge: 'warpBulge', + shellLower: 'warpShellLower', + shellUpper: 'warpShellUpper', + flag: 'warpFlag', + wave: 'warpWave', + fish: 'warpFish', + rise: 'warpRise', + fisheye: 'warpFisheye', + inflate: 'warpInflate', + squeeze: 'warpSqueeze', + twist: 'warpTwist', + custom: 'warpCustom', +}); +exports.BlnM = (0, helpers_1.createEnum)('BlnM', 'normal', { + 'normal': 'Nrml', + 'dissolve': 'Dslv', + 'darken': 'Drkn', + 'multiply': 'Mltp', + 'color burn': 'CBrn', + 'linear burn': 'linearBurn', + 'darker color': 'darkerColor', + 'lighten': 'Lghn', + 'screen': 'Scrn', + 'color dodge': 'CDdg', + 'linear dodge': 'linearDodge', + 'lighter color': 'lighterColor', + 'overlay': 'Ovrl', + 'soft light': 'SftL', + 'hard light': 'HrdL', + 'vivid light': 'vividLight', + 'linear light': 'linearLight', + 'pin light': 'pinLight', + 'hard mix': 'hardMix', + 'difference': 'Dfrn', + 'exclusion': 'Xclu', + 'subtract': 'blendSubtraction', + 'divide': 'blendDivide', + 'hue': 'H ', + 'saturation': 'Strt', + 'color': 'Clr ', + 'luminosity': 'Lmns', + // used in ABR + 'linear height': 'linearHeight', + 'height': 'Hght', + 'subtraction': 'Sbtr', // 2nd version of subtract ? +}); +exports.BESl = (0, helpers_1.createEnum)('BESl', 'inner bevel', { + 'inner bevel': 'InrB', + 'outer bevel': 'OtrB', + 'emboss': 'Embs', + 'pillow emboss': 'PlEb', + 'stroke emboss': 'strokeEmboss', +}); +exports.bvlT = (0, helpers_1.createEnum)('bvlT', 'smooth', { + 'smooth': 'SfBL', + 'chisel hard': 'PrBL', + 'chisel soft': 'Slmt', +}); +exports.BESs = (0, helpers_1.createEnum)('BESs', 'up', { + up: 'In ', + down: 'Out ', +}); +exports.BETE = (0, helpers_1.createEnum)('BETE', 'softer', { + softer: 'SfBL', + precise: 'PrBL', +}); +exports.IGSr = (0, helpers_1.createEnum)('IGSr', 'edge', { + edge: 'SrcE', + center: 'SrcC', +}); +exports.GrdT = (0, helpers_1.createEnum)('GrdT', 'linear', { + linear: 'Lnr ', + radial: 'Rdl ', + angle: 'Angl', + reflected: 'Rflc', + diamond: 'Dmnd', +}); +exports.animInterpStyleEnum = (0, helpers_1.createEnum)('animInterpStyle', 'linear', { + linear: 'Lnr ', + hold: 'hold', +}); +exports.stdTrackID = (0, helpers_1.createEnum)('stdTrackID', 'opacity', { + opacity: 'opacityTrack', + style: 'styleTrack', + sheetTransform: 'sheetTransformTrack', + sheetPosition: 'sheetPositionTrack', + globalLighting: 'globalLightingTrack', +}); +exports.gradientInterpolationMethodType = (0, helpers_1.createEnum)('gradientInterpolationMethodType', 'perceptual', { + perceptual: 'Perc', + linear: 'Lnr', + classic: 'Gcls', +}); +exports.ClrS = (0, helpers_1.createEnum)('ClrS', 'rgb', { + rgb: 'RGBC', + hsb: 'HSBl', + lab: 'LbCl', +}); +exports.FStl = (0, helpers_1.createEnum)('FStl', 'outside', { + outside: 'OutF', + center: 'CtrF', + inside: 'InsF' +}); +exports.FrFl = (0, helpers_1.createEnum)('FrFl', 'color', { + color: 'SClr', + gradient: 'GrFl', + pattern: 'Ptrn', +}); +exports.strokeStyleLineCapType = (0, helpers_1.createEnum)('strokeStyleLineCapType', 'butt', { + butt: 'strokeStyleButtCap', + round: 'strokeStyleRoundCap', + square: 'strokeStyleSquareCap', +}); +exports.strokeStyleLineJoinType = (0, helpers_1.createEnum)('strokeStyleLineJoinType', 'miter', { + miter: 'strokeStyleMiterJoin', + round: 'strokeStyleRoundJoin', + bevel: 'strokeStyleBevelJoin', +}); +exports.strokeStyleLineAlignment = (0, helpers_1.createEnum)('strokeStyleLineAlignment', 'inside', { + inside: 'strokeStyleAlignInside', + center: 'strokeStyleAlignCenter', + outside: 'strokeStyleAlignOutside', +}); + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2Z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0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/descriptor.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/descriptor.js.map deleted file mode 100644 index 892abe0..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/descriptor.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"descriptor.js","sourceRoot":"../src/","sources":["descriptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAAuC;AAWvC,yCAGqB;AACrB,yCAGqB;AAMrB,SAAS,MAAM,CAAC,GAAS;IACxB,IAAM,MAAM,GAAS,EAAE,CAAC;IACxB,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,UAAA,GAAG,IAAI,OAAA,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,EAAtB,CAAsB,CAAC,CAAC;IACxD,OAAO,MAAM,CAAC;AACf,CAAC;AAED,IAAM,QAAQ,GAAS;IACtB,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,aAAa;CACrB,CAAC;AAEF,IAAM,WAAW,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AACrC,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAgB,YAAY,CAAC,KAAc;IAC1C,SAAS,GAAG,KAAK,CAAC;AACnB,CAAC;AAFD,oCAEC;AAED,SAAS,QAAQ,CAAC,IAAY,EAAE,OAAe;IAC9C,OAAO,EAAE,IAAI,MAAA,EAAE,OAAO,SAAA,EA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AAiB,EAAE,SAAS,EAAE;IAClF,OAAO,EAAE,SAAS;CAClB,CAAC,CAAC;AAEU,QAAA,YAAY,GAAG,IAAA,oBAAU,EAA8C,cAAc,EAAE,eAAe,EAAE;IACpH,aAAa,EAAE,eAAe;IAC9B,aAAa,EAAE,eAAe;IAC9B,KAAK,EAAE,OAAO;CACd,CAAC,CAAC;AAEU,QAAA,iBAAiB,GAAG,IAAA,oBAAU,EAA6B,mBAAmB,EAAE,MAAM,EAAE;IACpG,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,MAAM;CACb,CAAC,CAAC;AAEU,QAAA,sBAAsB,GAAG,IAAA,oBAAU,EAAc,wBAAwB,EAAE,MAAM,EAAE;IAC/F,IAAI,EAAE,oBAAoB;IAC1B,KAAK,EAAE,qBAAqB;IAC5B,MAAM,EAAE,sBAAsB;CAC9B,CAAC,CAAC;AAEU,QAAA,uBAAuB,GAAG,IAAA,oBAAU,EAAe,yBAAyB,EAAE,OAAO,EAAE;IACnG,KAAK,EAAE,sBAAsB;IAC7B,KAAK,EAAE,sBAAsB;IAC7B,KAAK,EAAE,sBAAsB;CAC7B,CAAC,CAAC;AAEU,QAAA,wBAAwB,GAAG,IAAA,oBAAU,EAAgB,0BAA0B,EAAE,QAAQ,EAAE;IACvG,MAAM,EAAE,wBAAwB;IAChC,MAAM,EAAE,wBAAwB;IAChC,OAAO,EAAE,yBAAyB;CAClC,CAAC,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/effectsHelpers.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/effectsHelpers.d.ts index d7e49f5..0e97f1b 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/effectsHelpers.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/effectsHelpers.d.ts @@ -1,5 +1,5 @@ -import { LayerEffectsInfo } from './psd'; -import { PsdReader } from './psdReader'; -import { PsdWriter } from './psdWriter'; -export declare function readEffects(reader: PsdReader): LayerEffectsInfo; -export declare function writeEffects(writer: PsdWriter, effects: LayerEffectsInfo): void; +import { LayerEffectsInfo } from './psd'; +import { PsdReader } from './psdReader'; +import { PsdWriter } from './psdWriter'; +export declare function readEffects(reader: PsdReader): LayerEffectsInfo; +export declare function writeEffects(writer: PsdWriter, effects: LayerEffectsInfo): void; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/effectsHelpers.js b/npm-packages/mac-v2.4.x/ag-psd/dist/effectsHelpers.js index 202a80a..1b5a04b 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/effectsHelpers.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/effectsHelpers.js @@ -1,309 +1,310 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.writeEffects = exports.readEffects = void 0; -var helpers_1 = require("./helpers"); -var psdReader_1 = require("./psdReader"); -var psdWriter_1 = require("./psdWriter"); -var bevelStyles = [ - undefined, 'outer bevel', 'inner bevel', 'emboss', 'pillow emboss', 'stroke emboss' -]; -function readBlendMode(reader) { - (0, psdReader_1.checkSignature)(reader, '8BIM'); - return helpers_1.toBlendMode[(0, psdReader_1.readSignature)(reader)] || 'normal'; -} -function writeBlendMode(writer, mode) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, helpers_1.fromBlendMode[mode] || 'norm'); -} -function readFixedPoint8(reader) { - return (0, psdReader_1.readUint8)(reader) / 0xff; -} -function writeFixedPoint8(writer, value) { - (0, psdWriter_1.writeUint8)(writer, Math.round(value * 0xff) | 0); -} -function readEffects(reader) { - var version = (0, psdReader_1.readUint16)(reader); - if (version !== 0) - throw new Error("Invalid effects layer version: ".concat(version)); - var effectsCount = (0, psdReader_1.readUint16)(reader); - var effects = {}; - for (var i = 0; i < effectsCount; i++) { - (0, psdReader_1.checkSignature)(reader, '8BIM'); - var type = (0, psdReader_1.readSignature)(reader); - switch (type) { - case 'cmnS': { // common state (see See Effects layer, common state info) - var size = (0, psdReader_1.readUint32)(reader); - var version_1 = (0, psdReader_1.readUint32)(reader); - var visible = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.skipBytes)(reader, 2); - if (size !== 7 || version_1 !== 0 || !visible) - throw new Error("Invalid effects common state"); - break; - } - case 'dsdw': // drop shadow (see See Effects layer, drop shadow and inner shadow info) - case 'isdw': { // inner shadow (see See Effects layer, drop shadow and inner shadow info) - var blockSize = (0, psdReader_1.readUint32)(reader); - var version_2 = (0, psdReader_1.readUint32)(reader); - if (blockSize !== 41 && blockSize !== 51) - throw new Error("Invalid shadow size: ".concat(blockSize)); - if (version_2 !== 0 && version_2 !== 2) - throw new Error("Invalid shadow version: ".concat(version_2)); - var size = (0, psdReader_1.readFixedPoint32)(reader); - (0, psdReader_1.readFixedPoint32)(reader); // intensity - var angle = (0, psdReader_1.readFixedPoint32)(reader); - var distance = (0, psdReader_1.readFixedPoint32)(reader); - var color = (0, psdReader_1.readColor)(reader); - var blendMode = readBlendMode(reader); - var enabled = !!(0, psdReader_1.readUint8)(reader); - var useGlobalLight = !!(0, psdReader_1.readUint8)(reader); - var opacity = readFixedPoint8(reader); - if (blockSize >= 51) - (0, psdReader_1.readColor)(reader); // native color - var shadowInfo = { - size: { units: 'Pixels', value: size }, - distance: { units: 'Pixels', value: distance }, - angle: angle, - color: color, - blendMode: blendMode, - enabled: enabled, - useGlobalLight: useGlobalLight, - opacity: opacity - }; - if (type === 'dsdw') { - effects.dropShadow = [shadowInfo]; - } - else { - effects.innerShadow = [shadowInfo]; - } - break; - } - case 'oglw': { // outer glow (see See Effects layer, outer glow info) - var blockSize = (0, psdReader_1.readUint32)(reader); - var version_3 = (0, psdReader_1.readUint32)(reader); - if (blockSize !== 32 && blockSize !== 42) - throw new Error("Invalid outer glow size: ".concat(blockSize)); - if (version_3 !== 0 && version_3 !== 2) - throw new Error("Invalid outer glow version: ".concat(version_3)); - var size = (0, psdReader_1.readFixedPoint32)(reader); - (0, psdReader_1.readFixedPoint32)(reader); // intensity - var color = (0, psdReader_1.readColor)(reader); - var blendMode = readBlendMode(reader); - var enabled = !!(0, psdReader_1.readUint8)(reader); - var opacity = readFixedPoint8(reader); - if (blockSize >= 42) - (0, psdReader_1.readColor)(reader); // native color - effects.outerGlow = { - size: { units: 'Pixels', value: size }, - color: color, - blendMode: blendMode, - enabled: enabled, - opacity: opacity - }; - break; - } - case 'iglw': { // inner glow (see See Effects layer, inner glow info) - var blockSize = (0, psdReader_1.readUint32)(reader); - var version_4 = (0, psdReader_1.readUint32)(reader); - if (blockSize !== 32 && blockSize !== 43) - throw new Error("Invalid inner glow size: ".concat(blockSize)); - if (version_4 !== 0 && version_4 !== 2) - throw new Error("Invalid inner glow version: ".concat(version_4)); - var size = (0, psdReader_1.readFixedPoint32)(reader); - (0, psdReader_1.readFixedPoint32)(reader); // intensity - var color = (0, psdReader_1.readColor)(reader); - var blendMode = readBlendMode(reader); - var enabled = !!(0, psdReader_1.readUint8)(reader); - var opacity = readFixedPoint8(reader); - if (blockSize >= 43) { - (0, psdReader_1.readUint8)(reader); // inverted - (0, psdReader_1.readColor)(reader); // native color - } - effects.innerGlow = { - size: { units: 'Pixels', value: size }, - color: color, - blendMode: blendMode, - enabled: enabled, - opacity: opacity - }; - break; - } - case 'bevl': { // bevel (see See Effects layer, bevel info) - var blockSize = (0, psdReader_1.readUint32)(reader); - var version_5 = (0, psdReader_1.readUint32)(reader); - if (blockSize !== 58 && blockSize !== 78) - throw new Error("Invalid bevel size: ".concat(blockSize)); - if (version_5 !== 0 && version_5 !== 2) - throw new Error("Invalid bevel version: ".concat(version_5)); - var angle = (0, psdReader_1.readFixedPoint32)(reader); - var strength = (0, psdReader_1.readFixedPoint32)(reader); - var size = (0, psdReader_1.readFixedPoint32)(reader); - var highlightBlendMode = readBlendMode(reader); - var shadowBlendMode = readBlendMode(reader); - var highlightColor = (0, psdReader_1.readColor)(reader); - var shadowColor = (0, psdReader_1.readColor)(reader); - var style = bevelStyles[(0, psdReader_1.readUint8)(reader)] || 'inner bevel'; - var highlightOpacity = readFixedPoint8(reader); - var shadowOpacity = readFixedPoint8(reader); - var enabled = !!(0, psdReader_1.readUint8)(reader); - var useGlobalLight = !!(0, psdReader_1.readUint8)(reader); - var direction = (0, psdReader_1.readUint8)(reader) ? 'down' : 'up'; - if (blockSize >= 78) { - (0, psdReader_1.readColor)(reader); // real highlight color - (0, psdReader_1.readColor)(reader); // real shadow color - } - effects.bevel = { - size: { units: 'Pixels', value: size }, - angle: angle, - strength: strength, - highlightBlendMode: highlightBlendMode, - shadowBlendMode: shadowBlendMode, - highlightColor: highlightColor, - shadowColor: shadowColor, - style: style, - highlightOpacity: highlightOpacity, - shadowOpacity: shadowOpacity, - enabled: enabled, - useGlobalLight: useGlobalLight, - direction: direction, - }; - break; - } - case 'sofi': { // solid fill (Photoshop 7.0) (see See Effects layer, solid fill (added in Photoshop 7.0)) - var size = (0, psdReader_1.readUint32)(reader); - var version_6 = (0, psdReader_1.readUint32)(reader); - if (size !== 34) - throw new Error("Invalid effects solid fill info size: ".concat(size)); - if (version_6 !== 2) - throw new Error("Invalid effects solid fill info version: ".concat(version_6)); - var blendMode = readBlendMode(reader); - var color = (0, psdReader_1.readColor)(reader); - var opacity = readFixedPoint8(reader); - var enabled = !!(0, psdReader_1.readUint8)(reader); - (0, psdReader_1.readColor)(reader); // native color - effects.solidFill = [{ blendMode: blendMode, color: color, opacity: opacity, enabled: enabled }]; - break; - } - default: - throw new Error("Invalid effect type: '".concat(type, "'")); - } - } - return effects; -} -exports.readEffects = readEffects; -function writeShadowInfo(writer, shadow) { - var _a; - (0, psdWriter_1.writeUint32)(writer, 51); - (0, psdWriter_1.writeUint32)(writer, 2); - (0, psdWriter_1.writeFixedPoint32)(writer, shadow.size && shadow.size.value || 0); - (0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity - (0, psdWriter_1.writeFixedPoint32)(writer, shadow.angle || 0); - (0, psdWriter_1.writeFixedPoint32)(writer, shadow.distance && shadow.distance.value || 0); - (0, psdWriter_1.writeColor)(writer, shadow.color); - writeBlendMode(writer, shadow.blendMode); - (0, psdWriter_1.writeUint8)(writer, shadow.enabled ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, shadow.useGlobalLight ? 1 : 0); - writeFixedPoint8(writer, (_a = shadow.opacity) !== null && _a !== void 0 ? _a : 1); - (0, psdWriter_1.writeColor)(writer, shadow.color); // native color -} -function writeEffects(writer, effects) { - var _a, _b, _c, _d, _e, _f; - var dropShadow = (_a = effects.dropShadow) === null || _a === void 0 ? void 0 : _a[0]; - var innerShadow = (_b = effects.innerShadow) === null || _b === void 0 ? void 0 : _b[0]; - var outerGlow = effects.outerGlow; - var innerGlow = effects.innerGlow; - var bevel = effects.bevel; - var solidFill = (_c = effects.solidFill) === null || _c === void 0 ? void 0 : _c[0]; - var count = 1; - if (dropShadow) - count++; - if (innerShadow) - count++; - if (outerGlow) - count++; - if (innerGlow) - count++; - if (bevel) - count++; - if (solidFill) - count++; - (0, psdWriter_1.writeUint16)(writer, 0); - (0, psdWriter_1.writeUint16)(writer, count); - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'cmnS'); - (0, psdWriter_1.writeUint32)(writer, 7); // size - (0, psdWriter_1.writeUint32)(writer, 0); // version - (0, psdWriter_1.writeUint8)(writer, 1); // visible - (0, psdWriter_1.writeZeros)(writer, 2); - if (dropShadow) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'dsdw'); - writeShadowInfo(writer, dropShadow); - } - if (innerShadow) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'isdw'); - writeShadowInfo(writer, innerShadow); - } - if (outerGlow) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'oglw'); - (0, psdWriter_1.writeUint32)(writer, 42); - (0, psdWriter_1.writeUint32)(writer, 2); - (0, psdWriter_1.writeFixedPoint32)(writer, ((_d = outerGlow.size) === null || _d === void 0 ? void 0 : _d.value) || 0); - (0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity - (0, psdWriter_1.writeColor)(writer, outerGlow.color); - writeBlendMode(writer, outerGlow.blendMode); - (0, psdWriter_1.writeUint8)(writer, outerGlow.enabled ? 1 : 0); - writeFixedPoint8(writer, outerGlow.opacity || 0); - (0, psdWriter_1.writeColor)(writer, outerGlow.color); - } - if (innerGlow) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'iglw'); - (0, psdWriter_1.writeUint32)(writer, 43); - (0, psdWriter_1.writeUint32)(writer, 2); - (0, psdWriter_1.writeFixedPoint32)(writer, ((_e = innerGlow.size) === null || _e === void 0 ? void 0 : _e.value) || 0); - (0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity - (0, psdWriter_1.writeColor)(writer, innerGlow.color); - writeBlendMode(writer, innerGlow.blendMode); - (0, psdWriter_1.writeUint8)(writer, innerGlow.enabled ? 1 : 0); - writeFixedPoint8(writer, innerGlow.opacity || 0); - (0, psdWriter_1.writeUint8)(writer, 0); // inverted - (0, psdWriter_1.writeColor)(writer, innerGlow.color); - } - if (bevel) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'bevl'); - (0, psdWriter_1.writeUint32)(writer, 78); - (0, psdWriter_1.writeUint32)(writer, 2); - (0, psdWriter_1.writeFixedPoint32)(writer, bevel.angle || 0); - (0, psdWriter_1.writeFixedPoint32)(writer, bevel.strength || 0); - (0, psdWriter_1.writeFixedPoint32)(writer, ((_f = bevel.size) === null || _f === void 0 ? void 0 : _f.value) || 0); - writeBlendMode(writer, bevel.highlightBlendMode); - writeBlendMode(writer, bevel.shadowBlendMode); - (0, psdWriter_1.writeColor)(writer, bevel.highlightColor); - (0, psdWriter_1.writeColor)(writer, bevel.shadowColor); - var style = bevelStyles.indexOf(bevel.style); - (0, psdWriter_1.writeUint8)(writer, style <= 0 ? 1 : style); - writeFixedPoint8(writer, bevel.highlightOpacity || 0); - writeFixedPoint8(writer, bevel.shadowOpacity || 0); - (0, psdWriter_1.writeUint8)(writer, bevel.enabled ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, bevel.useGlobalLight ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, bevel.direction === 'down' ? 1 : 0); - (0, psdWriter_1.writeColor)(writer, bevel.highlightColor); - (0, psdWriter_1.writeColor)(writer, bevel.shadowColor); - } - if (solidFill) { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'sofi'); - (0, psdWriter_1.writeUint32)(writer, 34); - (0, psdWriter_1.writeUint32)(writer, 2); - writeBlendMode(writer, solidFill.blendMode); - (0, psdWriter_1.writeColor)(writer, solidFill.color); - writeFixedPoint8(writer, solidFill.opacity || 0); - (0, psdWriter_1.writeUint8)(writer, solidFill.enabled ? 1 : 0); - (0, psdWriter_1.writeColor)(writer, solidFill.color); - } -} -exports.writeEffects = writeEffects; -//# sourceMappingURL=effectsHelpers.js.map \ No newline at end of file +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writeEffects = exports.readEffects = void 0; +var helpers_1 = require("./helpers"); +var psdReader_1 = require("./psdReader"); +var psdWriter_1 = require("./psdWriter"); +var bevelStyles = [ + undefined, 'outer bevel', 'inner bevel', 'emboss', 'pillow emboss', 'stroke emboss' +]; +function readBlendMode(reader) { + (0, psdReader_1.checkSignature)(reader, '8BIM'); + return helpers_1.toBlendMode[(0, psdReader_1.readSignature)(reader)] || 'normal'; +} +function writeBlendMode(writer, mode) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, helpers_1.fromBlendMode[mode] || 'norm'); +} +function readFixedPoint8(reader) { + return (0, psdReader_1.readUint8)(reader) / 0xff; +} +function writeFixedPoint8(writer, value) { + (0, psdWriter_1.writeUint8)(writer, Math.round(value * 0xff) | 0); +} +function readEffects(reader) { + var version = (0, psdReader_1.readUint16)(reader); + if (version !== 0) + throw new Error("Invalid effects layer version: ".concat(version)); + var effectsCount = (0, psdReader_1.readUint16)(reader); + var effects = {}; + for (var i = 0; i < effectsCount; i++) { + (0, psdReader_1.checkSignature)(reader, '8BIM'); + var type = (0, psdReader_1.readSignature)(reader); + switch (type) { + case 'cmnS': { // common state (see See Effects layer, common state info) + var size = (0, psdReader_1.readUint32)(reader); + var version_1 = (0, psdReader_1.readUint32)(reader); + var visible = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.skipBytes)(reader, 2); + if (size !== 7 || version_1 !== 0 || !visible) + throw new Error("Invalid effects common state"); + break; + } + case 'dsdw': // drop shadow (see See Effects layer, drop shadow and inner shadow info) + case 'isdw': { // inner shadow (see See Effects layer, drop shadow and inner shadow info) + var blockSize = (0, psdReader_1.readUint32)(reader); + var version_2 = (0, psdReader_1.readUint32)(reader); + if (blockSize !== 41 && blockSize !== 51) + throw new Error("Invalid shadow size: ".concat(blockSize)); + if (version_2 !== 0 && version_2 !== 2) + throw new Error("Invalid shadow version: ".concat(version_2)); + var size = (0, psdReader_1.readFixedPoint32)(reader); + (0, psdReader_1.readFixedPoint32)(reader); // intensity + var angle = (0, psdReader_1.readFixedPoint32)(reader); + var distance = (0, psdReader_1.readFixedPoint32)(reader); + var color = (0, psdReader_1.readColor)(reader); + var blendMode = readBlendMode(reader); + var enabled = !!(0, psdReader_1.readUint8)(reader); + var useGlobalLight = !!(0, psdReader_1.readUint8)(reader); + var opacity = readFixedPoint8(reader); + if (blockSize >= 51) + (0, psdReader_1.readColor)(reader); // native color + var shadowInfo = { + size: { units: 'Pixels', value: size }, + distance: { units: 'Pixels', value: distance }, + angle: angle, + color: color, + blendMode: blendMode, + enabled: enabled, + useGlobalLight: useGlobalLight, + opacity: opacity + }; + if (type === 'dsdw') { + effects.dropShadow = [shadowInfo]; + } + else { + effects.innerShadow = [shadowInfo]; + } + break; + } + case 'oglw': { // outer glow (see See Effects layer, outer glow info) + var blockSize = (0, psdReader_1.readUint32)(reader); + var version_3 = (0, psdReader_1.readUint32)(reader); + if (blockSize !== 32 && blockSize !== 42) + throw new Error("Invalid outer glow size: ".concat(blockSize)); + if (version_3 !== 0 && version_3 !== 2) + throw new Error("Invalid outer glow version: ".concat(version_3)); + var size = (0, psdReader_1.readFixedPoint32)(reader); + (0, psdReader_1.readFixedPoint32)(reader); // intensity + var color = (0, psdReader_1.readColor)(reader); + var blendMode = readBlendMode(reader); + var enabled = !!(0, psdReader_1.readUint8)(reader); + var opacity = readFixedPoint8(reader); + if (blockSize >= 42) + (0, psdReader_1.readColor)(reader); // native color + effects.outerGlow = { + size: { units: 'Pixels', value: size }, + color: color, + blendMode: blendMode, + enabled: enabled, + opacity: opacity + }; + break; + } + case 'iglw': { // inner glow (see See Effects layer, inner glow info) + var blockSize = (0, psdReader_1.readUint32)(reader); + var version_4 = (0, psdReader_1.readUint32)(reader); + if (blockSize !== 32 && blockSize !== 43) + throw new Error("Invalid inner glow size: ".concat(blockSize)); + if (version_4 !== 0 && version_4 !== 2) + throw new Error("Invalid inner glow version: ".concat(version_4)); + var size = (0, psdReader_1.readFixedPoint32)(reader); + (0, psdReader_1.readFixedPoint32)(reader); // intensity + var color = (0, psdReader_1.readColor)(reader); + var blendMode = readBlendMode(reader); + var enabled = !!(0, psdReader_1.readUint8)(reader); + var opacity = readFixedPoint8(reader); + if (blockSize >= 43) { + (0, psdReader_1.readUint8)(reader); // inverted + (0, psdReader_1.readColor)(reader); // native color + } + effects.innerGlow = { + size: { units: 'Pixels', value: size }, + color: color, + blendMode: blendMode, + enabled: enabled, + opacity: opacity + }; + break; + } + case 'bevl': { // bevel (see See Effects layer, bevel info) + var blockSize = (0, psdReader_1.readUint32)(reader); + var version_5 = (0, psdReader_1.readUint32)(reader); + if (blockSize !== 58 && blockSize !== 78) + throw new Error("Invalid bevel size: ".concat(blockSize)); + if (version_5 !== 0 && version_5 !== 2) + throw new Error("Invalid bevel version: ".concat(version_5)); + var angle = (0, psdReader_1.readFixedPoint32)(reader); + var strength = (0, psdReader_1.readFixedPoint32)(reader); + var size = (0, psdReader_1.readFixedPoint32)(reader); + var highlightBlendMode = readBlendMode(reader); + var shadowBlendMode = readBlendMode(reader); + var highlightColor = (0, psdReader_1.readColor)(reader); + var shadowColor = (0, psdReader_1.readColor)(reader); + var style = bevelStyles[(0, psdReader_1.readUint8)(reader)] || 'inner bevel'; + var highlightOpacity = readFixedPoint8(reader); + var shadowOpacity = readFixedPoint8(reader); + var enabled = !!(0, psdReader_1.readUint8)(reader); + var useGlobalLight = !!(0, psdReader_1.readUint8)(reader); + var direction = (0, psdReader_1.readUint8)(reader) ? 'down' : 'up'; + if (blockSize >= 78) { + (0, psdReader_1.readColor)(reader); // real highlight color + (0, psdReader_1.readColor)(reader); // real shadow color + } + effects.bevel = { + size: { units: 'Pixels', value: size }, + angle: angle, + strength: strength, + highlightBlendMode: highlightBlendMode, + shadowBlendMode: shadowBlendMode, + highlightColor: highlightColor, + shadowColor: shadowColor, + style: style, + highlightOpacity: highlightOpacity, + shadowOpacity: shadowOpacity, + enabled: enabled, + useGlobalLight: useGlobalLight, + direction: direction, + }; + break; + } + case 'sofi': { // solid fill (Photoshop 7.0) (see See Effects layer, solid fill (added in Photoshop 7.0)) + var size = (0, psdReader_1.readUint32)(reader); + var version_6 = (0, psdReader_1.readUint32)(reader); + if (size !== 34) + throw new Error("Invalid effects solid fill info size: ".concat(size)); + if (version_6 !== 2) + throw new Error("Invalid effects solid fill info version: ".concat(version_6)); + var blendMode = readBlendMode(reader); + var color = (0, psdReader_1.readColor)(reader); + var opacity = readFixedPoint8(reader); + var enabled = !!(0, psdReader_1.readUint8)(reader); + (0, psdReader_1.readColor)(reader); // native color + effects.solidFill = [{ blendMode: blendMode, color: color, opacity: opacity, enabled: enabled }]; + break; + } + default: + throw new Error("Invalid effect type: '".concat(type, "'")); + } + } + return effects; +} +exports.readEffects = readEffects; +function writeShadowInfo(writer, shadow) { + var _a; + (0, psdWriter_1.writeUint32)(writer, 51); + (0, psdWriter_1.writeUint32)(writer, 2); + (0, psdWriter_1.writeFixedPoint32)(writer, shadow.size && shadow.size.value || 0); + (0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity + (0, psdWriter_1.writeFixedPoint32)(writer, shadow.angle || 0); + (0, psdWriter_1.writeFixedPoint32)(writer, shadow.distance && shadow.distance.value || 0); + (0, psdWriter_1.writeColor)(writer, shadow.color); + writeBlendMode(writer, shadow.blendMode); + (0, psdWriter_1.writeUint8)(writer, shadow.enabled ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, shadow.useGlobalLight ? 1 : 0); + writeFixedPoint8(writer, (_a = shadow.opacity) !== null && _a !== void 0 ? _a : 1); + (0, psdWriter_1.writeColor)(writer, shadow.color); // native color +} +function writeEffects(writer, effects) { + var _a, _b, _c, _d, _e, _f; + var dropShadow = (_a = effects.dropShadow) === null || _a === void 0 ? void 0 : _a[0]; + var innerShadow = (_b = effects.innerShadow) === null || _b === void 0 ? void 0 : _b[0]; + var outerGlow = effects.outerGlow; + var innerGlow = effects.innerGlow; + var bevel = effects.bevel; + var solidFill = (_c = effects.solidFill) === null || _c === void 0 ? void 0 : _c[0]; + var count = 1; + if (dropShadow) + count++; + if (innerShadow) + count++; + if (outerGlow) + count++; + if (innerGlow) + count++; + if (bevel) + count++; + if (solidFill) + count++; + (0, psdWriter_1.writeUint16)(writer, 0); + (0, psdWriter_1.writeUint16)(writer, count); + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'cmnS'); + (0, psdWriter_1.writeUint32)(writer, 7); // size + (0, psdWriter_1.writeUint32)(writer, 0); // version + (0, psdWriter_1.writeUint8)(writer, 1); // visible + (0, psdWriter_1.writeZeros)(writer, 2); + if (dropShadow) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'dsdw'); + writeShadowInfo(writer, dropShadow); + } + if (innerShadow) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'isdw'); + writeShadowInfo(writer, innerShadow); + } + if (outerGlow) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'oglw'); + (0, psdWriter_1.writeUint32)(writer, 42); + (0, psdWriter_1.writeUint32)(writer, 2); + (0, psdWriter_1.writeFixedPoint32)(writer, ((_d = outerGlow.size) === null || _d === void 0 ? void 0 : _d.value) || 0); + (0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity + (0, psdWriter_1.writeColor)(writer, outerGlow.color); + writeBlendMode(writer, outerGlow.blendMode); + (0, psdWriter_1.writeUint8)(writer, outerGlow.enabled ? 1 : 0); + writeFixedPoint8(writer, outerGlow.opacity || 0); + (0, psdWriter_1.writeColor)(writer, outerGlow.color); + } + if (innerGlow) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'iglw'); + (0, psdWriter_1.writeUint32)(writer, 43); + (0, psdWriter_1.writeUint32)(writer, 2); + (0, psdWriter_1.writeFixedPoint32)(writer, ((_e = innerGlow.size) === null || _e === void 0 ? void 0 : _e.value) || 0); + (0, psdWriter_1.writeFixedPoint32)(writer, 0); // intensity + (0, psdWriter_1.writeColor)(writer, innerGlow.color); + writeBlendMode(writer, innerGlow.blendMode); + (0, psdWriter_1.writeUint8)(writer, innerGlow.enabled ? 1 : 0); + writeFixedPoint8(writer, innerGlow.opacity || 0); + (0, psdWriter_1.writeUint8)(writer, 0); // inverted + (0, psdWriter_1.writeColor)(writer, innerGlow.color); + } + if (bevel) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'bevl'); + (0, psdWriter_1.writeUint32)(writer, 78); + (0, psdWriter_1.writeUint32)(writer, 2); + (0, psdWriter_1.writeFixedPoint32)(writer, bevel.angle || 0); + (0, psdWriter_1.writeFixedPoint32)(writer, bevel.strength || 0); + (0, psdWriter_1.writeFixedPoint32)(writer, ((_f = bevel.size) === null || _f === void 0 ? void 0 : _f.value) || 0); + writeBlendMode(writer, bevel.highlightBlendMode); + writeBlendMode(writer, bevel.shadowBlendMode); + (0, psdWriter_1.writeColor)(writer, bevel.highlightColor); + (0, psdWriter_1.writeColor)(writer, bevel.shadowColor); + var style = bevelStyles.indexOf(bevel.style); + (0, psdWriter_1.writeUint8)(writer, style <= 0 ? 1 : style); + writeFixedPoint8(writer, bevel.highlightOpacity || 0); + writeFixedPoint8(writer, bevel.shadowOpacity || 0); + (0, psdWriter_1.writeUint8)(writer, bevel.enabled ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, bevel.useGlobalLight ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, bevel.direction === 'down' ? 1 : 0); + (0, psdWriter_1.writeColor)(writer, bevel.highlightColor); + (0, psdWriter_1.writeColor)(writer, bevel.shadowColor); + } + if (solidFill) { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'sofi'); + (0, psdWriter_1.writeUint32)(writer, 34); + (0, psdWriter_1.writeUint32)(writer, 2); + writeBlendMode(writer, solidFill.blendMode); + (0, psdWriter_1.writeColor)(writer, solidFill.color); + writeFixedPoint8(writer, solidFill.opacity || 0); + (0, psdWriter_1.writeUint8)(writer, solidFill.enabled ? 1 : 0); + (0, psdWriter_1.writeColor)(writer, solidFill.color); + } +} +exports.writeEffects = writeEffects; + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVmZmVjdHNIZWxwZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUNBLHFDQUF1RDtBQUN2RCx5Q0FHcUI7QUFDckIseUNBR3FCO0FBRXJCLElBQU0sV0FBVyxHQUFpQjtJQUNqQyxTQUFnQixFQUFFLGFBQWEsRUFBRSxhQUFhLEV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7XG5cdFx0d3JpdGVVaW50OCh3cml0ZXIsIGJldmVsLnVzZUdsb2JhbExpZ2h0ID8gMSA6IDApO1xuXHRcdHdyaXRlVWludDgod3JpdGVyLCBiZXZlbC5kaXJlY3Rpb24gPT09ICdkb3duJyA/IDEgOiAwKTtcblx0XHR3cml0ZUNvbG9yKHdyaXRlciwgYmV2ZWwuaGlnaGxpZ2h0Q29sb3IpO1xuXHRcdHdyaXRlQ29sb3Iod3JpdGVyLCBiZXZlbC5zaGFkb3dDb2xvcik7XG5cdH1cblxuXHRpZiAoc29saWRGaWxsKSB7XG5cdFx0d3JpdGVTaWduYXR1cmUod3JpdGVyLCAnOEJJTScpO1xuXHRcdHdyaXRlU2lnbmF0dXJlKHdyaXRlciwgJ3NvZmknKTtcblx0XHR3cml0ZVVpbnQzMih3cml0ZXIsIDM0KTtcblx0XHR3cml0ZVVpbnQzMih3cml0ZXIsIDIpO1xuXHRcdHdyaXRlQmxlbmRNb2RlKHdyaXRlciwgc29saWRGaWxsLmJsZW5kTW9kZSk7XG5cdFx0d3JpdGVDb2xvcih3cml0ZXIsIHNvbGlkRmlsbC5jb2xvcik7XG5cdFx0d3JpdGVGaXhlZFBvaW50OCh3cml0ZXIsIHNvbGlkRmlsbC5vcGFjaXR5IHx8IDApO1xuXHRcdHdyaXRlVWludDgod3JpdGVyLCBzb2xpZEZpbGwuZW5hYmxlZCA/IDEgOiAwKTtcblx0XHR3cml0ZUNvbG9yKHdyaXRlciwgc29saWRGaWxsLmNvbG9yKTtcblx0fVxufVxuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/effectsHelpers.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/effectsHelpers.js.map deleted file mode 100644 index 9250bcc..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/effectsHelpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"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AAC,KAAK,CAAC,CAAC;QACpC,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC;QACjD,IAAA,sBAAU,EAAC,MAAM,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9C,IAAA,sBAAU,EAAC,MAAM,EAAE,SAAS,CAAC,KAAK,CAAC,CAAC;KACpC;AACF,CAAC;AArGD,oCAqGC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/engineData.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/engineData.d.ts index fd34fe8..6fc156e 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/engineData.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/engineData.d.ts @@ -1,2 +1,2 @@ -export declare function parseEngineData(data: number[] | Uint8Array): any; -export declare function serializeEngineData(data: any, condensed?: boolean): Uint8Array; +export declare function parseEngineData(data: number[] | Uint8Array): any; +export declare function serializeEngineData(data: any, condensed?: boolean): Uint8Array; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/engineData.js b/npm-packages/mac-v2.4.x/ag-psd/dist/engineData.js index 853fa00..89dcfb5 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/engineData.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/engineData.js @@ -1,337 +1,338 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.serializeEngineData = exports.parseEngineData = void 0; -function isWhitespace(char) { - // ' ', '\n', '\r', '\t' - return char === 32 || char === 10 || char === 13 || char === 9; -} -function isNumber(char) { - // 0123456789.- - return (char >= 48 && char <= 57) || char === 46 || char === 45; -} -function parseEngineData(data) { - var index = 0; - function skipWhitespace() { - while (index < data.length && isWhitespace(data[index])) { - index++; - } - } - function getTextByte() { - var byte = data[index]; - index++; - if (byte === 92) { // \ - byte = data[index]; - index++; - } - return byte; - } - function getText() { - var result = ''; - if (data[index] === 41) { // ) - index++; - return result; - } - // Strings start with utf-16 BOM - if (data[index] !== 0xFE || data[index + 1] !== 0xFF) { - throw new Error('Invalid utf-16 BOM'); - } - index += 2; - // ), ( and \ characters are escaped in ascii manner, remove the escapes before interpreting - // the bytes as utf-16 - while (index < data.length && data[index] !== 41) { // ) - var high = getTextByte(); - var low = getTextByte(); - var char = (high << 8) | low; - result += String.fromCharCode(char); - } - index++; - return result; - } - var root = null; - var stack = []; - function pushContainer(value) { - if (!stack.length) { - stack.push(value); - root = value; - } - else { - pushValue(value); - stack.push(value); - } - } - function pushValue(value) { - if (!stack.length) - throw new Error('Invalid data'); - var top = stack[stack.length - 1]; - if (typeof top === 'string') { - stack[stack.length - 2][top] = value; - pop(); - } - else if (Array.isArray(top)) { - top.push(value); - } - else { - throw new Error('Invalid data'); - } - } - function pushProperty(name) { - if (!stack.length) - pushContainer({}); - var top = stack[stack.length - 1]; - if (top && typeof top === 'string') { - if (name === 'nil') { - pushValue(null); - } - else { - pushValue("/".concat(name)); - } - } - else if (top && typeof top === 'object') { - stack.push(name); - } - else { - throw new Error('Invalid data'); - } - } - function pop() { - if (!stack.length) - throw new Error('Invalid data'); - stack.pop(); - } - skipWhitespace(); - while (index < data.length) { - var i = index; - var char = data[i]; - if (char === 60 && data[i + 1] === 60) { // << - index += 2; - pushContainer({}); - } - else if (char === 62 && data[i + 1] === 62) { // >> - index += 2; - pop(); - } - else if (char === 47) { // / - index += 1; - var start = index; - while (index < data.length && !isWhitespace(data[index])) { - index++; - } - var name_1 = ''; - for (var i_1 = start; i_1 < index; i_1++) { - name_1 += String.fromCharCode(data[i_1]); - } - pushProperty(name_1); - } - else if (char === 40) { // ( - index += 1; - pushValue(getText()); - } - else if (char === 91) { // [ - index += 1; - pushContainer([]); - } - else if (char === 93) { // ] - index += 1; - pop(); - } - else if (char === 110 && data[i + 1] === 117 && data[i + 2] === 108 && data[i + 3] === 108) { // null - index += 4; - pushValue(null); - } - else if (char === 116 && data[i + 1] === 114 && data[i + 2] === 117 && data[i + 3] === 101) { // true - index += 4; - pushValue(true); - } - else if (char === 102 && data[i + 1] === 97 && data[i + 2] === 108 && data[i + 3] === 115 && data[i + 4] === 101) { // false - index += 5; - pushValue(false); - } - else if (isNumber(char)) { - var value = ''; - while (index < data.length && isNumber(data[index])) { - value += String.fromCharCode(data[index]); - index++; - } - pushValue(parseFloat(value)); - } - else { - index += 1; - console.log("Invalid token ".concat(String.fromCharCode(char), " at ").concat(index)); - // ` near ${String.fromCharCode.apply(null, data.slice(index - 10, index + 20) as any)}` + - // `data [${Array.from(data.slice(index - 10, index + 20)).join(', ')}]` - } - skipWhitespace(); - } - return root; -} -exports.parseEngineData = parseEngineData; -var floatKeys = [ - 'Axis', 'XY', 'Zone', 'WordSpacing', 'FirstLineIndent', 'GlyphSpacing', 'StartIndent', 'EndIndent', 'SpaceBefore', - 'SpaceAfter', 'LetterSpacing', 'Values', 'GridSize', 'GridLeading', 'PointBase', 'BoxBounds', 'TransformPoint0', 'TransformPoint1', - 'TransformPoint2', 'FontSize', 'Leading', 'HorizontalScale', 'VerticalScale', 'BaselineShift', 'Tsume', - 'OutlineWidth', 'AutoLeading', -]; -var intArrays = ['RunLengthArray']; -// TODO: handle /nil -function serializeEngineData(data, condensed) { - if (condensed === void 0) { condensed = false; } - var buffer = new Uint8Array(1024); - var offset = 0; - var indent = 0; - function write(value) { - if (offset >= buffer.length) { - var newBuffer = new Uint8Array(buffer.length * 2); - newBuffer.set(buffer); - buffer = newBuffer; - } - buffer[offset] = value; - offset++; - } - function writeString(value) { - for (var i = 0; i < value.length; i++) { - write(value.charCodeAt(i)); - } - } - function writeIndent() { - if (condensed) { - writeString(' '); - } - else { - for (var i = 0; i < indent; i++) { - writeString('\t'); - } - } - } - function writeProperty(key, value) { - writeIndent(); - writeString("/".concat(key)); - writeValue(value, key, true); - if (!condensed) - writeString('\n'); - } - function serializeInt(value) { - return value.toString(); - } - function serializeFloat(value) { - return value.toFixed(5) - .replace(/(\d)0+$/g, '$1') - .replace(/^0+\.([1-9])/g, '.$1') - .replace(/^-0+\.0(\d)/g, '-.0$1'); - } - function serializeNumber(value, key) { - var isFloat = (key && floatKeys.indexOf(key) !== -1) || (value | 0) !== value; - return isFloat ? serializeFloat(value) : serializeInt(value); - } - function getKeys(value) { - var keys = Object.keys(value); - if (keys.indexOf('98') !== -1) - keys.unshift.apply(keys, keys.splice(keys.indexOf('99'), 1)); - if (keys.indexOf('99') !== -1) - keys.unshift.apply(keys, keys.splice(keys.indexOf('99'), 1)); - return keys; - } - function writeStringByte(value) { - if (value === 40 || value === 41 || value === 92) { // ( ) \ - write(92); // \ - } - write(value); - } - function writeValue(value, key, inProperty) { - if (inProperty === void 0) { inProperty = false; } - function writePrefix() { - if (inProperty) { - writeString(' '); - } - else { - writeIndent(); - } - } - if (value === null) { - writePrefix(); - writeString(condensed ? '/nil' : 'null'); - } - else if (typeof value === 'number') { - writePrefix(); - writeString(serializeNumber(value, key)); - } - else if (typeof value === 'boolean') { - writePrefix(); - writeString(value ? 'true' : 'false'); - } - else if (typeof value === 'string') { - writePrefix(); - if ((key === '99' || key === '98') && value.charAt(0) === '/') { - writeString(value); - } - else { - writeString('('); - write(0xfe); - write(0xff); - for (var i = 0; i < value.length; i++) { - var code = value.charCodeAt(i); - writeStringByte((code >> 8) & 0xff); - writeStringByte(code & 0xff); - } - writeString(')'); - } - } - else if (Array.isArray(value)) { - writePrefix(); - if (value.every(function (x) { return typeof x === 'number'; })) { - writeString('['); - var intArray = intArrays.indexOf(key) !== -1; - for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { - var x = value_1[_i]; - writeString(' '); - writeString(intArray ? serializeNumber(x) : serializeFloat(x)); - } - writeString(' ]'); - } - else { - writeString('['); - if (!condensed) - writeString('\n'); - for (var _a = 0, value_2 = value; _a < value_2.length; _a++) { - var x = value_2[_a]; - writeValue(x, key); - if (!condensed) - writeString('\n'); - } - writeIndent(); - writeString(']'); - } - } - else if (typeof value === 'object') { - if (inProperty && !condensed) - writeString('\n'); - writeIndent(); - writeString('<<'); - if (!condensed) - writeString('\n'); - indent++; - for (var _b = 0, _c = getKeys(value); _b < _c.length; _b++) { - var key_1 = _c[_b]; - writeProperty(key_1, value[key_1]); - } - indent--; - writeIndent(); - writeString('>>'); - } - return undefined; - } - if (condensed) { - if (typeof data === 'object') { - for (var _i = 0, _a = getKeys(data); _i < _a.length; _i++) { - var key = _a[_i]; - writeProperty(key, data[key]); - } - } - } - else { - writeString('\n\n'); - writeValue(data); - } - return buffer.slice(0, offset); -} -exports.serializeEngineData = serializeEngineData; -//# sourceMappingURL=engineData.js.map \ No newline at end of file +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.serializeEngineData = exports.parseEngineData = void 0; +function isWhitespace(char) { + // ' ', '\n', '\r', '\t' + return char === 32 || char === 10 || char === 13 || char === 9; +} +function isNumber(char) { + // 0123456789.- + return (char >= 48 && char <= 57) || char === 46 || char === 45; +} +function parseEngineData(data) { + var index = 0; + function skipWhitespace() { + while (index < data.length && isWhitespace(data[index])) { + index++; + } + } + function getTextByte() { + var byte = data[index]; + index++; + if (byte === 92) { // \ + byte = data[index]; + index++; + } + return byte; + } + function getText() { + var result = ''; + if (data[index] === 41) { // ) + index++; + return result; + } + // Strings start with utf-16 BOM + if (data[index] !== 0xFE || data[index + 1] !== 0xFF) { + throw new Error('Invalid utf-16 BOM'); + } + index += 2; + // ), ( and \ characters are escaped in ascii manner, remove the escapes before interpreting + // the bytes as utf-16 + while (index < data.length && data[index] !== 41) { // ) + var high = getTextByte(); + var low = getTextByte(); + var char = (high << 8) | low; + result += String.fromCharCode(char); + } + index++; + return result; + } + var root = null; + var stack = []; + function pushContainer(value) { + if (!stack.length) { + stack.push(value); + root = value; + } + else { + pushValue(value); + stack.push(value); + } + } + function pushValue(value) { + if (!stack.length) + throw new Error('Invalid data'); + var top = stack[stack.length - 1]; + if (typeof top === 'string') { + stack[stack.length - 2][top] = value; + pop(); + } + else if (Array.isArray(top)) { + top.push(value); + } + else { + throw new Error('Invalid data'); + } + } + function pushProperty(name) { + if (!stack.length) + pushContainer({}); + var top = stack[stack.length - 1]; + if (top && typeof top === 'string') { + if (name === 'nil') { + pushValue(null); + } + else { + pushValue("/".concat(name)); + } + } + else if (top && typeof top === 'object') { + stack.push(name); + } + else { + throw new Error('Invalid data'); + } + } + function pop() { + if (!stack.length) + throw new Error('Invalid data'); + stack.pop(); + } + skipWhitespace(); + while (index < data.length) { + var i = index; + var char = data[i]; + if (char === 60 && data[i + 1] === 60) { // << + index += 2; + pushContainer({}); + } + else if (char === 62 && data[i + 1] === 62) { // >> + index += 2; + pop(); + } + else if (char === 47) { // / + index += 1; + var start = index; + while (index < data.length && !isWhitespace(data[index])) { + index++; + } + var name_1 = ''; + for (var i_1 = start; i_1 < index; i_1++) { + name_1 += String.fromCharCode(data[i_1]); + } + pushProperty(name_1); + } + else if (char === 40) { // ( + index += 1; + pushValue(getText()); + } + else if (char === 91) { // [ + index += 1; + pushContainer([]); + } + else if (char === 93) { // ] + index += 1; + pop(); + } + else if (char === 110 && data[i + 1] === 117 && data[i + 2] === 108 && data[i + 3] === 108) { // null + index += 4; + pushValue(null); + } + else if (char === 116 && data[i + 1] === 114 && data[i + 2] === 117 && data[i + 3] === 101) { // true + index += 4; + pushValue(true); + } + else if (char === 102 && data[i + 1] === 97 && data[i + 2] === 108 && data[i + 3] === 115 && data[i + 4] === 101) { // false + index += 5; + pushValue(false); + } + else if (isNumber(char)) { + var value = ''; + while (index < data.length && isNumber(data[index])) { + value += String.fromCharCode(data[index]); + index++; + } + pushValue(parseFloat(value)); + } + else { + index += 1; + console.log("Invalid token ".concat(String.fromCharCode(char), " at ").concat(index)); + // ` near ${String.fromCharCode.apply(null, data.slice(index - 10, index + 20) as any)}` + + // `data [${Array.from(data.slice(index - 10, index + 20)).join(', ')}]` + } + skipWhitespace(); + } + return root; +} +exports.parseEngineData = parseEngineData; +var floatKeys = [ + 'Axis', 'XY', 'Zone', 'WordSpacing', 'FirstLineIndent', 'GlyphSpacing', 'StartIndent', 'EndIndent', 'SpaceBefore', + 'SpaceAfter', 'LetterSpacing', 'Values', 'GridSize', 'GridLeading', 'PointBase', 'BoxBounds', 'TransformPoint0', 'TransformPoint1', + 'TransformPoint2', 'FontSize', 'Leading', 'HorizontalScale', 'VerticalScale', 'BaselineShift', 'Tsume', + 'OutlineWidth', 'AutoLeading', +]; +var intArrays = ['RunLengthArray']; +// TODO: handle /nil +function serializeEngineData(data, condensed) { + if (condensed === void 0) { condensed = false; } + var buffer = new Uint8Array(1024); + var offset = 0; + var indent = 0; + function write(value) { + if (offset >= buffer.length) { + var newBuffer = new Uint8Array(buffer.length * 2); + newBuffer.set(buffer); + buffer = newBuffer; + } + buffer[offset] = value; + offset++; + } + function writeString(value) { + for (var i = 0; i < value.length; i++) { + write(value.charCodeAt(i)); + } + } + function writeIndent() { + if (condensed) { + writeString(' '); + } + else { + for (var i = 0; i < indent; i++) { + writeString('\t'); + } + } + } + function writeProperty(key, value) { + writeIndent(); + writeString("/".concat(key)); + writeValue(value, key, true); + if (!condensed) + writeString('\n'); + } + function serializeInt(value) { + return value.toString(); + } + function serializeFloat(value) { + return value.toFixed(5) + .replace(/(\d)0+$/g, '$1') + .replace(/^0+\.([1-9])/g, '.$1') + .replace(/^-0+\.0(\d)/g, '-.0$1'); + } + function serializeNumber(value, key) { + var isFloat = (key && floatKeys.indexOf(key) !== -1) || (value | 0) !== value; + return isFloat ? serializeFloat(value) : serializeInt(value); + } + function getKeys(value) { + var keys = Object.keys(value); + if (keys.indexOf('98') !== -1) + keys.unshift.apply(keys, keys.splice(keys.indexOf('99'), 1)); + if (keys.indexOf('99') !== -1) + keys.unshift.apply(keys, keys.splice(keys.indexOf('99'), 1)); + return keys; + } + function writeStringByte(value) { + if (value === 40 || value === 41 || value === 92) { // ( ) \ + write(92); // \ + } + write(value); + } + function writeValue(value, key, inProperty) { + if (inProperty === void 0) { inProperty = false; } + function writePrefix() { + if (inProperty) { + writeString(' '); + } + else { + writeIndent(); + } + } + if (value === null) { + writePrefix(); + writeString(condensed ? '/nil' : 'null'); + } + else if (typeof value === 'number') { + writePrefix(); + writeString(serializeNumber(value, key)); + } + else if (typeof value === 'boolean') { + writePrefix(); + writeString(value ? 'true' : 'false'); + } + else if (typeof value === 'string') { + writePrefix(); + if ((key === '99' || key === '98') && value.charAt(0) === '/') { + writeString(value); + } + else { + writeString('('); + write(0xfe); + write(0xff); + for (var i = 0; i < value.length; i++) { + var code = value.charCodeAt(i); + writeStringByte((code >> 8) & 0xff); + writeStringByte(code & 0xff); + } + writeString(')'); + } + } + else if (Array.isArray(value)) { + writePrefix(); + if (value.every(function (x) { return typeof x === 'number'; })) { + writeString('['); + var intArray = intArrays.indexOf(key) !== -1; + for (var _i = 0, value_1 = value; _i < value_1.length; _i++) { + var x = value_1[_i]; + writeString(' '); + writeString(intArray ? serializeNumber(x) : serializeFloat(x)); + } + writeString(' ]'); + } + else { + writeString('['); + if (!condensed) + writeString('\n'); + for (var _a = 0, value_2 = value; _a < value_2.length; _a++) { + var x = value_2[_a]; + writeValue(x, key); + if (!condensed) + writeString('\n'); + } + writeIndent(); + writeString(']'); + } + } + else if (typeof value === 'object') { + if (inProperty && !condensed) + writeString('\n'); + writeIndent(); + writeString('<<'); + if (!condensed) + writeString('\n'); + indent++; + for (var _b = 0, _c = getKeys(value); _b < _c.length; _b++) { + var key_1 = _c[_b]; + writeProperty(key_1, value[key_1]); + } + indent--; + writeIndent(); + writeString('>>'); + } + return undefined; + } + if (condensed) { + if (typeof data === 'object') { + for (var _i = 0, _a = getKeys(data); _i < _a.length; _i++) { + var key = _a[_i]; + writeProperty(key, data[key]); + } + } + } + else { + writeString('\n\n'); + writeValue(data); + } + return buffer.slice(0, offset); +} +exports.serializeEngineData = serializeEngineData; + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImVuZ2luZURhdGEudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsU0FBUyxZQUFZLENBQUMsSUFBWTtJQUNqQyx3QkFBd0I7SUFDeEIsT0FBTyxJQUFJLEtBQUssRUFBRSxJQUFJLElBQUksS0FBSyxFQUFFLElBQUksSUFBSSxLQUFLLEVBQUUsSUFBSSxJQUFJLEtBQUssQ0FBQyxDQUFDO0FBQ2hFLENBQUM7QUFFRCxTQUFTLFFBQVEsQ0FBQyxJQUFZO0lBQzdCLGVBQWU7SUFDZixPQUFPLENBQUMsSUFBSSxJQUFJLEVBQUUsSUFBSSxJQUFJLElBQUksRUFBRSxDQUFDLElBQUksSUFBSSxLQUFLLEVBQUUsSUFBSSxJQUFJLEtBQUssRUFBRSxDQUFDO0FBQ2pFLENBQUM7QUFFRCxTQUFnQixlQUFlLENBQUMsSUFBMkI7SUFDMUQsSUFBSSxLQUFLLEdBQUcsQ0FBQyxDQUFDO0lBRWQsU0FBUyxjQUFjO1FBQ3RCLE9BQU8sS0FBSyxHQUFHLElBQUksQ0FBQyxNQUFNLElBQUks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cdFx0d3JpdGVTdHJpbmcoJ1xcblxcbicpO1xyXG5cdFx0d3JpdGVWYWx1ZShkYXRhKTtcclxuXHR9XHJcblxyXG5cdHJldHVybiBidWZmZXIuc2xpY2UoMCwgb2Zmc2V0KTtcclxufVxyXG4iXSwic291cmNlUm9vdCI6IkM6XFxQcm9qZWN0c1xcZ2l0aHViXFxhZy1wc2RcXHNyYyJ9 diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/engineData.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/engineData.js.map deleted file mode 100644 index 273827f..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/engineData.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"engineData.js","sourceRoot":"../src/","sources":["engineData.ts"],"names":[],"mappings":";;;AAAA,SAAS,YAAY,CAAC,IAAY;IACjC,wBAAwB;IACxB,OAAO,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,CAAC,CAAC;AAChE,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY;IAC7B,eAAe;IACf,OAAO,CAAC,IAAI,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,CAAC,IAAI,IAAI,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,CAAC;AACjE,CAAC;AAED,SAAgB,eAAe,CAAC,IAA2B;IAC1D,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,SAAS,cAAc;QACtB,OAAO,KAAK,GAAG,IAAI,CAAC,MAAM,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE;YACxD,KAAK,EAAE,CAAC;SACR;IACF,CAAC;IAED,SAAS,WAAW;QACnB,IAAI,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;QACvB,KAAK,EAAE,CAAC;QAER,IAAI,IAAI,KAAK,EAAE,EAAE,EAAE,IAAI;YACtB,IAAI,GAAG,IAAI,CAAC,KAAK,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,EAAE,KAAK,CAAC,KAAG,CAAC,CAAC,CAAC;aAC/B;YAED,MAAM,EAAE,CAAC;YACT,WAAW,EAAE,CAAC;YACd,WAAW,CAAC,IAAI,CAAC,CAAC;SAClB;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,IAAI,SAAS,EAAE;QACd,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC7B,KAAkB,UAAa,EAAb,KAAA,OAAO,CAAC,IAAI,CAAC,EAAb,cAAa,EAAb,IAAa,EAAE;gBAA5B,IAAM,GAAG,SAAA;gBACb,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;aAC9B;SACD;KACD;SAAM;QACN,WAAW,CAAC,MAAM,CAAC,CAAC;QACpB,UAAU,CAAC,IAAI,CAAC,CAAC;KACjB;IAED,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;AAChC,CAAC;AA3KD,kDA2KC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/helpers.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/helpers.d.ts index 24c84a8..534c338 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/helpers.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/helpers.d.ts @@ -1,93 +1,93 @@ -import { Layer, BlendMode, LayerColor } from './psd'; -export declare const MOCK_HANDLERS = false; -export declare const RAW_IMAGE_DATA = false; -export declare const fromBlendMode: { - [key: string]: string; -}; -export declare const toBlendMode: { - [key: string]: BlendMode; -}; -export declare const layerColors: LayerColor[]; -export declare const largeAdditionalInfoKeys: string[]; -export interface Dict { - [key: string]: string; -} -export declare function revMap(map: Dict): Dict; -export declare function createEnum(prefix: string, def: string, map: Dict): { - decode: (val: string) => T; - encode: (val: T | undefined) => string; -}; -export declare const enum ColorSpace { - RGB = 0, - HSB = 1, - CMYK = 2, - Lab = 7, - Grayscale = 8 -} -export declare const enum LayerMaskFlags { - PositionRelativeToLayer = 1, - LayerMaskDisabled = 2, - InvertLayerMaskWhenBlending = 4, - LayerMaskFromRenderingOtherData = 8, - MaskHasParametersAppliedToIt = 16 -} -export declare const enum MaskParams { - UserMaskDensity = 1, - UserMaskFeather = 2, - VectorMaskDensity = 4, - VectorMaskFeather = 8 -} -export declare const enum ChannelID { - Color0 = 0, - Color1 = 1, - Color2 = 2, - Color3 = 3, - Transparency = -1, - UserMask = -2, - RealUserMask = -3 -} -export declare const enum Compression { - RawData = 0, - RleCompressed = 1, - ZipWithoutPrediction = 2, - ZipWithPrediction = 3 -} -export interface ChannelData { - channelId: ChannelID; - compression: Compression; - buffer: Uint8Array | undefined; - length: number; -} -export interface Bounds { - top: number; - left: number; - right: number; - bottom: number; -} -export interface LayerChannelData { - layer: Layer; - channels: ChannelData[]; - top: number; - left: number; - right: number; - bottom: number; - mask?: Bounds; -} -export type PixelArray = Uint8ClampedArray | Uint8Array; -export interface PixelData { - data: PixelArray; - width: number; - height: number; -} -export declare function offsetForChannel(channelId: ChannelID, cmyk: boolean): number; -export declare function clamp(value: number, min: number, max: number): number; -export declare function hasAlpha(data: PixelData): boolean; -export declare function resetImageData({ data }: PixelData): void; -export declare function decodeBitmap(input: PixelArray, output: PixelArray, width: number, height: number): void; -export declare function writeDataRaw(data: PixelData, offset: number, width: number, height: number): Uint8Array | undefined; -export declare function writeDataRLE(buffer: Uint8Array, { data, width, height }: PixelData, offsets: number[], large: boolean): Uint8Array | undefined; -export declare function writeDataZipWithoutPrediction({ data, width, height }: PixelData, offsets: number[]): Uint8Array; -export declare let createCanvas: (width: number, height: number) => HTMLCanvasElement; -export declare let createCanvasFromData: (data: Uint8Array) => HTMLCanvasElement; -export declare let createImageData: (width: number, height: number) => ImageData; -export declare function initializeCanvas(createCanvasMethod: (width: number, height: number) => HTMLCanvasElement, createCanvasFromDataMethod?: (data: Uint8Array) => HTMLCanvasElement, createImageDataMethod?: (width: number, height: number) => ImageData): void; +import { Layer, BlendMode, LayerColor } from './psd'; +export declare const MOCK_HANDLERS = false; +export declare const RAW_IMAGE_DATA = false; +export declare const fromBlendMode: { + [key: string]: string; +}; +export declare const toBlendMode: { + [key: string]: BlendMode; +}; +export declare const layerColors: LayerColor[]; +export declare const largeAdditionalInfoKeys: string[]; +export interface Dict { + [key: string]: string; +} +export declare function revMap(map: Dict): Dict; +export declare function createEnum(prefix: string, def: string, map: Dict): { + decode: (val: string) => T; + encode: (val: T | undefined) => string; +}; +export declare const enum ColorSpace { + RGB = 0, + HSB = 1, + CMYK = 2, + Lab = 7, + Grayscale = 8 +} +export declare const enum LayerMaskFlags { + PositionRelativeToLayer = 1, + LayerMaskDisabled = 2, + InvertLayerMaskWhenBlending = 4, + LayerMaskFromRenderingOtherData = 8, + MaskHasParametersAppliedToIt = 16 +} +export declare const enum MaskParams { + UserMaskDensity = 1, + UserMaskFeather = 2, + VectorMaskDensity = 4, + VectorMaskFeather = 8 +} +export declare const enum ChannelID { + Color0 = 0, + Color1 = 1, + Color2 = 2, + Color3 = 3, + Transparency = -1, + UserMask = -2, + RealUserMask = -3 +} +export declare const enum Compression { + RawData = 0, + RleCompressed = 1, + ZipWithoutPrediction = 2, + ZipWithPrediction = 3 +} +export interface ChannelData { + channelId: ChannelID; + compression: Compression; + buffer: Uint8Array | undefined; + length: number; +} +export interface Bounds { + top: number; + left: number; + right: number; + bottom: number; +} +export interface LayerChannelData { + layer: Layer; + channels: ChannelData[]; + top: number; + left: number; + right: number; + bottom: number; + mask?: Bounds; +} +export declare type PixelArray = Uint8ClampedArray | Uint8Array; +export interface PixelData { + data: PixelArray; + width: number; + height: number; +} +export declare function offsetForChannel(channelId: ChannelID, cmyk: boolean): number; +export declare function clamp(value: number, min: number, max: number): number; +export declare function hasAlpha(data: PixelData): boolean; +export declare function resetImageData({ data }: PixelData): void; +export declare function decodeBitmap(input: PixelArray, output: PixelArray, width: number, height: number): void; +export declare function writeDataRaw(data: PixelData, offset: number, width: number, height: number): Uint8Array | undefined; +export declare function writeDataRLE(buffer: Uint8Array, { data, width, height }: PixelData, offsets: number[], large: boolean): Uint8Array | undefined; +export declare function writeDataZipWithoutPrediction({ data, width, height }: PixelData, offsets: number[]): Uint8Array; +export declare let createCanvas: (width: number, height: number) => HTMLCanvasElement; +export declare let createCanvasFromData: (data: Uint8Array) => HTMLCanvasElement; +export declare let createImageData: (width: number, height: number) => ImageData; +export declare function initializeCanvas(createCanvasMethod: (width: number, height: number) => HTMLCanvasElement, createCanvasFromDataMethod?: (data: Uint8Array) => HTMLCanvasElement, createImageDataMethod?: (width: number, height: number) => ImageData): void; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/helpers.js b/npm-packages/mac-v2.4.x/ag-psd/dist/helpers.js index ab8a3bf..e6689d1 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/helpers.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/helpers.js @@ -1,332 +1,333 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.initializeCanvas = exports.createImageData = exports.createCanvasFromData = exports.createCanvas = exports.writeDataZipWithoutPrediction = exports.writeDataRLE = exports.writeDataRaw = exports.decodeBitmap = exports.resetImageData = exports.hasAlpha = exports.clamp = exports.offsetForChannel = exports.Compression = exports.ChannelID = exports.MaskParams = exports.LayerMaskFlags = exports.ColorSpace = exports.createEnum = exports.revMap = exports.largeAdditionalInfoKeys = exports.layerColors = exports.toBlendMode = exports.fromBlendMode = exports.RAW_IMAGE_DATA = exports.MOCK_HANDLERS = void 0; -var base64_js_1 = require("base64-js"); -var pako_1 = require("pako"); -exports.MOCK_HANDLERS = false; -exports.RAW_IMAGE_DATA = false; -exports.fromBlendMode = {}; -exports.toBlendMode = { - 'pass': 'pass through', - 'norm': 'normal', - 'diss': 'dissolve', - 'dark': 'darken', - 'mul ': 'multiply', - 'idiv': 'color burn', - 'lbrn': 'linear burn', - 'dkCl': 'darker color', - 'lite': 'lighten', - 'scrn': 'screen', - 'div ': 'color dodge', - 'lddg': 'linear dodge', - 'lgCl': 'lighter color', - 'over': 'overlay', - 'sLit': 'soft light', - 'hLit': 'hard light', - 'vLit': 'vivid light', - 'lLit': 'linear light', - 'pLit': 'pin light', - 'hMix': 'hard mix', - 'diff': 'difference', - 'smud': 'exclusion', - 'fsub': 'subtract', - 'fdiv': 'divide', - 'hue ': 'hue', - 'sat ': 'saturation', - 'colr': 'color', - 'lum ': 'luminosity', -}; -Object.keys(exports.toBlendMode).forEach(function (key) { return exports.fromBlendMode[exports.toBlendMode[key]] = key; }); -exports.layerColors = [ - 'none', 'red', 'orange', 'yellow', 'green', 'blue', 'violet', 'gray' -]; -exports.largeAdditionalInfoKeys = [ - // from documentation - 'LMsk', 'Lr16', 'Lr32', 'Layr', 'Mt16', 'Mt32', 'Mtrn', 'Alph', 'FMsk', 'lnk2', 'FEid', 'FXid', 'PxSD', - // from guessing - 'cinf', -]; -function revMap(map) { - var result = {}; - Object.keys(map).forEach(function (key) { return result[map[key]] = key; }); - return result; -} -exports.revMap = revMap; -function createEnum(prefix, def, map) { - var rev = revMap(map); - var decode = function (val) { - var value = val.split('.')[1]; - if (value && !rev[value]) - throw new Error("Unrecognized value for enum: '".concat(val, "'")); - return rev[value] || def; - }; - var encode = function (val) { - if (val && !map[val]) - throw new Error("Invalid value for enum: '".concat(val, "'")); - return "".concat(prefix, ".").concat(map[val] || map[def]); - }; - return { decode: decode, encode: encode }; -} -exports.createEnum = createEnum; -var ColorSpace; -(function (ColorSpace) { - ColorSpace[ColorSpace["RGB"] = 0] = "RGB"; - ColorSpace[ColorSpace["HSB"] = 1] = "HSB"; - ColorSpace[ColorSpace["CMYK"] = 2] = "CMYK"; - ColorSpace[ColorSpace["Lab"] = 7] = "Lab"; - ColorSpace[ColorSpace["Grayscale"] = 8] = "Grayscale"; -})(ColorSpace = exports.ColorSpace || (exports.ColorSpace = {})); -var LayerMaskFlags; -(function (LayerMaskFlags) { - LayerMaskFlags[LayerMaskFlags["PositionRelativeToLayer"] = 1] = "PositionRelativeToLayer"; - LayerMaskFlags[LayerMaskFlags["LayerMaskDisabled"] = 2] = "LayerMaskDisabled"; - LayerMaskFlags[LayerMaskFlags["InvertLayerMaskWhenBlending"] = 4] = "InvertLayerMaskWhenBlending"; - LayerMaskFlags[LayerMaskFlags["LayerMaskFromRenderingOtherData"] = 8] = "LayerMaskFromRenderingOtherData"; - LayerMaskFlags[LayerMaskFlags["MaskHasParametersAppliedToIt"] = 16] = "MaskHasParametersAppliedToIt"; -})(LayerMaskFlags = exports.LayerMaskFlags || (exports.LayerMaskFlags = {})); -var MaskParams; -(function (MaskParams) { - MaskParams[MaskParams["UserMaskDensity"] = 1] = "UserMaskDensity"; - MaskParams[MaskParams["UserMaskFeather"] = 2] = "UserMaskFeather"; - MaskParams[MaskParams["VectorMaskDensity"] = 4] = "VectorMaskDensity"; - MaskParams[MaskParams["VectorMaskFeather"] = 8] = "VectorMaskFeather"; -})(MaskParams = exports.MaskParams || (exports.MaskParams = {})); -var ChannelID; -(function (ChannelID) { - ChannelID[ChannelID["Color0"] = 0] = "Color0"; - ChannelID[ChannelID["Color1"] = 1] = "Color1"; - ChannelID[ChannelID["Color2"] = 2] = "Color2"; - ChannelID[ChannelID["Color3"] = 3] = "Color3"; - ChannelID[ChannelID["Transparency"] = -1] = "Transparency"; - ChannelID[ChannelID["UserMask"] = -2] = "UserMask"; - ChannelID[ChannelID["RealUserMask"] = -3] = "RealUserMask"; -})(ChannelID = exports.ChannelID || (exports.ChannelID = {})); -var Compression; -(function (Compression) { - Compression[Compression["RawData"] = 0] = "RawData"; - Compression[Compression["RleCompressed"] = 1] = "RleCompressed"; - Compression[Compression["ZipWithoutPrediction"] = 2] = "ZipWithoutPrediction"; - Compression[Compression["ZipWithPrediction"] = 3] = "ZipWithPrediction"; -})(Compression = exports.Compression || (exports.Compression = {})); -function offsetForChannel(channelId, cmyk) { - switch (channelId) { - case 0 /* ChannelID.Color0 */: return 0; - case 1 /* ChannelID.Color1 */: return 1; - case 2 /* ChannelID.Color2 */: return 2; - case 3 /* ChannelID.Color3 */: return cmyk ? 3 : channelId + 1; - case -1 /* ChannelID.Transparency */: return cmyk ? 4 : 3; - default: return channelId + 1; - } -} -exports.offsetForChannel = offsetForChannel; -function clamp(value, min, max) { - return value < min ? min : (value > max ? max : value); -} -exports.clamp = clamp; -function hasAlpha(data) { - var size = data.width * data.height * 4; - for (var i = 3; i < size; i += 4) { - if (data.data[i] !== 255) { - return true; - } - } - return false; -} -exports.hasAlpha = hasAlpha; -function resetImageData(_a) { - var data = _a.data; - var buffer = new Uint32Array(data.buffer); - var size = buffer.length | 0; - for (var p = 0; p < size; p = (p + 1) | 0) { - buffer[p] = 0xff000000; - } -} -exports.resetImageData = resetImageData; -function decodeBitmap(input, output, width, height) { - for (var y = 0, p = 0, o = 0; y < height; y++) { - for (var x = 0; x < width;) { - var b = input[o++]; - for (var i = 0; i < 8 && x < width; i++, x++) { - var v = b & 0x80 ? 0 : 255; - b = b << 1; - output[p++] = v; - output[p++] = v; - output[p++] = v; - output[p++] = 255; - } - } - } -} -exports.decodeBitmap = decodeBitmap; -function writeDataRaw(data, offset, width, height) { - if (!width || !height) - return undefined; - var array = new Uint8Array(width * height); - for (var i = 0; i < array.length; i++) { - array[i] = data.data[i * 4 + offset]; - } - return array; -} -exports.writeDataRaw = writeDataRaw; -function writeDataRLE(buffer, _a, offsets, large) { - var data = _a.data, width = _a.width, height = _a.height; - if (!width || !height) - return undefined; - var stride = (4 * width) | 0; - var ol = 0; - var o = (offsets.length * (large ? 4 : 2) * height) | 0; - for (var _i = 0, offsets_1 = offsets; _i < offsets_1.length; _i++) { - var offset = offsets_1[_i]; - for (var y = 0, p = offset | 0; y < height; y++) { - var strideStart = (y * stride) | 0; - var strideEnd = (strideStart + stride) | 0; - var lastIndex = (strideEnd + offset - 4) | 0; - var lastIndex2 = (lastIndex - 4) | 0; - var startOffset = o; - for (p = (strideStart + offset) | 0; p < strideEnd; p = (p + 4) | 0) { - if (p < lastIndex2) { - var value1 = data[p]; - p = (p + 4) | 0; - var value2 = data[p]; - p = (p + 4) | 0; - var value3 = data[p]; - if (value1 === value2 && value1 === value3) { - var count = 3; - while (count < 128 && p < lastIndex && data[(p + 4) | 0] === value1) { - count = (count + 1) | 0; - p = (p + 4) | 0; - } - buffer[o++] = 1 - count; - buffer[o++] = value1; - } - else { - var countIndex = o; - var writeLast = true; - var count = 1; - buffer[o++] = 0; - buffer[o++] = value1; - while (p < lastIndex && count < 128) { - p = (p + 4) | 0; - value1 = value2; - value2 = value3; - value3 = data[p]; - if (value1 === value2 && value1 === value3) { - p = (p - 12) | 0; - writeLast = false; - break; - } - else { - count++; - buffer[o++] = value1; - } - } - if (writeLast) { - if (count < 127) { - buffer[o++] = value2; - buffer[o++] = value3; - count += 2; - } - else if (count < 128) { - buffer[o++] = value2; - count++; - p = (p - 4) | 0; - } - else { - p = (p - 8) | 0; - } - } - buffer[countIndex] = count - 1; - } - } - else if (p === lastIndex) { - buffer[o++] = 0; - buffer[o++] = data[p]; - } - else { // p === lastIndex2 - buffer[o++] = 1; - buffer[o++] = data[p]; - p = (p + 4) | 0; - buffer[o++] = data[p]; - } - } - var length_1 = o - startOffset; - if (large) { - buffer[ol++] = (length_1 >> 24) & 0xff; - buffer[ol++] = (length_1 >> 16) & 0xff; - } - buffer[ol++] = (length_1 >> 8) & 0xff; - buffer[ol++] = length_1 & 0xff; - } - } - return buffer.slice(0, o); -} -exports.writeDataRLE = writeDataRLE; -function writeDataZipWithoutPrediction(_a, offsets) { - var data = _a.data, width = _a.width, height = _a.height; - var size = width * height; - var channel = new Uint8Array(size); - var buffers = []; - var totalLength = 0; - for (var _i = 0, offsets_2 = offsets; _i < offsets_2.length; _i++) { - var offset = offsets_2[_i]; - for (var i = 0, o = offset; i < size; i++, o += 4) { - channel[i] = data[o]; - } - var buffer = (0, pako_1.deflate)(channel); - buffers.push(buffer); - totalLength += buffer.byteLength; - } - if (buffers.length > 0) { - var buffer = new Uint8Array(totalLength); - var offset = 0; - for (var _b = 0, buffers_1 = buffers; _b < buffers_1.length; _b++) { - var b = buffers_1[_b]; - buffer.set(b, offset); - offset += b.byteLength; - } - return buffer; - } - else { - return buffers[0]; - } -} -exports.writeDataZipWithoutPrediction = writeDataZipWithoutPrediction; -var createCanvas = function () { - throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvas method'); -}; -exports.createCanvas = createCanvas; -var createCanvasFromData = function () { - throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvasFromData method'); -}; -exports.createCanvasFromData = createCanvasFromData; -var tempCanvas = undefined; -var createImageData = function (width, height) { - if (!tempCanvas) - tempCanvas = (0, exports.createCanvas)(1, 1); - return tempCanvas.getContext('2d').createImageData(width, height); -}; -exports.createImageData = createImageData; -if (typeof document !== 'undefined') { - exports.createCanvas = function (width, height) { - var canvas = document.createElement('canvas'); - canvas.width = width; - canvas.height = height; - return canvas; - }; - exports.createCanvasFromData = function (data) { - var image = new Image(); - image.src = 'data:image/jpeg;base64,' + (0, base64_js_1.fromByteArray)(data); - var canvas = document.createElement('canvas'); - canvas.width = image.width; - canvas.height = image.height; - canvas.getContext('2d').drawImage(image, 0, 0); - return canvas; - }; -} -function initializeCanvas(createCanvasMethod, createCanvasFromDataMethod, createImageDataMethod) { - exports.createCanvas = createCanvasMethod; - exports.createCanvasFromData = createCanvasFromDataMethod || exports.createCanvasFromData; - exports.createImageData = createImageDataMethod || exports.createImageData; -} -exports.initializeCanvas = initializeCanvas; -//# sourceMappingURL=helpers.js.map \ No newline at end of file +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initializeCanvas = exports.createImageData = exports.createCanvasFromData = exports.createCanvas = exports.writeDataZipWithoutPrediction = exports.writeDataRLE = exports.writeDataRaw = exports.decodeBitmap = exports.resetImageData = exports.hasAlpha = exports.clamp = exports.offsetForChannel = exports.Compression = exports.ChannelID = exports.MaskParams = exports.LayerMaskFlags = exports.ColorSpace = exports.createEnum = exports.revMap = exports.largeAdditionalInfoKeys = exports.layerColors = exports.toBlendMode = exports.fromBlendMode = exports.RAW_IMAGE_DATA = exports.MOCK_HANDLERS = void 0; +var base64_js_1 = require("base64-js"); +var pako_1 = require("pako"); +exports.MOCK_HANDLERS = false; +exports.RAW_IMAGE_DATA = false; +exports.fromBlendMode = {}; +exports.toBlendMode = { + 'pass': 'pass through', + 'norm': 'normal', + 'diss': 'dissolve', + 'dark': 'darken', + 'mul ': 'multiply', + 'idiv': 'color burn', + 'lbrn': 'linear burn', + 'dkCl': 'darker color', + 'lite': 'lighten', + 'scrn': 'screen', + 'div ': 'color dodge', + 'lddg': 'linear dodge', + 'lgCl': 'lighter color', + 'over': 'overlay', + 'sLit': 'soft light', + 'hLit': 'hard light', + 'vLit': 'vivid light', + 'lLit': 'linear light', + 'pLit': 'pin light', + 'hMix': 'hard mix', + 'diff': 'difference', + 'smud': 'exclusion', + 'fsub': 'subtract', + 'fdiv': 'divide', + 'hue ': 'hue', + 'sat ': 'saturation', + 'colr': 'color', + 'lum ': 'luminosity', +}; +Object.keys(exports.toBlendMode).forEach(function (key) { return exports.fromBlendMode[exports.toBlendMode[key]] = key; }); +exports.layerColors = [ + 'none', 'red', 'orange', 'yellow', 'green', 'blue', 'violet', 'gray' +]; +exports.largeAdditionalInfoKeys = [ + // from documentation + 'LMsk', 'Lr16', 'Lr32', 'Layr', 'Mt16', 'Mt32', 'Mtrn', 'Alph', 'FMsk', 'lnk2', 'FEid', 'FXid', 'PxSD', + // from guessing + 'cinf', +]; +function revMap(map) { + var result = {}; + Object.keys(map).forEach(function (key) { return result[map[key]] = key; }); + return result; +} +exports.revMap = revMap; +function createEnum(prefix, def, map) { + var rev = revMap(map); + var decode = function (val) { + var value = val.split('.')[1]; + if (value && !rev[value]) + throw new Error("Unrecognized value for enum: '".concat(val, "'")); + return rev[value] || def; + }; + var encode = function (val) { + if (val && !map[val]) + throw new Error("Invalid value for enum: '".concat(val, "'")); + return "".concat(prefix, ".").concat(map[val] || map[def]); + }; + return { decode: decode, encode: encode }; +} +exports.createEnum = createEnum; +var ColorSpace; +(function (ColorSpace) { + ColorSpace[ColorSpace["RGB"] = 0] = "RGB"; + ColorSpace[ColorSpace["HSB"] = 1] = "HSB"; + ColorSpace[ColorSpace["CMYK"] = 2] = "CMYK"; + ColorSpace[ColorSpace["Lab"] = 7] = "Lab"; + ColorSpace[ColorSpace["Grayscale"] = 8] = "Grayscale"; +})(ColorSpace = exports.ColorSpace || (exports.ColorSpace = {})); +var LayerMaskFlags; +(function (LayerMaskFlags) { + LayerMaskFlags[LayerMaskFlags["PositionRelativeToLayer"] = 1] = "PositionRelativeToLayer"; + LayerMaskFlags[LayerMaskFlags["LayerMaskDisabled"] = 2] = "LayerMaskDisabled"; + LayerMaskFlags[LayerMaskFlags["InvertLayerMaskWhenBlending"] = 4] = "InvertLayerMaskWhenBlending"; + LayerMaskFlags[LayerMaskFlags["LayerMaskFromRenderingOtherData"] = 8] = "LayerMaskFromRenderingOtherData"; + LayerMaskFlags[LayerMaskFlags["MaskHasParametersAppliedToIt"] = 16] = "MaskHasParametersAppliedToIt"; +})(LayerMaskFlags = exports.LayerMaskFlags || (exports.LayerMaskFlags = {})); +var MaskParams; +(function (MaskParams) { + MaskParams[MaskParams["UserMaskDensity"] = 1] = "UserMaskDensity"; + MaskParams[MaskParams["UserMaskFeather"] = 2] = "UserMaskFeather"; + MaskParams[MaskParams["VectorMaskDensity"] = 4] = "VectorMaskDensity"; + MaskParams[MaskParams["VectorMaskFeather"] = 8] = "VectorMaskFeather"; +})(MaskParams = exports.MaskParams || (exports.MaskParams = {})); +var ChannelID; +(function (ChannelID) { + ChannelID[ChannelID["Color0"] = 0] = "Color0"; + ChannelID[ChannelID["Color1"] = 1] = "Color1"; + ChannelID[ChannelID["Color2"] = 2] = "Color2"; + ChannelID[ChannelID["Color3"] = 3] = "Color3"; + ChannelID[ChannelID["Transparency"] = -1] = "Transparency"; + ChannelID[ChannelID["UserMask"] = -2] = "UserMask"; + ChannelID[ChannelID["RealUserMask"] = -3] = "RealUserMask"; +})(ChannelID = exports.ChannelID || (exports.ChannelID = {})); +var Compression; +(function (Compression) { + Compression[Compression["RawData"] = 0] = "RawData"; + Compression[Compression["RleCompressed"] = 1] = "RleCompressed"; + Compression[Compression["ZipWithoutPrediction"] = 2] = "ZipWithoutPrediction"; + Compression[Compression["ZipWithPrediction"] = 3] = "ZipWithPrediction"; +})(Compression = exports.Compression || (exports.Compression = {})); +function offsetForChannel(channelId, cmyk) { + switch (channelId) { + case 0 /* ChannelID.Color0 */: return 0; + case 1 /* ChannelID.Color1 */: return 1; + case 2 /* ChannelID.Color2 */: return 2; + case 3 /* ChannelID.Color3 */: return cmyk ? 3 : channelId + 1; + case -1 /* ChannelID.Transparency */: return cmyk ? 4 : 3; + default: return channelId + 1; + } +} +exports.offsetForChannel = offsetForChannel; +function clamp(value, min, max) { + return value < min ? min : (value > max ? max : value); +} +exports.clamp = clamp; +function hasAlpha(data) { + var size = data.width * data.height * 4; + for (var i = 3; i < size; i += 4) { + if (data.data[i] !== 255) { + return true; + } + } + return false; +} +exports.hasAlpha = hasAlpha; +function resetImageData(_a) { + var data = _a.data; + var buffer = new Uint32Array(data.buffer); + var size = buffer.length | 0; + for (var p = 0; p < size; p = (p + 1) | 0) { + buffer[p] = 0xff000000; + } +} +exports.resetImageData = resetImageData; +function decodeBitmap(input, output, width, height) { + for (var y = 0, p = 0, o = 0; y < height; y++) { + for (var x = 0; x < width;) { + var b = input[o++]; + for (var i = 0; i < 8 && x < width; i++, x++) { + var v = b & 0x80 ? 0 : 255; + b = b << 1; + output[p++] = v; + output[p++] = v; + output[p++] = v; + output[p++] = 255; + } + } + } +} +exports.decodeBitmap = decodeBitmap; +function writeDataRaw(data, offset, width, height) { + if (!width || !height) + return undefined; + var array = new Uint8Array(width * height); + for (var i = 0; i < array.length; i++) { + array[i] = data.data[i * 4 + offset]; + } + return array; +} +exports.writeDataRaw = writeDataRaw; +function writeDataRLE(buffer, _a, offsets, large) { + var data = _a.data, width = _a.width, height = _a.height; + if (!width || !height) + return undefined; + var stride = (4 * width) | 0; + var ol = 0; + var o = (offsets.length * (large ? 4 : 2) * height) | 0; + for (var _i = 0, offsets_1 = offsets; _i < offsets_1.length; _i++) { + var offset = offsets_1[_i]; + for (var y = 0, p = offset | 0; y < height; y++) { + var strideStart = (y * stride) | 0; + var strideEnd = (strideStart + stride) | 0; + var lastIndex = (strideEnd + offset - 4) | 0; + var lastIndex2 = (lastIndex - 4) | 0; + var startOffset = o; + for (p = (strideStart + offset) | 0; p < strideEnd; p = (p + 4) | 0) { + if (p < lastIndex2) { + var value1 = data[p]; + p = (p + 4) | 0; + var value2 = data[p]; + p = (p + 4) | 0; + var value3 = data[p]; + if (value1 === value2 && value1 === value3) { + var count = 3; + while (count < 128 && p < lastIndex && data[(p + 4) | 0] === value1) { + count = (count + 1) | 0; + p = (p + 4) | 0; + } + buffer[o++] = 1 - count; + buffer[o++] = value1; + } + else { + var countIndex = o; + var writeLast = true; + var count = 1; + buffer[o++] = 0; + buffer[o++] = value1; + while (p < lastIndex && count < 128) { + p = (p + 4) | 0; + value1 = value2; + value2 = value3; + value3 = data[p]; + if (value1 === value2 && value1 === value3) { + p = (p - 12) | 0; + writeLast = false; + break; + } + else { + count++; + buffer[o++] = value1; + } + } + if (writeLast) { + if (count < 127) { + buffer[o++] = value2; + buffer[o++] = value3; + count += 2; + } + else if (count < 128) { + buffer[o++] = value2; + count++; + p = (p - 4) | 0; + } + else { + p = (p - 8) | 0; + } + } + buffer[countIndex] = count - 1; + } + } + else if (p === lastIndex) { + buffer[o++] = 0; + buffer[o++] = data[p]; + } + else { // p === lastIndex2 + buffer[o++] = 1; + buffer[o++] = data[p]; + p = (p + 4) | 0; + buffer[o++] = data[p]; + } + } + var length_1 = o - startOffset; + if (large) { + buffer[ol++] = (length_1 >> 24) & 0xff; + buffer[ol++] = (length_1 >> 16) & 0xff; + } + buffer[ol++] = (length_1 >> 8) & 0xff; + buffer[ol++] = length_1 & 0xff; + } + } + return buffer.slice(0, o); +} +exports.writeDataRLE = writeDataRLE; +function writeDataZipWithoutPrediction(_a, offsets) { + var data = _a.data, width = _a.width, height = _a.height; + var size = width * height; + var channel = new Uint8Array(size); + var buffers = []; + var totalLength = 0; + for (var _i = 0, offsets_2 = offsets; _i < offsets_2.length; _i++) { + var offset = offsets_2[_i]; + for (var i = 0, o = offset; i < size; i++, o += 4) { + channel[i] = data[o]; + } + var buffer = (0, pako_1.deflate)(channel); + buffers.push(buffer); + totalLength += buffer.byteLength; + } + if (buffers.length > 0) { + var buffer = new Uint8Array(totalLength); + var offset = 0; + for (var _b = 0, buffers_1 = buffers; _b < buffers_1.length; _b++) { + var b = buffers_1[_b]; + buffer.set(b, offset); + offset += b.byteLength; + } + return buffer; + } + else { + return buffers[0]; + } +} +exports.writeDataZipWithoutPrediction = writeDataZipWithoutPrediction; +var createCanvas = function () { + throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvas method'); +}; +exports.createCanvas = createCanvas; +var createCanvasFromData = function () { + throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvasFromData method'); +}; +exports.createCanvasFromData = createCanvasFromData; +var tempCanvas = undefined; +var createImageData = function (width, height) { + if (!tempCanvas) + tempCanvas = (0, exports.createCanvas)(1, 1); + return tempCanvas.getContext('2d').createImageData(width, height); +}; +exports.createImageData = createImageData; +if (typeof document !== 'undefined') { + exports.createCanvas = function (width, height) { + var canvas = document.createElement('canvas'); + canvas.width = width; + canvas.height = height; + return canvas; + }; + exports.createCanvasFromData = function (data) { + var image = new Image(); + image.src = 'data:image/jpeg;base64,' + (0, base64_js_1.fromByteArray)(data); + var canvas = document.createElement('canvas'); + canvas.width = image.width; + canvas.height = image.height; + canvas.getContext('2d').drawImage(image, 0, 0); + return canvas; + }; +} +function initializeCanvas(createCanvasMethod, createCanvasFromDataMethod, createImageDataMethod) { + exports.createCanvas = createCanvasMethod; + exports.createCanvasFromData = createCanvasFromDataMethod || exports.createCanvasFromData; + exports.createImageData = createImageDataMethod || exports.createImageData; +} +exports.initialize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UHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/helpers.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/helpers.js.map deleted file mode 100644 index 26a1c78..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/helpers.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"helpers.js","sourceRoot":"../src/","sources":["helpers.ts"],"names":[],"mappings":";;;AAAA,uCAA0C;AAC1C,6BAA+B;AAGlB,QAAA,aAAa,GAAG,KAAK,CAAC;AACtB,QAAA,cAAc,GAAG,KAAK,CAAC;AAEvB,QAAA,aAAa,GAA8B,EAAE,CAAC;AAC9C,QAAA,WAAW,GAAiC;IACxD,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,eAAe;IACvB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,aAAa;IACrB,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,WAAW;IACnB,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,YAAY;IACpB,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,YAAY;CACpB,CAAC;AAEF,MAAM,CAAC,IAAI,CAAC,mBAAW,CAAC,CAAC,OAAO,CAAC,UAAA,GAAG,IAAI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AC5D,CAAC;AARD,4CAQC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/imageResources.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/imageResources.d.ts index a8f7108..46ae21a 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/imageResources.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/imageResources.d.ts @@ -1,13 +1,13 @@ -import { ImageResources, ReadOptions } from './psd'; -import { PsdReader } from './psdReader'; -import { PsdWriter } from './psdWriter'; -export interface ResourceHandler { - key: number; - has: (target: ImageResources) => boolean | number; - read: (reader: PsdReader, target: ImageResources, left: () => number, options: ReadOptions) => void; - write: (writer: PsdWriter, target: ImageResources, index: number) => void; -} -export declare const resourceHandlers: ResourceHandler[]; -export declare const resourceHandlersMap: { - [key: number]: ResourceHandler; -}; +import { ImageResources, ReadOptions } from './psd'; +import { PsdReader } from './psdReader'; +import { PsdWriter } from './psdWriter'; +export interface ResourceHandler { + key: number; + has: (target: ImageResources) => boolean; + read: (reader: PsdReader, target: ImageResources, left: () => number, options: ReadOptions) => void; + write: (writer: PsdWriter, target: ImageResources) => void; +} +export declare const resourceHandlers: ResourceHandler[]; +export declare const resourceHandlersMap: { + [key: number]: ResourceHandler; +}; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/imageResources.js b/npm-packages/mac-v2.4.x/ag-psd/dist/imageResources.js index b6a5768..6e60cfa 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/imageResources.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/imageResources.js @@ -1,1007 +1,788 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.resourceHandlersMap = exports.resourceHandlers = void 0; -var base64_js_1 = require("base64-js"); -var psdReader_1 = require("./psdReader"); -var psdWriter_1 = require("./psdWriter"); -var helpers_1 = require("./helpers"); -var utf8_1 = require("./utf8"); -var descriptor_1 = require("./descriptor"); -exports.resourceHandlers = []; -exports.resourceHandlersMap = {}; -function addHandler(key, has, read, write) { - var handler = { key: key, has: has, read: read, write: write }; - exports.resourceHandlers.push(handler); - exports.resourceHandlersMap[handler.key] = handler; -} -var LOG_MOCK_HANDLERS = false; -var RESOLUTION_UNITS = [undefined, 'PPI', 'PPCM']; -var MEASUREMENT_UNITS = [undefined, 'Inches', 'Centimeters', 'Points', 'Picas', 'Columns']; -var hex = '0123456789abcdef'; -function charToNibble(code) { - return code <= 57 ? code - 48 : code - 87; -} -function byteAt(value, index) { - return (charToNibble(value.charCodeAt(index)) << 4) | charToNibble(value.charCodeAt(index + 1)); -} -function readUtf8String(reader, length) { - var buffer = (0, psdReader_1.readBytes)(reader, length); - return (0, utf8_1.decodeString)(buffer); -} -function writeUtf8String(writer, value) { - var buffer = (0, utf8_1.encodeString)(value); - (0, psdWriter_1.writeBytes)(writer, buffer); -} -helpers_1.MOCK_HANDLERS && addHandler(1028, // IPTC-NAA record -function (// IPTC-NAA record -target) { return target._ir1028 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1028', left()); - target._ir1028 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1028); -}); -addHandler(1061, function (target) { return target.captionDigest !== undefined; }, function (reader, target) { - var captionDigest = ''; - for (var i = 0; i < 16; i++) { - var byte = (0, psdReader_1.readUint8)(reader); - captionDigest += hex[byte >> 4]; - captionDigest += hex[byte & 0xf]; - } - target.captionDigest = captionDigest; -}, function (writer, target) { - for (var i = 0; i < 16; i++) { - (0, psdWriter_1.writeUint8)(writer, byteAt(target.captionDigest, i * 2)); - } -}); -addHandler(1060, function (target) { return target.xmpMetadata !== undefined; }, function (reader, target, left) { return target.xmpMetadata = readUtf8String(reader, left()); }, function (writer, target) { return writeUtf8String(writer, target.xmpMetadata); }); -var Inte = (0, helpers_1.createEnum)('Inte', 'perceptual', { - 'perceptual': 'Img ', - 'saturation': 'Grp ', - 'relative colorimetric': 'Clrm', - 'absolute colorimetric': 'AClr', -}); -addHandler(1082, function (target) { return target.printInformation !== undefined; }, function (reader, target) { - var _a, _b; - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.printInformation = { - printerName: desc.printerName || '', - renderingIntent: Inte.decode((_a = desc.Inte) !== null && _a !== void 0 ? _a : 'Inte.Img '), - }; - var info = target.printInformation; - if (desc.PstS !== undefined) - info.printerManagesColors = desc.PstS; - if (desc['Nm '] !== undefined) - info.printerProfile = desc['Nm ']; - if (desc.MpBl !== undefined) - info.blackPointCompensation = desc.MpBl; - if (desc.printSixteenBit !== undefined) - info.printSixteenBit = desc.printSixteenBit; - if (desc.hardProof !== undefined) - info.hardProof = desc.hardProof; - if (desc.printProofSetup) { - if ('Bltn' in desc.printProofSetup) { - info.proofSetup = { builtin: desc.printProofSetup.Bltn.split('.')[1] }; - } - else { - info.proofSetup = { - profile: desc.printProofSetup.profile, - renderingIntent: Inte.decode((_b = desc.printProofSetup.Inte) !== null && _b !== void 0 ? _b : 'Inte.Img '), - blackPointCompensation: !!desc.printProofSetup.MpBl, - paperWhite: !!desc.printProofSetup.paperWhite, - }; - } - } -}, function (writer, target) { - var _a, _b; - var info = target.printInformation; - var desc = {}; - if (info.printerManagesColors) { - desc.PstS = true; - } - else { - if (info.hardProof !== undefined) - desc.hardProof = !!info.hardProof; - desc.ClrS = 'ClrS.RGBC'; // TODO: ??? - desc['Nm '] = (_a = info.printerProfile) !== null && _a !== void 0 ? _a : 'CIE RGB'; - } - desc.Inte = Inte.encode(info.renderingIntent); - if (!info.printerManagesColors) - desc.MpBl = !!info.blackPointCompensation; - desc.printSixteenBit = !!info.printSixteenBit; - desc.printerName = info.printerName || ''; - if (info.proofSetup && 'profile' in info.proofSetup) { - desc.printProofSetup = { - profile: info.proofSetup.profile || '', - Inte: Inte.encode(info.proofSetup.renderingIntent), - MpBl: !!info.proofSetup.blackPointCompensation, - paperWhite: !!info.proofSetup.paperWhite, - }; - } - else { - desc.printProofSetup = { - Bltn: ((_b = info.proofSetup) === null || _b === void 0 ? void 0 : _b.builtin) ? "builtinProof.".concat(info.proofSetup.builtin) : 'builtinProof.proofCMYK', - }; - } - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'printOutput', desc); -}); -helpers_1.MOCK_HANDLERS && addHandler(1083, // Print style -function (// Print style -target) { return target._ir1083 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1083', left()); - target._ir1083 = (0, psdReader_1.readBytes)(reader, left()); - // TODO: - // const desc = readVersionAndDescriptor(reader); - // console.log('1083', require('util').inspect(desc, false, 99, true)); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1083); -}); -addHandler(1005, function (target) { return target.resolutionInfo !== undefined; }, function (reader, target) { - var horizontalResolution = (0, psdReader_1.readFixedPoint32)(reader); - var horizontalResolutionUnit = (0, psdReader_1.readUint16)(reader); - var widthUnit = (0, psdReader_1.readUint16)(reader); - var verticalResolution = (0, psdReader_1.readFixedPoint32)(reader); - var verticalResolutionUnit = (0, psdReader_1.readUint16)(reader); - var heightUnit = (0, psdReader_1.readUint16)(reader); - target.resolutionInfo = { - horizontalResolution: horizontalResolution, - horizontalResolutionUnit: RESOLUTION_UNITS[horizontalResolutionUnit] || 'PPI', - widthUnit: MEASUREMENT_UNITS[widthUnit] || 'Inches', - verticalResolution: verticalResolution, - verticalResolutionUnit: RESOLUTION_UNITS[verticalResolutionUnit] || 'PPI', - heightUnit: MEASUREMENT_UNITS[heightUnit] || 'Inches', - }; -}, function (writer, target) { - var info = target.resolutionInfo; - (0, psdWriter_1.writeFixedPoint32)(writer, info.horizontalResolution || 0); - (0, psdWriter_1.writeUint16)(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.horizontalResolutionUnit))); - (0, psdWriter_1.writeUint16)(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.widthUnit))); - (0, psdWriter_1.writeFixedPoint32)(writer, info.verticalResolution || 0); - (0, psdWriter_1.writeUint16)(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.verticalResolutionUnit))); - (0, psdWriter_1.writeUint16)(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.heightUnit))); -}); -var printScaleStyles = ['centered', 'size to fit', 'user defined']; -addHandler(1062, function (target) { return target.printScale !== undefined; }, function (reader, target) { - target.printScale = { - style: printScaleStyles[(0, psdReader_1.readInt16)(reader)], - x: (0, psdReader_1.readFloat32)(reader), - y: (0, psdReader_1.readFloat32)(reader), - scale: (0, psdReader_1.readFloat32)(reader), - }; -}, function (writer, target) { - var _a = target.printScale, style = _a.style, x = _a.x, y = _a.y, scale = _a.scale; - (0, psdWriter_1.writeInt16)(writer, Math.max(0, printScaleStyles.indexOf(style))); - (0, psdWriter_1.writeFloat32)(writer, x || 0); - (0, psdWriter_1.writeFloat32)(writer, y || 0); - (0, psdWriter_1.writeFloat32)(writer, scale || 0); -}); -addHandler(1006, function (target) { return target.alphaChannelNames !== undefined; }, function (reader, target, left) { - target.alphaChannelNames = []; - while (left()) { - var value = (0, psdReader_1.readPascalString)(reader, 1); - target.alphaChannelNames.push(value); - } -}, function (writer, target) { - for (var _i = 0, _a = target.alphaChannelNames; _i < _a.length; _i++) { - var name_1 = _a[_i]; - (0, psdWriter_1.writePascalString)(writer, name_1, 1); - } -}); -addHandler(1045, function (target) { return target.alphaChannelNames !== undefined; }, function (reader, target, left) { - target.alphaChannelNames = []; - while (left()) { - target.alphaChannelNames.push((0, psdReader_1.readUnicodeString)(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.alphaChannelNames; _i < _a.length; _i++) { - var name_2 = _a[_i]; - (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, name_2); - } -}); -helpers_1.MOCK_HANDLERS && addHandler(1077, function (target) { return target._ir1077 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1077', left()); - target._ir1077 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1077); -}); -addHandler(1053, function (target) { return target.alphaIdentifiers !== undefined; }, function (reader, target, left) { - target.alphaIdentifiers = []; - while (left() >= 4) { - target.alphaIdentifiers.push((0, psdReader_1.readUint32)(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.alphaIdentifiers; _i < _a.length; _i++) { - var id = _a[_i]; - (0, psdWriter_1.writeUint32)(writer, id); - } -}); -addHandler(1010, function (target) { return target.backgroundColor !== undefined; }, function (reader, target) { return target.backgroundColor = (0, psdReader_1.readColor)(reader); }, function (writer, target) { return (0, psdWriter_1.writeColor)(writer, target.backgroundColor); }); -addHandler(1037, function (target) { return target.globalAngle !== undefined; }, function (reader, target) { return target.globalAngle = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.globalAngle); }); -addHandler(1049, function (target) { return target.globalAltitude !== undefined; }, function (reader, target) { return target.globalAltitude = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.globalAltitude); }); -addHandler(1011, function (target) { return target.printFlags !== undefined; }, function (reader, target) { - target.printFlags = { - labels: !!(0, psdReader_1.readUint8)(reader), - cropMarks: !!(0, psdReader_1.readUint8)(reader), - colorBars: !!(0, psdReader_1.readUint8)(reader), - registrationMarks: !!(0, psdReader_1.readUint8)(reader), - negative: !!(0, psdReader_1.readUint8)(reader), - flip: !!(0, psdReader_1.readUint8)(reader), - interpolate: !!(0, psdReader_1.readUint8)(reader), - caption: !!(0, psdReader_1.readUint8)(reader), - printFlags: !!(0, psdReader_1.readUint8)(reader), - }; -}, function (writer, target) { - var flags = target.printFlags; - (0, psdWriter_1.writeUint8)(writer, flags.labels ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.cropMarks ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.colorBars ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.registrationMarks ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.negative ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.flip ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.interpolate ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.caption ? 1 : 0); - (0, psdWriter_1.writeUint8)(writer, flags.printFlags ? 1 : 0); -}); -helpers_1.MOCK_HANDLERS && addHandler(10000, // Print flags -function (// Print flags -target) { return target._ir10000 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 10000', left()); - target._ir10000 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir10000); -}); -helpers_1.MOCK_HANDLERS && addHandler(1013, // Color halftoning -function (// Color halftoning -target) { return target._ir1013 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1013', left()); - target._ir1013 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1013); -}); -helpers_1.MOCK_HANDLERS && addHandler(1016, // Color transfer functions -function (// Color transfer functions -target) { return target._ir1016 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1016', left()); - target._ir1016 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1016); -}); -addHandler(1080, // Count Information -function (// Count Information -target) { return target.countInformation !== undefined; }, function (reader, target) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.countInformation = desc.countGroupList.map(function (g) { return ({ - color: { r: g['Rd '], g: g['Grn '], b: g['Bl '] }, - name: g['Nm '], - size: g['Rds '], - fontSize: g.fontSize, - visible: g.Vsbl, - points: g.countObjectList.map(function (p) { return ({ x: p['X '], y: p['Y '] }); }), - }); }); -}, function (writer, target) { - var desc = { - Vrsn: 1, - countGroupList: target.countInformation.map(function (g) { return ({ - 'Rd ': g.color.r, - 'Grn ': g.color.g, - 'Bl ': g.color.b, - 'Nm ': g.name, - 'Rds ': g.size, - fontSize: g.fontSize, - Vsbl: g.visible, - countObjectList: g.points.map(function (p) { return ({ 'X ': p.x, 'Y ': p.y }); }), - }); }), - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'Cnt ', desc); -}); -addHandler(1024, function (target) { return target.layerState !== undefined; }, function (reader, target) { return target.layerState = (0, psdReader_1.readUint16)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint16)(writer, target.layerState); }); -addHandler(1026, function (target) { return target.layersGroup !== undefined; }, function (reader, target, left) { - target.layersGroup = []; - while (left()) { - target.layersGroup.push((0, psdReader_1.readUint16)(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.layersGroup; _i < _a.length; _i++) { - var g = _a[_i]; - (0, psdWriter_1.writeUint16)(writer, g); - } -}); -addHandler(1072, function (target) { return target.layerGroupsEnabledId !== undefined; }, function (reader, target, left) { - target.layerGroupsEnabledId = []; - while (left()) { - target.layerGroupsEnabledId.push((0, psdReader_1.readUint8)(reader)); - } -}, function (writer, target) { - for (var _i = 0, _a = target.layerGroupsEnabledId; _i < _a.length; _i++) { - var id = _a[_i]; - (0, psdWriter_1.writeUint8)(writer, id); - } -}); -addHandler(1069, function (target) { return target.layerSelectionIds !== undefined; }, function (reader, target) { - var count = (0, psdReader_1.readUint16)(reader); - target.layerSelectionIds = []; - while (count--) { - target.layerSelectionIds.push((0, psdReader_1.readUint32)(reader)); - } -}, function (writer, target) { - (0, psdWriter_1.writeUint16)(writer, target.layerSelectionIds.length); - for (var _i = 0, _a = target.layerSelectionIds; _i < _a.length; _i++) { - var id = _a[_i]; - (0, psdWriter_1.writeUint32)(writer, id); - } -}); -addHandler(1032, function (target) { return target.gridAndGuidesInformation !== undefined; }, function (reader, target) { - var version = (0, psdReader_1.readUint32)(reader); - var horizontal = (0, psdReader_1.readUint32)(reader); - var vertical = (0, psdReader_1.readUint32)(reader); - var count = (0, psdReader_1.readUint32)(reader); - if (version !== 1) - throw new Error("Invalid 1032 resource version: ".concat(version)); - target.gridAndGuidesInformation = { - grid: { horizontal: horizontal, vertical: vertical }, - guides: [], - }; - for (var i = 0; i < count; i++) { - target.gridAndGuidesInformation.guides.push({ - location: (0, psdReader_1.readUint32)(reader) / 32, - direction: (0, psdReader_1.readUint8)(reader) ? 'horizontal' : 'vertical' - }); - } -}, function (writer, target) { - var info = target.gridAndGuidesInformation; - var grid = info.grid || { horizontal: 18 * 32, vertical: 18 * 32 }; - var guides = info.guides || []; - (0, psdWriter_1.writeUint32)(writer, 1); - (0, psdWriter_1.writeUint32)(writer, grid.horizontal); - (0, psdWriter_1.writeUint32)(writer, grid.vertical); - (0, psdWriter_1.writeUint32)(writer, guides.length); - for (var _i = 0, guides_1 = guides; _i < guides_1.length; _i++) { - var g = guides_1[_i]; - (0, psdWriter_1.writeUint32)(writer, g.location * 32); - (0, psdWriter_1.writeUint8)(writer, g.direction === 'horizontal' ? 1 : 0); - } -}); -// 0 - normal, 7 - multiply, 8 - screen, 23 - difference -var onionSkinsBlendModes = [ - 'normal', undefined, undefined, undefined, undefined, undefined, undefined, 'multiply', - 'screen', undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, 'difference', -]; -addHandler(1078, // Onion Skins -function (// Onion Skins -target) { return target.onionSkins !== undefined; }, function (reader, target) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log('1078', require('util').inspect(desc, false, 99, true)); - target.onionSkins = { - enabled: desc.enab, - framesBefore: desc.numBefore, - framesAfter: desc.numAfter, - frameSpacing: desc.Spcn, - minOpacity: desc.minOpacity / 100, - maxOpacity: desc.maxOpacity / 100, - blendMode: onionSkinsBlendModes[desc.BlnM] || 'normal', - }; -}, function (writer, target) { - var onionSkins = target.onionSkins; - var desc = { - Vrsn: 1, - enab: onionSkins.enabled, - numBefore: onionSkins.framesBefore, - numAfter: onionSkins.framesAfter, - Spcn: onionSkins.frameSpacing, - minOpacity: (onionSkins.minOpacity * 100) | 0, - maxOpacity: (onionSkins.maxOpacity * 100) | 0, - BlnM: Math.max(0, onionSkinsBlendModes.indexOf(onionSkins.blendMode)), - }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler(1075, // Timeline Information -function (// Timeline Information -target) { return target.timelineInformation !== undefined; }, function (reader, target, _, options) { - var _a, _b; - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log('1075', require('util').inspect(desc, false, 99, true)); - target.timelineInformation = { - enabled: desc.enab, - frameStep: desc.frameStep, - frameRate: desc.frameRate, - time: desc.time, - duration: desc.duration, - workInTime: desc.workInTime, - workOutTime: desc.workOutTime, - repeats: desc.LCnt, - hasMotion: desc.hasMotion, - globalTracks: (0, descriptor_1.parseTrackList)(desc.globalTrackList, !!options.logMissingFeatures), - }; - if ((_b = (_a = desc.audioClipGroupList) === null || _a === void 0 ? void 0 : _a.audioClipGroupList) === null || _b === void 0 ? void 0 : _b.length) { - target.timelineInformation.audioClipGroups = desc.audioClipGroupList.audioClipGroupList.map(function (g) { return ({ - id: g.groupID, - muted: g.muted, - audioClips: g.audioClipList.map(function (_a) { - var clipID = _a.clipID, timeScope = _a.timeScope, muted = _a.muted, audioLevel = _a.audioLevel, frameReader = _a.frameReader; - return ({ - id: clipID, - start: timeScope.Strt, - duration: timeScope.duration, - inTime: timeScope.inTime, - outTime: timeScope.outTime, - muted: muted, - audioLevel: audioLevel, - frameReader: { - type: frameReader.frameReaderType, - mediaDescriptor: frameReader.mediaDescriptor, - link: { - name: frameReader['Lnk ']['Nm '], - fullPath: frameReader['Lnk '].fullPath, - relativePath: frameReader['Lnk '].relPath, - }, - }, - }); - }), - }); }); - } -}, function (writer, target) { - var _a; - var timeline = target.timelineInformation; - var desc = { - Vrsn: 1, - enab: timeline.enabled, - frameStep: timeline.frameStep, - frameRate: timeline.frameRate, - time: timeline.time, - duration: timeline.duration, - workInTime: timeline.workInTime, - workOutTime: timeline.workOutTime, - LCnt: timeline.repeats, - globalTrackList: (0, descriptor_1.serializeTrackList)(timeline.globalTracks), - audioClipGroupList: { - audioClipGroupList: (_a = timeline.audioClipGroups) === null || _a === void 0 ? void 0 : _a.map(function (a) { return ({ - groupID: a.id, - muted: a.muted, - audioClipList: a.audioClips.map(function (c) { return ({ - clipID: c.id, - timeScope: { - Vrsn: 1, - Strt: c.start, - duration: c.duration, - inTime: c.inTime, - outTime: c.outTime, - }, - frameReader: { - frameReaderType: c.frameReader.type, - descVersion: 1, - 'Lnk ': { - descVersion: 1, - 'Nm ': c.frameReader.link.name, - fullPath: c.frameReader.link.fullPath, - relPath: c.frameReader.link.relativePath, - }, - mediaDescriptor: c.frameReader.mediaDescriptor, - }, - muted: c.muted, - audioLevel: c.audioLevel, - }); }), - }); }), - }, - hasMotion: timeline.hasMotion, - }; - // console.log('WRITE:1075', require('util').inspect(desc, false, 99, true)); - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'anim'); -}); -addHandler(1076, // Sheet Disclosure -function (// Sheet Disclosure -target) { return target.sheetDisclosure !== undefined; }, function (reader, target) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log('1076', require('util').inspect(desc, false, 99, true)); - target.sheetDisclosure = {}; - if (desc.sheetTimelineOptions) { - target.sheetDisclosure.sheetTimelineOptions = desc.sheetTimelineOptions.map(function (o) { return ({ - sheetID: o.sheetID, - sheetDisclosed: o.sheetDisclosed, - lightsDisclosed: o.lightsDisclosed, - meshesDisclosed: o.meshesDisclosed, - materialsDisclosed: o.materialsDisclosed, - }); }); - } -}, function (writer, target) { - var disclosure = target.sheetDisclosure; - var desc = { Vrsn: 1 }; - if (disclosure.sheetTimelineOptions) { - desc.sheetTimelineOptions = disclosure.sheetTimelineOptions.map(function (d) { return ({ - Vrsn: 2, - sheetID: d.sheetID, - sheetDisclosed: d.sheetDisclosed, - lightsDisclosed: d.lightsDisclosed, - meshesDisclosed: d.meshesDisclosed, - materialsDisclosed: d.materialsDisclosed, - }); }); - } - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -addHandler(1054, // URL List -function (// URL List -target) { return target.urlsList !== undefined; }, function (reader, target, _, options) { - var count = (0, psdReader_1.readUint32)(reader); - target.urlsList = []; - for (var i = 0; i < count; i++) { - var long = (0, psdReader_1.readSignature)(reader); - if (long !== 'slic' && options.throwForMissingFeatures) - throw new Error('Unknown long'); - var id = (0, psdReader_1.readUint32)(reader); - var url = (0, psdReader_1.readUnicodeString)(reader); - target.urlsList.push({ id: id, url: url, ref: 'slice' }); - } -}, function (writer, target) { - var list = target.urlsList; - (0, psdWriter_1.writeUint32)(writer, list.length); - for (var i = 0; i < list.length; i++) { - (0, psdWriter_1.writeSignature)(writer, 'slic'); - (0, psdWriter_1.writeUint32)(writer, list[i].id); - (0, psdWriter_1.writeUnicodeString)(writer, list[i].url); - } -}); -function boundsToBounds(bounds) { - return { 'Top ': bounds.top, Left: bounds.left, Btom: bounds.bottom, Rght: bounds.right }; -} -function boundsFromBounds(bounds) { - return { top: bounds['Top '], left: bounds.Left, bottom: bounds.Btom, right: bounds.Rght }; -} -function clamped(array, index) { - return array[Math.max(0, Math.min(array.length - 1, index))]; -} -var sliceOrigins = ['autoGenerated', 'layer', 'userGenerated']; -var sliceTypes = ['noImage', 'image']; -var sliceAlignments = ['default']; -addHandler(1050, // Slices -function (// Slices -target) { return target.slices ? target.slices.length : 0; }, function (reader, target) { - var version = (0, psdReader_1.readUint32)(reader); - if (version == 6) { - if (!target.slices) - target.slices = []; - var top_1 = (0, psdReader_1.readInt32)(reader); - var left = (0, psdReader_1.readInt32)(reader); - var bottom = (0, psdReader_1.readInt32)(reader); - var right = (0, psdReader_1.readInt32)(reader); - var groupName = (0, psdReader_1.readUnicodeString)(reader); - var count = (0, psdReader_1.readUint32)(reader); - target.slices.push({ bounds: { top: top_1, left: left, bottom: bottom, right: right }, groupName: groupName, slices: [] }); - var slices_1 = target.slices[target.slices.length - 1].slices; - for (var i = 0; i < count; i++) { - var id = (0, psdReader_1.readUint32)(reader); - var groupId = (0, psdReader_1.readUint32)(reader); - var origin_1 = clamped(sliceOrigins, (0, psdReader_1.readUint32)(reader)); - var associatedLayerId = origin_1 == 'layer' ? (0, psdReader_1.readUint32)(reader) : 0; - var name_3 = (0, psdReader_1.readUnicodeString)(reader); - var type = clamped(sliceTypes, (0, psdReader_1.readUint32)(reader)); - var top_2 = (0, psdReader_1.readInt32)(reader); - var left_1 = (0, psdReader_1.readInt32)(reader); - var bottom_1 = (0, psdReader_1.readInt32)(reader); - var right_1 = (0, psdReader_1.readInt32)(reader); - var url = (0, psdReader_1.readUnicodeString)(reader); - var target_1 = (0, psdReader_1.readUnicodeString)(reader); - var message = (0, psdReader_1.readUnicodeString)(reader); - var altTag = (0, psdReader_1.readUnicodeString)(reader); - var cellTextIsHTML = !!(0, psdReader_1.readUint8)(reader); - var cellText = (0, psdReader_1.readUnicodeString)(reader); - var horizontalAlignment = clamped(sliceAlignments, (0, psdReader_1.readUint32)(reader)); - var verticalAlignment = clamped(sliceAlignments, (0, psdReader_1.readUint32)(reader)); - var a = (0, psdReader_1.readUint8)(reader); - var r = (0, psdReader_1.readUint8)(reader); - var g = (0, psdReader_1.readUint8)(reader); - var b = (0, psdReader_1.readUint8)(reader); - var backgroundColorType = ((a + r + g + b) === 0) ? 'none' : (a === 0 ? 'matte' : 'color'); - slices_1.push({ - id: id, - groupId: groupId, - origin: origin_1, - associatedLayerId: associatedLayerId, - name: name_3, - target: target_1, - message: message, - altTag: altTag, - cellTextIsHTML: cellTextIsHTML, - cellText: cellText, - horizontalAlignment: horizontalAlignment, - verticalAlignment: verticalAlignment, - type: type, - url: url, - bounds: { top: top_2, left: left_1, bottom: bottom_1, right: right_1 }, - backgroundColorType: backgroundColorType, - backgroundColor: { r: r, g: g, b: b, a: a }, - }); - // console.log(require('util').inspect(slices[slices.length - 1], false, 99, true)); - } - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - desc.slices.forEach(function (d) { - var slice = slices_1.find(function (s) { return d.sliceID == s.id; }); - if (slice) { - slice.topOutset = d.topOutset; - slice.leftOutset = d.leftOutset; - slice.bottomOutset = d.bottomOutset; - slice.rightOutset = d.rightOutset; - } - }); - // console.log(require('util').inspect(desc, false, 99, true)); - // console.log(require('util').inspect(target.slices, false, 99, true)); - } - else if (version == 7 || version == 8) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - if (!target.slices) - target.slices = []; - target.slices.push({ - groupName: desc.baseName, - bounds: boundsFromBounds(desc.bounds), - slices: desc.slices.map(function (s) { return ({ - name: '', - id: s.sliceID, - groupId: s.groupID, - associatedLayerId: 0, - origin: descriptor_1.ESliceOrigin.decode(s.origin), - type: descriptor_1.ESliceType.decode(s.Type), - bounds: boundsFromBounds(s.bounds), - url: s.url, - target: s.null, - message: s.Msge, - altTag: s.altTag, - cellTextIsHTML: s.cellTextIsHTML, - cellText: s.cellText, - horizontalAlignment: descriptor_1.ESliceHorzAlign.decode(s.horzAlign), - verticalAlignment: descriptor_1.ESliceVertAlign.decode(s.vertAlign), - backgroundColorType: descriptor_1.ESliceBGColorType.decode(s.bgColorType), - backgroundColor: s.bgColor ? { r: s.bgColor['Rd '], g: s.bgColor['Grn '], b: s.bgColor['Bl '], a: s.bgColor.alpha } : { r: 0, g: 0, b: 0, a: 0 }, - topOutset: s.topOutset || 0, - leftOutset: s.leftOutset || 0, - bottomOutset: s.bottomOutset || 0, - rightOutset: s.rightOutset || 0, - }); }), - }); - } - else { - throw new Error("Invalid slices version (".concat(version, ")")); - } -}, function (writer, target, index) { - var _a = target.slices[index], bounds = _a.bounds, groupName = _a.groupName, slices = _a.slices; - (0, psdWriter_1.writeUint32)(writer, 6); // version - (0, psdWriter_1.writeInt32)(writer, bounds.top); - (0, psdWriter_1.writeInt32)(writer, bounds.left); - (0, psdWriter_1.writeInt32)(writer, bounds.bottom); - (0, psdWriter_1.writeInt32)(writer, bounds.right); - (0, psdWriter_1.writeUnicodeString)(writer, groupName); - (0, psdWriter_1.writeUint32)(writer, slices.length); - for (var i = 0; i < slices.length; i++) { - var slice = slices[i]; - var _b = slice.backgroundColor, a = _b.a, r = _b.r, g = _b.g, b = _b.b; - if (slice.backgroundColorType === 'none') { - a = r = g = b = 0; - } - else if (slice.backgroundColorType === 'matte') { - a = 0; - r = g = b = 255; - } - (0, psdWriter_1.writeUint32)(writer, slice.id); - (0, psdWriter_1.writeUint32)(writer, slice.groupId); - (0, psdWriter_1.writeUint32)(writer, sliceOrigins.indexOf(slice.origin)); - if (slice.origin === 'layer') - (0, psdWriter_1.writeUint32)(writer, slice.associatedLayerId); - (0, psdWriter_1.writeUnicodeString)(writer, slice.name); - (0, psdWriter_1.writeUint32)(writer, sliceTypes.indexOf(slice.type)); - (0, psdWriter_1.writeInt32)(writer, slice.bounds.top); - (0, psdWriter_1.writeInt32)(writer, slice.bounds.left); - (0, psdWriter_1.writeInt32)(writer, slice.bounds.bottom); - (0, psdWriter_1.writeInt32)(writer, slice.bounds.right); - (0, psdWriter_1.writeUnicodeString)(writer, slice.url); - (0, psdWriter_1.writeUnicodeString)(writer, slice.target); - (0, psdWriter_1.writeUnicodeString)(writer, slice.message); - (0, psdWriter_1.writeUnicodeString)(writer, slice.altTag); - (0, psdWriter_1.writeUint8)(writer, slice.cellTextIsHTML ? 1 : 0); - (0, psdWriter_1.writeUnicodeString)(writer, slice.cellText); - (0, psdWriter_1.writeUint32)(writer, sliceAlignments.indexOf(slice.horizontalAlignment)); - (0, psdWriter_1.writeUint32)(writer, sliceAlignments.indexOf(slice.verticalAlignment)); - (0, psdWriter_1.writeUint8)(writer, a); - (0, psdWriter_1.writeUint8)(writer, r); - (0, psdWriter_1.writeUint8)(writer, g); - (0, psdWriter_1.writeUint8)(writer, b); - } - var desc = { - bounds: boundsToBounds(bounds), - slices: [], - }; - slices.forEach(function (s) { - var slice = __assign(__assign({ sliceID: s.id, groupID: s.groupId, origin: descriptor_1.ESliceOrigin.encode(s.origin), Type: descriptor_1.ESliceType.encode(s.type), bounds: boundsToBounds(s.bounds) }, (s.name ? { 'Nm ': s.name } : {})), { url: s.url, null: s.target, Msge: s.message, altTag: s.altTag, cellTextIsHTML: s.cellTextIsHTML, cellText: s.cellText, horzAlign: descriptor_1.ESliceHorzAlign.encode(s.horizontalAlignment), vertAlign: descriptor_1.ESliceVertAlign.encode(s.verticalAlignment), bgColorType: descriptor_1.ESliceBGColorType.encode(s.backgroundColorType) }); - if (s.backgroundColorType === 'color') { - var _a = s.backgroundColor, r = _a.r, g = _a.g, b = _a.b, a = _a.a; - slice.bgColor = { 'Rd ': r, 'Grn ': g, 'Bl ': b, alpha: a }; - } - slice.topOutset = s.topOutset || 0; - slice.leftOutset = s.leftOutset || 0; - slice.bottomOutset = s.bottomOutset || 0; - slice.rightOutset = s.rightOutset || 0; - desc.slices.push(slice); - }); - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'slices'); -}); -addHandler(1064, function (target) { return target.pixelAspectRatio !== undefined; }, function (reader, target) { - if ((0, psdReader_1.readUint32)(reader) > 2) - throw new Error('Invalid pixelAspectRatio version'); - target.pixelAspectRatio = { aspect: (0, psdReader_1.readFloat64)(reader) }; -}, function (writer, target) { - (0, psdWriter_1.writeUint32)(writer, 2); // version - (0, psdWriter_1.writeFloat64)(writer, target.pixelAspectRatio.aspect); -}); -addHandler(1041, function (target) { return target.iccUntaggedProfile !== undefined; }, function (reader, target) { - target.iccUntaggedProfile = !!(0, psdReader_1.readUint8)(reader); -}, function (writer, target) { - (0, psdWriter_1.writeUint8)(writer, target.iccUntaggedProfile ? 1 : 0); -}); -helpers_1.MOCK_HANDLERS && addHandler(1039, // ICC Profile -function (// ICC Profile -target) { return target._ir1039 !== undefined; }, function (reader, target, left) { - // TODO: this is raw bytes, just return as a byte array - LOG_MOCK_HANDLERS && console.log('image resource 1039', left()); - target._ir1039 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1039); -}); -addHandler(1044, function (target) { return target.idsSeedNumber !== undefined; }, function (reader, target) { return target.idsSeedNumber = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.idsSeedNumber); }); -addHandler(1036, function (target) { return target.thumbnail !== undefined || target.thumbnailRaw !== undefined; }, function (reader, target, left, options) { - var format = (0, psdReader_1.readUint32)(reader); // 1 = kJpegRGB, 0 = kRawRGB - var width = (0, psdReader_1.readUint32)(reader); - var height = (0, psdReader_1.readUint32)(reader); - (0, psdReader_1.readUint32)(reader); // widthBytes = (width * bits_per_pixel + 31) / 32 * 4. - (0, psdReader_1.readUint32)(reader); // totalSize = widthBytes * height * planes - (0, psdReader_1.readUint32)(reader); // sizeAfterCompression - var bitsPerPixel = (0, psdReader_1.readUint16)(reader); // 24 - var planes = (0, psdReader_1.readUint16)(reader); // 1 - if (format !== 1 || bitsPerPixel !== 24 || planes !== 1) { - options.logMissingFeatures && console.log("Invalid thumbnail data (format: ".concat(format, ", bitsPerPixel: ").concat(bitsPerPixel, ", planes: ").concat(planes, ")")); - (0, psdReader_1.skipBytes)(reader, left()); - return; - } - var size = left(); - var data = (0, psdReader_1.readBytes)(reader, size); - if (options.useRawThumbnail) { - target.thumbnailRaw = { width: width, height: height, data: data }; - } - else if (data.byteLength) { - target.thumbnail = (0, helpers_1.createCanvasFromData)(data); - } -}, function (writer, target) { - var _a; - var width = 0; - var height = 0; - var data; - if (target.thumbnailRaw) { - width = target.thumbnailRaw.width; - height = target.thumbnailRaw.height; - data = target.thumbnailRaw.data; - } - else { - var dataUrl = (_a = target.thumbnail.toDataURL('image/jpeg', 1)) === null || _a === void 0 ? void 0 : _a.substring('data:image/jpeg;base64,'.length); - if (dataUrl) { - width = target.thumbnail.width; - height = target.thumbnail.height; - data = (0, base64_js_1.toByteArray)(dataUrl); - } - else { - data = new Uint8Array(0); - } - } - var bitsPerPixel = 24; - var widthBytes = Math.floor((width * bitsPerPixel + 31) / 32) * 4; - var planes = 1; - var totalSize = widthBytes * height * planes; - var sizeAfterCompression = data.length; - (0, psdWriter_1.writeUint32)(writer, 1); // 1 = kJpegRGB - (0, psdWriter_1.writeUint32)(writer, width); - (0, psdWriter_1.writeUint32)(writer, height); - (0, psdWriter_1.writeUint32)(writer, widthBytes); - (0, psdWriter_1.writeUint32)(writer, totalSize); - (0, psdWriter_1.writeUint32)(writer, sizeAfterCompression); - (0, psdWriter_1.writeUint16)(writer, bitsPerPixel); - (0, psdWriter_1.writeUint16)(writer, planes); - (0, psdWriter_1.writeBytes)(writer, data); -}); -addHandler(1057, function (target) { return target.versionInfo !== undefined; }, function (reader, target, left) { - var version = (0, psdReader_1.readUint32)(reader); - if (version !== 1) - throw new Error('Invalid versionInfo version'); - target.versionInfo = { - hasRealMergedData: !!(0, psdReader_1.readUint8)(reader), - writerName: (0, psdReader_1.readUnicodeString)(reader), - readerName: (0, psdReader_1.readUnicodeString)(reader), - fileVersion: (0, psdReader_1.readUint32)(reader), - }; - (0, psdReader_1.skipBytes)(reader, left()); -}, function (writer, target) { - var versionInfo = target.versionInfo; - (0, psdWriter_1.writeUint32)(writer, 1); // version - (0, psdWriter_1.writeUint8)(writer, versionInfo.hasRealMergedData ? 1 : 0); - (0, psdWriter_1.writeUnicodeString)(writer, versionInfo.writerName); - (0, psdWriter_1.writeUnicodeString)(writer, versionInfo.readerName); - (0, psdWriter_1.writeUint32)(writer, versionInfo.fileVersion); -}); -helpers_1.MOCK_HANDLERS && addHandler(1058, // EXIF data 1. -function (// EXIF data 1. -target) { return target._ir1058 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1058', left()); - target._ir1058 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1058); -}); -addHandler(7000, function (target) { return target.imageReadyVariables !== undefined; }, function (reader, target, left) { - target.imageReadyVariables = readUtf8String(reader, left()); -}, function (writer, target) { - writeUtf8String(writer, target.imageReadyVariables); -}); -addHandler(7001, function (target) { return target.imageReadyDataSets !== undefined; }, function (reader, target, left) { - target.imageReadyDataSets = readUtf8String(reader, left()); -}, function (writer, target) { - writeUtf8String(writer, target.imageReadyDataSets); -}); -addHandler(1088, function (target) { return target.pathSelectionState !== undefined; }, function (reader, target, _left) { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - target.pathSelectionState = desc['null']; -}, function (writer, target) { - var desc = { 'null': target.pathSelectionState }; - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); -}); -helpers_1.MOCK_HANDLERS && addHandler(1025, function (target) { return target._ir1025 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 1025', left()); - target._ir1025 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir1025); -}); -var FrmD = (0, helpers_1.createEnum)('FrmD', '', { - auto: 'Auto', - none: 'None', - dispose: 'Disp', -}); -addHandler(4000, // Plug-In resource(s) -function (// Plug-In resource(s) -target) { return target.animations !== undefined; }, function (reader, target, left, _a) { - var logMissingFeatures = _a.logMissingFeatures, logDevFeatures = _a.logDevFeatures; - var key = (0, psdReader_1.readSignature)(reader); - if (key === 'mani') { - (0, psdReader_1.checkSignature)(reader, 'IRFR'); - (0, psdReader_1.readSection)(reader, 1, function (left) { - var _loop_1 = function () { - (0, psdReader_1.checkSignature)(reader, '8BIM'); - var key_1 = (0, psdReader_1.readSignature)(reader); - (0, psdReader_1.readSection)(reader, 1, function (left) { - if (key_1 === 'AnDs') { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - target.animations = { - // desc.AFSt ??? - frames: desc.FrIn.map(function (x) { return ({ - id: x.FrID, - delay: (x.FrDl || 0) / 100, - dispose: x.FrDs ? FrmD.decode(x.FrDs) : 'auto', // missing == auto - // x.FrGA ??? - }); }), - animations: desc.FSts.map(function (x) { return ({ - id: x.FsID, - frames: x.FsFr, - repeats: x.LCnt, - activeFrame: x.AFrm || 0, - }); }), - }; - // console.log('#4000 AnDs', require('util').inspect(desc, false, 99, true)); - // console.log('#4000 AnDs:result', require('util').inspect(target.animations, false, 99, true)); - } - else if (key_1 === 'Roll') { - var bytes = (0, psdReader_1.readBytes)(reader, left()); - logDevFeatures && console.log('#4000 Roll', bytes); - } - else { - logMissingFeatures && console.log('Unhandled subsection in #4000', key_1); - } - }); - }; - while (left()) { - _loop_1(); - } - }); - } - else if (key === 'mopt') { - var bytes = (0, psdReader_1.readBytes)(reader, left()); - logDevFeatures && console.log('#4000 mopt', bytes); - } - else { - logMissingFeatures && console.log('Unhandled key in #4000:', key); - } -}, function (writer, target) { - if (target.animations) { - (0, psdWriter_1.writeSignature)(writer, 'mani'); - (0, psdWriter_1.writeSignature)(writer, 'IRFR'); - (0, psdWriter_1.writeSection)(writer, 1, function () { - (0, psdWriter_1.writeSignature)(writer, '8BIM'); - (0, psdWriter_1.writeSignature)(writer, 'AnDs'); - (0, psdWriter_1.writeSection)(writer, 1, function () { - var desc = { - // AFSt: 0, // ??? - FrIn: [], - FSts: [], - }; - for (var i = 0; i < target.animations.frames.length; i++) { - var f = target.animations.frames[i]; - var frame = { - FrID: f.id, - }; - if (f.delay) - frame.FrDl = (f.delay * 100) | 0; - frame.FrDs = FrmD.encode(f.dispose); - // if (i === 0) frame.FrGA = 30; // ??? - desc.FrIn.push(frame); - } - for (var i = 0; i < target.animations.animations.length; i++) { - var a = target.animations.animations[i]; - var anim = { - FsID: a.id, - AFrm: a.activeFrame | 0, - FsFr: a.frames, - LCnt: a.repeats | 0, - }; - desc.FSts.push(anim); - } - (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); - }); - // writeSignature(writer, '8BIM'); - // writeSignature(writer, 'Roll'); - // writeSection(writer, 1, () => { - // writeZeros(writer, 8); - // }); - }); - } -}); -// TODO: Unfinished -helpers_1.MOCK_HANDLERS && addHandler(4001, // Plug-In resource(s) -function (// Plug-In resource(s) -target) { return target._ir4001 !== undefined; }, function (reader, target, left, _a) { - var logMissingFeatures = _a.logMissingFeatures, logDevFeatures = _a.logDevFeatures; - if (helpers_1.MOCK_HANDLERS) { - LOG_MOCK_HANDLERS && console.log('image resource 4001', left()); - target._ir4001 = (0, psdReader_1.readBytes)(reader, left()); - return; - } - var key = (0, psdReader_1.readSignature)(reader); - if (key === 'mfri') { - var version = (0, psdReader_1.readUint32)(reader); - if (version !== 2) - throw new Error('Invalid mfri version'); - var length_1 = (0, psdReader_1.readUint32)(reader); - var bytes = (0, psdReader_1.readBytes)(reader, length_1); - logDevFeatures && console.log('mfri', bytes); - } - else if (key === 'mset') { - var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); - logDevFeatures && console.log('mset', desc); - } - else { - logMissingFeatures && console.log('Unhandled key in #4001', key); - } -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir4001); -}); -// TODO: Unfinished -helpers_1.MOCK_HANDLERS && addHandler(4002, // Plug-In resource(s) -function (// Plug-In resource(s) -target) { return target._ir4002 !== undefined; }, function (reader, target, left) { - LOG_MOCK_HANDLERS && console.log('image resource 4002', left()); - target._ir4002 = (0, psdReader_1.readBytes)(reader, left()); -}, function (writer, target) { - (0, psdWriter_1.writeBytes)(writer, target._ir4002); -}); -//# sourceMappingURL=imageResources.js.map \ No newline at end of file +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.resourceHandlersMap = exports.resourceHandlers = void 0; +var base64_js_1 = require("base64-js"); +var psdReader_1 = require("./psdReader"); +var psdWriter_1 = require("./psdWriter"); +var helpers_1 = require("./helpers"); +var utf8_1 = require("./utf8"); +var descriptor_1 = require("./descriptor"); +exports.resourceHandlers = []; +exports.resourceHandlersMap = {}; +function addHandler(key, has, read, write) { + var handler = { key: key, has: has, read: read, write: write }; + exports.resourceHandlers.push(handler); + exports.resourceHandlersMap[handler.key] = handler; +} +var LOG_MOCK_HANDLERS = false; +var RESOLUTION_UNITS = [undefined, 'PPI', 'PPCM']; +var MEASUREMENT_UNITS = [undefined, 'Inches', 'Centimeters', 'Points', 'Picas', 'Columns']; +var hex = '0123456789abcdef'; +function charToNibble(code) { + return code <= 57 ? code - 48 : code - 87; +} +function byteAt(value, index) { + return (charToNibble(value.charCodeAt(index)) << 4) | charToNibble(value.charCodeAt(index + 1)); +} +function readUtf8String(reader, length) { + var buffer = (0, psdReader_1.readBytes)(reader, length); + return (0, utf8_1.decodeString)(buffer); +} +function writeUtf8String(writer, value) { + var buffer = (0, utf8_1.encodeString)(value); + (0, psdWriter_1.writeBytes)(writer, buffer); +} +helpers_1.MOCK_HANDLERS && addHandler(1028, // IPTC-NAA record +function (// IPTC-NAA record +target) { return target._ir1028 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1028', left()); + target._ir1028 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1028); +}); +addHandler(1061, function (target) { return target.captionDigest !== undefined; }, function (reader, target) { + var captionDigest = ''; + for (var i = 0; i < 16; i++) { + var byte = (0, psdReader_1.readUint8)(reader); + captionDigest += hex[byte >> 4]; + captionDigest += hex[byte & 0xf]; + } + target.captionDigest = captionDigest; +}, function (writer, target) { + for (var i = 0; i < 16; i++) { + (0, psdWriter_1.writeUint8)(writer, byteAt(target.captionDigest, i * 2)); + } +}); +addHandler(1060, function (target) { return target.xmpMetadata !== undefined; }, function (reader, target, left) { return target.xmpMetadata = readUtf8String(reader, left()); }, function (writer, target) { return writeUtf8String(writer, target.xmpMetadata); }); +var Inte = (0, helpers_1.createEnum)('Inte', 'perceptual', { + 'perceptual': 'Img ', + 'saturation': 'Grp ', + 'relative colorimetric': 'Clrm', + 'absolute colorimetric': 'AClr', +}); +addHandler(1082, function (target) { return target.printInformation !== undefined; }, function (reader, target) { + var _a, _b; + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.printInformation = { + printerName: desc.printerName || '', + renderingIntent: Inte.decode((_a = desc.Inte) !== null && _a !== void 0 ? _a : 'Inte.Img '), + }; + var info = target.printInformation; + if (desc.PstS !== undefined) + info.printerManagesColors = desc.PstS; + if (desc['Nm '] !== undefined) + info.printerProfile = desc['Nm ']; + if (desc.MpBl !== undefined) + info.blackPointCompensation = desc.MpBl; + if (desc.printSixteenBit !== undefined) + info.printSixteenBit = desc.printSixteenBit; + if (desc.hardProof !== undefined) + info.hardProof = desc.hardProof; + if (desc.printProofSetup) { + if ('Bltn' in desc.printProofSetup) { + info.proofSetup = { builtin: desc.printProofSetup.Bltn.split('.')[1] }; + } + else { + info.proofSetup = { + profile: desc.printProofSetup.profile, + renderingIntent: Inte.decode((_b = desc.printProofSetup.Inte) !== null && _b !== void 0 ? _b : 'Inte.Img '), + blackPointCompensation: !!desc.printProofSetup.MpBl, + paperWhite: !!desc.printProofSetup.paperWhite, + }; + } + } +}, function (writer, target) { + var _a, _b; + var info = target.printInformation; + var desc = {}; + if (info.printerManagesColors) { + desc.PstS = true; + } + else { + if (info.hardProof !== undefined) + desc.hardProof = !!info.hardProof; + desc.ClrS = 'ClrS.RGBC'; // TODO: ??? + desc['Nm '] = (_a = info.printerProfile) !== null && _a !== void 0 ? _a : 'CIE RGB'; + } + desc.Inte = Inte.encode(info.renderingIntent); + if (!info.printerManagesColors) + desc.MpBl = !!info.blackPointCompensation; + desc.printSixteenBit = !!info.printSixteenBit; + desc.printerName = info.printerName || ''; + if (info.proofSetup && 'profile' in info.proofSetup) { + desc.printProofSetup = { + profile: info.proofSetup.profile || '', + Inte: Inte.encode(info.proofSetup.renderingIntent), + MpBl: !!info.proofSetup.blackPointCompensation, + paperWhite: !!info.proofSetup.paperWhite, + }; + } + else { + desc.printProofSetup = { + Bltn: ((_b = info.proofSetup) === null || _b === void 0 ? void 0 : _b.builtin) ? "builtinProof.".concat(info.proofSetup.builtin) : 'builtinProof.proofCMYK', + }; + } + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'printOutput', desc); +}); +helpers_1.MOCK_HANDLERS && addHandler(1083, // Print style +function (// Print style +target) { return target._ir1083 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1083', left()); + target._ir1083 = (0, psdReader_1.readBytes)(reader, left()); + // TODO: + // const desc = readVersionAndDescriptor(reader); + // console.log('1083', require('util').inspect(desc, false, 99, true)); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1083); +}); +addHandler(1005, function (target) { return target.resolutionInfo !== undefined; }, function (reader, target) { + var horizontalResolution = (0, psdReader_1.readFixedPoint32)(reader); + var horizontalResolutionUnit = (0, psdReader_1.readUint16)(reader); + var widthUnit = (0, psdReader_1.readUint16)(reader); + var verticalResolution = (0, psdReader_1.readFixedPoint32)(reader); + var verticalResolutionUnit = (0, psdReader_1.readUint16)(reader); + var heightUnit = (0, psdReader_1.readUint16)(reader); + target.resolutionInfo = { + horizontalResolution: horizontalResolution, + horizontalResolutionUnit: RESOLUTION_UNITS[horizontalResolutionUnit] || 'PPI', + widthUnit: MEASUREMENT_UNITS[widthUnit] || 'Inches', + verticalResolution: verticalResolution, + verticalResolutionUnit: RESOLUTION_UNITS[verticalResolutionUnit] || 'PPI', + heightUnit: MEASUREMENT_UNITS[heightUnit] || 'Inches', + }; +}, function (writer, target) { + var info = target.resolutionInfo; + (0, psdWriter_1.writeFixedPoint32)(writer, info.horizontalResolution || 0); + (0, psdWriter_1.writeUint16)(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.horizontalResolutionUnit))); + (0, psdWriter_1.writeUint16)(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.widthUnit))); + (0, psdWriter_1.writeFixedPoint32)(writer, info.verticalResolution || 0); + (0, psdWriter_1.writeUint16)(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.verticalResolutionUnit))); + (0, psdWriter_1.writeUint16)(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.heightUnit))); +}); +var printScaleStyles = ['centered', 'size to fit', 'user defined']; +addHandler(1062, function (target) { return target.printScale !== undefined; }, function (reader, target) { + target.printScale = { + style: printScaleStyles[(0, psdReader_1.readInt16)(reader)], + x: (0, psdReader_1.readFloat32)(reader), + y: (0, psdReader_1.readFloat32)(reader), + scale: (0, psdReader_1.readFloat32)(reader), + }; +}, function (writer, target) { + var _a = target.printScale, style = _a.style, x = _a.x, y = _a.y, scale = _a.scale; + (0, psdWriter_1.writeInt16)(writer, Math.max(0, printScaleStyles.indexOf(style))); + (0, psdWriter_1.writeFloat32)(writer, x || 0); + (0, psdWriter_1.writeFloat32)(writer, y || 0); + (0, psdWriter_1.writeFloat32)(writer, scale || 0); +}); +addHandler(1006, function (target) { return target.alphaChannelNames !== undefined; }, function (reader, target, left) { + target.alphaChannelNames = []; + while (left()) { + var value = (0, psdReader_1.readPascalString)(reader, 1); + target.alphaChannelNames.push(value); + } +}, function (writer, target) { + for (var _i = 0, _a = target.alphaChannelNames; _i < _a.length; _i++) { + var name_1 = _a[_i]; + (0, psdWriter_1.writePascalString)(writer, name_1, 1); + } +}); +addHandler(1045, function (target) { return target.alphaChannelNames !== undefined; }, function (reader, target, left) { + target.alphaChannelNames = []; + while (left()) { + target.alphaChannelNames.push((0, psdReader_1.readUnicodeString)(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.alphaChannelNames; _i < _a.length; _i++) { + var name_2 = _a[_i]; + (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, name_2); + } +}); +helpers_1.MOCK_HANDLERS && addHandler(1077, function (target) { return target._ir1077 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1077', left()); + target._ir1077 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1077); +}); +addHandler(1053, function (target) { return target.alphaIdentifiers !== undefined; }, function (reader, target, left) { + target.alphaIdentifiers = []; + while (left() >= 4) { + target.alphaIdentifiers.push((0, psdReader_1.readUint32)(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.alphaIdentifiers; _i < _a.length; _i++) { + var id = _a[_i]; + (0, psdWriter_1.writeUint32)(writer, id); + } +}); +addHandler(1010, function (target) { return target.backgroundColor !== undefined; }, function (reader, target) { return target.backgroundColor = (0, psdReader_1.readColor)(reader); }, function (writer, target) { return (0, psdWriter_1.writeColor)(writer, target.backgroundColor); }); +addHandler(1037, function (target) { return target.globalAngle !== undefined; }, function (reader, target) { return target.globalAngle = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.globalAngle); }); +addHandler(1049, function (target) { return target.globalAltitude !== undefined; }, function (reader, target) { return target.globalAltitude = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.globalAltitude); }); +addHandler(1011, function (target) { return target.printFlags !== undefined; }, function (reader, target) { + target.printFlags = { + labels: !!(0, psdReader_1.readUint8)(reader), + cropMarks: !!(0, psdReader_1.readUint8)(reader), + colorBars: !!(0, psdReader_1.readUint8)(reader), + registrationMarks: !!(0, psdReader_1.readUint8)(reader), + negative: !!(0, psdReader_1.readUint8)(reader), + flip: !!(0, psdReader_1.readUint8)(reader), + interpolate: !!(0, psdReader_1.readUint8)(reader), + caption: !!(0, psdReader_1.readUint8)(reader), + printFlags: !!(0, psdReader_1.readUint8)(reader), + }; +}, function (writer, target) { + var flags = target.printFlags; + (0, psdWriter_1.writeUint8)(writer, flags.labels ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.cropMarks ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.colorBars ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.registrationMarks ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.negative ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.flip ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.interpolate ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.caption ? 1 : 0); + (0, psdWriter_1.writeUint8)(writer, flags.printFlags ? 1 : 0); +}); +helpers_1.MOCK_HANDLERS && addHandler(10000, // Print flags +function (// Print flags +target) { return target._ir10000 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 10000', left()); + target._ir10000 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir10000); +}); +helpers_1.MOCK_HANDLERS && addHandler(1013, // Color halftoning +function (// Color halftoning +target) { return target._ir1013 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1013', left()); + target._ir1013 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1013); +}); +helpers_1.MOCK_HANDLERS && addHandler(1016, // Color transfer functions +function (// Color transfer functions +target) { return target._ir1016 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1016', left()); + target._ir1016 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1016); +}); +addHandler(1024, function (target) { return target.layerState !== undefined; }, function (reader, target) { return target.layerState = (0, psdReader_1.readUint16)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint16)(writer, target.layerState); }); +addHandler(1026, function (target) { return target.layersGroup !== undefined; }, function (reader, target, left) { + target.layersGroup = []; + while (left()) { + target.layersGroup.push((0, psdReader_1.readUint16)(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.layersGroup; _i < _a.length; _i++) { + var g = _a[_i]; + (0, psdWriter_1.writeUint16)(writer, g); + } +}); +addHandler(1072, function (target) { return target.layerGroupsEnabledId !== undefined; }, function (reader, target, left) { + target.layerGroupsEnabledId = []; + while (left()) { + target.layerGroupsEnabledId.push((0, psdReader_1.readUint8)(reader)); + } +}, function (writer, target) { + for (var _i = 0, _a = target.layerGroupsEnabledId; _i < _a.length; _i++) { + var id = _a[_i]; + (0, psdWriter_1.writeUint8)(writer, id); + } +}); +addHandler(1069, function (target) { return target.layerSelectionIds !== undefined; }, function (reader, target) { + var count = (0, psdReader_1.readUint16)(reader); + target.layerSelectionIds = []; + while (count--) { + target.layerSelectionIds.push((0, psdReader_1.readUint32)(reader)); + } +}, function (writer, target) { + (0, psdWriter_1.writeUint16)(writer, target.layerSelectionIds.length); + for (var _i = 0, _a = target.layerSelectionIds; _i < _a.length; _i++) { + var id = _a[_i]; + (0, psdWriter_1.writeUint32)(writer, id); + } +}); +addHandler(1032, function (target) { return target.gridAndGuidesInformation !== undefined; }, function (reader, target) { + var version = (0, psdReader_1.readUint32)(reader); + var horizontal = (0, psdReader_1.readUint32)(reader); + var vertical = (0, psdReader_1.readUint32)(reader); + var count = (0, psdReader_1.readUint32)(reader); + if (version !== 1) + throw new Error("Invalid 1032 resource version: ".concat(version)); + target.gridAndGuidesInformation = { + grid: { horizontal: horizontal, vertical: vertical }, + guides: [], + }; + for (var i = 0; i < count; i++) { + target.gridAndGuidesInformation.guides.push({ + location: (0, psdReader_1.readUint32)(reader) / 32, + direction: (0, psdReader_1.readUint8)(reader) ? 'horizontal' : 'vertical' + }); + } +}, function (writer, target) { + var info = target.gridAndGuidesInformation; + var grid = info.grid || { horizontal: 18 * 32, vertical: 18 * 32 }; + var guides = info.guides || []; + (0, psdWriter_1.writeUint32)(writer, 1); + (0, psdWriter_1.writeUint32)(writer, grid.horizontal); + (0, psdWriter_1.writeUint32)(writer, grid.vertical); + (0, psdWriter_1.writeUint32)(writer, guides.length); + for (var _i = 0, guides_1 = guides; _i < guides_1.length; _i++) { + var g = guides_1[_i]; + (0, psdWriter_1.writeUint32)(writer, g.location * 32); + (0, psdWriter_1.writeUint8)(writer, g.direction === 'horizontal' ? 1 : 0); + } +}); +// 0 - normal, 7 - multiply, 8 - screen, 23 - difference +var onionSkinsBlendModes = [ + 'normal', undefined, undefined, undefined, undefined, undefined, undefined, 'multiply', + 'screen', undefined, undefined, undefined, undefined, undefined, undefined, undefined, + undefined, undefined, undefined, undefined, undefined, undefined, undefined, 'difference', +]; +addHandler(1078, // Onion Skins +function (// Onion Skins +target) { return target.onionSkins !== undefined; }, function (reader, target) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log('1078', require('util').inspect(desc, false, 99, true)); + target.onionSkins = { + enabled: desc.enab, + framesBefore: desc.numBefore, + framesAfter: desc.numAfter, + frameSpacing: desc.Spcn, + minOpacity: desc.minOpacity / 100, + maxOpacity: desc.maxOpacity / 100, + blendMode: onionSkinsBlendModes[desc.BlnM] || 'normal', + }; +}, function (writer, target) { + var onionSkins = target.onionSkins; + var desc = { + Vrsn: 1, + enab: onionSkins.enabled, + numBefore: onionSkins.framesBefore, + numAfter: onionSkins.framesAfter, + Spcn: onionSkins.frameSpacing, + minOpacity: (onionSkins.minOpacity * 100) | 0, + maxOpacity: (onionSkins.maxOpacity * 100) | 0, + BlnM: Math.max(0, onionSkinsBlendModes.indexOf(onionSkins.blendMode)), + }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler(1075, // Timeline Information +function (// Timeline Information +target) { return target.timelineInformation !== undefined; }, function (reader, target, _, options) { + var _a, _b; + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log('1075', require('util').inspect(desc, false, 99, true)); + target.timelineInformation = { + enabled: desc.enab, + frameStep: desc.frameStep, + frameRate: desc.frameRate, + time: desc.time, + duration: desc.duration, + workInTime: desc.workInTime, + workOutTime: desc.workOutTime, + repeats: desc.LCnt, + hasMotion: desc.hasMotion, + globalTracks: (0, descriptor_1.parseTrackList)(desc.globalTrackList, !!options.logMissingFeatures), + }; + if ((_b = (_a = desc.audioClipGroupList) === null || _a === void 0 ? void 0 : _a.audioClipGroupList) === null || _b === void 0 ? void 0 : _b.length) { + target.timelineInformation.audioClipGroups = desc.audioClipGroupList.audioClipGroupList.map(function (g) { return ({ + id: g.groupID, + muted: g.muted, + audioClips: g.audioClipList.map(function (_a) { + var clipID = _a.clipID, timeScope = _a.timeScope, muted = _a.muted, audioLevel = _a.audioLevel, frameReader = _a.frameReader; + return ({ + id: clipID, + start: timeScope.Strt, + duration: timeScope.duration, + inTime: timeScope.inTime, + outTime: timeScope.outTime, + muted: muted, + audioLevel: audioLevel, + frameReader: { + type: frameReader.frameReaderType, + mediaDescriptor: frameReader.mediaDescriptor, + link: { + name: frameReader['Lnk ']['Nm '], + fullPath: frameReader['Lnk '].fullPath, + relativePath: frameReader['Lnk '].relPath, + }, + }, + }); + }), + }); }); + } +}, function (writer, target) { + var _a; + var timeline = target.timelineInformation; + var desc = { + Vrsn: 1, + enab: timeline.enabled, + frameStep: timeline.frameStep, + frameRate: timeline.frameRate, + time: timeline.time, + duration: timeline.duration, + workInTime: timeline.workInTime, + workOutTime: timeline.workOutTime, + LCnt: timeline.repeats, + globalTrackList: (0, descriptor_1.serializeTrackList)(timeline.globalTracks), + audioClipGroupList: { + audioClipGroupList: (_a = timeline.audioClipGroups) === null || _a === void 0 ? void 0 : _a.map(function (a) { return ({ + groupID: a.id, + muted: a.muted, + audioClipList: a.audioClips.map(function (c) { return ({ + clipID: c.id, + timeScope: { + Vrsn: 1, + Strt: c.start, + duration: c.duration, + inTime: c.inTime, + outTime: c.outTime, + }, + frameReader: { + frameReaderType: c.frameReader.type, + descVersion: 1, + 'Lnk ': { + descVersion: 1, + 'Nm ': c.frameReader.link.name, + fullPath: c.frameReader.link.fullPath, + relPath: c.frameReader.link.relativePath, + }, + mediaDescriptor: c.frameReader.mediaDescriptor, + }, + muted: c.muted, + audioLevel: c.audioLevel, + }); }), + }); }), + }, + hasMotion: timeline.hasMotion, + }; + // console.log('WRITE:1075', require('util').inspect(desc, false, 99, true)); + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc, 'anim'); +}); +addHandler(1076, // Sheet Disclosure +function (// Sheet Disclosure +target) { return target.sheetDisclosure !== undefined; }, function (reader, target) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log('1076', require('util').inspect(desc, false, 99, true)); + target.sheetDisclosure = {}; + if (desc.sheetTimelineOptions) { + target.sheetDisclosure.sheetTimelineOptions = desc.sheetTimelineOptions.map(function (o) { return ({ + sheetID: o.sheetID, + sheetDisclosed: o.sheetDisclosed, + lightsDisclosed: o.lightsDisclosed, + meshesDisclosed: o.meshesDisclosed, + materialsDisclosed: o.materialsDisclosed, + }); }); + } +}, function (writer, target) { + var disclosure = target.sheetDisclosure; + var desc = { Vrsn: 1 }; + if (disclosure.sheetTimelineOptions) { + desc.sheetTimelineOptions = disclosure.sheetTimelineOptions.map(function (d) { return ({ + Vrsn: 2, + sheetID: d.sheetID, + sheetDisclosed: d.sheetDisclosed, + lightsDisclosed: d.lightsDisclosed, + meshesDisclosed: d.meshesDisclosed, + materialsDisclosed: d.materialsDisclosed, + }); }); + } + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +addHandler(1054, function (target) { return target.urlsList !== undefined; }, function (reader, target, _, options) { + var count = (0, psdReader_1.readUint32)(reader); + if (count) { + if (!options.throwForMissingFeatures) + return; + throw new Error('Not implemented: URL List'); + } + // TODO: read actual URL list + target.urlsList = []; +}, function (writer, target) { + (0, psdWriter_1.writeUint32)(writer, target.urlsList.length); + // TODO: write actual URL list + if (target.urlsList.length) { + throw new Error('Not implemented: URL List'); + } +}); +helpers_1.MOCK_HANDLERS && addHandler(1050, // Slices +function (// Slices +target) { return target._ir1050 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1050', left()); + target._ir1050 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1050); +}); +addHandler(1064, function (target) { return target.pixelAspectRatio !== undefined; }, function (reader, target) { + if ((0, psdReader_1.readUint32)(reader) > 2) + throw new Error('Invalid pixelAspectRatio version'); + target.pixelAspectRatio = { aspect: (0, psdReader_1.readFloat64)(reader) }; +}, function (writer, target) { + (0, psdWriter_1.writeUint32)(writer, 2); // version + (0, psdWriter_1.writeFloat64)(writer, target.pixelAspectRatio.aspect); +}); +addHandler(1041, function (target) { return target.iccUntaggedProfile !== undefined; }, function (reader, target) { + target.iccUntaggedProfile = !!(0, psdReader_1.readUint8)(reader); +}, function (writer, target) { + (0, psdWriter_1.writeUint8)(writer, target.iccUntaggedProfile ? 1 : 0); +}); +helpers_1.MOCK_HANDLERS && addHandler(1039, // ICC Profile +function (// ICC Profile +target) { return target._ir1039 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1039', left()); + target._ir1039 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1039); +}); +addHandler(1044, function (target) { return target.idsSeedNumber !== undefined; }, function (reader, target) { return target.idsSeedNumber = (0, psdReader_1.readUint32)(reader); }, function (writer, target) { return (0, psdWriter_1.writeUint32)(writer, target.idsSeedNumber); }); +addHandler(1036, function (target) { return target.thumbnail !== undefined || target.thumbnailRaw !== undefined; }, function (reader, target, left, options) { + var format = (0, psdReader_1.readUint32)(reader); // 1 = kJpegRGB, 0 = kRawRGB + var width = (0, psdReader_1.readUint32)(reader); + var height = (0, psdReader_1.readUint32)(reader); + (0, psdReader_1.readUint32)(reader); // widthBytes = (width * bits_per_pixel + 31) / 32 * 4. + (0, psdReader_1.readUint32)(reader); // totalSize = widthBytes * height * planes + (0, psdReader_1.readUint32)(reader); // sizeAfterCompression + var bitsPerPixel = (0, psdReader_1.readUint16)(reader); // 24 + var planes = (0, psdReader_1.readUint16)(reader); // 1 + if (format !== 1 || bitsPerPixel !== 24 || planes !== 1) { + options.logMissingFeatures && console.log("Invalid thumbnail data (format: ".concat(format, ", bitsPerPixel: ").concat(bitsPerPixel, ", planes: ").concat(planes, ")")); + (0, psdReader_1.skipBytes)(reader, left()); + return; + } + var size = left(); + var data = (0, psdReader_1.readBytes)(reader, size); + if (options.useRawThumbnail) { + target.thumbnailRaw = { width: width, height: height, data: data }; + } + else if (data.byteLength) { + target.thumbnail = (0, helpers_1.createCanvasFromData)(data); + } +}, function (writer, target) { + var _a; + var width = 0; + var height = 0; + var data; + if (target.thumbnailRaw) { + width = target.thumbnailRaw.width; + height = target.thumbnailRaw.height; + data = target.thumbnailRaw.data; + } + else { + var dataUrl = (_a = target.thumbnail.toDataURL('image/jpeg', 1)) === null || _a === void 0 ? void 0 : _a.substring('data:image/jpeg;base64,'.length); + if (dataUrl) { + width = target.thumbnail.width; + height = target.thumbnail.height; + data = (0, base64_js_1.toByteArray)(dataUrl); + } + else { + data = new Uint8Array(0); + } + } + var bitsPerPixel = 24; + var widthBytes = Math.floor((width * bitsPerPixel + 31) / 32) * 4; + var planes = 1; + var totalSize = widthBytes * height * planes; + var sizeAfterCompression = data.length; + (0, psdWriter_1.writeUint32)(writer, 1); // 1 = kJpegRGB + (0, psdWriter_1.writeUint32)(writer, width); + (0, psdWriter_1.writeUint32)(writer, height); + (0, psdWriter_1.writeUint32)(writer, widthBytes); + (0, psdWriter_1.writeUint32)(writer, totalSize); + (0, psdWriter_1.writeUint32)(writer, sizeAfterCompression); + (0, psdWriter_1.writeUint16)(writer, bitsPerPixel); + (0, psdWriter_1.writeUint16)(writer, planes); + (0, psdWriter_1.writeBytes)(writer, data); +}); +addHandler(1057, function (target) { return target.versionInfo !== undefined; }, function (reader, target, left) { + var version = (0, psdReader_1.readUint32)(reader); + if (version !== 1) + throw new Error('Invalid versionInfo version'); + target.versionInfo = { + hasRealMergedData: !!(0, psdReader_1.readUint8)(reader), + writerName: (0, psdReader_1.readUnicodeString)(reader), + readerName: (0, psdReader_1.readUnicodeString)(reader), + fileVersion: (0, psdReader_1.readUint32)(reader), + }; + (0, psdReader_1.skipBytes)(reader, left()); +}, function (writer, target) { + var versionInfo = target.versionInfo; + (0, psdWriter_1.writeUint32)(writer, 1); // version + (0, psdWriter_1.writeUint8)(writer, versionInfo.hasRealMergedData ? 1 : 0); + (0, psdWriter_1.writeUnicodeString)(writer, versionInfo.writerName); + (0, psdWriter_1.writeUnicodeString)(writer, versionInfo.readerName); + (0, psdWriter_1.writeUint32)(writer, versionInfo.fileVersion); +}); +helpers_1.MOCK_HANDLERS && addHandler(1058, // EXIF data 1. +function (// EXIF data 1. +target) { return target._ir1058 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1058', left()); + target._ir1058 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1058); +}); +addHandler(7000, function (target) { return target.imageReadyVariables !== undefined; }, function (reader, target, left) { + target.imageReadyVariables = readUtf8String(reader, left()); +}, function (writer, target) { + writeUtf8String(writer, target.imageReadyVariables); +}); +addHandler(7001, function (target) { return target.imageReadyDataSets !== undefined; }, function (reader, target, left) { + target.imageReadyDataSets = readUtf8String(reader, left()); +}, function (writer, target) { + writeUtf8String(writer, target.imageReadyDataSets); +}); +addHandler(1088, function (target) { return target.pathSelectionState !== undefined; }, function (reader, target, _left) { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + // console.log(require('util').inspect(desc, false, 99, true)); + target.pathSelectionState = desc['null']; +}, function (writer, target) { + var desc = { 'null': target.pathSelectionState }; + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); +}); +helpers_1.MOCK_HANDLERS && addHandler(1025, function (target) { return target._ir1025 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 1025', left()); + target._ir1025 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir1025); +}); +var FrmD = (0, helpers_1.createEnum)('FrmD', '', { + auto: 'Auto', + none: 'None', + dispose: 'Disp', +}); +addHandler(4000, // Plug-In resource(s) +function (// Plug-In resource(s) +target) { return target.animations !== undefined; }, function (reader, target, left, _a) { + var logMissingFeatures = _a.logMissingFeatures, logDevFeatures = _a.logDevFeatures; + var key = (0, psdReader_1.readSignature)(reader); + if (key === 'mani') { + (0, psdReader_1.checkSignature)(reader, 'IRFR'); + (0, psdReader_1.readSection)(reader, 1, function (left) { + var _loop_1 = function () { + (0, psdReader_1.checkSignature)(reader, '8BIM'); + var key_1 = (0, psdReader_1.readSignature)(reader); + (0, psdReader_1.readSection)(reader, 1, function (left) { + if (key_1 === 'AnDs') { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + target.animations = { + // desc.AFSt ??? + frames: desc.FrIn.map(function (x) { return ({ + id: x.FrID, + delay: (x.FrDl || 0) / 100, + dispose: x.FrDs ? FrmD.decode(x.FrDs) : 'auto', // missing == auto + // x.FrGA ??? + }); }), + animations: desc.FSts.map(function (x) { return ({ + id: x.FsID, + frames: x.FsFr, + repeats: x.LCnt, + activeFrame: x.AFrm || 0, + }); }), + }; + // console.log('#4000 AnDs', require('util').inspect(desc, false, 99, true)); + // console.log('#4000 AnDs:result', require('util').inspect(target.animations, false, 99, true)); + } + else if (key_1 === 'Roll') { + var bytes = (0, psdReader_1.readBytes)(reader, left()); + logDevFeatures && console.log('#4000 Roll', bytes); + } + else { + logMissingFeatures && console.log('Unhandled subsection in #4000', key_1); + } + }); + }; + while (left()) { + _loop_1(); + } + }); + } + else if (key === 'mopt') { + var bytes = (0, psdReader_1.readBytes)(reader, left()); + logDevFeatures && console.log('#4000 mopt', bytes); + } + else { + logMissingFeatures && console.log('Unhandled key in #4000:', key); + } +}, function (writer, target) { + if (target.animations) { + (0, psdWriter_1.writeSignature)(writer, 'mani'); + (0, psdWriter_1.writeSignature)(writer, 'IRFR'); + (0, psdWriter_1.writeSection)(writer, 1, function () { + (0, psdWriter_1.writeSignature)(writer, '8BIM'); + (0, psdWriter_1.writeSignature)(writer, 'AnDs'); + (0, psdWriter_1.writeSection)(writer, 1, function () { + var desc = { + // AFSt: 0, // ??? + FrIn: [], + FSts: [], + }; + for (var i = 0; i < target.animations.frames.length; i++) { + var f = target.animations.frames[i]; + var frame = { + FrID: f.id, + }; + if (f.delay) + frame.FrDl = (f.delay * 100) | 0; + frame.FrDs = FrmD.encode(f.dispose); + // if (i === 0) frame.FrGA = 30; // ??? + desc.FrIn.push(frame); + } + for (var i = 0; i < target.animations.animations.length; i++) { + var a = target.animations.animations[i]; + var anim = { + FsID: a.id, + AFrm: a.activeFrame | 0, + FsFr: a.frames, + LCnt: a.repeats | 0, + }; + desc.FSts.push(anim); + } + (0, descriptor_1.writeVersionAndDescriptor)(writer, '', 'null', desc); + }); + // writeSignature(writer, '8BIM'); + // writeSignature(writer, 'Roll'); + // writeSection(writer, 1, () => { + // writeZeros(writer, 8); + // }); + }); + } +}); +// TODO: Unfinished +helpers_1.MOCK_HANDLERS && addHandler(4001, // Plug-In resource(s) +function (// Plug-In resource(s) +target) { return target._ir4001 !== undefined; }, function (reader, target, left, _a) { + var logMissingFeatures = _a.logMissingFeatures, logDevFeatures = _a.logDevFeatures; + if (helpers_1.MOCK_HANDLERS) { + LOG_MOCK_HANDLERS && console.log('image resource 4001', left()); + target._ir4001 = (0, psdReader_1.readBytes)(reader, left()); + return; + } + var key = (0, psdReader_1.readSignature)(reader); + if (key === 'mfri') { + var version = (0, psdReader_1.readUint32)(reader); + if (version !== 2) + throw new Error('Invalid mfri version'); + var length_1 = (0, psdReader_1.readUint32)(reader); + var bytes = (0, psdReader_1.readBytes)(reader, length_1); + logDevFeatures && console.log('mfri', bytes); + } + else if (key === 'mset') { + var desc = (0, descriptor_1.readVersionAndDescriptor)(reader); + logDevFeatures && console.log('mset', desc); + } + else { + logMissingFeatures && console.log('Unhandled key in #4001', key); + } +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir4001); +}); +// TODO: Unfinished +helpers_1.MOCK_HANDLERS && addHandler(4002, // Plug-In resource(s) +function (// Plug-In resource(s) +target) { return target._ir4002 !== undefined; }, function (reader, target, left) { + LOG_MOCK_HANDLERS && console.log('image resource 4002', left()); + target._ir4002 = (0, psdReader_1.readBytes)(reader, left()); +}, function (writer, target) { + (0, psdWriter_1.writeBytes)(writer, target._ir4002); +}); + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImltYWdlUmVzb3VyY2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHVDQUF3QztBQUV4Qyx5Q0FJcUI7QUFDckIseUNBSXFCO0FBQ3JCLHFDQUE0RTtBQUM1RSwrQkFBb0Q7QUFDcEQsMkNBQXlMO0FBUzVLLFFBQUEsZ0JBQWdCLEdBQXNCLEVBQUUsQ0FBQztBQUN6QyxRQUFBLG1CQUFtQixHQUF1QyxFQUFFLENBQUM7QUFFMUUsU0FBUyxVQUFVLENBQ2xCLEdBQVcsRUFDWCxHQUF3QyxFQUN4QyxJQUFtRyxFQUNuRyxLQUEwRDtJQUUxRCxJQUFNLE9BQU8sR0FBb0IsRUFBRSxHQUFHLEtBQUEsRUFBRSxHQUFHLEtBQUEsRUFBRSxJQUFJLE1BQUEsRUFBRSxLQUFLLE9BQUEsRUFBRSxDQUFDO0lBQzNELHdCQUFnQixDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUMvQiwyQkFBbUIsQ0FBQyxPQUFPLENBQUMsR0FBRyxDQUFDLEdBQUcsT0FBTyxDQUFDO0FBQzVDLENBQUM7QUFFRCxJQUFNLGlCQUFpQixHQUFHLEtBQUssQ0FBQztBQUNoQyxJQUFNLGdCQUFnQixHQUFHLENBQUMsU0FBUyxFQUFFLEtBQUssRUFBRSxNQUFNLENBQUMsQ0FBQztBQUNwRCxJQUFNLGlCQUFpQixHQUFHLENBQUMsU0FBUyxFQUFFLFFBQVEsRUFBRSxhQUFhLEVBQUUsUUFBUSxFQUFFLE9BQU8sRUFBRSxTQUFTLENBQUMsQ0FB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ICYmIGNvbnNvbGUubG9nKCdVbmhhbmRsZWQga2V5IGluICM0MDAxJywga2V5KTtcblx0XHR9XG5cdH0sXG5cdCh3cml0ZXIsIHRhcmdldCkgPT4ge1xuXHRcdHdyaXRlQnl0ZXMod3JpdGVyLCAodGFyZ2V0IGFzIGFueSkuX2lyNDAwMSk7XG5cdH0sXG4pO1xuXG4vLyBUT0RPOiBVbmZpbmlzaGVkXG5NT0NLX0hBTkRMRVJTICYmIGFkZEhhbmRsZXIoXG5cdDQwMDIsIC8vIFBsdWctSW4gcmVzb3VyY2Uocylcblx0dGFyZ2V0ID0+ICh0YXJnZXQgYXMgYW55KS5faXI0MDAyICE9PSB1bmRlZmluZWQsXG5cdChyZWFkZXIsIHRhcmdldCwgbGVmdCkgPT4ge1xuXHRcdExPR19NT0NLX0hBTkRMRVJTICYmIGNvbnNvbGUubG9nKCdpbWFnZSByZXNvdXJjZSA0MDAyJywgbGVmdCgpKTtcblx0XHQodGFyZ2V0IGFzIGFueSkuX2lyNDAwMiA9IHJlYWRCeXRlcyhyZWFkZXIsIGxlZnQoKSk7XG5cdH0sXG5cdCh3cml0ZXIsIHRhcmdldCkgPT4ge1xuXHRcdHdyaXRlQnl0ZXMod3JpdGVyLCAodGFyZ2V0IGFzIGFueSkuX2lyNDAwMik7XG5cdH0sXG4pO1xuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/imageResources.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/imageResources.js.map deleted file mode 100644 index ed41a7c..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/imageResources.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"imageResources.js","sourceRoot":"../src/","sources":["imageResources.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,uCAAwC;AAExC,yCAIqB;AACrB,yCAIqB;AACrB,qCAA4E;AAC5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pB,iBAAiB,IAAI,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,EAAE,CAAC,CAAC;IAC/D,MAAc,CAAC,OAAO,GAAG,IAAA,qBAAS,EAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AACrD,CAAC,EACD,UAAC,MAAM,EAAE,MAAM;IACd,IAAA,sBAAU,EAAC,MAAM,EAAG,MAAc,CAAC,OAAO,CAAC,CAAC;AAC7C,CAAC,CACD,CAAC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/index.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/index.d.ts index 3df1283..d44d884 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/index.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/index.d.ts @@ -1,20 +1,20 @@ -/// -import { Psd, ReadOptions, WriteOptions } from './psd'; -import { PsdWriter } from './psdWriter'; -import { PsdReader } from './psdReader'; -export * from './abr'; -export * from './csh'; -export { initializeCanvas } from './helpers'; -export * from './psd'; -import { fromByteArray } from 'base64-js'; -export { PsdReader, PsdWriter }; -interface BufferLike { - buffer: ArrayBuffer; - byteOffset: number; - byteLength: number; -} -export declare const byteArrayToBase64: typeof fromByteArray; -export declare function readPsd(buffer: ArrayBuffer | BufferLike, options?: ReadOptions): Psd; -export declare function writePsd(psd: Psd, options?: WriteOptions): ArrayBuffer; -export declare function writePsdUint8Array(psd: Psd, options?: WriteOptions): Uint8Array; -export declare function writePsdBuffer(psd: Psd, options?: WriteOptions): Buffer; +/// +import { Psd, ReadOptions, WriteOptions } from './psd'; +import { PsdWriter } from './psdWriter'; +import { PsdReader } from './psdReader'; +export * from './abr'; +export * from './csh'; +export { initializeCanvas } from './helpers'; +export * from './psd'; +import { fromByteArray } from 'base64-js'; +export { PsdReader, PsdWriter }; +interface BufferLike { + buffer: ArrayBuffer; + byteOffset: number; + byteLength: number; +} +export declare const byteArrayToBase64: typeof fromByteArray; +export declare function readPsd(buffer: ArrayBuffer | BufferLike, options?: ReadOptions): Psd; +export declare function writePsd(psd: Psd, options?: WriteOptions): ArrayBuffer; +export declare function writePsdUint8Array(psd: Psd, options?: WriteOptions): Uint8Array; +export declare function writePsdBuffer(psd: Psd, options?: WriteOptions): Buffer; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/index.js b/npm-packages/mac-v2.4.x/ag-psd/dist/index.js index 34155ce..beb324d 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/index.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/index.js @@ -1,53 +1,54 @@ -"use strict"; -var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - var desc = Object.getOwnPropertyDescriptor(m, k); - if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { - desc = { enumerable: true, get: function() { return m[k]; } }; - } - Object.defineProperty(o, k2, desc); -}) : (function(o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; -})); -var __exportStar = (this && this.__exportStar) || function(m, exports) { - for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.writePsdBuffer = exports.writePsdUint8Array = exports.writePsd = exports.readPsd = exports.byteArrayToBase64 = exports.initializeCanvas = void 0; -var psdWriter_1 = require("./psdWriter"); -var psdReader_1 = require("./psdReader"); -__exportStar(require("./abr"), exports); -__exportStar(require("./csh"), exports); -var helpers_1 = require("./helpers"); -Object.defineProperty(exports, "initializeCanvas", { enumerable: true, get: function () { return helpers_1.initializeCanvas; } }); -__exportStar(require("./psd"), exports); -var base64_js_1 = require("base64-js"); -exports.byteArrayToBase64 = base64_js_1.fromByteArray; -function readPsd(buffer, options) { - var reader = 'buffer' in buffer ? - (0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength) : - (0, psdReader_1.createReader)(buffer); - return (0, psdReader_1.readPsd)(reader, options); -} -exports.readPsd = readPsd; -function writePsd(psd, options) { - var writer = (0, psdWriter_1.createWriter)(); - (0, psdWriter_1.writePsd)(writer, psd, options); - return (0, psdWriter_1.getWriterBuffer)(writer); -} -exports.writePsd = writePsd; -function writePsdUint8Array(psd, options) { - var writer = (0, psdWriter_1.createWriter)(); - (0, psdWriter_1.writePsd)(writer, psd, options); - return (0, psdWriter_1.getWriterBufferNoCopy)(writer); -} -exports.writePsdUint8Array = writePsdUint8Array; -function writePsdBuffer(psd, options) { - if (typeof Buffer === 'undefined') { - throw new Error('Buffer not supported on this platform'); - } - return Buffer.from(writePsdUint8Array(psd, options)); -} -exports.writePsdBuffer = writePsdBuffer; -//# sourceMappingURL=index.js.map \ No newline at end of file +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + var desc = Object.getOwnPropertyDescriptor(m, k); + if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { + desc = { enumerable: true, get: function() { return m[k]; } }; + } + Object.defineProperty(o, k2, desc); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writePsdBuffer = exports.writePsdUint8Array = exports.writePsd = exports.readPsd = exports.byteArrayToBase64 = exports.initializeCanvas = void 0; +var psdWriter_1 = require("./psdWriter"); +var psdReader_1 = require("./psdReader"); +__exportStar(require("./abr"), exports); +__exportStar(require("./csh"), exports); +var helpers_1 = require("./helpers"); +Object.defineProperty(exports, "initializeCanvas", { enumerable: true, get: function () { return helpers_1.initializeCanvas; } }); +__exportStar(require("./psd"), exports); +var base64_js_1 = require("base64-js"); +exports.byteArrayToBase64 = base64_js_1.fromByteArray; +function readPsd(buffer, options) { + var reader = 'buffer' in buffer ? + (0, psdReader_1.createReader)(buffer.buffer, buffer.byteOffset, buffer.byteLength) : + (0, psdReader_1.createReader)(buffer); + return (0, psdReader_1.readPsd)(reader, options); +} +exports.readPsd = readPsd; +function writePsd(psd, options) { + var writer = (0, psdWriter_1.createWriter)(); + (0, psdWriter_1.writePsd)(writer, psd, options); + return (0, psdWriter_1.getWriterBuffer)(writer); +} +exports.writePsd = writePsd; +function writePsdUint8Array(psd, options) { + var writer = (0, psdWriter_1.createWriter)(); + (0, psdWriter_1.writePsd)(writer, psd, options); + return (0, psdWriter_1.getWriterBufferNoCopy)(writer); +} +exports.writePsdUint8Array = writePsdUint8Array; +function writePsdBuffer(psd, options) { + if (typeof Buffer === 'undefined') { + throw new Error('Buffer not supported on this platform'); + } + return Buffer.from(writePsdUint8Array(psd, options)); +} +exports.writePsdBuffer = writePsdBuffer; + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQ0EseUNBQTRIO0FBQzVILHlDQUFrRjtBQUNsRix3Q0FBc0I7QUFDdEIsd0NBQXNCO0FBQ3RCLHFDQUE2QztBQUFwQywyR0FBQSxnQkFBZ0IsT0FBQTtBQUN6Qix3Q0FBc0I7QUFDdEIsdUNBQTBDO0FBUzdCLFFBQUEsaUJBQWlCLEdBQUcseUJBQWEsQ0FBQztBQUUvQyxTQUFnQixPQUFPLENBQUMsTUFBZ0MsRUFBRSxPQUFxQjtJQUM5RSxJQUFNLE1BQU0sR0FBRyxRQUFRLElBQUksTUFBTSxDQUFDLENBQUM7UUFDbEMsSUFBQSx3QkFBWSxFQUFDLE1BQU0sQ0FBQyxNQUFNLEVBQUUsTUFBTSxDQUFDLFVBQVUsRUFBRSxNQUFNLENBQUMsVUFBVSxDQUFDLENBQUMsQ0FBQztRQUNuRSxJQUFBLHdCQUFZ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ist/index.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/index.js.map deleted file mode 100644 index 0fc2477..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,yCAA4H;AAC5H,yCAAkF;AAClF,wCAAsB;AACtB,wCAAsB;AACtB,qCAA6C;AAApC,2GAAA,gBAAgB,OAAA;AACzB,wCAAsB;AACtB,uCAA0C;AAS7B,QAAA,iBAAiB,GAAG,yBAAa,CAAC;AAE/C,SAAgB,OAAO,CAAC,MAAgC,EAAE,OAAqB;IAC9E,IAAM,MAAM,GAAG,QAAQ,IAAI,MAAM,CAAC,CAAC;QAClC,IAAA,wBAAY,EAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;QACnE,IAAA,wBAAY,EAAC,MAAM,CAAC,CAAC;IACtB,OAAO,IAAA,mBAAe,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AACzC,CAAC;AALD,0BAKC;AAED,SAAgB,QAAQ,CAAC,GAAQ,EAAE,OAAsB;IACxD,IAAM,MAAM,GAAG,IAAA,wBAAY,GAAE,CAAC;IAC9B,IAAA,oBAAgB,EAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACvC,OAAO,IAAA,2BAAe,EAAC,MAAM,CAAC,CAAC;AAChC,CAAC;AAJD,4BAIC;AAED,SAAgB,kBAAkB,CAAC,GAAQ,EAAE,OAAsB;IAClE,IAAM,MAAM,GAAG,IAAA,wBAAY,GAAE,CAAC;IAC9B,IAAA,oBAAgB,EAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC;IACvC,OAAO,IAAA,iCAAqB,EAAC,MAAM,CAAC,CAAC;AACtC,CAAC;AAJD,gDAIC;AAED,SAAgB,cAAc,CAAC,GAAQ,EAAE,OAAsB;IAC9D,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAC;KACzD;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AACtD,CAAC;AAND,wCAMC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/initializeCanvas.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/initializeCanvas.d.ts index 8ed6d87..39a860b 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/initializeCanvas.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/initializeCanvas.d.ts @@ -1 +1 @@ -export declare function initialize(): void; +export declare function initialize(): void; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/initializeCanvas.js b/npm-packages/mac-v2.4.x/ag-psd/dist/initializeCanvas.js index 0e88eb5..faa8ba9 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/initializeCanvas.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/initializeCanvas.js @@ -1,26 +1,27 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.initialize = void 0; -var canvas_1 = require("canvas"); -var index_1 = require("./index"); -var jpeg_1 = require("./jpeg"); -function createCanvasFromData(data) { - var canvas = (0, canvas_1.createCanvas)(100, 100); - try { - var context_1 = canvas.getContext('2d'); - var imageData = (0, jpeg_1.decodeJpeg)(data, function (w, h) { return context_1.createImageData(w, h); }); - canvas.width = imageData.width; - canvas.height = imageData.height; - context_1.putImageData(imageData, 0, 0); - } - catch (e) { - console.error('JPEG decompression error', e.message); - } - return canvas; -} -(0, index_1.initializeCanvas)(canvas_1.createCanvas, createCanvasFromData); -function initialize() { - (0, index_1.initializeCanvas)(canvas_1.createCanvas, createCanvasFromData); -} -exports.initialize = initialize; -//# sourceMappingURL=initializeCanvas.js.map \ No newline at end of file +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.initialize = void 0; +var canvas_1 = require("canvas"); +var index_1 = require("./index"); +var jpeg_1 = require("./jpeg"); +function createCanvasFromData(data) { + var canvas = (0, canvas_1.createCanvas)(100, 100); + try { + var context_1 = canvas.getContext('2d'); + var imageData = (0, jpeg_1.decodeJpeg)(data, function (w, h) { return context_1.createImageData(w, h); }); + canvas.width = imageData.width; + canvas.height = imageData.height; + context_1.putImageData(imageData, 0, 0); + } + catch (e) { + console.error('JPEG decompression error', e.message); + } + return canvas; +} +(0, index_1.initializeCanvas)(canvas_1.createCanvas, createCanvasFromData); +function initialize() { + (0, index_1.initializeCanvas)(canvas_1.createCanvas, createCanvasFromData); +} +exports.initialize = initialize; + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluaXRpYWxpemVDYW52YXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsaUNBQXNDO0FBQ3RDLGlDQUEyQztBQUMzQywrQkFBb0M7QUFFcEMsU0FBUyxvQkFBb0IsQ0FBQyxJQUFnQjtJQUM3QyxJQUFNLE1BQU0sR0FBRyxJQUFBLHFCQUFZLEVBQUMsR0FBRyxFQUFFLEdBQUcsQ0FBQyxDQUFDO0lBRXRDLElBQUk7UUFDSCxJQUFNLFNBQU8sR0FBRyxNQUFNLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBRSxDQUFDO1FBQ3pDLElBQU0sU0FBUyxHQUFHLElBQUEsaUJBQVUsRUFBQyxJQUFJLEVBQUUsVUFBQyxDQUFDLEVBQUUsQ0FBQyxJQUFLLE9BQUEsU0FBTyxDQUFDLGVBQWUsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLEVBQTdCLENBQTZCLENBQUMsQ0FBQztRQUM1RSxNQUFNLENBQUMsS0FBSyxHQUFHLFNBQVMsQ0FBQyxLQUFLLENBQUM7UUFDL0IsTUFB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RjYW52YXMud2lkdGggPSBpbWFnZURhdGEud2lkdGg7XHJcblx0XHRjYW52YXMuaGVpZ2h0ID0gaW1hZ2VEYXRhLmhlaWdodDtcclxuXHRcdGNvbnRleHQucHV0SW1hZ2VEYXRhKGltYWdlRGF0YSwgMCwgMCk7XHJcblx0fSBjYXRjaCAoZTogYW55KSB7XHJcblx0XHRjb25zb2xlLmVycm9yKCdKUEVHIGRlY29tcHJlc3Npb24gZXJyb3InLCBlLm1lc3NhZ2UpO1xyXG5cdH1cclxuXHJcblx0cmV0dXJuIGNhbnZhcztcclxufVxyXG5cclxuaW5pdGlhbGl6ZUNhbnZhcyhjcmVhdGVDYW52YXMsIGNyZWF0ZUNhbnZhc0Zyb21EYXRhKTtcclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBpbml0aWFsaXplKCkge1xyXG5cdGluaXRpYWxpemVDYW52YXMoY3JlYXRlQ2FudmFzLCBjcmVhdGVDYW52YXNGcm9tRGF0YSk7XHJcbn1cclxuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/initializeCanvas.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/initializeCanvas.js.map deleted file mode 100644 index 5d8f504..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/initializeCanvas.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"initializeCanvas.js","sourceRoot":"../src/","sources":["initializeCanvas.ts"],"names":[],"mappings":";;;AAAA,iCAAsC;AACtC,iCAA2C;AAC3C,+BAAoC;AAEpC,SAAS,oBAAoB,CAAC,IAAgB;IAC7C,IAAM,MAAM,GAAG,IAAA,qBAAY,EAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAEtC,IAAI;QACH,IAAM,SAAO,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAE,CAAC;QACzC,IAAM,SAAS,GAAG,IAAA,iBAAU,EAAC,IAAI,EAAE,UAAC,CAAC,EAAE,CAAC,IAAK,OAAA,SAAO,CAAC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,EAA7B,CAA6B,CAAC,CAAC;QAC5E,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC;QAC/B,MAAM,CAAC,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC;QACjC,SAAO,CAAC,YAAY,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;KACtC;IAAC,OAAO,CAAM,EAAE;QAChB,OAAO,CAAC,KAAK,CAAC,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;KACrD;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAED,IAAA,wBAAgB,EAAC,qBAAY,EAAE,oBAAoB,CAAC,CAAC;AAErD,SAAgB,UAAU;IACzB,IAAA,wBAAgB,EAAC,qBAAY,EAAE,oBAAoB,CAAC,CAAC;AACtD,CAAC;AAFD,gCAEC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/jpeg.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/jpeg.d.ts index 4f2afd8..af0c75a 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/jpeg.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/jpeg.d.ts @@ -1 +1 @@ -export declare function decodeJpeg(encoded: Uint8Array, createImageData: (width: number, height: number) => ImageData): ImageData; +export declare function decodeJpeg(encoded: Uint8Array, createImageData: (width: number, height: number) => ImageData): ImageData; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/jpeg.js b/npm-packages/mac-v2.4.x/ag-psd/dist/jpeg.js index 7297670..8637152 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/jpeg.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/jpeg.js @@ -1,1022 +1,1023 @@ -"use strict"; -// based on https://github.com/jpeg-js/jpeg-js -/* - Copyright 2011 notmasteryet +"use strict"; +// based on https://github.com/jpeg-js/jpeg-js +/* + Copyright 2011 notmasteryet - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeJpeg = void 0; -var dctZigZag = new Int32Array([ - 0, - 1, 8, - 16, 9, 2, - 3, 10, 17, 24, - 32, 25, 18, 11, 4, - 5, 12, 19, 26, 33, 40, - 48, 41, 34, 27, 20, 13, 6, - 7, 14, 21, 28, 35, 42, 49, 56, - 57, 50, 43, 36, 29, 22, 15, - 23, 30, 37, 44, 51, 58, - 59, 52, 45, 38, 31, - 39, 46, 53, 60, - 61, 54, 47, - 55, 62, - 63 -]); -var dctCos1 = 4017; // cos(pi/16) -var dctSin1 = 799; // sin(pi/16) -var dctCos3 = 3406; // cos(3*pi/16) -var dctSin3 = 2276; // sin(3*pi/16) -var dctCos6 = 1567; // cos(6*pi/16) -var dctSin6 = 3784; // sin(6*pi/16) -var dctSqrt2 = 5793; // sqrt(2) -var dctSqrt1d2 = 2896; // sqrt(2) / 2 -var maxResolutionInMP = 100; // Don't decode more than 100 megapixels -var maxMemoryUsageBytes = 64 * 1024 * 1024; // Don't decode if memory footprint is more than 64MB -var totalBytesAllocated = 0; // avoid unexpected OOMs from untrusted content. -function requestMemoryAllocation(increaseAmount) { - var totalMemoryImpactBytes = totalBytesAllocated + increaseAmount; - if (totalMemoryImpactBytes > maxMemoryUsageBytes) { - var exceededAmount = Math.ceil((totalMemoryImpactBytes - maxMemoryUsageBytes) / 1024 / 1024); - throw new Error("Max memory limit exceeded by at least ".concat(exceededAmount, "MB")); - } - totalBytesAllocated = totalMemoryImpactBytes; -} -function buildHuffmanTable(codeLengths, values) { - var length = 16; - while (length > 0 && !codeLengths[length - 1]) - length--; - var code = [{ children: [], index: 0 }]; - var k = 0; - var p = code[0]; - for (var i = 0; i < length; i++) { - for (var j = 0; j < codeLengths[i]; j++) { - p = code.pop(); - p.children[p.index] = values[k]; - while (p.index > 0) { - if (code.length === 0) - throw new Error('Could not recreate Huffman Table'); - p = code.pop(); - } - p.index++; - code.push(p); - while (code.length <= i) { - var q = { children: [], index: 0 }; - code.push(q); - p.children[p.index] = q.children; - p = q; - } - k++; - } - if (i + 1 < length) { - // p here points to last code - var q = { children: [], index: 0 }; - code.push(q); - p.children[p.index] = q.children; - p = q; - } - } - return code[0].children; -} -function decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successivePrev, successive) { - var mcusPerLine = frame.mcusPerLine; - var progressive = frame.progressive; - var startOffset = offset; - var bitsData = 0; - var bitsCount = 0; - function readBit() { - if (bitsCount > 0) { - bitsCount--; - return (bitsData >> bitsCount) & 1; - } - bitsData = data[offset++]; - if (bitsData == 0xFF) { - var nextByte = data[offset++]; - if (nextByte) - throw new Error("unexpected marker: ".concat(((bitsData << 8) | nextByte).toString(16))); - // unstuff 0 - } - bitsCount = 7; - return bitsData >>> 7; - } - function decodeHuffman(tree) { - var node = tree; - while (true) { - node = node[readBit()]; - if (typeof node === 'number') - return node; - if (node === undefined) - throw new Error('invalid huffman sequence'); - } - } - function receive(length) { - var n = 0; - while (length > 0) { - n = (n << 1) | readBit(); - length--; - } - return n; - } - function receiveAndExtend(length) { - var n = receive(length); - if (n >= 1 << (length - 1)) - return n; - return n + (-1 << length) + 1; - } - function decodeBaseline(component, zz) { - var t = decodeHuffman(component.huffmanTableDC); - var diff = t === 0 ? 0 : receiveAndExtend(t); - zz[0] = (component.pred += diff); - var k = 1; - while (k < 64) { - var rs = decodeHuffman(component.huffmanTableAC); - var s = rs & 15; - var r = rs >> 4; - if (s === 0) { - if (r < 15) - break; - k += 16; - continue; - } - k += r; - var z = dctZigZag[k]; - zz[z] = receiveAndExtend(s); - k++; - } - } - function decodeDCFirst(component, zz) { - var t = decodeHuffman(component.huffmanTableDC); - var diff = t === 0 ? 0 : (receiveAndExtend(t) << successive); - zz[0] = (component.pred += diff); - } - function decodeDCSuccessive(_component, zz) { - zz[0] |= readBit() << successive; - } - var eobrun = 0; - function decodeACFirst(component, zz) { - if (eobrun > 0) { - eobrun--; - return; - } - var k = spectralStart, e = spectralEnd; - while (k <= e) { - var rs = decodeHuffman(component.huffmanTableAC); - var s = rs & 15; - var r = rs >> 4; - if (s === 0) { - if (r < 15) { - eobrun = receive(r) + (1 << r) - 1; - break; - } - k += 16; - continue; - } - k += r; - var z = dctZigZag[k]; - zz[z] = receiveAndExtend(s) * (1 << successive); - k++; - } - } - var successiveACState = 0; - var successiveACNextValue = 0; - function decodeACSuccessive(component, zz) { - var k = spectralStart; - var e = spectralEnd; - var r = 0; - while (k <= e) { - var z = dctZigZag[k]; - var direction = zz[z] < 0 ? -1 : 1; - switch (successiveACState) { - case 0: // initial state - var rs = decodeHuffman(component.huffmanTableAC); - var s = rs & 15; - r = rs >> 4; // this was new variable in old code - if (s === 0) { - if (r < 15) { - eobrun = receive(r) + (1 << r); - successiveACState = 4; - } - else { - r = 16; - successiveACState = 1; - } - } - else { - if (s !== 1) - throw new Error('invalid ACn encoding'); - successiveACNextValue = receiveAndExtend(s); - successiveACState = r ? 2 : 3; - } - continue; - case 1: // skipping r zero items - case 2: - if (zz[z]) { - zz[z] += (readBit() << successive) * direction; - } - else { - r--; - if (r === 0) - successiveACState = successiveACState == 2 ? 3 : 0; - } - break; - case 3: // set value for a zero item - if (zz[z]) { - zz[z] += (readBit() << successive) * direction; - } - else { - zz[z] = successiveACNextValue << successive; - successiveACState = 0; - } - break; - case 4: // eob - if (zz[z]) { - zz[z] += (readBit() << successive) * direction; - } - break; - } - k++; - } - if (successiveACState === 4) { - eobrun--; - if (eobrun === 0) - successiveACState = 0; - } - } - function decodeMcu(component, decode, mcu, row, col) { - var mcuRow = (mcu / mcusPerLine) | 0; - var mcuCol = mcu % mcusPerLine; - var blockRow = mcuRow * component.v + row; - var blockCol = mcuCol * component.h + col; - // If the block is missing, just skip it. - if (component.blocks[blockRow] === undefined) - return; - decode(component, component.blocks[blockRow][blockCol]); - } - function decodeBlock(component, decode, mcu) { - var blockRow = (mcu / component.blocksPerLine) | 0; - var blockCol = mcu % component.blocksPerLine; - // If the block is missing, just skip it. - if (component.blocks[blockRow] === undefined) - return; - decode(component, component.blocks[blockRow][blockCol]); - } - var componentsLength = components.length; - var component; - var decodeFn; - if (progressive) { - if (spectralStart === 0) { - decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive; - } - else { - decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive; - } - } - else { - decodeFn = decodeBaseline; - } - var mcu = 0; - var mcuExpected; - if (componentsLength == 1) { - mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn; - } - else { - mcuExpected = mcusPerLine * frame.mcusPerColumn; - } - if (!resetInterval) - resetInterval = mcuExpected; - var h; - var v; - var marker; - while (mcu < mcuExpected) { - // reset interval stuff - for (var i = 0; i < componentsLength; i++) - components[i].pred = 0; - eobrun = 0; - if (componentsLength == 1) { - component = components[0]; - for (var n = 0; n < resetInterval; n++) { - decodeBlock(component, decodeFn, mcu); - mcu++; - } - } - else { - for (var n = 0; n < resetInterval; n++) { - for (var i = 0; i < componentsLength; i++) { - component = components[i]; - h = component.h; - v = component.v; - for (var j = 0; j < v; j++) { - for (var k = 0; k < h; k++) { - decodeMcu(component, decodeFn, mcu, j, k); - } - } - } - mcu++; - // If we've reached our expected MCU's, stop decoding - if (mcu === mcuExpected) - break; - } - } - if (mcu === mcuExpected) { - // Skip trailing bytes at the end of the scan - until we reach the next marker - do { - if (data[offset] === 0xFF) { - if (data[offset + 1] !== 0x00) { - break; - } - } - offset += 1; - } while (offset < data.length - 2); - } - // find marker - bitsCount = 0; - marker = (data[offset] << 8) | data[offset + 1]; - if (marker < 0xFF00) - throw new Error('marker was not found'); - if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx - offset += 2; - } - else { - break; - } - } - return offset - startOffset; -} -function buildComponentData(component) { - var lines = []; - var blocksPerLine = component.blocksPerLine; - var blocksPerColumn = component.blocksPerColumn; - var samplesPerLine = blocksPerLine << 3; - // Only 1 used per invocation of this function and garbage collected after invocation, so no need to account for its memory footprint. - var R = new Int32Array(64); - var r = new Uint8Array(64); - // A port of poppler's IDCT method which in turn is taken from: - // Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz, - // "Practical Fast 1-D DCT Algorithms with 11 Multiplications", - // IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989, - // 988-991. - function quantizeAndInverse(zz, dataOut, dataIn) { - var qt = component.quantizationTable; - var p = dataIn; - // dequant - for (var i = 0; i < 64; i++) { - p[i] = zz[i] * qt[i]; - } - // inverse DCT on rows - for (var i = 0; i < 8; ++i) { - var row = 8 * i; - // check for all-zero AC coefficients - if (p[1 + row] == 0 && p[2 + row] == 0 && p[3 + row] == 0 && - p[4 + row] == 0 && p[5 + row] == 0 && p[6 + row] == 0 && - p[7 + row] == 0) { - var t_1 = (dctSqrt2 * p[0 + row] + 512) >> 10; - p[0 + row] = t_1; - p[1 + row] = t_1; - p[2 + row] = t_1; - p[3 + row] = t_1; - p[4 + row] = t_1; - p[5 + row] = t_1; - p[6 + row] = t_1; - p[7 + row] = t_1; - continue; - } - // stage 4 - var v0 = (dctSqrt2 * p[0 + row] + 128) >> 8; - var v1 = (dctSqrt2 * p[4 + row] + 128) >> 8; - var v2 = p[2 + row]; - var v3 = p[6 + row]; - var v4 = (dctSqrt1d2 * (p[1 + row] - p[7 + row]) + 128) >> 8; - var v7 = (dctSqrt1d2 * (p[1 + row] + p[7 + row]) + 128) >> 8; - var v5 = p[3 + row] << 4; - var v6 = p[5 + row] << 4; - // stage 3 - var t = (v0 - v1 + 1) >> 1; - v0 = (v0 + v1 + 1) >> 1; - v1 = t; - t = (v2 * dctSin6 + v3 * dctCos6 + 128) >> 8; - v2 = (v2 * dctCos6 - v3 * dctSin6 + 128) >> 8; - v3 = t; - t = (v4 - v6 + 1) >> 1; - v4 = (v4 + v6 + 1) >> 1; - v6 = t; - t = (v7 + v5 + 1) >> 1; - v5 = (v7 - v5 + 1) >> 1; - v7 = t; - // stage 2 - t = (v0 - v3 + 1) >> 1; - v0 = (v0 + v3 + 1) >> 1; - v3 = t; - t = (v1 - v2 + 1) >> 1; - v1 = (v1 + v2 + 1) >> 1; - v2 = t; - t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12; - v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12; - v7 = t; - t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12; - v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12; - v6 = t; - // stage 1 - p[0 + row] = v0 + v7; - p[7 + row] = v0 - v7; - p[1 + row] = v1 + v6; - p[6 + row] = v1 - v6; - p[2 + row] = v2 + v5; - p[5 + row] = v2 - v5; - p[3 + row] = v3 + v4; - p[4 + row] = v3 - v4; - } - // inverse DCT on columns - for (var i = 0; i < 8; ++i) { - var col = i; - // check for all-zero AC coefficients - if (p[1 * 8 + col] == 0 && p[2 * 8 + col] == 0 && p[3 * 8 + col] == 0 && - p[4 * 8 + col] == 0 && p[5 * 8 + col] == 0 && p[6 * 8 + col] == 0 && - p[7 * 8 + col] == 0) { - var t_2 = (dctSqrt2 * dataIn[i + 0] + 8192) >> 14; - p[0 * 8 + col] = t_2; - p[1 * 8 + col] = t_2; - p[2 * 8 + col] = t_2; - p[3 * 8 + col] = t_2; - p[4 * 8 + col] = t_2; - p[5 * 8 + col] = t_2; - p[6 * 8 + col] = t_2; - p[7 * 8 + col] = t_2; - continue; - } - // stage 4 - var v0 = (dctSqrt2 * p[0 * 8 + col] + 2048) >> 12; - var v1 = (dctSqrt2 * p[4 * 8 + col] + 2048) >> 12; - var v2 = p[2 * 8 + col]; - var v3 = p[6 * 8 + col]; - var v4 = (dctSqrt1d2 * (p[1 * 8 + col] - p[7 * 8 + col]) + 2048) >> 12; - var v7 = (dctSqrt1d2 * (p[1 * 8 + col] + p[7 * 8 + col]) + 2048) >> 12; - var v5 = p[3 * 8 + col]; - var v6 = p[5 * 8 + col]; - // stage 3 - var t = (v0 - v1 + 1) >> 1; - v0 = (v0 + v1 + 1) >> 1; - v1 = t; - t = (v2 * dctSin6 + v3 * dctCos6 + 2048) >> 12; - v2 = (v2 * dctCos6 - v3 * dctSin6 + 2048) >> 12; - v3 = t; - t = (v4 - v6 + 1) >> 1; - v4 = (v4 + v6 + 1) >> 1; - v6 = t; - t = (v7 + v5 + 1) >> 1; - v5 = (v7 - v5 + 1) >> 1; - v7 = t; - // stage 2 - t = (v0 - v3 + 1) >> 1; - v0 = (v0 + v3 + 1) >> 1; - v3 = t; - t = (v1 - v2 + 1) >> 1; - v1 = (v1 + v2 + 1) >> 1; - v2 = t; - t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12; - v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12; - v7 = t; - t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12; - v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12; - v6 = t; - // stage 1 - p[0 * 8 + col] = v0 + v7; - p[7 * 8 + col] = v0 - v7; - p[1 * 8 + col] = v1 + v6; - p[6 * 8 + col] = v1 - v6; - p[2 * 8 + col] = v2 + v5; - p[5 * 8 + col] = v2 - v5; - p[3 * 8 + col] = v3 + v4; - p[4 * 8 + col] = v3 - v4; - } - // convert to 8-bit integers - for (var i = 0; i < 64; ++i) { - var sample = 128 + ((p[i] + 8) >> 4); - dataOut[i] = sample < 0 ? 0 : sample > 0xFF ? 0xFF : sample; - } - } - requestMemoryAllocation(samplesPerLine * blocksPerColumn * 8); - for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) { - var scanLine = blockRow << 3; - for (var i = 0; i < 8; i++) - lines.push(new Uint8Array(samplesPerLine)); - for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) { - quantizeAndInverse(component.blocks[blockRow][blockCol], r, R); - var offset = 0; - var sample = blockCol << 3; - for (var j = 0; j < 8; j++) { - var line = lines[scanLine + j]; - for (var i = 0; i < 8; i++) - line[sample + i] = r[offset++]; - } - } - } - return lines; -} -function clampTo8bit(a) { - return a < 0 ? 0 : a > 255 ? 255 : a; -} -function parse(data) { - var self = { - width: 0, - height: 0, - comments: [], - adobe: undefined, - components: [], - exifBuffer: undefined, - jfif: undefined, - }; - var maxResolutionInPixels = maxResolutionInMP * 1000 * 1000; - var offset = 0; - function readUint16() { - var value = (data[offset] << 8) | data[offset + 1]; - offset += 2; - return value; - } - function readDataBlock() { - var length = readUint16(); - var array = data.subarray(offset, offset + length - 2); - offset += array.length; - return array; - } - function prepareComponents(frame) { - var maxH = 0, maxV = 0; - for (var componentId in frame.components) { - if (frame.components.hasOwnProperty(componentId)) { - var component = frame.components[componentId]; - if (maxH < component.h) - maxH = component.h; - if (maxV < component.v) - maxV = component.v; - } - } - var mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / maxH); - var mcusPerColumn = Math.ceil(frame.scanLines / 8 / maxV); - for (var componentId in frame.components) { - if (frame.components.hasOwnProperty(componentId)) { - var component = frame.components[componentId]; - var blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / maxH); - var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / maxV); - var blocksPerLineForMcu = mcusPerLine * component.h; - var blocksPerColumnForMcu = mcusPerColumn * component.v; - var blocksToAllocate = blocksPerColumnForMcu * blocksPerLineForMcu; - var blocks = []; - // Each block is a Int32Array of length 64 (4 x 64 = 256 bytes) - requestMemoryAllocation(blocksToAllocate * 256); - for (var i = 0; i < blocksPerColumnForMcu; i++) { - var row = []; - for (var j = 0; j < blocksPerLineForMcu; j++) { - row.push(new Int32Array(64)); - } - blocks.push(row); - } - component.blocksPerLine = blocksPerLine; - component.blocksPerColumn = blocksPerColumn; - component.blocks = blocks; - } - } - frame.maxH = maxH; - frame.maxV = maxV; - frame.mcusPerLine = mcusPerLine; - frame.mcusPerColumn = mcusPerColumn; - } - var jfif = null; - var adobe = null; - var frame = undefined; - var resetInterval = 0; - var quantizationTables = []; - var frames = []; - var huffmanTablesAC = []; - var huffmanTablesDC = []; - var fileMarker = readUint16(); - var malformedDataOffset = -1; - if (fileMarker != 0xFFD8) { // SOI (Start of Image) - throw new Error('SOI not found'); - } - fileMarker = readUint16(); - while (fileMarker != 0xFFD9) { // EOI (End of image) - switch (fileMarker) { - case 0xFF00: break; - case 0xFFE0: // APP0 (Application Specific) - case 0xFFE1: // APP1 - case 0xFFE2: // APP2 - case 0xFFE3: // APP3 - case 0xFFE4: // APP4 - case 0xFFE5: // APP5 - case 0xFFE6: // APP6 - case 0xFFE7: // APP7 - case 0xFFE8: // APP8 - case 0xFFE9: // APP9 - case 0xFFEA: // APP10 - case 0xFFEB: // APP11 - case 0xFFEC: // APP12 - case 0xFFED: // APP13 - case 0xFFEE: // APP14 - case 0xFFEF: // APP15 - case 0xFFFE: { // COM (Comment) - var appData = readDataBlock(); - if (fileMarker === 0xFFFE) { - var comment = ''; - for (var ii = 0; ii < appData.byteLength; ii++) { - comment += String.fromCharCode(appData[ii]); - } - self.comments.push(comment); - } - if (fileMarker === 0xFFE0) { - if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49 && - appData[3] === 0x46 && appData[4] === 0) { // 'JFIF\x00' - jfif = { - version: { major: appData[5], minor: appData[6] }, - densityUnits: appData[7], - xDensity: (appData[8] << 8) | appData[9], - yDensity: (appData[10] << 8) | appData[11], - thumbWidth: appData[12], - thumbHeight: appData[13], - thumbData: appData.subarray(14, 14 + 3 * appData[12] * appData[13]) - }; - } - } - // TODO APP1 - Exif - if (fileMarker === 0xFFE1) { - if (appData[0] === 0x45 && - appData[1] === 0x78 && - appData[2] === 0x69 && - appData[3] === 0x66 && - appData[4] === 0) { // 'EXIF\x00' - self.exifBuffer = appData.subarray(5, appData.length); - } - } - if (fileMarker === 0xFFEE) { - if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6F && - appData[3] === 0x62 && appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\x00' - adobe = { - version: appData[6], - flags0: (appData[7] << 8) | appData[8], - flags1: (appData[9] << 8) | appData[10], - transformCode: appData[11] - }; - } - } - break; - } - case 0xFFDB: { // DQT (Define Quantization Tables) - var quantizationTablesLength = readUint16(); - var quantizationTablesEnd = quantizationTablesLength + offset - 2; - while (offset < quantizationTablesEnd) { - var quantizationTableSpec = data[offset++]; - requestMemoryAllocation(64 * 4); - var tableData = new Int32Array(64); - if ((quantizationTableSpec >> 4) === 0) { // 8 bit values - for (var j = 0; j < 64; j++) { - var z = dctZigZag[j]; - tableData[z] = data[offset++]; - } - } - else if ((quantizationTableSpec >> 4) === 1) { //16 bit - for (var j = 0; j < 64; j++) { - var z = dctZigZag[j]; - tableData[z] = readUint16(); - } - } - else - throw new Error('DQT: invalid table spec'); - quantizationTables[quantizationTableSpec & 15] = tableData; - } - break; - } - case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT) - case 0xFFC1: // SOF1 (Start of Frame, Extended DCT) - case 0xFFC2: { // SOF2 (Start of Frame, Progressive DCT) - readUint16(); // skip data length - frame = { - extended: (fileMarker === 0xFFC1), - progressive: (fileMarker === 0xFFC2), - precision: data[offset++], - scanLines: readUint16(), - samplesPerLine: readUint16(), - components: {}, - componentsOrder: [], - maxH: 0, - maxV: 0, - mcusPerLine: 0, - mcusPerColumn: 0, - }; - var pixelsInFrame = frame.scanLines * frame.samplesPerLine; - if (pixelsInFrame > maxResolutionInPixels) { - var exceededAmount = Math.ceil((pixelsInFrame - maxResolutionInPixels) / 1e6); - throw new Error("maxResolutionInMP limit exceeded by ".concat(exceededAmount, "MP")); - } - var componentsCount = data[offset++]; - for (var i = 0; i < componentsCount; i++) { - var componentId = data[offset]; - var h = data[offset + 1] >> 4; - var v = data[offset + 1] & 15; - var qId = data[offset + 2]; - frame.componentsOrder.push(componentId); - frame.components[componentId] = { - h: h, - v: v, - quantizationIdx: qId, - blocksPerColumn: 0, - blocksPerLine: 0, - blocks: [], - pred: 0, - }; - offset += 3; - } - prepareComponents(frame); - frames.push(frame); - break; - } - case 0xFFC4: { // DHT (Define Huffman Tables) - var huffmanLength = readUint16(); - for (var i = 2; i < huffmanLength;) { - var huffmanTableSpec = data[offset++]; - var codeLengths = new Uint8Array(16); - var codeLengthSum = 0; - for (var j = 0; j < 16; j++, offset++) { - codeLengthSum += (codeLengths[j] = data[offset]); - } - requestMemoryAllocation(16 + codeLengthSum); - var huffmanValues = new Uint8Array(codeLengthSum); - for (var j = 0; j < codeLengthSum; j++, offset++) { - huffmanValues[j] = data[offset]; - } - i += 17 + codeLengthSum; - var index = huffmanTableSpec & 15; - var table = (huffmanTableSpec >> 4) === 0 ? huffmanTablesDC : huffmanTablesAC; - table[index] = buildHuffmanTable(codeLengths, huffmanValues); - } - break; - } - case 0xFFDD: // DRI (Define Restart Interval) - readUint16(); // skip data length - resetInterval = readUint16(); - break; - case 0xFFDC: // Number of Lines marker - readUint16(); // skip data length - readUint16(); // Ignore this data since it represents the image height - break; - case 0xFFDA: { // SOS (Start of Scan) - readUint16(); // skip data length - var selectorsCount = data[offset++]; - var components = []; - for (var i = 0; i < selectorsCount; i++) { - var component = frame.components[data[offset++]]; - var tableSpec = data[offset++]; - component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4]; - component.huffmanTableAC = huffmanTablesAC[tableSpec & 15]; - components.push(component); - } - var spectralStart = data[offset++]; - var spectralEnd = data[offset++]; - var successiveApproximation = data[offset++]; - var processed = decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successiveApproximation >> 4, successiveApproximation & 15); - offset += processed; - break; - } - case 0xFFFF: // Fill bytes - if (data[offset] !== 0xFF) { // Avoid skipping a valid marker. - offset--; - } - break; - default: { - if (data[offset - 3] == 0xFF && data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) { - // could be incorrect encoding -- last 0xFF byte of the previous - // block was eaten by the encoder - offset -= 3; - break; - } - else if (fileMarker === 0xE0 || fileMarker == 0xE1) { - // Recover from malformed APP1 markers popular in some phone models. - // See https://github.com/eugeneware/jpeg-js/issues/82 - if (malformedDataOffset !== -1) { - throw new Error("first unknown JPEG marker at offset ".concat(malformedDataOffset.toString(16), ", second unknown JPEG marker ").concat(fileMarker.toString(16), " at offset ").concat((offset - 1).toString(16))); - } - malformedDataOffset = offset - 1; - var nextOffset = readUint16(); - if (data[offset + nextOffset - 2] === 0xFF) { - offset += nextOffset - 2; - break; - } - } - throw new Error('unknown JPEG marker ' + fileMarker.toString(16)); - } - } - fileMarker = readUint16(); - } - if (frames.length != 1) - throw new Error('only single frame JPEGs supported'); - // set each frame's components quantization table - for (var i = 0; i < frames.length; i++) { - var cp = frames[i].components; - for (var j in cp) { // TODO: don't use `in` - cp[j].quantizationTable = quantizationTables[cp[j].quantizationIdx]; - delete cp[j].quantizationIdx; // TODO: why ??? - } - } - self.width = frame.samplesPerLine; - self.height = frame.scanLines; - self.jfif = jfif; - self.adobe = adobe; - self.components = []; - for (var i = 0; i < frame.componentsOrder.length; i++) { - var component = frame.components[frame.componentsOrder[i]]; - self.components.push({ - lines: buildComponentData(component), - scaleX: component.h / frame.maxH, - scaleY: component.v / frame.maxV - }); - } - return self; -} -function getData(decoded) { - var offset = 0; - var colorTransform = false; - var width = decoded.width; - var height = decoded.height; - var dataLength = width * height * decoded.components.length; - requestMemoryAllocation(dataLength); - var data = new Uint8Array(dataLength); - switch (decoded.components.length) { - case 1: { - var component1 = decoded.components[0]; - for (var y = 0; y < height; y++) { - var component1Line = component1.lines[0 | (y * component1.scaleY)]; - for (var x = 0; x < width; x++) { - var Y = component1Line[0 | (x * component1.scaleX)]; - data[offset++] = Y; - } - } - break; - } - case 2: { - // PDF might compress two component data in custom colorspace - var component1 = decoded.components[0]; - var component2 = decoded.components[1]; - for (var y = 0; y < height; y++) { - var component1Line = component1.lines[0 | (y * component1.scaleY)]; - var component2Line = component2.lines[0 | (y * component2.scaleY)]; - for (var x = 0; x < width; x++) { - var Y1 = component1Line[0 | (x * component1.scaleX)]; - data[offset++] = Y1; - var Y2 = component2Line[0 | (x * component2.scaleX)]; - data[offset++] = Y2; - } - } - break; - } - case 3: { - // The default transform for three components is true - colorTransform = true; - // The adobe transform marker overrides any previous setting - if (decoded.adobe && decoded.adobe.transformCode) - colorTransform = true; - var component1 = decoded.components[0]; - var component2 = decoded.components[1]; - var component3 = decoded.components[2]; - for (var y = 0; y < height; y++) { - var component1Line = component1.lines[0 | (y * component1.scaleY)]; - var component2Line = component2.lines[0 | (y * component2.scaleY)]; - var component3Line = component3.lines[0 | (y * component3.scaleY)]; - for (var x = 0; x < width; x++) { - var Y = void 0, Cb = void 0, Cr = void 0, R = void 0, G = void 0, B = void 0; - if (!colorTransform) { - R = component1Line[0 | (x * component1.scaleX)]; - G = component2Line[0 | (x * component2.scaleX)]; - B = component3Line[0 | (x * component3.scaleX)]; - } - else { - Y = component1Line[0 | (x * component1.scaleX)]; - Cb = component2Line[0 | (x * component2.scaleX)]; - Cr = component3Line[0 | (x * component3.scaleX)]; - R = clampTo8bit(Y + 1.402 * (Cr - 128)); - G = clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128)); - B = clampTo8bit(Y + 1.772 * (Cb - 128)); - } - data[offset++] = R; - data[offset++] = G; - data[offset++] = B; - } - } - break; - } - case 4: { - if (!decoded.adobe) - throw new Error('Unsupported color mode (4 components)'); - // The default transform for four components is false - colorTransform = false; - // The adobe transform marker overrides any previous setting - if (decoded.adobe && decoded.adobe.transformCode) - colorTransform = true; - var component1 = decoded.components[0]; - var component2 = decoded.components[1]; - var component3 = decoded.components[2]; - var component4 = decoded.components[3]; - for (var y = 0; y < height; y++) { - var component1Line = component1.lines[0 | (y * component1.scaleY)]; - var component2Line = component2.lines[0 | (y * component2.scaleY)]; - var component3Line = component3.lines[0 | (y * component3.scaleY)]; - var component4Line = component4.lines[0 | (y * component4.scaleY)]; - for (var x = 0; x < width; x++) { - var Y = void 0, Cb = void 0, Cr = void 0, K = void 0, C = void 0, M = void 0, Ye = void 0; - if (!colorTransform) { - C = component1Line[0 | (x * component1.scaleX)]; - M = component2Line[0 | (x * component2.scaleX)]; - Ye = component3Line[0 | (x * component3.scaleX)]; - K = component4Line[0 | (x * component4.scaleX)]; - } - else { - Y = component1Line[0 | (x * component1.scaleX)]; - Cb = component2Line[0 | (x * component2.scaleX)]; - Cr = component3Line[0 | (x * component3.scaleX)]; - K = component4Line[0 | (x * component4.scaleX)]; - C = 255 - clampTo8bit(Y + 1.402 * (Cr - 128)); - M = 255 - clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128)); - Ye = 255 - clampTo8bit(Y + 1.772 * (Cb - 128)); - } - data[offset++] = 255 - C; - data[offset++] = 255 - M; - data[offset++] = 255 - Ye; - data[offset++] = 255 - K; - } - } - break; - } - default: - throw new Error('Unsupported color mode'); - } - return data; -} -function decodeJpeg(encoded, createImageData) { - totalBytesAllocated = 0; - if (encoded.length === 0) - throw new Error('Empty jpeg buffer'); - var decoded = parse(encoded); - requestMemoryAllocation(decoded.width * decoded.height * 4); - var data = getData(decoded); - var imageData = createImageData(decoded.width, decoded.height); - var width = imageData.width; - var height = imageData.height; - var imageDataArray = imageData.data; - var i = 0; - var j = 0; - switch (decoded.components.length) { - case 1: - for (var y = 0; y < height; y++) { - for (var x = 0; x < width; x++) { - var Y = data[i++]; - imageDataArray[j++] = Y; - imageDataArray[j++] = Y; - imageDataArray[j++] = Y; - imageDataArray[j++] = 255; - } - } - break; - case 3: - for (var y = 0; y < height; y++) { - for (var x = 0; x < width; x++) { - var R = data[i++]; - var G = data[i++]; - var B = data[i++]; - imageDataArray[j++] = R; - imageDataArray[j++] = G; - imageDataArray[j++] = B; - imageDataArray[j++] = 255; - } - } - break; - case 4: - for (var y = 0; y < height; y++) { - for (var x = 0; x < width; x++) { - var C = data[i++]; - var M = data[i++]; - var Y = data[i++]; - var K = data[i++]; - var R = 255 - clampTo8bit(C * (1 - K / 255) + K); - var G = 255 - clampTo8bit(M * (1 - K / 255) + K); - var B = 255 - clampTo8bit(Y * (1 - K / 255) + K); - imageDataArray[j++] = R; - imageDataArray[j++] = G; - imageDataArray[j++] = B; - imageDataArray[j++] = 255; - } - } - break; - default: - throw new Error('Unsupported color mode'); - } - return imageData; -} -exports.decodeJpeg = decodeJpeg; -//# sourceMappingURL=jpeg.js.map \ No newline at end of file + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decodeJpeg = void 0; +var dctZigZag = new Int32Array([ + 0, + 1, 8, + 16, 9, 2, + 3, 10, 17, 24, + 32, 25, 18, 11, 4, + 5, 12, 19, 26, 33, 40, + 48, 41, 34, 27, 20, 13, 6, + 7, 14, 21, 28, 35, 42, 49, 56, + 57, 50, 43, 36, 29, 22, 15, + 23, 30, 37, 44, 51, 58, + 59, 52, 45, 38, 31, + 39, 46, 53, 60, + 61, 54, 47, + 55, 62, + 63 +]); +var dctCos1 = 4017; // cos(pi/16) +var dctSin1 = 799; // sin(pi/16) +var dctCos3 = 3406; // cos(3*pi/16) +var dctSin3 = 2276; // sin(3*pi/16) +var dctCos6 = 1567; // cos(6*pi/16) +var dctSin6 = 3784; // sin(6*pi/16) +var dctSqrt2 = 5793; // sqrt(2) +var dctSqrt1d2 = 2896; // sqrt(2) / 2 +var maxResolutionInMP = 100; // Don't decode more than 100 megapixels +var maxMemoryUsageBytes = 64 * 1024 * 1024; // Don't decode if memory footprint is more than 64MB +var totalBytesAllocated = 0; // avoid unexpected OOMs from untrusted content. +function requestMemoryAllocation(increaseAmount) { + var totalMemoryImpactBytes = totalBytesAllocated + increaseAmount; + if (totalMemoryImpactBytes > maxMemoryUsageBytes) { + var exceededAmount = Math.ceil((totalMemoryImpactBytes - maxMemoryUsageBytes) / 1024 / 1024); + throw new Error("Max memory limit exceeded by at least ".concat(exceededAmount, "MB")); + } + totalBytesAllocated = totalMemoryImpactBytes; +} +function buildHuffmanTable(codeLengths, values) { + var length = 16; + while (length > 0 && !codeLengths[length - 1]) + length--; + var code = [{ children: [], index: 0 }]; + var k = 0; + var p = code[0]; + for (var i = 0; i < length; i++) { + for (var j = 0; j < codeLengths[i]; j++) { + p = code.pop(); + p.children[p.index] = values[k]; + while (p.index > 0) { + if (code.length === 0) + throw new Error('Could not recreate Huffman Table'); + p = code.pop(); + } + p.index++; + code.push(p); + while (code.length <= i) { + var q = { children: [], index: 0 }; + code.push(q); + p.children[p.index] = q.children; + p = q; + } + k++; + } + if (i + 1 < length) { + // p here points to last code + var q = { children: [], index: 0 }; + code.push(q); + p.children[p.index] = q.children; + p = q; + } + } + return code[0].children; +} +function decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successivePrev, successive) { + var mcusPerLine = frame.mcusPerLine; + var progressive = frame.progressive; + var startOffset = offset; + var bitsData = 0; + var bitsCount = 0; + function readBit() { + if (bitsCount > 0) { + bitsCount--; + return (bitsData >> bitsCount) & 1; + } + bitsData = data[offset++]; + if (bitsData == 0xFF) { + var nextByte = data[offset++]; + if (nextByte) + throw new Error("unexpected marker: ".concat(((bitsData << 8) | nextByte).toString(16))); + // unstuff 0 + } + bitsCount = 7; + return bitsData >>> 7; + } + function decodeHuffman(tree) { + var node = tree; + while (true) { + node = node[readBit()]; + if (typeof node === 'number') + return node; + if (node === undefined) + throw new Error('invalid huffman sequence'); + } + } + function receive(length) { + var n = 0; + while (length > 0) { + n = (n << 1) | readBit(); + length--; + } + return n; + } + function receiveAndExtend(length) { + var n = receive(length); + if (n >= 1 << (length - 1)) + return n; + return n + (-1 << length) + 1; + } + function decodeBaseline(component, zz) { + var t = decodeHuffman(component.huffmanTableDC); + var diff = t === 0 ? 0 : receiveAndExtend(t); + zz[0] = (component.pred += diff); + var k = 1; + while (k < 64) { + var rs = decodeHuffman(component.huffmanTableAC); + var s = rs & 15; + var r = rs >> 4; + if (s === 0) { + if (r < 15) + break; + k += 16; + continue; + } + k += r; + var z = dctZigZag[k]; + zz[z] = receiveAndExtend(s); + k++; + } + } + function decodeDCFirst(component, zz) { + var t = decodeHuffman(component.huffmanTableDC); + var diff = t === 0 ? 0 : (receiveAndExtend(t) << successive); + zz[0] = (component.pred += diff); + } + function decodeDCSuccessive(_component, zz) { + zz[0] |= readBit() << successive; + } + var eobrun = 0; + function decodeACFirst(component, zz) { + if (eobrun > 0) { + eobrun--; + return; + } + var k = spectralStart, e = spectralEnd; + while (k <= e) { + var rs = decodeHuffman(component.huffmanTableAC); + var s = rs & 15; + var r = rs >> 4; + if (s === 0) { + if (r < 15) { + eobrun = receive(r) + (1 << r) - 1; + break; + } + k += 16; + continue; + } + k += r; + var z = dctZigZag[k]; + zz[z] = receiveAndExtend(s) * (1 << successive); + k++; + } + } + var successiveACState = 0; + var successiveACNextValue = 0; + function decodeACSuccessive(component, zz) { + var k = spectralStart; + var e = spectralEnd; + var r = 0; + while (k <= e) { + var z = dctZigZag[k]; + var direction = zz[z] < 0 ? -1 : 1; + switch (successiveACState) { + case 0: // initial state + var rs = decodeHuffman(component.huffmanTableAC); + var s = rs & 15; + r = rs >> 4; // this was new variable in old code + if (s === 0) { + if (r < 15) { + eobrun = receive(r) + (1 << r); + successiveACState = 4; + } + else { + r = 16; + successiveACState = 1; + } + } + else { + if (s !== 1) + throw new Error('invalid ACn encoding'); + successiveACNextValue = receiveAndExtend(s); + successiveACState = r ? 2 : 3; + } + continue; + case 1: // skipping r zero items + case 2: + if (zz[z]) { + zz[z] += (readBit() << successive) * direction; + } + else { + r--; + if (r === 0) + successiveACState = successiveACState == 2 ? 3 : 0; + } + break; + case 3: // set value for a zero item + if (zz[z]) { + zz[z] += (readBit() << successive) * direction; + } + else { + zz[z] = successiveACNextValue << successive; + successiveACState = 0; + } + break; + case 4: // eob + if (zz[z]) { + zz[z] += (readBit() << successive) * direction; + } + break; + } + k++; + } + if (successiveACState === 4) { + eobrun--; + if (eobrun === 0) + successiveACState = 0; + } + } + function decodeMcu(component, decode, mcu, row, col) { + var mcuRow = (mcu / mcusPerLine) | 0; + var mcuCol = mcu % mcusPerLine; + var blockRow = mcuRow * component.v + row; + var blockCol = mcuCol * component.h + col; + // If the block is missing, just skip it. + if (component.blocks[blockRow] === undefined) + return; + decode(component, component.blocks[blockRow][blockCol]); + } + function decodeBlock(component, decode, mcu) { + var blockRow = (mcu / component.blocksPerLine) | 0; + var blockCol = mcu % component.blocksPerLine; + // If the block is missing, just skip it. + if (component.blocks[blockRow] === undefined) + return; + decode(component, component.blocks[blockRow][blockCol]); + } + var componentsLength = components.length; + var component; + var decodeFn; + if (progressive) { + if (spectralStart === 0) { + decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive; + } + else { + decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive; + } + } + else { + decodeFn = decodeBaseline; + } + var mcu = 0; + var mcuExpected; + if (componentsLength == 1) { + mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn; + } + else { + mcuExpected = mcusPerLine * frame.mcusPerColumn; + } + if (!resetInterval) + resetInterval = mcuExpected; + var h; + var v; + var marker; + while (mcu < mcuExpected) { + // reset interval stuff + for (var i = 0; i < componentsLength; i++) + components[i].pred = 0; + eobrun = 0; + if (componentsLength == 1) { + component = components[0]; + for (var n = 0; n < resetInterval; n++) { + decodeBlock(component, decodeFn, mcu); + mcu++; + } + } + else { + for (var n = 0; n < resetInterval; n++) { + for (var i = 0; i < componentsLength; i++) { + component = components[i]; + h = component.h; + v = component.v; + for (var j = 0; j < v; j++) { + for (var k = 0; k < h; k++) { + decodeMcu(component, decodeFn, mcu, j, k); + } + } + } + mcu++; + // If we've reached our expected MCU's, stop decoding + if (mcu === mcuExpected) + break; + } + } + if (mcu === mcuExpected) { + // Skip trailing bytes at the end of the scan - until we reach the next marker + do { + if (data[offset] === 0xFF) { + if (data[offset + 1] !== 0x00) { + break; + } + } + offset += 1; + } while (offset < data.length - 2); + } + // find marker + bitsCount = 0; + marker = (data[offset] << 8) | data[offset + 1]; + if (marker < 0xFF00) + throw new Error('marker was not found'); + if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx + offset += 2; + } + else { + break; + } + } + return offset - startOffset; +} +function buildComponentData(component) { + var lines = []; + var blocksPerLine = component.blocksPerLine; + var blocksPerColumn = component.blocksPerColumn; + var samplesPerLine = blocksPerLine << 3; + // Only 1 used per invocation of this function and garbage collected after invocation, so no need to account for its memory footprint. + var R = new Int32Array(64); + var r = new Uint8Array(64); + // A port of poppler's IDCT method which in turn is taken from: + // Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz, + // "Practical Fast 1-D DCT Algorithms with 11 Multiplications", + // IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989, + // 988-991. + function quantizeAndInverse(zz, dataOut, dataIn) { + var qt = component.quantizationTable; + var p = dataIn; + // dequant + for (var i = 0; i < 64; i++) { + p[i] = zz[i] * qt[i]; + } + // inverse DCT on rows + for (var i = 0; i < 8; ++i) { + var row = 8 * i; + // check for all-zero AC coefficients + if (p[1 + row] == 0 && p[2 + row] == 0 && p[3 + row] == 0 && + p[4 + row] == 0 && p[5 + row] == 0 && p[6 + row] == 0 && + p[7 + row] == 0) { + var t_1 = (dctSqrt2 * p[0 + row] + 512) >> 10; + p[0 + row] = t_1; + p[1 + row] = t_1; + p[2 + row] = t_1; + p[3 + row] = t_1; + p[4 + row] = t_1; + p[5 + row] = t_1; + p[6 + row] = t_1; + p[7 + row] = t_1; + continue; + } + // stage 4 + var v0 = (dctSqrt2 * p[0 + row] + 128) >> 8; + var v1 = (dctSqrt2 * p[4 + row] + 128) >> 8; + var v2 = p[2 + row]; + var v3 = p[6 + row]; + var v4 = (dctSqrt1d2 * (p[1 + row] - p[7 + row]) + 128) >> 8; + var v7 = (dctSqrt1d2 * (p[1 + row] + p[7 + row]) + 128) >> 8; + var v5 = p[3 + row] << 4; + var v6 = p[5 + row] << 4; + // stage 3 + var t = (v0 - v1 + 1) >> 1; + v0 = (v0 + v1 + 1) >> 1; + v1 = t; + t = (v2 * dctSin6 + v3 * dctCos6 + 128) >> 8; + v2 = (v2 * dctCos6 - v3 * dctSin6 + 128) >> 8; + v3 = t; + t = (v4 - v6 + 1) >> 1; + v4 = (v4 + v6 + 1) >> 1; + v6 = t; + t = (v7 + v5 + 1) >> 1; + v5 = (v7 - v5 + 1) >> 1; + v7 = t; + // stage 2 + t = (v0 - v3 + 1) >> 1; + v0 = (v0 + v3 + 1) >> 1; + v3 = t; + t = (v1 - v2 + 1) >> 1; + v1 = (v1 + v2 + 1) >> 1; + v2 = t; + t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12; + v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12; + v7 = t; + t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12; + v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12; + v6 = t; + // stage 1 + p[0 + row] = v0 + v7; + p[7 + row] = v0 - v7; + p[1 + row] = v1 + v6; + p[6 + row] = v1 - v6; + p[2 + row] = v2 + v5; + p[5 + row] = v2 - v5; + p[3 + row] = v3 + v4; + p[4 + row] = v3 - v4; + } + // inverse DCT on columns + for (var i = 0; i < 8; ++i) { + var col = i; + // check for all-zero AC coefficients + if (p[1 * 8 + col] == 0 && p[2 * 8 + col] == 0 && p[3 * 8 + col] == 0 && + p[4 * 8 + col] == 0 && p[5 * 8 + col] == 0 && p[6 * 8 + col] == 0 && + p[7 * 8 + col] == 0) { + var t_2 = (dctSqrt2 * dataIn[i + 0] + 8192) >> 14; + p[0 * 8 + col] = t_2; + p[1 * 8 + col] = t_2; + p[2 * 8 + col] = t_2; + p[3 * 8 + col] = t_2; + p[4 * 8 + col] = t_2; + p[5 * 8 + col] = t_2; + p[6 * 8 + col] = t_2; + p[7 * 8 + col] = t_2; + continue; + } + // stage 4 + var v0 = (dctSqrt2 * p[0 * 8 + col] + 2048) >> 12; + var v1 = (dctSqrt2 * p[4 * 8 + col] + 2048) >> 12; + var v2 = p[2 * 8 + col]; + var v3 = p[6 * 8 + col]; + var v4 = (dctSqrt1d2 * (p[1 * 8 + col] - p[7 * 8 + col]) + 2048) >> 12; + var v7 = (dctSqrt1d2 * (p[1 * 8 + col] + p[7 * 8 + col]) + 2048) >> 12; + var v5 = p[3 * 8 + col]; + var v6 = p[5 * 8 + col]; + // stage 3 + var t = (v0 - v1 + 1) >> 1; + v0 = (v0 + v1 + 1) >> 1; + v1 = t; + t = (v2 * dctSin6 + v3 * dctCos6 + 2048) >> 12; + v2 = (v2 * dctCos6 - v3 * dctSin6 + 2048) >> 12; + v3 = t; + t = (v4 - v6 + 1) >> 1; + v4 = (v4 + v6 + 1) >> 1; + v6 = t; + t = (v7 + v5 + 1) >> 1; + v5 = (v7 - v5 + 1) >> 1; + v7 = t; + // stage 2 + t = (v0 - v3 + 1) >> 1; + v0 = (v0 + v3 + 1) >> 1; + v3 = t; + t = (v1 - v2 + 1) >> 1; + v1 = (v1 + v2 + 1) >> 1; + v2 = t; + t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12; + v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12; + v7 = t; + t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12; + v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12; + v6 = t; + // stage 1 + p[0 * 8 + col] = v0 + v7; + p[7 * 8 + col] = v0 - v7; + p[1 * 8 + col] = v1 + v6; + p[6 * 8 + col] = v1 - v6; + p[2 * 8 + col] = v2 + v5; + p[5 * 8 + col] = v2 - v5; + p[3 * 8 + col] = v3 + v4; + p[4 * 8 + col] = v3 - v4; + } + // convert to 8-bit integers + for (var i = 0; i < 64; ++i) { + var sample = 128 + ((p[i] + 8) >> 4); + dataOut[i] = sample < 0 ? 0 : sample > 0xFF ? 0xFF : sample; + } + } + requestMemoryAllocation(samplesPerLine * blocksPerColumn * 8); + for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) { + var scanLine = blockRow << 3; + for (var i = 0; i < 8; i++) + lines.push(new Uint8Array(samplesPerLine)); + for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) { + quantizeAndInverse(component.blocks[blockRow][blockCol], r, R); + var offset = 0; + var sample = blockCol << 3; + for (var j = 0; j < 8; j++) { + var line = lines[scanLine + j]; + for (var i = 0; i < 8; i++) + line[sample + i] = r[offset++]; + } + } + } + return lines; +} +function clampTo8bit(a) { + return a < 0 ? 0 : a > 255 ? 255 : a; +} +function parse(data) { + var self = { + width: 0, + height: 0, + comments: [], + adobe: undefined, + components: [], + exifBuffer: undefined, + jfif: undefined, + }; + var maxResolutionInPixels = maxResolutionInMP * 1000 * 1000; + var offset = 0; + function readUint16() { + var value = (data[offset] << 8) | data[offset + 1]; + offset += 2; + return value; + } + function readDataBlock() { + var length = readUint16(); + var array = data.subarray(offset, offset + length - 2); + offset += array.length; + return array; + } + function prepareComponents(frame) { + var maxH = 0, maxV = 0; + for (var componentId in frame.components) { + if (frame.components.hasOwnProperty(componentId)) { + var component = frame.components[componentId]; + if (maxH < component.h) + maxH = component.h; + if (maxV < component.v) + maxV = component.v; + } + } + var mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / maxH); + var mcusPerColumn = Math.ceil(frame.scanLines / 8 / maxV); + for (var componentId in frame.components) { + if (frame.components.hasOwnProperty(componentId)) { + var component = frame.components[componentId]; + var blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / maxH); + var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / maxV); + var blocksPerLineForMcu = mcusPerLine * component.h; + var blocksPerColumnForMcu = mcusPerColumn * component.v; + var blocksToAllocate = blocksPerColumnForMcu * blocksPerLineForMcu; + var blocks = []; + // Each block is a Int32Array of length 64 (4 x 64 = 256 bytes) + requestMemoryAllocation(blocksToAllocate * 256); + for (var i = 0; i < blocksPerColumnForMcu; i++) { + var row = []; + for (var j = 0; j < blocksPerLineForMcu; j++) { + row.push(new Int32Array(64)); + } + blocks.push(row); + } + component.blocksPerLine = blocksPerLine; + component.blocksPerColumn = blocksPerColumn; + component.blocks = blocks; + } + } + frame.maxH = maxH; + frame.maxV = maxV; + frame.mcusPerLine = mcusPerLine; + frame.mcusPerColumn = mcusPerColumn; + } + var jfif = null; + var adobe = null; + var frame = undefined; + var resetInterval = 0; + var quantizationTables = []; + var frames = []; + var huffmanTablesAC = []; + var huffmanTablesDC = []; + var fileMarker = readUint16(); + var malformedDataOffset = -1; + if (fileMarker != 0xFFD8) { // SOI (Start of Image) + throw new Error('SOI not found'); + } + fileMarker = readUint16(); + while (fileMarker != 0xFFD9) { // EOI (End of image) + switch (fileMarker) { + case 0xFF00: break; + case 0xFFE0: // APP0 (Application Specific) + case 0xFFE1: // APP1 + case 0xFFE2: // APP2 + case 0xFFE3: // APP3 + case 0xFFE4: // APP4 + case 0xFFE5: // APP5 + case 0xFFE6: // APP6 + case 0xFFE7: // APP7 + case 0xFFE8: // APP8 + case 0xFFE9: // APP9 + case 0xFFEA: // APP10 + case 0xFFEB: // APP11 + case 0xFFEC: // APP12 + case 0xFFED: // APP13 + case 0xFFEE: // APP14 + case 0xFFEF: // APP15 + case 0xFFFE: { // COM (Comment) + var appData = readDataBlock(); + if (fileMarker === 0xFFFE) { + var comment = ''; + for (var ii = 0; ii < appData.byteLength; ii++) { + comment += String.fromCharCode(appData[ii]); + } + self.comments.push(comment); + } + if (fileMarker === 0xFFE0) { + if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49 && + appData[3] === 0x46 && appData[4] === 0) { // 'JFIF\x00' + jfif = { + version: { major: appData[5], minor: appData[6] }, + densityUnits: appData[7], + xDensity: (appData[8] << 8) | appData[9], + yDensity: (appData[10] << 8) | appData[11], + thumbWidth: appData[12], + thumbHeight: appData[13], + thumbData: appData.subarray(14, 14 + 3 * appData[12] * appData[13]) + }; + } + } + // TODO APP1 - Exif + if (fileMarker === 0xFFE1) { + if (appData[0] === 0x45 && + appData[1] === 0x78 && + appData[2] === 0x69 && + appData[3] === 0x66 && + appData[4] === 0) { // 'EXIF\x00' + self.exifBuffer = appData.subarray(5, appData.length); + } + } + if (fileMarker === 0xFFEE) { + if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6F && + appData[3] === 0x62 && appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\x00' + adobe = { + version: appData[6], + flags0: (appData[7] << 8) | appData[8], + flags1: (appData[9] << 8) | appData[10], + transformCode: appData[11] + }; + } + } + break; + } + case 0xFFDB: { // DQT (Define Quantization Tables) + var quantizationTablesLength = readUint16(); + var quantizationTablesEnd = quantizationTablesLength + offset - 2; + while (offset < quantizationTablesEnd) { + var quantizationTableSpec = data[offset++]; + requestMemoryAllocation(64 * 4); + var tableData = new Int32Array(64); + if ((quantizationTableSpec >> 4) === 0) { // 8 bit values + for (var j = 0; j < 64; j++) { + var z = dctZigZag[j]; + tableData[z] = data[offset++]; + } + } + else if ((quantizationTableSpec >> 4) === 1) { //16 bit + for (var j = 0; j < 64; j++) { + var z = dctZigZag[j]; + tableData[z] = readUint16(); + } + } + else + throw new Error('DQT: invalid table spec'); + quantizationTables[quantizationTableSpec & 15] = tableData; + } + break; + } + case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT) + case 0xFFC1: // SOF1 (Start of Frame, Extended DCT) + case 0xFFC2: { // SOF2 (Start of Frame, Progressive DCT) + readUint16(); // skip data length + frame = { + extended: (fileMarker === 0xFFC1), + progressive: (fileMarker === 0xFFC2), + precision: data[offset++], + scanLines: readUint16(), + samplesPerLine: readUint16(), + components: {}, + componentsOrder: [], + maxH: 0, + maxV: 0, + mcusPerLine: 0, + mcusPerColumn: 0, + }; + var pixelsInFrame = frame.scanLines * frame.samplesPerLine; + if (pixelsInFrame > maxResolutionInPixels) { + var exceededAmount = Math.ceil((pixelsInFrame - maxResolutionInPixels) / 1e6); + throw new Error("maxResolutionInMP limit exceeded by ".concat(exceededAmount, "MP")); + } + var componentsCount = data[offset++]; + for (var i = 0; i < componentsCount; i++) { + var componentId = data[offset]; + var h = data[offset + 1] >> 4; + var v = data[offset + 1] & 15; + var qId = data[offset + 2]; + frame.componentsOrder.push(componentId); + frame.components[componentId] = { + h: h, + v: v, + quantizationIdx: qId, + blocksPerColumn: 0, + blocksPerLine: 0, + blocks: [], + pred: 0, + }; + offset += 3; + } + prepareComponents(frame); + frames.push(frame); + break; + } + case 0xFFC4: { // DHT (Define Huffman Tables) + var huffmanLength = readUint16(); + for (var i = 2; i < huffmanLength;) { + var huffmanTableSpec = data[offset++]; + var codeLengths = new Uint8Array(16); + var codeLengthSum = 0; + for (var j = 0; j < 16; j++, offset++) { + codeLengthSum += (codeLengths[j] = data[offset]); + } + requestMemoryAllocation(16 + codeLengthSum); + var huffmanValues = new Uint8Array(codeLengthSum); + for (var j = 0; j < codeLengthSum; j++, offset++) { + huffmanValues[j] = data[offset]; + } + i += 17 + codeLengthSum; + var index = huffmanTableSpec & 15; + var table = (huffmanTableSpec >> 4) === 0 ? huffmanTablesDC : huffmanTablesAC; + table[index] = buildHuffmanTable(codeLengths, huffmanValues); + } + break; + } + case 0xFFDD: // DRI (Define Restart Interval) + readUint16(); // skip data length + resetInterval = readUint16(); + break; + case 0xFFDC: // Number of Lines marker + readUint16(); // skip data length + readUint16(); // Ignore this data since it represents the image height + break; + case 0xFFDA: { // SOS (Start of Scan) + readUint16(); // skip data length + var selectorsCount = data[offset++]; + var components = []; + for (var i = 0; i < selectorsCount; i++) { + var component = frame.components[data[offset++]]; + var tableSpec = data[offset++]; + component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4]; + component.huffmanTableAC = huffmanTablesAC[tableSpec & 15]; + components.push(component); + } + var spectralStart = data[offset++]; + var spectralEnd = data[offset++]; + var successiveApproximation = data[offset++]; + var processed = decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successiveApproximation >> 4, successiveApproximation & 15); + offset += processed; + break; + } + case 0xFFFF: // Fill bytes + if (data[offset] !== 0xFF) { // Avoid skipping a valid marker. + offset--; + } + break; + default: { + if (data[offset - 3] == 0xFF && data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) { + // could be incorrect encoding -- last 0xFF byte of the previous + // block was eaten by the encoder + offset -= 3; + break; + } + else if (fileMarker === 0xE0 || fileMarker == 0xE1) { + // Recover from malformed APP1 markers popular in some phone models. + // See https://github.com/eugeneware/jpeg-js/issues/82 + if (malformedDataOffset !== -1) { + throw new Error("first unknown JPEG marker at offset ".concat(malformedDataOffset.toString(16), ", second unknown JPEG marker ").concat(fileMarker.toString(16), " at offset ").concat((offset - 1).toString(16))); + } + malformedDataOffset = offset - 1; + var nextOffset = readUint16(); + if (data[offset + nextOffset - 2] === 0xFF) { + offset += nextOffset - 2; + break; + } + } + throw new Error('unknown JPEG marker ' + fileMarker.toString(16)); + } + } + fileMarker = readUint16(); + } + if (frames.length != 1) + throw new Error('only single frame JPEGs supported'); + // set each frame's components quantization table + for (var i = 0; i < frames.length; i++) { + var cp = frames[i].components; + for (var j in cp) { // TODO: don't use `in` + cp[j].quantizationTable = quantizationTables[cp[j].quantizationIdx]; + delete cp[j].quantizationIdx; // TODO: why ??? + } + } + self.width = frame.samplesPerLine; + self.height = frame.scanLines; + self.jfif = jfif; + self.adobe = adobe; + self.components = []; + for (var i = 0; i < frame.componentsOrder.length; i++) { + var component = frame.components[frame.componentsOrder[i]]; + self.components.push({ + lines: buildComponentData(component), + scaleX: component.h / frame.maxH, + scaleY: component.v / frame.maxV + }); + } + return self; +} +function getData(decoded) { + var offset = 0; + var colorTransform = false; + var width = decoded.width; + var height = decoded.height; + var dataLength = width * height * decoded.components.length; + requestMemoryAllocation(dataLength); + var data = new Uint8Array(dataLength); + switch (decoded.components.length) { + case 1: { + var component1 = decoded.components[0]; + for (var y = 0; y < height; y++) { + var component1Line = component1.lines[0 | (y * component1.scaleY)]; + for (var x = 0; x < width; x++) { + var Y = component1Line[0 | (x * component1.scaleX)]; + data[offset++] = Y; + } + } + break; + } + case 2: { + // PDF might compress two component data in custom colorspace + var component1 = decoded.components[0]; + var component2 = decoded.components[1]; + for (var y = 0; y < height; y++) { + var component1Line = component1.lines[0 | (y * component1.scaleY)]; + var component2Line = component2.lines[0 | (y * component2.scaleY)]; + for (var x = 0; x < width; x++) { + var Y1 = component1Line[0 | (x * component1.scaleX)]; + data[offset++] = Y1; + var Y2 = component2Line[0 | (x * component2.scaleX)]; + data[offset++] = Y2; + } + } + break; + } + case 3: { + // The default transform for three components is true + colorTransform = true; + // The adobe transform marker overrides any previous setting + if (decoded.adobe && decoded.adobe.transformCode) + colorTransform = true; + var component1 = decoded.components[0]; + var component2 = decoded.components[1]; + var component3 = decoded.components[2]; + for (var y = 0; y < height; y++) { + var component1Line = component1.lines[0 | (y * component1.scaleY)]; + var component2Line = component2.lines[0 | (y * component2.scaleY)]; + var component3Line = component3.lines[0 | (y * component3.scaleY)]; + for (var x = 0; x < width; x++) { + var Y = void 0, Cb = void 0, Cr = void 0, R = void 0, G = void 0, B = void 0; + if (!colorTransform) { + R = component1Line[0 | (x * component1.scaleX)]; + G = component2Line[0 | (x * component2.scaleX)]; + B = component3Line[0 | (x * component3.scaleX)]; + } + else { + Y = component1Line[0 | (x * component1.scaleX)]; + Cb = component2Line[0 | (x * component2.scaleX)]; + Cr = component3Line[0 | (x * component3.scaleX)]; + R = clampTo8bit(Y + 1.402 * (Cr - 128)); + G = clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128)); + B = clampTo8bit(Y + 1.772 * (Cb - 128)); + } + data[offset++] = R; + data[offset++] = G; + data[offset++] = B; + } + } + break; + } + case 4: { + if (!decoded.adobe) + throw new Error('Unsupported color mode (4 components)'); + // The default transform for four components is false + colorTransform = false; + // The adobe transform marker overrides any previous setting + if (decoded.adobe && decoded.adobe.transformCode) + colorTransform = true; + var component1 = decoded.components[0]; + var component2 = decoded.components[1]; + var component3 = decoded.components[2]; + var component4 = decoded.components[3]; + for (var y = 0; y < height; y++) { + var component1Line = component1.lines[0 | (y * component1.scaleY)]; + var component2Line = component2.lines[0 | (y * component2.scaleY)]; + var component3Line = component3.lines[0 | (y * component3.scaleY)]; + var component4Line = component4.lines[0 | (y * component4.scaleY)]; + for (var x = 0; x < width; x++) { + var Y = void 0, Cb = void 0, Cr = void 0, K = void 0, C = void 0, M = void 0, Ye = void 0; + if (!colorTransform) { + C = component1Line[0 | (x * component1.scaleX)]; + M = component2Line[0 | (x * component2.scaleX)]; + Ye = component3Line[0 | (x * component3.scaleX)]; + K = component4Line[0 | (x * component4.scaleX)]; + } + else { + Y = component1Line[0 | (x * component1.scaleX)]; + Cb = component2Line[0 | (x * component2.scaleX)]; + Cr = component3Line[0 | (x * component3.scaleX)]; + K = component4Line[0 | (x * component4.scaleX)]; + C = 255 - clampTo8bit(Y + 1.402 * (Cr - 128)); + M = 255 - clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128)); + Ye = 255 - clampTo8bit(Y + 1.772 * (Cb - 128)); + } + data[offset++] = 255 - C; + data[offset++] = 255 - M; + data[offset++] = 255 - Ye; + data[offset++] = 255 - K; + } + } + break; + } + default: + throw new Error('Unsupported color mode'); + } + return data; +} +function decodeJpeg(encoded, createImageData) { + totalBytesAllocated = 0; + if (encoded.length === 0) + throw new Error('Empty jpeg buffer'); + var decoded = parse(encoded); + requestMemoryAllocation(decoded.width * decoded.height * 4); + var data = getData(decoded); + var imageData = createImageData(decoded.width, decoded.height); + var width = imageData.width; + var height = imageData.height; + var imageDataArray = imageData.data; + var i = 0; + var j = 0; + switch (decoded.components.length) { + case 1: + for (var y = 0; y < height; y++) { + for (var x = 0; x < width; x++) { + var Y = data[i++]; + imageDataArray[j++] = Y; + imageDataArray[j++] = Y; + imageDataArray[j++] = Y; + imageDataArray[j++] = 255; + } + } + break; + case 3: + for (var y = 0; y < height; y++) { + for (var x = 0; x < width; x++) { + var R = data[i++]; + var G = data[i++]; + var B = data[i++]; + imageDataArray[j++] = R; + imageDataArray[j++] = G; + imageDataArray[j++] = B; + imageDataArray[j++] = 255; + } + } + break; + case 4: + for (var y = 0; y < height; y++) { + for (var x = 0; x < width; x++) { + var C = data[i++]; + var M = data[i++]; + var Y = data[i++]; + var K = data[i++]; + var R = 255 - clampTo8bit(C * (1 - K / 255) + K); + var G = 255 - clampTo8bit(M * (1 - K / 255) + K); + var B = 255 - clampTo8bit(Y * (1 - K / 255) + K); + imageDataArray[j++] = R; + imageDataArray[j++] = G; + imageDataArray[j++] = B; + imageDataArray[j++] = 255; + } + } + break; + default: + throw new Error('Unsupported color mode'); + } + return imageData; +} +exports.decodeJpeg = decodeJpeg; + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImpwZWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLDhDQUE4QztBQUM5Qzs7Ozs7Ozs7Ozs7Ozs7RUFjRTs7O0FBNkNGLElBQU0sU0FBUyxHQUFHLElBQUksVUFBVSxDQUFDO0lBQy9CLENBQUM7SUFDRCxDQUFDLEVBQUUsQ0FBQztJQUNKLEVBQUUsRUFBRSxDQUFDLEVBQUUsQ0FBQztJQUNSLENBQUMsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUU7SUFDYixFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsQ0FBQztJQUNqQixDQUFDLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUUsRUFBRSxFQUFFLEVBQUU7SUFDckIsRUFBRSxFQUFFLEVBQUUsRUFB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dFZhbHVlID0gcmVjZWl2ZUFuZEV4dGVuZChzKTtcclxuICAgICAgICAgICAgc3VjY2Vzc2l2ZUFDU3RhdGUgPSByID8gMiA6IDM7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBjb250aW51ZTtcclxuICAgICAgICBjYXNlIDE6IC8vIHNraXBwaW5nIHIgemVybyBpdGVtc1xyXG4gICAgICAgIGNhc2UgMjpcclxuICAgICAgICAgIGlmICh6elt6XSkge1xyXG4gICAgICAgICAgICB6elt6XSArPSAocmVhZEJpdCgpIDw8IHN1Y2Nlc3NpdmUpICogZGlyZWN0aW9uO1xyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgci0tO1xyXG4gICAgICAgICAgICBpZiAociA9PT0gMCkgc3VjY2Vzc2l2ZUFDU3RhdGUgPSBzdWNjZXNzaXZlQUNTdGF0ZSA9PSAyID8gMyA6IDA7XHJcbiAgICAgICAgICB9XHJcbiAgICAgICAgICBicmVhaztcclxuICAgICAgICBjYXNlIDM6IC8vIHNldCB2YWx1ZSBmb3IgYSB6ZXJvIGl0ZW1cclxuICAgICAgICAgIGlmICh6elt6XSkge1xyXG4gICAgICAgICAgICB6elt6XSArPSAocmVhZEJpdCgpIDw8IHN1Y2Nlc3NpdmUpICogZGlyZWN0aW9uO1xyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgenpbel0gPSBzdWNjZXNzaXZlQUNOZXh0VmFsdWUgPDwgc3VjY2Vzc2l2ZTtcclxuICAgICAgICAgICAgc3VjY2Vzc2l2ZUFDU3RhdGUgPSAwO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgY2FzZSA0OiAvLyBlb2JcclxuICAgICAgICAgIGlmICh6elt6XSkge1xyXG4gICAgICAgICAgICB6elt6XSArPSAocmVhZEJpdCgpIDw8IHN1Y2Nlc3NpdmUpICogZGlyZWN0aW9uO1xyXG4gICAgICAgICAgfVxyXG4gICA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yIChsZXQgayA9IDA7IGsgPCBoOyBrKyspIHtcclxuICAgICAgICAgICAgICBkZWNvZGVNY3UoY29tcG9uZW50LCBkZWNvZGVGbiwgbWN1LCBqLCBrKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBtY3UrKztcclxuXHJcbiAgICAgICAgLy8gSWYgd2UndmUgcmVhY2hlZCBvdXIgZXhwZWN0ZWQgTUNVJ3MsIHN0b3AgZGVjb2RpbmdcclxuICAgICAgICBpZiAobWN1ID09PSBtY3VFeHBlY3RlZCkgYnJlYWs7XHJcbiAgICAgIH1cclxuICAgIH1cclxuXHJcbiAgICBpZiAobWN1ID09PSBtY3VFeHBlY3RlZCkge1xyXG4gICAgICAvLyBTa2lwIHRyYWlsaW5nIGJ5dGVzIGF0IHRoZSBlbmQgb2YgdGhlIHNjYW4gLSB1bnRpbCB3ZSByZWFjaCB0aGUgbmV4dCBtYXJrZXJcclxuICAgICAgZG8ge1xyXG4gICAgICAgIGlmIChkYXRhW29mZnNldF0gPT09IDB4RkYpIHtcclxuICAgICAgICAgIGlmIChkYXRhW29mZnNldCArIDFdICE9PSAweDAwKSB7XHJcbiAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICBvZmZzZXQgKz0gMTtcclxuICAgICAgfSB3aGlsZSAob2Zmc2V0IDwgZGF0YS5sZW5ndGggLSAyKTtcclxuICAgIH1cclxuXHJcbiAgICAvLyBmaW5kIG1hcmtlclxyXG4gICAgYml0c0NvdW50ID0gMDtcclxuICAgIG1hcmtlciA9IChkYXRhW29mZnNldF0gPDwgOCkgfCBkYXRhW29mZnNldCArIDFdO1xyXG5cclxuICAgIGlmIChtYXJrZXIgPCAweEZGMDApIHRocm93IG5ldyBFcnJvcignbWFya2VyIHdhcyBub3QgZm91bmQnKTtcclxuXHJcbiAgICBpZiAobWFya2VyID49IDB4RkZEMCAmJiBtYXJr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Zi4gb24gQWNvdXN0aWNzLCBTcGVlY2ggJiBTaWduYWwgUHJvY2Vzc2luZywgMTk4OSxcclxuICAvLyAgIDk4OC05OTEuXHJcbiAgZnVuY3Rpb24gcXVhbnRpemVBbmRJbnZlcnNlKHp6OiBJbnQzMkFycmF5LCBkYXRhT3V0OiBVaW50OEFycmF5LCBkYXRhSW46IEludDMyQXJyYXkpIHtcclxuICAgIGNvbnN0IHF0ID0gY29tcG9uZW50LnF1YW50aXphdGlvblRhYmxlITtcclxuICAgIGNvbnN0IHAgPSBkYXRhSW47XHJcblxyXG4gICAgLy8gZGVxdWFudFxyXG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCA2NDsgaSsrKSB7XHJcbiAgICAgIHBbaV0gPSB6eltpXSAqIHF0W2ldO1xyXG4gICAgfVxyXG5cclxuICAgIC8vIGludmVyc2UgRENUIG9uIHJvd3NcclxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgODsgKytpKSB7XHJcbiAgICAgIGNvbnN0IHJvdyA9IDggKiBpO1xyXG5cclxuICAgICAgLy8gY2hlY2sgZm9yIGFsbC16ZXJvIEFDIGNvZWZmaWNpZW50c1xyXG4gICAgICBpZiAocFsxICsgcm93XSA9PSAwICYmIHBbMiArIHJvd10gPT0gMCAmJiBwWzMgKyByb3ddID09IDAgJiZcclxuICAgICAgICBwWzQgKyByb3ddID09IDAgJiYgcFs1ICsgcm93XSA9PSAwICYmIHBbNiArIHJvd10gPT0gMCAmJlxyXG4gICAgICAgIHBbNyArIHJvd10gPT0gMCkge1xyXG4gICAgICAgIGNvbnN0IHQgPSAoZGN0U3FydDIgKiBwWzAgKyByb3ddICsgNTEyKSA+PiAxMDtcclxuICAgICAgICBwWzAgKyByb3ddID0gdDtcclxuICAgICAgICBwWzEgKyByb3ddID0gdDtcclxuICAgICAgICBwWzIgKyByb3ddID0gdDtcclxuICAgICAgICBwWzMgKyByb3ddID0gdDtcclxuICAgICAgICBwWzQgKyByb3ddID0gdDtcclxuICAgIC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DVCBvbiBjb2x1bW5zXHJcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IDg7ICsraSkge1xyXG4gICAgICBjb25zdCBjb2wgPSBpO1xyXG5cclxuICAgICAgLy8gY2hlY2sgZm9yIGFsbC16ZXJvIEFDIGNvZWZmaWNpZW50c1xyXG4gICAgICBpZiAocFsxICogOCArIGNvbF0gPT0gMCAmJiBwWzIgKiA4ICsgY29sXSA9PSAwICYmIHBbMyAqIDggKyBjb2xdID09IDAgJiZcclxuICAgICAgICBwWzQgKiA4ICsgY29sXSA9PSAwICYmIHBbNSAqIDggKyBjb2xdID09IDAgJiYgcFs2ICogOCArIGNvbF0gPT0gMCAmJlxyXG4gICAgICAgIHBbNyAqIDggKyBjb2xdID09IDApIHtcclxuICAgICAgICBjb25zdCB0ID0gKGRjdFNxcnQyICogZGF0YUluW2kgKyAwXSArIDgxOTIpID4+IDE0O1xyXG4gICAgICAgIHBbMCAqIDggKyBjb2xdID0gdDtcclxuICAgICAgICBwWzEgKiA4ICsgY29sXSA9IHQ7XHJcbiAgICAgICAgcFsyICogOCArIGNvbF0gPSB0O1xyXG4gICAgICAgIHBbMyAqIDggKyBjb2xdID0gdDtcclxuICAgICAgICBwWzQgKiA4ICsgY29sXSA9IHQ7XHJcbiAgICAgICAgcFs1ICogOCArIGNvbF0gPSB0O1xyXG4gICAgICAgIHBbNiAqIDggKyBjb2xdID0gdDtcclxuICAgICAgICBwWzcgKiA4ICsgY29sXSA9IHQ7XHJcbiAgICAgICAgY29udGludWU7XHJcbiAgICAgIH1cclxuXHJcbiAgICAgIC8vIHN0YWdlIDRcclxuICAgICAgbGV0IHYwID0gKGRjdFNxcnQyICogcFswICogOCArIGNvbF0gKyAyMDQ4KSA+PiAxMjtcclxuICAgICAgbGV0IHYxID0gKGRjdFNxcnQyICogcFs0ICogOCArIGNvbF0gKyAyMDQ4KSA+PiAxMjtcclxuICAgICAgbGV0IHYyID0gcFsyICogOCArIGNvbF07XHJcbiAgICAgIGxldCB2M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Ly8gQVBQNVxyXG4gICAgICBjYXNlIDB4RkZFNjogLy8gQVBQNlxyXG4gICAgICBjYXNlIDB4RkZFNzogLy8gQVBQN1xyXG4gICAgICBjYXNlIDB4RkZFODogLy8gQVBQOFxyXG4gICAgICBjYXNlIDB4RkZFOTogLy8gQVBQOVxyXG4gICAgICBjYXNlIDB4RkZFQTogLy8gQVBQMTBcclxuICAgICAgY2FzZSAweEZGRUI6IC8vIEFQUDExXHJcbiAgICAgIGNhc2UgMHhGRkVDOiAvLyBBUFAxMlxyXG4gICAgICBjYXNlIDB4RkZFRDogLy8gQVBQMTNcclxuICAgICAgY2FzZSAweEZGRUU6IC8vIEFQUDE0XHJcbiAgICAgIGNhc2UgMHhGRkVGOiAvLyBBUFAxNVxyXG4gICAgICBjYXNlIDB4RkZGRTogeyAvLyBDT00gKENvbW1lbnQpXHJcbiAgICAgICAgY29uc3QgYXBwRGF0YSA9IHJlYWREYXRhQmxvY2soKTtcclxuXHJcbiAgICAgICAgaWYgKGZpbGVNYXJrZXIgPT09IDB4RkZGRSkge1xyXG4gICAgICAgICAgbGV0IGNvbW1lbnQgPSAnJztcclxuICAgICAgICAgIGZvciAobGV0IGlpID0gMDsgaWkgPCBhcHBEYXRhLmJ5dGVMZW5ndGg7IGlpKyspIHtcclxuICAgICAgICAgICAgY29tbWVudCArPSBTdHJpbmcuZnJvbUNoYXJDb2RlKGFwcERhdGFbaWldKTtcclxuICAgICAgICAgIH1cclxuICAgICAgICAgIHNlbGYuY29tbWVudHMucHVzaChjb21tZW50KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChmaWxlTWFya2VyID09PSAweEZGRTApIHtcclxuICAgICAgICAgIGlmIChhcHBEYXRhWzBdID09PSAweDRBICYmIGFwcERhdGFbMV0gPT09IDB4NDYgJiYgYXBwRGF0YVsyXSA9PT0gMHg0OSAmJlxyXG4gICAgICAgICAgICBhcHBEYXRhWzNdID09PSAweDQ2ICYmIGFwcERhdGFbNF0gPT09IDApIHsgLy8gJ0pGSUZcXHgwMCdcclxuICAgICAgICAgICAgamZpZiA9IHtcclxuICAgICAgICAgICAgICB2ZXJzaW9uOiB7IG1ham9yOiBhcHBEYXRhWzVdLCBtaW5vcjogYXBwRGF0YVs2XSB9LFxyXG4gICAgICAgICAgICAgIGRlbnNpdHlVbml0czogYXBwRGF0YVs3XSxcclxuICAgICAgICAgICAgICB4RGVuc2l0eTogKGFwcERhdGFbOF0gPDwgOCkgfCBhcHBEYXRhWzldLFxyXG4gICAgICAgICAgICAgIHlEZW5zaXR5OiAoYXBwRGF0YVsxMF0gPDwgOCkgfCBhcHBEYXRhWzExXSxcclxuICAgICAgICAgICAgICB0aHVtYldpZHRoOiBhcHBEYXRhWzEyXSxcclxuICAgICAgICAgICAgICB0aHVtYkhlaWdodDogYXBwRGF0YVsxM10sXHJcbiAgICAgICAgICAgICAgdGh1bWJEYXRhOiBhcHBEYXRhLnN1YmFycmF5KDE0LCAxNCArIDMgKiBhcHBEYXRhWzEyXSAqIGFwcERhdGFbMTNdKVxyXG4gICAgICAgICAgICB9O1xyXG4gICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgICAgICAvLyBUT0RPIEFQUDEgLSBFeGlmXHJcbiAgICAgICAgaWYgKGZpbGVNYXJrZXIgPT09IDB4RkZFMSkge1xyXG4gICAgICAgICAgaWYgKGFwcERhdGFbMF0gPT09IDB4NDUgJiZcclxuICAgICAgICAgICAgYXBwRGF0YVsxXSA9PT0gMHg3OCAmJlxyXG4gICAgICAgICAgICBhcHBEYXRhWzJdID09PSAweDY5ICYmXHJcbiAgICAgICAgICAgIGFwcERhdGFbM10gPT09IDB4NjYgJiZcclxuICAgICAgICAgICAgYXBwRGF0YVs0XSA9PT0gMCkgeyAvLyAnRVhJRlxceDAwJ1xyXG4gICAgICAgICAgICBzZWxmLmV4aWZCdWZmZXIgPSBhcHBEYXRhLnN1YmFycmF5KDUsIGFwcERhdGEubGVuZ3RoKTtcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGlmIChmaWxlTWFya2VyID09PSAweEZGRUUpIHtcclxuICAgICAgICAgIGlmIChhcHBEYXRhWzBdID09PSAweDQxICYmIGFwcERhdGFbMV0gPT09IDB4NjQgJiYgYXBwRGF0YVsyXSA9PT0gMHg2RiAmJlxyXG4gICAgICAgICAgICBhcHBEYXRhWzNdID09PSAweDYyICYmIGFwcERhdGFbNF0gPT09IDB4NjUgJiYgYXBwRGF0YVs1XSA9PT0gMCkgeyAvLyAnQWRvYmVcXHgwMCdcclxuICAgICAgICAgICAgYWRvYmUgPSB7XHJcbiAgICAgICAgICAgICAgdmVyc2lvbjogYXBwRGF0YVs2XSxcclxuICAgICAgICAgICAgICBmbGFnczA6IChhcHBEYXRhWzddIDw8IDgpIHwgYXBwRGF0YVs4XSxcclxuICAgICAgICAgICAgICBmbGFnczE6IChhcHBEYXRhWzldIDw8IDgpIHwgYXBwRGF0YVsxMF0sXHJcbiAgICAgICAgICAgICAgdHJhbnNmb3JtQ29kZTogYXBwRGF0YVsxMV1cclxuICAgICAgICAgICAgfTtcclxuICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICAgIH1cclxuICAgICAgY2FzZSAweEZGREI6IHsgLy8gRFFUIChEZWZpbmUgUXVhbnRpemF0aW9uIFRhYmxlcylcclxuICAgICAgICBjb25zdCBxdWFudGl6YXRpb25UYWJsZXNMZW5ndGggPSByZWFkVWludDE2KCk7XHJcbiAgICAgICAgY29uc3QgcXVhbnRpemF0aW9uVGFibGVzRW5kID0gcXVhbnRpemF0aW9uVGFibGVzTGVuZ3RoICsgb2Zmc2V0IC0gMjtcclxuICAgICAgICB3aGlsZSAob2Zmc2V0IDwgcXVhbnRpemF0aW9uVGFibGVzRW5kKSB7XHJcbiAgICAgICAgICBjb25zdCBxdWFudGl6YXRpb25UYWJsZVNwZWMgPSBkYXRhW29mZnNldCsrXTtcclxuICAgICAgICAgIHJlcXVlc3RNZW1vcnlBbGxvY2F0aW9uKDY0ICogNCk7XHJcbiAgICAgICAgICBjb25zdCB0YWJsZURhdGEgPSBuZXcgSW50MzJBcnJheSg2NCk7XHJcbiAgICAgICAgICBpZiAoKHF1YW50aXphdGlvblRhYmxlU3BlYyA+PiA0KSA9PT0gMCkgeyAvLyA4IGJpdCB2YWx1ZXNcclxuICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCA2NDsgaisrKSB7XHJcbiAgICAgICAgICAgICAgY29uc3QgeiA9IGRjdFppZ1phZ1tqXTtcclxuICAgICAgICAgICAgICB0YWJsZURhdGFbel0gPSBkYXRhW29mZnNldCsrXTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgfSBlbHNlIGlmICgocXVhbnRpemF0aW9uVGFibGVTcGVjID4+IDQpID09PSAxKSB7IC8vMTYgYml0XHJcbiAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgNjQ7IGorKykge1xyXG4gICAgICAgICAgICAgIGNvbnN0IHogPSBkY3RaaWdaYWdbal07XHJcbiAgICAgICAgICAgICAgdGFibGVEYXRhW3pdID0gcmVhZFVpbnQxNigpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgICB9IGVsc2VcclxuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdEUVQ6IGludmFsaWQgdGFibGUgc3BlYycpO1xyXG4gICAgICAgICAgcXVhbnRpemF0aW9uVGFibGVzW3F1YW50aXphdGlvblRhYmxlU3BlYyAmIDE1XSA9IHRhYmxlRGF0YTtcclxuICAgICAgICB9XHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICAgIH1cclxuICAgICAgY2FzZSAweEZGQzA6IC8vIFNPRjAgKFN0YXJ0IG9mIEZyYW1lLCBCYXNlbGluZSBEQ1QpXHJcbiAgICAgIGNhc2UgMHhGRkMxOiAvLyBTT0YxIChTdGFydCBvZiBGcmFtZSwgRXh0ZW5kZWQgRENUKVxyXG4gICAgICBjYXNlIDB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gICAgICAgfVxyXG5cclxuICAgICAgICBjb25zdCBjb21wb25lbnRzQ291bnQgPSBkYXRhW29mZnNldCsrXTtcclxuXHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjb21wb25lbnRzQ291bnQ7IGkrKykge1xyXG4gICAgICAgICAgY29uc3QgY29tcG9uZW50SWQgPSBkYXRhW29mZnNldF07XHJcbiAgICAgICAgICBjb25zdCBoID0gZGF0YVtvZmZzZXQgKyAxXSA+PiA0O1xyXG4gICAgICAgICAgY29uc3QgdiA9IGRhdGFbb2Zmc2V0ICsgMV0gJiAxNTtcclxuICAgICAgICAgIGNvbnN0IHFJZCA9IGRhdGFbb2Zmc2V0ICsgMl07XHJcbiAgICAgICAgICBmcmFtZSEuY29tcG9uZW50c09yZGVyLnB1c2goY29tcG9uZW50SWQpO1xyXG4gICAgICAgICAgZnJhbWUhLmNvbXBvbmVudHNbY29tcG9uZW50SWRdID0ge1xyXG4gICAgICAgICAgICBoOiBoLFxyXG4gICAgICAgICAgICB2OiB2LFxyXG4gICAgICAgICAgICBxdWFudGl6YXRpb25JZHg6IHFJZCxcclxuICAgICAgICAgICAgYmxvY2tzUGVyQ29sdW1uOiAwLFxyXG4gICAgICAgICAgICBibG9ja3NQZXJMaW5lOiAwLFxyXG4gICAgICAgICAgICBibG9ja3M6IFtdLFxyXG4gICAgICAgICAgICBwcmVkOiAwLFxyXG4gICAgICAgICAgfTtcclxuICAgICAgICAgIG9mZnNldCArPSAzO1xyXG4gICAgICAgIH1cclxuICAgICAgICBwcmVwYXJlQ29tcG9uZW50cyhmcmFtZSEpO1xyXG4gICAgICAgIGZyYW1lcy5wdXNoKGZyYW1lKTtcclxuICAgICAgICBicmVhaztcclxuICAgICAgfVxyXG4gICAgICBjYXNlIDB4RkZDNDogey8vIERIVCAoRGVmaW5lIEh1ZmZtYW4gVGFibGVzKVxyXG4gICAgICAgIGNvbnN0IGh1ZmZtYW5MZW5ndGggPSByZWFkVWludDE2KCk7XHJcblx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W5WYWx1ZXMpO1xyXG4gICAgICAgIH1cclxuICAgICAgICBicmVhaztcclxuICAgICAgfVxyXG4gICAgICBjYXNlIDB4RkZERDogLy8gRFJJIChEZWZpbmUgUmVzdGFydCBJbnRlcnZhbClcclxuICAgICAgICByZWFkVWludDE2KCk7IC8vIHNraXAgZGF0YSBsZW5ndGhcclxuICAgICAgICByZXNldEludGVydmFsID0gcmVhZFVpbnQxNigpO1xyXG4gICAgICAgIGJyZWFrO1xyXG4gICAgICBjYXNlIDB4RkZEQzogLy8gTnVtYmVyIG9mIExpbmVzIG1hcmtlclxyXG4gICAgICAgIHJlYWRVaW50MTYoKSAvLyBza2lwIGRhdGEgbGVuZ3RoXHJcbiAgICAgICAgcmVhZFVpbnQxNigpIC8vIElnbm9yZSB0aGlzIGRhdGEgc2luY2UgaXQgcmVwcmVzZW50cyB0aGUgaW1hZ2UgaGVpZ2h0XHJcbiAgICAgICAgYnJlYWs7XHJcbiAgICAgIGNhc2UgMHhGRkRBOiB7IC8vIFNPUyAoU3RhcnQgb2YgU2NhbilcclxuICAgICAgICByZWFkVWludDE2KCk7IC8vIHNraXAgZGF0YSBsZW5ndGhcclxuICAgICAgICBjb25zdCBzZWxlY3RvcnNDb3VudCA9IGRhdGFbb2Zmc2V0KytdO1xyXG4gICAgICAgIGNvbnN0IGNvbXBvbmVudHM6IENvbXBvbmVudFtdID0gW107XHJcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBzZWxlY3RvcnNDb3VudDsgaSsrKSB7XHJcbiAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBmcmFtZSEuY29tcG9uZW50c1tkYXRhW29mZnNldCsrXV07XHJcbiAgICAgICAgICBjb25zdCB0YWJsZVNwZWMgPSBkYXRhW29mZnNldCsrXTtcclxuICAgICAgICAgIGNvbXBvbmVudC5odWZmbWFuVGFibGVEQyA9IGh1ZmZtYW5UYWJsZXNEQ1t0YWJsZVNwZWMgPj4gNF07XHJcbiAgICAgICAgICBjb21w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wgKHkgKiBjb21wb25lbnQxLnNjYWxlWSldO1xyXG5cclxuICAgICAgICBmb3IgKGxldCB4ID0gMDsgeCA8IHdpZHRoOyB4KyspIHtcclxuICAgICAgICAgIGNvbnN0IFkgPSBjb21wb25lbnQxTGluZVswIHwgKHggKiBjb21wb25lbnQxLnNjYWxlWCldO1xyXG4gICAgICAgICAgZGF0YVtvZmZzZXQrK10gPSBZO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgICBicmVhaztcclxuICAgIH1cclxuICAgIGNhc2UgMjoge1xyXG4gICAgICAvLyBQREYgbWlnaHQgY29tcHJlc3MgdHdvIGNvbXBvbmVudCBkYXRhIGluIGN1c3RvbSBjb2xvcnNwYWNlXHJcbiAgICAgIGNvbnN0IGNvbXBvbmVudDEgPSBkZWNvZGVkLmNvbXBvbmVudHNbMF07XHJcbiAgICAgIGNvbnN0IGNvbXBvbmVudDIgPSBkZWNvZGVkLmNvbXBvbmVudHNbMV07XHJcblxyXG4gICAgICBmb3IgKGxldCB5ID0gMDsgeSA8IGhlaWdodDsgeSsrKSB7XHJcbiAgICAgICAgY29uc3QgY29tcG9uZW50MUxpbmUgPSBjb21wb25lbnQxLmxpbmVzWzAgfCAoeSAqIGNvbXBvbmVudDEuc2NhbGVZKV07XHJcbiAgICAgICAgY29uc3QgY29tcG9uZW50MkxpbmUgPSBjb21wb25lbnQyLmxpbmVzWzAgfCAoeSAqIGNvbXBvbmVudDIuc2NhbGVZKV07XHJcblxyXG4gICAgICAgIGZvciAobGV0IHggPSAwOyB4IDwgd2lkdGg7IHgrKykge1xyXG4gICAgICAgICAgY29uc3QgWTEgPSBjb21wb25lbnQxTGluZVswIHwgKHggKiBjb21wb25lbnQxLnNjYWxlWCldO1xyXG4gICAgICAgICAgZGF0YVtvZmZzZXQrK10gPSBZMTtcclxuICAgICAgICAgIGNvbnN0IFkyID0gY29tcG9uZW50MkxpbmVbMCB8ICh4ICogY29tcG9uZW50Mi5zY2FsZVgpXTtcclxuICAgICAgICAgIGRhdGFbb2Zmc2V0KytdID0gWTI7XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICAgIGJyZWFrO1xyXG4gICAgfVxyXG4gICAgY2FzZSAzOiB7XHJcbiAgICAgIC8vIFRoZSBkZWZhdWx0IHRyYW5zZm9ybSBmb3IgdGhyZWUgY29tcG9uZW50cyBpcyB0cnVlXHJcbiAgICAgIGNvbG9yVHJhbnNmb3JtID0gdHJ1ZTtcclxuICAgICAgLy8gVGhlIGFkb2JlIHRyYW5zZm9ybSBtYXJrZXIgb3ZlcnJpZGVzIGFueSBwcmV2aW91cyBzZXR0aW5nXHJcbiAgICAgIGlmIChkZWNvZGVkLmFkb2JlICYmIGRlY29kZWQuYWRvYmUudHJhbnNmb3JtQ29kZSkgY29sb3JUcmFuc2Zvcm0gPSB0cnVlO1xyXG5cclxuICAgICAgY29uc3QgY29tcG9uZW50MSA9IGRlY29kZWQuY29tcG9uZW50c1swXTtcclxuICAgICAgY29uc3QgY29tcG9uZW50MiA9IGRlY29kZWQuY29tcG9uZW50c1sxXTtcclxuICAgICAgY29uc3QgY29tcG9uZW50MyA9IGRlY29kZWQuY29tcG9uZW50c1syXTtcclxuXHJcbiAgICAgIGZvciAobGV0IHkgPSAwOyB5IDwgaGVpZ2h0OyB5KyspIHtcclxuICAgICAgICBjb25zdCBjb21wb25lbnQxTGluZSA9IGNvbXBvbmVudDEubGluZXNbMCB8ICh5ICogY29tcG9uZW50MS5zY2FsZVkpXTtcclxuICAgICAgICBjb25zdCBjb21wb25lbnQyTGluZSA9IGNvbXBvbmVudDIubGluZXNbMCB8ICh5ICogY29tcG9uZW50Mi5zY2FsZVkpXTtcclxuICAgICAgICBjb25zdCBjb21wb25lbnQzTGluZSA9IGNvbXBvbmVudDMubGluZXNbMCB8ICh5ICogY29tcG9uZW50My5zY2FsZVkpXTtcclxuXHJcbiAgICAgICAgZm9yIChsZXQgeCA9IDA7IHggPCB3aWR0aDsgeCsrKSB7XHJcbiAgICAgICAgICBsZXQgWSwgQ2IsIENyLCBSLCBHLCBCO1xyXG5cclxuICAgICAgICAgIGlmICghY29sb3JUcmFuc2Zvcm0pIHtcclxuICAgICAgICAgICAgUiA9IGNvbXBvbmVudDFMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDEuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIEcgPSBjb21wb25lbnQyTGluZVswIHwgKHggKiBjb21wb25lbnQyLnNjYWxlWCldO1xyXG4gICAgICAgICAgICBCID0gY29tcG9uZW50M0xpbmVbMCB8ICh4ICogY29tcG9uZW50My5zY2FsZVgpXTtcclxuICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIFkgPSBjb21wb25lbnQxTGluZVswIHwgKHggKiBjb21wb25lbnQxLnNjYWxlWCldO1xyXG4gICAgICAgICAgICBDYiA9IGNvbXBvbmVudDJMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDIuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIENyID0gY29tcG9uZW50M0xpbmVbMCB8ICh4ICogY29tcG9uZW50My5zY2FsZVgpXTtcclxuXHJcbiAgICAgICAgICAgIFIgPSBjbGFtcFRvOGJpdChZICsgMS40MDIgKiAoQ3IgLSAxMjgpKTtcclxuICAgICAgICAgICAgRyA9IGNsYW1wVG84Yml0KFkgLSAwLjM0NDEzNjMgKiAoQ2IgLSAxMjgpIC0gMC43MTQxMzYzNiAqIChDciAtIDEyOCkpO1xyXG4gICAgICAgICAgICBCID0gY2xhbXBUbzhiaXQoWSArIDEuNzcyICogKENiIC0gMTI4KSk7XHJcbiAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgZGF0YVtvZmZzZXQrK10gPSBSO1xyXG4gICAgICAgICAgZGF0YVtvZmZzZXQrK10gPSBHO1xyXG4gICAgICAgICAgZGF0YVtvZmZzZXQrK10gPSBCO1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgICBicmVhaztcclxuICAgIH1cclxuICAgIGNhc2U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4gICAgICAgIGNvbnN0IGNvbXBvbmVudDRMaW5lID0gY29tcG9uZW50NC5saW5lc1swIHwgKHkgKiBjb21wb25lbnQ0LnNjYWxlWSldO1xyXG5cclxuICAgICAgICBmb3IgKGxldCB4ID0gMDsgeCA8IHdpZHRoOyB4KyspIHtcclxuICAgICAgICAgIGxldCBZLCBDYiwgQ3IsIEssIEMsIE0sIFllO1xyXG5cclxuICAgICAgICAgIGlmICghY29sb3JUcmFuc2Zvcm0pIHtcclxuICAgICAgICAgICAgQyA9IGNvbXBvbmVudDFMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDEuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIE0gPSBjb21wb25lbnQyTGluZVswIHwgKHggKiBjb21wb25lbnQyLnNjYWxlWCldO1xyXG4gICAgICAgICAgICBZZSA9IGNvbXBvbmVudDNMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDMuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIEsgPSBjb21wb25lbnQ0TGluZVswIHwgKHggKiBjb21wb25lbnQ0LnNjYWxlWCldO1xyXG4gICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgWSA9IGNvbXBvbmVudDFMaW5lWzAgfCAoeCAqIGNvbXBvbmVudDEuc2NhbGVYKV07XHJcbiAgICAgICAgICAgIENiID0gY29tcG9uZW50MkxpbmVbMCB8ICh4ICogY29tcG9uZW50Mi5zY2FsZVgpXTtcclxuICAgICAgICAgICAgQ3IgPSBjb21wb25lbnQzTGluZVswIHwgKHggKiBjb21wb25lbnQzLnNjYWxlWCldO1xyXG4gICAgICAgICAgICBLID0gY29tcG9uZW50NExpbmVbMCB8ICh4ICogY29tcG9uZW50NC5zY2FsZVgpXTtcclxuXHJcbiAgICAgICAgICAgIEMgPSAyNTUgLSBjbGFtcFRvOGJpdChZICsgMS40MDIgKiAoQ3IgLSAxMjgpKTtcclxuICAgICAgICAgICAgTSA9IDI1NSAtIGNsYW1wVG84Yml0KFkgLSAwLjM0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ID0gUjtcclxuICAgICAgICAgIGltYWdlRGF0YUFycmF5W2orK10gPSBHO1xyXG4gICAgICAgICAgaW1hZ2VEYXRhQXJyYXlbaisrXSA9IEI7XHJcbiAgICAgICAgICBpbWFnZURhdGFBcnJheVtqKytdID0gMjU1O1xyXG4gICAgICAgIH1cclxuICAgICAgfVxyXG4gICAgICBicmVhaztcclxuICAgIGNhc2UgNDpcclxuICAgICAgZm9yIChsZXQgeSA9IDA7IHkgPCBoZWlnaHQ7IHkrKykge1xyXG4gICAgICAgIGZvciAobGV0IHggPSAwOyB4IDwgd2lkdGg7IHgrKykge1xyXG4gICAgICAgICAgY29uc3QgQyA9IGRhdGFbaSsrXTtcclxuICAgICAgICAgIGNvbnN0IE0gPSBkYXRhW2krK107XHJcbiAgICAgICAgICBjb25zdCBZID0gZGF0YVtpKytdO1xyXG4gICAgICAgICAgY29uc3QgSyA9IGRhdGFbaSsrXTtcclxuXHJcbiAgICAgICAgICBjb25zdCBSID0gMjU1IC0gY2xhbXBUbzhiaXQoQyAqICgxIC0gSyAvIDI1NSkgKyBLKTtcclxuICAgICAgICAgIGNvbnN0IEcgPSAyNTUgLSBjbGFtcFRvOGJpdChNICogKDEgLSBLIC8gMjU1KSArIEspO1xyXG4gICAgICAgICAgY29uc3QgQiA9IDI1NSAtIGNsYW1wVG84Yml0KFkgKiAoMSAtIEsgLyAyNTUpICsgSyk7XHJcblxyXG4gICAgICAgICAgaW1hZ2VEYXRhQXJyYXlbaisrXSA9IFI7XHJcbiAgICAgICAgICBpbWFnZURhdGFBcnJheVtqKytdID0gRztcclxuICAgICAgICAgIGltYWdlRGF0YUFycmF5W2orK10gPSBCO1xyXG4gICAgICAgICAgaW1hZ2VEYXRhQXJyYXlbaisrXSA9IDI1NTtcclxuICAgICAgICB9XHJcbiAgICAgIH1cclxuICAgICAgYnJlYWs7XHJcbiAgICBkZWZhdWx0OlxyXG4gICAgICB0aHJvdyBuZXcgRXJyb3IoJ1Vuc3VwcG9ydGVkIGNvbG9yIG1vZGUnKTtcclxuICB9XHJcblxyXG4gIHJldHVybiBpbWFnZURhdGE7XHJcbn1cclxuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/jpeg.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/jpeg.js.map deleted file mode 100644 index fa30056..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/jpeg.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"jpeg.js","sourceRoot":"../src/","sources":["jpeg.ts"],"names":[],"mappings":";AAAA,8CAA8C;AAC9C;;;;;;;;;;;;;;EAcE;;;AA6CF,IAAM,SAAS,GAAG,IAAI,UAAU,CAAC;IAC/B,CAAC;IACD,CAAC,EAAE,CAAC;IACJ,EAAE,EAAE,CAAC,EAAE,CAAC;IACR,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IACb,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IACjB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IACrB,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;IACzB,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IAC7B,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IAC1B,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IACtB,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IAClB,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;IACd,EAAE,EAAE,EAAE,EAAE,EAAE;IAC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KAC7C;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AArED,gCAqEC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/psd.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/psd.d.ts index b91d866..adf1489 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/psd.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/psd.d.ts @@ -1,1287 +1,1147 @@ -export type BlendMode = 'pass through' | 'normal' | 'dissolve' | 'darken' | 'multiply' | 'color burn' | 'linear burn' | 'darker color' | 'lighten' | 'screen' | 'color dodge' | 'linear dodge' | 'lighter color' | 'overlay' | 'soft light' | 'hard light' | 'vivid light' | 'linear light' | 'pin light' | 'hard mix' | 'difference' | 'exclusion' | 'subtract' | 'divide' | 'hue' | 'saturation' | 'color' | 'luminosity'; -export declare const enum ColorMode { - Bitmap = 0, - Grayscale = 1, - Indexed = 2, - RGB = 3, - CMYK = 4, - Multichannel = 7, - Duotone = 8, - Lab = 9 -} -export declare const enum SectionDividerType { - Other = 0, - OpenFolder = 1, - ClosedFolder = 2, - BoundingSectionDivider = 3 -} -export type RGBA = { - r: number; - g: number; - b: number; - a: number; -}; -export type RGB = { - r: number; - g: number; - b: number; -}; -export type FRGB = { - fr: number; - fg: number; - fb: number; -}; -export type HSB = { - h: number; - s: number; - b: number; -}; -export type CMYK = { - c: number; - m: number; - y: number; - k: number; -}; -export type LAB = { - l: number; - a: number; - b: number; -}; -export type Grayscale = { - k: number; -}; -export type Color = RGBA | RGB | FRGB | HSB | CMYK | LAB | Grayscale; -export interface EffectContour { - name: string; - curve: { - x: number; - y: number; - }[]; -} -export interface EffectPattern { - name: string; - id: string; -} -export interface LayerEffectShadow { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - angle?: number; - distance?: UnitsValue; - color?: Color; - blendMode?: BlendMode; - opacity?: number; - useGlobalLight?: boolean; - antialiased?: boolean; - contour?: EffectContour; - choke?: UnitsValue; - layerConceals?: boolean; -} -export interface LayerEffectsOuterGlow { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - color?: Color; - blendMode?: BlendMode; - opacity?: number; - source?: GlowSource; - antialiased?: boolean; - noise?: number; - range?: number; - choke?: UnitsValue; - jitter?: number; - contour?: EffectContour; -} -export interface LayerEffectInnerGlow { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - color?: Color; - blendMode?: BlendMode; - opacity?: number; - source?: GlowSource; - technique?: GlowTechnique; - antialiased?: boolean; - noise?: number; - range?: number; - choke?: UnitsValue; - jitter?: number; - contour?: EffectContour; -} -export interface LayerEffectBevel { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - angle?: number; - strength?: number; - highlightBlendMode?: BlendMode; - shadowBlendMode?: BlendMode; - highlightColor?: Color; - shadowColor?: Color; - style?: BevelStyle; - highlightOpacity?: number; - shadowOpacity?: number; - soften?: UnitsValue; - useGlobalLight?: boolean; - altitude?: number; - technique?: BevelTechnique; - direction?: BevelDirection; - useTexture?: boolean; - useShape?: boolean; - antialiasGloss?: boolean; - contour?: EffectContour; -} -export interface LayerEffectSolidFill { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - blendMode?: BlendMode; - color?: Color; - opacity?: number; -} -export interface LayerEffectStroke { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - overprint?: boolean; - size?: UnitsValue; - position?: 'inside' | 'center' | 'outside'; - fillType?: 'color' | 'gradient' | 'pattern'; - blendMode?: BlendMode; - opacity?: number; - color?: Color; - gradient?: (EffectSolidGradient | EffectNoiseGradient) & ExtraGradientInfo; - pattern?: EffectPattern & {}; -} -export interface LayerEffectSatin { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - blendMode?: BlendMode; - color?: Color; - antialiased?: boolean; - opacity?: number; - distance?: UnitsValue; - invert?: boolean; - angle?: number; - contour?: EffectContour; -} -export interface LayerEffectPatternOverlay { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - blendMode?: BlendMode; - opacity?: number; - scale?: number; - pattern?: EffectPattern; - phase?: { - x: number; - y: number; - }; - align?: boolean; -} -export interface EffectSolidGradient { - name: string; - type: 'solid'; - smoothness?: number; - colorStops: ColorStop[]; - opacityStops: OpacityStop[]; -} -export interface EffectNoiseGradient { - name: string; - type: 'noise'; - roughness?: number; - colorModel?: 'rgb' | 'hsb' | 'lab'; - randomSeed?: number; - restrictColors?: boolean; - addTransparency?: boolean; - min: number[]; - max: number[]; -} -export interface LayerEffectGradientOverlay { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - blendMode?: string; - opacity?: number; - align?: boolean; - scale?: number; - dither?: boolean; - reverse?: boolean; - type?: GradientStyle; - offset?: { - x: number; - y: number; - }; - gradient?: EffectSolidGradient | EffectNoiseGradient; - interpolationMethod?: InterpolationMethod; -} -export interface LayerEffectsInfo { - disabled?: boolean; - scale?: number; - dropShadow?: LayerEffectShadow[]; - innerShadow?: LayerEffectShadow[]; - outerGlow?: LayerEffectsOuterGlow; - innerGlow?: LayerEffectInnerGlow; - bevel?: LayerEffectBevel; - solidFill?: LayerEffectSolidFill[]; - satin?: LayerEffectSatin; - stroke?: LayerEffectStroke[]; - gradientOverlay?: LayerEffectGradientOverlay[]; - patternOverlay?: LayerEffectPatternOverlay; -} -export interface LayerMaskData { - top?: number; - left?: number; - bottom?: number; - right?: number; - defaultColor?: number; - disabled?: boolean; - positionRelativeToLayer?: boolean; - fromVectorData?: boolean; - userMaskDensity?: number; - userMaskFeather?: number; - vectorMaskDensity?: number; - vectorMaskFeather?: number; - canvas?: HTMLCanvasElement; - imageData?: ImageData; -} -export type TextGridding = 'none' | 'round'; -export type Orientation = 'horizontal' | 'vertical'; -export type AntiAlias = 'none' | 'sharp' | 'crisp' | 'strong' | 'smooth' | 'platform' | 'platformLCD'; -export type WarpStyle = 'none' | 'arc' | 'arcLower' | 'arcUpper' | 'arch' | 'bulge' | 'shellLower' | 'shellUpper' | 'flag' | 'wave' | 'fish' | 'rise' | 'fisheye' | 'inflate' | 'squeeze' | 'twist' | 'custom' | 'cylinder'; -export type BevelStyle = 'outer bevel' | 'inner bevel' | 'emboss' | 'pillow emboss' | 'stroke emboss'; -export type BevelTechnique = 'smooth' | 'chisel hard' | 'chisel soft'; -export type BevelDirection = 'up' | 'down'; -export type GlowTechnique = 'softer' | 'precise'; -export type GlowSource = 'edge' | 'center'; -export type GradientStyle = 'linear' | 'radial' | 'angle' | 'reflected' | 'diamond'; -export type Justification = 'left' | 'right' | 'center'; -export type LineCapType = 'butt' | 'round' | 'square'; -export type LineJoinType = 'miter' | 'round' | 'bevel'; -export type LineAlignment = 'inside' | 'center' | 'outside'; -export type InterpolationMethod = 'classic' | 'perceptual' | 'linear'; -export interface Warp { - style?: WarpStyle; - value?: number; - values?: number[]; - perspective?: number; - perspectiveOther?: number; - rotate?: Orientation; - bounds?: { - top: UnitsValue; - left: UnitsValue; - bottom: UnitsValue; - right: UnitsValue; - }; - uOrder?: number; - vOrder?: number; - deformNumRows?: number; - deformNumCols?: number; - customEnvelopeWarp?: { - quiltSliceX?: number[]; - quiltSliceY?: number[]; - meshPoints: { - x: number; - y: number; - }[]; - }; -} -export interface Animations { - frames: { - id: number; - delay: number; - dispose?: 'auto' | 'none' | 'dispose'; - }[]; - animations: { - id: number; - frames: number[]; - repeats?: number; - activeFrame?: number; - }[]; -} -export interface Font { - name: string; - script?: number; - type?: number; - synthetic?: number; -} -export interface ParagraphStyle { - justification?: Justification; - firstLineIndent?: number; - startIndent?: number; - endIndent?: number; - spaceBefore?: number; - spaceAfter?: number; - autoHyphenate?: boolean; - hyphenatedWordSize?: number; - preHyphen?: number; - postHyphen?: number; - consecutiveHyphens?: number; - zone?: number; - wordSpacing?: number[]; - letterSpacing?: number[]; - glyphSpacing?: number[]; - autoLeading?: number; - leadingType?: number; - hanging?: boolean; - burasagari?: boolean; - kinsokuOrder?: number; - everyLineComposer?: boolean; -} -export interface ParagraphStyleRun { - length: number; - style: ParagraphStyle; -} -export interface TextStyle { - font?: Font; - fontSize?: number; - fauxBold?: boolean; - fauxItalic?: boolean; - autoLeading?: boolean; - leading?: number; - horizontalScale?: number; - verticalScale?: number; - tracking?: number; - autoKerning?: boolean; - kerning?: number; - baselineShift?: number; - fontCaps?: number; - fontBaseline?: number; - underline?: boolean; - strikethrough?: boolean; - ligatures?: boolean; - dLigatures?: boolean; - baselineDirection?: number; - tsume?: number; - styleRunAlignment?: number; - language?: number; - noBreak?: boolean; - fillColor?: Color; - strokeColor?: Color; - fillFlag?: boolean; - strokeFlag?: boolean; - fillFirst?: boolean; - yUnderline?: number; - outlineWidth?: number; - characterDirection?: number; - hindiNumbers?: boolean; - kashida?: number; - diacriticPos?: number; -} -export interface TextStyleRun { - length: number; - style: TextStyle; -} -export interface TextGridInfo { - isOn?: boolean; - show?: boolean; - size?: number; - leading?: number; - color?: Color; - leadingFillColor?: Color; - alignLineHeightToGridFlags?: boolean; -} -export interface LayerTextData { - text: string; - transform?: number[]; - antiAlias?: AntiAlias; - gridding?: TextGridding; - orientation?: Orientation; - index?: number; - warp?: Warp; - top?: number; - left?: number; - bottom?: number; - right?: number; - gridInfo?: TextGridInfo; - useFractionalGlyphWidths?: boolean; - style?: TextStyle; - styleRuns?: TextStyleRun[]; - paragraphStyle?: ParagraphStyle; - paragraphStyleRuns?: ParagraphStyleRun[]; - superscriptSize?: number; - superscriptPosition?: number; - subscriptSize?: number; - subscriptPosition?: number; - smallCapSize?: number; - shapeType?: 'point' | 'box'; - pointBase?: number[]; - boxBounds?: number[]; -} -export interface PatternInfo { - name: string; - id: string; - x: number; - y: number; - bounds: { - x: number; - y: number; - w: number; - h: number; - }; - data: Uint8Array; -} -export interface BezierKnot { - linked: boolean; - points: number[]; -} -export type BooleanOperation = 'exclude' | 'combine' | 'subtract' | 'intersect'; -export interface BezierPath { - open: boolean; - operation: BooleanOperation; - knots: BezierKnot[]; -} -export interface ExtraGradientInfo { - style?: GradientStyle; - scale?: number; - angle?: number; - dither?: boolean; - reverse?: boolean; - align?: boolean; - offset?: { - x: number; - y: number; - }; -} -export interface ExtraPatternInfo { - linked?: boolean; - phase?: { - x: number; - y: number; - }; -} -export type VectorContent = { - type: 'color'; - color: Color; -} | (EffectSolidGradient & ExtraGradientInfo) | (EffectNoiseGradient & ExtraGradientInfo) | (EffectPattern & { - type: 'pattern'; -} & ExtraPatternInfo); -export type RenderingIntent = 'perceptual' | 'saturation' | 'relative colorimetric' | 'absolute colorimetric'; -export type Units = 'Pixels' | 'Points' | 'Picas' | 'Millimeters' | 'Centimeters' | 'Inches' | 'None' | 'Density'; -export interface UnitsValue { - units: Units; - value: number; -} -export interface BrightnessAdjustment { - type: 'brightness/contrast'; - brightness?: number; - contrast?: number; - meanValue?: number; - useLegacy?: boolean; - labColorOnly?: boolean; - auto?: boolean; -} -export interface LevelsAdjustmentChannel { - shadowInput: number; - highlightInput: number; - shadowOutput: number; - highlightOutput: number; - midtoneInput: number; -} -export interface PresetInfo { - presetKind?: number; - presetFileName?: string; -} -export interface LevelsAdjustment extends PresetInfo { - type: 'levels'; - rgb?: LevelsAdjustmentChannel; - red?: LevelsAdjustmentChannel; - green?: LevelsAdjustmentChannel; - blue?: LevelsAdjustmentChannel; -} -export type CurvesAdjustmentChannel = { - input: number; - output: number; -}[]; -export interface CurvesAdjustment extends PresetInfo { - type: 'curves'; - rgb?: CurvesAdjustmentChannel; - red?: CurvesAdjustmentChannel; - green?: CurvesAdjustmentChannel; - blue?: CurvesAdjustmentChannel; -} -export interface ExposureAdjustment extends PresetInfo { - type: 'exposure'; - exposure?: number; - offset?: number; - gamma?: number; -} -export interface VibranceAdjustment { - type: 'vibrance'; - vibrance?: number; - saturation?: number; -} -export interface HueSaturationAdjustmentChannel { - a: number; - b: number; - c: number; - d: number; - hue: number; - saturation: number; - lightness: number; -} -export interface HueSaturationAdjustment extends PresetInfo { - type: 'hue/saturation'; - master?: HueSaturationAdjustmentChannel; - reds?: HueSaturationAdjustmentChannel; - yellows?: HueSaturationAdjustmentChannel; - greens?: HueSaturationAdjustmentChannel; - cyans?: HueSaturationAdjustmentChannel; - blues?: HueSaturationAdjustmentChannel; - magentas?: HueSaturationAdjustmentChannel; -} -export interface ColorBalanceValues { - cyanRed: number; - magentaGreen: number; - yellowBlue: number; -} -export interface ColorBalanceAdjustment { - type: 'color balance'; - shadows?: ColorBalanceValues; - midtones?: ColorBalanceValues; - highlights?: ColorBalanceValues; - preserveLuminosity?: boolean; -} -export interface BlackAndWhiteAdjustment extends PresetInfo { - type: 'black & white'; - reds?: number; - yellows?: number; - greens?: number; - cyans?: number; - blues?: number; - magentas?: number; - useTint?: boolean; - tintColor?: Color; -} -export interface PhotoFilterAdjustment { - type: 'photo filter'; - color?: Color; - density?: number; - preserveLuminosity?: boolean; -} -export interface ChannelMixerChannel { - red: number; - green: number; - blue: number; - constant: number; -} -export interface ChannelMixerAdjustment extends PresetInfo { - type: 'channel mixer'; - monochrome?: boolean; - red?: ChannelMixerChannel; - green?: ChannelMixerChannel; - blue?: ChannelMixerChannel; - gray?: ChannelMixerChannel; -} -export interface ColorLookupAdjustment { - type: 'color lookup'; - lookupType?: '3dlut' | 'abstractProfile' | 'deviceLinkProfile'; - name?: string; - dither?: boolean; - profile?: Uint8Array; - lutFormat?: 'look' | 'cube' | '3dl'; - dataOrder?: 'rgb' | 'bgr'; - tableOrder?: 'rgb' | 'bgr'; - lut3DFileData?: Uint8Array; - lut3DFileName?: string; -} -export interface InvertAdjustment { - type: 'invert'; -} -export interface PosterizeAdjustment { - type: 'posterize'; - levels?: number; -} -export interface ThresholdAdjustment { - type: 'threshold'; - level?: number; -} -export interface ColorStop { - color: Color; - location: number; - midpoint: number; -} -export interface OpacityStop { - opacity: number; - location: number; - midpoint: number; -} -export interface GradientMapAdjustment { - type: 'gradient map'; - name?: string; - gradientType: 'solid' | 'noise'; - dither?: boolean; - reverse?: boolean; - smoothness?: number; - colorStops?: ColorStop[]; - opacityStops?: OpacityStop[]; - roughness?: number; - colorModel?: 'rgb' | 'hsb' | 'lab'; - randomSeed?: number; - restrictColors?: boolean; - addTransparency?: boolean; - min?: number[]; - max?: number[]; -} -export interface SelectiveColorAdjustment { - type: 'selective color'; - mode?: 'relative' | 'absolute'; - reds?: CMYK; - yellows?: CMYK; - greens?: CMYK; - cyans?: CMYK; - blues?: CMYK; - magentas?: CMYK; - whites?: CMYK; - neutrals?: CMYK; - blacks?: CMYK; -} -export interface LinkedFile { - id: string; - name: string; - type?: string; - creator?: string; - data?: Uint8Array; - time?: string; - descriptor?: { - compInfo: { - compID: number; - originalCompID: number; - }; - }; - childDocumentID?: string; - assetModTime?: number; - assetLockedState?: number; -} -export interface PlacedLayerFilter { - enabled: boolean; - validAtPosition: boolean; - maskEnabled: boolean; - maskLinked: boolean; - maskExtendWithWhite: boolean; - list: { - id: number; - name: string; - opacity: number; - blendMode: BlendMode; - enabled: boolean; - hasOptions: boolean; - foregroundColor: Color; - backgroundColor: Color; - filter: { - rigidType: boolean; - bounds: { - x: number; - y: number; - }[]; - puppetShapeList: { - rigidType: boolean; - originalVertexArray: { - x: number; - y: number; - }[]; - deformedVertexArray: { - x: number; - y: number; - }[]; - indexArray: number[]; - pinOffsets: { - x: number; - y: number; - }[]; - posFinalPins: { - x: number; - y: number; - }[]; - pinVertexIndices: number[]; - selectedPin: number[]; - pinPosition: { - x: number; - y: number; - }[]; - pinRotation: number[]; - pinOverlay: boolean[]; - pinDepth: number[]; - meshQuality: number; - meshExpansion: number; - meshRigidity: number; - imageResolution: number; - meshBoundaryPath: { - pathComponents: { - shapeOperation: string; - paths: { - closed: boolean; - points: { - anchor: { - x: UnitsValue; - y: UnitsValue; - }; - forward: { - x: UnitsValue; - y: UnitsValue; - }; - backward: { - x: UnitsValue; - y: UnitsValue; - }; - smooth: boolean; - }[]; - }[]; - }[]; - }; - }[]; - }; - }[]; -} -export type PlacedLayerType = 'unknown' | 'vector' | 'raster' | 'image stack'; -export interface PlacedLayer { - id: string; - placed?: string; - type: PlacedLayerType; - pageNumber?: number; - totalPages?: number; - frameStep?: { - numerator: number; - denominator: number; - }; - duration?: { - numerator: number; - denominator: number; - }; - frameCount?: number; - transform: number[]; - nonAffineTransform?: number[]; - width?: number; - height?: number; - resolution?: UnitsValue; - warp?: Warp; - crop?: number; - comp?: number; - compInfo?: { - compID: number; - originalCompID: number; - }; - filter?: PlacedLayerFilter; -} -export type AdjustmentLayer = BrightnessAdjustment | LevelsAdjustment | CurvesAdjustment | ExposureAdjustment | VibranceAdjustment | HueSaturationAdjustment | ColorBalanceAdjustment | BlackAndWhiteAdjustment | PhotoFilterAdjustment | ChannelMixerAdjustment | ColorLookupAdjustment | InvertAdjustment | PosterizeAdjustment | ThresholdAdjustment | GradientMapAdjustment | SelectiveColorAdjustment; -export type LayerColor = 'none' | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'violet' | 'gray'; -export interface KeyDescriptorItem { - keyShapeInvalidated?: boolean; - keyOriginType?: number; - keyOriginResolution?: number; - keyOriginRRectRadii?: { - topRight: UnitsValue; - topLeft: UnitsValue; - bottomLeft: UnitsValue; - bottomRight: UnitsValue; - }; - keyOriginShapeBoundingBox?: { - top: UnitsValue; - left: UnitsValue; - bottom: UnitsValue; - right: UnitsValue; - }; - keyOriginBoxCorners?: { - x: number; - y: number; - }[]; - transform?: number[]; -} -export interface LayerVectorMask { - invert?: boolean; - notLink?: boolean; - disable?: boolean; - fillStartsWithAllPixels?: boolean; - clipboard?: { - top: number; - left: number; - bottom: number; - right: number; - resolution: number; - }; - paths: BezierPath[]; -} -export interface AnimationFrame { - frames: number[]; - enable?: boolean; - offset?: { - x: number; - y: number; - }; - referencePoint?: { - x: number; - y: number; - }; - opacity?: number; - effects?: LayerEffectsInfo; -} -export interface Fraction { - numerator: number; - denominator: number; -} -export type TimelineKeyInterpolation = 'linear' | 'hold'; -export type TimelineKey = { - interpolation: TimelineKeyInterpolation; - time: Fraction; - selected?: boolean; -} & ({ - type: 'opacity'; - value: number; -} | { - type: 'position'; - x: number; - y: number; -} | { - type: 'transform'; - scale: { - x: number; - y: number; - }; - skew: { - x: number; - y: number; - }; - rotation: number; - translation: { - x: number; - y: number; - }; -} | { - type: 'style'; - style?: LayerEffectsInfo; -} | { - type: 'globalLighting'; - globalAngle: number; - globalAltitude: number; -}); -export type TimelineTrackType = 'opacity' | 'style' | 'sheetTransform' | 'sheetPosition' | 'globalLighting'; -export interface TimelineTrack { - type: TimelineTrackType; - enabled?: boolean; - effectParams?: { - keys: TimelineKey[]; - fillCanvas: boolean; - zoomOrigin: number; - }; - keys: TimelineKey[]; -} -export interface Timeline { - start: Fraction; - duration: Fraction; - inTime: Fraction; - outTime: Fraction; - autoScope: boolean; - audioLevel: number; - tracks?: TimelineTrack[]; -} -export interface LayerAdditionalInfo { - name?: string; - nameSource?: string; - id?: number; - version?: number; - mask?: LayerMaskData; - blendClippendElements?: boolean; - blendInteriorElements?: boolean; - knockout?: boolean; - layerMaskAsGlobalMask?: boolean; - protected?: { - transparency?: boolean; - composite?: boolean; - position?: boolean; - artboards?: boolean; - }; - layerColor?: LayerColor; - referencePoint?: { - x: number; - y: number; - }; - sectionDivider?: { - type: SectionDividerType; - key?: string; - subType?: number; - }; - filterMask?: { - colorSpace: Color; - opacity: number; - }; - effects?: LayerEffectsInfo; - text?: LayerTextData; - patterns?: PatternInfo[]; - vectorFill?: VectorContent; - vectorStroke?: { - strokeEnabled?: boolean; - fillEnabled?: boolean; - lineWidth?: UnitsValue; - lineDashOffset?: UnitsValue; - miterLimit?: number; - lineCapType?: LineCapType; - lineJoinType?: LineJoinType; - lineAlignment?: LineAlignment; - scaleLock?: boolean; - strokeAdjust?: boolean; - lineDashSet?: UnitsValue[]; - blendMode?: BlendMode; - opacity?: number; - content?: VectorContent; - resolution?: number; - }; - vectorMask?: LayerVectorMask; - usingAlignedRendering?: boolean; - timestamp?: number; - pathList?: {}[]; - adjustment?: AdjustmentLayer; - placedLayer?: PlacedLayer; - vectorOrigination?: { - keyDescriptorList: KeyDescriptorItem[]; - }; - compositorUsed?: { - description: string; - reason: string; - engine: string; - enableCompCore: string; - enableCompCoreGPU: string; - compCoreSupport: string; - compCoreGPUSupport: string; - }; - artboard?: { - rect: { - top: number; - left: number; - bottom: number; - right: number; - }; - guideIndices?: any[]; - presetName?: string; - color?: Color; - backgroundType?: number; - }; - fillOpacity?: number; - transparencyShapesLayer?: boolean; - channelBlendingRestrictions?: number[]; - animationFrames?: AnimationFrame[]; - animationFrameFlags?: { - propagateFrameOne?: boolean; - unifyLayerPosition?: boolean; - unifyLayerStyle?: boolean; - unifyLayerVisibility?: boolean; - }; - timeline?: Timeline; - filterEffects?: any; - engineData?: string; -} -export interface ImageResources { - layerState?: number; - layersGroup?: number[]; - layerSelectionIds?: number[]; - layerGroupsEnabledId?: number[]; - versionInfo?: { - hasRealMergedData: boolean; - writerName: string; - readerName: string; - fileVersion: number; - }; - alphaIdentifiers?: number[]; - alphaChannelNames?: string[]; - globalAngle?: number; - globalAltitude?: number; - pixelAspectRatio?: { - aspect: number; - }; - urlsList?: { - id: number; - ref: 'slice'; - url: string; - }[]; - gridAndGuidesInformation?: { - grid?: { - horizontal: number; - vertical: number; - }; - guides?: { - location: number; - direction: 'horizontal' | 'vertical'; - }[]; - }; - resolutionInfo?: { - horizontalResolution: number; - horizontalResolutionUnit: 'PPI' | 'PPCM'; - widthUnit: 'Inches' | 'Centimeters' | 'Points' | 'Picas' | 'Columns'; - verticalResolution: number; - verticalResolutionUnit: 'PPI' | 'PPCM'; - heightUnit: 'Inches' | 'Centimeters' | 'Points' | 'Picas' | 'Columns'; - }; - thumbnail?: HTMLCanvasElement; - thumbnailRaw?: { - width: number; - height: number; - data: Uint8Array; - }; - captionDigest?: string; - xmpMetadata?: string; - printScale?: { - style?: 'centered' | 'size to fit' | 'user defined'; - x?: number; - y?: number; - scale?: number; - }; - printInformation?: { - printerManagesColors?: boolean; - printerName?: string; - printerProfile?: string; - printSixteenBit?: boolean; - renderingIntent?: RenderingIntent; - hardProof?: boolean; - blackPointCompensation?: boolean; - proofSetup?: { - builtin: string; - } | { - profile: string; - renderingIntent?: RenderingIntent; - blackPointCompensation?: boolean; - paperWhite?: boolean; - }; - }; - backgroundColor?: Color; - idsSeedNumber?: number; - printFlags?: { - labels?: boolean; - cropMarks?: boolean; - colorBars?: boolean; - registrationMarks?: boolean; - negative?: boolean; - flip?: boolean; - interpolate?: boolean; - caption?: boolean; - printFlags?: boolean; - }; - iccUntaggedProfile?: boolean; - pathSelectionState?: string[]; - imageReadyVariables?: string; - imageReadyDataSets?: string; - animations?: Animations; - onionSkins?: { - enabled: boolean; - framesBefore: number; - framesAfter: number; - frameSpacing: number; - minOpacity: number; - maxOpacity: number; - blendMode: BlendMode; - }; - timelineInformation?: { - enabled: boolean; - frameStep: Fraction; - frameRate: number; - time: Fraction; - duration: Fraction; - workInTime: Fraction; - workOutTime: Fraction; - repeats: number; - hasMotion: boolean; - globalTracks: TimelineTrack[]; - audioClipGroups?: { - id: string; - muted: boolean; - audioClips: { - id: string; - start: Fraction; - duration: Fraction; - inTime: Fraction; - outTime: Fraction; - muted: boolean; - audioLevel: number; - frameReader: { - type: number; - mediaDescriptor: string; - link: { - name: string; - fullPath: string; - relativePath: string; - }; - }; - }[]; - }[]; - }; - sheetDisclosure?: { - sheetTimelineOptions?: { - sheetID: number; - sheetDisclosed: boolean; - lightsDisclosed: boolean; - meshesDisclosed: boolean; - materialsDisclosed: boolean; - }[]; - }; - countInformation?: { - color: RGB; - name: string; - size: number; - fontSize: number; - visible: boolean; - points: { - x: number; - y: number; - }[]; - }[]; - slices?: { - bounds: { - left: number; - top: number; - right: number; - bottom: number; - }; - groupName: string; - slices: { - id: number; - groupId: number; - origin: 'userGenerated' | 'autoGenerated' | 'layer'; - associatedLayerId: number; - name: string; - type: 'image' | 'noImage'; - bounds: { - left: number; - top: number; - right: number; - bottom: number; - }; - url: string; - target: string; - message: string; - altTag: string; - cellTextIsHTML: boolean; - cellText: string; - horizontalAlignment: 'default'; - verticalAlignment: 'default'; - backgroundColorType: 'none' | 'matte' | 'color'; - backgroundColor: RGBA; - topOutset?: number; - leftOutset?: number; - bottomOutset?: number; - rightOutset?: number; - }[]; - }[]; -} -export interface GlobalLayerMaskInfo { - overlayColorSpace: number; - colorSpace1: number; - colorSpace2: number; - colorSpace3: number; - colorSpace4: number; - opacity: number; - kind: number; -} -export interface Annotation { - type: 'text' | 'sound'; - open: boolean; - iconLocation: { - left: number; - top: number; - right: number; - bottom: number; - }; - popupLocation: { - left: number; - top: number; - right: number; - bottom: number; - }; - color: Color; - author: string; - name: string; - date: string; - data: string | Uint8Array; -} -export interface Layer extends LayerAdditionalInfo { - top?: number; - left?: number; - bottom?: number; - right?: number; - blendMode?: BlendMode; - opacity?: number; - transparencyProtected?: boolean; - hidden?: boolean; - clipping?: boolean; - canvas?: HTMLCanvasElement; - imageData?: ImageData; - children?: Layer[]; - /** Applies only for layer groups. */ - opened?: boolean; -} -export interface Psd extends LayerAdditionalInfo { - width: number; - height: number; - channels?: number; - bitsPerChannel?: number; - colorMode?: ColorMode; - children?: Layer[]; - canvas?: HTMLCanvasElement; - imageData?: ImageData; - imageResources?: ImageResources; - linkedFiles?: LinkedFile[]; - artboards?: { - count: number; - autoExpandOffset?: { - horizontal: number; - vertical: number; - }; - origin?: { - horizontal: number; - vertical: number; - }; - autoExpandEnabled?: boolean; - autoNestEnabled?: boolean; - autoPositionEnabled?: boolean; - shrinkwrapOnSaveEnabled?: boolean; - docDefaultNewArtboardBackgroundColor?: Color; - docDefaultNewArtboardBackgroundType?: number; - }; - globalLayerMaskInfo?: GlobalLayerMaskInfo; - annotations?: Annotation[]; -} -export interface ReadOptions { - /** Does not load layer image data. */ - skipLayerImageData?: boolean; - /** Does not load composite image data. */ - skipCompositeImageData?: boolean; - /** Does not load thumbnail. */ - skipThumbnail?: boolean; - /** Does not load linked files (used in smart-objects). */ - skipLinkedFilesData?: boolean; - /** Throws exception if features are missing. */ - throwForMissingFeatures?: boolean; - /** Logs if features are missing. */ - logMissingFeatures?: boolean; - /** Keep image data as byte array instead of canvas. - * (image data will appear in `imageData` fields instead of `canvas` fields) - * This avoids issues with canvas premultiplied alpha corrupting image data. */ - useImageData?: boolean; - /** Loads thumbnail raw data instead of decoding it's content into canvas. - * `thumnailRaw` field is used instead. */ - useRawThumbnail?: boolean; - /** Usend only for development. */ - logDevFeatures?: boolean; -} -export interface WriteOptions { - /** Automatically generates thumbnail from composite image. */ - generateThumbnail?: boolean; - /** Trims transparent pixels from layer image data. */ - trimImageData?: boolean; - /** Invalidates text layer data, forcing Photoshop to redraw them on load. - * Use this option if you're updating loaded text layer properties. */ - invalidateTextLayers?: boolean; - /** Logs if features are missing. */ - logMissingFeatures?: boolean; - /** Forces bottom layer to be treated as layer and not background even when it's missing any transparency - * (by default Photoshop treats bottom layer as background it it doesn't have any transparent pixels). */ - noBackground?: boolean; - /** Saves document as PSB (Large Document Format) file. */ - psb?: boolean; - /** Uses zip compression when writing PSD file, will result in smaller file size but may be incompatible - * with some software. It may also be significantly slower. */ - compress?: boolean; -} +export declare type BlendMode = 'pass through' | 'normal' | 'dissolve' | 'darken' | 'multiply' | 'color burn' | 'linear burn' | 'darker color' | 'lighten' | 'screen' | 'color dodge' | 'linear dodge' | 'lighter color' | 'overlay' | 'soft light' | 'hard light' | 'vivid light' | 'linear light' | 'pin light' | 'hard mix' | 'difference' | 'exclusion' | 'subtract' | 'divide' | 'hue' | 'saturation' | 'color' | 'luminosity'; +export declare const enum ColorMode { + Bitmap = 0, + Grayscale = 1, + Indexed = 2, + RGB = 3, + CMYK = 4, + Multichannel = 7, + Duotone = 8, + Lab = 9 +} +export declare const enum SectionDividerType { + Other = 0, + OpenFolder = 1, + ClosedFolder = 2, + BoundingSectionDivider = 3 +} +export declare type RGBA = { + r: number; + g: number; + b: number; + a: number; +}; +export declare type RGB = { + r: number; + g: number; + b: number; +}; +export declare type HSB = { + h: number; + s: number; + b: number; +}; +export declare type CMYK = { + c: number; + m: number; + y: number; + k: number; +}; +export declare type LAB = { + l: number; + a: number; + b: number; +}; +export declare type Grayscale = { + k: number; +}; +export declare type Color = RGBA | RGB | HSB | CMYK | LAB | Grayscale; +export interface EffectContour { + name: string; + curve: { + x: number; + y: number; + }[]; +} +export interface EffectPattern { + name: string; + id: string; +} +export interface LayerEffectShadow { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + size?: UnitsValue; + angle?: number; + distance?: UnitsValue; + color?: Color; + blendMode?: BlendMode; + opacity?: number; + useGlobalLight?: boolean; + antialiased?: boolean; + contour?: EffectContour; + choke?: UnitsValue; + layerConceals?: boolean; +} +export interface LayerEffectsOuterGlow { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + size?: UnitsValue; + color?: Color; + blendMode?: BlendMode; + opacity?: number; + source?: GlowSource; + antialiased?: boolean; + noise?: number; + range?: number; + choke?: UnitsValue; + jitter?: number; + contour?: EffectContour; +} +export interface LayerEffectInnerGlow { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + size?: UnitsValue; + color?: Color; + blendMode?: BlendMode; + opacity?: number; + source?: GlowSource; + technique?: GlowTechnique; + antialiased?: boolean; + noise?: number; + range?: number; + choke?: UnitsValue; + jitter?: number; + contour?: EffectContour; +} +export interface LayerEffectBevel { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + size?: UnitsValue; + angle?: number; + strength?: number; + highlightBlendMode?: BlendMode; + shadowBlendMode?: BlendMode; + highlightColor?: Color; + shadowColor?: Color; + style?: BevelStyle; + highlightOpacity?: number; + shadowOpacity?: number; + soften?: UnitsValue; + useGlobalLight?: boolean; + altitude?: number; + technique?: BevelTechnique; + direction?: BevelDirection; + useTexture?: boolean; + useShape?: boolean; + antialiasGloss?: boolean; + contour?: EffectContour; +} +export interface LayerEffectSolidFill { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + blendMode?: BlendMode; + color?: Color; + opacity?: number; +} +export interface LayerEffectStroke { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + overprint?: boolean; + size?: UnitsValue; + position?: 'inside' | 'center' | 'outside'; + fillType?: 'color' | 'gradient' | 'pattern'; + blendMode?: BlendMode; + opacity?: number; + color?: Color; + gradient?: (EffectSolidGradient | EffectNoiseGradient) & ExtraGradientInfo; + pattern?: EffectPattern & {}; +} +export interface LayerEffectSatin { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + size?: UnitsValue; + blendMode?: BlendMode; + color?: Color; + antialiased?: boolean; + opacity?: number; + distance?: UnitsValue; + invert?: boolean; + angle?: number; + contour?: EffectContour; +} +export interface LayerEffectPatternOverlay { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + blendMode?: BlendMode; + opacity?: number; + scale?: number; + pattern?: EffectPattern; + phase?: { + x: number; + y: number; + }; + align?: boolean; +} +export interface EffectSolidGradient { + name: string; + type: 'solid'; + smoothness?: number; + colorStops: ColorStop[]; + opacityStops: OpacityStop[]; +} +export interface EffectNoiseGradient { + name: string; + type: 'noise'; + roughness?: number; + colorModel?: 'rgb' | 'hsb' | 'lab'; + randomSeed?: number; + restrictColors?: boolean; + addTransparency?: boolean; + min: number[]; + max: number[]; +} +export interface LayerEffectGradientOverlay { + present?: boolean; + showInDialog?: boolean; + enabled?: boolean; + blendMode?: string; + opacity?: number; + align?: boolean; + scale?: number; + dither?: boolean; + reverse?: boolean; + type?: GradientStyle; + offset?: { + x: number; + y: number; + }; + gradient?: EffectSolidGradient | EffectNoiseGradient; + interpolationMethod?: InterpolationMethod; +} +export interface LayerEffectsInfo { + disabled?: boolean; + scale?: number; + dropShadow?: LayerEffectShadow[]; + innerShadow?: LayerEffectShadow[]; + outerGlow?: LayerEffectsOuterGlow; + innerGlow?: LayerEffectInnerGlow; + bevel?: LayerEffectBevel; + solidFill?: LayerEffectSolidFill[]; + satin?: LayerEffectSatin; + stroke?: LayerEffectStroke[]; + gradientOverlay?: LayerEffectGradientOverlay[]; + patternOverlay?: LayerEffectPatternOverlay; +} +export interface LayerMaskData { + top?: number; + left?: number; + bottom?: number; + right?: number; + defaultColor?: number; + disabled?: boolean; + positionRelativeToLayer?: boolean; + fromVectorData?: boolean; + userMaskDensity?: number; + userMaskFeather?: number; + vectorMaskDensity?: number; + vectorMaskFeather?: number; + canvas?: HTMLCanvasElement; + imageData?: ImageData; +} +export declare type TextGridding = 'none' | 'round'; +export declare type Orientation = 'horizontal' | 'vertical'; +export declare type AntiAlias = 'none' | 'sharp' | 'crisp' | 'strong' | 'smooth' | 'platform' | 'platformLCD'; +export declare type WarpStyle = 'none' | 'arc' | 'arcLower' | 'arcUpper' | 'arch' | 'bulge' | 'shellLower' | 'shellUpper' | 'flag' | 'wave' | 'fish' | 'rise' | 'fisheye' | 'inflate' | 'squeeze' | 'twist' | 'custom'; +export declare type BevelStyle = 'outer bevel' | 'inner bevel' | 'emboss' | 'pillow emboss' | 'stroke emboss'; +export declare type BevelTechnique = 'smooth' | 'chisel hard' | 'chisel soft'; +export declare type BevelDirection = 'up' | 'down'; +export declare type GlowTechnique = 'softer' | 'precise'; +export declare type GlowSource = 'edge' | 'center'; +export declare type GradientStyle = 'linear' | 'radial' | 'angle' | 'reflected' | 'diamond'; +export declare type Justification = 'left' | 'right' | 'center'; +export declare type LineCapType = 'butt' | 'round' | 'square'; +export declare type LineJoinType = 'miter' | 'round' | 'bevel'; +export declare type LineAlignment = 'inside' | 'center' | 'outside'; +export declare type InterpolationMethod = 'classic' | 'perceptual' | 'linear'; +export interface Warp { + style?: WarpStyle; + value?: number; + perspective?: number; + perspectiveOther?: number; + rotate?: Orientation; + bounds?: { + top: UnitsValue; + left: UnitsValue; + bottom: UnitsValue; + right: UnitsValue; + }; + uOrder?: number; + vOrder?: number; + deformNumRows?: number; + deformNumCols?: number; + customEnvelopeWarp?: { + quiltSliceX?: number[]; + quiltSliceY?: number[]; + meshPoints: { + x: number; + y: number; + }[]; + }; +} +export interface Animations { + frames: { + id: number; + delay: number; + dispose?: 'auto' | 'none' | 'dispose'; + }[]; + animations: { + id: number; + frames: number[]; + repeats?: number; + activeFrame?: number; + }[]; +} +export interface Font { + name: string; + script?: number; + type?: number; + synthetic?: number; +} +export interface ParagraphStyle { + justification?: Justification; + firstLineIndent?: number; + startIndent?: number; + endIndent?: number; + spaceBefore?: number; + spaceAfter?: number; + autoHyphenate?: boolean; + hyphenatedWordSize?: number; + preHyphen?: number; + postHyphen?: number; + consecutiveHyphens?: number; + zone?: number; + wordSpacing?: number[]; + letterSpacing?: number[]; + glyphSpacing?: number[]; + autoLeading?: number; + leadingType?: number; + hanging?: boolean; + burasagari?: boolean; + kinsokuOrder?: number; + everyLineComposer?: boolean; +} +export interface ParagraphStyleRun { + length: number; + style: ParagraphStyle; +} +export interface TextStyle { + font?: Font; + fontSize?: number; + fauxBold?: boolean; + fauxItalic?: boolean; + autoLeading?: boolean; + leading?: number; + horizontalScale?: number; + verticalScale?: number; + tracking?: number; + autoKerning?: boolean; + kerning?: number; + baselineShift?: number; + fontCaps?: number; + fontBaseline?: number; + underline?: boolean; + strikethrough?: boolean; + ligatures?: boolean; + dLigatures?: boolean; + baselineDirection?: number; + tsume?: number; + styleRunAlignment?: number; + language?: number; + noBreak?: boolean; + fillColor?: Color; + strokeColor?: Color; + fillFlag?: boolean; + strokeFlag?: boolean; + fillFirst?: boolean; + yUnderline?: number; + outlineWidth?: number; + characterDirection?: number; + hindiNumbers?: boolean; + kashida?: number; + diacriticPos?: number; +} +export interface TextStyleRun { + length: number; + style: TextStyle; +} +export interface TextGridInfo { + isOn?: boolean; + show?: boolean; + size?: number; + leading?: number; + color?: Color; + leadingFillColor?: Color; + alignLineHeightToGridFlags?: boolean; +} +export interface LayerTextData { + text: string; + transform?: number[]; + antiAlias?: AntiAlias; + gridding?: TextGridding; + orientation?: Orientation; + index?: number; + warp?: Warp; + top?: number; + left?: number; + bottom?: number; + right?: number; + gridInfo?: TextGridInfo; + useFractionalGlyphWidths?: boolean; + style?: TextStyle; + styleRuns?: TextStyleRun[]; + paragraphStyle?: ParagraphStyle; + paragraphStyleRuns?: ParagraphStyleRun[]; + superscriptSize?: number; + superscriptPosition?: number; + subscriptSize?: number; + subscriptPosition?: number; + smallCapSize?: number; + shapeType?: 'point' | 'box'; + pointBase?: number[]; + boxBounds?: number[]; +} +export interface PatternInfo { + name: string; + id: string; + x: number; + y: number; + bounds: { + x: number; + y: number; + w: number; + h: number; + }; + data: Uint8Array; +} +export interface BezierKnot { + linked: boolean; + points: number[]; +} +export declare type BooleanOperation = 'exclude' | 'combine' | 'subtract' | 'intersect'; +export interface BezierPath { + open: boolean; + operation: BooleanOperation; + knots: BezierKnot[]; +} +export interface ExtraGradientInfo { + style?: GradientStyle; + scale?: number; + angle?: number; + dither?: boolean; + reverse?: boolean; + align?: boolean; + offset?: { + x: number; + y: number; + }; +} +export interface ExtraPatternInfo { + linked?: boolean; + phase?: { + x: number; + y: number; + }; +} +export declare type VectorContent = { + type: 'color'; + color: Color; +} | (EffectSolidGradient & ExtraGradientInfo) | (EffectNoiseGradient & ExtraGradientInfo) | (EffectPattern & { + type: 'pattern'; +} & ExtraPatternInfo); +export declare type RenderingIntent = 'perceptual' | 'saturation' | 'relative colorimetric' | 'absolute colorimetric'; +export declare type Units = 'Pixels' | 'Points' | 'Picas' | 'Millimeters' | 'Centimeters' | 'Inches' | 'None' | 'Density'; +export interface UnitsValue { + units: Units; + value: number; +} +export interface BrightnessAdjustment { + type: 'brightness/contrast'; + brightness?: number; + contrast?: number; + meanValue?: number; + useLegacy?: boolean; + labColorOnly?: boolean; + auto?: boolean; +} +export interface LevelsAdjustmentChannel { + shadowInput: number; + highlightInput: number; + shadowOutput: number; + highlightOutput: number; + midtoneInput: number; +} +export interface PresetInfo { + presetKind?: number; + presetFileName?: string; +} +export interface LevelsAdjustment extends PresetInfo { + type: 'levels'; + rgb?: LevelsAdjustmentChannel; + red?: LevelsAdjustmentChannel; + green?: LevelsAdjustmentChannel; + blue?: LevelsAdjustmentChannel; +} +export declare type CurvesAdjustmentChannel = { + input: number; + output: number; +}[]; +export interface CurvesAdjustment extends PresetInfo { + type: 'curves'; + rgb?: CurvesAdjustmentChannel; + red?: CurvesAdjustmentChannel; + green?: CurvesAdjustmentChannel; + blue?: CurvesAdjustmentChannel; +} +export interface ExposureAdjustment extends PresetInfo { + type: 'exposure'; + exposure?: number; + offset?: number; + gamma?: number; +} +export interface VibranceAdjustment { + type: 'vibrance'; + vibrance?: number; + saturation?: number; +} +export interface HueSaturationAdjustmentChannel { + a: number; + b: number; + c: number; + d: number; + hue: number; + saturation: number; + lightness: number; +} +export interface HueSaturationAdjustment extends PresetInfo { + type: 'hue/saturation'; + master?: HueSaturationAdjustmentChannel; + reds?: HueSaturationAdjustmentChannel; + yellows?: HueSaturationAdjustmentChannel; + greens?: HueSaturationAdjustmentChannel; + cyans?: HueSaturationAdjustmentChannel; + blues?: HueSaturationAdjustmentChannel; + magentas?: HueSaturationAdjustmentChannel; +} +export interface ColorBalanceValues { + cyanRed: number; + magentaGreen: number; + yellowBlue: number; +} +export interface ColorBalanceAdjustment { + type: 'color balance'; + shadows?: ColorBalanceValues; + midtones?: ColorBalanceValues; + highlights?: ColorBalanceValues; + preserveLuminosity?: boolean; +} +export interface BlackAndWhiteAdjustment extends PresetInfo { + type: 'black & white'; + reds?: number; + yellows?: number; + greens?: number; + cyans?: number; + blues?: number; + magentas?: number; + useTint?: boolean; + tintColor?: Color; +} +export interface PhotoFilterAdjustment { + type: 'photo filter'; + color?: Color; + density?: number; + preserveLuminosity?: boolean; +} +export interface ChannelMixerChannel { + red: number; + green: number; + blue: number; + constant: number; +} +export interface ChannelMixerAdjustment extends PresetInfo { + type: 'channel mixer'; + monochrome?: boolean; + red?: ChannelMixerChannel; + green?: ChannelMixerChannel; + blue?: ChannelMixerChannel; + gray?: ChannelMixerChannel; +} +export interface ColorLookupAdjustment { + type: 'color lookup'; + lookupType?: '3dlut' | 'abstractProfile' | 'deviceLinkProfile'; + name?: string; + dither?: boolean; + profile?: Uint8Array; + lutFormat?: 'look' | 'cube' | '3dl'; + dataOrder?: 'rgb' | 'bgr'; + tableOrder?: 'rgb' | 'bgr'; + lut3DFileData?: Uint8Array; + lut3DFileName?: string; +} +export interface InvertAdjustment { + type: 'invert'; +} +export interface PosterizeAdjustment { + type: 'posterize'; + levels?: number; +} +export interface ThresholdAdjustment { + type: 'threshold'; + level?: number; +} +export interface ColorStop { + color: Color; + location: number; + midpoint: number; +} +export interface OpacityStop { + opacity: number; + location: number; + midpoint: number; +} +export interface GradientMapAdjustment { + type: 'gradient map'; + name?: string; + gradientType: 'solid' | 'noise'; + dither?: boolean; + reverse?: boolean; + smoothness?: number; + colorStops?: ColorStop[]; + opacityStops?: OpacityStop[]; + roughness?: number; + colorModel?: 'rgb' | 'hsb' | 'lab'; + randomSeed?: number; + restrictColors?: boolean; + addTransparency?: boolean; + min?: number[]; + max?: number[]; +} +export interface SelectiveColorAdjustment { + type: 'selective color'; + mode?: 'relative' | 'absolute'; + reds?: CMYK; + yellows?: CMYK; + greens?: CMYK; + cyans?: CMYK; + blues?: CMYK; + magentas?: CMYK; + whites?: CMYK; + neutrals?: CMYK; + blacks?: CMYK; +} +export interface LinkedFile { + id: string; + name: string; + type?: string; + creator?: string; + data?: Uint8Array; + time?: Date; + descriptor?: { + compInfo: { + compID: number; + originalCompID: number; + }; + }; + childDocumentID?: string; + assetModTime?: number; + assetLockedState?: number; +} +export declare type PlacedLayerType = 'unknown' | 'vector' | 'raster' | 'image stack'; +export interface PlacedLayer { + id: string; + placed?: string; + type: PlacedLayerType; + pageNumber?: number; + totalPages?: number; + frameStep?: { + numerator: number; + denominator: number; + }; + duration?: { + numerator: number; + denominator: number; + }; + frameCount?: number; + transform: number[]; + nonAffineTransform?: number[]; + width?: number; + height?: number; + resolution?: UnitsValue; + warp?: Warp; + crop?: number; + comp?: number; + compInfo?: { + compID: number; + originalCompID: number; + }; +} +export declare type AdjustmentLayer = BrightnessAdjustment | LevelsAdjustment | CurvesAdjustment | ExposureAdjustment | VibranceAdjustment | HueSaturationAdjustment | ColorBalanceAdjustment | BlackAndWhiteAdjustment | PhotoFilterAdjustment | ChannelMixerAdjustment | ColorLookupAdjustment | InvertAdjustment | PosterizeAdjustment | ThresholdAdjustment | GradientMapAdjustment | SelectiveColorAdjustment; +export declare type LayerColor = 'none' | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'violet' | 'gray'; +export interface KeyDescriptorItem { + keyShapeInvalidated?: boolean; + keyOriginType?: number; + keyOriginResolution?: number; + keyOriginRRectRadii?: { + topRight: UnitsValue; + topLeft: UnitsValue; + bottomLeft: UnitsValue; + bottomRight: UnitsValue; + }; + keyOriginShapeBoundingBox?: { + top: UnitsValue; + left: UnitsValue; + bottom: UnitsValue; + right: UnitsValue; + }; + keyOriginBoxCorners?: { + x: number; + y: number; + }[]; + transform?: number[]; +} +export interface LayerVectorMask { + invert?: boolean; + notLink?: boolean; + disable?: boolean; + fillStartsWithAllPixels?: boolean; + clipboard?: { + top: number; + left: number; + bottom: number; + right: number; + resolution: number; + }; + paths: BezierPath[]; +} +export interface AnimationFrame { + frames: number[]; + enable?: boolean; + offset?: { + x: number; + y: number; + }; + referencePoint?: { + x: number; + y: number; + }; + opacity?: number; + effects?: LayerEffectsInfo; +} +export interface Fraction { + numerator: number; + denominator: number; +} +export declare type TimelineKeyInterpolation = 'linear' | 'hold'; +export declare type TimelineKey = { + interpolation: TimelineKeyInterpolation; + time: Fraction; + selected?: boolean; +} & ({ + type: 'opacity'; + value: number; +} | { + type: 'position'; + x: number; + y: number; +} | { + type: 'transform'; + scale: { + x: number; + y: number; + }; + skew: { + x: number; + y: number; + }; + rotation: number; + translation: { + x: number; + y: number; + }; +} | { + type: 'style'; + style?: LayerEffectsInfo; +} | { + type: 'globalLighting'; + globalAngle: number; + globalAltitude: number; +}); +export declare type TimelineTrackType = 'opacity' | 'style' | 'sheetTransform' | 'sheetPosition' | 'globalLighting'; +export interface TimelineTrack { + type: TimelineTrackType; + enabled?: boolean; + effectParams?: { + keys: TimelineKey[]; + fillCanvas: boolean; + zoomOrigin: number; + }; + keys: TimelineKey[]; +} +export interface Timeline { + start: Fraction; + duration: Fraction; + inTime: Fraction; + outTime: Fraction; + autoScope: boolean; + audioLevel: number; + tracks?: TimelineTrack[]; +} +export interface LayerAdditionalInfo { + name?: string; + nameSource?: string; + id?: number; + version?: number; + mask?: LayerMaskData; + blendClippendElements?: boolean; + blendInteriorElements?: boolean; + knockout?: boolean; + layerMaskAsGlobalMask?: boolean; + protected?: { + transparency?: boolean; + composite?: boolean; + position?: boolean; + artboards?: boolean; + }; + layerColor?: LayerColor; + referencePoint?: { + x: number; + y: number; + }; + sectionDivider?: { + type: SectionDividerType; + key?: string; + subType?: number; + }; + filterMask?: { + colorSpace: Color; + opacity: number; + }; + effects?: LayerEffectsInfo; + text?: LayerTextData; + patterns?: PatternInfo[]; + vectorFill?: VectorContent; + vectorStroke?: { + strokeEnabled?: boolean; + fillEnabled?: boolean; + lineWidth?: UnitsValue; + lineDashOffset?: UnitsValue; + miterLimit?: number; + lineCapType?: LineCapType; + lineJoinType?: LineJoinType; + lineAlignment?: LineAlignment; + scaleLock?: boolean; + strokeAdjust?: boolean; + lineDashSet?: UnitsValue[]; + blendMode?: BlendMode; + opacity?: number; + content?: VectorContent; + resolution?: number; + }; + vectorMask?: LayerVectorMask; + usingAlignedRendering?: boolean; + timestamp?: number; + pathList?: {}[]; + adjustment?: AdjustmentLayer; + placedLayer?: PlacedLayer; + vectorOrigination?: { + keyDescriptorList: KeyDescriptorItem[]; + }; + compositorUsed?: { + description: string; + reason: string; + engine: string; + enableCompCore: string; + enableCompCoreGPU: string; + compCoreSupport: string; + compCoreGPUSupport: string; + }; + artboard?: { + rect: { + top: number; + left: number; + bottom: number; + right: number; + }; + guideIndices?: any[]; + presetName?: string; + color?: Color; + backgroundType?: number; + }; + fillOpacity?: number; + transparencyShapesLayer?: boolean; + channelBlendingRestrictions?: number[]; + animationFrames?: AnimationFrame[]; + animationFrameFlags?: { + propagateFrameOne?: boolean; + unifyLayerPosition?: boolean; + unifyLayerStyle?: boolean; + unifyLayerVisibility?: boolean; + }; + timeline?: Timeline; + engineData?: string; +} +export interface ImageResources { + layerState?: number; + layersGroup?: number[]; + layerSelectionIds?: number[]; + layerGroupsEnabledId?: number[]; + versionInfo?: { + hasRealMergedData: boolean; + writerName: string; + readerName: string; + fileVersion: number; + }; + alphaIdentifiers?: number[]; + alphaChannelNames?: string[]; + globalAngle?: number; + globalAltitude?: number; + pixelAspectRatio?: { + aspect: number; + }; + urlsList?: any[]; + gridAndGuidesInformation?: { + grid?: { + horizontal: number; + vertical: number; + }; + guides?: { + location: number; + direction: 'horizontal' | 'vertical'; + }[]; + }; + resolutionInfo?: { + horizontalResolution: number; + horizontalResolutionUnit: 'PPI' | 'PPCM'; + widthUnit: 'Inches' | 'Centimeters' | 'Points' | 'Picas' | 'Columns'; + verticalResolution: number; + verticalResolutionUnit: 'PPI' | 'PPCM'; + heightUnit: 'Inches' | 'Centimeters' | 'Points' | 'Picas' | 'Columns'; + }; + thumbnail?: HTMLCanvasElement; + thumbnailRaw?: { + width: number; + height: number; + data: Uint8Array; + }; + captionDigest?: string; + xmpMetadata?: string; + printScale?: { + style?: 'centered' | 'size to fit' | 'user defined'; + x?: number; + y?: number; + scale?: number; + }; + printInformation?: { + printerManagesColors?: boolean; + printerName?: string; + printerProfile?: string; + printSixteenBit?: boolean; + renderingIntent?: RenderingIntent; + hardProof?: boolean; + blackPointCompensation?: boolean; + proofSetup?: { + builtin: string; + } | { + profile: string; + renderingIntent?: RenderingIntent; + blackPointCompensation?: boolean; + paperWhite?: boolean; + }; + }; + backgroundColor?: Color; + idsSeedNumber?: number; + printFlags?: { + labels?: boolean; + cropMarks?: boolean; + colorBars?: boolean; + registrationMarks?: boolean; + negative?: boolean; + flip?: boolean; + interpolate?: boolean; + caption?: boolean; + printFlags?: boolean; + }; + iccUntaggedProfile?: boolean; + pathSelectionState?: string[]; + imageReadyVariables?: string; + imageReadyDataSets?: string; + animations?: Animations; + onionSkins?: { + enabled: boolean; + framesBefore: number; + framesAfter: number; + frameSpacing: number; + minOpacity: number; + maxOpacity: number; + blendMode: BlendMode; + }; + timelineInformation?: { + enabled: boolean; + frameStep: Fraction; + frameRate: number; + time: Fraction; + duration: Fraction; + workInTime: Fraction; + workOutTime: Fraction; + repeats: number; + hasMotion: boolean; + globalTracks: TimelineTrack[]; + audioClipGroups?: { + id: string; + muted: boolean; + audioClips: { + id: string; + start: Fraction; + duration: Fraction; + inTime: Fraction; + outTime: Fraction; + muted: boolean; + audioLevel: number; + frameReader: { + type: number; + mediaDescriptor: string; + link: { + name: string; + fullPath: string; + relativePath: string; + }; + }; + }[]; + }[]; + }; + sheetDisclosure?: { + sheetTimelineOptions?: { + sheetID: number; + sheetDisclosed: boolean; + lightsDisclosed: boolean; + meshesDisclosed: boolean; + materialsDisclosed: boolean; + }[]; + }; +} +export interface GlobalLayerMaskInfo { + overlayColorSpace: number; + colorSpace1: number; + colorSpace2: number; + colorSpace3: number; + colorSpace4: number; + opacity: number; + kind: number; +} +export interface Annotation { + type: 'text' | 'sound'; + open: boolean; + iconLocation: { + left: number; + top: number; + right: number; + bottom: number; + }; + popupLocation: { + left: number; + top: number; + right: number; + bottom: number; + }; + color: Color; + author: string; + name: string; + date: string; + data: string | Uint8Array; +} +export interface Layer extends LayerAdditionalInfo { + top?: number; + left?: number; + bottom?: number; + right?: number; + blendMode?: BlendMode; + opacity?: number; + transparencyProtected?: boolean; + hidden?: boolean; + clipping?: boolean; + canvas?: HTMLCanvasElement; + imageData?: ImageData; + children?: Layer[]; + /** Applies only for layer groups. */ + opened?: boolean; +} +export interface Psd extends LayerAdditionalInfo { + width: number; + height: number; + channels?: number; + bitsPerChannel?: number; + colorMode?: ColorMode; + children?: Layer[]; + canvas?: HTMLCanvasElement; + imageData?: ImageData; + imageResources?: ImageResources; + linkedFiles?: LinkedFile[]; + artboards?: { + count: number; + autoExpandOffset?: { + horizontal: number; + vertical: number; + }; + origin?: { + horizontal: number; + vertical: number; + }; + autoExpandEnabled?: boolean; + autoNestEnabled?: boolean; + autoPositionEnabled?: boolean; + shrinkwrapOnSaveEnabled?: boolean; + docDefaultNewArtboardBackgroundColor?: Color; + docDefaultNewArtboardBackgroundType?: number; + }; + globalLayerMaskInfo?: GlobalLayerMaskInfo; + annotations?: Annotation[]; +} +export interface ReadOptions { + /** Does not load layer image data. */ + skipLayerImageData?: boolean; + /** Does not load composite image data. */ + skipCompositeImageData?: boolean; + /** Does not load thumbnail. */ + skipThumbnail?: boolean; + /** Does not load linked files (used in smart-objects). */ + skipLinkedFilesData?: boolean; + /** Throws exception if features are missing. */ + throwForMissingFeatures?: boolean; + /** Logs if features are missing. */ + logMissingFeatures?: boolean; + /** Keep image data as byte array instead of canvas. + * (image data will appear in `imageData` fields instead of `canvas` fields) + * This avoids issues with canvas premultiplied alpha corrupting image data. */ + useImageData?: boolean; + /** Loads thumbnail raw data instead of decoding it's content into canvas. + * `thumnailRaw` field is used instead. */ + useRawThumbnail?: boolean; + /** Usend only for development. */ + logDevFeatures?: boolean; +} +export interface WriteOptions { + /** Automatically generates thumbnail from composite image. */ + generateThumbnail?: boolean; + /** Trims transparent pixels from layer image data. */ + trimImageData?: boolean; + /** Invalidates text layer data, forcing Photoshop to redraw them on load. + * Use this option if you're updating loaded text layer properties. */ + invalidateTextLayers?: boolean; + /** Logs if features are missing. */ + logMissingFeatures?: boolean; + /** Forces bottom layer to be treated as layer and not background even when it's missing any transparency + * (by default Photoshop treats bottom layer as background it it doesn't have any transparent pixels). */ + noBackground?: boolean; + /** Saves document as PSB (Large Document Format) file. */ + psb?: boolean; + /** Uses zip compression when writing PSD file, will result in smaller file size but may be incompatible + * with some software. It may also be significantly slower. */ + compress?: boolean; +} diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/psd.js b/npm-packages/mac-v2.4.x/ag-psd/dist/psd.js index acb7331..71cd3bf 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/psd.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/psd.js @@ -1,22 +1,23 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SectionDividerType = exports.ColorMode = void 0; -var ColorMode; -(function (ColorMode) { - ColorMode[ColorMode["Bitmap"] = 0] = "Bitmap"; - ColorMode[ColorMode["Grayscale"] = 1] = "Grayscale"; - ColorMode[ColorMode["Indexed"] = 2] = "Indexed"; - ColorMode[ColorMode["RGB"] = 3] = "RGB"; - ColorMode[ColorMode["CMYK"] = 4] = "CMYK"; - ColorMode[ColorMode["Multichannel"] = 7] = "Multichannel"; - ColorMode[ColorMode["Duotone"] = 8] = "Duotone"; - ColorMode[ColorMode["Lab"] = 9] = "Lab"; -})(ColorMode = exports.ColorMode || (exports.ColorMode = {})); -var SectionDividerType; -(function (SectionDividerType) { - SectionDividerType[SectionDividerType["Other"] = 0] = "Other"; - SectionDividerType[SectionDividerType["OpenFolder"] = 1] = "OpenFolder"; - SectionDividerType[SectionDividerType["ClosedFolder"] = 2] = "ClosedFolder"; - SectionDividerType[SectionDividerType["BoundingSectionDivider"] = 3] = "BoundingSectionDivider"; -})(SectionDividerType = exports.SectionDividerType || (exports.SectionDividerType = {})); -//# sourceMappingURL=psd.js.map \ No newline at end of file +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.SectionDividerType = exports.ColorMode = void 0; +var ColorMode; +(function (ColorMode) { + ColorMode[ColorMode["Bitmap"] = 0] = "Bitmap"; + ColorMode[ColorMode["Grayscale"] = 1] = "Grayscale"; + ColorMode[ColorMode["Indexed"] = 2] = "Indexed"; + ColorMode[ColorMode["RGB"] = 3] = "RGB"; + ColorMode[ColorMode["CMYK"] = 4] = "CMYK"; + ColorMode[ColorMode["Multichannel"] = 7] = "Multichannel"; + ColorMode[ColorMode["Duotone"] = 8] = "Duotone"; + ColorMode[ColorMode["Lab"] = 9] = "Lab"; +})(ColorMode = exports.ColorMode || (exports.ColorMode = {})); +var SectionDividerType; +(function (SectionDividerType) { + SectionDividerType[SectionDividerType["Other"] = 0] = "Other"; + SectionDividerType[SectionDividerType["OpenFolder"] = 1] = "OpenFolder"; + SectionDividerType[SectionDividerType["ClosedFolder"] = 2] = "ClosedFolder"; + SectionDividerType[SectionDividerType["BoundingSectionDivider"] = 3] = "BoundingSectionDivider"; +})(SectionDividerType = exports.SectionDividerType || (exports.SectionDividerType = {})); + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBzZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFNQSxJQUFrQixTQVNqQjtBQVRELFdBQWtCLFNBQVM7SUFDMUIsNkNBQVUsQ0FBQTtJQUNWLG1EQUFhLENBQUE7SUFDYiwrQ0FBVyxDQUFBO0lBQ1gsdUNBQU8sQ0FBQTtJQUNQLHlDQUFRLENBQUE7SUFDUix5REFBZ0IsQ0FBQTtJQUNoQiwrQ0FBVyxDQUFBO0lBQ1gsdUNBQU8sQ0FBQTtBQUNSLENBQUMsRUFUaUIsU0FBUyxHQUFULGlCQUFTLEtBQVQsaUJBQVMsUUFTMUI7QUFFRCxJQUFrQixrQkFLakI7QUFMRCxXQUFrQixrQkFBa0I7SUFDbkMsNkRBQVMsQ0FBQTtJQUNULHVFQUFjLENBQUE7SUFDZCwyRUFBZ0IsQ0FBQTtJQUNoQiwrRkFBMEIsQ0FBQTtBQUMzQixDQUFDLEVBTGlCLGtCQUFrQixHQUFsQiwwQkFBa0IsS0FBbEIsMEJBQWtCLFFBS25DIiwiZmlsZSI6InBzZC5qcyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB0eXBlIEJsZW5kTW9kZSA9ICdwYXNzIHRocm91Z2gnIHwgJ25vcm1hbCcgfCAnZGlzc29sdmUnIHwgJ2RhcmtlbicgfCAnbXVsdGlwbHknIHxcblx0J2NvbG9yIGJ1cm4nIHwgJ2xpbmVhciBidXJuJyB8ICdkYXJrZXIgY29sb3InIHwgJ2xpZ2h0ZW4nIHwgJ3NjcmVlbicgfCAnY29sb3IgZ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lLCB3aWxsIHJlc3VsdCBpbiBzbWFsbGVyIGZpbGUgc2l6ZSBidXQgbWF5IGJlIGluY29tcGF0aWJsZVxuXHQgKiAgd2l0aCBzb21lIHNvZnR3YXJlLiBJdCBtYXkgYWxzbyBiZSBzaWduaWZpY2FudGx5IHNsb3dlci4gKi9cblx0Y29tcHJlc3M/OiBib29sZWFuO1xufVxuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/psd.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/psd.js.map deleted file mode 100644 index 8a45721..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/psd.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"psd.js","sourceRoot":"../src/","sources":["psd.ts"],"names":[],"mappings":";;;AAMA,IAAkB,SASjB;AATD,WAAkB,SAAS;IAC1B,6CAAU,CAAA;IACV,mDAAa,CAAA;IACb,+CAAW,CAAA;IACX,uCAAO,CAAA;IACP,yCAAQ,CAAA;IACR,yDAAgB,CAAA;IAChB,+CAAW,CAAA;IACX,uCAAO,CAAA;AACR,CAAC,EATiB,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAS1B;AAED,IAAkB,kBAKjB;AALD,WAAkB,kBAAkB;IACnC,6DAAS,CAAA;IACT,uEAAc,CAAA;IACd,2EAAgB,CAAA;IAChB,+FAA0B,CAAA;AAC3B,CAAC,EALiB,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAKnC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/psdReader.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/psdReader.d.ts index 19044d8..c3e08b2 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/psdReader.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/psdReader.d.ts @@ -1,36 +1,36 @@ -import { Psd, ColorMode, ReadOptions, Color, PatternInfo } from './psd'; -import { PixelData } from './helpers'; -export declare const supportedColorModes: ColorMode[]; -export interface PsdReader { - offset: number; - view: DataView; - strict: boolean; - debug: boolean; -} -export declare function createReader(buffer: ArrayBuffer, offset?: number, length?: number): PsdReader; -export declare function warnOrThrow(reader: PsdReader, message: string): void; -export declare function readUint8(reader: PsdReader): number; -export declare function peekUint8(reader: PsdReader): number; -export declare function readInt16(reader: PsdReader): number; -export declare function readUint16(reader: PsdReader): number; -export declare function readInt32(reader: PsdReader): number; -export declare function readInt32LE(reader: PsdReader): number; -export declare function readUint32(reader: PsdReader): number; -export declare function readFloat32(reader: PsdReader): number; -export declare function readFloat64(reader: PsdReader): number; -export declare function readFixedPoint32(reader: PsdReader): number; -export declare function readFixedPointPath32(reader: PsdReader): number; -export declare function readBytes(reader: PsdReader, length: number): Uint8Array; -export declare function readSignature(reader: PsdReader): string; -export declare function readPascalString(reader: PsdReader, padTo: number): string; -export declare function readUnicodeString(reader: PsdReader): string; -export declare function readUnicodeStringWithLength(reader: PsdReader, length: number): string; -export declare function readAsciiString(reader: PsdReader, length: number): string; -export declare function skipBytes(reader: PsdReader, count: number): void; -export declare function checkSignature(reader: PsdReader, a: string, b?: string): void; -export declare function readPsd(reader: PsdReader, options?: ReadOptions): Psd; -export declare function readDataZipWithoutPrediction(reader: PsdReader, length: number, pixelData: PixelData | undefined, width: number, height: number, step: number, offset: number): void; -export declare function readDataRLE(reader: PsdReader, pixelData: PixelData | undefined, _width: number, height: number, step: number, offsets: number[], large: boolean): void; -export declare function readSection(reader: PsdReader, round: number, func: (left: () => number) => T, skipEmpty?: boolean, eightBytes?: boolean): T | undefined; -export declare function readColor(reader: PsdReader): Color; -export declare function readPattern(reader: PsdReader): PatternInfo; +import { Psd, ColorMode, ReadOptions, Color, PatternInfo } from './psd'; +import { PixelData } from './helpers'; +export declare const supportedColorModes: ColorMode[]; +export interface PsdReader { + offset: number; + view: DataView; + strict: boolean; + debug: boolean; +} +export declare function createReader(buffer: ArrayBuffer, offset?: number, length?: number): PsdReader; +export declare function warnOrThrow(reader: PsdReader, message: string): void; +export declare function readUint8(reader: PsdReader): number; +export declare function peekUint8(reader: PsdReader): number; +export declare function readInt16(reader: PsdReader): number; +export declare function readUint16(reader: PsdReader): number; +export declare function readInt32(reader: PsdReader): number; +export declare function readInt32LE(reader: PsdReader): number; +export declare function readUint32(reader: PsdReader): number; +export declare function readFloat32(reader: PsdReader): number; +export declare function readFloat64(reader: PsdReader): number; +export declare function readFixedPoint32(reader: PsdReader): number; +export declare function readFixedPointPath32(reader: PsdReader): number; +export declare function readBytes(reader: PsdReader, length: number): Uint8Array; +export declare function readSignature(reader: PsdReader): string; +export declare function readPascalString(reader: PsdReader, padTo: number): string; +export declare function readUnicodeString(reader: PsdReader): string; +export declare function readUnicodeStringWithLength(reader: PsdReader, length: number): string; +export declare function readAsciiString(reader: PsdReader, length: number): string; +export declare function skipBytes(reader: PsdReader, count: number): void; +export declare function checkSignature(reader: PsdReader, a: string, b?: string): void; +export declare function readPsd(reader: PsdReader, options?: ReadOptions): Psd; +export declare function readDataZipWithoutPrediction(reader: PsdReader, length: number, pixelData: PixelData | undefined, width: number, height: number, step: number, offset: number): void; +export declare function readDataRLE(reader: PsdReader, pixelData: PixelData | undefined, _width: number, height: number, step: number, offsets: number[], large: boolean): void; +export declare function readSection(reader: PsdReader, round: number, func: (left: () => number) => T, skipEmpty?: boolean, eightBytes?: boolean): T | undefined; +export declare function readColor(reader: PsdReader): Color; +export declare function readPattern(reader: PsdReader): PatternInfo; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/psdReader.js b/npm-packages/mac-v2.4.x/ag-psd/dist/psdReader.js index bee31d6..aafc323 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/psdReader.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/psdReader.js @@ -1,986 +1,959 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readPattern = exports.readColor = exports.readSection = exports.readDataRLE = exports.readDataZipWithoutPrediction = exports.readPsd = exports.checkSignature = exports.skipBytes = exports.readAsciiString = exports.readUnicodeStringWithLength = exports.readUnicodeString = exports.readPascalString = exports.readSignature = exports.readBytes = exports.readFixedPointPath32 = exports.readFixedPoint32 = exports.readFloat64 = exports.readFloat32 = exports.readUint32 = exports.readInt32LE = exports.readInt32 = exports.readUint16 = exports.readInt16 = exports.peekUint8 = exports.readUint8 = exports.warnOrThrow = exports.createReader = exports.supportedColorModes = void 0; -var pako_1 = require("pako"); -var helpers_1 = require("./helpers"); -var additionalInfo_1 = require("./additionalInfo"); -var imageResources_1 = require("./imageResources"); -exports.supportedColorModes = [0 /* ColorMode.Bitmap */, 1 /* ColorMode.Grayscale */, 3 /* ColorMode.RGB */]; -var colorModes = ['bitmap', 'grayscale', 'indexed', 'RGB', 'CMYK', 'multichannel', 'duotone', 'lab']; -function setupGrayscale(data) { - var size = data.width * data.height * 4; - for (var i = 0; i < size; i += 4) { - data.data[i + 1] = data.data[i]; - data.data[i + 2] = data.data[i]; - } -} -function createReader(buffer, offset, length) { - var view = new DataView(buffer, offset, length); - return { view: view, offset: 0, strict: false, debug: false }; -} -exports.createReader = createReader; -function warnOrThrow(reader, message) { - if (reader.strict) - throw new Error(message); - if (reader.debug) - console.warn(message); -} -exports.warnOrThrow = warnOrThrow; -function readUint8(reader) { - reader.offset += 1; - return reader.view.getUint8(reader.offset - 1); -} -exports.readUint8 = readUint8; -function peekUint8(reader) { - return reader.view.getUint8(reader.offset); -} -exports.peekUint8 = peekUint8; -function readInt16(reader) { - reader.offset += 2; - return reader.view.getInt16(reader.offset - 2, false); -} -exports.readInt16 = readInt16; -function readUint16(reader) { - reader.offset += 2; - return reader.view.getUint16(reader.offset - 2, false); -} -exports.readUint16 = readUint16; -function readInt32(reader) { - reader.offset += 4; - return reader.view.getInt32(reader.offset - 4, false); -} -exports.readInt32 = readInt32; -function readInt32LE(reader) { - reader.offset += 4; - return reader.view.getInt32(reader.offset - 4, true); -} -exports.readInt32LE = readInt32LE; -function readUint32(reader) { - reader.offset += 4; - return reader.view.getUint32(reader.offset - 4, false); -} -exports.readUint32 = readUint32; -function readFloat32(reader) { - reader.offset += 4; - return reader.view.getFloat32(reader.offset - 4, false); -} -exports.readFloat32 = readFloat32; -function readFloat64(reader) { - reader.offset += 8; - return reader.view.getFloat64(reader.offset - 8, false); -} -exports.readFloat64 = readFloat64; -// 32-bit fixed-point number 16.16 -function readFixedPoint32(reader) { - return readInt32(reader) / (1 << 16); -} -exports.readFixedPoint32 = readFixedPoint32; -// 32-bit fixed-point number 8.24 -function readFixedPointPath32(reader) { - return readInt32(reader) / (1 << 24); -} -exports.readFixedPointPath32 = readFixedPointPath32; -function readBytes(reader, length) { - var start = reader.view.byteOffset + reader.offset; - reader.offset += length; - if ((start + length) > reader.view.buffer.byteLength) { - // fix for broken PSD files that are missing part of file at the end - warnOrThrow(reader, 'Reading bytes exceeding buffer length'); - if (length > (100 * 1024 * 1024)) - throw new Error('Reading past end of file'); // limit to 100MB - var result = new Uint8Array(length); - var len = Math.min(length, reader.view.byteLength - start); - if (len > 0) - result.set(new Uint8Array(reader.view.buffer, start, len)); - return result; - } - else { - return new Uint8Array(reader.view.buffer, start, length); - } -} -exports.readBytes = readBytes; -function readSignature(reader) { - return readShortString(reader, 4); -} -exports.readSignature = readSignature; -function readPascalString(reader, padTo) { - var length = readUint8(reader); - var text = length ? readShortString(reader, length) : ''; - while (++length % padTo) { - reader.offset++; - } - return text; -} -exports.readPascalString = readPascalString; -function readUnicodeString(reader) { - var length = readUint32(reader); - return readUnicodeStringWithLength(reader, length); -} -exports.readUnicodeString = readUnicodeString; -function readUnicodeStringWithLength(reader, length) { - var text = ''; - while (length--) { - var value = readUint16(reader); - if (value || length > 0) { // remove trailing \0 - text += String.fromCharCode(value); - } - } - return text; -} -exports.readUnicodeStringWithLength = readUnicodeStringWithLength; -function readAsciiString(reader, length) { - var text = ''; - while (length--) { - text += String.fromCharCode(readUint8(reader)); - } - return text; -} -exports.readAsciiString = readAsciiString; -function skipBytes(reader, count) { - reader.offset += count; -} -exports.skipBytes = skipBytes; -function checkSignature(reader, a, b) { - var offset = reader.offset; - var signature = readSignature(reader); - if (signature !== a && signature !== b) { - throw new Error("Invalid signature: '".concat(signature, "' at 0x").concat(offset.toString(16))); - } -} -exports.checkSignature = checkSignature; -function readShortString(reader, length) { - var buffer = readBytes(reader, length); - var result = ''; - for (var i = 0; i < buffer.length; i++) { - result += String.fromCharCode(buffer[i]); - } - return result; -} -function isValidSignature(sig) { - return sig === '8BIM' || sig === 'MeSa' || sig === 'AgHg' || sig === 'PHUT' || sig === 'DCSR'; -} -function readPsd(reader, options) { - var _a; - if (options === void 0) { options = {}; } - // header - checkSignature(reader, '8BPS'); - var version = readUint16(reader); - if (version !== 1 && version !== 2) - throw new Error("Invalid PSD file version: ".concat(version)); - skipBytes(reader, 6); - var channels = readUint16(reader); - var height = readUint32(reader); - var width = readUint32(reader); - var bitsPerChannel = readUint16(reader); - var colorMode = readUint16(reader); - var maxSize = version === 1 ? 30000 : 300000; - if (width > maxSize || height > maxSize) - throw new Error("Invalid size"); - if (channels > 16) - throw new Error("Invalid channel count"); - if (bitsPerChannel > 32) - throw new Error("Invalid bitsPerChannel count"); - if (exports.supportedColorModes.indexOf(colorMode) === -1) - throw new Error("Color mode not supported: ".concat((_a = colorModes[colorMode]) !== null && _a !== void 0 ? _a : colorMode)); - var psd = { width: width, height: height, channels: channels, bitsPerChannel: bitsPerChannel, colorMode: colorMode }; - var opt = __assign(__assign({}, options), { large: version === 2 }); - var fixOffsets = [0, 1, -1, 2, -2, 3, -3, 4, -4]; - // color mode data - readSection(reader, 1, function (left) { - if (opt.throwForMissingFeatures) - throw new Error('Color mode data not supported'); - skipBytes(reader, left()); - }); - // image resources - readSection(reader, 1, function (left) { - var _loop_1 = function () { - var sigOffset = reader.offset; - var sig = ''; - // attempt to fix broken document by realigning with the signature - for (var _i = 0, fixOffsets_1 = fixOffsets; _i < fixOffsets_1.length; _i++) { - var offset = fixOffsets_1[_i]; - try { - reader.offset = sigOffset + offset; - sig = readSignature(reader); - } - catch (_a) { } - if (isValidSignature(sig)) - break; - } - if (!isValidSignature(sig)) { - throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((sigOffset).toString(16))); - } - var id = readUint16(reader); - readPascalString(reader, 2); // name - readSection(reader, 2, function (left) { - var handler = imageResources_1.resourceHandlersMap[id]; - var skip = id === 1036 && !!opt.skipThumbnail; - if (!psd.imageResources) { - psd.imageResources = {}; - } - if (handler && !skip) { - try { - handler.read(reader, psd.imageResources, left, opt); - } - catch (e) { - if (opt.throwForMissingFeatures) - throw e; - skipBytes(reader, left()); - } - } - else { - // options.logMissingFeatures && console.log(`Unhandled image resource: ${id}`); - skipBytes(reader, left()); - } - }); - }; - while (left()) { - _loop_1(); - } - }); - // layer and mask info - var globalAlpha = false; - readSection(reader, 1, function (left) { - globalAlpha = readLayerInfo(reader, psd, opt); - // SAI does not include this section - if (left() > 0) { - var globalLayerMaskInfo = readGlobalLayerMaskInfo(reader); - if (globalLayerMaskInfo) - psd.globalLayerMaskInfo = globalLayerMaskInfo; - } - else { - // revert back to end of section if exceeded section limits - // opt.logMissingFeatures && console.log('reverting to end of section'); - skipBytes(reader, left()); - } - while (left() > 0) { - // sometimes there are empty bytes here - while (left() && peekUint8(reader) === 0) { - // opt.logMissingFeatures && console.log('skipping 0 byte'); - skipBytes(reader, 1); - } - if (left() >= 12) { - readAdditionalLayerInfo(reader, psd, psd, opt); - } - else { - // opt.logMissingFeatures && console.log('skipping leftover bytes', left()); - skipBytes(reader, left()); - } - } - }, undefined, opt.large); - var hasChildren = psd.children && psd.children.length; - var skipComposite = opt.skipCompositeImageData && (opt.skipLayerImageData || hasChildren); - if (!skipComposite) { - readImageData(reader, psd, globalAlpha, opt); - } - // TODO: show converted color mode instead of original PSD file color mode - // but add option to preserve file color mode (need to return image data instead of canvas in that case) - // psd.colorMode = ColorMode.RGB; // we convert all color modes to RGB - return psd; -} -exports.readPsd = readPsd; -function readLayerInfo(reader, psd, options) { - var globalAlpha = false; - readSection(reader, 2, function (left) { - var layerCount = readInt16(reader); - if (layerCount < 0) { - globalAlpha = true; - layerCount = -layerCount; - } - var layers = []; - var layerChannels = []; - for (var i = 0; i < layerCount; i++) { - var _a = readLayerRecord(reader, psd, options), layer = _a.layer, channels = _a.channels; - layers.push(layer); - layerChannels.push(channels); - } - if (!options.skipLayerImageData) { - for (var i = 0; i < layerCount; i++) { - readLayerChannelImageData(reader, psd, layers[i], layerChannels[i], options); - } - } - skipBytes(reader, left()); - if (!psd.children) - psd.children = []; - var stack = [psd]; - for (var i = layers.length - 1; i >= 0; i--) { - var l = layers[i]; - var type = l.sectionDivider ? l.sectionDivider.type : 0 /* SectionDividerType.Other */; - if (type === 1 /* SectionDividerType.OpenFolder */ || type === 2 /* SectionDividerType.ClosedFolder */) { - l.opened = type === 1 /* SectionDividerType.OpenFolder */; - l.children = []; - stack[stack.length - 1].children.unshift(l); - stack.push(l); - } - else if (type === 3 /* SectionDividerType.BoundingSectionDivider */) { - stack.pop(); - // this was workaround because I didn't know what `lsdk` section was, now it's probably not needed anymore - // } else if (l.name === '' && !l.sectionDivider && !l.top && !l.left && !l.bottom && !l.right) { - // // sometimes layer group terminator doesn't have sectionDivider, so we just guess here (PS bug ?) - // stack.pop(); - } - else { - stack[stack.length - 1].children.unshift(l); - } - } - }, undefined, options.large); - return globalAlpha; -} -function readLayerRecord(reader, psd, options) { - var layer = {}; - layer.top = readInt32(reader); - layer.left = readInt32(reader); - layer.bottom = readInt32(reader); - layer.right = readInt32(reader); - var channelCount = readUint16(reader); - var channels = []; - for (var i = 0; i < channelCount; i++) { - var channelID = readInt16(reader); - var channelLength = readUint32(reader); - if (options.large) { - if (channelLength !== 0) - throw new Error('Sizes larger than 4GB are not supported'); - channelLength = readUint32(reader); - } - channels.push({ id: channelID, length: channelLength }); - } - checkSignature(reader, '8BIM'); - var blendMode = readSignature(reader); - if (!helpers_1.toBlendMode[blendMode]) - throw new Error("Invalid blend mode: '".concat(blendMode, "'")); - layer.blendMode = helpers_1.toBlendMode[blendMode]; - layer.opacity = readUint8(reader) / 0xff; - layer.clipping = readUint8(reader) === 1; - var flags = readUint8(reader); - layer.transparencyProtected = (flags & 0x01) !== 0; - layer.hidden = (flags & 0x02) !== 0; - // 0x04 - obsolete - // 0x08 - 1 for Photoshop 5.0 and later, tells if bit 4 has useful information - // 0x10 - pixel data irrelevant to appearance of document - // 0x20 - ??? - // if (flags & 0x20) (layer as any)._2 = true; // TEMP !!!! - skipBytes(reader, 1); - readSection(reader, 1, function (left) { - var mask = readLayerMaskData(reader, options); - if (mask) - layer.mask = mask; - /*const blendingRanges =*/ readLayerBlendingRanges(reader); - layer.name = readPascalString(reader, 4); - while (left()) { - readAdditionalLayerInfo(reader, layer, psd, options); - } - }); - return { layer: layer, channels: channels }; -} -function readLayerMaskData(reader, options) { - return readSection(reader, 1, function (left) { - if (!left()) - return undefined; - var mask = {}; - mask.top = readInt32(reader); - mask.left = readInt32(reader); - mask.bottom = readInt32(reader); - mask.right = readInt32(reader); - mask.defaultColor = readUint8(reader); - var flags = readUint8(reader); - mask.positionRelativeToLayer = (flags & 1 /* LayerMaskFlags.PositionRelativeToLayer */) !== 0; - mask.disabled = (flags & 2 /* LayerMaskFlags.LayerMaskDisabled */) !== 0; - mask.fromVectorData = (flags & 8 /* LayerMaskFlags.LayerMaskFromRenderingOtherData */) !== 0; - if (flags & 16 /* LayerMaskFlags.MaskHasParametersAppliedToIt */) { - var params = readUint8(reader); - if (params & 1 /* MaskParams.UserMaskDensity */) - mask.userMaskDensity = readUint8(reader) / 0xff; - if (params & 2 /* MaskParams.UserMaskFeather */) - mask.userMaskFeather = readFloat64(reader); - if (params & 4 /* MaskParams.VectorMaskDensity */) - mask.vectorMaskDensity = readUint8(reader) / 0xff; - if (params & 8 /* MaskParams.VectorMaskFeather */) - mask.vectorMaskFeather = readFloat64(reader); - } - if (left() > 2) { - options.logMissingFeatures && console.log('Unhandled extra mask params'); - // TODO: handle these values - /*const realFlags =*/ readUint8(reader); - /*const realUserMaskBackground =*/ readUint8(reader); - /*const top2 =*/ readInt32(reader); - /*const left2 =*/ readInt32(reader); - /*const bottom2 =*/ readInt32(reader); - /*const right2 =*/ readInt32(reader); - } - skipBytes(reader, left()); - return mask; - }); -} -function readLayerBlendingRanges(reader) { - return readSection(reader, 1, function (left) { - var compositeGrayBlendSource = readUint32(reader); - var compositeGraphBlendDestinationRange = readUint32(reader); - var ranges = []; - while (left()) { - var sourceRange = readUint32(reader); - var destRange = readUint32(reader); - ranges.push({ sourceRange: sourceRange, destRange: destRange }); - } - return { compositeGrayBlendSource: compositeGrayBlendSource, compositeGraphBlendDestinationRange: compositeGraphBlendDestinationRange, ranges: ranges }; - }); -} -function readLayerChannelImageData(reader, psd, layer, channels, options) { - var layerWidth = (layer.right || 0) - (layer.left || 0); - var layerHeight = (layer.bottom || 0) - (layer.top || 0); - var cmyk = psd.colorMode === 4 /* ColorMode.CMYK */; - var imageData; - if (layerWidth && layerHeight) { - if (cmyk) { - imageData = { width: layerWidth, height: layerHeight, data: new Uint8ClampedArray(layerWidth * layerHeight * 5) }; - for (var p = 4; p < imageData.data.byteLength; p += 5) - imageData.data[p] = 255; - } - else { - imageData = (0, helpers_1.createImageData)(layerWidth, layerHeight); - (0, helpers_1.resetImageData)(imageData); - } - } - if (helpers_1.RAW_IMAGE_DATA) - layer.imageDataRaw = []; - for (var _i = 0, channels_1 = channels; _i < channels_1.length; _i++) { - var channel = channels_1[_i]; - if (channel.length === 0) - continue; - if (channel.length < 2) - throw new Error('Invalid channel length'); - var start = reader.offset; - var compression = readUint16(reader); - // try to fix broken files where there's 1 byte shift of channel - if (compression > 3) { - reader.offset -= 1; - compression = readUint16(reader); - } - // try to fix broken files where there's 1 byte shift of channel - if (compression > 3) { - reader.offset -= 3; - compression = readUint16(reader); - } - if (compression > 3) - throw new Error("Invalid compression: ".concat(compression)); - if (channel.id === -2 /* ChannelID.UserMask */) { - var mask = layer.mask; - if (!mask) - throw new Error("Missing layer mask data"); - var maskWidth = (mask.right || 0) - (mask.left || 0); - var maskHeight = (mask.bottom || 0) - (mask.top || 0); - if (maskWidth && maskHeight) { - var maskData = (0, helpers_1.createImageData)(maskWidth, maskHeight); - (0, helpers_1.resetImageData)(maskData); - var start_1 = reader.offset; - readData(reader, channel.length, maskData, compression, maskWidth, maskHeight, 0, options.large, 4); - if (helpers_1.RAW_IMAGE_DATA) { - layer.maskDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start_1, reader.offset - start_1); - } - setupGrayscale(maskData); - if (options.useImageData) { - mask.imageData = maskData; - } - else { - mask.canvas = (0, helpers_1.createCanvas)(maskWidth, maskHeight); - mask.canvas.getContext('2d').putImageData(maskData, 0, 0); - } - } - } - else { - var offset = (0, helpers_1.offsetForChannel)(channel.id, cmyk); - var targetData = imageData; - if (offset < 0) { - targetData = undefined; - if (options.throwForMissingFeatures) { - throw new Error("Channel not supported: ".concat(channel.id)); - } - } - readData(reader, channel.length, targetData, compression, layerWidth, layerHeight, offset, options.large, cmyk ? 5 : 4); - if (helpers_1.RAW_IMAGE_DATA) { - layer.imageDataRaw[channel.id] = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start + 2, channel.length - 2); - } - reader.offset = start + channel.length; - if (targetData && psd.colorMode === 1 /* ColorMode.Grayscale */) { - setupGrayscale(targetData); - } - } - } - if (imageData) { - if (cmyk) { - var cmykData = imageData; - imageData = (0, helpers_1.createImageData)(cmykData.width, cmykData.height); - cmykToRgb(cmykData, imageData, false); - } - if (options.useImageData) { - layer.imageData = imageData; - } - else { - layer.canvas = (0, helpers_1.createCanvas)(layerWidth, layerHeight); - layer.canvas.getContext('2d').putImageData(imageData, 0, 0); - } - } -} -function readData(reader, length, data, compression, width, height, offset, large, step) { - if (compression === 0 /* Compression.RawData */) { - readDataRaw(reader, data, width, height, step, offset); - } - else if (compression === 1 /* Compression.RleCompressed */) { - readDataRLE(reader, data, width, height, step, [offset], large); - } - else if (compression === 2 /* Compression.ZipWithoutPrediction */) { - readDataZipWithoutPrediction(reader, length, data, width, height, step, offset); - } - else if (compression === 3 /* Compression.ZipWithPrediction */) { - throw new Error("Compression type not supported: ".concat(compression)); - } - else { - throw new Error("Invalid Compression type: ".concat(compression)); - } -} -function readGlobalLayerMaskInfo(reader) { - return readSection(reader, 1, function (left) { - if (!left()) - return undefined; - var overlayColorSpace = readUint16(reader); - var colorSpace1 = readUint16(reader); - var colorSpace2 = readUint16(reader); - var colorSpace3 = readUint16(reader); - var colorSpace4 = readUint16(reader); - var opacity = readUint16(reader) / 0xff; - var kind = readUint8(reader); - skipBytes(reader, left()); // 3 bytes of padding ? - return { overlayColorSpace: overlayColorSpace, colorSpace1: colorSpace1, colorSpace2: colorSpace2, colorSpace3: colorSpace3, colorSpace4: colorSpace4, opacity: opacity, kind: kind }; - }); -} -function readAdditionalLayerInfo(reader, target, psd, options) { - var sig = readSignature(reader); - if (sig !== '8BIM' && sig !== '8B64') - throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((reader.offset - 4).toString(16))); - var key = readSignature(reader); - // `largeAdditionalInfoKeys` fallback, because some keys don't have 8B64 signature even when they are 64bit - var u64 = sig === '8B64' || (options.large && helpers_1.largeAdditionalInfoKeys.indexOf(key) !== -1); - readSection(reader, 2, function (left) { - var handler = additionalInfo_1.infoHandlersMap[key]; - if (handler) { - try { - handler.read(reader, target, left, psd, options); - } - catch (e) { - if (options.throwForMissingFeatures) - throw e; - } - } - else { - options.logMissingFeatures && console.log("Unhandled additional info: ".concat(key)); - skipBytes(reader, left()); - } - if (left()) { - options.logMissingFeatures && console.log("Unread ".concat(left(), " bytes left for additional info: ").concat(key)); - skipBytes(reader, left()); - } - }, false, u64); -} -function readImageData(reader, psd, globalAlpha, options) { - var compression = readUint16(reader); - if (exports.supportedColorModes.indexOf(psd.colorMode) === -1) - throw new Error("Color mode not supported: ".concat(psd.colorMode)); - if (compression !== 0 /* Compression.RawData */ && compression !== 1 /* Compression.RleCompressed */) - throw new Error("Compression type not supported: ".concat(compression)); - var imageData = (0, helpers_1.createImageData)(psd.width, psd.height); - (0, helpers_1.resetImageData)(imageData); - switch (psd.colorMode) { - case 0 /* ColorMode.Bitmap */: { - var bytes = void 0; - if (compression === 0 /* Compression.RawData */) { - bytes = readBytes(reader, Math.ceil(psd.width / 8) * psd.height); - } - else if (compression === 1 /* Compression.RleCompressed */) { - bytes = new Uint8Array(psd.width * psd.height); - readDataRLE(reader, { data: bytes, width: psd.width, height: psd.height }, psd.width, psd.height, 1, [0], options.large); - } - else { - throw new Error("Bitmap compression not supported: ".concat(compression)); - } - (0, helpers_1.decodeBitmap)(bytes, imageData.data, psd.width, psd.height); - break; - } - case 3 /* ColorMode.RGB */: - case 1 /* ColorMode.Grayscale */: { - var channels = psd.colorMode === 1 /* ColorMode.Grayscale */ ? [0] : [0, 1, 2]; - if (psd.channels && psd.channels > 3) { - for (var i = 3; i < psd.channels; i++) { - // TODO: store these channels in additional image data - channels.push(i); - } - } - else if (globalAlpha) { - channels.push(3); - } - if (compression === 0 /* Compression.RawData */) { - for (var i = 0; i < channels.length; i++) { - readDataRaw(reader, imageData, psd.width, psd.height, 4, channels[i]); - } - } - else if (compression === 1 /* Compression.RleCompressed */) { - var start = reader.offset; - readDataRLE(reader, imageData, psd.width, psd.height, 4, channels, options.large); - if (helpers_1.RAW_IMAGE_DATA) - psd.imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); - } - if (psd.colorMode === 1 /* ColorMode.Grayscale */) { - setupGrayscale(imageData); - } - break; - } - case 4 /* ColorMode.CMYK */: { - if (psd.channels !== 4) - throw new Error("Invalid channel count"); - var channels = [0, 1, 2, 3]; - if (globalAlpha) - channels.push(4); - if (compression === 0 /* Compression.RawData */) { - throw new Error("Not implemented"); - // TODO: ... - // for (let i = 0; i < channels.length; i++) { - // readDataRaw(reader, imageData, channels[i], psd.width, psd.height); - // } - } - else if (compression === 1 /* Compression.RleCompressed */) { - var cmykImageData = { - width: imageData.width, - height: imageData.height, - data: new Uint8Array(imageData.width * imageData.height * 5), - }; - var start = reader.offset; - readDataRLE(reader, cmykImageData, psd.width, psd.height, 5, channels, options.large); - cmykToRgb(cmykImageData, imageData, true); - if (helpers_1.RAW_IMAGE_DATA) - psd.imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); - } - break; - } - default: throw new Error("Color mode not supported: ".concat(psd.colorMode)); - } - // remove weird white matte - if (globalAlpha) { - var p = imageData.data; - var size = imageData.width * imageData.height * 4; - for (var i = 0; i < size; i += 4) { - var pa = p[i + 3]; - if (pa != 0 && pa != 255) { - var a = pa / 255; - var ra = 1 / a; - var invA = 255 * (1 - ra); - p[i + 0] = p[i + 0] * ra + invA; - p[i + 1] = p[i + 1] * ra + invA; - p[i + 2] = p[i + 2] * ra + invA; - } - } - } - if (options.useImageData) { - psd.imageData = imageData; - } - else { - psd.canvas = (0, helpers_1.createCanvas)(psd.width, psd.height); - psd.canvas.getContext('2d').putImageData(imageData, 0, 0); - } -} -function cmykToRgb(cmyk, rgb, reverseAlpha) { - var size = rgb.width * rgb.height * 4; - var srcData = cmyk.data; - var dstData = rgb.data; - for (var src = 0, dst = 0; dst < size; src += 5, dst += 4) { - var c = srcData[src]; - var m = srcData[src + 1]; - var y = srcData[src + 2]; - var k = srcData[src + 3]; - dstData[dst] = ((((c * k) | 0) / 255) | 0); - dstData[dst + 1] = ((((m * k) | 0) / 255) | 0); - dstData[dst + 2] = ((((y * k) | 0) / 255) | 0); - dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; - } - // for (let src = 0, dst = 0; dst < size; src += 5, dst += 4) { - // const c = 1 - (srcData[src + 0] / 255); - // const m = 1 - (srcData[src + 1] / 255); - // const y = 1 - (srcData[src + 2] / 255); - // // const k = srcData[src + 3] / 255; - // dstData[dst + 0] = ((1 - c * 0.8) * 255) | 0; - // dstData[dst + 1] = ((1 - m * 0.8) * 255) | 0; - // dstData[dst + 2] = ((1 - y * 0.8) * 255) | 0; - // dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; - // } -} -function readDataRaw(reader, pixelData, width, height, step, offset) { - var size = width * height; - var buffer = readBytes(reader, size); - if (pixelData && offset < step) { - var data = pixelData.data; - for (var i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { - data[p] = buffer[i]; - } - } -} -function readDataZipWithoutPrediction(reader, length, pixelData, width, height, step, offset) { - var compressed = readBytes(reader, length); - var decompressed = (0, pako_1.inflate)(compressed); - var size = width * height; - if (pixelData && offset < step) { - var data = pixelData.data; - for (var i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { - data[p] = decompressed[i]; - } - } -} -exports.readDataZipWithoutPrediction = readDataZipWithoutPrediction; -function readDataRLE(reader, pixelData, _width, height, step, offsets, large) { - var data = pixelData && pixelData.data; - var lengths; - if (large) { - lengths = new Uint32Array(offsets.length * height); - for (var o = 0, li = 0; o < offsets.length; o++) { - for (var y = 0; y < height; y++, li++) { - lengths[li] = readUint32(reader); - } - } - } - else { - lengths = new Uint16Array(offsets.length * height); - for (var o = 0, li = 0; o < offsets.length; o++) { - for (var y = 0; y < height; y++, li++) { - lengths[li] = readUint16(reader); - } - } - } - var extraLimit = (step - 1) | 0; // 3 for rgb, 4 for cmyk - for (var c = 0, li = 0; c < offsets.length; c++) { - var offset = offsets[c] | 0; - var extra = c > extraLimit || offset > extraLimit; - if (!data || extra) { - for (var y = 0; y < height; y++, li++) { - skipBytes(reader, lengths[li]); - } - } - else { - for (var y = 0, p = offset | 0; y < height; y++, li++) { - var length_1 = lengths[li]; - var buffer = readBytes(reader, length_1); - for (var i = 0; i < length_1; i++) { - var header = buffer[i]; - if (header > 128) { - var value = buffer[++i]; - header = (256 - header) | 0; - for (var j = 0; j <= header; j = (j + 1) | 0) { - data[p] = value; - p = (p + step) | 0; - } - } - else if (header < 128) { - for (var j = 0; j <= header; j = (j + 1) | 0) { - data[p] = buffer[++i]; - p = (p + step) | 0; - } - } - else { - // ignore 128 - } - // This showed up on some images from non-photoshop programs, ignoring it seems to work just fine. - // if (i >= length) throw new Error(`Invalid RLE data: exceeded buffer size ${i}/${length}`); - } - } - } - } -} -exports.readDataRLE = readDataRLE; -function readSection(reader, round, func, skipEmpty, eightBytes) { - if (skipEmpty === void 0) { skipEmpty = true; } - if (eightBytes === void 0) { eightBytes = false; } - var length = readUint32(reader); - if (eightBytes) { - if (length !== 0) - throw new Error('Sizes larger than 4GB are not supported'); - length = readUint32(reader); - } - if (length <= 0 && skipEmpty) - return undefined; - var end = reader.offset + length; - if (end > reader.view.byteLength) - throw new Error('Section exceeds file size'); - var result = func(function () { return end - reader.offset; }); - if (reader.offset !== end) { - if (reader.offset > end) { - warnOrThrow(reader, 'Exceeded section limits'); - } - else { - warnOrThrow(reader, "Unread section data"); // : ${end - reader.offset} bytes at 0x${reader.offset.toString(16)}`); - } - } - while (end % round) - end++; - reader.offset = end; - return result; -} -exports.readSection = readSection; -function readColor(reader) { - var colorSpace = readUint16(reader); - switch (colorSpace) { - case 0 /* ColorSpace.RGB */: { - var r = readUint16(reader) / 257; - var g = readUint16(reader) / 257; - var b = readUint16(reader) / 257; - skipBytes(reader, 2); - return { r: r, g: g, b: b }; - } - case 1 /* ColorSpace.HSB */: { - var h = readUint16(reader) / 0xffff; - var s = readUint16(reader) / 0xffff; - var b = readUint16(reader) / 0xffff; - skipBytes(reader, 2); - return { h: h, s: s, b: b }; - } - case 2 /* ColorSpace.CMYK */: { - var c = readUint16(reader) / 257; - var m = readUint16(reader) / 257; - var y = readUint16(reader) / 257; - var k = readUint16(reader) / 257; - return { c: c, m: m, y: y, k: k }; - } - case 7 /* ColorSpace.Lab */: { - var l = readInt16(reader) / 10000; - var ta = readInt16(reader); - var tb = readInt16(reader); - var a = ta < 0 ? (ta / 12800) : (ta / 12700); - var b = tb < 0 ? (tb / 12800) : (tb / 12700); - skipBytes(reader, 2); - return { l: l, a: a, b: b }; - } - case 8 /* ColorSpace.Grayscale */: { - var k = readUint16(reader) * 255 / 10000; - skipBytes(reader, 6); - return { k: k }; - } - default: - throw new Error('Invalid color space'); - } -} -exports.readColor = readColor; -function readPattern(reader) { - readUint32(reader); // length - var version = readUint32(reader); - if (version !== 1) - throw new Error("Invalid pattern version: ".concat(version)); - var colorMode = readUint32(reader); - var x = readInt16(reader); - var y = readInt16(reader); - // we only support RGB and grayscale for now - if (colorMode !== 3 /* ColorMode.RGB */ && colorMode !== 1 /* ColorMode.Grayscale */ && colorMode !== 2 /* ColorMode.Indexed */) { - throw new Error("Unsupported pattern color mode: ".concat(colorMode)); - } - var name = readUnicodeString(reader); - var id = readPascalString(reader, 1); - var palette = []; - if (colorMode === 2 /* ColorMode.Indexed */) { - for (var i = 0; i < 256; i++) { - palette.push({ - r: readUint8(reader), - g: readUint8(reader), - b: readUint8(reader), - }); - } - skipBytes(reader, 4); // no idea what this is - } - // virtual memory array list - var version2 = readUint32(reader); - if (version2 !== 3) - throw new Error("Invalid pattern VMAL version: ".concat(version2)); - readUint32(reader); // length - var top = readUint32(reader); - var left = readUint32(reader); - var bottom = readUint32(reader); - var right = readUint32(reader); - var channelsCount = readUint32(reader); - var width = right - left; - var height = bottom - top; - var data = new Uint8Array(width * height * 4); - for (var i = 3; i < data.byteLength; i += 4) { - data[i] = 255; - } - for (var i = 0, ch = 0; i < (channelsCount + 2); i++) { - var has = readUint32(reader); - if (!has) - continue; - var length_2 = readUint32(reader); - var pixelDepth = readUint32(reader); - var ctop = readUint32(reader); - var cleft = readUint32(reader); - var cbottom = readUint32(reader); - var cright = readUint32(reader); - var pixelDepth2 = readUint16(reader); - var compressionMode = readUint8(reader); // 0 - raw, 1 - zip - var dataLength = length_2 - (4 + 16 + 2 + 1); - var cdata = readBytes(reader, dataLength); - if (pixelDepth !== 8 || pixelDepth2 !== 8) { - throw new Error('16bit pixel depth not supported for patterns'); - } - var w = cright - cleft; - var h = cbottom - ctop; - var ox = cleft - left; - var oy = ctop - top; - if (compressionMode === 0) { - if (colorMode === 3 /* ColorMode.RGB */ && ch < 3) { - for (var y_1 = 0; y_1 < h; y_1++) { - for (var x_1 = 0; x_1 < w; x_1++) { - var src = x_1 + y_1 * w; - var dst = (ox + x_1 + (y_1 + oy) * width) * 4; - data[dst + ch] = cdata[src]; - } - } - } - if (colorMode === 1 /* ColorMode.Grayscale */ && ch < 1) { - for (var y_2 = 0; y_2 < h; y_2++) { - for (var x_2 = 0; x_2 < w; x_2++) { - var src = x_2 + y_2 * w; - var dst = (ox + x_2 + (y_2 + oy) * width) * 4; - var value = cdata[src]; - data[dst + 0] = value; - data[dst + 1] = value; - data[dst + 2] = value; - } - } - } - if (colorMode === 2 /* ColorMode.Indexed */) { - // TODO: - throw new Error('Indexed pattern color mode not implemented'); - } - } - else if (compressionMode === 1) { - // console.log({ colorMode }); - // require('fs').writeFileSync('zip.bin', Buffer.from(cdata)); - // const data = require('zlib').inflateRawSync(cdata); - // const data = require('zlib').unzipSync(cdata); - // console.log(data); - // throw new Error('Zip compression not supported for pattern'); - // throw new Error('Unsupported pattern compression'); - console.error('Unsupported pattern compression'); - name += ' (failed to decode)'; - } - else { - throw new Error('Invalid pattern compression mode'); - } - ch++; - } - // TODO: use canvas instead of data ? - return { id: id, name: name, x: x, y: y, bounds: { x: left, y: top, w: width, h: height }, data: data }; -} -exports.readPattern = readPattern; -//# sourceMappingURL=psdReader.js.map \ No newline at end of file +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readPattern = exports.readColor = exports.readSection = exports.readDataRLE = exports.readDataZipWithoutPrediction = exports.readPsd = exports.checkSignature = exports.skipBytes = exports.readAsciiString = exports.readUnicodeStringWithLength = exports.readUnicodeString = exports.readPascalString = exports.readSignature = exports.readBytes = exports.readFixedPointPath32 = exports.readFixedPoint32 = exports.readFloat64 = exports.readFloat32 = exports.readUint32 = exports.readInt32LE = exports.readInt32 = exports.readUint16 = exports.readInt16 = exports.peekUint8 = exports.readUint8 = exports.warnOrThrow = exports.createReader = exports.supportedColorModes = void 0; +var pako_1 = require("pako"); +var helpers_1 = require("./helpers"); +var additionalInfo_1 = require("./additionalInfo"); +var imageResources_1 = require("./imageResources"); +exports.supportedColorModes = [0 /* ColorMode.Bitmap */, 1 /* ColorMode.Grayscale */, 3 /* ColorMode.RGB */]; +var colorModes = ['bitmap', 'grayscale', 'indexed', 'RGB', 'CMYK', 'multichannel', 'duotone', 'lab']; +function setupGrayscale(data) { + var size = data.width * data.height * 4; + for (var i = 0; i < size; i += 4) { + data.data[i + 1] = data.data[i]; + data.data[i + 2] = data.data[i]; + } +} +function createReader(buffer, offset, length) { + var view = new DataView(buffer, offset, length); + return { view: view, offset: 0, strict: false, debug: false }; +} +exports.createReader = createReader; +function warnOrThrow(reader, message) { + if (reader.strict) + throw new Error(message); + if (reader.debug) + console.warn(message); +} +exports.warnOrThrow = warnOrThrow; +function readUint8(reader) { + reader.offset += 1; + return reader.view.getUint8(reader.offset - 1); +} +exports.readUint8 = readUint8; +function peekUint8(reader) { + return reader.view.getUint8(reader.offset); +} +exports.peekUint8 = peekUint8; +function readInt16(reader) { + reader.offset += 2; + return reader.view.getInt16(reader.offset - 2, false); +} +exports.readInt16 = readInt16; +function readUint16(reader) { + reader.offset += 2; + return reader.view.getUint16(reader.offset - 2, false); +} +exports.readUint16 = readUint16; +function readInt32(reader) { + reader.offset += 4; + return reader.view.getInt32(reader.offset - 4, false); +} +exports.readInt32 = readInt32; +function readInt32LE(reader) { + reader.offset += 4; + return reader.view.getInt32(reader.offset - 4, true); +} +exports.readInt32LE = readInt32LE; +function readUint32(reader) { + reader.offset += 4; + return reader.view.getUint32(reader.offset - 4, false); +} +exports.readUint32 = readUint32; +function readFloat32(reader) { + reader.offset += 4; + return reader.view.getFloat32(reader.offset - 4, false); +} +exports.readFloat32 = readFloat32; +function readFloat64(reader) { + reader.offset += 8; + return reader.view.getFloat64(reader.offset - 8, false); +} +exports.readFloat64 = readFloat64; +// 32-bit fixed-point number 16.16 +function readFixedPoint32(reader) { + return readInt32(reader) / (1 << 16); +} +exports.readFixedPoint32 = readFixedPoint32; +// 32-bit fixed-point number 8.24 +function readFixedPointPath32(reader) { + return readInt32(reader) / (1 << 24); +} +exports.readFixedPointPath32 = readFixedPointPath32; +function readBytes(reader, length) { + var start = reader.view.byteOffset + reader.offset; + reader.offset += length; + if ((start + length) > reader.view.buffer.byteLength) { + // fix for broken PSD files that are missing part of file at the end + warnOrThrow(reader, 'Reading bytes exceeding buffer length'); + if (length > (100 * 1024 * 1024)) + throw new Error('Reading past end of file'); // limit to 100MB + var result = new Uint8Array(length); + var len = Math.min(length, reader.view.byteLength - start); + if (len > 0) + result.set(new Uint8Array(reader.view.buffer, start, len)); + return result; + } + else { + return new Uint8Array(reader.view.buffer, start, length); + } +} +exports.readBytes = readBytes; +function readSignature(reader) { + return readShortString(reader, 4); +} +exports.readSignature = readSignature; +function readPascalString(reader, padTo) { + var length = readUint8(reader); + var text = length ? readShortString(reader, length) : ''; + while (++length % padTo) { + reader.offset++; + } + return text; +} +exports.readPascalString = readPascalString; +function readUnicodeString(reader) { + var length = readUint32(reader); + return readUnicodeStringWithLength(reader, length); +} +exports.readUnicodeString = readUnicodeString; +function readUnicodeStringWithLength(reader, length) { + var text = ''; + while (length--) { + var value = readUint16(reader); + if (value || length > 0) { // remove trailing \0 + text += String.fromCharCode(value); + } + } + return text; +} +exports.readUnicodeStringWithLength = readUnicodeStringWithLength; +function readAsciiString(reader, length) { + var text = ''; + while (length--) { + text += String.fromCharCode(readUint8(reader)); + } + return text; +} +exports.readAsciiString = readAsciiString; +function skipBytes(reader, count) { + reader.offset += count; +} +exports.skipBytes = skipBytes; +function checkSignature(reader, a, b) { + var offset = reader.offset; + var signature = readSignature(reader); + if (signature !== a && signature !== b) { + throw new Error("Invalid signature: '".concat(signature, "' at 0x").concat(offset.toString(16))); + } +} +exports.checkSignature = checkSignature; +function readShortString(reader, length) { + var buffer = readBytes(reader, length); + var result = ''; + for (var i = 0; i < buffer.length; i++) { + result += String.fromCharCode(buffer[i]); + } + return result; +} +function isValidSignature(sig) { + return sig === '8BIM' || sig === 'MeSa' || sig === 'AgHg' || sig === 'PHUT' || sig === 'DCSR'; +} +function readPsd(reader, options) { + var _a; + if (options === void 0) { options = {}; } + // header + checkSignature(reader, '8BPS'); + var version = readUint16(reader); + if (version !== 1 && version !== 2) + throw new Error("Invalid PSD file version: ".concat(version)); + skipBytes(reader, 6); + var channels = readUint16(reader); + var height = readUint32(reader); + var width = readUint32(reader); + var bitsPerChannel = readUint16(reader); + var colorMode = readUint16(reader); + var maxSize = version === 1 ? 30000 : 300000; + if (width > maxSize || height > maxSize) + throw new Error("Invalid size"); + if (channels > 16) + throw new Error("Invalid channel count"); + if (bitsPerChannel > 32) + throw new Error("Invalid bitsPerChannel count"); + if (exports.supportedColorModes.indexOf(colorMode) === -1) + throw new Error("Color mode not supported: ".concat((_a = colorModes[colorMode]) !== null && _a !== void 0 ? _a : colorMode)); + var psd = { width: width, height: height, channels: channels, bitsPerChannel: bitsPerChannel, colorMode: colorMode }; + var opt = __assign(__assign({}, options), { large: version === 2 }); + var fixOffsets = [0, 1, -1, 2, -2, 3, -3, 4, -4]; + // color mode data + readSection(reader, 1, function (left) { + if (opt.throwForMissingFeatures) + throw new Error('Color mode data not supported'); + skipBytes(reader, left()); + }); + // image resources + readSection(reader, 1, function (left) { + var _loop_1 = function () { + var sigOffset = reader.offset; + var sig = ''; + // attempt to fix broken document by realigning with the signature + for (var _i = 0, fixOffsets_1 = fixOffsets; _i < fixOffsets_1.length; _i++) { + var offset = fixOffsets_1[_i]; + try { + reader.offset = sigOffset + offset; + sig = readSignature(reader); + } + catch (_a) { } + if (isValidSignature(sig)) + break; + } + if (!isValidSignature(sig)) { + throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((sigOffset).toString(16))); + } + var id = readUint16(reader); + readPascalString(reader, 2); // name + readSection(reader, 2, function (left) { + var handler = imageResources_1.resourceHandlersMap[id]; + var skip = id === 1036 && !!opt.skipThumbnail; + if (!psd.imageResources) { + psd.imageResources = {}; + } + if (handler && !skip) { + try { + handler.read(reader, psd.imageResources, left, opt); + } + catch (e) { + if (opt.throwForMissingFeatures) + throw e; + skipBytes(reader, left()); + } + } + else { + // options.logMissingFeatures && console.log(`Unhandled image resource: ${id}`); + skipBytes(reader, left()); + } + }); + }; + while (left()) { + _loop_1(); + } + }); + // layer and mask info + var globalAlpha = false; + readSection(reader, 1, function (left) { + globalAlpha = readLayerInfo(reader, psd, opt); + // SAI does not include this section + if (left() > 0) { + var globalLayerMaskInfo = readGlobalLayerMaskInfo(reader); + if (globalLayerMaskInfo) + psd.globalLayerMaskInfo = globalLayerMaskInfo; + } + else { + // revert back to end of section if exceeded section limits + // opt.logMissingFeatures && console.log('reverting to end of section'); + skipBytes(reader, left()); + } + while (left() > 0) { + // sometimes there are empty bytes here + while (left() && peekUint8(reader) === 0) { + // opt.logMissingFeatures && console.log('skipping 0 byte'); + skipBytes(reader, 1); + } + if (left() >= 12) { + readAdditionalLayerInfo(reader, psd, psd, opt); + } + else { + // opt.logMissingFeatures && console.log('skipping leftover bytes', left()); + skipBytes(reader, left()); + } + } + }, undefined, opt.large); + var hasChildren = psd.children && psd.children.length; + var skipComposite = opt.skipCompositeImageData && (opt.skipLayerImageData || hasChildren); + if (!skipComposite) { + readImageData(reader, psd, globalAlpha, opt); + } + // TODO: show converted color mode instead of original PSD file color mode + // but add option to preserve file color mode (need to return image data instead of canvas in that case) + // psd.colorMode = ColorMode.RGB; // we convert all color modes to RGB + return psd; +} +exports.readPsd = readPsd; +function readLayerInfo(reader, psd, options) { + var globalAlpha = false; + readSection(reader, 2, function (left) { + var layerCount = readInt16(reader); + if (layerCount < 0) { + globalAlpha = true; + layerCount = -layerCount; + } + var layers = []; + var layerChannels = []; + for (var i = 0; i < layerCount; i++) { + var _a = readLayerRecord(reader, psd, options), layer = _a.layer, channels = _a.channels; + layers.push(layer); + layerChannels.push(channels); + } + if (!options.skipLayerImageData) { + for (var i = 0; i < layerCount; i++) { + readLayerChannelImageData(reader, psd, layers[i], layerChannels[i], options); + } + } + skipBytes(reader, left()); + if (!psd.children) + psd.children = []; + var stack = [psd]; + for (var i = layers.length - 1; i >= 0; i--) { + var l = layers[i]; + var type = l.sectionDivider ? l.sectionDivider.type : 0 /* SectionDividerType.Other */; + if (type === 1 /* SectionDividerType.OpenFolder */ || type === 2 /* SectionDividerType.ClosedFolder */) { + l.opened = type === 1 /* SectionDividerType.OpenFolder */; + l.children = []; + stack[stack.length - 1].children.unshift(l); + stack.push(l); + } + else if (type === 3 /* SectionDividerType.BoundingSectionDivider */) { + stack.pop(); + // this was workaround because I didn't know what `lsdk` section was, now it's probably not needed anymore + // } else if (l.name === '' && !l.sectionDivider && !l.top && !l.left && !l.bottom && !l.right) { + // // sometimes layer group terminator doesn't have sectionDivider, so we just guess here (PS bug ?) + // stack.pop(); + } + else { + stack[stack.length - 1].children.unshift(l); + } + } + }, undefined, options.large); + return globalAlpha; +} +function readLayerRecord(reader, psd, options) { + var layer = {}; + layer.top = readInt32(reader); + layer.left = readInt32(reader); + layer.bottom = readInt32(reader); + layer.right = readInt32(reader); + var channelCount = readUint16(reader); + var channels = []; + for (var i = 0; i < channelCount; i++) { + var channelID = readInt16(reader); + var channelLength = readUint32(reader); + if (options.large) { + if (channelLength !== 0) + throw new Error('Sizes larger than 4GB are not supported'); + channelLength = readUint32(reader); + } + channels.push({ id: channelID, length: channelLength }); + } + checkSignature(reader, '8BIM'); + var blendMode = readSignature(reader); + if (!helpers_1.toBlendMode[blendMode]) + throw new Error("Invalid blend mode: '".concat(blendMode, "'")); + layer.blendMode = helpers_1.toBlendMode[blendMode]; + layer.opacity = readUint8(reader) / 0xff; + layer.clipping = readUint8(reader) === 1; + var flags = readUint8(reader); + layer.transparencyProtected = (flags & 0x01) !== 0; + layer.hidden = (flags & 0x02) !== 0; + // 0x04 - obsolete + // 0x08 - 1 for Photoshop 5.0 and later, tells if bit 4 has useful information + // 0x10 - pixel data irrelevant to appearance of document + // 0x20 - ??? + // if (flags & 0x20) (layer as any)._2 = true; // TEMP !!!! + skipBytes(reader, 1); + readSection(reader, 1, function (left) { + var mask = readLayerMaskData(reader, options); + if (mask) + layer.mask = mask; + /*const blendingRanges =*/ readLayerBlendingRanges(reader); + layer.name = readPascalString(reader, 4); + while (left()) { + readAdditionalLayerInfo(reader, layer, psd, options); + } + }); + return { layer: layer, channels: channels }; +} +function readLayerMaskData(reader, options) { + return readSection(reader, 1, function (left) { + if (!left()) + return undefined; + var mask = {}; + mask.top = readInt32(reader); + mask.left = readInt32(reader); + mask.bottom = readInt32(reader); + mask.right = readInt32(reader); + mask.defaultColor = readUint8(reader); + var flags = readUint8(reader); + mask.positionRelativeToLayer = (flags & 1 /* LayerMaskFlags.PositionRelativeToLayer */) !== 0; + mask.disabled = (flags & 2 /* LayerMaskFlags.LayerMaskDisabled */) !== 0; + mask.fromVectorData = (flags & 8 /* LayerMaskFlags.LayerMaskFromRenderingOtherData */) !== 0; + if (flags & 16 /* LayerMaskFlags.MaskHasParametersAppliedToIt */) { + var params = readUint8(reader); + if (params & 1 /* MaskParams.UserMaskDensity */) + mask.userMaskDensity = readUint8(reader) / 0xff; + if (params & 2 /* MaskParams.UserMaskFeather */) + mask.userMaskFeather = readFloat64(reader); + if (params & 4 /* MaskParams.VectorMaskDensity */) + mask.vectorMaskDensity = readUint8(reader) / 0xff; + if (params & 8 /* MaskParams.VectorMaskFeather */) + mask.vectorMaskFeather = readFloat64(reader); + } + if (left() > 2) { + options.logMissingFeatures && console.log('Unhandled extra mask params'); + // TODO: handle these values + /*const realFlags =*/ readUint8(reader); + /*const realUserMaskBackground =*/ readUint8(reader); + /*const top2 =*/ readInt32(reader); + /*const left2 =*/ readInt32(reader); + /*const bottom2 =*/ readInt32(reader); + /*const right2 =*/ readInt32(reader); + } + skipBytes(reader, left()); + return mask; + }); +} +function readLayerBlendingRanges(reader) { + return readSection(reader, 1, function (left) { + var compositeGrayBlendSource = readUint32(reader); + var compositeGraphBlendDestinationRange = readUint32(reader); + var ranges = []; + while (left()) { + var sourceRange = readUint32(reader); + var destRange = readUint32(reader); + ranges.push({ sourceRange: sourceRange, destRange: destRange }); + } + return { compositeGrayBlendSource: compositeGrayBlendSource, compositeGraphBlendDestinationRange: compositeGraphBlendDestinationRange, ranges: ranges }; + }); +} +function readLayerChannelImageData(reader, psd, layer, channels, options) { + var layerWidth = (layer.right || 0) - (layer.left || 0); + var layerHeight = (layer.bottom || 0) - (layer.top || 0); + var cmyk = psd.colorMode === 4 /* ColorMode.CMYK */; + var imageData; + if (layerWidth && layerHeight) { + if (cmyk) { + imageData = { width: layerWidth, height: layerHeight, data: new Uint8ClampedArray(layerWidth * layerHeight * 5) }; + for (var p = 4; p < imageData.data.byteLength; p += 5) + imageData.data[p] = 255; + } + else { + imageData = (0, helpers_1.createImageData)(layerWidth, layerHeight); + (0, helpers_1.resetImageData)(imageData); + } + } + if (helpers_1.RAW_IMAGE_DATA) + layer.imageDataRaw = []; + for (var _i = 0, channels_1 = channels; _i < channels_1.length; _i++) { + var channel = channels_1[_i]; + if (channel.length === 0) + continue; + if (channel.length < 2) + throw new Error('Invalid channel length'); + var start = reader.offset; + var compression = readUint16(reader); + if (channel.id === -2 /* ChannelID.UserMask */) { + var mask = layer.mask; + if (!mask) + throw new Error("Missing layer mask data"); + var maskWidth = (mask.right || 0) - (mask.left || 0); + var maskHeight = (mask.bottom || 0) - (mask.top || 0); + if (maskWidth && maskHeight) { + var maskData = (0, helpers_1.createImageData)(maskWidth, maskHeight); + (0, helpers_1.resetImageData)(maskData); + var start_1 = reader.offset; + readData(reader, channel.length, maskData, compression, maskWidth, maskHeight, 0, options.large, 4); + if (helpers_1.RAW_IMAGE_DATA) { + layer.maskDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start_1, reader.offset - start_1); + } + setupGrayscale(maskData); + if (options.useImageData) { + mask.imageData = maskData; + } + else { + mask.canvas = (0, helpers_1.createCanvas)(maskWidth, maskHeight); + mask.canvas.getContext('2d').putImageData(maskData, 0, 0); + } + } + } + else { + var offset = (0, helpers_1.offsetForChannel)(channel.id, cmyk); + var targetData = imageData; + if (offset < 0) { + targetData = undefined; + if (options.throwForMissingFeatures) { + throw new Error("Channel not supported: ".concat(channel.id)); + } + } + readData(reader, channel.length, targetData, compression, layerWidth, layerHeight, offset, options.large, cmyk ? 5 : 4); + if (helpers_1.RAW_IMAGE_DATA) { + layer.imageDataRaw[channel.id] = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start + 2, channel.length - 2); + } + reader.offset = start + channel.length; + if (targetData && psd.colorMode === 1 /* ColorMode.Grayscale */) { + setupGrayscale(targetData); + } + } + } + if (imageData) { + if (cmyk) { + var cmykData = imageData; + imageData = (0, helpers_1.createImageData)(cmykData.width, cmykData.height); + cmykToRgb(cmykData, imageData, false); + } + if (options.useImageData) { + layer.imageData = imageData; + } + else { + layer.canvas = (0, helpers_1.createCanvas)(layerWidth, layerHeight); + layer.canvas.getContext('2d').putImageData(imageData, 0, 0); + } + } +} +function readData(reader, length, data, compression, width, height, offset, large, step) { + if (compression === 0 /* Compression.RawData */) { + readDataRaw(reader, data, width, height, step, offset); + } + else if (compression === 1 /* Compression.RleCompressed */) { + readDataRLE(reader, data, width, height, step, [offset], large); + } + else if (compression === 2 /* Compression.ZipWithoutPrediction */) { + readDataZipWithoutPrediction(reader, length, data, width, height, step, offset); + } + else if (compression === 3 /* Compression.ZipWithPrediction */) { + throw new Error("Compression type not supported: ".concat(compression)); + } + else { + throw new Error("Invalid Compression type: ".concat(compression)); + } +} +function readGlobalLayerMaskInfo(reader) { + return readSection(reader, 1, function (left) { + if (!left()) + return undefined; + var overlayColorSpace = readUint16(reader); + var colorSpace1 = readUint16(reader); + var colorSpace2 = readUint16(reader); + var colorSpace3 = readUint16(reader); + var colorSpace4 = readUint16(reader); + var opacity = readUint16(reader) / 0xff; + var kind = readUint8(reader); + skipBytes(reader, left()); // 3 bytes of padding ? + return { overlayColorSpace: overlayColorSpace, colorSpace1: colorSpace1, colorSpace2: colorSpace2, colorSpace3: colorSpace3, colorSpace4: colorSpace4, opacity: opacity, kind: kind }; + }); +} +function readAdditionalLayerInfo(reader, target, psd, options) { + var sig = readSignature(reader); + if (sig !== '8BIM' && sig !== '8B64') + throw new Error("Invalid signature: '".concat(sig, "' at 0x").concat((reader.offset - 4).toString(16))); + var key = readSignature(reader); + // `largeAdditionalInfoKeys` fallback, because some keys don't have 8B64 signature even when they are 64bit + var u64 = sig === '8B64' || (options.large && helpers_1.largeAdditionalInfoKeys.indexOf(key) !== -1); + readSection(reader, 2, function (left) { + var handler = additionalInfo_1.infoHandlersMap[key]; + if (handler) { + try { + handler.read(reader, target, left, psd, options); + } + catch (e) { + if (options.throwForMissingFeatures) + throw e; + } + } + else { + options.logMissingFeatures && console.log("Unhandled additional info: ".concat(key)); + skipBytes(reader, left()); + } + if (left()) { + options.logMissingFeatures && console.log("Unread ".concat(left(), " bytes left for additional info: ").concat(key)); + skipBytes(reader, left()); + } + }, false, u64); +} +function readImageData(reader, psd, globalAlpha, options) { + var compression = readUint16(reader); + if (exports.supportedColorModes.indexOf(psd.colorMode) === -1) + throw new Error("Color mode not supported: ".concat(psd.colorMode)); + if (compression !== 0 /* Compression.RawData */ && compression !== 1 /* Compression.RleCompressed */) + throw new Error("Compression type not supported: ".concat(compression)); + var imageData = (0, helpers_1.createImageData)(psd.width, psd.height); + (0, helpers_1.resetImageData)(imageData); + switch (psd.colorMode) { + case 0 /* ColorMode.Bitmap */: { + var bytes = void 0; + if (compression === 0 /* Compression.RawData */) { + bytes = readBytes(reader, Math.ceil(psd.width / 8) * psd.height); + } + else if (compression === 1 /* Compression.RleCompressed */) { + bytes = new Uint8Array(psd.width * psd.height); + readDataRLE(reader, { data: bytes, width: psd.width, height: psd.height }, psd.width, psd.height, 1, [0], options.large); + } + else { + throw new Error("Bitmap compression not supported: ".concat(compression)); + } + (0, helpers_1.decodeBitmap)(bytes, imageData.data, psd.width, psd.height); + break; + } + case 3 /* ColorMode.RGB */: + case 1 /* ColorMode.Grayscale */: { + var channels = psd.colorMode === 1 /* ColorMode.Grayscale */ ? [0] : [0, 1, 2]; + if (psd.channels && psd.channels > 3) { + for (var i = 3; i < psd.channels; i++) { + // TODO: store these channels in additional image data + channels.push(i); + } + } + else if (globalAlpha) { + channels.push(3); + } + if (compression === 0 /* Compression.RawData */) { + for (var i = 0; i < channels.length; i++) { + readDataRaw(reader, imageData, psd.width, psd.height, 4, channels[i]); + } + } + else if (compression === 1 /* Compression.RleCompressed */) { + var start = reader.offset; + readDataRLE(reader, imageData, psd.width, psd.height, 4, channels, options.large); + if (helpers_1.RAW_IMAGE_DATA) + psd.imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); + } + if (psd.colorMode === 1 /* ColorMode.Grayscale */) { + setupGrayscale(imageData); + } + break; + } + case 4 /* ColorMode.CMYK */: { + if (psd.channels !== 4) + throw new Error("Invalid channel count"); + var channels = [0, 1, 2, 3]; + if (globalAlpha) + channels.push(4); + if (compression === 0 /* Compression.RawData */) { + throw new Error("Not implemented"); + // TODO: ... + // for (let i = 0; i < channels.length; i++) { + // readDataRaw(reader, imageData, channels[i], psd.width, psd.height); + // } + } + else if (compression === 1 /* Compression.RleCompressed */) { + var cmykImageData = { + width: imageData.width, + height: imageData.height, + data: new Uint8Array(imageData.width * imageData.height * 5), + }; + var start = reader.offset; + readDataRLE(reader, cmykImageData, psd.width, psd.height, 5, channels, options.large); + cmykToRgb(cmykImageData, imageData, true); + if (helpers_1.RAW_IMAGE_DATA) + psd.imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); + } + break; + } + default: throw new Error("Color mode not supported: ".concat(psd.colorMode)); + } + if (options.useImageData) { + psd.imageData = imageData; + } + else { + psd.canvas = (0, helpers_1.createCanvas)(psd.width, psd.height); + psd.canvas.getContext('2d').putImageData(imageData, 0, 0); + } +} +function cmykToRgb(cmyk, rgb, reverseAlpha) { + var size = rgb.width * rgb.height * 4; + var srcData = cmyk.data; + var dstData = rgb.data; + for (var src = 0, dst = 0; dst < size; src += 5, dst += 4) { + var c = srcData[src]; + var m = srcData[src + 1]; + var y = srcData[src + 2]; + var k = srcData[src + 3]; + dstData[dst] = ((((c * k) | 0) / 255) | 0); + dstData[dst + 1] = ((((m * k) | 0) / 255) | 0); + dstData[dst + 2] = ((((y * k) | 0) / 255) | 0); + dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; + } + // for (let src = 0, dst = 0; dst < size; src += 5, dst += 4) { + // const c = 1 - (srcData[src + 0] / 255); + // const m = 1 - (srcData[src + 1] / 255); + // const y = 1 - (srcData[src + 2] / 255); + // // const k = srcData[src + 3] / 255; + // dstData[dst + 0] = ((1 - c * 0.8) * 255) | 0; + // dstData[dst + 1] = ((1 - m * 0.8) * 255) | 0; + // dstData[dst + 2] = ((1 - y * 0.8) * 255) | 0; + // dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; + // } +} +function readDataRaw(reader, pixelData, width, height, step, offset) { + var size = width * height; + var buffer = readBytes(reader, size); + if (pixelData && offset < step) { + var data = pixelData.data; + for (var i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { + data[p] = buffer[i]; + } + } +} +function readDataZipWithoutPrediction(reader, length, pixelData, width, height, step, offset) { + var compressed = readBytes(reader, length); + var decompressed = (0, pako_1.inflate)(compressed); + var size = width * height; + if (pixelData && offset < step) { + var data = pixelData.data; + for (var i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { + data[p] = decompressed[i]; + } + } +} +exports.readDataZipWithoutPrediction = readDataZipWithoutPrediction; +function readDataRLE(reader, pixelData, _width, height, step, offsets, large) { + var data = pixelData && pixelData.data; + var lengths; + if (large) { + lengths = new Uint32Array(offsets.length * height); + for (var o = 0, li = 0; o < offsets.length; o++) { + for (var y = 0; y < height; y++, li++) { + lengths[li] = readUint32(reader); + } + } + } + else { + lengths = new Uint16Array(offsets.length * height); + for (var o = 0, li = 0; o < offsets.length; o++) { + for (var y = 0; y < height; y++, li++) { + lengths[li] = readUint16(reader); + } + } + } + var extraLimit = (step - 1) | 0; // 3 for rgb, 4 for cmyk + for (var c = 0, li = 0; c < offsets.length; c++) { + var offset = offsets[c] | 0; + var extra = c > extraLimit || offset > extraLimit; + if (!data || extra) { + for (var y = 0; y < height; y++, li++) { + skipBytes(reader, lengths[li]); + } + } + else { + for (var y = 0, p = offset | 0; y < height; y++, li++) { + var length_1 = lengths[li]; + var buffer = readBytes(reader, length_1); + for (var i = 0; i < length_1; i++) { + var header = buffer[i]; + if (header > 128) { + var value = buffer[++i]; + header = (256 - header) | 0; + for (var j = 0; j <= header; j = (j + 1) | 0) { + data[p] = value; + p = (p + step) | 0; + } + } + else if (header < 128) { + for (var j = 0; j <= header; j = (j + 1) | 0) { + data[p] = buffer[++i]; + p = (p + step) | 0; + } + } + else { + // ignore 128 + } + // This showed up on some images from non-photoshop programs, ignoring it seems to work just fine. + // if (i >= length) throw new Error(`Invalid RLE data: exceeded buffer size ${i}/${length}`); + } + } + } + } +} +exports.readDataRLE = readDataRLE; +function readSection(reader, round, func, skipEmpty, eightBytes) { + if (skipEmpty === void 0) { skipEmpty = true; } + if (eightBytes === void 0) { eightBytes = false; } + var length = readUint32(reader); + if (eightBytes) { + if (length !== 0) + throw new Error('Sizes larger than 4GB are not supported'); + length = readUint32(reader); + } + if (length <= 0 && skipEmpty) + return undefined; + var end = reader.offset + length; + if (end > reader.view.byteLength) + throw new Error('Section exceeds file size'); + var result = func(function () { return end - reader.offset; }); + if (reader.offset !== end) { + if (reader.offset > end) { + warnOrThrow(reader, 'Exceeded section limits'); + } + else { + warnOrThrow(reader, "Unread section data"); // : ${end - reader.offset} bytes at 0x${reader.offset.toString(16)}`); + } + } + while (end % round) + end++; + reader.offset = end; + return result; +} +exports.readSection = readSection; +function readColor(reader) { + var colorSpace = readUint16(reader); + switch (colorSpace) { + case 0 /* ColorSpace.RGB */: { + var r = readUint16(reader) / 257; + var g = readUint16(reader) / 257; + var b = readUint16(reader) / 257; + skipBytes(reader, 2); + return { r: r, g: g, b: b }; + } + case 1 /* ColorSpace.HSB */: { + var h = readUint16(reader) / 0xffff; + var s = readUint16(reader) / 0xffff; + var b = readUint16(reader) / 0xffff; + skipBytes(reader, 2); + return { h: h, s: s, b: b }; + } + case 2 /* ColorSpace.CMYK */: { + var c = readUint16(reader) / 257; + var m = readUint16(reader) / 257; + var y = readUint16(reader) / 257; + var k = readUint16(reader) / 257; + return { c: c, m: m, y: y, k: k }; + } + case 7 /* ColorSpace.Lab */: { + var l = readInt16(reader) / 10000; + var ta = readInt16(reader); + var tb = readInt16(reader); + var a = ta < 0 ? (ta / 12800) : (ta / 12700); + var b = tb < 0 ? (tb / 12800) : (tb / 12700); + skipBytes(reader, 2); + return { l: l, a: a, b: b }; + } + case 8 /* ColorSpace.Grayscale */: { + var k = readUint16(reader) * 255 / 10000; + skipBytes(reader, 6); + return { k: k }; + } + default: + throw new Error('Invalid color space'); + } +} +exports.readColor = readColor; +function readPattern(reader) { + readUint32(reader); // length + var version = readUint32(reader); + if (version !== 1) + throw new Error("Invalid pattern version: ".concat(version)); + var colorMode = readUint32(reader); + var x = readInt16(reader); + var y = readInt16(reader); + // we only support RGB and grayscale for now + if (colorMode !== 3 /* ColorMode.RGB */ && colorMode !== 1 /* ColorMode.Grayscale */ && colorMode !== 2 /* ColorMode.Indexed */) { + throw new Error("Unsupported pattern color mode: ".concat(colorMode)); + } + var name = readUnicodeString(reader); + var id = readPascalString(reader, 1); + var palette = []; + if (colorMode === 2 /* ColorMode.Indexed */) { + for (var i = 0; i < 256; i++) { + palette.push({ + r: readUint8(reader), + g: readUint8(reader), + b: readUint8(reader), + }); + } + skipBytes(reader, 4); // no idea what this is + } + // virtual memory array list + var version2 = readUint32(reader); + if (version2 !== 3) + throw new Error("Invalid pattern VMAL version: ".concat(version2)); + readUint32(reader); // length + var top = readUint32(reader); + var left = readUint32(reader); + var bottom = readUint32(reader); + var right = readUint32(reader); + var channelsCount = readUint32(reader); + var width = right - left; + var height = bottom - top; + var data = new Uint8Array(width * height * 4); + for (var i = 3; i < data.byteLength; i += 4) { + data[i] = 255; + } + for (var i = 0, ch = 0; i < (channelsCount + 2); i++) { + var has = readUint32(reader); + if (!has) + continue; + var length_2 = readUint32(reader); + var pixelDepth = readUint32(reader); + var ctop = readUint32(reader); + var cleft = readUint32(reader); + var cbottom = readUint32(reader); + var cright = readUint32(reader); + var pixelDepth2 = readUint16(reader); + var compressionMode = readUint8(reader); // 0 - raw, 1 - zip + var dataLength = length_2 - (4 + 16 + 2 + 1); + var cdata = readBytes(reader, dataLength); + if (pixelDepth !== 8 || pixelDepth2 !== 8) { + throw new Error('16bit pixel depth not supported for patterns'); + } + var w = cright - cleft; + var h = cbottom - ctop; + var ox = cleft - left; + var oy = ctop - top; + if (compressionMode === 0) { + if (colorMode === 3 /* ColorMode.RGB */ && ch < 3) { + for (var y_1 = 0; y_1 < h; y_1++) { + for (var x_1 = 0; x_1 < w; x_1++) { + var src = x_1 + y_1 * w; + var dst = (ox + x_1 + (y_1 + oy) * width) * 4; + data[dst + ch] = cdata[src]; + } + } + } + if (colorMode === 1 /* ColorMode.Grayscale */ && ch < 1) { + for (var y_2 = 0; y_2 < h; y_2++) { + for (var x_2 = 0; x_2 < w; x_2++) { + var src = x_2 + y_2 * w; + var dst = (ox + x_2 + (y_2 + oy) * width) * 4; + var value = cdata[src]; + data[dst + 0] = value; + data[dst + 1] = value; + data[dst + 2] = value; + } + } + } + if (colorMode === 2 /* ColorMode.Indexed */) { + // TODO: + throw new Error('Indexed pattern color mode not implemented'); + } + } + else if (compressionMode === 1) { + // console.log({ colorMode }); + // require('fs').writeFileSync('zip.bin', Buffer.from(cdata)); + // const data = require('zlib').inflateRawSync(cdata); + // const data = require('zlib').unzipSync(cdata); + // console.log(data); + // throw new Error('Zip compression not supported for pattern'); + // throw new Error('Unsupported pattern compression'); + console.error('Unsupported pattern compression'); + name += ' (failed to decode)'; + } + else { + throw new Error('Invalid pattern compression mode'); + } + ch++; + } + // TODO: use canvas instead of data ? + return { id: id, name: name, x: x, y: y, bounds: { x: left, y: top, w: width, h: height }, data: data }; +} +exports.readPattern = readPattern; + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBzZFJlYWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OztBQUFBLDZCQUErQjtBQUsvQixxQ0FHbUI7QUFDbkIsbURBQW1EO0FBQ25ELG1EQUF1RDtBQVcxQyxRQUFBLG1CQUFtQixHQUFHLDhFQUFzRCxDQUFDO0FBQzFGLElBQU0sVUFBVSxHQUFHLENBQUMsUUFBUSxFQUFFLFdBQVcsRUFBRSxTQUFTLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxjQUFjLEVBQUUsU0FBUyxFQUFFLEtBQUssQ0FBQyxDQUFDO0FBRXZHLFNBQVMsY0FBYyxDQUFDLElBQWU7SUFDdEMsSUFBTSxJQUFJLEdBQUcsSUFBSSxDQUFDLEtBQUssR0FBRyxJQUFJLENBQUMsTUFBTSxHQUFHLENBQUMsQ0FBQztJQUUxQyxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsSUFBSSxFQUFFLENBQUMsSUFBSSxDQU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hbGlkIHBhdHRlcm4gY29tcHJlc3Npb24gbW9kZScpO1xuXHRcdH1cblxuXHRcdGNoKys7XG5cdH1cblxuXHQvLyBUT0RPOiB1c2UgY2FudmFzIGluc3RlYWQgb2YgZGF0YSA/XG5cblx0cmV0dXJuIHsgaWQsIG5hbWUsIHgsIHksIGJvdW5kczogeyB4OiBsZWZ0LCB5OiB0b3AsIHc6IHdpZHRoLCBoOiBoZWlnaHQgfSwgZGF0YSB9O1xufVxuIl0sInNvdXJjZVJvb3QiOiJDOlxcUHJvamVjdHNcXGdpdGh1YlxcYWctcHNkXFxzcmMifQ== diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/psdReader.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/psdReader.js.map deleted file mode 100644 index e1f89f0..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/psdReader.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"psdReader.js","sourceRoot":"../src/","sources":["psdReader.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,6BAA+B;AAK/B,qCAGmB;AACnB,mDAAmD;AACnD,mDAAuD;AAW1C,QAAA,mBAAmB,GAAG,8EAAsD,CAAC;AAC1F,IAAM,UAAU,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;AAEvG,SAAS,cAAc,CAAC,IAAe;IACtC,IAAM,IAAI,GAAG,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;IAE1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC,EAAE;QACjC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,C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AAC;SAC9B;aAAM;YACN,MAAM,IAAI,KAAK,CAAC,kCAAkC,CAAC,CAAC;SACpD;QAED,EAAE,EAAE,CAAC;KACL;IAED,qCAAqC;IAErC,OAAO,EAAE,EAAE,IAAA,EAAE,IAAI,MAAA,EAAE,CAAC,GAAA,EAAE,CAAC,GAAA,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,MAAA,EAAE,CAAC;AACnF,CAAC;AAxHD,kCAwHC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/psdWriter.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/psdWriter.d.ts index 4ceb7b7..86320cb 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/psdWriter.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/psdWriter.d.ts @@ -1,27 +1,27 @@ -import { Psd, WriteOptions, Color } from './psd'; -export interface PsdWriter { - offset: number; - buffer: ArrayBuffer; - view: DataView; -} -export declare function createWriter(size?: number): PsdWriter; -export declare function getWriterBuffer(writer: PsdWriter): ArrayBuffer; -export declare function getWriterBufferNoCopy(writer: PsdWriter): Uint8Array; -export declare function writeUint8(writer: PsdWriter, value: number): void; -export declare function writeInt16(writer: PsdWriter, value: number): void; -export declare function writeUint16(writer: PsdWriter, value: number): void; -export declare function writeInt32(writer: PsdWriter, value: number): void; -export declare function writeUint32(writer: PsdWriter, value: number): void; -export declare function writeFloat32(writer: PsdWriter, value: number): void; -export declare function writeFloat64(writer: PsdWriter, value: number): void; -export declare function writeFixedPoint32(writer: PsdWriter, value: number): void; -export declare function writeFixedPointPath32(writer: PsdWriter, value: number): void; -export declare function writeBytes(writer: PsdWriter, buffer: Uint8Array | undefined): void; -export declare function writeZeros(writer: PsdWriter, count: number): void; -export declare function writeSignature(writer: PsdWriter, signature: string): void; -export declare function writePascalString(writer: PsdWriter, text: string, padTo: number): void; -export declare function writeUnicodeString(writer: PsdWriter, text: string): void; -export declare function writeUnicodeStringWithPadding(writer: PsdWriter, text: string): void; -export declare function writeSection(writer: PsdWriter, round: number, func: () => void, writeTotalLength?: boolean, large?: boolean): void; -export declare function writePsd(writer: PsdWriter, psd: Psd, options?: WriteOptions): void; -export declare function writeColor(writer: PsdWriter, color: Color | undefined): void; +import { Psd, WriteOptions, Color } from './psd'; +export interface PsdWriter { + offset: number; + buffer: ArrayBuffer; + view: DataView; +} +export declare function createWriter(size?: number): PsdWriter; +export declare function getWriterBuffer(writer: PsdWriter): ArrayBuffer; +export declare function getWriterBufferNoCopy(writer: PsdWriter): Uint8Array; +export declare function writeUint8(writer: PsdWriter, value: number): void; +export declare function writeInt16(writer: PsdWriter, value: number): void; +export declare function writeUint16(writer: PsdWriter, value: number): void; +export declare function writeInt32(writer: PsdWriter, value: number): void; +export declare function writeUint32(writer: PsdWriter, value: number): void; +export declare function writeFloat32(writer: PsdWriter, value: number): void; +export declare function writeFloat64(writer: PsdWriter, value: number): void; +export declare function writeFixedPoint32(writer: PsdWriter, value: number): void; +export declare function writeFixedPointPath32(writer: PsdWriter, value: number): void; +export declare function writeBytes(writer: PsdWriter, buffer: Uint8Array | undefined): void; +export declare function writeZeros(writer: PsdWriter, count: number): void; +export declare function writeSignature(writer: PsdWriter, signature: string): void; +export declare function writePascalString(writer: PsdWriter, text: string, padTo: number): void; +export declare function writeUnicodeString(writer: PsdWriter, text: string): void; +export declare function writeUnicodeStringWithPadding(writer: PsdWriter, text: string): void; +export declare function writeSection(writer: PsdWriter, round: number, func: () => void, writeTotalLength?: boolean, large?: boolean): void; +export declare function writePsd(writer: PsdWriter, psd: Psd, options?: WriteOptions): void; +export declare function writeColor(writer: PsdWriter, color: Color | undefined): void; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/psdWriter.js b/npm-packages/mac-v2.4.x/ag-psd/dist/psdWriter.js index dea5787..d10cfb0 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/psdWriter.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/psdWriter.js @@ -1,716 +1,690 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.writeColor = exports.writePsd = exports.writeSection = exports.writeUnicodeStringWithPadding = exports.writeUnicodeString = exports.writePascalString = exports.writeSignature = exports.writeZeros = exports.writeBytes = exports.writeFixedPointPath32 = exports.writeFixedPoint32 = exports.writeFloat64 = exports.writeFloat32 = exports.writeUint32 = exports.writeInt32 = exports.writeUint16 = exports.writeInt16 = exports.writeUint8 = exports.getWriterBufferNoCopy = exports.getWriterBuffer = exports.createWriter = void 0; -var helpers_1 = require("./helpers"); -var additionalInfo_1 = require("./additionalInfo"); -var imageResources_1 = require("./imageResources"); -function createWriter(size) { - if (size === void 0) { size = 4096; } - var buffer = new ArrayBuffer(size); - var view = new DataView(buffer); - var offset = 0; - return { buffer: buffer, view: view, offset: offset }; -} -exports.createWriter = createWriter; -function getWriterBuffer(writer) { - return writer.buffer.slice(0, writer.offset); -} -exports.getWriterBuffer = getWriterBuffer; -function getWriterBufferNoCopy(writer) { - return new Uint8Array(writer.buffer, 0, writer.offset); -} -exports.getWriterBufferNoCopy = getWriterBufferNoCopy; -function writeUint8(writer, value) { - var offset = addSize(writer, 1); - writer.view.setUint8(offset, value); -} -exports.writeUint8 = writeUint8; -function writeInt16(writer, value) { - var offset = addSize(writer, 2); - writer.view.setInt16(offset, value, false); -} -exports.writeInt16 = writeInt16; -function writeUint16(writer, value) { - var offset = addSize(writer, 2); - writer.view.setUint16(offset, value, false); -} -exports.writeUint16 = writeUint16; -function writeInt32(writer, value) { - var offset = addSize(writer, 4); - writer.view.setInt32(offset, value, false); -} -exports.writeInt32 = writeInt32; -function writeUint32(writer, value) { - var offset = addSize(writer, 4); - writer.view.setUint32(offset, value, false); -} -exports.writeUint32 = writeUint32; -function writeFloat32(writer, value) { - var offset = addSize(writer, 4); - writer.view.setFloat32(offset, value, false); -} -exports.writeFloat32 = writeFloat32; -function writeFloat64(writer, value) { - var offset = addSize(writer, 8); - writer.view.setFloat64(offset, value, false); -} -exports.writeFloat64 = writeFloat64; -// 32-bit fixed-point number 16.16 -function writeFixedPoint32(writer, value) { - writeInt32(writer, value * (1 << 16)); -} -exports.writeFixedPoint32 = writeFixedPoint32; -// 32-bit fixed-point number 8.24 -function writeFixedPointPath32(writer, value) { - writeInt32(writer, value * (1 << 24)); -} -exports.writeFixedPointPath32 = writeFixedPointPath32; -function writeBytes(writer, buffer) { - if (buffer) { - ensureSize(writer, writer.offset + buffer.length); - var bytes = new Uint8Array(writer.buffer); - bytes.set(buffer, writer.offset); - writer.offset += buffer.length; - } -} -exports.writeBytes = writeBytes; -function writeZeros(writer, count) { - for (var i = 0; i < count; i++) { - writeUint8(writer, 0); - } -} -exports.writeZeros = writeZeros; -function writeSignature(writer, signature) { - if (signature.length !== 4) - throw new Error("Invalid signature: '".concat(signature, "'")); - for (var i = 0; i < 4; i++) { - writeUint8(writer, signature.charCodeAt(i)); - } -} -exports.writeSignature = writeSignature; -function writePascalString(writer, text, padTo) { - var length = text.length; - writeUint8(writer, length); - for (var i = 0; i < length; i++) { - var code = text.charCodeAt(i); - writeUint8(writer, code < 128 ? code : '?'.charCodeAt(0)); - } - while (++length % padTo) { - writeUint8(writer, 0); - } -} -exports.writePascalString = writePascalString; -function writeUnicodeString(writer, text) { - writeUint32(writer, text.length); - for (var i = 0; i < text.length; i++) { - writeUint16(writer, text.charCodeAt(i)); - } -} -exports.writeUnicodeString = writeUnicodeString; -function writeUnicodeStringWithPadding(writer, text) { - writeUint32(writer, text.length + 1); - for (var i = 0; i < text.length; i++) { - writeUint16(writer, text.charCodeAt(i)); - } - writeUint16(writer, 0); -} -exports.writeUnicodeStringWithPadding = writeUnicodeStringWithPadding; -function getLargestLayerSize(layers) { - if (layers === void 0) { layers = []; } - var max = 0; - for (var _i = 0, layers_1 = layers; _i < layers_1.length; _i++) { - var layer = layers_1[_i]; - if (layer.canvas || layer.imageData) { - var _a = getLayerDimentions(layer), width = _a.width, height = _a.height; - max = Math.max(max, 2 * height + 2 * width * height); - } - if (layer.children) { - max = Math.max(max, getLargestLayerSize(layer.children)); - } - } - return max; -} -function writeSection(writer, round, func, writeTotalLength, large) { - if (writeTotalLength === void 0) { writeTotalLength = false; } - if (large === void 0) { large = false; } - if (large) - writeUint32(writer, 0); - var offset = writer.offset; - writeUint32(writer, 0); - func(); - var length = writer.offset - offset - 4; - var len = length; - while ((len % round) !== 0) { - writeUint8(writer, 0); - len++; - } - if (writeTotalLength) { - length = len; - } - writer.view.setUint32(offset, length, false); -} -exports.writeSection = writeSection; -function writePsd(writer, psd, options) { - if (options === void 0) { options = {}; } - if (!(+psd.width > 0 && +psd.height > 0)) - throw new Error('Invalid document size'); - if ((psd.width > 30000 || psd.height > 30000) && !options.psb) - throw new Error('Document size is too large (max is 30000x30000, use PSB format instead)'); - var imageResources = psd.imageResources || {}; - var opt = __assign(__assign({}, options), { layerIds: new Set(), layerToId: new Map() }); - if (opt.generateThumbnail) { - imageResources = __assign(__assign({}, imageResources), { thumbnail: createThumbnail(psd) }); - } - var imageData = psd.imageData; - if (!imageData && psd.canvas) { - imageData = psd.canvas.getContext('2d').getImageData(0, 0, psd.canvas.width, psd.canvas.height); - } - if (imageData && (psd.width !== imageData.width || psd.height !== imageData.height)) - throw new Error('Document canvas must have the same size as document'); - var globalAlpha = !!imageData && (0, helpers_1.hasAlpha)(imageData); - var maxBufferSize = Math.max(getLargestLayerSize(psd.children), 4 * 2 * psd.width * psd.height + 2 * psd.height); - var tempBuffer = new Uint8Array(maxBufferSize); - // header - writeSignature(writer, '8BPS'); - writeUint16(writer, options.psb ? 2 : 1); // version - writeZeros(writer, 6); - writeUint16(writer, globalAlpha ? 4 : 3); // channels - writeUint32(writer, psd.height); - writeUint32(writer, psd.width); - writeUint16(writer, 8); // bits per channel - writeUint16(writer, 3 /* ColorMode.RGB */); // we only support saving RGB right now - // color mode data - writeSection(writer, 1, function () { - // TODO: implement - }); - // image resources - writeSection(writer, 1, function () { - var _loop_1 = function (handler) { - var has = handler.has(imageResources); - var count = has === false ? 0 : (has === true ? 1 : has); - var _loop_2 = function (i) { - writeSignature(writer, '8BIM'); - writeUint16(writer, handler.key); - writePascalString(writer, '', 2); - writeSection(writer, 2, function () { return handler.write(writer, imageResources, i); }); - }; - for (var i = 0; i < count; i++) { - _loop_2(i); - } - }; - for (var _i = 0, resourceHandlers_1 = imageResources_1.resourceHandlers; _i < resourceHandlers_1.length; _i++) { - var handler = resourceHandlers_1[_i]; - _loop_1(handler); - } - }); - // layer and mask info - writeSection(writer, 2, function () { - writeLayerInfo(tempBuffer, writer, psd, globalAlpha, opt); - writeGlobalLayerMaskInfo(writer, psd.globalLayerMaskInfo); - writeAdditionalLayerInfo(writer, psd, psd, opt); - }, undefined, !!opt.psb); - // image data - var channels = globalAlpha ? [0, 1, 2, 3] : [0, 1, 2]; - var width = imageData ? imageData.width : psd.width; - var height = imageData ? imageData.height : psd.height; - var data = { data: new Uint8Array(width * height * 4), width: width, height: height }; - writeUint16(writer, 1 /* Compression.RleCompressed */); // Photoshop doesn't support zip compression of composite image data - if (helpers_1.RAW_IMAGE_DATA && psd.imageDataRaw) { - console.log('writing raw image data'); - writeBytes(writer, psd.imageDataRaw); - } - else { - if (imageData) - data.data.set(new Uint8Array(imageData.data.buffer, imageData.data.byteOffset, imageData.data.byteLength)); - // add weird white matte - if (globalAlpha) { - var size = data.width * data.height * 4; - var p = data.data; - for (var i = 0; i < size; i += 4) { - var pa = p[i + 3]; - if (pa != 0 && pa != 255) { - var a = pa / 255; - var ra = 255 * (1 - a); - p[i + 0] = p[i + 0] * a + ra; - p[i + 1] = p[i + 1] * a + ra; - p[i + 2] = p[i + 2] * a + ra; - } - } - } - writeBytes(writer, (0, helpers_1.writeDataRLE)(tempBuffer, data, channels, !!options.psb)); - } -} -exports.writePsd = writePsd; -function writeLayerInfo(tempBuffer, writer, psd, globalAlpha, options) { - writeSection(writer, 4, function () { - var _a; - var layers = []; - addChildren(layers, psd.children); - if (!layers.length) - layers.push({}); - writeInt16(writer, globalAlpha ? -layers.length : layers.length); - var layersData = layers.map(function (l, i) { return getChannels(tempBuffer, l, i === 0, options); }); - var _loop_3 = function (layerData) { - var layer = layerData.layer, top_1 = layerData.top, left = layerData.left, bottom = layerData.bottom, right = layerData.right, channels = layerData.channels; - writeInt32(writer, top_1); - writeInt32(writer, left); - writeInt32(writer, bottom); - writeInt32(writer, right); - writeUint16(writer, channels.length); - for (var _e = 0, channels_1 = channels; _e < channels_1.length; _e++) { - var c = channels_1[_e]; - writeInt16(writer, c.channelId); - if (options.psb) - writeUint32(writer, 0); - writeUint32(writer, c.length); - } - writeSignature(writer, '8BIM'); - writeSignature(writer, helpers_1.fromBlendMode[layer.blendMode] || 'norm'); - writeUint8(writer, Math.round((0, helpers_1.clamp)((_a = layer.opacity) !== null && _a !== void 0 ? _a : 1, 0, 1) * 255)); - writeUint8(writer, layer.clipping ? 1 : 0); - var flags = 0x08; // 1 for Photoshop 5.0 and later, tells if bit 4 has useful information - if (layer.transparencyProtected) - flags |= 0x01; - if (layer.hidden) - flags |= 0x02; - if (layer.vectorMask || (layer.sectionDivider && layer.sectionDivider.type !== 0 /* SectionDividerType.Other */)) { - flags |= 0x10; // pixel data irrelevant to appearance of document - } - if (layer.effects && (0, additionalInfo_1.hasMultiEffects)(layer.effects)) { // TODO: this is not correct - flags |= 0x20; // just guessing this one, might be completely incorrect - } - // if ('_2' in layer) flags |= 0x20; // TEMP!!! - writeUint8(writer, flags); - writeUint8(writer, 0); // filler - writeSection(writer, 1, function () { - writeLayerMaskData(writer, layer, layerData); - writeLayerBlendingRanges(writer, psd); - writePascalString(writer, layer.name || '', 4); - writeAdditionalLayerInfo(writer, layer, psd, options); - }); - }; - // layer records - for (var _i = 0, layersData_1 = layersData; _i < layersData_1.length; _i++) { - var layerData = layersData_1[_i]; - _loop_3(layerData); - } - // layer channel image data - for (var _b = 0, layersData_2 = layersData; _b < layersData_2.length; _b++) { - var layerData = layersData_2[_b]; - for (var _c = 0, _d = layerData.channels; _c < _d.length; _c++) { - var channel = _d[_c]; - writeUint16(writer, channel.compression); - if (channel.buffer) { - writeBytes(writer, channel.buffer); - } - } - } - }, true, options.psb); -} -function writeLayerMaskData(writer, _a, layerData) { - var mask = _a.mask; - writeSection(writer, 1, function () { - if (!mask) - return; - var m = layerData.mask || {}; - writeInt32(writer, m.top); - writeInt32(writer, m.left); - writeInt32(writer, m.bottom); - writeInt32(writer, m.right); - writeUint8(writer, mask.defaultColor); - var params = 0; - if (mask.userMaskDensity !== undefined) - params |= 1 /* MaskParams.UserMaskDensity */; - if (mask.userMaskFeather !== undefined) - params |= 2 /* MaskParams.UserMaskFeather */; - if (mask.vectorMaskDensity !== undefined) - params |= 4 /* MaskParams.VectorMaskDensity */; - if (mask.vectorMaskFeather !== undefined) - params |= 8 /* MaskParams.VectorMaskFeather */; - var flags = 0; - if (mask.disabled) - flags |= 2 /* LayerMaskFlags.LayerMaskDisabled */; - if (mask.positionRelativeToLayer) - flags |= 1 /* LayerMaskFlags.PositionRelativeToLayer */; - if (mask.fromVectorData) - flags |= 8 /* LayerMaskFlags.LayerMaskFromRenderingOtherData */; - if (params) - flags |= 16 /* LayerMaskFlags.MaskHasParametersAppliedToIt */; - writeUint8(writer, flags); - if (params) { - writeUint8(writer, params); - if (mask.userMaskDensity !== undefined) - writeUint8(writer, Math.round(mask.userMaskDensity * 0xff)); - if (mask.userMaskFeather !== undefined) - writeFloat64(writer, mask.userMaskFeather); - if (mask.vectorMaskDensity !== undefined) - writeUint8(writer, Math.round(mask.vectorMaskDensity * 0xff)); - if (mask.vectorMaskFeather !== undefined) - writeFloat64(writer, mask.vectorMaskFeather); - } - // TODO: handle rest of the fields - writeZeros(writer, 2); - }); -} -function writeLayerBlendingRanges(writer, psd) { - writeSection(writer, 1, function () { - writeUint32(writer, 65535); - writeUint32(writer, 65535); - var channels = psd.channels || 0; // TODO: use always 4 instead ? - // channels = 4; // TESTING - for (var i = 0; i < channels; i++) { - writeUint32(writer, 65535); - writeUint32(writer, 65535); - } - }); -} -function writeGlobalLayerMaskInfo(writer, info) { - writeSection(writer, 1, function () { - if (info) { - writeUint16(writer, info.overlayColorSpace); - writeUint16(writer, info.colorSpace1); - writeUint16(writer, info.colorSpace2); - writeUint16(writer, info.colorSpace3); - writeUint16(writer, info.colorSpace4); - writeUint16(writer, info.opacity * 0xff); - writeUint8(writer, info.kind); - writeZeros(writer, 3); - } - }); -} -function writeAdditionalLayerInfo(writer, target, psd, options) { - var _loop_4 = function (handler) { - var key = handler.key; - if (key === 'Txt2' && options.invalidateTextLayers) - return "continue"; - if (key === 'vmsk' && options.psb) - key = 'vsms'; - if (handler.has(target)) { - var large = options.psb && helpers_1.largeAdditionalInfoKeys.indexOf(key) !== -1; - writeSignature(writer, large ? '8B64' : '8BIM'); - writeSignature(writer, key); - var fourBytes = key === 'Txt2' || key === 'luni' || key === 'vmsk' || key === 'artb' || key === 'artd' || - key === 'vogk' || key === 'SoLd' || key === 'lnk2' || key === 'vscg' || key === 'vsms' || key === 'GdFl' || - key === 'lmfx' || key === 'lrFX' || key === 'cinf' || key === 'PlLd' || key === 'Anno'; - writeSection(writer, fourBytes ? 4 : 2, function () { - handler.write(writer, target, psd, options); - }, key !== 'Txt2' && key !== 'cinf' && key !== 'extn', large); - } - }; - for (var _i = 0, infoHandlers_1 = additionalInfo_1.infoHandlers; _i < infoHandlers_1.length; _i++) { - var handler = infoHandlers_1[_i]; - _loop_4(handler); - } -} -function addChildren(layers, children) { - if (!children) - return; - for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { - var c = children_1[_i]; - if (c.children && c.canvas) - throw new Error("Invalid layer, cannot have both 'canvas' and 'children' properties"); - if (c.children && c.imageData) - throw new Error("Invalid layer, cannot have both 'imageData' and 'children' properties"); - if (c.children) { - layers.push({ - name: '', - sectionDivider: { - type: 3 /* SectionDividerType.BoundingSectionDivider */, - }, - // TESTING - // nameSource: 'lset', - // id: [4, 0, 0, 8, 11, 0, 0, 0, 0, 14][layers.length] || 0, - // layerColor: 'none', - // timestamp: [1611346817.349021, 0, 0, 1611346817.349175, 1611346817.3491833, 0, 0, 0, 0, 1611346817.349832][layers.length] || 0, - // protected: {}, - // referencePoint: { x: 0, y: 0 }, - }); - addChildren(layers, c.children); - layers.push(__assign({ sectionDivider: { - type: c.opened === false ? 2 /* SectionDividerType.ClosedFolder */ : 1 /* SectionDividerType.OpenFolder */, - key: helpers_1.fromBlendMode[c.blendMode] || 'pass', - subType: 0, - } }, c)); - } - else { - layers.push(__assign({}, c)); - } - } -} -function resizeBuffer(writer, size) { - var newLength = writer.buffer.byteLength; - do { - newLength *= 2; - } while (size > newLength); - var newBuffer = new ArrayBuffer(newLength); - var newBytes = new Uint8Array(newBuffer); - var oldBytes = new Uint8Array(writer.buffer); - newBytes.set(oldBytes); - writer.buffer = newBuffer; - writer.view = new DataView(writer.buffer); -} -function ensureSize(writer, size) { - if (size > writer.buffer.byteLength) { - resizeBuffer(writer, size); - } -} -function addSize(writer, size) { - var offset = writer.offset; - ensureSize(writer, writer.offset += size); - return offset; -} -function createThumbnail(psd) { - var canvas = (0, helpers_1.createCanvas)(10, 10); - var scale = 1; - if (psd.width > psd.height) { - canvas.width = 160; - canvas.height = Math.floor(psd.height * (canvas.width / psd.width)); - scale = canvas.width / psd.width; - } - else { - canvas.height = 160; - canvas.width = Math.floor(psd.width * (canvas.height / psd.height)); - scale = canvas.height / psd.height; - } - var context = canvas.getContext('2d'); - context.scale(scale, scale); - if (psd.imageData) { - var temp = (0, helpers_1.createCanvas)(psd.imageData.width, psd.imageData.height); - temp.getContext('2d').putImageData(psd.imageData, 0, 0); - context.drawImage(temp, 0, 0); - } - else if (psd.canvas) { - context.drawImage(psd.canvas, 0, 0); - } - return canvas; -} -function getChannels(tempBuffer, layer, background, options) { - var layerData = getLayerChannels(tempBuffer, layer, background, options); - var mask = layer.mask; - if (mask) { - var top_2 = mask.top | 0; - var left = mask.left | 0; - var right = mask.right | 0; - var bottom = mask.bottom | 0; - var _a = getLayerDimentions(mask), width = _a.width, height = _a.height; - var imageData = mask.imageData; - if (!imageData && mask.canvas && width && height) { - imageData = mask.canvas.getContext('2d').getImageData(0, 0, width, height); - } - if (width && height && imageData) { - right = left + width; - bottom = top_2 + height; - if (imageData.width !== width || imageData.height !== height) { - throw new Error('Invalid imageData dimentions'); - } - var buffer = void 0; - var compression = void 0; - if (helpers_1.RAW_IMAGE_DATA && layer.maskDataRaw) { - // console.log('written raw layer image data'); - buffer = layer.maskDataRaw; - compression = 1 /* Compression.RleCompressed */; - } - else if (options.compress) { - buffer = (0, helpers_1.writeDataZipWithoutPrediction)(imageData, [0]); - compression = 2 /* Compression.ZipWithoutPrediction */; - } - else { - buffer = (0, helpers_1.writeDataRLE)(tempBuffer, imageData, [0], !!options.psb); - compression = 1 /* Compression.RleCompressed */; - } - layerData.mask = { top: top_2, left: left, right: right, bottom: bottom }; - layerData.channels.push({ channelId: -2 /* ChannelID.UserMask */, compression: compression, buffer: buffer, length: 2 + buffer.length }); - } - else { - layerData.mask = { top: 0, left: 0, right: 0, bottom: 0 }; - layerData.channels.push({ channelId: -2 /* ChannelID.UserMask */, compression: 0 /* Compression.RawData */, buffer: new Uint8Array(0), length: 0 }); - } - } - return layerData; -} -function getLayerDimentions(_a) { - var canvas = _a.canvas, imageData = _a.imageData; - return imageData || canvas || { width: 0, height: 0 }; -} -function cropImageData(data, left, top, width, height) { - var croppedData = (0, helpers_1.createImageData)(width, height); - var srcData = data.data; - var dstData = croppedData.data; - for (var y = 0; y < height; y++) { - for (var x = 0; x < width; x++) { - var src = ((x + left) + (y + top) * width) * 4; - var dst = (x + y * width) * 4; - dstData[dst] = srcData[src]; - dstData[dst + 1] = srcData[src + 1]; - dstData[dst + 2] = srcData[src + 2]; - dstData[dst + 3] = srcData[src + 3]; - } - } - return croppedData; -} -function getLayerChannels(tempBuffer, layer, background, options) { - var _a; - var top = layer.top | 0; - var left = layer.left | 0; - var right = layer.right | 0; - var bottom = layer.bottom | 0; - var channels = [ - { channelId: -1 /* ChannelID.Transparency */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, - { channelId: 0 /* ChannelID.Color0 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, - { channelId: 1 /* ChannelID.Color1 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, - { channelId: 2 /* ChannelID.Color2 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, - ]; - var _b = getLayerDimentions(layer), width = _b.width, height = _b.height; - if (!(layer.canvas || layer.imageData) || !width || !height) { - right = left; - bottom = top; - return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; - } - right = left + width; - bottom = top + height; - var data = layer.imageData || layer.canvas.getContext('2d').getImageData(0, 0, width, height); - if (options.trimImageData) { - var trimmed = trimData(data); - if (trimmed.left !== 0 || trimmed.top !== 0 || trimmed.right !== data.width || trimmed.bottom !== data.height) { - left += trimmed.left; - top += trimmed.top; - right -= (data.width - trimmed.right); - bottom -= (data.height - trimmed.bottom); - width = right - left; - height = bottom - top; - if (!width || !height) { - return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; - } - if (layer.imageData) { - data = cropImageData(data, trimmed.left, trimmed.top, width, height); - } - else { - data = layer.canvas.getContext('2d').getImageData(trimmed.left, trimmed.top, width, height); - } - } - } - var channelIds = [ - 0 /* ChannelID.Color0 */, - 1 /* ChannelID.Color1 */, - 2 /* ChannelID.Color2 */, - ]; - if (!background || options.noBackground || layer.mask || (0, helpers_1.hasAlpha)(data) || (helpers_1.RAW_IMAGE_DATA && ((_a = layer.imageDataRaw) === null || _a === void 0 ? void 0 : _a['-1']))) { - channelIds.unshift(-1 /* ChannelID.Transparency */); - } - channels = channelIds.map(function (channelId) { - var offset = (0, helpers_1.offsetForChannel)(channelId, false); // TODO: psd.colorMode === ColorMode.CMYK); - var buffer; - var compression; - if (helpers_1.RAW_IMAGE_DATA && layer.imageDataRaw) { - // console.log('written raw layer image data'); - buffer = layer.imageDataRaw[channelId]; - compression = 1 /* Compression.RleCompressed */; - } - else if (options.compress) { - buffer = (0, helpers_1.writeDataZipWithoutPrediction)(data, [offset]); - compression = 2 /* Compression.ZipWithoutPrediction */; - } - else { - buffer = (0, helpers_1.writeDataRLE)(tempBuffer, data, [offset], !!options.psb); - compression = 1 /* Compression.RleCompressed */; - } - return { channelId: channelId, compression: compression, buffer: buffer, length: 2 + buffer.length }; - }); - return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; -} -function isRowEmpty(_a, y, left, right) { - var data = _a.data, width = _a.width; - var start = ((y * width + left) * 4 + 3) | 0; - var end = (start + (right - left) * 4) | 0; - for (var i = start; i < end; i = (i + 4) | 0) { - if (data[i] !== 0) { - return false; - } - } - return true; -} -function isColEmpty(_a, x, top, bottom) { - var data = _a.data, width = _a.width; - var stride = (width * 4) | 0; - var start = (top * stride + x * 4 + 3) | 0; - for (var y = top, i = start; y < bottom; y++, i = (i + stride) | 0) { - if (data[i] !== 0) { - return false; - } - } - return true; -} -function trimData(data) { - var top = 0; - var left = 0; - var right = data.width; - var bottom = data.height; - while (top < bottom && isRowEmpty(data, top, left, right)) - top++; - while (bottom > top && isRowEmpty(data, bottom - 1, left, right)) - bottom--; - while (left < right && isColEmpty(data, left, top, bottom)) - left++; - while (right > left && isColEmpty(data, right - 1, top, bottom)) - right--; - return { top: top, left: left, right: right, bottom: bottom }; -} -function writeColor(writer, color) { - if (!color) { - writeUint16(writer, 0 /* ColorSpace.RGB */); - writeZeros(writer, 8); - } - else if ('r' in color) { - writeUint16(writer, 0 /* ColorSpace.RGB */); - writeUint16(writer, Math.round(color.r * 257)); - writeUint16(writer, Math.round(color.g * 257)); - writeUint16(writer, Math.round(color.b * 257)); - writeUint16(writer, 0); - } - else if ('fr' in color) { - writeUint16(writer, 0 /* ColorSpace.RGB */); - writeUint16(writer, Math.round(color.fr * 255 * 257)); - writeUint16(writer, Math.round(color.fg * 255 * 257)); - writeUint16(writer, Math.round(color.fb * 255 * 257)); - writeUint16(writer, 0); - } - else if ('l' in color) { - writeUint16(writer, 7 /* ColorSpace.Lab */); - writeInt16(writer, Math.round(color.l * 10000)); - writeInt16(writer, Math.round(color.a < 0 ? (color.a * 12800) : (color.a * 12700))); - writeInt16(writer, Math.round(color.b < 0 ? (color.b * 12800) : (color.b * 12700))); - writeUint16(writer, 0); - } - else if ('h' in color) { - writeUint16(writer, 1 /* ColorSpace.HSB */); - writeUint16(writer, Math.round(color.h * 0xffff)); - writeUint16(writer, Math.round(color.s * 0xffff)); - writeUint16(writer, Math.round(color.b * 0xffff)); - writeUint16(writer, 0); - } - else if ('c' in color) { - writeUint16(writer, 2 /* ColorSpace.CMYK */); - writeUint16(writer, Math.round(color.c * 257)); - writeUint16(writer, Math.round(color.m * 257)); - writeUint16(writer, Math.round(color.y * 257)); - writeUint16(writer, Math.round(color.k * 257)); - } - else { - writeUint16(writer, 8 /* ColorSpace.Grayscale */); - writeUint16(writer, Math.round(color.k * 10000 / 255)); - writeZeros(writer, 6); - } -} -exports.writeColor = writeColor; -//# sourceMappingURL=psdWriter.js.map \ No newline at end of file +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.writeColor = exports.writePsd = exports.writeSection = exports.writeUnicodeStringWithPadding = exports.writeUnicodeString = exports.writePascalString = exports.writeSignature = exports.writeZeros = exports.writeBytes = exports.writeFixedPointPath32 = exports.writeFixedPoint32 = exports.writeFloat64 = exports.writeFloat32 = exports.writeUint32 = exports.writeInt32 = exports.writeUint16 = exports.writeInt16 = exports.writeUint8 = exports.getWriterBufferNoCopy = exports.getWriterBuffer = exports.createWriter = void 0; +var helpers_1 = require("./helpers"); +var additionalInfo_1 = require("./additionalInfo"); +var imageResources_1 = require("./imageResources"); +function createWriter(size) { + if (size === void 0) { size = 4096; } + var buffer = new ArrayBuffer(size); + var view = new DataView(buffer); + var offset = 0; + return { buffer: buffer, view: view, offset: offset }; +} +exports.createWriter = createWriter; +function getWriterBuffer(writer) { + return writer.buffer.slice(0, writer.offset); +} +exports.getWriterBuffer = getWriterBuffer; +function getWriterBufferNoCopy(writer) { + return new Uint8Array(writer.buffer, 0, writer.offset); +} +exports.getWriterBufferNoCopy = getWriterBufferNoCopy; +function writeUint8(writer, value) { + var offset = addSize(writer, 1); + writer.view.setUint8(offset, value); +} +exports.writeUint8 = writeUint8; +function writeInt16(writer, value) { + var offset = addSize(writer, 2); + writer.view.setInt16(offset, value, false); +} +exports.writeInt16 = writeInt16; +function writeUint16(writer, value) { + var offset = addSize(writer, 2); + writer.view.setUint16(offset, value, false); +} +exports.writeUint16 = writeUint16; +function writeInt32(writer, value) { + var offset = addSize(writer, 4); + writer.view.setInt32(offset, value, false); +} +exports.writeInt32 = writeInt32; +function writeUint32(writer, value) { + var offset = addSize(writer, 4); + writer.view.setUint32(offset, value, false); +} +exports.writeUint32 = writeUint32; +function writeFloat32(writer, value) { + var offset = addSize(writer, 4); + writer.view.setFloat32(offset, value, false); +} +exports.writeFloat32 = writeFloat32; +function writeFloat64(writer, value) { + var offset = addSize(writer, 8); + writer.view.setFloat64(offset, value, false); +} +exports.writeFloat64 = writeFloat64; +// 32-bit fixed-point number 16.16 +function writeFixedPoint32(writer, value) { + writeInt32(writer, value * (1 << 16)); +} +exports.writeFixedPoint32 = writeFixedPoint32; +// 32-bit fixed-point number 8.24 +function writeFixedPointPath32(writer, value) { + writeInt32(writer, value * (1 << 24)); +} +exports.writeFixedPointPath32 = writeFixedPointPath32; +function writeBytes(writer, buffer) { + if (buffer) { + ensureSize(writer, writer.offset + buffer.length); + var bytes = new Uint8Array(writer.buffer); + bytes.set(buffer, writer.offset); + writer.offset += buffer.length; + } +} +exports.writeBytes = writeBytes; +function writeZeros(writer, count) { + for (var i = 0; i < count; i++) { + writeUint8(writer, 0); + } +} +exports.writeZeros = writeZeros; +function writeSignature(writer, signature) { + if (signature.length !== 4) + throw new Error("Invalid signature: '".concat(signature, "'")); + for (var i = 0; i < 4; i++) { + writeUint8(writer, signature.charCodeAt(i)); + } +} +exports.writeSignature = writeSignature; +function writePascalString(writer, text, padTo) { + var length = text.length; + writeUint8(writer, length); + for (var i = 0; i < length; i++) { + var code = text.charCodeAt(i); + writeUint8(writer, code < 128 ? code : '?'.charCodeAt(0)); + } + while (++length % padTo) { + writeUint8(writer, 0); + } +} +exports.writePascalString = writePascalString; +function writeUnicodeString(writer, text) { + writeUint32(writer, text.length); + for (var i = 0; i < text.length; i++) { + writeUint16(writer, text.charCodeAt(i)); + } +} +exports.writeUnicodeString = writeUnicodeString; +function writeUnicodeStringWithPadding(writer, text) { + writeUint32(writer, text.length + 1); + for (var i = 0; i < text.length; i++) { + writeUint16(writer, text.charCodeAt(i)); + } + writeUint16(writer, 0); +} +exports.writeUnicodeStringWithPadding = writeUnicodeStringWithPadding; +function getLargestLayerSize(layers) { + if (layers === void 0) { layers = []; } + var max = 0; + for (var _i = 0, layers_1 = layers; _i < layers_1.length; _i++) { + var layer = layers_1[_i]; + if (layer.canvas || layer.imageData) { + var _a = getLayerDimentions(layer), width = _a.width, height = _a.height; + max = Math.max(max, 2 * height + 2 * width * height); + } + if (layer.children) { + max = Math.max(max, getLargestLayerSize(layer.children)); + } + } + return max; +} +function writeSection(writer, round, func, writeTotalLength, large) { + if (writeTotalLength === void 0) { writeTotalLength = false; } + if (large === void 0) { large = false; } + if (large) + writeUint32(writer, 0); + var offset = writer.offset; + writeUint32(writer, 0); + func(); + var length = writer.offset - offset - 4; + var len = length; + while ((len % round) !== 0) { + writeUint8(writer, 0); + len++; + } + if (writeTotalLength) { + length = len; + } + writer.view.setUint32(offset, length, false); +} +exports.writeSection = writeSection; +function writePsd(writer, psd, options) { + if (options === void 0) { options = {}; } + if (!(+psd.width > 0 && +psd.height > 0)) + throw new Error('Invalid document size'); + if ((psd.width > 30000 || psd.height > 30000) && !options.psb) + throw new Error('Document size is too large (max is 30000x30000, use PSB format instead)'); + var imageResources = psd.imageResources || {}; + var opt = __assign(__assign({}, options), { layerIds: new Set(), layerToId: new Map() }); + if (opt.generateThumbnail) { + imageResources = __assign(__assign({}, imageResources), { thumbnail: createThumbnail(psd) }); + } + var imageData = psd.imageData; + if (!imageData && psd.canvas) { + imageData = psd.canvas.getContext('2d').getImageData(0, 0, psd.canvas.width, psd.canvas.height); + } + if (imageData && (psd.width !== imageData.width || psd.height !== imageData.height)) + throw new Error('Document canvas must have the same size as document'); + var globalAlpha = !!imageData && (0, helpers_1.hasAlpha)(imageData); + var maxBufferSize = Math.max(getLargestLayerSize(psd.children), 4 * 2 * psd.width * psd.height + 2 * psd.height); + var tempBuffer = new Uint8Array(maxBufferSize); + // header + writeSignature(writer, '8BPS'); + writeUint16(writer, options.psb ? 2 : 1); // version + writeZeros(writer, 6); + writeUint16(writer, globalAlpha ? 4 : 3); // channels + writeUint32(writer, psd.height); + writeUint32(writer, psd.width); + writeUint16(writer, 8); // bits per channel + writeUint16(writer, 3 /* ColorMode.RGB */); // we only support saving RGB right now + // color mode data + writeSection(writer, 1, function () { + // TODO: implement + }); + // image resources + writeSection(writer, 1, function () { + var _loop_1 = function (handler) { + if (handler.has(imageResources)) { + writeSignature(writer, '8BIM'); + writeUint16(writer, handler.key); + writePascalString(writer, '', 2); + writeSection(writer, 2, function () { return handler.write(writer, imageResources); }); + } + }; + for (var _i = 0, resourceHandlers_1 = imageResources_1.resourceHandlers; _i < resourceHandlers_1.length; _i++) { + var handler = resourceHandlers_1[_i]; + _loop_1(handler); + } + }); + // layer and mask info + writeSection(writer, 2, function () { + writeLayerInfo(tempBuffer, writer, psd, globalAlpha, opt); + writeGlobalLayerMaskInfo(writer, psd.globalLayerMaskInfo); + writeAdditionalLayerInfo(writer, psd, psd, opt); + }, undefined, !!opt.psb); + // image data + var channels = globalAlpha ? [0, 1, 2, 3] : [0, 1, 2]; + var data = imageData || { + data: new Uint8Array(4 * psd.width * psd.height), + width: psd.width, + height: psd.height, + }; + writeUint16(writer, 1 /* Compression.RleCompressed */); // Photoshop doesn't support zip compression of composite image data + if (helpers_1.RAW_IMAGE_DATA && psd.imageDataRaw) { + console.log('writing raw image data'); + writeBytes(writer, psd.imageDataRaw); + } + else { + writeBytes(writer, (0, helpers_1.writeDataRLE)(tempBuffer, data, channels, !!options.psb)); + } +} +exports.writePsd = writePsd; +function writeLayerInfo(tempBuffer, writer, psd, globalAlpha, options) { + writeSection(writer, 4, function () { + var _a; + var layers = []; + addChildren(layers, psd.children); + if (!layers.length) + layers.push({}); + writeInt16(writer, globalAlpha ? -layers.length : layers.length); + var layersData = layers.map(function (l, i) { return getChannels(tempBuffer, l, i === 0, options); }); + var _loop_2 = function (layerData) { + var layer = layerData.layer, top_1 = layerData.top, left = layerData.left, bottom = layerData.bottom, right = layerData.right, channels = layerData.channels; + writeInt32(writer, top_1); + writeInt32(writer, left); + writeInt32(writer, bottom); + writeInt32(writer, right); + writeUint16(writer, channels.length); + for (var _e = 0, channels_1 = channels; _e < channels_1.length; _e++) { + var c = channels_1[_e]; + writeInt16(writer, c.channelId); + if (options.psb) + writeUint32(writer, 0); + writeUint32(writer, c.length); + } + writeSignature(writer, '8BIM'); + writeSignature(writer, helpers_1.fromBlendMode[layer.blendMode] || 'norm'); + writeUint8(writer, Math.round((0, helpers_1.clamp)((_a = layer.opacity) !== null && _a !== void 0 ? _a : 1, 0, 1) * 255)); + writeUint8(writer, layer.clipping ? 1 : 0); + var flags = 0x08; // 1 for Photoshop 5.0 and later, tells if bit 4 has useful information + if (layer.transparencyProtected) + flags |= 0x01; + if (layer.hidden) + flags |= 0x02; + if (layer.vectorMask || (layer.sectionDivider && layer.sectionDivider.type !== 0 /* SectionDividerType.Other */)) { + flags |= 0x10; // pixel data irrelevant to appearance of document + } + if (layer.effects && (0, additionalInfo_1.hasMultiEffects)(layer.effects)) { // TODO: this is not correct + flags |= 0x20; // just guessing this one, might be completely incorrect + } + // if ('_2' in layer) flags |= 0x20; // TEMP!!! + writeUint8(writer, flags); + writeUint8(writer, 0); // filler + writeSection(writer, 1, function () { + writeLayerMaskData(writer, layer, layerData); + writeLayerBlendingRanges(writer, psd); + writePascalString(writer, layer.name || '', 4); + writeAdditionalLayerInfo(writer, layer, psd, options); + }); + }; + // layer records + for (var _i = 0, layersData_1 = layersData; _i < layersData_1.length; _i++) { + var layerData = layersData_1[_i]; + _loop_2(layerData); + } + // layer channel image data + for (var _b = 0, layersData_2 = layersData; _b < layersData_2.length; _b++) { + var layerData = layersData_2[_b]; + for (var _c = 0, _d = layerData.channels; _c < _d.length; _c++) { + var channel = _d[_c]; + writeUint16(writer, channel.compression); + if (channel.buffer) { + writeBytes(writer, channel.buffer); + } + } + } + }, true, options.psb); +} +function writeLayerMaskData(writer, _a, layerData) { + var mask = _a.mask; + writeSection(writer, 1, function () { + if (!mask) + return; + var m = layerData.mask || {}; + writeInt32(writer, m.top); + writeInt32(writer, m.left); + writeInt32(writer, m.bottom); + writeInt32(writer, m.right); + writeUint8(writer, mask.defaultColor); + var params = 0; + if (mask.userMaskDensity !== undefined) + params |= 1 /* MaskParams.UserMaskDensity */; + if (mask.userMaskFeather !== undefined) + params |= 2 /* MaskParams.UserMaskFeather */; + if (mask.vectorMaskDensity !== undefined) + params |= 4 /* MaskParams.VectorMaskDensity */; + if (mask.vectorMaskFeather !== undefined) + params |= 8 /* MaskParams.VectorMaskFeather */; + var flags = 0; + if (mask.disabled) + flags |= 2 /* LayerMaskFlags.LayerMaskDisabled */; + if (mask.positionRelativeToLayer) + flags |= 1 /* LayerMaskFlags.PositionRelativeToLayer */; + if (mask.fromVectorData) + flags |= 8 /* LayerMaskFlags.LayerMaskFromRenderingOtherData */; + if (params) + flags |= 16 /* LayerMaskFlags.MaskHasParametersAppliedToIt */; + writeUint8(writer, flags); + if (params) { + writeUint8(writer, params); + if (mask.userMaskDensity !== undefined) + writeUint8(writer, Math.round(mask.userMaskDensity * 0xff)); + if (mask.userMaskFeather !== undefined) + writeFloat64(writer, mask.userMaskFeather); + if (mask.vectorMaskDensity !== undefined) + writeUint8(writer, Math.round(mask.vectorMaskDensity * 0xff)); + if (mask.vectorMaskFeather !== undefined) + writeFloat64(writer, mask.vectorMaskFeather); + } + // TODO: handle rest of the fields + writeZeros(writer, 2); + }); +} +function writeLayerBlendingRanges(writer, psd) { + writeSection(writer, 1, function () { + writeUint32(writer, 65535); + writeUint32(writer, 65535); + var channels = psd.channels || 0; // TODO: use always 4 instead ? + // channels = 4; // TESTING + for (var i = 0; i < channels; i++) { + writeUint32(writer, 65535); + writeUint32(writer, 65535); + } + }); +} +function writeGlobalLayerMaskInfo(writer, info) { + writeSection(writer, 1, function () { + if (info) { + writeUint16(writer, info.overlayColorSpace); + writeUint16(writer, info.colorSpace1); + writeUint16(writer, info.colorSpace2); + writeUint16(writer, info.colorSpace3); + writeUint16(writer, info.colorSpace4); + writeUint16(writer, info.opacity * 0xff); + writeUint8(writer, info.kind); + writeZeros(writer, 3); + } + }); +} +function writeAdditionalLayerInfo(writer, target, psd, options) { + var _loop_3 = function (handler) { + var key = handler.key; + if (key === 'Txt2' && options.invalidateTextLayers) + return "continue"; + if (key === 'vmsk' && options.psb) + key = 'vsms'; + if (handler.has(target)) { + var large = options.psb && helpers_1.largeAdditionalInfoKeys.indexOf(key) !== -1; + writeSignature(writer, large ? '8B64' : '8BIM'); + writeSignature(writer, key); + var fourBytes = key === 'Txt2' || key === 'luni' || key === 'vmsk' || key === 'artb' || key === 'artd' || + key === 'vogk' || key === 'SoLd' || key === 'lnk2' || key === 'vscg' || key === 'vsms' || key === 'GdFl' || + key === 'lmfx' || key === 'lrFX' || key === 'cinf' || key === 'PlLd' || key === 'Anno'; + writeSection(writer, fourBytes ? 4 : 2, function () { + handler.write(writer, target, psd, options); + }, key !== 'Txt2' && key !== 'cinf' && key !== 'extn', large); + } + }; + for (var _i = 0, infoHandlers_1 = additionalInfo_1.infoHandlers; _i < infoHandlers_1.length; _i++) { + var handler = infoHandlers_1[_i]; + _loop_3(handler); + } +} +function addChildren(layers, children) { + if (!children) + return; + for (var _i = 0, children_1 = children; _i < children_1.length; _i++) { + var c = children_1[_i]; + if (c.children && c.canvas) + throw new Error("Invalid layer, cannot have both 'canvas' and 'children' properties"); + if (c.children && c.imageData) + throw new Error("Invalid layer, cannot have both 'imageData' and 'children' properties"); + if (c.children) { + layers.push({ + name: '', + sectionDivider: { + type: 3 /* SectionDividerType.BoundingSectionDivider */, + }, + // TESTING + // nameSource: 'lset', + // id: [4, 0, 0, 8, 11, 0, 0, 0, 0, 14][layers.length] || 0, + // layerColor: 'none', + // timestamp: [1611346817.349021, 0, 0, 1611346817.349175, 1611346817.3491833, 0, 0, 0, 0, 1611346817.349832][layers.length] || 0, + // protected: {}, + // referencePoint: { x: 0, y: 0 }, + }); + addChildren(layers, c.children); + layers.push(__assign({ sectionDivider: { + type: c.opened === false ? 2 /* SectionDividerType.ClosedFolder */ : 1 /* SectionDividerType.OpenFolder */, + key: helpers_1.fromBlendMode[c.blendMode] || 'pass', + subType: 0, + } }, c)); + } + else { + layers.push(__assign({}, c)); + } + } +} +function resizeBuffer(writer, size) { + var newLength = writer.buffer.byteLength; + do { + newLength *= 2; + } while (size > newLength); + var newBuffer = new ArrayBuffer(newLength); + var newBytes = new Uint8Array(newBuffer); + var oldBytes = new Uint8Array(writer.buffer); + newBytes.set(oldBytes); + writer.buffer = newBuffer; + writer.view = new DataView(writer.buffer); +} +function ensureSize(writer, size) { + if (size > writer.buffer.byteLength) { + resizeBuffer(writer, size); + } +} +function addSize(writer, size) { + var offset = writer.offset; + ensureSize(writer, writer.offset += size); + return offset; +} +function createThumbnail(psd) { + var canvas = (0, helpers_1.createCanvas)(10, 10); + var scale = 1; + if (psd.width > psd.height) { + canvas.width = 160; + canvas.height = Math.floor(psd.height * (canvas.width / psd.width)); + scale = canvas.width / psd.width; + } + else { + canvas.height = 160; + canvas.width = Math.floor(psd.width * (canvas.height / psd.height)); + scale = canvas.height / psd.height; + } + var context = canvas.getContext('2d'); + context.scale(scale, scale); + if (psd.imageData) { + var temp = (0, helpers_1.createCanvas)(psd.imageData.width, psd.imageData.height); + temp.getContext('2d').putImageData(psd.imageData, 0, 0); + context.drawImage(temp, 0, 0); + } + else if (psd.canvas) { + context.drawImage(psd.canvas, 0, 0); + } + return canvas; +} +function getChannels(tempBuffer, layer, background, options) { + var layerData = getLayerChannels(tempBuffer, layer, background, options); + var mask = layer.mask; + if (mask) { + var top_2 = mask.top | 0; + var left = mask.left | 0; + var right = mask.right | 0; + var bottom = mask.bottom | 0; + var _a = getLayerDimentions(mask), width = _a.width, height = _a.height; + var imageData = mask.imageData; + if (!imageData && mask.canvas && width && height) { + imageData = mask.canvas.getContext('2d').getImageData(0, 0, width, height); + } + if (width && height && imageData) { + right = left + width; + bottom = top_2 + height; + if (imageData.width !== width || imageData.height !== height) { + throw new Error('Invalid imageData dimentions'); + } + var buffer = void 0; + var compression = void 0; + if (helpers_1.RAW_IMAGE_DATA && layer.maskDataRaw) { + // console.log('written raw layer image data'); + buffer = layer.maskDataRaw; + compression = 1 /* Compression.RleCompressed */; + } + else if (options.compress) { + buffer = (0, helpers_1.writeDataZipWithoutPrediction)(imageData, [0]); + compression = 2 /* Compression.ZipWithoutPrediction */; + } + else { + buffer = (0, helpers_1.writeDataRLE)(tempBuffer, imageData, [0], !!options.psb); + compression = 1 /* Compression.RleCompressed */; + } + layerData.mask = { top: top_2, left: left, right: right, bottom: bottom }; + layerData.channels.push({ channelId: -2 /* ChannelID.UserMask */, compression: compression, buffer: buffer, length: 2 + buffer.length }); + } + else { + layerData.mask = { top: 0, left: 0, right: 0, bottom: 0 }; + layerData.channels.push({ channelId: -2 /* ChannelID.UserMask */, compression: 0 /* Compression.RawData */, buffer: new Uint8Array(0), length: 0 }); + } + } + return layerData; +} +function getLayerDimentions(_a) { + var canvas = _a.canvas, imageData = _a.imageData; + return imageData || canvas || { width: 0, height: 0 }; +} +function cropImageData(data, left, top, width, height) { + var croppedData = (0, helpers_1.createImageData)(width, height); + var srcData = data.data; + var dstData = croppedData.data; + for (var y = 0; y < height; y++) { + for (var x = 0; x < width; x++) { + var src = ((x + left) + (y + top) * width) * 4; + var dst = (x + y * width) * 4; + dstData[dst] = srcData[src]; + dstData[dst + 1] = srcData[src + 1]; + dstData[dst + 2] = srcData[src + 2]; + dstData[dst + 3] = srcData[src + 3]; + } + } + return croppedData; +} +function getLayerChannels(tempBuffer, layer, background, options) { + var _a; + var top = layer.top | 0; + var left = layer.left | 0; + var right = layer.right | 0; + var bottom = layer.bottom | 0; + var channels = [ + { channelId: -1 /* ChannelID.Transparency */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, + { channelId: 0 /* ChannelID.Color0 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, + { channelId: 1 /* ChannelID.Color1 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, + { channelId: 2 /* ChannelID.Color2 */, compression: 0 /* Compression.RawData */, buffer: undefined, length: 2 }, + ]; + var _b = getLayerDimentions(layer), width = _b.width, height = _b.height; + if (!(layer.canvas || layer.imageData) || !width || !height) { + right = left; + bottom = top; + return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; + } + right = left + width; + bottom = top + height; + var data = layer.imageData || layer.canvas.getContext('2d').getImageData(0, 0, width, height); + if (options.trimImageData) { + var trimmed = trimData(data); + if (trimmed.left !== 0 || trimmed.top !== 0 || trimmed.right !== data.width || trimmed.bottom !== data.height) { + left += trimmed.left; + top += trimmed.top; + right -= (data.width - trimmed.right); + bottom -= (data.height - trimmed.bottom); + width = right - left; + height = bottom - top; + if (!width || !height) { + return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; + } + if (layer.imageData) { + data = cropImageData(data, trimmed.left, trimmed.top, width, height); + } + else { + data = layer.canvas.getContext('2d').getImageData(trimmed.left, trimmed.top, width, height); + } + } + } + var channelIds = [ + 0 /* ChannelID.Color0 */, + 1 /* ChannelID.Color1 */, + 2 /* ChannelID.Color2 */, + ]; + if (!background || options.noBackground || layer.mask || (0, helpers_1.hasAlpha)(data) || (helpers_1.RAW_IMAGE_DATA && ((_a = layer.imageDataRaw) === null || _a === void 0 ? void 0 : _a['-1']))) { + channelIds.unshift(-1 /* ChannelID.Transparency */); + } + channels = channelIds.map(function (channelId) { + var offset = (0, helpers_1.offsetForChannel)(channelId, false); // TODO: psd.colorMode === ColorMode.CMYK); + var buffer; + var compression; + if (helpers_1.RAW_IMAGE_DATA && layer.imageDataRaw) { + // console.log('written raw layer image data'); + buffer = layer.imageDataRaw[channelId]; + compression = 1 /* Compression.RleCompressed */; + } + else if (options.compress) { + buffer = (0, helpers_1.writeDataZipWithoutPrediction)(data, [offset]); + compression = 2 /* Compression.ZipWithoutPrediction */; + } + else { + buffer = (0, helpers_1.writeDataRLE)(tempBuffer, data, [offset], !!options.psb); + compression = 1 /* Compression.RleCompressed */; + } + return { channelId: channelId, compression: compression, buffer: buffer, length: 2 + buffer.length }; + }); + return { layer: layer, top: top, left: left, right: right, bottom: bottom, channels: channels }; +} +function isRowEmpty(_a, y, left, right) { + var data = _a.data, width = _a.width; + var start = ((y * width + left) * 4 + 3) | 0; + var end = (start + (right - left) * 4) | 0; + for (var i = start; i < end; i = (i + 4) | 0) { + if (data[i] !== 0) { + return false; + } + } + return true; +} +function isColEmpty(_a, x, top, bottom) { + var data = _a.data, width = _a.width; + var stride = (width * 4) | 0; + var start = (top * stride + x * 4 + 3) | 0; + for (var y = top, i = start; y < bottom; y++, i = (i + stride) | 0) { + if (data[i] !== 0) { + return false; + } + } + return true; +} +function trimData(data) { + var top = 0; + var left = 0; + var right = data.width; + var bottom = data.height; + while (top < bottom && isRowEmpty(data, top, left, right)) + top++; + while (bottom > top && isRowEmpty(data, bottom - 1, left, right)) + bottom--; + while (left < right && isColEmpty(data, left, top, bottom)) + left++; + while (right > left && isColEmpty(data, right - 1, top, bottom)) + right--; + return { top: top, left: left, right: right, bottom: bottom }; +} +function writeColor(writer, color) { + if (!color) { + writeUint16(writer, 0 /* ColorSpace.RGB */); + writeZeros(writer, 8); + } + else if ('r' in color) { + writeUint16(writer, 0 /* ColorSpace.RGB */); + writeUint16(writer, Math.round(color.r * 257)); + writeUint16(writer, Math.round(color.g * 257)); + writeUint16(writer, Math.round(color.b * 257)); + writeUint16(writer, 0); + } + else if ('l' in color) { + writeUint16(writer, 7 /* ColorSpace.Lab */); + writeInt16(writer, Math.round(color.l * 10000)); + writeInt16(writer, Math.round(color.a < 0 ? (color.a * 12800) : (color.a * 12700))); + writeInt16(writer, Math.round(color.b < 0 ? (color.b * 12800) : (color.b * 12700))); + writeUint16(writer, 0); + } + else if ('h' in color) { + writeUint16(writer, 1 /* ColorSpace.HSB */); + writeUint16(writer, Math.round(color.h * 0xffff)); + writeUint16(writer, Math.round(color.s * 0xffff)); + writeUint16(writer, Math.round(color.b * 0xffff)); + writeUint16(writer, 0); + } + else if ('c' in color) { + writeUint16(writer, 2 /* ColorSpace.CMYK */); + writeUint16(writer, Math.round(color.c * 257)); + writeUint16(writer, Math.round(color.m * 257)); + writeUint16(writer, Math.round(color.y * 257)); + writeUint16(writer, Math.round(color.k * 257)); + } + else { + writeUint16(writer, 8 /* ColorSpace.Grayscale */); + writeUint16(writer, Math.round(color.k * 10000 / 255)); + writeZeros(writer, 6); + } +} +exports.writeColor = writeColor; + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBzZFdyaXRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7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riter.js.map deleted file mode 100644 index 3652688..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/psdWriter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"psdWriter.js","sourceRoot":"../src/","sources":["psdWriter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,qCAImB;AACnB,mDAAuF;AACvF,mDAAoD;AAQpD,SAAgB,YAAY,CAAC,IAAW;IAAX,qBAAA,EAAA,WAAW;IACvC,IAAM,MAAM,GAAG,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC;IACrC,IAAM,IAAI,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;IAClC,IAAM,MAAM,GAAG,CAAC,CAAC;IACjB,OAAO,EAAE,MAAM,QAAA,EAAE,IAAI,MAAA,EAAE,MAAM,QAAA,EAAE,CAAC;AACjC,CAAC;AALD,oCAKC;AAED,SAAgB,eAAe,CAAC,MAAiB;IAChD,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;AAC9C,CAAC;AAFD,0CAEC;AAED,SAAgB,qBAAqB,CAAC,MAAiB;IACtD,OAAO,IAAI,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;AACxD,CAAC;AAFD,sDAEC;AAED,SAAgB,UAAU,CAAC,MAAiB,EAAE,KAAa;IAC1D,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAClC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AACrC,CAAC;AAHD,gCAGC;AAED,SAAgB,UAAU,CAAC,MAAiB,EAAE,KAAa;IAC1D,IAAM,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAClC,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,KAAK,EA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,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QAC/C,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QAC/C,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;QAC/C,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;KAC/C;SAAM;QACN,WAAW,CAAC,MAAM,+BAAuB,CAAC;QAC1C,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC;QACvD,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;KACtB;AACF,CAAC;AAvCD,gCAuCC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/text.d.ts b/npm-packages/mac-v2.4.x/ag-psd/dist/text.d.ts index 0c93ab4..80292b8 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/text.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/text.d.ts @@ -1,168 +1,168 @@ -import { LayerTextData } from './psd'; -interface Adjustments { - Axis: number[]; - XY: number[]; -} -interface TypeValues { - Type: number; - Values: number[]; -} -interface ParagraphProperties { - Justification?: number; - FirstLineIndent?: number; - StartIndent?: number; - EndIndent?: number; - SpaceBefore?: number; - SpaceAfter?: number; - AutoHyphenate?: boolean; - HyphenatedWordSize?: number; - PreHyphen?: number; - PostHyphen?: number; - ConsecutiveHyphens?: number; - Zone?: number; - WordSpacing?: number[]; - LetterSpacing?: number[]; - GlyphSpacing?: number[]; - AutoLeading?: number; - LeadingType?: number; - Hanging?: boolean; - Burasagari?: boolean; - KinsokuOrder?: number; - EveryLineComposer?: boolean; -} -interface ParagraphSheet { - Name?: string; - DefaultStyleSheet: number; - Properties: ParagraphProperties; -} -interface StyleSheetData { - Font?: number; - FontSize?: number; - FauxBold?: boolean; - FauxItalic?: boolean; - AutoLeading?: boolean; - Leading?: number; - HorizontalScale?: number; - VerticalScale?: number; - Tracking?: number; - AutoKerning?: boolean; - Kerning?: number; - BaselineShift?: number; - FontCaps?: number; - FontBaseline?: number; - Underline?: boolean; - Strikethrough?: boolean; - Ligatures?: boolean; - DLigatures?: boolean; - BaselineDirection?: number; - Tsume?: number; - StyleRunAlignment?: number; - Language?: number; - NoBreak?: boolean; - FillColor?: TypeValues; - StrokeColor?: TypeValues; - FillFlag?: boolean; - StrokeFlag?: boolean; - FillFirst?: boolean; - YUnderline?: number; - OutlineWidth?: number; - CharacterDirection?: number; - HindiNumbers?: boolean; - Kashida?: number; - DiacriticPos?: number; -} -interface FontSet { - Name: string; - Script: number; - FontType: number; - Synthetic: number; -} -interface ResourceDict { - KinsokuSet: any[]; - MojiKumiSet: any[]; - TheNormalStyleSheet: number; - TheNormalParagraphSheet: number; - ParagraphSheetSet: ParagraphSheet[]; - StyleSheetSet: { - Name: string; - StyleSheetData: StyleSheetData; - }[]; - FontSet: FontSet[]; - SuperscriptSize: number; - SuperscriptPosition: number; - SubscriptSize: number; - SubscriptPosition: number; - SmallCapSize: number; -} -interface ParagraphRun { - ParagraphSheet: ParagraphSheet; - Adjustments: Adjustments; -} -interface StyleRun { - StyleSheet: { - StyleSheetData: StyleSheetData; - }; -} -interface PhotoshopNode { - ShapeType?: number; - PointBase?: number[]; - BoxBounds?: number[]; - Base?: { - ShapeType: number; - TransformPoint0: number[]; - TransformPoint1: number[]; - TransformPoint2: number[]; - }; -} -interface EngineData { - EngineDict: { - Editor: { - Text: string; - }; - ParagraphRun: { - DefaultRunData: ParagraphRun; - RunArray: ParagraphRun[]; - RunLengthArray: number[]; - IsJoinable: number; - }; - StyleRun: { - DefaultRunData: StyleRun; - RunArray: StyleRun[]; - RunLengthArray: number[]; - IsJoinable: number; - }; - GridInfo: { - GridIsOn: boolean; - ShowGrid: boolean; - GridSize: number; - GridLeading: number; - GridColor: TypeValues; - GridLeadingFillColor: TypeValues; - AlignLineHeightToGridFlags: boolean; - }; - AntiAlias: number; - UseFractionalGlyphWidths: boolean; - Rendered?: { - Version: number; - Shapes?: { - WritingDirection: number; - Children?: { - ShapeType?: number; - Procession: number; - Lines: { - WritingDirection: number; - Children: any[]; - }; - Cookie?: { - Photoshop?: PhotoshopNode; - }; - }[]; - }; - }; - }; - ResourceDict: ResourceDict; - DocumentResources: ResourceDict; -} -export declare function decodeEngineData(engineData: EngineData): LayerTextData; -export declare function encodeEngineData(data: LayerTextData): EngineData; -export {}; +import { LayerTextData } from './psd'; +interface Adjustments { + Axis: number[]; + XY: number[]; +} +interface TypeValues { + Type: number; + Values: number[]; +} +interface ParagraphProperties { + Justification?: number; + FirstLineIndent?: number; + StartIndent?: number; + EndIndent?: number; + SpaceBefore?: number; + SpaceAfter?: number; + AutoHyphenate?: boolean; + HyphenatedWordSize?: number; + PreHyphen?: number; + PostHyphen?: number; + ConsecutiveHyphens?: number; + Zone?: number; + WordSpacing?: number[]; + LetterSpacing?: number[]; + GlyphSpacing?: number[]; + AutoLeading?: number; + LeadingType?: number; + Hanging?: boolean; + Burasagari?: boolean; + KinsokuOrder?: number; + EveryLineComposer?: boolean; +} +interface ParagraphSheet { + Name?: string; + DefaultStyleSheet: number; + Properties: ParagraphProperties; +} +interface StyleSheetData { + Font?: number; + FontSize?: number; + FauxBold?: boolean; + FauxItalic?: boolean; + AutoLeading?: boolean; + Leading?: number; + HorizontalScale?: number; + VerticalScale?: number; + Tracking?: number; + AutoKerning?: boolean; + Kerning?: number; + BaselineShift?: number; + FontCaps?: number; + FontBaseline?: number; + Underline?: boolean; + Strikethrough?: boolean; + Ligatures?: boolean; + DLigatures?: boolean; + BaselineDirection?: number; + Tsume?: number; + StyleRunAlignment?: number; + Language?: number; + NoBreak?: boolean; + FillColor?: TypeValues; + StrokeColor?: TypeValues; + FillFlag?: boolean; + StrokeFlag?: boolean; + FillFirst?: boolean; + YUnderline?: number; + OutlineWidth?: number; + CharacterDirection?: number; + HindiNumbers?: boolean; + Kashida?: number; + DiacriticPos?: number; +} +interface FontSet { + Name: string; + Script: number; + FontType: number; + Synthetic: number; +} +interface ResourceDict { + KinsokuSet: any[]; + MojiKumiSet: any[]; + TheNormalStyleSheet: number; + TheNormalParagraphSheet: number; + ParagraphSheetSet: ParagraphSheet[]; + StyleSheetSet: { + Name: string; + StyleSheetData: StyleSheetData; + }[]; + FontSet: FontSet[]; + SuperscriptSize: number; + SuperscriptPosition: number; + SubscriptSize: number; + SubscriptPosition: number; + SmallCapSize: number; +} +interface ParagraphRun { + ParagraphSheet: ParagraphSheet; + Adjustments: Adjustments; +} +interface StyleRun { + StyleSheet: { + StyleSheetData: StyleSheetData; + }; +} +interface PhotoshopNode { + ShapeType?: number; + PointBase?: number[]; + BoxBounds?: number[]; + Base?: { + ShapeType: number; + TransformPoint0: number[]; + TransformPoint1: number[]; + TransformPoint2: number[]; + }; +} +interface EngineData { + EngineDict: { + Editor: { + Text: string; + }; + ParagraphRun: { + DefaultRunData: ParagraphRun; + RunArray: ParagraphRun[]; + RunLengthArray: number[]; + IsJoinable: number; + }; + StyleRun: { + DefaultRunData: StyleRun; + RunArray: StyleRun[]; + RunLengthArray: number[]; + IsJoinable: number; + }; + GridInfo: { + GridIsOn: boolean; + ShowGrid: boolean; + GridSize: number; + GridLeading: number; + GridColor: TypeValues; + GridLeadingFillColor: TypeValues; + AlignLineHeightToGridFlags: boolean; + }; + AntiAlias: number; + UseFractionalGlyphWidths: boolean; + Rendered?: { + Version: number; + Shapes?: { + WritingDirection: number; + Children?: { + ShapeType?: number; + Procession: number; + Lines: { + WritingDirection: number; + Children: any[]; + }; + Cookie?: { + Photoshop?: PhotoshopNode; + }; + }[]; + }; + }; + }; + ResourceDict: ResourceDict; + DocumentResources: ResourceDict; +} +export declare function decodeEngineData(engineData: EngineData): LayerTextData; +export declare function encodeEngineData(data: LayerTextData): EngineData; +export {}; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/text.js b/npm-packages/mac-v2.4.x/ag-psd/dist/text.js index c4a23ce..9a4bcc4 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/text.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/text.js @@ -1,559 +1,558 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.encodeEngineData = exports.decodeEngineData = void 0; -var defaultFont = { - name: 'MyriadPro-Regular', - script: 0, - type: 0, - synthetic: 0, -}; -var defaultParagraphStyle = { - justification: 'left', - firstLineIndent: 0, - startIndent: 0, - endIndent: 0, - spaceBefore: 0, - spaceAfter: 0, - autoHyphenate: true, - hyphenatedWordSize: 6, - preHyphen: 2, - postHyphen: 2, - consecutiveHyphens: 8, - zone: 36, - wordSpacing: [0.8, 1, 1.33], - letterSpacing: [0, 0, 0], - glyphSpacing: [1, 1, 1], - autoLeading: 1.2, - leadingType: 0, - hanging: false, - burasagari: false, - kinsokuOrder: 0, - everyLineComposer: false, -}; -var defaultStyle = { - font: defaultFont, - fontSize: 12, - fauxBold: false, - fauxItalic: false, - autoLeading: true, - leading: 0, - horizontalScale: 1, - verticalScale: 1, - tracking: 0, - autoKerning: true, - kerning: 0, - baselineShift: 0, - fontCaps: 0, - fontBaseline: 0, - underline: false, - strikethrough: false, - ligatures: true, - dLigatures: false, - baselineDirection: 2, - tsume: 0, - styleRunAlignment: 2, - language: 0, - noBreak: false, - fillColor: { r: 0, g: 0, b: 0 }, - strokeColor: { r: 0, g: 0, b: 0 }, - fillFlag: true, - strokeFlag: false, - fillFirst: true, - yUnderline: 1, - outlineWidth: 1, - characterDirection: 0, - hindiNumbers: false, - kashida: 1, - diacriticPos: 2, -}; -var defaultGridInfo = { - isOn: false, - show: false, - size: 18, - leading: 22, - color: { r: 0, g: 0, b: 255 }, - leadingFillColor: { r: 0, g: 0, b: 255 }, - alignLineHeightToGridFlags: false, -}; -var paragraphStyleKeys = [ - 'justification', 'firstLineIndent', 'startIndent', 'endIndent', 'spaceBefore', 'spaceAfter', - 'autoHyphenate', 'hyphenatedWordSize', 'preHyphen', 'postHyphen', 'consecutiveHyphens', - 'zone', 'wordSpacing', 'letterSpacing', 'glyphSpacing', 'autoLeading', 'leadingType', - 'hanging', 'burasagari', 'kinsokuOrder', 'everyLineComposer', -]; -var styleKeys = [ - 'font', 'fontSize', 'fauxBold', 'fauxItalic', 'autoLeading', 'leading', 'horizontalScale', - 'verticalScale', 'tracking', 'autoKerning', 'kerning', 'baselineShift', 'fontCaps', 'fontBaseline', - 'underline', 'strikethrough', 'ligatures', 'dLigatures', 'baselineDirection', 'tsume', - 'styleRunAlignment', 'language', 'noBreak', 'fillColor', 'strokeColor', 'fillFlag', - 'strokeFlag', 'fillFirst', 'yUnderline', 'outlineWidth', 'characterDirection', 'hindiNumbers', - 'kashida', 'diacriticPos', -]; -var antialias = ['none', 'crisp', 'strong', 'smooth', 'sharp']; -var justification = ['left', 'right', 'center']; -function upperFirst(value) { - return value.substr(0, 1).toUpperCase() + value.substr(1); -} -function decodeColor(color) { - var c = color.Values; - if (color.Type === 0) { // grayscale - return { r: c[1] * 255, g: c[1] * 255, b: c[1] * 255 }; // , c[0] * 255]; - } - else { // rgb - return { r: c[1] * 255, g: c[2] * 255, b: c[3] * 255, a: c[0] }; // , c[0] * 255]; - } -} -function encodeColor(color) { - if (color && 'r' in color) { - return ['a' in color ? color.a : 1, color.r / 255, color.g / 255, color.b / 255]; - } - else { - return [0, 0, 0, 0]; - } -} -function arraysEqual(a, b) { - if (!a || !b) - return false; - if (a.length !== b.length) - return false; - for (var i = 0; i < a.length; i++) - if (a[i] !== b[i]) - return false; - return true; -} -function objectsEqual(a, b) { - if (!a || !b) - return false; - for (var _i = 0, _a = Object.keys(a); _i < _a.length; _i++) { - var key = _a[_i]; - if (a[key] !== b[key]) - return false; - } - for (var _b = 0, _c = Object.keys(b); _b < _c.length; _b++) { - var key = _c[_b]; - if (a[key] !== b[key]) - return false; - } - return true; -} -function findOrAddFont(fonts, font) { - for (var i = 0; i < fonts.length; i++) { - if (fonts[i].name === font.name) - return i; - } - fonts.push(font); - return fonts.length - 1; -} -function decodeObject(obj, keys, fonts) { - var result = {}; - for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { - var key = keys_1[_i]; - var Key = upperFirst(key); - if (obj[Key] === undefined) - continue; - if (key === 'justification') { - result[key] = justification[obj[Key]]; - } - else if (key === 'font') { - result[key] = fonts[obj[Key]]; - } - else if (key === 'fillColor' || key === 'strokeColor') { - result[key] = decodeColor(obj[Key]); - } - else { - result[key] = obj[Key]; - } - } - return result; -} -function encodeObject(obj, keys, fonts) { - var _a; - var result = {}; - for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) { - var key = keys_2[_i]; - var Key = upperFirst(key); - if (obj[key] === undefined) - continue; - if (key === 'justification') { - result[Key] = justification.indexOf((_a = obj[key]) !== null && _a !== void 0 ? _a : 'left'); - } - else if (key === 'font') { - result[Key] = findOrAddFont(fonts, obj[key]); - } - else if (key === 'fillColor' || key === 'strokeColor') { - result[Key] = { Type: 1, Values: encodeColor(obj[key]) }; - } - else { - result[Key] = obj[key]; - } - } - return result; -} -function decodeParagraphStyle(obj, fonts) { - return decodeObject(obj, paragraphStyleKeys, fonts); -} -function decodeStyle(obj, fonts) { - return decodeObject(obj, styleKeys, fonts); -} -function encodeParagraphStyle(obj, fonts) { - return encodeObject(obj, paragraphStyleKeys, fonts); -} -function encodeStyle(obj, fonts) { - return encodeObject(obj, styleKeys, fonts); -} -function deduplicateValues(base, runs, keys) { - if (!runs.length) - return; - var _loop_1 = function (key) { - var value = runs[0].style[key]; - if (value !== undefined) { - var identical = false; - if (Array.isArray(value)) { - identical = runs.every(function (r) { return arraysEqual(r.style[key], value); }); - } - else if (typeof value === 'object') { - identical = runs.every(function (r) { return objectsEqual(r.style[key], value); }); - } - else { - identical = runs.every(function (r) { return r.style[key] === value; }); - } - if (identical) { - base[key] = value; - } - } - var styleValue = base[key]; - if (styleValue !== undefined) { - for (var _a = 0, runs_1 = runs; _a < runs_1.length; _a++) { - var r = runs_1[_a]; - var same = false; - if (Array.isArray(value)) { - same = arraysEqual(r.style[key], value); - } - else if (typeof value === 'object') { - same = objectsEqual(r.style[key], value); - } - else { - same = r.style[key] === value; - } - if (same) - delete r.style[key]; - } - } - }; - for (var _i = 0, keys_3 = keys; _i < keys_3.length; _i++) { - var key = keys_3[_i]; - _loop_1(key); - } - if (runs.every(function (x) { return Object.keys(x.style).length === 0; })) { - runs.length = 0; - } -} -function decodeEngineData(engineData) { - var _a, _b, _c, _d, _e, _f; - // console.log('engineData', require('util').inspect(engineData, false, 99, true)); - var engineDict = engineData.EngineDict; - var resourceDict = engineData.ResourceDict; - var fonts = resourceDict.FontSet.map(function (f) { return ({ - name: f.Name, - script: f.Script, - type: f.FontType, - synthetic: f.Synthetic, - }); }); - var text = engineDict.Editor.Text.replace(/\r/g, '\n'); - var removedCharacters = 0; - while (/\n$/.test(text)) { - text = text.substr(0, text.length - 1); - removedCharacters++; - } - var result = { - text: text, - antiAlias: (_a = antialias[engineDict.AntiAlias]) !== null && _a !== void 0 ? _a : 'smooth', - useFractionalGlyphWidths: !!engineDict.UseFractionalGlyphWidths, - superscriptSize: resourceDict.SuperscriptSize, - superscriptPosition: resourceDict.SuperscriptPosition, - subscriptSize: resourceDict.SubscriptSize, - subscriptPosition: resourceDict.SubscriptPosition, - smallCapSize: resourceDict.SmallCapSize, - }; - // shape - var photoshop = (_f = (_e = (_d = (_c = (_b = engineDict.Rendered) === null || _b === void 0 ? void 0 : _b.Shapes) === null || _c === void 0 ? void 0 : _c.Children) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.Cookie) === null || _f === void 0 ? void 0 : _f.Photoshop; - if (photoshop) { - result.shapeType = photoshop.ShapeType === 1 ? 'box' : 'point'; - if (photoshop.PointBase) - result.pointBase = photoshop.PointBase; - if (photoshop.BoxBounds) - result.boxBounds = photoshop.BoxBounds; - } - // paragraph style - // const theNormalParagraphSheet = resourceDict.TheNormalParagraphSheet; - // const paragraphSheetSet = resourceDict.ParagraphSheetSet; - // const paragraphProperties = paragraphSheetSet[theNormalParagraphSheet].Properties; - var paragraphRun = engineData.EngineDict.ParagraphRun; - result.paragraphStyle = {}; // decodeParagraphStyle(paragraphProperties, fonts); - result.paragraphStyleRuns = []; - for (var i = 0; i < paragraphRun.RunArray.length; i++) { - var run_1 = paragraphRun.RunArray[i]; - var length_1 = paragraphRun.RunLengthArray[i]; - var style = decodeParagraphStyle(run_1.ParagraphSheet.Properties, fonts); - // const adjustments = { - // axis: run.Adjustments.Axis, - // xy: run.Adjustments.XY, - // }; - result.paragraphStyleRuns.push({ length: length_1, style: style /*, adjustments*/ }); - } - for (var counter = removedCharacters; result.paragraphStyleRuns.length && counter > 0; counter--) { - if (--result.paragraphStyleRuns[result.paragraphStyleRuns.length - 1].length === 0) { - result.paragraphStyleRuns.pop(); - } - } - deduplicateValues(result.paragraphStyle, result.paragraphStyleRuns, paragraphStyleKeys); - if (!result.paragraphStyleRuns.length) - delete result.paragraphStyleRuns; - // style - // const theNormalStyleSheet = resourceDict.TheNormalStyleSheet; - // const styleSheetSet = resourceDict.StyleSheetSet; - // const styleSheetData = styleSheetSet[theNormalStyleSheet].StyleSheetData; - var styleRun = engineData.EngineDict.StyleRun; - result.style = {}; // decodeStyle(styleSheetData, fonts); - result.styleRuns = []; - for (var i = 0; i < styleRun.RunArray.length; i++) { - var length_2 = styleRun.RunLengthArray[i]; - var style = decodeStyle(styleRun.RunArray[i].StyleSheet.StyleSheetData, fonts); - if (!style.font) - style.font = fonts[0]; - result.styleRuns.push({ length: length_2, style: style }); - } - for (var counter = removedCharacters; result.styleRuns.length && counter > 0; counter--) { - if (--result.styleRuns[result.styleRuns.length - 1].length === 0) { - result.styleRuns.pop(); - } - } - deduplicateValues(result.style, result.styleRuns, styleKeys); - if (!result.styleRuns.length) - delete result.styleRuns; - return result; -} -exports.decodeEngineData = decodeEngineData; -function encodeEngineData(data) { - var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; - var text = "".concat((data.text || '').replace(/\r?\n/g, '\r'), "\r"); - var fonts = [ - { name: 'AdobeInvisFont', script: 0, type: 0, synthetic: 0 }, - ]; - var defFont = ((_a = data.style) === null || _a === void 0 ? void 0 : _a.font) || ((_c = (_b = data.styleRuns) === null || _b === void 0 ? void 0 : _b.find(function (s) { return s.style.font; })) === null || _c === void 0 ? void 0 : _c.style.font) || defaultFont; - var paragraphRunArray = []; - var paragraphRunLengthArray = []; - var paragraphRuns = data.paragraphStyleRuns; - if (paragraphRuns && paragraphRuns.length) { - var leftLength_1 = text.length; - for (var _i = 0, paragraphRuns_1 = paragraphRuns; _i < paragraphRuns_1.length; _i++) { - var run_2 = paragraphRuns_1[_i]; - var runLength = Math.min(run_2.length, leftLength_1); - leftLength_1 -= runLength; - if (!runLength) - continue; // ignore 0 size runs - // extend last run if it's only for trailing \r - if (leftLength_1 === 1 && run_2 === paragraphRuns[paragraphRuns.length - 1]) { - runLength++; - leftLength_1--; - } - paragraphRunLengthArray.push(runLength); - paragraphRunArray.push({ - ParagraphSheet: { - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle(__assign(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), run_2.style), fonts), - }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }); - } - if (leftLength_1) { - paragraphRunLengthArray.push(leftLength_1); - paragraphRunArray.push({ - ParagraphSheet: { - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), - }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }); - } - } - else { - for (var i = 0, last = 0; i < text.length; i++) { - if (text.charCodeAt(i) === 13) { // \r - paragraphRunLengthArray.push(i - last + 1); - paragraphRunArray.push({ - ParagraphSheet: { - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), - }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }); - last = i + 1; - } - } - } - var styleSheetData = encodeStyle(__assign(__assign({}, defaultStyle), { font: defFont }), fonts); - var styleRuns = data.styleRuns || [{ length: text.length, style: data.style || {} }]; - var styleRunArray = []; - var styleRunLengthArray = []; - var leftLength = text.length; - for (var _o = 0, styleRuns_1 = styleRuns; _o < styleRuns_1.length; _o++) { - var run_3 = styleRuns_1[_o]; - var runLength = Math.min(run_3.length, leftLength); - leftLength -= runLength; - if (!runLength) - continue; // ignore 0 size runs - // extend last run if it's only for trailing \r - if (leftLength === 1 && run_3 === styleRuns[styleRuns.length - 1]) { - runLength++; - leftLength--; - } - styleRunLengthArray.push(runLength); - styleRunArray.push({ - StyleSheet: { - StyleSheetData: encodeStyle(__assign(__assign({ kerning: 0, autoKerning: true, fillColor: { r: 0, g: 0, b: 0 } }, data.style), run_3.style), fonts), - }, - }); - } - // add extra run to the end if existing ones didn't fill it up - if (leftLength && styleRuns.length) { - styleRunLengthArray.push(leftLength); - styleRunArray.push({ - StyleSheet: { - StyleSheetData: encodeStyle(__assign({ kerning: 0, autoKerning: true, fillColor: { r: 0, g: 0, b: 0 } }, data.style), fonts), - }, - }); - } - var gridInfo = __assign(__assign({}, defaultGridInfo), data.gridInfo); - var WritingDirection = data.orientation === 'vertical' ? 2 : 0; - var Procession = data.orientation === 'vertical' ? 1 : 0; - var ShapeType = data.shapeType === 'box' ? 1 : 0; - var Photoshop = { - ShapeType: ShapeType, - }; - if (ShapeType === 0) { - Photoshop.PointBase = data.pointBase || [0, 0]; - } - else { - Photoshop.BoxBounds = data.boxBounds || [0, 0, 0, 0]; - } - // needed for correct order of properties - Photoshop.Base = { - ShapeType: ShapeType, - TransformPoint0: [1, 0], - TransformPoint1: [0, 1], - TransformPoint2: [0, 0], - }; - var defaultResources = { - KinsokuSet: [ - { - Name: 'PhotoshopKinsokuHard', - NoStart: '、。,.・:;?!ー―’”)〕]}〉》」』】ヽヾゝゞ々ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ゛゜?!)]},.:;℃℉¢%‰', - NoEnd: '‘“(〔[{〈《「『【([{¥$£@§〒#', - Keep: '―‥', - Hanging: '、。.,', - }, - { - Name: 'PhotoshopKinsokuSoft', - NoStart: '、。,.・:;?!’”)〕]}〉》」』】ヽヾゝゞ々', - NoEnd: '‘“(〔[{〈《「『【', - Keep: '―‥', - Hanging: '、。.,', - }, - ], - MojiKumiSet: [ - { InternalName: 'Photoshop6MojiKumiSet1' }, - { InternalName: 'Photoshop6MojiKumiSet2' }, - { InternalName: 'Photoshop6MojiKumiSet3' }, - { InternalName: 'Photoshop6MojiKumiSet4' }, - ], - TheNormalStyleSheet: 0, - TheNormalParagraphSheet: 0, - ParagraphSheetSet: [ - { - Name: 'Normal RGB', - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), - }, - ], - StyleSheetSet: [ - { - Name: 'Normal RGB', - StyleSheetData: styleSheetData, - }, - ], - FontSet: fonts.map(function (f) { return ({ - Name: f.name, - Script: f.script || 0, - FontType: f.type || 0, - Synthetic: f.synthetic || 0, - }); }), - SuperscriptSize: (_d = data.superscriptSize) !== null && _d !== void 0 ? _d : 0.583, - SuperscriptPosition: (_e = data.superscriptPosition) !== null && _e !== void 0 ? _e : 0.333, - SubscriptSize: (_f = data.subscriptSize) !== null && _f !== void 0 ? _f : 0.583, - SubscriptPosition: (_g = data.subscriptPosition) !== null && _g !== void 0 ? _g : 0.333, - SmallCapSize: (_h = data.smallCapSize) !== null && _h !== void 0 ? _h : 0.7, - }; - var engineData = { - EngineDict: { - Editor: { Text: text }, - ParagraphRun: { - DefaultRunData: { - ParagraphSheet: { DefaultStyleSheet: 0, Properties: {} }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }, - RunArray: paragraphRunArray, - RunLengthArray: paragraphRunLengthArray, - IsJoinable: 1, - }, - StyleRun: { - DefaultRunData: { StyleSheet: { StyleSheetData: {} } }, - RunArray: styleRunArray, - RunLengthArray: styleRunLengthArray, - IsJoinable: 2, - }, - GridInfo: { - GridIsOn: !!gridInfo.isOn, - ShowGrid: !!gridInfo.show, - GridSize: (_j = gridInfo.size) !== null && _j !== void 0 ? _j : 18, - GridLeading: (_k = gridInfo.leading) !== null && _k !== void 0 ? _k : 22, - GridColor: { Type: 1, Values: encodeColor(gridInfo.color) }, - GridLeadingFillColor: { Type: 1, Values: encodeColor(gridInfo.color) }, - AlignLineHeightToGridFlags: !!gridInfo.alignLineHeightToGridFlags, - }, - AntiAlias: antialias.indexOf((_l = data.antiAlias) !== null && _l !== void 0 ? _l : 'sharp'), - UseFractionalGlyphWidths: (_m = data.useFractionalGlyphWidths) !== null && _m !== void 0 ? _m : true, - Rendered: { - Version: 1, - Shapes: { - WritingDirection: WritingDirection, - Children: [ - { - ShapeType: ShapeType, - Procession: Procession, - Lines: { WritingDirection: WritingDirection, Children: [] }, - Cookie: { Photoshop: Photoshop }, - }, - ], - }, - }, - }, - ResourceDict: __assign({}, defaultResources), - DocumentResources: __assign({}, defaultResources), - }; - // console.log('encodeEngineData', require('util').inspect(engineData, false, 99, true)); - return engineData; -} -exports.encodeEngineData = encodeEngineData; -//# sourceMappingURL=text.js.map \ No newline at end of file +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.encodeEngineData = exports.decodeEngineData = void 0; +var defaultFont = { + name: 'MyriadPro-Regular', + script: 0, + type: 0, + synthetic: 0, +}; +var defaultParagraphStyle = { + justification: 'left', + firstLineIndent: 0, + startIndent: 0, + endIndent: 0, + spaceBefore: 0, + spaceAfter: 0, + autoHyphenate: true, + hyphenatedWordSize: 6, + preHyphen: 2, + postHyphen: 2, + consecutiveHyphens: 8, + zone: 36, + wordSpacing: [0.8, 1, 1.33], + letterSpacing: [0, 0, 0], + glyphSpacing: [1, 1, 1], + autoLeading: 1.2, + leadingType: 0, + hanging: false, + burasagari: false, + kinsokuOrder: 0, + everyLineComposer: false, +}; +var defaultStyle = { + font: defaultFont, + fontSize: 12, + fauxBold: false, + fauxItalic: false, + autoLeading: true, + leading: 0, + horizontalScale: 1, + verticalScale: 1, + tracking: 0, + autoKerning: true, + kerning: 0, + baselineShift: 0, + fontCaps: 0, + fontBaseline: 0, + underline: false, + strikethrough: false, + ligatures: true, + dLigatures: false, + baselineDirection: 2, + tsume: 0, + styleRunAlignment: 2, + language: 0, + noBreak: false, + fillColor: { r: 0, g: 0, b: 0 }, + strokeColor: { r: 0, g: 0, b: 0 }, + fillFlag: true, + strokeFlag: false, + fillFirst: true, + yUnderline: 1, + outlineWidth: 1, + characterDirection: 0, + hindiNumbers: false, + kashida: 1, + diacriticPos: 2, +}; +var defaultGridInfo = { + isOn: false, + show: false, + size: 18, + leading: 22, + color: { r: 0, g: 0, b: 255 }, + leadingFillColor: { r: 0, g: 0, b: 255 }, + alignLineHeightToGridFlags: false, +}; +var paragraphStyleKeys = [ + 'justification', 'firstLineIndent', 'startIndent', 'endIndent', 'spaceBefore', 'spaceAfter', + 'autoHyphenate', 'hyphenatedWordSize', 'preHyphen', 'postHyphen', 'consecutiveHyphens', + 'zone', 'wordSpacing', 'letterSpacing', 'glyphSpacing', 'autoLeading', 'leadingType', + 'hanging', 'burasagari', 'kinsokuOrder', 'everyLineComposer', +]; +var styleKeys = [ + 'font', 'fontSize', 'fauxBold', 'fauxItalic', 'autoLeading', 'leading', 'horizontalScale', + 'verticalScale', 'tracking', 'autoKerning', 'kerning', 'baselineShift', 'fontCaps', 'fontBaseline', + 'underline', 'strikethrough', 'ligatures', 'dLigatures', 'baselineDirection', 'tsume', + 'styleRunAlignment', 'language', 'noBreak', 'fillColor', 'strokeColor', 'fillFlag', + 'strokeFlag', 'fillFirst', 'yUnderline', 'outlineWidth', 'characterDirection', 'hindiNumbers', + 'kashida', 'diacriticPos', +]; +var antialias = ['none', 'crisp', 'strong', 'smooth', 'sharp']; +var justification = ['left', 'right', 'center']; +function upperFirst(value) { + return value.substr(0, 1).toUpperCase() + value.substr(1); +} +function decodeColor(color) { + var c = color.Values; + if (color.Type === 0) { // grayscale + return { r: c[1] * 255, g: c[1] * 255, b: c[1] * 255 }; // , c[0] * 255]; + } + else { // rgb + return { r: c[1] * 255, g: c[2] * 255, b: c[3] * 255, a: c[0] }; // , c[0] * 255]; + } +} +function encodeColor(color) { + if (color && 'r' in color) { + return ['a' in color ? color.a : 1, color.r / 255, color.g / 255, color.b / 255]; + } + else { + return [0, 0, 0, 0]; + } +} +function arraysEqual(a, b) { + if (!a || !b) + return false; + if (a.length !== b.length) + return false; + for (var i = 0; i < a.length; i++) + if (a[i] !== b[i]) + return false; + return true; +} +function objectsEqual(a, b) { + if (!a || !b) + return false; + for (var _i = 0, _a = Object.keys(a); _i < _a.length; _i++) { + var key = _a[_i]; + if (a[key] !== b[key]) + return false; + } + for (var _b = 0, _c = Object.keys(b); _b < _c.length; _b++) { + var key = _c[_b]; + if (a[key] !== b[key]) + return false; + } + return true; +} +function findOrAddFont(fonts, font) { + for (var i = 0; i < fonts.length; i++) { + if (fonts[i].name === font.name) + return i; + } + fonts.push(font); + return fonts.length - 1; +} +function decodeObject(obj, keys, fonts) { + var result = {}; + for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) { + var key = keys_1[_i]; + var Key = upperFirst(key); + if (obj[Key] === undefined) + continue; + if (key === 'justification') { + result[key] = justification[obj[Key]]; + } + else if (key === 'font') { + result[key] = fonts[obj[Key]]; + } + else if (key === 'fillColor' || key === 'strokeColor') { + result[key] = decodeColor(obj[Key]); + } + else { + result[key] = obj[Key]; + } + } + return result; +} +function encodeObject(obj, keys, fonts) { + var _a; + var result = {}; + for (var _i = 0, keys_2 = keys; _i < keys_2.length; _i++) { + var key = keys_2[_i]; + var Key = upperFirst(key); + if (obj[key] === undefined) + continue; + if (key === 'justification') { + result[Key] = justification.indexOf((_a = obj[key]) !== null && _a !== void 0 ? _a : 'left'); + } + else if (key === 'font') { + result[Key] = findOrAddFont(fonts, obj[key]); + } + else if (key === 'fillColor' || key === 'strokeColor') { + result[Key] = { Type: 1, Values: encodeColor(obj[key]) }; + } + else { + result[Key] = obj[key]; + } + } + return result; +} +function decodeParagraphStyle(obj, fonts) { + return decodeObject(obj, paragraphStyleKeys, fonts); +} +function decodeStyle(obj, fonts) { + return decodeObject(obj, styleKeys, fonts); +} +function encodeParagraphStyle(obj, fonts) { + return encodeObject(obj, paragraphStyleKeys, fonts); +} +function encodeStyle(obj, fonts) { + return encodeObject(obj, styleKeys, fonts); +} +function deduplicateValues(base, runs, keys) { + if (!runs.length) + return; + var _loop_1 = function (key) { + var value = runs[0].style[key]; + if (value !== undefined) { + var identical = false; + if (Array.isArray(value)) { + identical = runs.every(function (r) { return arraysEqual(r.style[key], value); }); + } + else if (typeof value === 'object') { + identical = runs.every(function (r) { return objectsEqual(r.style[key], value); }); + } + else { + identical = runs.every(function (r) { return r.style[key] === value; }); + } + if (identical) { + base[key] = value; + } + } + var styleValue = base[key]; + if (styleValue !== undefined) { + for (var _a = 0, runs_1 = runs; _a < runs_1.length; _a++) { + var r = runs_1[_a]; + var same = false; + if (Array.isArray(value)) { + same = arraysEqual(r.style[key], value); + } + else if (typeof value === 'object') { + same = objectsEqual(r.style[key], value); + } + else { + same = r.style[key] === value; + } + if (same) + delete r.style[key]; + } + } + }; + for (var _i = 0, keys_3 = keys; _i < keys_3.length; _i++) { + var key = keys_3[_i]; + _loop_1(key); + } + if (runs.every(function (x) { return Object.keys(x.style).length === 0; })) { + runs.length = 0; + } +} +function decodeEngineData(engineData) { + var _a, _b, _c, _d, _e, _f; + // console.log('engineData', require('util').inspect(engineData, false, 99, true)); + var engineDict = engineData.EngineDict; + var resourceDict = engineData.ResourceDict; + var fonts = resourceDict.FontSet.map(function (f) { return ({ + name: f.Name, + script: f.Script, + type: f.FontType, + synthetic: f.Synthetic, + }); }); + var text = engineDict.Editor.Text.replace(/\r/g, '\n'); + var removedCharacters = 0; + while (/\n$/.test(text)) { + text = text.substr(0, text.length - 1); + removedCharacters++; + } + var result = { + text: text, + antiAlias: (_a = antialias[engineDict.AntiAlias]) !== null && _a !== void 0 ? _a : 'smooth', + useFractionalGlyphWidths: !!engineDict.UseFractionalGlyphWidths, + superscriptSize: resourceDict.SuperscriptSize, + superscriptPosition: resourceDict.SuperscriptPosition, + subscriptSize: resourceDict.SubscriptSize, + subscriptPosition: resourceDict.SubscriptPosition, + smallCapSize: resourceDict.SmallCapSize, + }; + // shape + var photoshop = (_f = (_e = (_d = (_c = (_b = engineDict.Rendered) === null || _b === void 0 ? void 0 : _b.Shapes) === null || _c === void 0 ? void 0 : _c.Children) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.Cookie) === null || _f === void 0 ? void 0 : _f.Photoshop; + if (photoshop) { + result.shapeType = photoshop.ShapeType === 1 ? 'box' : 'point'; + if (photoshop.PointBase) + result.pointBase = photoshop.PointBase; + if (photoshop.BoxBounds) + result.boxBounds = photoshop.BoxBounds; + } + // paragraph style + // const theNormalParagraphSheet = resourceDict.TheNormalParagraphSheet; + // const paragraphSheetSet = resourceDict.ParagraphSheetSet; + // const paragraphProperties = paragraphSheetSet[theNormalParagraphSheet].Properties; + var paragraphRun = engineData.EngineDict.ParagraphRun; + result.paragraphStyle = {}; // decodeParagraphStyle(paragraphProperties, fonts); + result.paragraphStyleRuns = []; + for (var i = 0; i < paragraphRun.RunArray.length; i++) { + var run_1 = paragraphRun.RunArray[i]; + var length_1 = paragraphRun.RunLengthArray[i]; + var style = decodeParagraphStyle(run_1.ParagraphSheet.Properties, fonts); + // const adjustments = { + // axis: run.Adjustments.Axis, + // xy: run.Adjustments.XY, + // }; + result.paragraphStyleRuns.push({ length: length_1, style: style /*, adjustments*/ }); + } + for (var counter = removedCharacters; result.paragraphStyleRuns.length && counter > 0; counter--) { + if (--result.paragraphStyleRuns[result.paragraphStyleRuns.length - 1].length === 0) { + result.paragraphStyleRuns.pop(); + } + } + deduplicateValues(result.paragraphStyle, result.paragraphStyleRuns, paragraphStyleKeys); + if (!result.paragraphStyleRuns.length) + delete result.paragraphStyleRuns; + // style + // const theNormalStyleSheet = resourceDict.TheNormalStyleSheet; + // const styleSheetSet = resourceDict.StyleSheetSet; + // const styleSheetData = styleSheetSet[theNormalStyleSheet].StyleSheetData; + var styleRun = engineData.EngineDict.StyleRun; + result.style = {}; // decodeStyle(styleSheetData, fonts); + result.styleRuns = []; + for (var i = 0; i < styleRun.RunArray.length; i++) { + var length_2 = styleRun.RunLengthArray[i]; + var style = decodeStyle(styleRun.RunArray[i].StyleSheet.StyleSheetData, fonts); + result.styleRuns.push({ length: length_2, style: style }); + } + for (var counter = removedCharacters; result.styleRuns.length && counter > 0; counter--) { + if (--result.styleRuns[result.styleRuns.length - 1].length === 0) { + result.styleRuns.pop(); + } + } + deduplicateValues(result.style, result.styleRuns, styleKeys); + if (!result.styleRuns.length) + delete result.styleRuns; + return result; +} +exports.decodeEngineData = decodeEngineData; +function encodeEngineData(data) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m; + var text = "".concat((data.text || '').replace(/\r?\n/g, '\r'), "\r"); + var fonts = [ + { name: 'AdobeInvisFont', script: 0, type: 0, synthetic: 0 }, + ]; + var defFont = ((_a = data.style) === null || _a === void 0 ? void 0 : _a.font) || ((_c = (_b = data.styleRuns) === null || _b === void 0 ? void 0 : _b.find(function (s) { return s.style.font; })) === null || _c === void 0 ? void 0 : _c.style.font) || defaultFont; + var paragraphRunArray = []; + var paragraphRunLengthArray = []; + var paragraphRuns = data.paragraphStyleRuns; + if (paragraphRuns && paragraphRuns.length) { + var leftLength_1 = text.length; + for (var _i = 0, paragraphRuns_1 = paragraphRuns; _i < paragraphRuns_1.length; _i++) { + var run_2 = paragraphRuns_1[_i]; + var runLength = Math.min(run_2.length, leftLength_1); + leftLength_1 -= runLength; + if (!runLength) + continue; // ignore 0 size runs + // extend last run if it's only for trailing \r + if (leftLength_1 === 1 && run_2 === paragraphRuns[paragraphRuns.length - 1]) { + runLength++; + leftLength_1--; + } + paragraphRunLengthArray.push(runLength); + paragraphRunArray.push({ + ParagraphSheet: { + DefaultStyleSheet: 0, + Properties: encodeParagraphStyle(__assign(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), run_2.style), fonts), + }, + Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, + }); + } + if (leftLength_1) { + paragraphRunLengthArray.push(leftLength_1); + paragraphRunArray.push({ + ParagraphSheet: { + DefaultStyleSheet: 0, + Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), + }, + Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, + }); + } + } + else { + for (var i = 0, last = 0; i < text.length; i++) { + if (text.charCodeAt(i) === 13) { // \r + paragraphRunLengthArray.push(i - last + 1); + paragraphRunArray.push({ + ParagraphSheet: { + DefaultStyleSheet: 0, + Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), + }, + Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, + }); + last = i + 1; + } + } + } + var styleSheetData = encodeStyle(__assign(__assign({}, defaultStyle), { font: defFont }), fonts); + var styleRuns = data.styleRuns || [{ length: text.length, style: data.style || {} }]; + var styleRunArray = []; + var styleRunLengthArray = []; + var leftLength = text.length; + for (var _o = 0, styleRuns_1 = styleRuns; _o < styleRuns_1.length; _o++) { + var run_3 = styleRuns_1[_o]; + var runLength = Math.min(run_3.length, leftLength); + leftLength -= runLength; + if (!runLength) + continue; // ignore 0 size runs + // extend last run if it's only for trailing \r + if (leftLength === 1 && run_3 === styleRuns[styleRuns.length - 1]) { + runLength++; + leftLength--; + } + styleRunLengthArray.push(runLength); + styleRunArray.push({ + StyleSheet: { + StyleSheetData: encodeStyle(__assign(__assign({ kerning: 0, autoKerning: true, fillColor: { r: 0, g: 0, b: 0 } }, data.style), run_3.style), fonts), + }, + }); + } + // add extra run to the end if existing ones didn't fill it up + if (leftLength && styleRuns.length) { + styleRunLengthArray.push(leftLength); + styleRunArray.push({ + StyleSheet: { + StyleSheetData: encodeStyle(__assign({ kerning: 0, autoKerning: true, fillColor: { r: 0, g: 0, b: 0 } }, data.style), fonts), + }, + }); + } + var gridInfo = __assign(__assign({}, defaultGridInfo), data.gridInfo); + var WritingDirection = data.orientation === 'vertical' ? 2 : 0; + var Procession = data.orientation === 'vertical' ? 1 : 0; + var ShapeType = data.shapeType === 'box' ? 1 : 0; + var Photoshop = { + ShapeType: ShapeType, + }; + if (ShapeType === 0) { + Photoshop.PointBase = data.pointBase || [0, 0]; + } + else { + Photoshop.BoxBounds = data.boxBounds || [0, 0, 0, 0]; + } + // needed for correct order of properties + Photoshop.Base = { + ShapeType: ShapeType, + TransformPoint0: [1, 0], + TransformPoint1: [0, 1], + TransformPoint2: [0, 0], + }; + var defaultResources = { + KinsokuSet: [ + { + Name: 'PhotoshopKinsokuHard', + NoStart: '、。,.・:;?!ー―’”)〕]}〉》」』】ヽヾゝゞ々ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ゛゜?!)]},.:;℃℉¢%‰', + NoEnd: '‘“(〔[{〈《「『【([{¥$£@§〒#', + Keep: '―‥', + Hanging: '、。.,', + }, + { + Name: 'PhotoshopKinsokuSoft', + NoStart: '、。,.・:;?!’”)〕]}〉》」』】ヽヾゝゞ々', + NoEnd: '‘“(〔[{〈《「『【', + Keep: '―‥', + Hanging: '、。.,', + }, + ], + MojiKumiSet: [ + { InternalName: 'Photoshop6MojiKumiSet1' }, + { InternalName: 'Photoshop6MojiKumiSet2' }, + { InternalName: 'Photoshop6MojiKumiSet3' }, + { InternalName: 'Photoshop6MojiKumiSet4' }, + ], + TheNormalStyleSheet: 0, + TheNormalParagraphSheet: 0, + ParagraphSheetSet: [ + { + Name: 'Normal RGB', + DefaultStyleSheet: 0, + Properties: encodeParagraphStyle(__assign(__assign({}, defaultParagraphStyle), data.paragraphStyle), fonts), + }, + ], + StyleSheetSet: [ + { + Name: 'Normal RGB', + StyleSheetData: styleSheetData, + }, + ], + FontSet: fonts.map(function (f) { return ({ + Name: f.name, + Script: f.script || 0, + FontType: f.type || 0, + Synthetic: f.synthetic || 0, + }); }), + SuperscriptSize: (_d = data.superscriptSize) !== null && _d !== void 0 ? _d : 0.583, + SuperscriptPosition: (_e = data.superscriptPosition) !== null && _e !== void 0 ? _e : 0.333, + SubscriptSize: (_f = data.subscriptSize) !== null && _f !== void 0 ? _f : 0.583, + SubscriptPosition: (_g = data.subscriptPosition) !== null && _g !== void 0 ? _g : 0.333, + SmallCapSize: (_h = data.smallCapSize) !== null && _h !== void 0 ? _h : 0.7, + }; + var engineData = { + EngineDict: { + Editor: { Text: text }, + ParagraphRun: { + DefaultRunData: { + ParagraphSheet: { DefaultStyleSheet: 0, Properties: {} }, + Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, + }, + RunArray: paragraphRunArray, + RunLengthArray: paragraphRunLengthArray, + IsJoinable: 1, + }, + StyleRun: { + DefaultRunData: { StyleSheet: { StyleSheetData: {} } }, + RunArray: styleRunArray, + RunLengthArray: styleRunLengthArray, + IsJoinable: 2, + }, + GridInfo: { + GridIsOn: !!gridInfo.isOn, + ShowGrid: !!gridInfo.show, + GridSize: (_j = gridInfo.size) !== null && _j !== void 0 ? _j : 18, + GridLeading: (_k = gridInfo.leading) !== null && _k !== void 0 ? _k : 22, + GridColor: { Type: 1, Values: encodeColor(gridInfo.color) }, + GridLeadingFillColor: { Type: 1, Values: encodeColor(gridInfo.color) }, + AlignLineHeightToGridFlags: !!gridInfo.alignLineHeightToGridFlags, + }, + AntiAlias: antialias.indexOf((_l = data.antiAlias) !== null && _l !== void 0 ? _l : 'sharp'), + UseFractionalGlyphWidths: (_m = data.useFractionalGlyphWidths) !== null && _m !== void 0 ? _m : true, + Rendered: { + Version: 1, + Shapes: { + WritingDirection: WritingDirection, + Children: [ + { + ShapeType: ShapeType, + Procession: Procession, + Lines: { WritingDirection: WritingDirection, Children: [] }, + Cookie: { Photoshop: Photoshop }, + }, + ], + }, + }, + }, + ResourceDict: __assign({}, defaultResources), + DocumentResources: __assign({}, defaultResources), + }; + // console.log('encodeEngineData', require('util').inspect(engineData, false, 99, true)); + return engineData; +} +exports.encodeEngineData = encodeEngineData; + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRleHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7QUF1S0EsSUFBTSxXQUFXLEdBQVM7SUFDekIsSUFBSSxFQUFFLG1CQUFtQjtJQUN6QixNQUFNLEVBQUUsQ0FBQztJQUNULElBQUksRUFBRSxDQUFDO0lBQ1AsU0FBUyxFQUFFLENBQUM7Q0FDWixDQUFDO0FBRUYsSUFBTSxxQkFBcUIsR0FBbUI7SUFDN0MsYUFBYSxFQUFFLE1BQU07SUFDckIsZUFBZSxFQUFFLENBQUM7SUFDbEIsV0FBVyxFQUFFLENBQUM7SUFDZCxTQUFTLEVBQUUsQ0FBQztJQUNaLFdBQVcsRUFBRSxDQUFDO0lBQ2QsVUFBVSxFQUFFLENBQUM7SUFDYixhQUFhLEVBQUUsSUFBSTtJQUNuQixrQkFBa0IsRUFBRSxDQUFDO0lBQ3JCLFNBQVMsRUFBRSxDQUFDO0lBQ1osVUFBVSxFQUFFLENBQUM7SU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cdFx0XHRcdFdyaXRpbmdEaXJlY3Rpb24sXHJcblx0XHRcdFx0XHRDaGlsZHJlbjogW1xyXG5cdFx0XHRcdFx0XHR7XHJcblx0XHRcdFx0XHRcdFx0U2hhcGVUeXBlLFxyXG5cdFx0XHRcdFx0XHRcdFByb2Nlc3Npb24sXHJcblx0XHRcdFx0XHRcdFx0TGluZXM6IHsgV3JpdGluZ0RpcmVjdGlvbiwgQ2hpbGRyZW46IFtdIH0sXHJcblx0XHRcdFx0XHRcdFx0Q29va2llOiB7IFBob3Rvc2hvcCB9LFxyXG5cdFx0XHRcdFx0XHR9LFxyXG5cdFx0XHRcdFx0XSxcclxuXHRcdFx0XHR9LFxyXG5cdFx0XHR9LFxyXG5cdFx0fSxcclxuXHRcdFJlc291cmNlRGljdDogeyAuLi5kZWZhdWx0UmVzb3VyY2VzIH0sXHJcblx0XHREb2N1bWVudFJlc291cmNlczogeyAuLi5kZWZhdWx0UmVzb3VyY2VzIH0sXHJcblx0fTtcclxuXHJcblx0Ly8gY29uc29sZS5sb2coJ2VuY29kZUVuZ2luZURhdGEnLCByZXF1aXJlKCd1dGlsJykuaW5zcGVjdChlbmdpbmVEYXRhLCBmYWxzZSwgOTksIHRydWUpKTtcclxuXHRyZXR1cm4gZW5naW5lRGF0YTtcclxufVxyXG4iXSwic291cmNlUm9vdCI6IkM6XFxQcm9qZWN0c1xcZ2l0aHViXFxhZy1wc2RcXHNyYyJ9 diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/text.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/text.js.map deleted file mode 100644 index abde3ce..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/text.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"text.js","sourceRoot":"../src/","sources":["text.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAuKA,IAAM,WAAW,GAAS;IACzB,IAAI,EAAE,mBAAmB;IACzB,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,CA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npm-packages/mac-v2.4.x/ag-psd/dist/utf8.d.ts +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/utf8.d.ts @@ -1,5 +1,5 @@ -/// -export declare function stringLengthInBytes(value: string): number; -export declare function encodeStringTo(buffer: Uint8Array | Buffer, offset: number, value: string): number; -export declare function encodeString(value: string): Uint8Array; -export declare function decodeString(value: Uint8Array): string; +/// +export declare function stringLengthInBytes(value: string): number; +export declare function encodeStringTo(buffer: Uint8Array | Buffer, offset: number, value: string): number; +export declare function encodeString(value: string): Uint8Array; +export declare function decodeString(value: Uint8Array): string; diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/utf8.js b/npm-packages/mac-v2.4.x/ag-psd/dist/utf8.js index 1ff1f67..ecba418 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/utf8.js +++ b/npm-packages/mac-v2.4.x/ag-psd/dist/utf8.js @@ -1,152 +1,153 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.decodeString = exports.encodeString = exports.encodeStringTo = exports.stringLengthInBytes = void 0; -function charLengthInBytes(code) { - if ((code & 0xffffff80) === 0) { - return 1; - } - else if ((code & 0xfffff800) === 0) { - return 2; - } - else if ((code & 0xffff0000) === 0) { - return 3; - } - else { - return 4; - } -} -function stringLengthInBytes(value) { - var result = 0; - for (var i = 0; i < value.length; i++) { - var code = value.charCodeAt(i); - // high surrogate - if (code >= 0xd800 && code <= 0xdbff) { - if ((i + 1) < value.length) { - var extra = value.charCodeAt(i + 1); - // low surrogate - if ((extra & 0xfc00) === 0xdc00) { - i++; - result += charLengthInBytes(((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000); - } - } - } - else { - result += charLengthInBytes(code); - } - } - return result; -} -exports.stringLengthInBytes = stringLengthInBytes; -function writeCharacter(buffer, offset, code) { - var length = charLengthInBytes(code); - switch (length) { - case 1: - buffer[offset] = code; - break; - case 2: - buffer[offset] = ((code >> 6) & 0x1f) | 0xc0; - buffer[offset + 1] = (code & 0x3f) | 0x80; - break; - case 3: - buffer[offset] = ((code >> 12) & 0x0f) | 0xe0; - buffer[offset + 1] = ((code >> 6) & 0x3f) | 0x80; - buffer[offset + 2] = (code & 0x3f) | 0x80; - break; - default: - buffer[offset] = ((code >> 18) & 0x07) | 0xf0; - buffer[offset + 1] = ((code >> 12) & 0x3f) | 0x80; - buffer[offset + 2] = ((code >> 6) & 0x3f) | 0x80; - buffer[offset + 3] = (code & 0x3f) | 0x80; - break; - } - return length; -} -function encodeStringTo(buffer, offset, value) { - for (var i = 0; i < value.length; i++) { - var code = value.charCodeAt(i); - // high surrogate - if (code >= 0xd800 && code <= 0xdbff) { - if ((i + 1) < value.length) { - var extra = value.charCodeAt(i + 1); - // low surrogate - if ((extra & 0xfc00) === 0xdc00) { - i++; - var fullCode = ((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; - offset += writeCharacter(buffer, offset, fullCode); - } - } - } - else { - offset += writeCharacter(buffer, offset, code); - } - } - return offset; -} -exports.encodeStringTo = encodeStringTo; -function encodeString(value) { - var buffer = new Uint8Array(stringLengthInBytes(value)); - encodeStringTo(buffer, 0, value); - return buffer; -} -exports.encodeString = encodeString; -function continuationByte(buffer, index) { - if (index >= buffer.length) { - throw Error('Invalid byte index'); - } - var continuationByte = buffer[index]; - if ((continuationByte & 0xC0) === 0x80) { - return continuationByte & 0x3F; - } - else { - throw Error('Invalid continuation byte'); - } -} -function decodeString(value) { - var result = ''; - for (var i = 0; i < value.length;) { - var byte1 = value[i++]; - var code = void 0; - if ((byte1 & 0x80) === 0) { - code = byte1; - } - else if ((byte1 & 0xe0) === 0xc0) { - var byte2 = continuationByte(value, i++); - code = ((byte1 & 0x1f) << 6) | byte2; - if (code < 0x80) { - throw Error('Invalid continuation byte'); - } - } - else if ((byte1 & 0xf0) === 0xe0) { - var byte2 = continuationByte(value, i++); - var byte3 = continuationByte(value, i++); - code = ((byte1 & 0x0f) << 12) | (byte2 << 6) | byte3; - if (code < 0x0800) { - throw Error('Invalid continuation byte'); - } - if (code >= 0xd800 && code <= 0xdfff) { - throw Error("Lone surrogate U+".concat(code.toString(16).toUpperCase(), " is not a scalar value")); - } - } - else if ((byte1 & 0xf8) === 0xf0) { - var byte2 = continuationByte(value, i++); - var byte3 = continuationByte(value, i++); - var byte4 = continuationByte(value, i++); - code = ((byte1 & 0x0f) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; - if (code < 0x010000 || code > 0x10ffff) { - throw Error('Invalid continuation byte'); - } - } - else { - throw Error('Invalid UTF-8 detected'); - } - if (code > 0xffff) { - code -= 0x10000; - result += String.fromCharCode(code >>> 10 & 0x3ff | 0xd800); - code = 0xdc00 | code & 0x3ff; - } - result += String.fromCharCode(code); - } - return result; -} -exports.decodeString = decodeString; -//# sourceMappingURL=utf8.js.map \ No newline at end of file +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.decodeString = exports.encodeString = exports.encodeStringTo = exports.stringLengthInBytes = void 0; +function charLengthInBytes(code) { + if ((code & 0xffffff80) === 0) { + return 1; + } + else if ((code & 0xfffff800) === 0) { + return 2; + } + else if ((code & 0xffff0000) === 0) { + return 3; + } + else { + return 4; + } +} +function stringLengthInBytes(value) { + var result = 0; + for (var i = 0; i < value.length; i++) { + var code = value.charCodeAt(i); + // high surrogate + if (code >= 0xd800 && code <= 0xdbff) { + if ((i + 1) < value.length) { + var extra = value.charCodeAt(i + 1); + // low surrogate + if ((extra & 0xfc00) === 0xdc00) { + i++; + result += charLengthInBytes(((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000); + } + } + } + else { + result += charLengthInBytes(code); + } + } + return result; +} +exports.stringLengthInBytes = stringLengthInBytes; +function writeCharacter(buffer, offset, code) { + var length = charLengthInBytes(code); + switch (length) { + case 1: + buffer[offset] = code; + break; + case 2: + buffer[offset] = ((code >> 6) & 0x1f) | 0xc0; + buffer[offset + 1] = (code & 0x3f) | 0x80; + break; + case 3: + buffer[offset] = ((code >> 12) & 0x0f) | 0xe0; + buffer[offset + 1] = ((code >> 6) & 0x3f) | 0x80; + buffer[offset + 2] = (code & 0x3f) | 0x80; + break; + default: + buffer[offset] = ((code >> 18) & 0x07) | 0xf0; + buffer[offset + 1] = ((code >> 12) & 0x3f) | 0x80; + buffer[offset + 2] = ((code >> 6) & 0x3f) | 0x80; + buffer[offset + 3] = (code & 0x3f) | 0x80; + break; + } + return length; +} +function encodeStringTo(buffer, offset, value) { + for (var i = 0; i < value.length; i++) { + var code = value.charCodeAt(i); + // high surrogate + if (code >= 0xd800 && code <= 0xdbff) { + if ((i + 1) < value.length) { + var extra = value.charCodeAt(i + 1); + // low surrogate + if ((extra & 0xfc00) === 0xdc00) { + i++; + var fullCode = ((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; + offset += writeCharacter(buffer, offset, fullCode); + } + } + } + else { + offset += writeCharacter(buffer, offset, code); + } + } + return offset; +} +exports.encodeStringTo = encodeStringTo; +function encodeString(value) { + var buffer = new Uint8Array(stringLengthInBytes(value)); + encodeStringTo(buffer, 0, value); + return buffer; +} +exports.encodeString = encodeString; +function continuationByte(buffer, index) { + if (index >= buffer.length) { + throw Error('Invalid byte index'); + } + var continuationByte = buffer[index]; + if ((continuationByte & 0xC0) === 0x80) { + return continuationByte & 0x3F; + } + else { + throw Error('Invalid continuation byte'); + } +} +function decodeString(value) { + var result = ''; + for (var i = 0; i < value.length;) { + var byte1 = value[i++]; + var code = void 0; + if ((byte1 & 0x80) === 0) { + code = byte1; + } + else if ((byte1 & 0xe0) === 0xc0) { + var byte2 = continuationByte(value, i++); + code = ((byte1 & 0x1f) << 6) | byte2; + if (code < 0x80) { + throw Error('Invalid continuation byte'); + } + } + else if ((byte1 & 0xf0) === 0xe0) { + var byte2 = continuationByte(value, i++); + var byte3 = continuationByte(value, i++); + code = ((byte1 & 0x0f) << 12) | (byte2 << 6) | byte3; + if (code < 0x0800) { + throw Error('Invalid continuation byte'); + } + if (code >= 0xd800 && code <= 0xdfff) { + throw Error("Lone surrogate U+".concat(code.toString(16).toUpperCase(), " is not a scalar value")); + } + } + else if ((byte1 & 0xf8) === 0xf0) { + var byte2 = continuationByte(value, i++); + var byte3 = continuationByte(value, i++); + var byte4 = continuationByte(value, i++); + code = ((byte1 & 0x0f) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; + if (code < 0x010000 || code > 0x10ffff) { + throw Error('Invalid continuation byte'); + } + } + else { + throw Error('Invalid UTF-8 detected'); + } + if (code > 0xffff) { + code -= 0x10000; + result += String.fromCharCode(code >>> 10 & 0x3ff | 0xd800); + code = 0xdc00 | code & 0x3ff; + } + result += String.fromCharCode(code); + } + return result; +} +exports.decodeString = decodeString; + +//# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInV0ZjgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsU0FBUyxpQkFBaUIsQ0FBQyxJQUFZO0lBQ3RDLElBQUksQ0FBQyxJQUFJLEdBQUcsVUFBVSxDQUFDLEtBQUssQ0FBQyxFQUFFO1FBQzlCLE9BQU8sQ0FBQyxDQUFDO0tBQ1Q7U0FBTSxJQUFJLENBQUMsSUFBSSxHQUFHLFVBQVUsQ0FBQyxLQUFLLENBQUMsRUFBRTtRQUNyQyxPQUFPLENBQUMsQ0FBQztLQUNUO1NBQU0sSUFBSSxDQUFDLElBQUksR0FBRyxVQUFVLENBQUMsS0FBSyxDQUFDLEVBQUU7UUFDckMsT0FBTyxDQUFDLENBQUM7S0FDVDtTQUFNO1FBQ04sT0FBTyxDQUFDLENBQUM7S0FDVDtBQUNGLENBQUM7QUFFRCxTQUFnQixtQkFBbUIsQ0FBQyxLQUFhO0lBQ2hELElBQUksTUFBTSxHQUFHLENBQUMsQ0FBQztJQUVmLEtBQUssSUFBSSxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsR0FBRyxLQUFLLENBQUMsTUFBTSxFQUFFLENBQUMsRUFBRSxFQUFFO1FB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4ZDgwMCk7XHJcblx0XHRcdGNvZGUgPSAweGRjMDAgfCBjb2RlICYgMHgzZmY7XHJcblx0XHR9XHJcblxyXG5cdFx0cmVzdWx0ICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoY29kZSk7XHJcblx0fVxyXG5cclxuXHRyZXR1cm4gcmVzdWx0O1xyXG59XHJcbiJdLCJzb3VyY2VSb290IjoiQzpcXFByb2plY3RzXFxnaXRodWJcXGFnLXBzZFxcc3JjIn0= diff --git a/npm-packages/mac-v2.4.x/ag-psd/dist/utf8.js.map b/npm-packages/mac-v2.4.x/ag-psd/dist/utf8.js.map deleted file mode 100644 index 10c4a85..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/dist/utf8.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"utf8.js","sourceRoot":"../src/","sources":["utf8.ts"],"names":[],"mappings":";;;AAAA,SAAS,iBAAiB,CAAC,IAAY;IACtC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE;QAC9B,OAAO,CAAC,CAAC;KACT;SAAM,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE;QACrC,OAAO,CAAC,CAAC;KACT;SAAM,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC,EAAE;QACrC,OAAO,CAAC,CAAC;KACT;SAAM;QACN,OAAO,CAAC,CAAC;KACT;AACF,CAAC;AAED,SAAgB,mBAAmB,CAAC,KAAa;IAChD,IAAI,MAAM,GAAG,CAAC,CAAC;IAEf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACtC,IAAM,IAAI,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QAEjC,iBAAiB;QACjB,IAAI,IAAI,IAAI,MAAM,IAAI,IAAI,IAAI,MAAM,EAAE;YACrC,IAAI,CAAC,CAAC,GAAG,CAAC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I,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,GAAG,KAAK,CAAC;YAE5E,IAAI,IAAI,GAAG,QAAQ,IAAI,IAAI,GAAG,QAAQ,EAAE;gBACvC,MAAM,KAAK,CAAC,2BAA2B,CAAC,CAAC;aACzC;SACD;aAAM;YACN,MAAM,KAAK,CAAC,wBAAwB,CAAC,CAAC;SACtC;QAED,IAAI,IAAI,GAAG,MAAM,EAAE;YAClB,IAAI,IAAI,OAAO,CAAC;YAChB,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,KAAK,EAAE,GAAG,KAAK,GAAG,MAAM,CAAC,CAAC;YAC5D,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,CAAC;SAC7B;QAED,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;KACpC;IAED,OAAO,MAAM,CAAC;AACf,CAAC;AAnDD,oCAmDC"} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/package.json b/npm-packages/mac-v2.4.x/ag-psd/package.json index 073d11a..3d43b7d 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/package.json +++ b/npm-packages/mac-v2.4.x/ag-psd/package.json @@ -1,6 +1,6 @@ { "name": "ag-psd", - "version": "15.3.1", + "version": "15.0.1", "description": "Library for reading and writing PSD files", "main": "dist/index.js", "module": "dist-es/index.js", @@ -12,12 +12,12 @@ "url": "https://github.com/Agamnentzar/ag-psd" }, "scripts": { - "ts": "npm run clean && tsc --watch --project tsconfig.json", - "test": "mocha --watch --timeout 20000 -R dot dist/test", + "test": "gulp test", + "test2": "mocha -R dot dist/test", + "dev": "gulp dev --tests", "lint": "tslint -c tslint.json src/ts/**/*.ts", - "build": "npm run clean && tsc --project tsconfig.json && tsc --project tsconfig-es6.json && browserify dist/index.js --standalone agPsd -o dist/bundle.js", + "build": "gulp build && browserify dist/index.js --standalone agPsd -o dist/bundle.js", "rollup": "rollup --format=cjs --external base64-js --file=dist-es/bundle.js --sourcemap --sourcemapFile dist-es/bundle.js.map dist-es/index.js", - "clean": "node clean.js", "prepublishOnly": "npm run build" }, "jspm": { @@ -35,19 +35,25 @@ "license": "MIT", "devDependencies": { "@types/mocha": "^9.1.1", - "@types/node": "^18.11.18", + "@types/node": "^17.0.42", "browserify": "^17.0.0", - "canvas": "^2.11.0", - "chai": "^4.3.7", + "canvas": "^2.8.0", + "chai": "^4.3.4", + "del": "^6.0.0", + "gulp": "^4.0.2", + "gulp-sourcemaps": "^3.0.0", + "gulp-spawn-mocha": "^6.0.0", + "gulp-typescript": "^5.0.1", + "merge2": "^1.4.1", "mocha": "^6.2.0", + "source-map-support": "^0.5.19", "tslint": "^6.1.3", - "typescript": "^4.9.4", - "source-map-support": "^0.5.21" + "typescript": "^4.2.4" }, "dependencies": { "@types/base64-js": "^1.3.0", "@types/pako": "^2.0.0", "base64-js": "^1.5.1", - "pako": "^2.1.0" + "pako": "^2.0.4" } } diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/abr.ts b/npm-packages/mac-v2.4.x/ag-psd/src/abr.ts deleted file mode 100644 index 69dd92b..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/abr.ts +++ /dev/null @@ -1,540 +0,0 @@ -import { BlnM, DescriptorUnitsValue, parseAngle, parsePercent, parseUnitsToNumber, readVersionAndDescriptor } from './descriptor'; -import { BlendMode, PatternInfo } from './psd'; -import { - checkSignature, createReader, readBytes, readDataRLE, readInt16, readInt32, readPascalString, readPattern, - readSignature, readUint16, readUint32, readUint8, skipBytes -} from './psdReader'; - -export interface Abr { - brushes: Brush[]; - samples: SampleInfo[]; - patterns: PatternInfo[]; -} - -export interface SampleInfo { - id: string; - bounds: { x: number; y: number; w: number; h: number; }; - alpha: Uint8Array; -} - -export interface BrushDynamics { - control: 'off' | 'fade' | 'pen pressure' | 'pen tilt' | 'stylus wheel' | 'initial direction' | 'direction' | 'initial rotation' | 'rotation'; - steps: number; // for fade - jitter: number; - minimum: number; -} - -const dynamicsControl = ['off', 'fade', 'pen pressure', 'pen tilt', 'stylus wheel', 'initial direction', 'direction', 'initial rotation', 'rotation']; - -export interface BrushShape { - name?: string; - size: number; - angle: number; - roundness: number; - hardness?: number; - spacingOn: boolean; - spacing: number; - flipX: boolean; - flipY: boolean; - sampledData?: string; -} - -export interface Brush { - name: string; - shape: BrushShape; - shapeDynamics?: { - sizeDynamics: BrushDynamics; - minimumDiameter: number; - tiltScale: number; - angleDynamics: BrushDynamics; // jitter 0-1 -> 0-360 deg ? - roundnessDynamics: BrushDynamics; - minimumRoundness: number; - flipX: boolean; - flipY: boolean; - brushProjection: boolean; - }; - scatter?: { - bothAxes: boolean; - scatterDynamics: BrushDynamics; - countDynamics: BrushDynamics; - count: number; - }; - texture?: { - id: string; - name: string; - invert: boolean; - scale: number; - brightness: number; - contrast: number; - blendMode: BlendMode; - depth: number; - depthMinimum: number; - depthDynamics: BrushDynamics; - }; - dualBrush?: { - flip: boolean; - shape: BrushShape; - blendMode: BlendMode; - useScatter: boolean; - spacing: number; - count: number; - bothAxes: boolean; - countDynamics: BrushDynamics; - scatterDynamics: BrushDynamics; - }; - colorDynamics?: { - foregroundBackground: BrushDynamics; - hue: number; - saturation: number; - brightness: number; - purity: number; - perTip: boolean; - }; - transfer?: { - flowDynamics: BrushDynamics; - opacityDynamics: BrushDynamics; - wetnessDynamics: BrushDynamics; - mixDynamics: BrushDynamics; - }; - brushPose?: { - overrideAngle: boolean; - overrideTiltX: boolean; - overrideTiltY: boolean; - overridePressure: boolean; - pressure: number; - tiltX: number; - tiltY: number; - angle: number; - }; - noise: boolean; - wetEdges: boolean; - // TODO: build-up - // TODO: smoothing - protectTexture?: boolean; - spacing: number; - brushGroup?: undefined; // ? - interpretation?: boolean; // ? - useBrushSize: boolean; // ? - toolOptions?: { - brushPreset: boolean; - flow: number; // 0-100 - smooth: number; // ? - mode: BlendMode; - opacity: number; // 0-100 - smoothing: boolean; - smoothingValue: number; - smoothingRadiusMode: boolean; - smoothingCatchup: boolean; - smoothingCatchupAtEnd: boolean; - smoothingZoomCompensation: boolean; - pressureSmoothing: boolean; - usePressureOverridesSize: boolean; - usePressureOverridesOpacity: boolean; - useLegacy: boolean; - flowDynamics?: BrushDynamics; - opacityDynamics?: BrushDynamics; - sizeDynamics?: BrushDynamics; - }; -} - -// internal - -interface PhryDescriptor { - hierarchy: ({} | { - 'Nm ': string; - zuid: string; - })[]; -} - -interface DynamicsDescriptor { - bVTy: number; - fStp: number; - jitter: DescriptorUnitsValue; - 'Mnm ': DescriptorUnitsValue; -} - -interface BrushShapeDescriptor { - Dmtr: DescriptorUnitsValue; - Angl: DescriptorUnitsValue; - Rndn: DescriptorUnitsValue; - 'Nm '?: string; - Spcn: DescriptorUnitsValue; - Intr: boolean; - Hrdn?: DescriptorUnitsValue; - flipX: boolean; - flipY: boolean; - sampledData?: string; -} - -interface DescDescriptor { - Brsh: { - 'Nm ': string; - Brsh: BrushShapeDescriptor; - useTipDynamics: boolean; - flipX: boolean; - flipY: boolean; - brushProjection: boolean; - minimumDiameter: DescriptorUnitsValue; - minimumRoundness: DescriptorUnitsValue; - tiltScale: DescriptorUnitsValue; - szVr: DynamicsDescriptor; - angleDynamics: DynamicsDescriptor; - roundnessDynamics: DynamicsDescriptor; - useScatter: boolean; - Spcn: DescriptorUnitsValue; - 'Cnt ': number; - bothAxes: boolean; - countDynamics: DynamicsDescriptor; - scatterDynamics: DynamicsDescriptor; - dualBrush: { useDualBrush: false; } | { - useDualBrush: true; - Flip: boolean; - Brsh: BrushShapeDescriptor; - BlnM: string; - useScatter: boolean; - Spcn: DescriptorUnitsValue; - 'Cnt ': number; - bothAxes: boolean; - countDynamics: DynamicsDescriptor; - scatterDynamics: DynamicsDescriptor; - }; - brushGroup: { useBrushGroup: false; }; - useTexture: boolean; - TxtC: boolean; - interpretation: boolean; - textureBlendMode: string; - textureDepth: DescriptorUnitsValue; - minimumDepth: DescriptorUnitsValue; - textureDepthDynamics: DynamicsDescriptor; - Txtr?: { - 'Nm ': string; - Idnt: string; - }; - textureScale: DescriptorUnitsValue; - InvT: boolean; - protectTexture: boolean; - textureBrightness: number; - textureContrast: number; - usePaintDynamics: boolean; - prVr?: DynamicsDescriptor; - opVr?: DynamicsDescriptor; - wtVr?: DynamicsDescriptor; - mxVr?: DynamicsDescriptor; - useColorDynamics: boolean; - clVr?: DynamicsDescriptor; - 'H '?: DescriptorUnitsValue; - Strt?: DescriptorUnitsValue; - Brgh?: DescriptorUnitsValue; - purity?: DescriptorUnitsValue; - colorDynamicsPerTip?: true; - Wtdg: boolean; - Nose: boolean; - 'Rpt ': boolean; - useBrushSize: boolean; - useBrushPose: boolean; - overridePoseAngle?: boolean; - overridePoseTiltX?: boolean; - overridePoseTiltY?: boolean; - overridePosePressure?: boolean; - brushPosePressure?: DescriptorUnitsValue; - brushPoseTiltX?: number; - brushPoseTiltY?: number; - brushPoseAngle?: number; - toolOptions?: { - brushPreset: boolean; - flow?: number; - Smoo?: number; - 'Md ': string; - Opct?: number; - smoothing?: boolean; - smoothingValue?: number; - smoothingRadiusMode?: boolean; - smoothingCatchup?: boolean; - smoothingCatchupAtEnd?: boolean; - smoothingZoomCompensation?: boolean; - pressureSmoothing?: boolean; - usePressureOverridesSize?: boolean; - usePressureOverridesOpacity?: boolean; - useLegacy: boolean; - 'Prs '?: number; // TODO: ??? - MgcE?: boolean; // TODO: ??? - ErsB?: number; // TODO: ??? - prVr?: DynamicsDescriptor; - opVr?: DynamicsDescriptor; - szVr?: DynamicsDescriptor; - }; - }[]; -} - -function parseDynamics(desc: DynamicsDescriptor): BrushDynamics { - return { - control: dynamicsControl[desc.bVTy] as any, - steps: desc.fStp, - jitter: parsePercent(desc.jitter), - minimum: parsePercent(desc['Mnm ']), - }; -} - -function parseBrushShape(desc: BrushShapeDescriptor): BrushShape { - const shape: BrushShape = { - size: parseUnitsToNumber(desc.Dmtr, 'Pixels'), - angle: parseAngle(desc.Angl), - roundness: parsePercent(desc.Rndn), - spacingOn: desc.Intr, - spacing: parsePercent(desc.Spcn), - flipX: desc.flipX, - flipY: desc.flipY, - }; - - if (desc['Nm ']) shape.name = desc['Nm ']; - if (desc.Hrdn) shape.hardness = parsePercent(desc.Hrdn); - if (desc.sampledData) shape.sampledData = desc.sampledData; - - return shape; -} - -export function readAbr(buffer: ArrayBufferView, options: { logMissingFeatures?: boolean; } = {}): Abr { - const reader = createReader(buffer.buffer, buffer.byteOffset, buffer.byteLength); - const version = readInt16(reader); - const samples: SampleInfo[] = []; - const brushes: Brush[] = []; - const patterns: PatternInfo[] = []; - - if (version === 1 || version === 2) { - throw new Error(`Unsupported ABR version (${version})`); // TODO: ... - } else if (version === 6 || version === 7 || version === 9 || version === 10) { - const minorVersion = readInt16(reader); - if (minorVersion !== 1 && minorVersion !== 2) throw new Error('Unsupported ABR minor version'); - - while (reader.offset < reader.view.byteLength) { - checkSignature(reader, '8BIM'); - const type = readSignature(reader) as 'samp' | 'desc' | 'patt' | 'phry'; - let size = readUint32(reader); - const end = reader.offset + size; - - switch (type) { - case 'samp': { - while (reader.offset < end) { - let brushLength = readUint32(reader); - while (brushLength & 0b11) brushLength++; // pad to 4 byte alignment - const brushEnd = reader.offset + brushLength; - - const id = readPascalString(reader, 1); - - // v1 - Skip the Int16 bounds rectangle and the unknown Int16. - // v2 - Skip the unknown bytes. - skipBytes(reader, minorVersion === 1 ? 10 : 264); - - const y = readInt32(reader); - const x = readInt32(reader); - const h = readInt32(reader) - y; - const w = readInt32(reader) - x; - if (w <= 0 || h <= 0) throw new Error('Invalid bounds'); - - const depth = readInt16(reader); - const compression = readUint8(reader); // 0 - raw, 1 - RLE - const alpha = new Uint8Array(w * h); - - if (depth === 8) { - if (compression === 0) { - alpha.set(readBytes(reader, alpha.byteLength)); - } else if (compression === 1) { - readDataRLE(reader, { width: w, height: h, data: alpha }, w, h, 1, [0], false); - } else { - throw new Error('Invalid compression'); - } - } else if (depth === 16) { - if (compression === 0) { - for (let i = 0; i < alpha.byteLength; i++) { - alpha[i] = readUint16(reader) >> 8; // convert to 8bit values - } - } else if (compression === 1) { - throw new Error('not implemented (16bit RLE)'); // TODO: ... - } else { - throw new Error('Invalid compression'); - } - } else { - throw new Error('Invalid depth'); - } - - samples.push({ id, bounds: { x, y, w, h }, alpha }); - reader.offset = brushEnd; - } - break; - } - case 'desc': { - const desc: DescDescriptor = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - - for (const brush of desc.Brsh) { - const b: Brush = { - name: brush['Nm '], - shape: parseBrushShape(brush.Brsh), - spacing: parsePercent(brush.Spcn), - // TODO: brushGroup ??? - wetEdges: brush.Wtdg, - noise: brush.Nose, - // TODO: TxtC ??? smoothing / build-up ? - // TODO: 'Rpt ' ??? - useBrushSize: brush.useBrushSize, // ??? - }; - - if (brush.interpretation != null) b.interpretation = brush.interpretation; - if (brush.protectTexture != null) b.protectTexture = brush.protectTexture; - - if (brush.useTipDynamics) { - b.shapeDynamics = { - tiltScale: parsePercent(brush.tiltScale), - sizeDynamics: parseDynamics(brush.szVr), - angleDynamics: parseDynamics(brush.angleDynamics), - roundnessDynamics: parseDynamics(brush.roundnessDynamics), - flipX: brush.flipX, - flipY: brush.flipY, - brushProjection: brush.brushProjection, - minimumDiameter: parsePercent(brush.minimumDiameter), - minimumRoundness: parsePercent(brush.minimumRoundness), - }; - } - - if (brush.useScatter) { - b.scatter = { - count: brush['Cnt '], - bothAxes: brush.bothAxes, - countDynamics: parseDynamics(brush.countDynamics), - scatterDynamics: parseDynamics(brush.scatterDynamics), - }; - } - - if (brush.useTexture && brush.Txtr) { - b.texture = { - id: brush.Txtr.Idnt, - name: brush.Txtr['Nm '], - blendMode: BlnM.decode(brush.textureBlendMode), - depth: parsePercent(brush.textureDepth), - depthMinimum: parsePercent(brush.minimumDepth), - depthDynamics: parseDynamics(brush.textureDepthDynamics), - scale: parsePercent(brush.textureScale), - invert: brush.InvT, - brightness: brush.textureBrightness, - contrast: brush.textureContrast, - }; - } - - const db = brush.dualBrush; - if (db && db.useDualBrush) { - b.dualBrush = { - flip: db.Flip, - shape: parseBrushShape(db.Brsh), - blendMode: BlnM.decode(db.BlnM), - useScatter: db.useScatter, - spacing: parsePercent(db.Spcn), - count: db['Cnt '], - bothAxes: db.bothAxes, - countDynamics: parseDynamics(db.countDynamics), - scatterDynamics: parseDynamics(db.scatterDynamics), - }; - } - - if (brush.useColorDynamics) { - b.colorDynamics = { - foregroundBackground: parseDynamics(brush.clVr!), - hue: parsePercent(brush['H ']!), - saturation: parsePercent(brush.Strt!), - brightness: parsePercent(brush.Brgh!), - purity: parsePercent(brush.purity!), - perTip: brush.colorDynamicsPerTip!, - }; - } - - if (brush.usePaintDynamics) { - b.transfer = { - flowDynamics: parseDynamics(brush.prVr!), - opacityDynamics: parseDynamics(brush.opVr!), - wetnessDynamics: parseDynamics(brush.wtVr!), - mixDynamics: parseDynamics(brush.mxVr!), - }; - } - - if (brush.useBrushPose) { - b.brushPose = { - overrideAngle: brush.overridePoseAngle!, - overrideTiltX: brush.overridePoseTiltX!, - overrideTiltY: brush.overridePoseTiltY!, - overridePressure: brush.overridePosePressure!, - pressure: parsePercent(brush.brushPosePressure!), - tiltX: brush.brushPoseTiltX!, - tiltY: brush.brushPoseTiltY!, - angle: brush.brushPoseAngle!, - }; - } - - const to = brush.toolOptions; - if (to) { - b.toolOptions = { - brushPreset: to.brushPreset, - flow: to.flow ?? 100, - smooth: to.Smoo ?? 0, - mode: BlnM.decode(to['Md '] || 'BlnM.Nrml'), // sometimes mode is missing - opacity: to.Opct ?? 100, - smoothing: !!to.smoothing, - smoothingValue: to.smoothingValue || 0, - smoothingRadiusMode: !!to.smoothingRadiusMode, - smoothingCatchup: !!to.smoothingCatchup, - smoothingCatchupAtEnd: !!to.smoothingCatchupAtEnd, - smoothingZoomCompensation: !!to.smoothingZoomCompensation, - pressureSmoothing: !!to.pressureSmoothing, - usePressureOverridesSize: !!to.usePressureOverridesSize, - usePressureOverridesOpacity: !!to.usePressureOverridesOpacity, - useLegacy: !!to.useLegacy, - }; - - if (to.prVr) { - b.toolOptions.flowDynamics = parseDynamics(to.prVr); - } - - if (to.opVr) { - b.toolOptions.opacityDynamics = parseDynamics(to.opVr); - } - - if (to.szVr) { - b.toolOptions.sizeDynamics = parseDynamics(to.szVr); - } - } - - brushes.push(b); - } - break; - } - case 'patt': { - if (reader.offset < end) { // TODO: check multiple patterns - patterns.push(readPattern(reader)); - reader.offset = end; - } - break; - } - case 'phry': { - // TODO: what is this ? - const desc: PhryDescriptor = readVersionAndDescriptor(reader); - if (options.logMissingFeatures) { - if (desc.hierarchy?.length) { - console.log('unhandled phry section', desc); - } - } - break; - } - default: - throw new Error(`Invalid brush type: ${type}`); - } - - // align to 4 bytes - while (size % 4) { - reader.offset++; - size++; - } - } - } else { - throw new Error(`Unsupported ABR version (${version})`); - } - - return { samples, patterns, brushes }; -} diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/additionalInfo.ts b/npm-packages/mac-v2.4.x/ag-psd/src/additionalInfo.ts deleted file mode 100644 index f97ae03..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/additionalInfo.ts +++ /dev/null @@ -1,3019 +0,0 @@ -import { fromByteArray, toByteArray } from 'base64-js'; -import { readEffects, writeEffects } from './effectsHelpers'; -import { clamp, createEnum, layerColors, MOCK_HANDLERS } from './helpers'; -import { - LayerAdditionalInfo, BezierPath, Psd, ReadOptions, BrightnessAdjustment, ExposureAdjustment, VibranceAdjustment, - ColorBalanceAdjustment, BlackAndWhiteAdjustment, PhotoFilterAdjustment, ChannelMixerChannel, - ChannelMixerAdjustment, PosterizeAdjustment, ThresholdAdjustment, GradientMapAdjustment, CMYK, - SelectiveColorAdjustment, ColorLookupAdjustment, LevelsAdjustmentChannel, LevelsAdjustment, - CurvesAdjustment, CurvesAdjustmentChannel, HueSaturationAdjustment, HueSaturationAdjustmentChannel, - PresetInfo, Color, ColorBalanceValues, WriteOptions, LinkedFile, PlacedLayerType, Warp, KeyDescriptorItem, - BooleanOperation, LayerEffectsInfo, Annotation, LayerVectorMask, AnimationFrame, Timeline, PlacedLayerFilter, UnitsValue, -} from './psd'; -import { - PsdReader, readSignature, readUnicodeString, skipBytes, readUint32, readUint8, readFloat64, readUint16, - readBytes, readInt16, checkSignature, readFloat32, readFixedPointPath32, readSection, readColor, readInt32, - readPascalString, readUnicodeStringWithLength, readAsciiString, readPattern, -} from './psdReader'; -import { - PsdWriter, writeZeros, writeSignature, writeBytes, writeUint32, writeUint16, writeFloat64, writeUint8, - writeInt16, writeFloat32, writeFixedPointPath32, writeUnicodeString, writeSection, writeUnicodeStringWithPadding, - writeColor, writePascalString, writeInt32, -} from './psdWriter'; -import { - Annt, BlnM, DescriptorColor, DescriptorUnitsValue, parsePercent, parseUnits, parseUnitsOrNumber, QuiltWarpDescriptor, - strokeStyleLineAlignment, strokeStyleLineCapType, strokeStyleLineJoinType, TextDescriptor, textGridding, - unitsPercent, unitsValue, WarpDescriptor, warpStyle, writeVersionAndDescriptor, - readVersionAndDescriptor, StrokeDescriptor, Ornt, horzVrtcToXY, LmfxDescriptor, Lfx2Descriptor, - FrameListDescriptor, TimelineDescriptor, FrameDescriptor, xyToHorzVrtc, serializeEffects, - parseEffects, parseColor, serializeColor, serializeVectorContent, parseVectorContent, parseTrackList, - serializeTrackList, FractionDescriptor, -} from './descriptor'; -import { serializeEngineData, parseEngineData } from './engineData'; -import { encodeEngineData, decodeEngineData } from './text'; - -export interface ExtendedWriteOptions extends WriteOptions { - layerIds: Set; - layerToId: Map; -} - -type HasMethod = (target: LayerAdditionalInfo) => boolean; -type ReadMethod = (reader: PsdReader, target: LayerAdditionalInfo, left: () => number, psd: Psd, options: ReadOptions) => void; -type WriteMethod = (writer: PsdWriter, target: LayerAdditionalInfo, psd: Psd, options: ExtendedWriteOptions) => void; - -export interface InfoHandler { - key: string; - has: HasMethod; - read: ReadMethod; - write: WriteMethod; -} - -export const infoHandlers: InfoHandler[] = []; -export const infoHandlersMap: { [key: string]: InfoHandler; } = {}; - -function addHandler(key: string, has: HasMethod, read: ReadMethod, write: WriteMethod) { - const handler: InfoHandler = { key, has, read, write }; - infoHandlers.push(handler); - infoHandlersMap[handler.key] = handler; -} - -function addHandlerAlias(key: string, target: string) { - infoHandlersMap[key] = infoHandlersMap[target]; -} - -function hasKey(key: keyof LayerAdditionalInfo) { - return (target: LayerAdditionalInfo) => target[key] !== undefined; -} - -function readLength64(reader: PsdReader) { - if (readUint32(reader)) throw new Error(`Resource size above 4 GB limit at ${reader.offset.toString(16)}`); - return readUint32(reader); -} - -function writeLength64(writer: PsdWriter, length: number) { - writeUint32(writer, 0); - writeUint32(writer, length); -} - -addHandler( - 'TySh', - hasKey('text'), - (reader, target, leftBytes) => { - if (readInt16(reader) !== 1) throw new Error(`Invalid TySh version`); - - const transform: number[] = []; - for (let i = 0; i < 6; i++) transform.push(readFloat64(reader)); - - if (readInt16(reader) !== 50) throw new Error(`Invalid TySh text version`); - const text: TextDescriptor = readVersionAndDescriptor(reader); - - if (readInt16(reader) !== 1) throw new Error(`Invalid TySh warp version`); - const warp: WarpDescriptor = readVersionAndDescriptor(reader); - - target.text = { - transform, - left: readFloat32(reader), - top: readFloat32(reader), - right: readFloat32(reader), - bottom: readFloat32(reader), - text: text['Txt '].replace(/\r/g, '\n'), - index: text.TextIndex || 0, - gridding: textGridding.decode(text.textGridding), - antiAlias: Annt.decode(text.AntA), - orientation: Ornt.decode(text.Ornt), - warp: { - style: warpStyle.decode(warp.warpStyle), - value: warp.warpValue || 0, - perspective: warp.warpPerspective || 0, - perspectiveOther: warp.warpPerspectiveOther || 0, - rotate: Ornt.decode(warp.warpRotate), - }, - }; - - if (text.EngineData) { - const engineData = parseEngineData(text.EngineData); - const textData = decodeEngineData(engineData); - - // require('fs').writeFileSync(`layer-${target.name}.txt`, require('util').inspect(engineData, false, 99, false), 'utf8'); - // const before = parseEngineData(text.EngineData); - // const after = encodeEngineData(engineData); - // require('fs').writeFileSync('before.txt', require('util').inspect(before, false, 99, false), 'utf8'); - // require('fs').writeFileSync('after.txt', require('util').inspect(after, false, 99, false), 'utf8'); - - // console.log(require('util').inspect(parseEngineData(text.EngineData), false, 99, true)); - target.text = { ...target.text, ...textData }; - // console.log(require('util').inspect(target.text, false, 99, true)); - } - - skipBytes(reader, leftBytes()); - }, - (writer, target) => { - const text = target.text!; - const warp = text.warp || {}; - const transform = text.transform || [1, 0, 0, 1, 0, 0]; - - const textDescriptor: TextDescriptor = { - 'Txt ': (text.text || '').replace(/\r?\n/g, '\r'), - textGridding: textGridding.encode(text.gridding), - Ornt: Ornt.encode(text.orientation), - AntA: Annt.encode(text.antiAlias), - TextIndex: text.index || 0, - EngineData: serializeEngineData(encodeEngineData(text)), - }; - - writeInt16(writer, 1); // version - - for (let i = 0; i < 6; i++) { - writeFloat64(writer, transform[i]); - } - - writeInt16(writer, 50); // text version - writeVersionAndDescriptor(writer, '', 'TxLr', textDescriptor); - - writeInt16(writer, 1); // warp version - writeVersionAndDescriptor(writer, '', 'warp', encodeWarp(warp)); - - writeFloat32(writer, text.left!); - writeFloat32(writer, text.top!); - writeFloat32(writer, text.right!); - writeFloat32(writer, text.bottom!); - - // writeZeros(writer, 2); - }, -); - -// vector fills - -addHandler( - 'SoCo', - target => target.vectorFill !== undefined && target.vectorStroke === undefined && - target.vectorFill.type === 'color', - (reader, target) => { - const descriptor = readVersionAndDescriptor(reader); - target.vectorFill = parseVectorContent(descriptor); - }, - (writer, target) => { - const { descriptor } = serializeVectorContent(target.vectorFill!); - writeVersionAndDescriptor(writer, '', 'null', descriptor); - }, -); - -addHandler( - 'GdFl', - target => target.vectorFill !== undefined && target.vectorStroke === undefined && - (target.vectorFill.type === 'solid' || target.vectorFill.type === 'noise'), - (reader, target, left) => { - const descriptor = readVersionAndDescriptor(reader); - target.vectorFill = parseVectorContent(descriptor); - skipBytes(reader, left()); - }, - (writer, target) => { - const { descriptor } = serializeVectorContent(target.vectorFill!); - writeVersionAndDescriptor(writer, '', 'null', descriptor); - }, -); - -addHandler( - 'PtFl', - target => target.vectorFill !== undefined && target.vectorStroke === undefined && - target.vectorFill.type === 'pattern', - (reader, target) => { - const descriptor = readVersionAndDescriptor(reader); - target.vectorFill = parseVectorContent(descriptor); - }, - (writer, target) => { - const { descriptor } = serializeVectorContent(target.vectorFill!); - writeVersionAndDescriptor(writer, '', 'null', descriptor); - }, -); - -addHandler( - 'vscg', - target => target.vectorFill !== undefined && target.vectorStroke !== undefined, - (reader, target, left) => { - readSignature(reader); // key - const desc = readVersionAndDescriptor(reader); - target.vectorFill = parseVectorContent(desc); - skipBytes(reader, left()); - }, - (writer, target) => { - const { descriptor, key } = serializeVectorContent(target.vectorFill!); - writeSignature(writer, key); - writeVersionAndDescriptor(writer, '', 'null', descriptor); - }, -); - -export function readBezierKnot(reader: PsdReader, width: number, height: number) { - const y0 = readFixedPointPath32(reader) * height; - const x0 = readFixedPointPath32(reader) * width; - const y1 = readFixedPointPath32(reader) * height; - const x1 = readFixedPointPath32(reader) * width; - const y2 = readFixedPointPath32(reader) * height; - const x2 = readFixedPointPath32(reader) * width; - return [x0, y0, x1, y1, x2, y2]; -} - -function writeBezierKnot(writer: PsdWriter, points: number[], width: number, height: number) { - writeFixedPointPath32(writer, points[1] / height); // y0 - writeFixedPointPath32(writer, points[0] / width); // x0 - writeFixedPointPath32(writer, points[3] / height); // y1 - writeFixedPointPath32(writer, points[2] / width); // x1 - writeFixedPointPath32(writer, points[5] / height); // y2 - writeFixedPointPath32(writer, points[4] / width); // x2 -} - -export const booleanOperations: BooleanOperation[] = ['exclude', 'combine', 'subtract', 'intersect']; - -export function readVectorMask(reader: PsdReader, vectorMask: LayerVectorMask, width: number, height: number, size: number) { - const end = reader.offset + size; - const paths = vectorMask.paths; - let path: BezierPath | undefined = undefined; - - while ((end - reader.offset) >= 26) { - const selector = readUint16(reader); - - switch (selector) { - case 0: // Closed subpath length record - case 3: { // Open subpath length record - readUint16(reader); // count - const boolOp = readInt16(reader); - readUint16(reader); // always 1 ? - skipBytes(reader, 18); - // TODO: 'combine' here might be wrong - path = { open: selector === 3, operation: boolOp === -1 ? 'combine' : booleanOperations[boolOp], knots: [] }; - paths.push(path); - break; - } - case 1: // Closed subpath Bezier knot, linked - case 2: // Closed subpath Bezier knot, unlinked - case 4: // Open subpath Bezier knot, linked - case 5: // Open subpath Bezier knot, unlinked - path!.knots.push({ linked: (selector === 1 || selector === 4), points: readBezierKnot(reader, width, height) }); - break; - case 6: // Path fill rule record - skipBytes(reader, 24); - break; - case 7: { // Clipboard record - // TODO: check if these need to be multiplied by document size - const top = readFixedPointPath32(reader); - const left = readFixedPointPath32(reader); - const bottom = readFixedPointPath32(reader); - const right = readFixedPointPath32(reader); - const resolution = readFixedPointPath32(reader); - skipBytes(reader, 4); - vectorMask.clipboard = { top, left, bottom, right, resolution }; - break; - } - case 8: // Initial fill rule record - vectorMask.fillStartsWithAllPixels = !!readUint16(reader); - skipBytes(reader, 22); - break; - default: throw new Error('Invalid vmsk section'); - } - } - - return paths; -} - -addHandler( - 'vmsk', - hasKey('vectorMask'), - (reader, target, left, { width, height }) => { - if (readUint32(reader) !== 3) throw new Error('Invalid vmsk version'); - - target.vectorMask = { paths: [] }; - const vectorMask = target.vectorMask; - - const flags = readUint32(reader); - vectorMask.invert = (flags & 1) !== 0; - vectorMask.notLink = (flags & 2) !== 0; - vectorMask.disable = (flags & 4) !== 0; - - readVectorMask(reader, vectorMask, width, height, left()); - - // drawBezierPaths(vectorMask.paths, width, height, 'out.png'); - - skipBytes(reader, left()); - }, - (writer, target, { width, height }) => { - const vectorMask = target.vectorMask!; - const flags = - (vectorMask.invert ? 1 : 0) | - (vectorMask.notLink ? 2 : 0) | - (vectorMask.disable ? 4 : 0); - - writeUint32(writer, 3); // version - writeUint32(writer, flags); - - // initial entry - writeUint16(writer, 6); - writeZeros(writer, 24); - - const clipboard = vectorMask.clipboard; - if (clipboard) { - writeUint16(writer, 7); - writeFixedPointPath32(writer, clipboard.top); - writeFixedPointPath32(writer, clipboard.left); - writeFixedPointPath32(writer, clipboard.bottom); - writeFixedPointPath32(writer, clipboard.right); - writeFixedPointPath32(writer, clipboard.resolution); - writeZeros(writer, 4); - } - - if (vectorMask.fillStartsWithAllPixels !== undefined) { - writeUint16(writer, 8); - writeUint16(writer, vectorMask.fillStartsWithAllPixels ? 1 : 0); - writeZeros(writer, 22); - } - - for (const path of vectorMask.paths) { - writeUint16(writer, path.open ? 3 : 0); - writeUint16(writer, path.knots.length); - writeUint16(writer, Math.abs(booleanOperations.indexOf(path.operation))); // default to 1 if not found - writeUint16(writer, 1); - writeZeros(writer, 18); // TODO: these are sometimes non-zero - - const linkedKnot = path.open ? 4 : 1; - const unlinkedKnot = path.open ? 5 : 2; - - for (const { linked, points } of path.knots) { - writeUint16(writer, linked ? linkedKnot : unlinkedKnot); - writeBezierKnot(writer, points, width, height); - } - } - }, -); - -// TODO: need to write vmsk if has outline ? -addHandlerAlias('vsms', 'vmsk'); -// addHandlerAlias('vmsk', 'vsms'); - -interface VogkDescriptor { - keyDescriptorList: { - keyShapeInvalidated?: boolean; - keyOriginType?: number; - keyOriginResolution?: number; - keyOriginRRectRadii?: { - unitValueQuadVersion: number; - topRight: DescriptorUnitsValue; - topLeft: DescriptorUnitsValue; - bottomLeft: DescriptorUnitsValue; - bottomRight: DescriptorUnitsValue; - }; - keyOriginShapeBBox?: { - unitValueQuadVersion: number; - 'Top ': DescriptorUnitsValue; - Left: DescriptorUnitsValue; - Btom: DescriptorUnitsValue; - Rght: DescriptorUnitsValue; - }; - keyOriginBoxCorners?: { - rectangleCornerA: { Hrzn: number; Vrtc: number; }; - rectangleCornerB: { Hrzn: number; Vrtc: number; }; - rectangleCornerC: { Hrzn: number; Vrtc: number; }; - rectangleCornerD: { Hrzn: number; Vrtc: number; }; - }; - Trnf?: { xx: number; xy: number; yx: number; yy: number; tx: number; ty: number; }, - keyOriginIndex: number; - }[]; -} - -addHandler( - 'vogk', - hasKey('vectorOrigination'), - (reader, target, left) => { - if (readInt32(reader) !== 1) throw new Error(`Invalid vogk version`); - const desc = readVersionAndDescriptor(reader) as VogkDescriptor; - // console.log(require('util').inspect(desc, false, 99, true)); - - target.vectorOrigination = { keyDescriptorList: [] }; - - for (const i of desc.keyDescriptorList) { - const item: KeyDescriptorItem = {}; - - if (i.keyShapeInvalidated != null) item.keyShapeInvalidated = i.keyShapeInvalidated; - if (i.keyOriginType != null) item.keyOriginType = i.keyOriginType; - if (i.keyOriginResolution != null) item.keyOriginResolution = i.keyOriginResolution; - if (i.keyOriginShapeBBox) { - item.keyOriginShapeBoundingBox = { - top: parseUnits(i.keyOriginShapeBBox['Top ']), - left: parseUnits(i.keyOriginShapeBBox.Left), - bottom: parseUnits(i.keyOriginShapeBBox.Btom), - right: parseUnits(i.keyOriginShapeBBox.Rght), - }; - } - const rectRadii = i.keyOriginRRectRadii; - if (rectRadii) { - item.keyOriginRRectRadii = { - topRight: parseUnits(rectRadii.topRight), - topLeft: parseUnits(rectRadii.topLeft), - bottomLeft: parseUnits(rectRadii.bottomLeft), - bottomRight: parseUnits(rectRadii.bottomRight), - }; - } - const corners = i.keyOriginBoxCorners; - if (corners) { - item.keyOriginBoxCorners = [ - { x: corners.rectangleCornerA.Hrzn, y: corners.rectangleCornerA.Vrtc }, - { x: corners.rectangleCornerB.Hrzn, y: corners.rectangleCornerB.Vrtc }, - { x: corners.rectangleCornerC.Hrzn, y: corners.rectangleCornerC.Vrtc }, - { x: corners.rectangleCornerD.Hrzn, y: corners.rectangleCornerD.Vrtc }, - ]; - } - const trnf = i.Trnf; - if (trnf) { - item.transform = [trnf.xx, trnf.xy, trnf.xy, trnf.yy, trnf.tx, trnf.ty]; - } - - target.vectorOrigination.keyDescriptorList.push(item); - } - - skipBytes(reader, left()); - }, - (writer, target) => { - target; - const orig = target.vectorOrigination!; - const desc: VogkDescriptor = { keyDescriptorList: [] }; - - for (let i = 0; i < orig.keyDescriptorList.length; i++) { - const item = orig.keyDescriptorList[i]; - - if (item.keyShapeInvalidated) { - desc.keyDescriptorList.push({ keyShapeInvalidated: true, keyOriginIndex: i }); - } else { - desc.keyDescriptorList.push({} as any); // we're adding keyOriginIndex at the end - - const out = desc.keyDescriptorList[desc.keyDescriptorList.length - 1]; - - if (item.keyOriginType != null) out.keyOriginType = item.keyOriginType; - if (item.keyOriginResolution != null) out.keyOriginResolution = item.keyOriginResolution; - - const radii = item.keyOriginRRectRadii; - if (radii) { - out.keyOriginRRectRadii = { - unitValueQuadVersion: 1, - topRight: unitsValue(radii.topRight, 'topRight'), - topLeft: unitsValue(radii.topLeft, 'topLeft'), - bottomLeft: unitsValue(radii.bottomLeft, 'bottomLeft'), - bottomRight: unitsValue(radii.bottomRight, 'bottomRight'), - }; - } - - const box = item.keyOriginShapeBoundingBox; - if (box) { - out.keyOriginShapeBBox = { - unitValueQuadVersion: 1, - 'Top ': unitsValue(box.top, 'top'), - Left: unitsValue(box.left, 'left'), - Btom: unitsValue(box.bottom, 'bottom'), - Rght: unitsValue(box.right, 'right'), - }; - } - - const corners = item.keyOriginBoxCorners; - if (corners && corners.length === 4) { - out.keyOriginBoxCorners = { - rectangleCornerA: { Hrzn: corners[0].x, Vrtc: corners[0].y }, - rectangleCornerB: { Hrzn: corners[1].x, Vrtc: corners[1].y }, - rectangleCornerC: { Hrzn: corners[2].x, Vrtc: corners[2].y }, - rectangleCornerD: { Hrzn: corners[3].x, Vrtc: corners[3].y }, - }; - } - - const transform = item.transform; - if (transform && transform.length === 6) { - out.Trnf = { - xx: transform[0], - xy: transform[1], - yx: transform[2], - yy: transform[3], - tx: transform[4], - ty: transform[5], - }; - } - - out.keyOriginIndex = i; - } - } - - writeInt32(writer, 1); // version - writeVersionAndDescriptor(writer, '', 'null', desc); - } -); - -addHandler( - 'lmfx', - target => target.effects !== undefined && hasMultiEffects(target.effects), - (reader, target, left, _, options) => { - const version = readUint32(reader); - if (version !== 0) throw new Error('Invalid lmfx version'); - - const desc: LmfxDescriptor = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(info, false, 99, true)); - - // discard if read in 'lrFX' or 'lfx2' section - target.effects = parseEffects(desc, !!options.logMissingFeatures); - - skipBytes(reader, left()); - }, - (writer, target, _, options) => { - const desc = serializeEffects(target.effects!, !!options.logMissingFeatures, true); - - writeUint32(writer, 0); // version - writeVersionAndDescriptor(writer, '', 'null', desc); - }, -); - -addHandler( - 'lrFX', - hasKey('effects'), - (reader, target, left) => { - if (!target.effects) target.effects = readEffects(reader); - - skipBytes(reader, left()); - }, - (writer, target) => { - writeEffects(writer, target.effects!); - }, -); - -addHandler( - 'luni', - hasKey('name'), - (reader, target, left) => { - target.name = readUnicodeString(reader); - skipBytes(reader, left()); - }, - (writer, target) => { - writeUnicodeString(writer, target.name!); - // writeUint16(writer, 0); // padding (but not extending string length) - }, -); - -addHandler( - 'lnsr', - hasKey('nameSource'), - (reader, target) => target.nameSource = readSignature(reader), - (writer, target) => writeSignature(writer, target.nameSource!), -); - -addHandler( - 'lyid', - hasKey('id'), - (reader, target) => target.id = readUint32(reader), - (writer, target, _psd, options) => { - let id = target.id!; - while (options.layerIds.has(id)) id += 100; // make sure we don't have duplicate layer ids - writeUint32(writer, id); - options.layerIds.add(id); - options.layerToId.set(target, id); - }, -); - -addHandler( - 'lsct', - hasKey('sectionDivider'), - (reader, target, left) => { - target.sectionDivider = { type: readUint32(reader) }; - - if (left()) { - checkSignature(reader, '8BIM'); - target.sectionDivider.key = readSignature(reader); - } - - if (left()) { - target.sectionDivider.subType = readUint32(reader); - } - }, - (writer, target) => { - writeUint32(writer, target.sectionDivider!.type); - - if (target.sectionDivider!.key) { - writeSignature(writer, '8BIM'); - writeSignature(writer, target.sectionDivider!.key); - - if (target.sectionDivider!.subType !== undefined) { - writeUint32(writer, target.sectionDivider!.subType); - } - } - }, -); - -// it seems lsdk is used when there's a layer is nested more than 6 levels, but I don't know why? -// maybe some limitation of old version of PS? -addHandlerAlias('lsdk', 'lsct'); - -addHandler( - 'clbl', - hasKey('blendClippendElements'), - (reader, target) => { - target.blendClippendElements = !!readUint8(reader); - skipBytes(reader, 3); - }, - (writer, target) => { - writeUint8(writer, target.blendClippendElements ? 1 : 0); - writeZeros(writer, 3); - }, -); - -addHandler( - 'infx', - hasKey('blendInteriorElements'), - (reader, target) => { - target.blendInteriorElements = !!readUint8(reader); - skipBytes(reader, 3); - }, - (writer, target) => { - writeUint8(writer, target.blendInteriorElements ? 1 : 0); - writeZeros(writer, 3); - }, -); - -addHandler( - 'knko', - hasKey('knockout'), - (reader, target) => { - target.knockout = !!readUint8(reader); - skipBytes(reader, 3); - }, - (writer, target) => { - writeUint8(writer, target.knockout ? 1 : 0); - writeZeros(writer, 3); - }, -); - -addHandler( - 'lmgm', - hasKey('layerMaskAsGlobalMask'), - (reader, target) => { - target.layerMaskAsGlobalMask = !!readUint8(reader); - skipBytes(reader, 3); - }, - (writer, target) => { - writeUint8(writer, target.layerMaskAsGlobalMask ? 1 : 0); - writeZeros(writer, 3); - }, -); - -addHandler( - 'lspf', - hasKey('protected'), - (reader, target) => { - const flags = readUint32(reader); - target.protected = { - transparency: (flags & 0x01) !== 0, - composite: (flags & 0x02) !== 0, - position: (flags & 0x04) !== 0, - }; - - if (flags & 0x08) target.protected.artboards = true; - }, - (writer, target) => { - const flags = - (target.protected!.transparency ? 0x01 : 0) | - (target.protected!.composite ? 0x02 : 0) | - (target.protected!.position ? 0x04 : 0) | - (target.protected!.artboards ? 0x08 : 0); - - writeUint32(writer, flags); - }, -); - -addHandler( - 'lclr', - hasKey('layerColor'), - (reader, target) => { - const color = readUint16(reader); - skipBytes(reader, 6); - target.layerColor = layerColors[color]; - }, - (writer, target) => { - const index = layerColors.indexOf(target.layerColor!); - writeUint16(writer, index === -1 ? 0 : index); - writeZeros(writer, 6); - }, -); - -interface CustomDescriptor { - layerTime?: number; -} - -addHandler( - 'shmd', - target => target.timestamp !== undefined || target.animationFrames !== undefined || - target.animationFrameFlags !== undefined || target.timeline !== undefined, - (reader, target, left, _, options) => { - const count = readUint32(reader); - - for (let i = 0; i < count; i++) { - checkSignature(reader, '8BIM'); - const key = readSignature(reader); - readUint8(reader); // copy - skipBytes(reader, 3); - - readSection(reader, 1, left => { - if (key === 'cust') { - const desc = readVersionAndDescriptor(reader) as CustomDescriptor; - // console.log('cust', target.name, require('util').inspect(desc, false, 99, true)); - if (desc.layerTime !== undefined) target.timestamp = desc.layerTime; - } else if (key === 'mlst') { - const desc = readVersionAndDescriptor(reader) as FrameListDescriptor; - // console.log('mlst', target.name, require('util').inspect(desc, false, 99, true)); - - target.animationFrames = []; - - for (let i = 0; i < desc.LaSt.length; i++) { - const f = desc.LaSt[i]; - const frame: AnimationFrame = { frames: f.FrLs }; - if (f.enab !== undefined) frame.enable = f.enab; - if (f.Ofst) frame.offset = horzVrtcToXY(f.Ofst); - if (f.FXRf) frame.referencePoint = horzVrtcToXY(f.FXRf); - if (f.Lefx) frame.effects = parseEffects(f.Lefx, !!options.logMissingFeatures); - if (f.blendOptions && f.blendOptions.Opct) frame.opacity = parsePercent(f.blendOptions.Opct); - target.animationFrames.push(frame); - } - } else if (key === 'mdyn') { - // frame flags - readUint16(reader); // unknown - const propagate = readUint8(reader); - const flags = readUint8(reader); - - target.animationFrameFlags = { - propagateFrameOne: !propagate, - unifyLayerPosition: (flags & 1) !== 0, - unifyLayerStyle: (flags & 2) !== 0, - unifyLayerVisibility: (flags & 4) !== 0, - }; - } else if (key === 'tmln') { - const desc = readVersionAndDescriptor(reader) as TimelineDescriptor; - const timeScope = desc.timeScope; - // console.log('tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); - - const timeline: Timeline = { - start: timeScope.Strt, - duration: timeScope.duration, - inTime: timeScope.inTime, - outTime: timeScope.outTime, - autoScope: desc.autoScope, - audioLevel: desc.audioLevel, - }; - - if (desc.trackList) { - timeline.tracks = parseTrackList(desc.trackList, !!options.logMissingFeatures); - } - - target.timeline = timeline; - // console.log('tmln:result', target.name, target.id, require('util').inspect(timeline, false, 99, true)); - } else { - options.logDevFeatures && console.log('Unhandled "shmd" section key', key); - } - - skipBytes(reader, left()); - }); - } - - skipBytes(reader, left()); - }, - (writer, target, _, options) => { - const { animationFrames, animationFrameFlags, timestamp, timeline } = target; - - let count = 0; - if (animationFrames) count++; - if (animationFrameFlags) count++; - if (timeline) count++; - if (timestamp !== undefined) count++; - writeUint32(writer, count); - - if (animationFrames) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'mlst'); - writeUint8(writer, 0); // copy (always false) - writeZeros(writer, 3); - writeSection(writer, 2, () => { - const desc: FrameListDescriptor = { - LaID: target.id ?? 0, - LaSt: [], - }; - - for (let i = 0; i < animationFrames.length; i++) { - const f = animationFrames[i]; - const frame: FrameDescriptor = {} as any; - if (f.enable !== undefined) frame.enab = f.enable; - frame.FrLs = f.frames; - if (f.offset) frame.Ofst = xyToHorzVrtc(f.offset); - if (f.referencePoint) frame.FXRf = xyToHorzVrtc(f.referencePoint); - if (f.effects) frame.Lefx = serializeEffects(f.effects, false, false); - if (f.opacity !== undefined) frame.blendOptions = { Opct: unitsPercent(f.opacity) }; - desc.LaSt.push(frame); - } - - writeVersionAndDescriptor(writer, '', 'null', desc); - }, true); - } - - if (animationFrameFlags) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'mdyn'); - writeUint8(writer, 0); // copy (always false) - writeZeros(writer, 3); - writeSection(writer, 2, () => { - writeUint16(writer, 0); // unknown - writeUint8(writer, animationFrameFlags.propagateFrameOne ? 0x0 : 0xf); - writeUint8(writer, - (animationFrameFlags.unifyLayerPosition ? 1 : 0) | - (animationFrameFlags.unifyLayerStyle ? 2 : 0) | - (animationFrameFlags.unifyLayerVisibility ? 4 : 0)); - }); - } - - if (timeline) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'tmln'); - writeUint8(writer, 0); // copy (always false) - writeZeros(writer, 3); - writeSection(writer, 2, () => { - const desc: TimelineDescriptor = { - Vrsn: 1, - timeScope: { - Vrsn: 1, - Strt: timeline.start, - duration: timeline.duration, - inTime: timeline.inTime, - outTime: timeline.outTime, - }, - autoScope: timeline.autoScope, - audioLevel: timeline.audioLevel, - } as any; - - if (timeline.tracks) { - desc.trackList = serializeTrackList(timeline.tracks); - } - - const id = options.layerToId.get(target) || target.id || 0; - if (!id) throw new Error('You need to provide layer.id value whan writing document with animations'); - desc.LyrI = id; - - // console.log('WRITE:tmln', target.name, target.id, require('util').inspect(desc, false, 99, true)); - writeVersionAndDescriptor(writer, '', 'null', desc, 'anim'); - }, true); - } - - if (timestamp !== undefined) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'cust'); - writeUint8(writer, 0); // copy (always false) - writeZeros(writer, 3); - writeSection(writer, 2, () => { - const desc: CustomDescriptor = { - layerTime: timestamp, - }; - writeVersionAndDescriptor(writer, '', 'metadata', desc); - }, true); - } - }, -); - -addHandler( - 'vstk', - hasKey('vectorStroke'), - (reader, target, left) => { - const desc = readVersionAndDescriptor(reader) as StrokeDescriptor; - // console.log(require('util').inspect(desc, false, 99, true)); - - target.vectorStroke = { - strokeEnabled: desc.strokeEnabled, - fillEnabled: desc.fillEnabled, - lineWidth: parseUnits(desc.strokeStyleLineWidth), - lineDashOffset: parseUnits(desc.strokeStyleLineDashOffset), - miterLimit: desc.strokeStyleMiterLimit, - lineCapType: strokeStyleLineCapType.decode(desc.strokeStyleLineCapType), - lineJoinType: strokeStyleLineJoinType.decode(desc.strokeStyleLineJoinType), - lineAlignment: strokeStyleLineAlignment.decode(desc.strokeStyleLineAlignment), - scaleLock: desc.strokeStyleScaleLock, - strokeAdjust: desc.strokeStyleStrokeAdjust, - lineDashSet: desc.strokeStyleLineDashSet.map(parseUnits), - blendMode: BlnM.decode(desc.strokeStyleBlendMode), - opacity: parsePercent(desc.strokeStyleOpacity), - content: parseVectorContent(desc.strokeStyleContent), - resolution: desc.strokeStyleResolution, - }; - - skipBytes(reader, left()); - }, - (writer, target) => { - const stroke = target.vectorStroke!; - const descriptor: StrokeDescriptor = { - strokeStyleVersion: 2, - strokeEnabled: !!stroke.strokeEnabled, - fillEnabled: !!stroke.fillEnabled, - strokeStyleLineWidth: stroke.lineWidth || { value: 3, units: 'Points' }, - strokeStyleLineDashOffset: stroke.lineDashOffset || { value: 0, units: 'Points' }, - strokeStyleMiterLimit: stroke.miterLimit ?? 100, - strokeStyleLineCapType: strokeStyleLineCapType.encode(stroke.lineCapType), - strokeStyleLineJoinType: strokeStyleLineJoinType.encode(stroke.lineJoinType), - strokeStyleLineAlignment: strokeStyleLineAlignment.encode(stroke.lineAlignment), - strokeStyleScaleLock: !!stroke.scaleLock, - strokeStyleStrokeAdjust: !!stroke.strokeAdjust, - strokeStyleLineDashSet: stroke.lineDashSet || [], - strokeStyleBlendMode: BlnM.encode(stroke.blendMode), - strokeStyleOpacity: unitsPercent(stroke.opacity ?? 1), - strokeStyleContent: serializeVectorContent( - stroke.content || { type: 'color', color: { r: 0, g: 0, b: 0 } }).descriptor, - strokeStyleResolution: stroke.resolution ?? 72, - }; - - writeVersionAndDescriptor(writer, '', 'strokeStyle', descriptor); - }, -); - -interface ArtbDescriptor { - artboardRect: { 'Top ': number; Left: number; Btom: number; Rght: number; }; - guideIndeces: any[]; - artboardPresetName: string; - 'Clr ': DescriptorColor; - artboardBackgroundType: number; -} - -addHandler( - 'artb', // per-layer arboard info - hasKey('artboard'), - (reader, target, left) => { - const desc = readVersionAndDescriptor(reader) as ArtbDescriptor; - const rect = desc.artboardRect; - target.artboard = { - rect: { top: rect['Top '], left: rect.Left, bottom: rect.Btom, right: rect.Rght }, - guideIndices: desc.guideIndeces, - presetName: desc.artboardPresetName, - color: parseColor(desc['Clr ']), - backgroundType: desc.artboardBackgroundType, - }; - - skipBytes(reader, left()); - }, - (writer, target) => { - const artboard = target.artboard!; - const rect = artboard.rect; - const desc: ArtbDescriptor = { - artboardRect: { 'Top ': rect.top, Left: rect.left, Btom: rect.bottom, Rght: rect.right }, - guideIndeces: artboard.guideIndices || [], - artboardPresetName: artboard.presetName || '', - 'Clr ': serializeColor(artboard.color), - artboardBackgroundType: artboard.backgroundType ?? 1, - }; - - writeVersionAndDescriptor(writer, '', 'artboard', desc); - }, -); - -addHandler( - 'sn2P', - hasKey('usingAlignedRendering'), - (reader, target) => target.usingAlignedRendering = !!readUint32(reader), - (writer, target) => writeUint32(writer, target.usingAlignedRendering ? 1 : 0), -); - -const placedLayerTypes: PlacedLayerType[] = ['unknown', 'vector', 'raster', 'image stack']; - -function parseWarp(warp: WarpDescriptor & QuiltWarpDescriptor): Warp { - const result: Warp = { - style: warpStyle.decode(warp.warpStyle), - ...(warp.warpValues ? { values: warp.warpValues } : { value: warp.warpValue || 0 }), - perspective: warp.warpPerspective || 0, - perspectiveOther: warp.warpPerspectiveOther || 0, - rotate: Ornt.decode(warp.warpRotate), - bounds: warp.bounds && { - top: parseUnitsOrNumber(warp.bounds['Top ']), - left: parseUnitsOrNumber(warp.bounds.Left), - bottom: parseUnitsOrNumber(warp.bounds.Btom), - right: parseUnitsOrNumber(warp.bounds.Rght), - }, - uOrder: warp.uOrder, - vOrder: warp.vOrder, - }; - - if (warp.deformNumRows != null || warp.deformNumCols != null) { - result.deformNumRows = warp.deformNumRows; - result.deformNumCols = warp.deformNumCols; - } - - const envelopeWarp = warp.customEnvelopeWarp; - if (envelopeWarp) { - result.customEnvelopeWarp = { - meshPoints: [], - }; - - const xs = envelopeWarp.meshPoints.find(i => i.type === 'Hrzn')?.values || []; - const ys = envelopeWarp.meshPoints.find(i => i.type === 'Vrtc')?.values || []; - - for (let i = 0; i < xs.length; i++) { - result.customEnvelopeWarp!.meshPoints.push({ x: xs[i], y: ys[i] }); - } - - if (envelopeWarp.quiltSliceX || envelopeWarp.quiltSliceY) { - result.customEnvelopeWarp.quiltSliceX = envelopeWarp.quiltSliceX?.[0]?.values || []; - result.customEnvelopeWarp.quiltSliceY = envelopeWarp.quiltSliceY?.[0]?.values || []; - } - } - - return result; -} - -function isQuiltWarp(warp: Warp) { - return warp.deformNumCols != null || warp.deformNumRows != null || - warp.customEnvelopeWarp?.quiltSliceX || warp.customEnvelopeWarp?.quiltSliceY; -} - -function encodeWarp(warp: Warp): WarpDescriptor { - const bounds = warp.bounds; - const desc: WarpDescriptor = { - warpStyle: warpStyle.encode(warp.style), - ...(warp.values ? { warpValues: warp.values } : { warpValue: warp.value }), - warpPerspective: warp.perspective || 0, - warpPerspectiveOther: warp.perspectiveOther || 0, - warpRotate: Ornt.encode(warp.rotate), - bounds: { - 'Top ': unitsValue(bounds && bounds.top || { units: 'Pixels', value: 0 }, 'bounds.top'), - Left: unitsValue(bounds && bounds.left || { units: 'Pixels', value: 0 }, 'bounds.left'), - Btom: unitsValue(bounds && bounds.bottom || { units: 'Pixels', value: 0 }, 'bounds.bottom'), - Rght: unitsValue(bounds && bounds.right || { units: 'Pixels', value: 0 }, 'bounds.right'), - }, - uOrder: warp.uOrder || 0, - vOrder: warp.vOrder || 0, - }; - - const isQuilt = isQuiltWarp(warp); - - if (isQuilt) { - const desc2 = desc as QuiltWarpDescriptor; - desc2.deformNumRows = warp.deformNumRows || 0; - desc2.deformNumCols = warp.deformNumCols || 0; - } - - const customEnvelopeWarp = warp.customEnvelopeWarp; - if (customEnvelopeWarp) { - const meshPoints = customEnvelopeWarp.meshPoints || []; - - if (isQuilt) { - const desc2 = desc as QuiltWarpDescriptor; - desc2.customEnvelopeWarp = { - quiltSliceX: [{ - type: 'quiltSliceX', - values: customEnvelopeWarp.quiltSliceX || [], - }], - quiltSliceY: [{ - type: 'quiltSliceY', - values: customEnvelopeWarp.quiltSliceY || [], - }], - meshPoints: [ - { type: 'Hrzn', values: meshPoints.map(p => p.x) }, - { type: 'Vrtc', values: meshPoints.map(p => p.y) }, - ], - }; - } else { - desc.customEnvelopeWarp = { - meshPoints: [ - { type: 'Hrzn', values: meshPoints.map(p => p.x) }, - { type: 'Vrtc', values: meshPoints.map(p => p.y) }, - ], - }; - } - } - - return desc; -} - -addHandler( - 'PlLd', - hasKey('placedLayer'), - (reader, target, left) => { - if (readSignature(reader) !== 'plcL') throw new Error(`Invalid PlLd signature`); - if (readInt32(reader) !== 3) throw new Error(`Invalid PlLd version`); - const id = readPascalString(reader, 1); - const pageNumber = readInt32(reader); - const totalPages = readInt32(reader); // TODO: check how this works ? - readInt32(reader); // anitAliasPolicy 16 - const placedLayerType = readInt32(reader); // 0 = unknown, 1 = vector, 2 = raster, 3 = image stack - if (!placedLayerTypes[placedLayerType]) throw new Error('Invalid PlLd type'); - const transform: number[] = []; - for (let i = 0; i < 8; i++) transform.push(readFloat64(reader)); // x, y of 4 corners of the transform - const warpVersion = readInt32(reader); - if (warpVersion !== 0) throw new Error(`Invalid Warp version ${warpVersion}`); - const warp: WarpDescriptor & QuiltWarpDescriptor = readVersionAndDescriptor(reader); - - target.placedLayer = target.placedLayer || { // skip if SoLd already set it - id, - type: placedLayerTypes[placedLayerType], - pageNumber, - totalPages, - transform, - warp: parseWarp(warp), - }; - - // console.log('PlLd warp', require('util').inspect(warp, false, 99, true)); - // console.log('PlLd', require('util').inspect(target.placedLayer, false, 99, true)); - - skipBytes(reader, left()); - }, - (writer, target) => { - const placed = target.placedLayer!; - writeSignature(writer, 'plcL'); - writeInt32(writer, 3); // version - writePascalString(writer, placed.id, 1); - writeInt32(writer, 1); // pageNumber - writeInt32(writer, 1); // totalPages - writeInt32(writer, 16); // anitAliasPolicy - if (placedLayerTypes.indexOf(placed.type) === -1) throw new Error('Invalid placedLayer type'); - writeInt32(writer, placedLayerTypes.indexOf(placed.type)); - for (let i = 0; i < 8; i++) writeFloat64(writer, placed.transform[i]); - writeInt32(writer, 0); // warp version - const isQuilt = placed.warp && isQuiltWarp(placed.warp); - const type = isQuilt ? 'quiltWarp' : 'warp'; - writeVersionAndDescriptor(writer, '', type, encodeWarp(placed.warp || {}), type); - }, -); - -interface HrznVrtcDescriptor { - Hrzn: DescriptorUnitsValue; - Vrtc: DescriptorUnitsValue; -} - -interface SoLdDescriptorFilter { - enab: boolean, - validAtPosition: boolean, - filterMaskEnable: boolean, - filterMaskLinked: boolean, - filterMaskExtendWithWhite: boolean, - filterFXList: { - 'Nm ': string; - blendOptions: { - Opct: DescriptorUnitsValue; - 'Md ': string; // blend mode - }; - enab: boolean; - hasoptions: boolean; - FrgC: DescriptorColor; - BckC: DescriptorColor; - Fltr: { - 'null': string[]; // [Ordn.Trgt] - rigidType: boolean; - puppetShapeList: { - rigidType: boolean; - VrsM: number; - VrsN: number; - originalVertexArray: Uint8Array; - deformedVertexArray: Uint8Array; - indexArray: Uint8Array; - pinOffsets: number[]; - posFinalPins: number[]; - pinVertexIndices: number[]; - PinP: number[]; - PnRt: number[]; - PnOv: boolean[]; - PnDp: number[]; - meshQuality: number; - meshExpansion: number; - meshRigidity: number; - imageResolution: number; - meshBoundaryPath: { - pathComponents: { - shapeOperation: string; // shapeOperation.xor - SbpL: { - Clsp: boolean; - 'Pts ': { - Anch: HrznVrtcDescriptor; - 'Fwd ': HrznVrtcDescriptor; - 'Bwd ': HrznVrtcDescriptor; - Smoo: boolean; - }[]; - }[]; - }[]; - }; - selectedPin: number[]; - }[]; - PuX0: number; - PuX1: number; - PuX2: number; - PuX3: number; - PuY0: number; - PuY1: number; - PuY2: number; - PuY3: number; - }; - filterID: number; - }[]; -} - -function uint8ToFloat32(array: Uint8Array) { - return new Float32Array(array.buffer.slice(array.byteOffset), 0, array.byteLength / 4); -} - -function uint8ToUint32(array: Uint8Array) { - return new Uint32Array(array.buffer.slice(array.byteOffset), 0, array.byteLength / 4); -} - -function toUint8(array: Uint32Array | Float32Array) { - return new Uint8Array(array.buffer, array.byteOffset, array.byteLength); -} - -function arrayToPoints(array: number[] | Uint32Array | Float32Array) { - const points: { x: number; y: number }[] = []; - - for (let i = 0; i < array.length; i += 2) { - points.push({ x: array[i], y: array[i + 1] }); - } - - return points; -} - -function pointsToArray(points: { x: number; y: number }[]) { - const array: number[] = []; - for (let i = 0; i < points.length; i++) { - array.push(points[i].x, points[i].y); - } - return array; -} - -function uin8ToPoints(array: Uint8Array) { - return arrayToPoints(uint8ToFloat32(array)); -} - -function hrznVrtcToPoint(desc: HrznVrtcDescriptor) { - return { - x: parseUnits(desc.Hrzn), - y: parseUnits(desc.Vrtc), - }; -} - -function pointToHrznVrtc(point: { x: UnitsValue; y: UnitsValue; }): HrznVrtcDescriptor { - return { - Hrzn: unitsValue(point.x, 'x'), - Vrtc: unitsValue(point.y, 'y'), - }; -} - -function parseFilterFX(desc: SoLdDescriptorFilter): PlacedLayerFilter { - return { - enabled: desc.enab, - validAtPosition: desc.validAtPosition, - maskEnabled: desc.filterMaskEnable, - maskLinked: desc.filterMaskLinked, - maskExtendWithWhite: desc.filterMaskExtendWithWhite, - list: desc.filterFXList.map(f => ({ - id: f.filterID, - name: f['Nm '], - opacity: parsePercent(f.blendOptions.Opct), - blendMode: BlnM.decode(f.blendOptions['Md ']), - enabled: f.enab, - hasOptions: f.hasoptions, - foregroundColor: parseColor(f.FrgC), - backgroundColor: parseColor(f.BckC), - filter: { - rigidType: f.Fltr.rigidType, - bounds: [ - { x: f.Fltr.PuX0, y: f.Fltr.PuY0, }, - { x: f.Fltr.PuX1, y: f.Fltr.PuY1, }, - { x: f.Fltr.PuX2, y: f.Fltr.PuY2, }, - { x: f.Fltr.PuX3, y: f.Fltr.PuY3, }, - ], - puppetShapeList: f.Fltr.puppetShapeList.map(p => ({ - rigidType: p.rigidType, - // TODO: VrsM - // TODO: VrsN - originalVertexArray: uin8ToPoints(p.originalVertexArray), - deformedVertexArray: uin8ToPoints(p.deformedVertexArray), - indexArray: Array.from(uint8ToUint32(p.indexArray)), - pinOffsets: arrayToPoints(p.pinOffsets), - posFinalPins: arrayToPoints(p.posFinalPins), - pinVertexIndices: p.pinVertexIndices, - selectedPin: p.selectedPin, - pinPosition: arrayToPoints(p.PinP), - pinRotation: p.PnRt, - pinOverlay: p.PnOv, - pinDepth: p.PnDp, - meshQuality: p.meshQuality, - meshExpansion: p.meshExpansion, - meshRigidity: p.meshRigidity, - imageResolution: p.imageResolution, - meshBoundaryPath: { - pathComponents: p.meshBoundaryPath.pathComponents.map(c => ({ - shapeOperation: c.shapeOperation.split('.')[1], - paths: c.SbpL.map(t => ({ - closed: t.Clsp, - points: t['Pts '].map(pt => ({ - anchor: hrznVrtcToPoint(pt.Anch), - forward: hrznVrtcToPoint(pt['Fwd ']), - backward: hrznVrtcToPoint(pt['Bwd ']), - smooth: pt.Smoo, - })), - })), - })), - }, - })), - }, - })), - }; -} - -function serializeFilterFX(filter: PlacedLayerFilter): SoLdDescriptorFilter { - return { - enab: filter.enabled, - validAtPosition: filter.validAtPosition, - filterMaskEnable: filter.maskEnabled, - filterMaskLinked: filter.maskLinked, - filterMaskExtendWithWhite: filter.maskExtendWithWhite, - filterFXList: (filter.list || []).map(f => ({ - 'Nm ': f.name, - blendOptions: { - Opct: unitsPercent(f.opacity), - 'Md ': BlnM.encode(f.blendMode), - }, - enab: f.enabled, - hasoptions: f.hasOptions, - FrgC: serializeColor(f.foregroundColor), - BckC: serializeColor(f.backgroundColor), - Fltr: { - 'null': ['Ordn.Trgt'], // ??? - rigidType: f.filter.rigidType, - puppetShapeList: (f.filter.puppetShapeList || []).map(p => ({ - rigidType: p.rigidType, - VrsM: 1, // TODO: ... - VrsN: 0, // TODO: ... - originalVertexArray: toUint8(new Float32Array(pointsToArray(p.originalVertexArray))), - deformedVertexArray: toUint8(new Float32Array(pointsToArray(p.deformedVertexArray))), - indexArray: toUint8(new Uint32Array(p.indexArray)), - pinOffsets: pointsToArray(p.pinOffsets), - posFinalPins: pointsToArray(p.posFinalPins), - selectedPin: p.selectedPin, - pinVertexIndices: p.pinVertexIndices, - PinP: pointsToArray(p.pinPosition), - PnRt: p.pinRotation, - PnOv: p.pinOverlay, - PnDp: p.pinDepth, - meshQuality: p.meshQuality, - meshExpansion: p.meshExpansion, - meshRigidity: p.meshRigidity, - imageResolution: p.imageResolution, - meshBoundaryPath: { - pathComponents: (p.meshBoundaryPath.pathComponents || []).map(c => ({ - shapeOperation: `shapeOperation.${c.shapeOperation}`, - SbpL: (c.paths || []).map(path => ({ - Clsp: path.closed, - 'Pts ': (path.points || []).map(pt => ({ - Anch: pointToHrznVrtc(pt.anchor), - 'Fwd ': pointToHrznVrtc(pt.forward), - 'Bwd ': pointToHrznVrtc(pt.backward), - Smoo: pt.smooth, - })), - })), - })), - }, - })), - PuX0: f.filter.bounds[0].x, - PuX1: f.filter.bounds[1].x, - PuX2: f.filter.bounds[2].x, - PuX3: f.filter.bounds[3].x, - PuY0: f.filter.bounds[0].y, - PuY1: f.filter.bounds[1].y, - PuY2: f.filter.bounds[2].y, - PuY3: f.filter.bounds[3].y, - }, - filterID: f.id, - })), - }; -} - -interface SoLdDescriptor { - Idnt: string; - placed: string; - PgNm: number; - totalPages: number; - Crop?: number; - frameStep: FractionDescriptor; - duration: FractionDescriptor; - frameCount: number; - Annt: number; - Type: number; - Trnf: number[]; - nonAffineTransform: number[]; - quiltWarp?: QuiltWarpDescriptor; - warp: WarpDescriptor; - 'Sz ': { Wdth: number; Hght: number; }; - Rslt: DescriptorUnitsValue; - filterFX?: SoLdDescriptorFilter; - comp?: number; - compInfo?: { compID: number; originalCompID: number; }; - Impr?: {}; // ??? -} - -addHandler( - 'SoLd', - hasKey('placedLayer'), - (reader, target, left) => { - if (readSignature(reader) !== 'soLD') throw new Error(`Invalid SoLd type`); - const version = readInt32(reader); - if (version !== 4 && version !== 5) throw new Error(`Invalid SoLd version`); - const desc: SoLdDescriptor = readVersionAndDescriptor(reader); - // console.log('SoLd', require('util').inspect(desc, false, 99, true)); - // console.log('SoLd.warp', require('util').inspect(desc.warp, false, 99, true)); - // console.log('SoLd.quiltWarp', require('util').inspect(desc.quiltWarp, false, 99, true)); - // desc.filterFX!.filterFXList[0].Fltr.puppetShapeList[0].meshBoundaryPath.pathComponents[0].SbpL[0]['Pts '] = []; - // console.log('filterFX', require('util').inspect(desc.filterFX, false, 99, true)); - - target.placedLayer = { - id: desc.Idnt, - placed: desc.placed, - type: placedLayerTypes[desc.Type], - pageNumber: desc.PgNm, - totalPages: desc.totalPages, - frameStep: desc.frameStep, - duration: desc.duration, - frameCount: desc.frameCount, - transform: desc.Trnf, - width: desc['Sz '].Wdth, - height: desc['Sz '].Hght, - resolution: parseUnits(desc.Rslt), - warp: parseWarp((desc.quiltWarp || desc.warp) as any), - }; - - if (desc.nonAffineTransform && desc.nonAffineTransform.some((x, i) => x !== desc.Trnf[i])) { - target.placedLayer.nonAffineTransform = desc.nonAffineTransform; - } - - if (desc.Crop) target.placedLayer.crop = desc.Crop; - if (desc.comp) target.placedLayer.comp = desc.comp; - if (desc.compInfo) target.placedLayer.compInfo = desc.compInfo; - if (desc.filterFX) target.placedLayer.filter = parseFilterFX(desc.filterFX); - - skipBytes(reader, left()); // HACK - }, - (writer, target) => { - writeSignature(writer, 'soLD'); - writeInt32(writer, 4); // version - - const placed = target.placedLayer!; - const desc: SoLdDescriptor = { - Idnt: placed.id, - placed: placed.placed ?? placed.id, - PgNm: placed.pageNumber || 1, - totalPages: placed.totalPages || 1, - ...(placed.crop ? { Crop: placed.crop } : {}), - frameStep: placed.frameStep || { numerator: 0, denominator: 600 }, - duration: placed.duration || { numerator: 0, denominator: 600 }, - frameCount: placed.frameCount || 0, - Annt: 16, - Type: placedLayerTypes.indexOf(placed.type), - Trnf: placed.transform, - nonAffineTransform: placed.nonAffineTransform ?? placed.transform, - quiltWarp: {} as any, - warp: encodeWarp(placed.warp || {}), - 'Sz ': { - Wdth: placed.width || 0, // TODO: find size ? - Hght: placed.height || 0, // TODO: find size ? - }, - Rslt: placed.resolution ? unitsValue(placed.resolution, 'resolution') : { units: 'Density', value: 72 }, - }; - - if (placed.filter) desc.filterFX = serializeFilterFX(placed.filter); - - if (placed.warp && isQuiltWarp(placed.warp)) { - const quiltWarp = encodeWarp(placed.warp) as QuiltWarpDescriptor; - desc.quiltWarp = quiltWarp; - desc.warp = { - warpStyle: 'warpStyle.warpNone', - warpValue: quiltWarp.warpValue, - warpPerspective: quiltWarp.warpPerspective, - warpPerspectiveOther: quiltWarp.warpPerspectiveOther, - warpRotate: quiltWarp.warpRotate, - bounds: quiltWarp.bounds, - uOrder: quiltWarp.uOrder, - vOrder: quiltWarp.vOrder, - }; - } else { - delete desc.quiltWarp; - } - - if (placed.comp) desc.comp = placed.comp; - if (placed.compInfo) desc.compInfo = placed.compInfo; - - writeVersionAndDescriptor(writer, '', 'null', desc, desc.quiltWarp ? 'quiltWarp' : 'warp'); - }, -); - -addHandlerAlias('SoLE', 'SoLd'); - -addHandler( - 'fxrp', - hasKey('referencePoint'), - (reader, target) => { - target.referencePoint = { - x: readFloat64(reader), - y: readFloat64(reader), - }; - }, - (writer, target) => { - writeFloat64(writer, target.referencePoint!.x); - writeFloat64(writer, target.referencePoint!.y); - }, -); - -if (MOCK_HANDLERS) { - addHandler( - 'Patt', - target => (target as any)._Patt !== undefined, - (reader, target, left) => { - // console.log('additional info: Patt'); - (target as any)._Patt = readBytes(reader, left()); - }, - (writer, target) => false && writeBytes(writer, (target as any)._Patt), - ); -} else { - addHandler( - 'Patt', // TODO: handle also Pat2 & Pat3 - target => !target, - (reader, target, left) => { - if (!left()) return; - - skipBytes(reader, left()); return; // not supported yet - target; readPattern; - - // if (!target.patterns) target.patterns = []; - // target.patterns.push(readPattern(reader)); - // skipBytes(reader, left()); - }, - (_writer, _target) => { - }, - ); -} - -function readRect(reader: PsdReader) { - const top = readInt32(reader); - const left = readInt32(reader); - const bottom = readInt32(reader); - const right = readInt32(reader); - return { top, left, bottom, right }; -} - -function writeRect(writer: PsdWriter, rect: { left: number; top: number; right: number; bottom: number }) { - writeInt32(writer, rect.top); - writeInt32(writer, rect.left); - writeInt32(writer, rect.bottom); - writeInt32(writer, rect.right); -} - -addHandler( - 'Anno', - target => (target as Psd).annotations !== undefined, - (reader, target, left) => { - const major = readUint16(reader); - const minor = readUint16(reader); - if (major !== 2 || minor !== 1) throw new Error('Invalid Anno version'); - const count = readUint32(reader); - const annotations: Annotation[] = []; - - for (let i = 0; i < count; i++) { - /*const length =*/ readUint32(reader); - const type = readSignature(reader); - const open = !!readUint8(reader); - /*const flags =*/ readUint8(reader); // always 28 - /*const optionalBlocks =*/ readUint16(reader); - const iconLocation = readRect(reader); - const popupLocation = readRect(reader); - const color = readColor(reader); - const author = readPascalString(reader, 2); - const name = readPascalString(reader, 2); - const date = readPascalString(reader, 2); - /*const contentLength =*/ readUint32(reader); - /*const dataType =*/ readSignature(reader); - const dataLength = readUint32(reader); - let data: string | Uint8Array; - - if (type === 'txtA') { - if (dataLength >= 2 && readUint16(reader) === 0xfeff) { - data = readUnicodeStringWithLength(reader, (dataLength - 2) / 2); - } else { - reader.offset -= 2; - data = readAsciiString(reader, dataLength); - } - - data = data.replace(/\r/g, '\n'); - } else if (type === 'sndA') { - data = readBytes(reader, dataLength); - } else { - throw new Error('Unknown annotation type'); - } - - annotations.push({ - type: type === 'txtA' ? 'text' : 'sound', open, iconLocation, popupLocation, color, author, name, date, data, - }); - } - - (target as Psd).annotations = annotations; - skipBytes(reader, left()); - }, - (writer, target) => { - const annotations = (target as Psd).annotations!; - - writeUint16(writer, 2); - writeUint16(writer, 1); - writeUint32(writer, annotations.length); - - for (const annotation of annotations) { - const sound = annotation.type === 'sound'; - - if (sound && !(annotation.data instanceof Uint8Array)) throw new Error('Sound annotation data should be Uint8Array'); - if (!sound && typeof annotation.data !== 'string') throw new Error('Text annotation data should be string'); - - const lengthOffset = writer.offset; - writeUint32(writer, 0); // length - writeSignature(writer, sound ? 'sndA' : 'txtA'); - writeUint8(writer, annotation.open ? 1 : 0); - writeUint8(writer, 28); - writeUint16(writer, 1); - writeRect(writer, annotation.iconLocation); - writeRect(writer, annotation.popupLocation); - writeColor(writer, annotation.color); - writePascalString(writer, annotation.author || '', 2); - writePascalString(writer, annotation.name || '', 2); - writePascalString(writer, annotation.date || '', 2); - const contentOffset = writer.offset; - writeUint32(writer, 0); // content length - writeSignature(writer, sound ? 'sndM' : 'txtC'); - writeUint32(writer, 0); // data length - const dataOffset = writer.offset; - - if (sound) { - writeBytes(writer, annotation.data as Uint8Array); - } else { - writeUint16(writer, 0xfeff); // unicode string indicator - const text = (annotation.data as string).replace(/\n/g, '\r'); - for (let i = 0; i < text.length; i++) writeUint16(writer, text.charCodeAt(i)); - } - - writer.view.setUint32(lengthOffset, writer.offset - lengthOffset, false); - writer.view.setUint32(contentOffset, writer.offset - contentOffset, false); - writer.view.setUint32(dataOffset - 4, writer.offset - dataOffset, false); - } - } -); - -interface FileOpenDescriptor { - compInfo: { compID: number; originalCompID: number; }; -} - -addHandler( - 'lnk2', - (target: any) => !!(target as Psd).linkedFiles && (target as Psd).linkedFiles!.length > 0, - (reader, target, left, _, options) => { - const psd = target as Psd; - psd.linkedFiles = psd.linkedFiles || []; - - while (left() > 8) { - let size = readLength64(reader); // size - const startOffset = reader.offset; - const type = readSignature(reader) as 'liFD' | 'liFE' | 'liFA'; - const version = readInt32(reader); - const id = readPascalString(reader, 1); - const name = readUnicodeString(reader); - const fileType = readSignature(reader).trim(); // ' ' if empty - const fileCreator = readSignature(reader).trim(); // ' ' or '\0\0\0\0' if empty - const dataSize = readLength64(reader); - const hasFileOpenDescriptor = readUint8(reader); - const fileOpenDescriptor = hasFileOpenDescriptor ? readVersionAndDescriptor(reader) as FileOpenDescriptor : undefined; - const linkedFileDescriptor = type === 'liFE' ? readVersionAndDescriptor(reader) : undefined; - const file: LinkedFile = { id, name, data: undefined }; - - if (fileType) file.type = fileType; - if (fileCreator) file.creator = fileCreator; - if (fileOpenDescriptor) file.descriptor = fileOpenDescriptor; - - if (type === 'liFE' && version > 3) { - const year = readInt32(reader); - const month = readUint8(reader); - const day = readUint8(reader); - const hour = readUint8(reader); - const minute = readUint8(reader); - const seconds = readFloat64(reader); - const wholeSeconds = Math.floor(seconds); - const ms = (seconds - wholeSeconds) * 1000; - file.time = (new Date(year, month, day, hour, minute, wholeSeconds, ms)).toISOString(); - } - - const fileSize = type === 'liFE' ? readLength64(reader) : 0; - if (type === 'liFA') skipBytes(reader, 8); - if (type === 'liFD') file.data = readBytes(reader, dataSize); - if (version >= 5) file.childDocumentID = readUnicodeString(reader); - if (version >= 6) file.assetModTime = readFloat64(reader); - if (version >= 7) file.assetLockedState = readUint8(reader); - if (type === 'liFE') file.data = readBytes(reader, fileSize); - - if (options.skipLinkedFilesData) file.data = undefined; - - psd.linkedFiles.push(file); - linkedFileDescriptor; - - while (size % 4) size++; - reader.offset = startOffset + size; - } - - skipBytes(reader, left()); // ? - }, - (writer, target) => { - const psd = target as Psd; - - for (const file of psd.linkedFiles!) { - let version = 2; - - if (file.assetLockedState != null) version = 7; - else if (file.assetModTime != null) version = 6; - else if (file.childDocumentID != null) version = 5; - // TODO: else if (file.time != null) version = 3; (only for liFE) - - writeUint32(writer, 0); - writeUint32(writer, 0); // size - const sizeOffset = writer.offset; - writeSignature(writer, file.data ? 'liFD' : 'liFA'); - writeInt32(writer, version); - writePascalString(writer, file.id || '', 1); - writeUnicodeStringWithPadding(writer, file.name || ''); - writeSignature(writer, file.type ? `${file.type} `.substring(0, 4) : ' '); - writeSignature(writer, file.creator ? `${file.creator} `.substring(0, 4) : '\0\0\0\0'); - writeLength64(writer, file.data ? file.data.byteLength : 0); - - if (file.descriptor && file.descriptor.compInfo) { - const desc: FileOpenDescriptor = { - compInfo: file.descriptor.compInfo, - }; - - writeUint8(writer, 1); - writeVersionAndDescriptor(writer, '', 'null', desc); - } else { - writeUint8(writer, 0); - } - - if (file.data) writeBytes(writer, file.data); - else writeLength64(writer, 0); - if (version >= 5) writeUnicodeStringWithPadding(writer, file.childDocumentID || ''); - if (version >= 6) writeFloat64(writer, file.assetModTime || 0); - if (version >= 7) writeUint8(writer, file.assetLockedState || 0); - - let size = writer.offset - sizeOffset; - writer.view.setUint32(sizeOffset - 4, size, false); // write size - - while (size % 4) { - size++; - writeUint8(writer, 0); - } - } - }, -); - -addHandlerAlias('lnkD', 'lnk2'); -addHandlerAlias('lnk3', 'lnk2'); -addHandlerAlias('lnkE', 'lnk2'); - -interface ExtensionDesc { - generatorSettings: { - generator_45_assets: { json: string; }; - layerTime: number; - }; -} - -addHandler( - 'pths', - hasKey('pathList'), - (reader, target) => { - const descriptor = readVersionAndDescriptor(reader); - - target.pathList = []; // TODO: read paths (find example with non-empty list) - - descriptor; - // console.log('pths', descriptor); // TODO: remove this - }, - (writer, _target) => { - const descriptor = { - pathList: [], // TODO: write paths - }; - - writeVersionAndDescriptor(writer, '', 'pathsDataClass', descriptor); - }, -); - -addHandler( - 'lyvr', - hasKey('version'), - (reader, target) => target.version = readUint32(reader), - (writer, target) => writeUint32(writer, target.version!), -); - -function adjustmentType(type: string) { - return (target: LayerAdditionalInfo) => !!target.adjustment && target.adjustment.type === type; -} - -addHandler( - 'brit', - adjustmentType('brightness/contrast'), - (reader, target, left) => { - if (!target.adjustment) { // ignore if got one from CgEd block - target.adjustment = { - type: 'brightness/contrast', - brightness: readInt16(reader), - contrast: readInt16(reader), - meanValue: readInt16(reader), - labColorOnly: !!readUint8(reader), - useLegacy: true, - }; - } - - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment as BrightnessAdjustment; - writeInt16(writer, info.brightness || 0); - writeInt16(writer, info.contrast || 0); - writeInt16(writer, info.meanValue ?? 127); - writeUint8(writer, info.labColorOnly ? 1 : 0); - writeZeros(writer, 1); - }, -); - -function readLevelsChannel(reader: PsdReader): LevelsAdjustmentChannel { - const shadowInput = readInt16(reader); - const highlightInput = readInt16(reader); - const shadowOutput = readInt16(reader); - const highlightOutput = readInt16(reader); - const midtoneInput = readInt16(reader) / 100; - return { shadowInput, highlightInput, shadowOutput, highlightOutput, midtoneInput }; -} - -function writeLevelsChannel(writer: PsdWriter, channel: LevelsAdjustmentChannel) { - writeInt16(writer, channel.shadowInput); - writeInt16(writer, channel.highlightInput); - writeInt16(writer, channel.shadowOutput); - writeInt16(writer, channel.highlightOutput); - writeInt16(writer, Math.round(channel.midtoneInput * 100)); -} - -addHandler( - 'levl', - adjustmentType('levels'), - (reader, target, left) => { - if (readUint16(reader) !== 2) throw new Error('Invalid levl version'); - - target.adjustment = { - ...target.adjustment as PresetInfo, - type: 'levels', - rgb: readLevelsChannel(reader), - red: readLevelsChannel(reader), - green: readLevelsChannel(reader), - blue: readLevelsChannel(reader), - }; - - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment as LevelsAdjustment; - const defaultChannel = { - shadowInput: 0, - highlightInput: 255, - shadowOutput: 0, - highlightOutput: 255, - midtoneInput: 1, - }; - - writeUint16(writer, 2); // version - writeLevelsChannel(writer, info.rgb || defaultChannel); - writeLevelsChannel(writer, info.red || defaultChannel); - writeLevelsChannel(writer, info.blue || defaultChannel); - writeLevelsChannel(writer, info.green || defaultChannel); - for (let i = 0; i < 59; i++) writeLevelsChannel(writer, defaultChannel); - }, -); - -function readCurveChannel(reader: PsdReader) { - const nodes = readUint16(reader); - const channel: CurvesAdjustmentChannel = []; - - for (let j = 0; j < nodes; j++) { - const output = readInt16(reader); - const input = readInt16(reader); - channel.push({ input, output }); - } - - return channel; -} - -function writeCurveChannel(writer: PsdWriter, channel: CurvesAdjustmentChannel) { - writeUint16(writer, channel.length); - - for (const n of channel) { - writeUint16(writer, n.output); - writeUint16(writer, n.input); - } -} - -addHandler( - 'curv', - adjustmentType('curves'), - (reader, target, left) => { - readUint8(reader); - if (readUint16(reader) !== 1) throw new Error('Invalid curv version'); - readUint16(reader); - const channels = readUint16(reader); - const info: CurvesAdjustment = { type: 'curves' }; - - if (channels & 1) info.rgb = readCurveChannel(reader); - if (channels & 2) info.red = readCurveChannel(reader); - if (channels & 4) info.green = readCurveChannel(reader); - if (channels & 8) info.blue = readCurveChannel(reader); - - target.adjustment = { - ...target.adjustment as PresetInfo, - ...info, - }; - - // ignoring, duplicate information - // checkSignature(reader, 'Crv '); - - // const cVersion = readUint16(reader); - // readUint16(reader); - // const channelCount = readUint16(reader); - - // for (let i = 0; i < channelCount; i++) { - // const index = readUint16(reader); - // const nodes = readUint16(reader); - - // for (let j = 0; j < nodes; j++) { - // const output = readInt16(reader); - // const input = readInt16(reader); - // } - // } - - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment as CurvesAdjustment; - const { rgb, red, green, blue } = info; - let channels = 0; - let channelCount = 0; - - if (rgb && rgb.length) { channels |= 1; channelCount++; } - if (red && red.length) { channels |= 2; channelCount++; } - if (green && green.length) { channels |= 4; channelCount++; } - if (blue && blue.length) { channels |= 8; channelCount++; } - - writeUint8(writer, 0); - writeUint16(writer, 1); // version - writeUint16(writer, 0); - writeUint16(writer, channels); - - if (rgb && rgb.length) writeCurveChannel(writer, rgb); - if (red && red.length) writeCurveChannel(writer, red); - if (green && green.length) writeCurveChannel(writer, green); - if (blue && blue.length) writeCurveChannel(writer, blue); - - writeSignature(writer, 'Crv '); - writeUint16(writer, 4); // version - writeUint16(writer, 0); - writeUint16(writer, channelCount); - - if (rgb && rgb.length) { writeUint16(writer, 0); writeCurveChannel(writer, rgb); } - if (red && red.length) { writeUint16(writer, 1); writeCurveChannel(writer, red); } - if (green && green.length) { writeUint16(writer, 2); writeCurveChannel(writer, green); } - if (blue && blue.length) { writeUint16(writer, 3); writeCurveChannel(writer, blue); } - - writeZeros(writer, 2); - }, -); - -addHandler( - 'expA', - adjustmentType('exposure'), - (reader, target, left) => { - if (readUint16(reader) !== 1) throw new Error('Invalid expA version'); - - target.adjustment = { - ...target.adjustment as PresetInfo, - type: 'exposure', - exposure: readFloat32(reader), - offset: readFloat32(reader), - gamma: readFloat32(reader), - }; - - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment as ExposureAdjustment; - writeUint16(writer, 1); // version - writeFloat32(writer, info.exposure!); - writeFloat32(writer, info.offset!); - writeFloat32(writer, info.gamma!); - writeZeros(writer, 2); - }, -); - -interface VibranceDescriptor { - vibrance?: number; - Strt?: number; -} - -addHandler( - 'vibA', - adjustmentType('vibrance'), - (reader, target, left) => { - const desc: VibranceDescriptor = readVersionAndDescriptor(reader); - target.adjustment = { type: 'vibrance' }; - if (desc.vibrance !== undefined) target.adjustment.vibrance = desc.vibrance; - if (desc.Strt !== undefined) target.adjustment.saturation = desc.Strt; - - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment as VibranceAdjustment; - const desc: VibranceDescriptor = {}; - if (info.vibrance !== undefined) desc.vibrance = info.vibrance; - if (info.saturation !== undefined) desc.Strt = info.saturation; - - writeVersionAndDescriptor(writer, '', 'null', desc); - }, -); - -function readHueChannel(reader: PsdReader): HueSaturationAdjustmentChannel { - return { - a: readInt16(reader), - b: readInt16(reader), - c: readInt16(reader), - d: readInt16(reader), - hue: readInt16(reader), - saturation: readInt16(reader), - lightness: readInt16(reader), - }; -} - -function writeHueChannel(writer: PsdWriter, channel: HueSaturationAdjustmentChannel | undefined) { - const c = channel || {} as Partial; - writeInt16(writer, c.a || 0); - writeInt16(writer, c.b || 0); - writeInt16(writer, c.c || 0); - writeInt16(writer, c.d || 0); - writeInt16(writer, c.hue || 0); - writeInt16(writer, c.saturation || 0); - writeInt16(writer, c.lightness || 0); -} - -addHandler( - 'hue2', - adjustmentType('hue/saturation'), - (reader, target, left) => { - if (readUint16(reader) !== 2) throw new Error('Invalid hue2 version'); - - target.adjustment = { - ...target.adjustment as PresetInfo, - type: 'hue/saturation', - master: readHueChannel(reader), - reds: readHueChannel(reader), - yellows: readHueChannel(reader), - greens: readHueChannel(reader), - cyans: readHueChannel(reader), - blues: readHueChannel(reader), - magentas: readHueChannel(reader), - }; - - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment as HueSaturationAdjustment; - - writeUint16(writer, 2); // version - writeHueChannel(writer, info.master); - writeHueChannel(writer, info.reds); - writeHueChannel(writer, info.yellows); - writeHueChannel(writer, info.greens); - writeHueChannel(writer, info.cyans); - writeHueChannel(writer, info.blues); - writeHueChannel(writer, info.magentas); - }, -); - -function readColorBalance(reader: PsdReader): ColorBalanceValues { - return { - cyanRed: readInt16(reader), - magentaGreen: readInt16(reader), - yellowBlue: readInt16(reader), - }; -} - -function writeColorBalance(writer: PsdWriter, value: Partial) { - writeInt16(writer, value.cyanRed || 0); - writeInt16(writer, value.magentaGreen || 0); - writeInt16(writer, value.yellowBlue || 0); -} - -addHandler( - 'blnc', - adjustmentType('color balance'), - (reader, target, left) => { - target.adjustment = { - type: 'color balance', - shadows: readColorBalance(reader), - midtones: readColorBalance(reader), - highlights: readColorBalance(reader), - preserveLuminosity: !!readUint8(reader), - }; - - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment as ColorBalanceAdjustment; - writeColorBalance(writer, info.shadows || {}); - writeColorBalance(writer, info.midtones || {}); - writeColorBalance(writer, info.highlights || {}); - writeUint8(writer, info.preserveLuminosity ? 1 : 0); - writeZeros(writer, 1); - }, -); - -interface BlackAndWhiteDescriptor { - 'Rd ': number; - Yllw: number; - 'Grn ': number; - 'Cyn ': number; - 'Bl ': number; - Mgnt: number; - useTint: boolean; - tintColor?: DescriptorColor; - bwPresetKind: number; - blackAndWhitePresetFileName: string; -} - -addHandler( - 'blwh', - adjustmentType('black & white'), - (reader, target, left) => { - const desc: BlackAndWhiteDescriptor = readVersionAndDescriptor(reader); - target.adjustment = { - type: 'black & white', - reds: desc['Rd '], - yellows: desc.Yllw, - greens: desc['Grn '], - cyans: desc['Cyn '], - blues: desc['Bl '], - magentas: desc.Mgnt, - useTint: !!desc.useTint, - presetKind: desc.bwPresetKind, - presetFileName: desc.blackAndWhitePresetFileName, - }; - - if (desc.tintColor !== undefined) target.adjustment.tintColor = parseColor(desc.tintColor); - - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment as BlackAndWhiteAdjustment; - const desc: BlackAndWhiteDescriptor = { - 'Rd ': info.reds || 0, - Yllw: info.yellows || 0, - 'Grn ': info.greens || 0, - 'Cyn ': info.cyans || 0, - 'Bl ': info.blues || 0, - Mgnt: info.magentas || 0, - useTint: !!info.useTint, - tintColor: serializeColor(info.tintColor), - bwPresetKind: info.presetKind || 0, - blackAndWhitePresetFileName: info.presetFileName || '', - }; - - writeVersionAndDescriptor(writer, '', 'null', desc); - }, -); - -addHandler( - 'phfl', - adjustmentType('photo filter'), - (reader, target, left) => { - const version = readUint16(reader); - if (version !== 2 && version !== 3) throw new Error('Invalid phfl version'); - - let color: Color; - - if (version === 2) { - color = readColor(reader); - } else { // version 3 - // TODO: test this, this is probably wrong - color = { - l: readInt32(reader) / 100, - a: readInt32(reader) / 100, - b: readInt32(reader) / 100, - }; - } - - target.adjustment = { - type: 'photo filter', - color, - density: readUint32(reader) / 100, - preserveLuminosity: !!readUint8(reader), - }; - - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment as PhotoFilterAdjustment; - writeUint16(writer, 2); // version - writeColor(writer, info.color || { l: 0, a: 0, b: 0 }); - writeUint32(writer, (info.density || 0) * 100); - writeUint8(writer, info.preserveLuminosity ? 1 : 0); - writeZeros(writer, 3); - }, -); - -function readMixrChannel(reader: PsdReader): ChannelMixerChannel { - const red = readInt16(reader); - const green = readInt16(reader); - const blue = readInt16(reader); - skipBytes(reader, 2); - const constant = readInt16(reader); - return { red, green, blue, constant }; -} - -function writeMixrChannel(writer: PsdWriter, channel: ChannelMixerChannel | undefined) { - const c = channel || {} as Partial; - writeInt16(writer, c.red!); - writeInt16(writer, c.green!); - writeInt16(writer, c.blue!); - writeZeros(writer, 2); - writeInt16(writer, c.constant!); -} - -addHandler( - 'mixr', - adjustmentType('channel mixer'), - (reader, target, left) => { - if (readUint16(reader) !== 1) throw new Error('Invalid mixr version'); - - const adjustment: ChannelMixerAdjustment = target.adjustment = { - ...target.adjustment as PresetInfo, - type: 'channel mixer', - monochrome: !!readUint16(reader), - }; - - if (!adjustment.monochrome) { - adjustment.red = readMixrChannel(reader); - adjustment.green = readMixrChannel(reader); - adjustment.blue = readMixrChannel(reader); - } - - adjustment.gray = readMixrChannel(reader); - - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment as ChannelMixerAdjustment; - writeUint16(writer, 1); // version - writeUint16(writer, info.monochrome ? 1 : 0); - - if (info.monochrome) { - writeMixrChannel(writer, info.gray); - writeZeros(writer, 3 * 5 * 2); - } else { - writeMixrChannel(writer, info.red); - writeMixrChannel(writer, info.green); - writeMixrChannel(writer, info.blue); - writeMixrChannel(writer, info.gray); - } - }, -); - -const colorLookupType = createEnum<'3dlut' | 'abstractProfile' | 'deviceLinkProfile'>('colorLookupType', '3DLUT', { - '3dlut': '3DLUT', - abstractProfile: 'abstractProfile', - deviceLinkProfile: 'deviceLinkProfile', -}); - -const LUTFormatType = createEnum<'look' | 'cube' | '3dl'>('LUTFormatType', 'look', { - look: 'LUTFormatLOOK', - cube: 'LUTFormatCUBE', - '3dl': 'LUTFormat3DL', -}); - -const colorLookupOrder = createEnum<'rgb' | 'bgr'>('colorLookupOrder', 'rgb', { - rgb: 'rgbOrder', - bgr: 'bgrOrder', -}); - -interface ColorLookupDescriptor { - lookupType?: string; - 'Nm '?: string; - Dthr?: boolean; - profile?: Uint8Array; - LUTFormat?: string; - dataOrder?: string; - tableOrder?: string; - LUT3DFileData?: Uint8Array; - LUT3DFileName?: string; -} - -addHandler( - 'clrL', - adjustmentType('color lookup'), - (reader, target, left) => { - if (readUint16(reader) !== 1) throw new Error('Invalid clrL version'); - - const desc: ColorLookupDescriptor = readVersionAndDescriptor(reader); - target.adjustment = { type: 'color lookup' }; - const info = target.adjustment; - - if (desc.lookupType !== undefined) info.lookupType = colorLookupType.decode(desc.lookupType); - if (desc['Nm '] !== undefined) info.name = desc['Nm ']; - if (desc.Dthr !== undefined) info.dither = desc.Dthr; - if (desc.profile !== undefined) info.profile = desc.profile; - if (desc.LUTFormat !== undefined) info.lutFormat = LUTFormatType.decode(desc.LUTFormat); - if (desc.dataOrder !== undefined) info.dataOrder = colorLookupOrder.decode(desc.dataOrder); - if (desc.tableOrder !== undefined) info.tableOrder = colorLookupOrder.decode(desc.tableOrder); - if (desc.LUT3DFileData !== undefined) info.lut3DFileData = desc.LUT3DFileData; - if (desc.LUT3DFileName !== undefined) info.lut3DFileName = desc.LUT3DFileName; - - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment as ColorLookupAdjustment; - const desc: ColorLookupDescriptor = {}; - - if (info.lookupType !== undefined) desc.lookupType = colorLookupType.encode(info.lookupType); - if (info.name !== undefined) desc['Nm '] = info.name; - if (info.dither !== undefined) desc.Dthr = info.dither; - if (info.profile !== undefined) desc.profile = info.profile; - if (info.lutFormat !== undefined) desc.LUTFormat = LUTFormatType.encode(info.lutFormat); - if (info.dataOrder !== undefined) desc.dataOrder = colorLookupOrder.encode(info.dataOrder); - if (info.tableOrder !== undefined) desc.tableOrder = colorLookupOrder.encode(info.tableOrder); - if (info.lut3DFileData !== undefined) desc.LUT3DFileData = info.lut3DFileData; - if (info.lut3DFileName !== undefined) desc.LUT3DFileName = info.lut3DFileName; - - writeUint16(writer, 1); // version - writeVersionAndDescriptor(writer, '', 'null', desc); - }, -); - -addHandler( - 'nvrt', - adjustmentType('invert'), - (reader, target, left) => { - target.adjustment = { type: 'invert' }; - skipBytes(reader, left()); - }, - () => { - // nothing to write here - }, -); - -addHandler( - 'post', - adjustmentType('posterize'), - (reader, target, left) => { - target.adjustment = { - type: 'posterize', - levels: readUint16(reader), - }; - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment as PosterizeAdjustment; - writeUint16(writer, info.levels ?? 4); - writeZeros(writer, 2); - }, -); - -addHandler( - 'thrs', - adjustmentType('threshold'), - (reader, target, left) => { - target.adjustment = { - type: 'threshold', - level: readUint16(reader), - }; - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment as ThresholdAdjustment; - writeUint16(writer, info.level ?? 128); - writeZeros(writer, 2); - }, -); - -const grdmColorModels = ['', '', '', 'rgb', 'hsb', '', 'lab']; - -addHandler( - 'grdm', - adjustmentType('gradient map'), - (reader, target, left) => { - if (readUint16(reader) !== 1) throw new Error('Invalid grdm version'); - - const info: GradientMapAdjustment = { - type: 'gradient map', - gradientType: 'solid', - }; - - info.reverse = !!readUint8(reader); - info.dither = !!readUint8(reader); - info.name = readUnicodeString(reader); - info.colorStops = []; - info.opacityStops = []; - - const stopsCount = readUint16(reader); - - for (let i = 0; i < stopsCount; i++) { - info.colorStops.push({ - location: readUint32(reader), - midpoint: readUint32(reader) / 100, - color: readColor(reader), - }); - skipBytes(reader, 2); - } - - const opacityStopsCount = readUint16(reader); - - for (let i = 0; i < opacityStopsCount; i++) { - info.opacityStops.push({ - location: readUint32(reader), - midpoint: readUint32(reader) / 100, - opacity: readUint16(reader) / 0xff, - }); - } - - const expansionCount = readUint16(reader); - if (expansionCount !== 2) throw new Error('Invalid grdm expansion count'); - - const interpolation = readUint16(reader); - info.smoothness = interpolation / 4096; - - const length = readUint16(reader); - if (length !== 32) throw new Error('Invalid grdm length'); - - info.gradientType = readUint16(reader) ? 'noise' : 'solid'; - info.randomSeed = readUint32(reader); - info.addTransparency = !!readUint16(reader); - info.restrictColors = !!readUint16(reader); - info.roughness = readUint32(reader) / 4096; - info.colorModel = (grdmColorModels[readUint16(reader)] || 'rgb') as 'rgb' | 'hsb' | 'lab'; - - info.min = [ - readUint16(reader) / 0x8000, - readUint16(reader) / 0x8000, - readUint16(reader) / 0x8000, - readUint16(reader) / 0x8000, - ]; - - info.max = [ - readUint16(reader) / 0x8000, - readUint16(reader) / 0x8000, - readUint16(reader) / 0x8000, - readUint16(reader) / 0x8000, - ]; - - skipBytes(reader, left()); - - for (const s of info.colorStops) s.location /= interpolation; - for (const s of info.opacityStops) s.location /= interpolation; - - target.adjustment = info; - }, - (writer, target) => { - const info = target.adjustment as GradientMapAdjustment; - - writeUint16(writer, 1); // version - writeUint8(writer, info.reverse ? 1 : 0); - writeUint8(writer, info.dither ? 1 : 0); - writeUnicodeStringWithPadding(writer, info.name || ''); - writeUint16(writer, info.colorStops && info.colorStops.length || 0); - - const interpolation = Math.round((info.smoothness ?? 1) * 4096); - - for (const s of info.colorStops || []) { - writeUint32(writer, Math.round(s.location * interpolation)); - writeUint32(writer, Math.round(s.midpoint * 100)); - writeColor(writer, s.color); - writeZeros(writer, 2); - } - - writeUint16(writer, info.opacityStops && info.opacityStops.length || 0); - - for (const s of info.opacityStops || []) { - writeUint32(writer, Math.round(s.location * interpolation)); - writeUint32(writer, Math.round(s.midpoint * 100)); - writeUint16(writer, Math.round(s.opacity * 0xff)); - } - - writeUint16(writer, 2); // expansion count - writeUint16(writer, interpolation); - writeUint16(writer, 32); // length - writeUint16(writer, info.gradientType === 'noise' ? 1 : 0); - writeUint32(writer, info.randomSeed || 0); - writeUint16(writer, info.addTransparency ? 1 : 0); - writeUint16(writer, info.restrictColors ? 1 : 0); - writeUint32(writer, Math.round((info.roughness ?? 1) * 4096)); - const colorModel = grdmColorModels.indexOf(info.colorModel ?? 'rgb'); - writeUint16(writer, colorModel === -1 ? 3 : colorModel); - - for (let i = 0; i < 4; i++) - writeUint16(writer, Math.round((info.min && info.min[i] || 0) * 0x8000)); - - for (let i = 0; i < 4; i++) - writeUint16(writer, Math.round((info.max && info.max[i] || 0) * 0x8000)); - - writeZeros(writer, 4); - }, -); - -function readSelectiveColors(reader: PsdReader): CMYK { - return { - c: readInt16(reader), - m: readInt16(reader), - y: readInt16(reader), - k: readInt16(reader), - }; -} - -function writeSelectiveColors(writer: PsdWriter, cmyk: CMYK | undefined) { - const c = cmyk || {} as Partial; - writeInt16(writer, c.c!); - writeInt16(writer, c.m!); - writeInt16(writer, c.y!); - writeInt16(writer, c.k!); -} - -addHandler( - 'selc', - adjustmentType('selective color'), - (reader, target) => { - if (readUint16(reader) !== 1) throw new Error('Invalid selc version'); - - const mode = readUint16(reader) ? 'absolute' : 'relative'; - skipBytes(reader, 8); - - target.adjustment = { - type: 'selective color', - mode, - reds: readSelectiveColors(reader), - yellows: readSelectiveColors(reader), - greens: readSelectiveColors(reader), - cyans: readSelectiveColors(reader), - blues: readSelectiveColors(reader), - magentas: readSelectiveColors(reader), - whites: readSelectiveColors(reader), - neutrals: readSelectiveColors(reader), - blacks: readSelectiveColors(reader), - }; - }, - (writer, target) => { - const info = target.adjustment as SelectiveColorAdjustment; - - writeUint16(writer, 1); // version - writeUint16(writer, info.mode === 'absolute' ? 1 : 0); - writeZeros(writer, 8); - writeSelectiveColors(writer, info.reds); - writeSelectiveColors(writer, info.yellows); - writeSelectiveColors(writer, info.greens); - writeSelectiveColors(writer, info.cyans); - writeSelectiveColors(writer, info.blues); - writeSelectiveColors(writer, info.magentas); - writeSelectiveColors(writer, info.whites); - writeSelectiveColors(writer, info.neutrals); - writeSelectiveColors(writer, info.blacks); - }, -); - -interface BrightnessContrastDescriptor { - Vrsn: number; - Brgh: number; - Cntr: number; - means: number; - 'Lab ': boolean; - useLegacy: boolean; - Auto: boolean; -} - -interface PresetDescriptor { - Vrsn: number; - presetKind: number; - presetFileName: string; -} - -interface CurvesPresetDescriptor { - Vrsn: number; - curvesPresetKind: number; - curvesPresetFileName: string; -} - -interface MixerPresetDescriptor { - Vrsn: number; - mixerPresetKind: number; - mixerPresetFileName: string; -} - -addHandler( - 'CgEd', - target => { - const a = target.adjustment; - - if (!a) return false; - - return (a.type === 'brightness/contrast' && !a.useLegacy) || - ((a.type === 'levels' || a.type === 'curves' || a.type === 'exposure' || a.type === 'channel mixer' || - a.type === 'hue/saturation') && a.presetFileName !== undefined); - }, - (reader, target, left) => { - const desc = readVersionAndDescriptor(reader) as - BrightnessContrastDescriptor | PresetDescriptor | CurvesPresetDescriptor | MixerPresetDescriptor; - if (desc.Vrsn !== 1) throw new Error('Invalid CgEd version'); - - // this section can specify preset file name for other adjustment types - if ('presetFileName' in desc) { - target.adjustment = { - ...target.adjustment as LevelsAdjustment | ExposureAdjustment | HueSaturationAdjustment, - presetKind: desc.presetKind, - presetFileName: desc.presetFileName, - }; - } else if ('curvesPresetFileName' in desc) { - target.adjustment = { - ...target.adjustment as CurvesAdjustment, - presetKind: desc.curvesPresetKind, - presetFileName: desc.curvesPresetFileName, - }; - } else if ('mixerPresetFileName' in desc) { - target.adjustment = { - ...target.adjustment as CurvesAdjustment, - presetKind: desc.mixerPresetKind, - presetFileName: desc.mixerPresetFileName, - }; - } else { - target.adjustment = { - type: 'brightness/contrast', - brightness: desc.Brgh, - contrast: desc.Cntr, - meanValue: desc.means, - useLegacy: !!desc.useLegacy, - labColorOnly: !!desc['Lab '], - auto: !!desc.Auto, - }; - } - - skipBytes(reader, left()); - }, - (writer, target) => { - const info = target.adjustment!; - - if (info.type === 'levels' || info.type === 'exposure' || info.type === 'hue/saturation') { - const desc: PresetDescriptor = { - Vrsn: 1, - presetKind: info.presetKind ?? 1, - presetFileName: info.presetFileName || '', - }; - writeVersionAndDescriptor(writer, '', 'null', desc); - } else if (info.type === 'curves') { - const desc: CurvesPresetDescriptor = { - Vrsn: 1, - curvesPresetKind: info.presetKind ?? 1, - curvesPresetFileName: info.presetFileName || '', - }; - writeVersionAndDescriptor(writer, '', 'null', desc); - } else if (info.type === 'channel mixer') { - const desc: MixerPresetDescriptor = { - Vrsn: 1, - mixerPresetKind: info.presetKind ?? 1, - mixerPresetFileName: info.presetFileName || '', - }; - writeVersionAndDescriptor(writer, '', 'null', desc); - } else if (info.type === 'brightness/contrast') { - const desc: BrightnessContrastDescriptor = { - Vrsn: 1, - Brgh: info.brightness || 0, - Cntr: info.contrast || 0, - means: info.meanValue ?? 127, - 'Lab ': !!info.labColorOnly, - useLegacy: !!info.useLegacy, - Auto: !!info.auto, - }; - writeVersionAndDescriptor(writer, '', 'null', desc); - } else { - throw new Error('Unhandled CgEd case'); - } - }, -); - -addHandler( - 'Txt2', - hasKey('engineData'), - (reader, target, left) => { - const data = readBytes(reader, left()); - target.engineData = fromByteArray(data); - // const engineData = parseEngineData(data); - // console.log(require('util').inspect(engineData, false, 99, true)); - // require('fs').writeFileSync('resources/engineData2Simple.txt', require('util').inspect(engineData, false, 99, false), 'utf8'); - // require('fs').writeFileSync('test_data.json', JSON.stringify(ed, null, 2), 'utf8'); - }, - (writer, target) => { - const buffer = toByteArray(target.engineData!); - writeBytes(writer, buffer); - }, -); - -addHandler( - 'FMsk', - hasKey('filterMask'), - (reader, target) => { - target.filterMask = { - colorSpace: readColor(reader), - opacity: readUint16(reader) / 0xff, - }; - }, - (writer, target) => { - writeColor(writer, target.filterMask!.colorSpace); - writeUint16(writer, clamp(target.filterMask!.opacity ?? 1, 0, 1) * 0xff); - }, -); - -interface ArtdDescriptor { - 'Cnt ': number; - autoExpandOffset: { Hrzn: number; Vrtc: number; }; - origin: { Hrzn: number; Vrtc: number; }; - autoExpandEnabled: boolean; - autoNestEnabled: boolean; - autoPositionEnabled: boolean; - shrinkwrapOnSaveEnabled?: boolean; - docDefaultNewArtboardBackgroundColor: DescriptorColor; - docDefaultNewArtboardBackgroundType: number; -} - -addHandler( - 'artd', // document-wide artboard info - target => (target as Psd).artboards !== undefined, - (reader, target, left) => { - const desc = readVersionAndDescriptor(reader) as ArtdDescriptor; - (target as Psd).artboards = { - count: desc['Cnt '], - autoExpandOffset: { horizontal: desc.autoExpandOffset.Hrzn, vertical: desc.autoExpandOffset.Vrtc }, - origin: { horizontal: desc.origin.Hrzn, vertical: desc.origin.Vrtc }, - autoExpandEnabled: desc.autoExpandEnabled, - autoNestEnabled: desc.autoNestEnabled, - autoPositionEnabled: desc.autoPositionEnabled, - shrinkwrapOnSaveEnabled: !!desc.shrinkwrapOnSaveEnabled, - docDefaultNewArtboardBackgroundColor: parseColor(desc.docDefaultNewArtboardBackgroundColor), - docDefaultNewArtboardBackgroundType: desc.docDefaultNewArtboardBackgroundType, - }; - - skipBytes(reader, left()); - }, - (writer, target) => { - const artb = (target as Psd).artboards!; - const desc: ArtdDescriptor = { - 'Cnt ': artb.count, - autoExpandOffset: artb.autoExpandOffset ? { Hrzn: artb.autoExpandOffset.horizontal, Vrtc: artb.autoExpandOffset.vertical } : { Hrzn: 0, Vrtc: 0 }, - origin: artb.origin ? { Hrzn: artb.origin.horizontal, Vrtc: artb.origin.vertical } : { Hrzn: 0, Vrtc: 0 }, - autoExpandEnabled: artb.autoExpandEnabled ?? true, - autoNestEnabled: artb.autoNestEnabled ?? true, - autoPositionEnabled: artb.autoPositionEnabled ?? true, - shrinkwrapOnSaveEnabled: artb.shrinkwrapOnSaveEnabled ?? true, - docDefaultNewArtboardBackgroundColor: serializeColor(artb.docDefaultNewArtboardBackgroundColor), - docDefaultNewArtboardBackgroundType: artb.docDefaultNewArtboardBackgroundType ?? 1, - }; - writeVersionAndDescriptor(writer, '', 'null', desc, 'artd'); - }, -); - -export function hasMultiEffects(effects: LayerEffectsInfo) { - return Object.keys(effects).map(key => (effects as any)[key]).some(v => Array.isArray(v) && v.length > 1); -} - -addHandler( - 'lfx2', - target => target.effects !== undefined && !hasMultiEffects(target.effects), - (reader, target, left, _, options) => { - const version = readUint32(reader); - if (version !== 0) throw new Error(`Invalid lfx2 version`); - - const desc: Lfx2Descriptor = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - - // TODO: don't discard if we got it from lmfx - // discard if read in 'lrFX' section - target.effects = parseEffects(desc, !!options.logMissingFeatures); - - skipBytes(reader, left()); - }, - (writer, target, _, options) => { - const desc = serializeEffects(target.effects!, !!options.logMissingFeatures, false); - // console.log(require('util').inspect(desc, false, 99, true)); - - writeUint32(writer, 0); // version - writeVersionAndDescriptor(writer, '', 'null', desc); - }, -); - -interface CinfDescriptor { - Vrsn: { major: number; minor: number; fix: number; }; - psVersion?: { major: number; minor: number; fix: number; }; - description: string; - reason: string; - Engn: string; // 'Engn.compCore'; - enableCompCore: string; // 'enable.feature'; - enableCompCoreGPU: string; // 'enable.feature'; - enableCompCoreThreads?: string; // 'enable.feature'; - compCoreSupport: string; // 'reason.supported'; - compCoreGPUSupport: string; // 'reason.featureDisabled'; -} - -addHandler( - 'cinf', - hasKey('compositorUsed'), - (reader, target, left) => { - const desc = readVersionAndDescriptor(reader) as CinfDescriptor; - // console.log(require('util').inspect(desc, false, 99, true)); - - target.compositorUsed = { - description: desc.description, - reason: desc.reason, - engine: desc.Engn.split('.')[1], - enableCompCore: desc.enableCompCore.split('.')[1], - enableCompCoreGPU: desc.enableCompCoreGPU.split('.')[1], - compCoreSupport: desc.compCoreSupport.split('.')[1], - compCoreGPUSupport: desc.compCoreGPUSupport.split('.')[1], - }; - - skipBytes(reader, left()); - }, - (writer, target) => { - const cinf = target.compositorUsed!; - const desc: CinfDescriptor = { - Vrsn: { major: 1, minor: 0, fix: 0 }, // TEMP - // psVersion: { major: 22, minor: 3, fix: 1 }, // TESTING - description: cinf.description, - reason: cinf.reason, - Engn: `Engn.${cinf.engine}`, - enableCompCore: `enable.${cinf.enableCompCore}`, - enableCompCoreGPU: `enable.${cinf.enableCompCoreGPU}`, - // enableCompCoreThreads: `enable.feature`, // TESTING - compCoreSupport: `reason.${cinf.compCoreSupport}`, - compCoreGPUSupport: `reason.${cinf.compCoreGPUSupport}`, - }; - writeVersionAndDescriptor(writer, '', 'null', desc); - }, -); - -// extension settings ?, ignore it -addHandler( - 'extn', - target => (target as any)._extn !== undefined, - (reader, target) => { - const desc: ExtensionDesc = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - - if (MOCK_HANDLERS) (target as any)._extn = desc; - }, - (writer, target) => { - // TODO: need to add correct types for desc fields (resources/src.psd) - if (MOCK_HANDLERS) writeVersionAndDescriptor(writer, '', 'null', (target as any)._extn); - }, -); - -addHandler( - 'iOpa', - hasKey('fillOpacity'), - (reader, target) => { - target.fillOpacity = readUint8(reader) / 0xff; - skipBytes(reader, 3); - }, - (writer, target) => { - writeUint8(writer, target.fillOpacity! * 0xff); - writeZeros(writer, 3); - }, -); - -addHandler( - 'brst', - hasKey('channelBlendingRestrictions'), - (reader, target, left) => { - target.channelBlendingRestrictions = []; - - while (left() > 4) { - target.channelBlendingRestrictions.push(readInt32(reader)); - } - }, - (writer, target) => { - for (const channel of target.channelBlendingRestrictions!) { - writeInt32(writer, channel); - } - }, -); - -addHandler( - 'tsly', - hasKey('transparencyShapesLayer'), - (reader, target) => { - target.transparencyShapesLayer = !!readUint8(reader); - skipBytes(reader, 3); - }, - (writer, target) => { - writeUint8(writer, target.transparencyShapesLayer ? 1 : 0); - writeZeros(writer, 3); - }, -); - -/*addHandler( - 'FEid', - hasKey('filterEffects'), - (reader, _target) => { - const version = readInt32(reader); - if (version < 1 || version > 3) throw new Error(`Invalid filterEffects version ${version}`); - - if (readUint32(reader)) throw new Error('filterEffects: 64 bit length is not supported'); - const length = readUint32(reader); - const end = reader.offset + length; - - while (reader.offset < end) { - console.log('bytes to go', end - reader.offset, 'at', reader.offset.toString(16)); - // - const id = readPascalString(reader, 1); - const effectVersion = readInt32(reader); - if (effectVersion !== 1) throw new Error(`Invalid filterEffect version ${effectVersion}`); - if (readUint32(reader)) throw new Error('filterEffect: 64 bit length is not supported'); - const effectLength = readUint32(reader); - const endOfEffect = reader.offset + effectLength; - const top = readInt32(reader); - const left = readInt32(reader); - const bottom = readInt32(reader); - const right = readInt32(reader); - const depth = readInt32(reader); - const maxChannels = readInt32(reader); - const channels: any[] = []; - - for (let i = 0; i < (maxChannels + 2); i++) { - const exists = readInt32(reader); - if (exists) { - if (readUint32(reader)) throw new Error('filterEffect: 64 bit length is not supported'); - const channelLength = readUint32(reader); - const compressionMode = readUint16(reader); - const data = readBytes(reader, channelLength - 2); - channels.push({ channelLength, compressionMode, data: data?.length + ' bytes' }); - // if (c < 3 || c == 25) e_ = _F.Cn(!0, rL, m, b.rect.F, b.rect.V, X, rp); - // if (c == 0) _c.S = e_; - // if (c == 1) _c.v = e_; - // if (c == 2) _c.e = e_; - // if (c == 25) _c.w = e_; - } else { - channels.push(undefined); - } - } - - console.log('left at the end', endOfEffect - reader.offset); - if (endOfEffect > reader.offset) { - if (readUint8(reader)) { - const compressionMode = readUint16(reader); - const data = endOfEffect > reader.offset ? readBytes(reader, endOfEffect - reader.offset) : undefined; - console.log('extra data', { compressionMode, data: data?.length + ' bytes' }); - } else { - console.log('no extra'); - } - } - - console.log('effect', { - id, - effectVersion, - effectLength, - top, - left, - bottom, - right, - depth, - maxChannels, - channels, - }); - - console.log('bytes left after effect', endOfEffect - reader.offset); - // if (length % 4) skipBytes(reader, 4 - length % 4); - } - - console.log({ version, length }); - }, - (_writer, _target) => { - }, -); - -addHandlerAlias('FXid', 'FEid');*/ diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/csh.ts b/npm-packages/mac-v2.4.x/ag-psd/src/csh.ts deleted file mode 100644 index fd53aee..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/csh.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { readVectorMask } from './additionalInfo'; -import { LayerVectorMask } from './psd'; -import { readUint32, checkSignature, createReader, readPascalString, readUnicodeString } from './psdReader'; - -export interface Csh { - shapes: (LayerVectorMask & { - name: string; - id: string; - width: number; - height: number; - })[]; -} - -export function readCsh(buffer: ArrayBufferView): Csh { - const reader = createReader(buffer.buffer, buffer.byteOffset, buffer.byteLength); - const csh: Csh = { shapes: [] }; - - checkSignature(reader, 'cush'); - if (readUint32(reader) !== 2) throw new Error('Invalid version'); - const count = readUint32(reader); - - for (let i = 0; i < count; i++) { - const name = readUnicodeString(reader); - while (reader.offset % 4) reader.offset++; // pad to 4byte bounds - if (readUint32(reader) !== 1) throw new Error('Invalid shape version'); - const size = readUint32(reader); - const end = reader.offset + size; - const id = readPascalString(reader, 1); - // this might not be correct ??? - const y1 = readUint32(reader); - const x1 = readUint32(reader); - const y2 = readUint32(reader); - const x2 = readUint32(reader); - const width = x2 - x1; - const height = y2 - y1; - const mask: LayerVectorMask = { paths: [] }; - readVectorMask(reader, mask, width, height, end - reader.offset); - csh.shapes.push({ name, id, width, height, ...mask }); - - reader.offset = end; - } - - return csh; -} diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/descriptor.ts b/npm-packages/mac-v2.4.x/ag-psd/src/descriptor.ts deleted file mode 100644 index c1ae4a5..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/descriptor.ts +++ /dev/null @@ -1,1843 +0,0 @@ -import { createEnum } from './helpers'; -import { - AntiAlias, BevelDirection, BevelStyle, BevelTechnique, BlendMode, Color, EffectContour, - EffectNoiseGradient, EffectPattern, EffectSolidGradient, ExtraGradientInfo, ExtraPatternInfo, - GlowSource, GlowTechnique, GradientStyle, InterpolationMethod, LayerEffectBevel, - LayerEffectGradientOverlay, LayerEffectInnerGlow, LayerEffectPatternOverlay, - LayerEffectSatin, LayerEffectShadow, LayerEffectsInfo, LayerEffectSolidFill, - LayerEffectsOuterGlow, LayerEffectStroke, LineAlignment, LineCapType, LineJoinType, - Orientation, TextGridding, TimelineKey, TimelineKeyInterpolation, TimelineTrack, TimelineTrackType, - Units, UnitsValue, VectorContent, WarpStyle -} from './psd'; -import { - PsdReader, readSignature, readUnicodeString, readUint32, readUint8, readFloat64, - readBytes, readAsciiString, readInt32, readFloat32, readInt32LE, readUnicodeStringWithLength -} from './psdReader'; -import { - PsdWriter, writeSignature, writeBytes, writeUint32, writeFloat64, writeUint8, - writeUnicodeStringWithPadding, writeInt32, writeFloat32, writeUnicodeString -} from './psdWriter'; - -interface Dict { [key: string]: string; } -interface NameClassID { name: string; classID: string; } -interface ExtTypeDict { [key: string]: NameClassID; } - -function revMap(map: Dict) { - const result: Dict = {}; - Object.keys(map).forEach(key => result[map[key]] = key); - return result; -} - -const unitsMap: Dict = { - '#Ang': 'Angle', - '#Rsl': 'Density', - '#Rlt': 'Distance', - '#Nne': 'None', - '#Prc': 'Percent', - '#Pxl': 'Pixels', - '#Mlm': 'Millimeters', - '#Pnt': 'Points', - 'RrPi': 'Picas', - 'RrIn': 'Inches', - 'RrCm': 'Centimeters', -}; - -const unitsMapRev = revMap(unitsMap); -let logErrors = false; - -export function setLogErrors(value: boolean) { - logErrors = value; -} - -function makeType(name: string, classID: string) { - return { name, classID }; -} - -const nullType = makeType('', 'null'); - -const fieldToExtType: ExtTypeDict = { - strokeStyleContent: makeType('', 'solidColorLayer'), - // printProofSetup: makeType('校样设置', 'proofSetup'), // TESTING - printProofSetup: makeType('Proof Setup', 'proofSetup'), - patternFill: makeType('', 'patternFill'), - Grad: makeType('Gradient', 'Grdn'), - ebbl: makeType('', 'ebbl'), - SoFi: makeType('', 'SoFi'), - GrFl: makeType('', 'GrFl'), - sdwC: makeType('', 'RGBC'), - hglC: makeType('', 'RGBC'), - 'Clr ': makeType('', 'RGBC'), - 'tintColor': makeType('', 'RGBC'), - Ofst: makeType('', 'Pnt '), - ChFX: makeType('', 'ChFX'), - MpgS: makeType('', 'ShpC'), - DrSh: makeType('', 'DrSh'), - IrSh: makeType('', 'IrSh'), - OrGl: makeType('', 'OrGl'), - IrGl: makeType('', 'IrGl'), - TrnS: makeType('', 'ShpC'), - Ptrn: makeType('', 'Ptrn'), - FrFX: makeType('', 'FrFX'), - phase: makeType('', 'Pnt '), - frameStep: nullType, - duration: nullType, - workInTime: nullType, - workOutTime: nullType, - audioClipGroupList: nullType, - bounds: makeType('', 'Rctn'), - customEnvelopeWarp: makeType('', 'customEnvelopeWarp'), - warp: makeType('', 'warp'), - 'Sz ': makeType('', 'Pnt '), - origin: makeType('', 'Pnt '), - autoExpandOffset: makeType('', 'Pnt '), - keyOriginShapeBBox: makeType('', 'unitRect'), - Vrsn: nullType, - psVersion: nullType, - docDefaultNewArtboardBackgroundColor: makeType('', 'RGBC'), - artboardRect: makeType('', 'classFloatRect'), - keyOriginRRectRadii: makeType('', 'radii'), - keyOriginBoxCorners: nullType, - rectangleCornerA: makeType('', 'Pnt '), - rectangleCornerB: makeType('', 'Pnt '), - rectangleCornerC: makeType('', 'Pnt '), - rectangleCornerD: makeType('', 'Pnt '), - compInfo: nullType, - Trnf: makeType('Transform', 'Trnf'), - quiltWarp: makeType('', 'quiltWarp'), - generatorSettings: nullType, - crema: nullType, - FrIn: nullType, - blendOptions: nullType, - FXRf: nullType, - Lefx: nullType, - time: nullType, - animKey: nullType, - timeScope: nullType, - inTime: nullType, - outTime: nullType, - sheetStyle: nullType, - translation: nullType, - Skew: nullType, - 'Lnk ': makeType('', 'ExternalFileLink'), - frameReader: makeType('', 'FrameReader'), - effectParams: makeType('', 'motionTrackEffectParams'), - Impr: makeType('None', 'none'), - Anch: makeType('', 'Pnt '), - 'Fwd ': makeType('', 'Pnt '), - 'Bwd ': makeType('', 'Pnt '), - meshBoundaryPath: makeType('', 'pathClass'), - filterFX: makeType('', 'filterFXStyle'), - Fltr: makeType('', 'rigidTransform'), - FrgC: makeType('', 'RGBC'), - BckC: makeType('', 'RGBC'), -}; - -const fieldToArrayExtType: ExtTypeDict = { - 'Crv ': makeType('', 'CrPt'), - Clrs: makeType('', 'Clrt'), - Trns: makeType('', 'TrnS'), - keyDescriptorList: nullType, - solidFillMulti: makeType('', 'SoFi'), - gradientFillMulti: makeType('', 'GrFl'), - dropShadowMulti: makeType('', 'DrSh'), - innerShadowMulti: makeType('', 'IrSh'), - frameFXMulti: makeType('', 'FrFX'), - FrIn: nullType, - FSts: nullType, - LaSt: nullType, - sheetTimelineOptions: nullType, - trackList: makeType('', 'animationTrack'), - globalTrackList: makeType('', 'animationTrack'), - keyList: nullType, - audioClipGroupList: nullType, - audioClipList: nullType, - countObjectList: makeType('', 'countObject'), - countGroupList: makeType('', 'countGroup'), - slices: makeType('', 'slice'), - 'Pts ': makeType('', 'Pthp'), - SbpL: makeType('', 'SbpL'), - pathComponents: makeType('', 'PaCm'), - filterFXList: makeType('', 'filterFX'), - puppetShapeList: makeType('', 'puppetShape'), -}; - -const typeToField: { [key: string]: string[]; } = { - 'TEXT': [ - 'Txt ', 'printerName', 'Nm ', 'Idnt', 'blackAndWhitePresetFileName', 'LUT3DFileName', - 'presetFileName', 'curvesPresetFileName', 'mixerPresetFileName', 'placed', 'description', 'reason', - 'artboardPresetName', 'json', 'clipID', 'relPath', 'fullPath', 'mediaDescriptor', 'Msge', - 'altTag', 'url', 'cellText', - ], - 'tdta': ['EngineData', 'LUT3DFileData', 'indexArray', 'originalVertexArray', 'deformedVertexArray'], - 'long': [ - 'TextIndex', 'RndS', 'Mdpn', 'Smth', 'Lctn', 'strokeStyleVersion', 'LaID', 'Vrsn', 'Cnt ', - 'Brgh', 'Cntr', 'means', 'vibrance', 'Strt', 'bwPresetKind', 'presetKind', 'comp', 'compID', 'originalCompID', - 'curvesPresetKind', 'mixerPresetKind', 'uOrder', 'vOrder', 'PgNm', 'totalPages', 'Crop', - 'numerator', 'denominator', 'frameCount', 'Annt', 'keyOriginType', 'unitValueQuadVersion', - 'keyOriginIndex', 'major', 'minor', 'fix', 'docDefaultNewArtboardBackgroundType', 'artboardBackgroundType', - 'numModifyingFX', 'deformNumRows', 'deformNumCols', 'FrID', 'FrDl', 'FsID', 'LCnt', 'AFrm', 'AFSt', - 'numBefore', 'numAfter', 'Spcn', 'minOpacity', 'maxOpacity', 'BlnM', 'sheetID', 'gblA', 'globalAltitude', - 'descVersion', 'frameReaderType', 'LyrI', 'zoomOrigin', 'fontSize', 'Rds ', 'sliceID', - 'topOutset', 'leftOutset', 'bottomOutset', 'rightOutset', 'filterID', 'meshQuality', - 'meshExpansion', 'meshRigidity', 'VrsM', 'VrsN', - ], - 'enum': [ - 'textGridding', 'Ornt', 'warpStyle', 'warpRotate', 'Inte', 'Bltn', 'ClrS', - 'sdwM', 'hglM', 'bvlT', 'bvlS', 'bvlD', 'Md ', 'glwS', 'GrdF', 'GlwT', - 'strokeStyleLineCapType', 'strokeStyleLineJoinType', 'strokeStyleLineAlignment', - 'strokeStyleBlendMode', 'PntT', 'Styl', 'lookupType', 'LUTFormat', 'dataOrder', - 'tableOrder', 'enableCompCore', 'enableCompCoreGPU', 'compCoreSupport', 'compCoreGPUSupport', 'Engn', - 'enableCompCoreThreads', 'gs99', 'FrDs', 'trackID', 'animInterpStyle', 'horzAlign', - 'vertAlign', 'bgColorType', 'shapeOperation', - ], - 'bool': [ - 'PstS', 'printSixteenBit', 'masterFXSwitch', 'enab', 'uglg', 'antialiasGloss', - 'useShape', 'useTexture', 'uglg', 'antialiasGloss', 'useShape', 'Vsbl', - 'useTexture', 'Algn', 'Rvrs', 'Dthr', 'Invr', 'VctC', 'ShTr', 'layerConceals', - 'strokeEnabled', 'fillEnabled', 'strokeStyleScaleLock', 'strokeStyleStrokeAdjust', - 'hardProof', 'MpBl', 'paperWhite', 'useLegacy', 'Auto', 'Lab ', 'useTint', 'keyShapeInvalidated', - 'autoExpandEnabled', 'autoNestEnabled', 'autoPositionEnabled', 'shrinkwrapOnSaveEnabled', - 'present', 'showInDialog', 'overprint', 'sheetDisclosed', 'lightsDisclosed', 'meshesDisclosed', - 'materialsDisclosed', 'hasMotion', 'muted', 'Effc', 'selected', 'autoScope', 'fillCanvas', - 'cellTextIsHTML', 'Smoo', 'Clsp', 'validAtPosition', 'rigidType', 'hasoptions', 'filterMaskEnable', - 'filterMaskLinked', 'filterMaskExtendWithWhite', - ], - 'doub': [ - 'warpValue', 'warpPerspective', 'warpPerspectiveOther', 'Intr', 'Wdth', 'Hght', - 'strokeStyleMiterLimit', 'strokeStyleResolution', 'layerTime', 'keyOriginResolution', - 'xx', 'xy', 'yx', 'yy', 'tx', 'ty', 'FrGA', 'frameRate', 'audioLevel', 'rotation', - 'X ', 'Y ', 'redFloat', 'greenFloat', 'blueFloat', 'imageResolution', - 'PuX0', 'PuX1', 'PuX2', 'PuX3', 'PuY0', 'PuY1', 'PuY2', 'PuY3' - ], - 'UntF': [ - 'Scl ', 'sdwO', 'hglO', 'lagl', 'Lald', 'srgR', 'blur', 'Sftn', 'Opct', 'Dstn', 'Angl', - 'Ckmt', 'Nose', 'Inpr', 'ShdN', 'strokeStyleLineWidth', 'strokeStyleLineDashOffset', - 'strokeStyleOpacity', 'H ', 'Top ', 'Left', 'Btom', 'Rght', 'Rslt', - 'topRight', 'topLeft', 'bottomLeft', 'bottomRight', - ], - 'VlLs': [ - 'Crv ', 'Clrs', 'Mnm ', 'Mxm ', 'Trns', 'pathList', 'strokeStyleLineDashSet', 'FrLs', 'slices', - 'LaSt', 'Trnf', 'nonAffineTransform', 'keyDescriptorList', 'guideIndeces', 'gradientFillMulti', - 'solidFillMulti', 'frameFXMulti', 'innerShadowMulti', 'dropShadowMulti', 'FrIn', 'FSts', 'FsFr', - 'sheetTimelineOptions', 'audioClipList', 'trackList', 'globalTrackList', 'keyList', 'audioClipList', - 'warpValues', 'selectedPin', 'Pts ', 'SbpL', 'pathComponents', 'pinOffsets', 'posFinalPins', - 'pinVertexIndices', 'PinP', 'PnRt', 'PnOv', 'PnDp', 'filterFXList', 'puppetShapeList', - ], - 'ObAr': ['meshPoints', 'quiltSliceX', 'quiltSliceY'], - 'obj ': ['null'], -}; - -const channels = [ - 'Rd ', 'Grn ', 'Bl ', 'Yllw', 'Ylw ', 'Cyn ', 'Mgnt', 'Blck', 'Gry ', 'Lmnc', 'A ', 'B ', -]; - -const fieldToArrayType: Dict = { - 'Mnm ': 'long', - 'Mxm ': 'long', - FrLs: 'long', - strokeStyleLineDashSet: 'UntF', - Trnf: 'doub', - nonAffineTransform: 'doub', - keyDescriptorList: 'Objc', - gradientFillMulti: 'Objc', - solidFillMulti: 'Objc', - frameFXMulti: 'Objc', - innerShadowMulti: 'Objc', - dropShadowMulti: 'Objc', - LaSt: 'Objc', - FrIn: 'Objc', - FSts: 'Objc', - FsFr: 'long', - blendOptions: 'Objc', - sheetTimelineOptions: 'Objc', - keyList: 'Objc', - warpValues: 'doub', - selectedPin: 'long', - 'Pts ': 'Objc', - SbpL: 'Objc', - pathComponents: 'Objc', - pinOffsets: 'doub', - posFinalPins: 'doub', - pinVertexIndices: 'long', - PinP: 'doub', - PnRt: 'long', - PnOv: 'bool', - PnDp: 'doub', - filterFXList: 'Objc', - puppetShapeList: 'Objc', -}; - -const fieldToType: Dict = {}; - -for (const type of Object.keys(typeToField)) { - for (const field of typeToField[type]) { - fieldToType[field] = type; - } -} - -for (const field of Object.keys(fieldToExtType)) { - if (!fieldToType[field]) fieldToType[field] = 'Objc'; -} - -for (const field of Object.keys(fieldToArrayExtType)) { - fieldToArrayType[field] = 'Objc'; -} - -function getTypeByKey(key: string, value: any, root: string, parent: any) { - if (key === 'null' && root === 'slices') { - return 'TEXT'; - } else if (key === 'groupID') { - return root === 'slices' ? 'long' : 'TEXT'; - } else if (key === 'Sz ') { - return ('Wdth' in value) ? 'Objc' : (('units' in value) ? 'UntF' : 'doub'); - } else if (key === 'Type') { - return typeof value === 'string' ? 'enum' : 'long'; - } else if (key === 'AntA') { - return typeof value === 'string' ? 'enum' : 'bool'; - } else if ((key === 'Hrzn' || key === 'Vrtc') && parent.Type === 'keyType.Pstn') { - return 'long'; - } else if (key === 'Hrzn' || key === 'Vrtc' || key === 'Top ' || key === 'Left' || key === 'Btom' || key === 'Rght') { - if (root === 'slices') return 'long'; - return typeof value === 'number' ? 'doub' : 'UntF'; - } else if (key === 'Vrsn') { - return typeof value === 'number' ? 'long' : 'Objc'; - } else if (key === 'Rd ' || key === 'Grn ' || key === 'Bl ') { - return root === 'artd' ? 'long' : 'doub'; - } else if (key === 'Trnf') { - return Array.isArray(value) ? 'VlLs' : 'Objc'; - } else { - return fieldToType[key]; - } -} - -export function readAsciiStringOrClassId(reader: PsdReader) { - const length = readInt32(reader); - return readAsciiString(reader, length || 4); -} - -function writeAsciiStringOrClassId(writer: PsdWriter, value: string) { - if (value.length === 4 && value !== 'warp' && value !== 'time' && value !== 'hold') { - // write classId - writeInt32(writer, 0); - writeSignature(writer, value); - } else { - // write ascii string - writeInt32(writer, value.length); - - for (let i = 0; i < value.length; i++) { - writeUint8(writer, value.charCodeAt(i)); - } - } -} - -export function readDescriptorStructure(reader: PsdReader) { - const object: any = {}; - // object.__struct = - readClassStructure(reader); - const itemsCount = readUint32(reader); - // console.log('//', object.__struct); - for (let i = 0; i < itemsCount; i++) { - const key = readAsciiStringOrClassId(reader); - const type = readSignature(reader); - // console.log(`> '${key}' '${type}'`); - const data = readOSType(reader, type); - // if (!getTypeByKey(key, data)) console.log(`> '${key}' '${type}'`, data); - object[key] = data; - } - - return object; -} - -export function writeDescriptorStructure(writer: PsdWriter, name: string, classId: string, value: any, root: string) { - if (logErrors && !classId) console.log('Missing classId for: ', name, classId, value); - - // write class structure - writeUnicodeStringWithPadding(writer, name); - writeAsciiStringOrClassId(writer, classId); - - const keys = Object.keys(value); - writeUint32(writer, keys.length); - - for (const key of keys) { - let type = getTypeByKey(key, value[key], root, value); - let extType = fieldToExtType[key]; - - if (key === 'origin') { - type = root === 'slices' ? 'enum' : 'Objc'; - } else if (key === 'bounds' && root === 'slices') { - type = 'Objc'; - extType = makeType('', 'Rct1'); - } else if (key === 'Scl ' && 'Hrzn' in value[key]) { - type = 'Objc'; - extType = nullType; - } else if (key === 'audioClipGroupList' && keys.length === 1) { - type = 'VlLs'; - } else if ((key === 'Strt' || key === 'Brgh') && 'H ' in value) { - type = 'doub'; - } else if (key === 'Strt') { - type = 'Objc'; - extType = nullType; - } else if (channels.indexOf(key) !== -1) { - type = (classId === 'RGBC' && root !== 'artd') ? 'doub' : 'long'; - } else if (key === 'profile') { - type = classId === 'printOutput' ? 'TEXT' : 'tdta'; - } else if (key === 'strokeStyleContent') { - if (value[key]['Clr ']) { - extType = makeType('', 'solidColorLayer'); - } else if (value[key].Grad) { - extType = makeType('', 'gradientLayer'); - } else if (value[key].Ptrn) { - extType = makeType('', 'patternLayer'); - } else { - logErrors && console.log('Invalid strokeStyleContent value', value[key]); - } - } else if (key === 'bounds' && root === 'quiltWarp') { - extType = makeType('', 'classFloatRect'); - } - - if (extType && extType.classID === 'RGBC') { - if ('H ' in value[key]) extType = { classID: 'HSBC', name: '' }; - // TODO: other color spaces - } - - writeAsciiStringOrClassId(writer, key); - writeSignature(writer, type || 'long'); - writeOSType(writer, type || 'long', value[key], key, extType, root); - if (logErrors && !type) console.log(`Missing descriptor field type for: '${key}' in`, value); - } -} - -function readOSType(reader: PsdReader, type: string) { - switch (type) { - case 'obj ': // Reference - return readReferenceStructure(reader); - case 'Objc': // Descriptor - case 'GlbO': // GlobalObject same as Descriptor - return readDescriptorStructure(reader); - case 'VlLs': { // List - const length = readInt32(reader); - const items: any[] = []; - - for (let i = 0; i < length; i++) { - const type = readSignature(reader); - // console.log(' >', type); - items.push(readOSType(reader, type)); - } - - return items; - } - case 'doub': // Double - return readFloat64(reader); - case 'UntF': { // Unit double - const units = readSignature(reader); - const value = readFloat64(reader); - if (!unitsMap[units]) throw new Error(`Invalid units: ${units}`); - return { units: unitsMap[units], value }; - } - case 'UnFl': { // Unit float - const units = readSignature(reader); - const value = readFloat32(reader); - if (!unitsMap[units]) throw new Error(`Invalid units: ${units}`); - return { units: unitsMap[units], value }; - } - case 'TEXT': // String - return readUnicodeString(reader); - case 'enum': { // Enumerated - const type = readAsciiStringOrClassId(reader); - const value = readAsciiStringOrClassId(reader); - return `${type}.${value}`; - } - case 'long': // Integer - return readInt32(reader); - case 'comp': { // Large Integer - const low = readUint32(reader); - const high = readUint32(reader); - return { low, high }; - } - case 'bool': // Boolean - return !!readUint8(reader); - case 'type': // Class - case 'GlbC': // Class - return readClassStructure(reader); - case 'alis': { // Alias - const length = readInt32(reader); - return readAsciiString(reader, length); - } - case 'tdta': { // Raw Data - const length = readInt32(reader); - return readBytes(reader, length); - } - case 'ObAr': { // Object array - readInt32(reader); // version: 16 - readUnicodeString(reader); // name: '' - readAsciiStringOrClassId(reader); // 'rationalPoint' - const length = readInt32(reader); - const items: any[] = []; - - for (let i = 0; i < length; i++) { - const type1 = readAsciiStringOrClassId(reader); // type Hrzn | Vrtc - readSignature(reader); // UnFl - - readSignature(reader); // units ? '#Pxl' - const valuesCount = readInt32(reader); - const values: number[] = []; - for (let j = 0; j < valuesCount; j++) { - values.push(readFloat64(reader)); - } - - items.push({ type: type1, values }); - } - - return items; - } - case 'Pth ': { // File path - /*const length =*/ readInt32(reader); - const sig = readSignature(reader); - /*const pathSize =*/ readInt32LE(reader); - const charsCount = readInt32LE(reader); - const path = readUnicodeStringWithLength(reader, charsCount); - return { sig, path }; - } - default: - throw new Error(`Invalid TySh descriptor OSType: ${type} at ${reader.offset.toString(16)}`); - } -} - -const ObArTypes: { [key: string]: string | undefined; } = { - meshPoints: 'rationalPoint', - quiltSliceX: 'UntF', - quiltSliceY: 'UntF', -}; - -function writeOSType(writer: PsdWriter, type: string, value: any, key: string, extType: NameClassID | undefined, root: string) { - switch (type) { - case 'obj ': // Reference - writeReferenceStructure(writer, key, value); - break; - case 'Objc': // Descriptor - case 'GlbO': // GlobalObject same as Descriptor - if (!extType) throw new Error(`Missing ext type for: '${key}' (${JSON.stringify(value)})`); - writeDescriptorStructure(writer, extType.name, extType.classID, value, root); - break; - case 'VlLs': // List - writeInt32(writer, value.length); - - for (let i = 0; i < value.length; i++) { - const type = fieldToArrayType[key]; - writeSignature(writer, type || 'long'); - writeOSType(writer, type || 'long', value[i], `${key}[]`, fieldToArrayExtType[key], root); - if (logErrors && !type) console.log(`Missing descriptor array type for: '${key}' in`, value); - } - break; - case 'doub': // Double - writeFloat64(writer, value); - break; - case 'UntF': // Unit double - if (!unitsMapRev[value.units]) throw new Error(`Invalid units: ${value.units} in ${key}`); - writeSignature(writer, unitsMapRev[value.units]); - writeFloat64(writer, value.value); - break; - case 'UnFl': // Unit float - if (!unitsMapRev[value.units]) throw new Error(`Invalid units: ${value.units} in ${key}`); - writeSignature(writer, unitsMapRev[value.units]); - writeFloat32(writer, value.value); - break; - case 'TEXT': // String - writeUnicodeStringWithPadding(writer, value); - break; - case 'enum': { // Enumerated - const [_type, val] = value.split('.'); - writeAsciiStringOrClassId(writer, _type); - writeAsciiStringOrClassId(writer, val); - break; - } - case 'long': // Integer - writeInt32(writer, value); - break; - // case 'comp': // Large Integer - // writeLargeInteger(reader); - case 'bool': // Boolean - writeUint8(writer, value ? 1 : 0); - break; - // case 'type': // Class - // case 'GlbC': // Class - // writeClassStructure(reader); - // case 'alis': // Alias - // writeAliasStructure(reader); - case 'tdta': // Raw Data - writeInt32(writer, value.byteLength); - writeBytes(writer, value); - break; - case 'ObAr': { // Object array - writeInt32(writer, 16); // version - writeUnicodeStringWithPadding(writer, ''); // name - const type = ObArTypes[key]; - if (!type) throw new Error(`Not implemented ObArType for: ${key}`); - writeAsciiStringOrClassId(writer, type); - writeInt32(writer, value.length); - - for (let i = 0; i < value.length; i++) { - writeAsciiStringOrClassId(writer, value[i].type); // Hrzn | Vrtc - writeSignature(writer, 'UnFl'); - writeSignature(writer, '#Pxl'); - writeInt32(writer, value[i].values.length); - - for (let j = 0; j < value[i].values.length; j++) { - writeFloat64(writer, value[i].values[j]); - } - } - break; - } - // case 'Pth ': // File path - // writeFilePath(reader); - default: - throw new Error(`Not implemented descriptor OSType: ${type}`); - } -} - -function readReferenceStructure(reader: PsdReader) { - const itemsCount = readInt32(reader); - const items: any[] = []; - - for (let i = 0; i < itemsCount; i++) { - const type = readSignature(reader); - - switch (type) { - case 'prop': { // Property - readClassStructure(reader); - const keyID = readAsciiStringOrClassId(reader); - items.push(keyID); - break; - } - case 'Clss': // Class - items.push(readClassStructure(reader)); - break; - case 'Enmr': { // Enumerated Reference - readClassStructure(reader); - const typeID = readAsciiStringOrClassId(reader); - const value = readAsciiStringOrClassId(reader); - items.push(`${typeID}.${value}`); - break; - } - case 'rele': { // Offset - // const { name, classID } = - readClassStructure(reader); - items.push(readUint32(reader)); - break; - } - case 'Idnt': // Identifier - items.push(readInt32(reader)); - break; - case 'indx': // Index - items.push(readInt32(reader)); - break; - case 'name': { // Name - readClassStructure(reader); - items.push(readUnicodeString(reader)); - break; - } - default: - throw new Error(`Invalid descriptor reference type: ${type}`); - } - } - - return items; -} - -function writeReferenceStructure(writer: PsdWriter, _key: string, items: any[]) { - writeInt32(writer, items.length); - - for (let i = 0; i < items.length; i++) { - const value = items[i]; - let type = 'unknown'; - - if (typeof value === 'string') { - if (/^[a-z]+\.[a-z]+$/i.test(value)) { - type = 'Enmr'; - } else { - type = 'name'; - } - } - - writeSignature(writer, type); - - switch (type) { - // case 'prop': // Property - // case 'Clss': // Class - case 'Enmr': { // Enumerated Reference - const [typeID, enumValue] = value.split('.'); - writeClassStructure(writer, '\0', typeID); - writeAsciiStringOrClassId(writer, typeID); - writeAsciiStringOrClassId(writer, enumValue); - break; - } - // case 'rele': // Offset - // case 'Idnt': // Identifier - // case 'indx': // Index - case 'name': { // Name - writeClassStructure(writer, '\0', 'Lyr '); - writeUnicodeString(writer, value + '\0'); - break; - } - default: - throw new Error(`Invalid descriptor reference type: ${type}`); - } - } - - return items; -} - -function readClassStructure(reader: PsdReader) { - const name = readUnicodeString(reader); - const classID = readAsciiStringOrClassId(reader); - // console.log({ name, classID }); - return { name, classID }; -} - -function writeClassStructure(writer: PsdWriter, name: string, classID: string) { - writeUnicodeString(writer, name); - writeAsciiStringOrClassId(writer, classID); -} - -export function readVersionAndDescriptor(reader: PsdReader) { - const version = readUint32(reader); - if (version !== 16) throw new Error(`Invalid descriptor version: ${version}`); - const desc = readDescriptorStructure(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - return desc; -} - -export function writeVersionAndDescriptor(writer: PsdWriter, name: string, classID: string, descriptor: any, root = '') { - writeUint32(writer, 16); // version - writeDescriptorStructure(writer, name, classID, descriptor, root); -} - -export type DescriptorUnits = 'Angle' | 'Density' | 'Distance' | 'None' | 'Percent' | 'Pixels' | - 'Millimeters' | 'Points' | 'Picas' | 'Inches' | 'Centimeters'; - -export interface DescriptorUnitsValue { - units: DescriptorUnits; - value: number; -} - -export type DescriptorColor = { - 'Rd ': number; - 'Grn ': number; - 'Bl ': number; -} | { - 'H ': DescriptorUnitsValue; - Strt: number; - Brgh: number; -} | { - 'Cyn ': number; - Mgnt: number; - 'Ylw ': number; - Blck: number; -} | { - 'Gry ': number; -} | { - Lmnc: number; - 'A ': number; - 'B ': number; -} | { - redFloat: number; - greenFloat: number; - blueFloat: number; -}; - -export interface DesciptorPattern { - 'Nm ': string; - Idnt: string; -} - -export type DesciptorGradient = { - 'Nm ': string; - GrdF: 'GrdF.CstS'; - Intr: number; - Clrs: { - 'Clr ': DescriptorColor; - Type: 'Clry.UsrS'; - Lctn: number; - Mdpn: number; - }[]; - Trns: { - Opct: DescriptorUnitsValue; - Lctn: number; - Mdpn: number; - }[]; -} | { - GrdF: 'GrdF.ClNs'; - Smth: number; - 'Nm ': string; - ClrS: string; - RndS: number; - VctC?: boolean; - ShTr?: boolean; - 'Mnm ': number[]; - 'Mxm ': number[]; -}; - -export interface DescriptorColorContent { - 'Clr ': DescriptorColor; -} - -export interface DescriptorGradientContent { - Grad: DesciptorGradient; - Type: string; - Dthr?: boolean; - Rvrs?: boolean; - Angl?: DescriptorUnitsValue; - 'Scl '?: DescriptorUnitsValue; - Algn?: boolean; - Ofst?: { Hrzn: DescriptorUnitsValue; Vrtc: DescriptorUnitsValue; }; -} - -export interface DescriptorPatternContent { - Ptrn: DesciptorPattern; - Lnkd?: boolean; - phase?: { Hrzn: number; Vrtc: number; }; -} - -export type DescriptorVectorContent = DescriptorColorContent | DescriptorGradientContent | DescriptorPatternContent; - -export interface StrokeDescriptor { - strokeStyleVersion: number; - strokeEnabled: boolean; - fillEnabled: boolean; - strokeStyleLineWidth: DescriptorUnitsValue; - strokeStyleLineDashOffset: DescriptorUnitsValue; - strokeStyleMiterLimit: number; - strokeStyleLineCapType: string; - strokeStyleLineJoinType: string; - strokeStyleLineAlignment: string; - strokeStyleScaleLock: boolean; - strokeStyleStrokeAdjust: boolean; - strokeStyleLineDashSet: DescriptorUnitsValue[]; - strokeStyleBlendMode: string; - strokeStyleOpacity: DescriptorUnitsValue; - strokeStyleContent: DescriptorVectorContent; - strokeStyleResolution: number; -} - -export interface TextDescriptor { - 'Txt ': string; - textGridding: string; - Ornt: string; - AntA: string; - TextIndex: number; - EngineData?: Uint8Array; -} - -export interface WarpDescriptor { - warpStyle: string; - warpValue?: number; - warpValues?: number[] - warpPerspective: number; - warpPerspectiveOther: number; - warpRotate: string; - bounds?: { - 'Top ': DescriptorUnitsValue; - Left: DescriptorUnitsValue; - Btom: DescriptorUnitsValue; - Rght: DescriptorUnitsValue; - }; - uOrder: number; - vOrder: number; - customEnvelopeWarp?: { - meshPoints: { - type: 'Hrzn' | 'Vrtc'; - values: number[]; - }[]; - }; -} - -export interface QuiltWarpDescriptor extends WarpDescriptor { - deformNumRows: number; - deformNumCols: number; - customEnvelopeWarp: { - quiltSliceX: { - type: 'quiltSliceX'; - values: number[]; - }[]; - quiltSliceY: { - type: 'quiltSliceY'; - values: number[]; - }[]; - meshPoints: { - type: 'Hrzn' | 'Vrtc'; - values: number[]; - }[]; - }; -} - -export interface FractionDescriptor { - numerator: number; - denominator: number; -} - -export interface HrznVrtcDescriptor { - Hrzn: number; - Vrtc: number; -} - -export interface FrameDescriptor { - FrLs: number[]; - enab?: boolean; - IMsk?: { Ofst: HrznVrtcDescriptor }; - VMsk?: { Ofst: HrznVrtcDescriptor }; - Ofst?: HrznVrtcDescriptor; - FXRf?: HrznVrtcDescriptor; - Lefx?: Lfx2Descriptor; - blendOptions?: { Opct: DescriptorUnitsValue; }; -} - -export interface FrameListDescriptor { - LaID: number; // layer ID - LaSt: FrameDescriptor[]; -} - -export function horzVrtcToXY(hv: HrznVrtcDescriptor): { x: number; y: number; } { - return { x: hv.Hrzn, y: hv.Vrtc }; -} - -export function xyToHorzVrtc(xy: { x: number; y: number; }): HrznVrtcDescriptor { - return { Hrzn: xy.x, Vrtc: xy.y }; -} - -export type TimelineAnimKeyDescriptor = { - Type: 'keyType.Opct'; - Opct: DescriptorUnitsValue; -} | { - Type: 'keyType.Trnf'; - 'Scl ': HrznVrtcDescriptor; - Skew: HrznVrtcDescriptor; - rotation: number; - translation: HrznVrtcDescriptor; -} | { - Type: 'keyType.Pstn'; - Hrzn: number; - Vrtc: number; -} | { - Type: 'keyType.sheetStyle'; - sheetStyle: { - Vrsn: number; - Lefx?: Lfx2Descriptor; - blendOptions: {}; - }; -} | { - Type: 'keyType.globalLighting'; - gblA: number; - globalAltitude: number; -}; - -export interface TimelineKeyDescriptor { - Vrsn: 1; - animInterpStyle: 'animInterpStyle.Lnr ' | 'animInterpStyle.hold'; - time: FractionDescriptor; - animKey: TimelineAnimKeyDescriptor; - selected: boolean; -} - -export interface TimelineTrackDescriptor { - trackID: 'stdTrackID.globalLightingTrack' | 'stdTrackID.opacityTrack' | 'stdTrackID.styleTrack' | 'stdTrackID.sheetTransformTrack' | 'stdTrackID.sheetPositionTrack'; - Vrsn: 1; - enab: boolean; - Effc: boolean; - effectParams?: { - keyList: TimelineKeyDescriptor[]; - fillCanvas: boolean; - zoomOrigin: number; - }; - keyList: TimelineKeyDescriptor[]; -} - -export interface TimeScopeDescriptor { - Vrsn: 1; - Strt: FractionDescriptor; - duration: FractionDescriptor; - inTime: FractionDescriptor; - outTime: FractionDescriptor; -} - -export interface TimelineDescriptor { - Vrsn: 1; - timeScope: TimeScopeDescriptor; - autoScope: boolean; - audioLevel: number; - LyrI: number; - trackList?: TimelineTrackDescriptor[]; -} - -export interface EffectDescriptor extends Partial, Partial { - enab?: boolean; - Styl: string; - PntT?: string; - 'Md '?: string; - Opct?: DescriptorUnitsValue; - 'Sz '?: DescriptorUnitsValue; - 'Clr '?: DescriptorColor; - present?: boolean; - showInDialog?: boolean; - overprint?: boolean; -} - -export interface Lfx2Descriptor { - 'Scl '?: DescriptorUnitsValue; - masterFXSwitch?: boolean; - DrSh?: EffectDescriptor; - IrSh?: EffectDescriptor; - OrGl?: EffectDescriptor; - IrGl?: EffectDescriptor; - ebbl?: EffectDescriptor; - SoFi?: EffectDescriptor; - patternFill?: EffectDescriptor; - GrFl?: EffectDescriptor; - ChFX?: EffectDescriptor; - FrFX?: EffectDescriptor; -} - -export interface LmfxDescriptor { - 'Scl '?: DescriptorUnitsValue; - masterFXSwitch?: boolean; - numModifyingFX?: number; - OrGl?: EffectDescriptor; - IrGl?: EffectDescriptor; - ebbl?: EffectDescriptor; - ChFX?: EffectDescriptor; - dropShadowMulti?: EffectDescriptor[]; - innerShadowMulti?: EffectDescriptor[]; - solidFillMulti?: EffectDescriptor[]; - gradientFillMulti?: EffectDescriptor[]; - frameFXMulti?: EffectDescriptor[]; - patternFill?: EffectDescriptor; // ??? -} - -function parseFxObject(fx: EffectDescriptor) { - const stroke: LayerEffectStroke = { - enabled: !!fx.enab, - position: FStl.decode(fx.Styl), - fillType: FrFl.decode(fx.PntT!), - blendMode: BlnM.decode(fx['Md ']!), - opacity: parsePercent(fx.Opct), - size: parseUnits(fx['Sz ']!), - }; - - if (fx.present !== undefined) stroke.present = fx.present; - if (fx.showInDialog !== undefined) stroke.showInDialog = fx.showInDialog; - if (fx.overprint !== undefined) stroke.overprint = fx.overprint; - if (fx['Clr ']) stroke.color = parseColor(fx['Clr ']); - if (fx.Grad) stroke.gradient = parseGradientContent(fx as any); - if (fx.Ptrn) stroke.pattern = parsePatternContent(fx as any); - - return stroke; -} - -function serializeFxObject(stroke: LayerEffectStroke) { - let FrFX: EffectDescriptor = {} as any; - FrFX.enab = !!stroke.enabled; - if (stroke.present !== undefined) FrFX.present = !!stroke.present; - if (stroke.showInDialog !== undefined) FrFX.showInDialog = !!stroke.showInDialog; - FrFX.Styl = FStl.encode(stroke.position); - FrFX.PntT = FrFl.encode(stroke.fillType); - FrFX['Md '] = BlnM.encode(stroke.blendMode); - FrFX.Opct = unitsPercent(stroke.opacity); - FrFX['Sz '] = unitsValue(stroke.size, 'size'); - if (stroke.color) FrFX['Clr '] = serializeColor(stroke.color); - if (stroke.gradient) FrFX = { ...FrFX, ...serializeGradientContent(stroke.gradient) }; - if (stroke.pattern) FrFX = { ...FrFX, ...serializePatternContent(stroke.pattern) }; - if (stroke.overprint !== undefined) FrFX.overprint = !!stroke.overprint; - return FrFX; -} - -export function serializeEffects(e: LayerEffectsInfo, log: boolean, multi: boolean) { - const info: Lfx2Descriptor & LmfxDescriptor = multi ? { - 'Scl ': unitsPercent(e.scale ?? 1), - masterFXSwitch: !e.disabled, - } : { - masterFXSwitch: !e.disabled, - 'Scl ': unitsPercent(e.scale ?? 1), - }; - - const arrayKeys: (keyof LayerEffectsInfo)[] = ['dropShadow', 'innerShadow', 'solidFill', 'gradientOverlay', 'stroke']; - for (const key of arrayKeys) { - if (e[key] && !Array.isArray(e[key])) throw new Error(`${key} should be an array`); - } - - if (e.dropShadow?.[0] && !multi) info.DrSh = serializeEffectObject(e.dropShadow[0], 'dropShadow', log); - if (e.dropShadow?.[0] && multi) info.dropShadowMulti = e.dropShadow.map(i => serializeEffectObject(i, 'dropShadow', log)); - if (e.innerShadow?.[0] && !multi) info.IrSh = serializeEffectObject(e.innerShadow[0], 'innerShadow', log); - if (e.innerShadow?.[0] && multi) info.innerShadowMulti = e.innerShadow.map(i => serializeEffectObject(i, 'innerShadow', log)); - if (e.outerGlow) info.OrGl = serializeEffectObject(e.outerGlow, 'outerGlow', log); - if (e.solidFill?.[0] && multi) info.solidFillMulti = e.solidFill.map(i => serializeEffectObject(i, 'solidFill', log)); - if (e.gradientOverlay?.[0] && multi) info.gradientFillMulti = e.gradientOverlay.map(i => serializeEffectObject(i, 'gradientOverlay', log)); - if (e.stroke?.[0] && multi) info.frameFXMulti = e.stroke.map(i => serializeFxObject(i)); - if (e.innerGlow) info.IrGl = serializeEffectObject(e.innerGlow, 'innerGlow', log); - if (e.bevel) info.ebbl = serializeEffectObject(e.bevel, 'bevel', log); - if (e.solidFill?.[0] && !multi) info.SoFi = serializeEffectObject(e.solidFill[0], 'solidFill', log); - if (e.patternOverlay) info.patternFill = serializeEffectObject(e.patternOverlay, 'patternOverlay', log); - if (e.gradientOverlay?.[0] && !multi) info.GrFl = serializeEffectObject(e.gradientOverlay[0], 'gradientOverlay', log); - if (e.satin) info.ChFX = serializeEffectObject(e.satin, 'satin', log); - if (e.stroke?.[0] && !multi) info.FrFX = serializeFxObject(e.stroke?.[0]); - - if (multi) { - info.numModifyingFX = 0; - - for (const key of Object.keys(e)) { - const value = (e as any)[key]; - if (Array.isArray(value)) { - for (const effect of value) { - if (effect.enabled) info.numModifyingFX++; - } - } - } - } - - return info; -} - -export function parseEffects(info: Lfx2Descriptor & LmfxDescriptor, log: boolean) { - const effects: LayerEffectsInfo = {}; - if (!info.masterFXSwitch) effects.disabled = true; - if (info['Scl ']) effects.scale = parsePercent(info['Scl ']); - if (info.DrSh) effects.dropShadow = [parseEffectObject(info.DrSh, log)]; - if (info.dropShadowMulti) effects.dropShadow = info.dropShadowMulti.map(i => parseEffectObject(i, log)); - if (info.IrSh) effects.innerShadow = [parseEffectObject(info.IrSh, log)]; - if (info.innerShadowMulti) effects.innerShadow = info.innerShadowMulti.map(i => parseEffectObject(i, log)); - if (info.OrGl) effects.outerGlow = parseEffectObject(info.OrGl, log); - if (info.IrGl) effects.innerGlow = parseEffectObject(info.IrGl, log); - if (info.ebbl) effects.bevel = parseEffectObject(info.ebbl, log); - if (info.SoFi) effects.solidFill = [parseEffectObject(info.SoFi, log)]; - if (info.solidFillMulti) effects.solidFill = info.solidFillMulti.map(i => parseEffectObject(i, log)); - if (info.patternFill) effects.patternOverlay = parseEffectObject(info.patternFill, log); - if (info.GrFl) effects.gradientOverlay = [parseEffectObject(info.GrFl, log)]; - if (info.gradientFillMulti) effects.gradientOverlay = info.gradientFillMulti.map(i => parseEffectObject(i, log)); - if (info.ChFX) effects.satin = parseEffectObject(info.ChFX, log); - if (info.FrFX) effects.stroke = [parseFxObject(info.FrFX)]; - if (info.frameFXMulti) effects.stroke = info.frameFXMulti.map(i => parseFxObject(i)); - return effects; -} - -function parseKeyList(keyList: TimelineKeyDescriptor[], logMissingFeatures: boolean) { - const keys: TimelineKey[] = []; - - for (let j = 0; j < keyList.length; j++) { - const key = keyList[j]; - const { time, selected, animKey } = key; - const interpolation = animInterpStyleEnum.decode(key.animInterpStyle); - - switch (animKey.Type) { - case 'keyType.Opct': - keys.push({ interpolation, time, selected, type: 'opacity', value: parsePercent(animKey.Opct) }); - break; - case 'keyType.Pstn': - keys.push({ interpolation, time, selected, type: 'position', x: animKey.Hrzn, y: animKey.Vrtc }); - break; - case 'keyType.Trnf': - keys.push({ - interpolation, time, selected, type: 'transform', - scale: horzVrtcToXY(animKey['Scl ']), skew: horzVrtcToXY(animKey.Skew), rotation: animKey.rotation, translation: horzVrtcToXY(animKey.translation) - }); - break; - case 'keyType.sheetStyle': { - const key: TimelineKey = { interpolation, time, selected, type: 'style' }; - if (animKey.sheetStyle.Lefx) key.style = parseEffects(animKey.sheetStyle.Lefx, logMissingFeatures); - keys.push(key); - break; - } - case 'keyType.globalLighting': { - keys.push({ - interpolation, time, selected, type: 'globalLighting', - globalAngle: animKey.gblA, globalAltitude: animKey.globalAltitude - }); - break; - } - default: throw new Error(`Unsupported keyType value`); - } - } - - return keys; -} - -function serializeKeyList(keys: TimelineKey[]): TimelineKeyDescriptor[] { - const keyList: TimelineKeyDescriptor[] = []; - - for (let j = 0; j < keys.length; j++) { - const key = keys[j]; - const { time, selected = false, interpolation } = key; - const animInterpStyle = animInterpStyleEnum.encode(interpolation) as 'animInterpStyle.Lnr ' | 'animInterpStyle.hold'; - let animKey: TimelineAnimKeyDescriptor; - - switch (key.type) { - case 'opacity': - animKey = { Type: 'keyType.Opct', Opct: unitsPercent(key.value) }; - break; - case 'position': - animKey = { Type: 'keyType.Pstn', Hrzn: key.x, Vrtc: key.y }; - break; - case 'transform': - animKey = { Type: 'keyType.Trnf', 'Scl ': xyToHorzVrtc(key.scale), Skew: xyToHorzVrtc(key.skew), rotation: key.rotation, translation: xyToHorzVrtc(key.translation) }; - break; - case 'style': - animKey = { Type: 'keyType.sheetStyle', sheetStyle: { Vrsn: 1, blendOptions: {} } }; - if (key.style) animKey.sheetStyle = { Vrsn: 1, Lefx: serializeEffects(key.style, false, false), blendOptions: {} }; - break; - case 'globalLighting': { - animKey = { Type: 'keyType.globalLighting', gblA: key.globalAngle, globalAltitude: key.globalAltitude }; - break; - } - default: throw new Error(`Unsupported keyType value`); - } - - keyList.push({ Vrsn: 1, animInterpStyle, time, animKey, selected }); - } - - return keyList; -} - -export function parseTrackList(trackList: TimelineTrackDescriptor[], logMissingFeatures: boolean) { - const tracks: TimelineTrack[] = []; - - for (let i = 0; i < trackList.length; i++) { - const tr = trackList[i]; - const track: TimelineTrack = { - type: stdTrackID.decode(tr.trackID), - enabled: tr.enab, - keys: parseKeyList(tr.keyList, logMissingFeatures), - }; - - if (tr.effectParams) { - track.effectParams = { - fillCanvas: tr.effectParams.fillCanvas, - zoomOrigin: tr.effectParams.zoomOrigin, - keys: parseKeyList(tr.effectParams.keyList, logMissingFeatures), - }; - } - - tracks.push(track); - } - - return tracks; -} - -export function serializeTrackList(tracks: TimelineTrack[]): TimelineTrackDescriptor[] { - const trackList: TimelineTrackDescriptor[] = []; - - for (let i = 0; i < tracks.length; i++) { - const t = tracks[i]; - trackList.push({ - trackID: stdTrackID.encode(t.type) as any, - Vrsn: 1, - enab: !!t.enabled, - Effc: !!t.effectParams, - ...(t.effectParams ? { - effectParams: { - keyList: serializeKeyList(t.keys), - fillCanvas: t.effectParams.fillCanvas, - zoomOrigin: t.effectParams.zoomOrigin, - } - } : {}), - keyList: serializeKeyList(t.keys), - }); - } - - return trackList; -} - -type AllEffects = LayerEffectShadow & LayerEffectsOuterGlow & LayerEffectStroke & - LayerEffectInnerGlow & LayerEffectBevel & LayerEffectSolidFill & - LayerEffectPatternOverlay & LayerEffectSatin & LayerEffectGradientOverlay; - -function parseEffectObject(obj: any, reportErrors: boolean) { - const result: AllEffects = {} as any; - - for (const key of Object.keys(obj)) { - const val = obj[key]; - - switch (key) { - case 'enab': result.enabled = !!val; break; - case 'uglg': result.useGlobalLight = !!val; break; - case 'AntA': result.antialiased = !!val; break; - case 'Algn': result.align = !!val; break; - case 'Dthr': result.dither = !!val; break; - case 'Invr': result.invert = !!val; break; - case 'Rvrs': result.reverse = !!val; break; - case 'Clr ': result.color = parseColor(val); break; - case 'hglC': result.highlightColor = parseColor(val); break; - case 'sdwC': result.shadowColor = parseColor(val); break; - case 'Styl': result.position = FStl.decode(val); break; - case 'Md ': result.blendMode = BlnM.decode(val); break; - case 'hglM': result.highlightBlendMode = BlnM.decode(val); break; - case 'sdwM': result.shadowBlendMode = BlnM.decode(val); break; - case 'bvlS': result.style = BESl.decode(val); break; - case 'bvlD': result.direction = BESs.decode(val); break; - case 'bvlT': result.technique = bvlT.decode(val) as any; break; - case 'GlwT': result.technique = BETE.decode(val) as any; break; - case 'glwS': result.source = IGSr.decode(val); break; - case 'Type': result.type = GrdT.decode(val); break; - case 'gs99': result.interpolationMethod = gradientInterpolationMethodType.decode(val); break; - case 'Opct': result.opacity = parsePercent(val); break; - case 'hglO': result.highlightOpacity = parsePercent(val); break; - case 'sdwO': result.shadowOpacity = parsePercent(val); break; - case 'lagl': result.angle = parseAngle(val); break; - case 'Angl': result.angle = parseAngle(val); break; - case 'Lald': result.altitude = parseAngle(val); break; - case 'Sftn': result.soften = parseUnits(val); break; - case 'srgR': result.strength = parsePercent(val); break; - case 'blur': result.size = parseUnits(val); break; - case 'Nose': result.noise = parsePercent(val); break; - case 'Inpr': result.range = parsePercent(val); break; - case 'Ckmt': result.choke = parseUnits(val); break; - case 'ShdN': result.jitter = parsePercent(val); break; - case 'Dstn': result.distance = parseUnits(val); break; - case 'Scl ': result.scale = parsePercent(val); break; - case 'Ptrn': result.pattern = { name: val['Nm '], id: val.Idnt }; break; - case 'phase': result.phase = { x: val.Hrzn, y: val.Vrtc }; break; - case 'Ofst': result.offset = { x: parsePercent(val.Hrzn), y: parsePercent(val.Vrtc) }; break; - case 'MpgS': - case 'TrnS': - result.contour = { - name: val['Nm '], - curve: (val['Crv '] as any[]).map(p => ({ x: p.Hrzn, y: p.Vrtc })), - }; - break; - case 'Grad': result.gradient = parseGradient(val); break; - case 'useTexture': - case 'useShape': - case 'layerConceals': - case 'present': - case 'showInDialog': - case 'antialiasGloss': result[key] = val; break; - default: - reportErrors && console.log(`Invalid effect key: '${key}', value:`, val); - } - } - - return result; -} - -function serializeEffectObject(obj: any, objName: string, reportErrors: boolean) { - const result: any = {}; - - for (const objKey of Object.keys(obj)) { - const key: keyof AllEffects = objKey as any; - const val = obj[key]; - - switch (key) { - case 'enabled': result.enab = !!val; break; - case 'useGlobalLight': result.uglg = !!val; break; - case 'antialiased': result.AntA = !!val; break; - case 'align': result.Algn = !!val; break; - case 'dither': result.Dthr = !!val; break; - case 'invert': result.Invr = !!val; break; - case 'reverse': result.Rvrs = !!val; break; - case 'color': result['Clr '] = serializeColor(val); break; - case 'highlightColor': result.hglC = serializeColor(val); break; - case 'shadowColor': result.sdwC = serializeColor(val); break; - case 'position': result.Styl = FStl.encode(val); break; - case 'blendMode': result['Md '] = BlnM.encode(val); break; - case 'highlightBlendMode': result.hglM = BlnM.encode(val); break; - case 'shadowBlendMode': result.sdwM = BlnM.encode(val); break; - case 'style': result.bvlS = BESl.encode(val); break; - case 'direction': result.bvlD = BESs.encode(val); break; - case 'technique': - if (objName === 'bevel') { - result.bvlT = bvlT.encode(val); - } else { - result.GlwT = BETE.encode(val); - } - break; - case 'source': result.glwS = IGSr.encode(val); break; - case 'type': result.Type = GrdT.encode(val); break; - case 'interpolationMethod': result.gs99 = gradientInterpolationMethodType.encode(val); break; - case 'opacity': result.Opct = unitsPercent(val); break; - case 'highlightOpacity': result.hglO = unitsPercent(val); break; - case 'shadowOpacity': result.sdwO = unitsPercent(val); break; - case 'angle': - if (objName === 'gradientOverlay') { - result.Angl = unitsAngle(val); - } else { - result.lagl = unitsAngle(val); - } - break; - case 'altitude': result.Lald = unitsAngle(val); break; - case 'soften': result.Sftn = unitsValue(val, key); break; - case 'strength': result.srgR = unitsPercent(val); break; - case 'size': result.blur = unitsValue(val, key); break; - case 'noise': result.Nose = unitsPercent(val); break; - case 'range': result.Inpr = unitsPercent(val); break; - case 'choke': result.Ckmt = unitsValue(val, key); break; - case 'jitter': result.ShdN = unitsPercent(val); break; - case 'distance': result.Dstn = unitsValue(val, key); break; - case 'scale': result['Scl '] = unitsPercent(val); break; - case 'pattern': result.Ptrn = { 'Nm ': val.name, Idnt: val.id }; break; - case 'phase': result.phase = { Hrzn: val.x, Vrtc: val.y }; break; - case 'offset': result.Ofst = { Hrzn: unitsPercent(val.x), Vrtc: unitsPercent(val.y) }; break; - case 'contour': { - result[objName === 'satin' ? 'MpgS' : 'TrnS'] = { - 'Nm ': (val as EffectContour).name, - 'Crv ': (val as EffectContour).curve.map(p => ({ Hrzn: p.x, Vrtc: p.y })), - }; - break; - } - case 'gradient': result.Grad = serializeGradient(val); break; - case 'useTexture': - case 'useShape': - case 'layerConceals': - case 'present': - case 'showInDialog': - case 'antialiasGloss': - result[key] = val; - break; - default: - reportErrors && console.log(`Invalid effect key: '${key}', value:`, val); - } - } - - return result; -} - -function parseGradient(grad: DesciptorGradient): EffectSolidGradient | EffectNoiseGradient { - if (grad.GrdF === 'GrdF.CstS') { - const samples: number = grad.Intr || 4096; - - return { - type: 'solid', - name: grad['Nm '], - smoothness: grad.Intr / 4096, - colorStops: grad.Clrs.map(s => ({ - color: parseColor(s['Clr ']), - location: s.Lctn / samples, - midpoint: s.Mdpn / 100, - })), - opacityStops: grad.Trns.map(s => ({ - opacity: parsePercent(s.Opct), - location: s.Lctn / samples, - midpoint: s.Mdpn / 100, - })), - }; - } else { - return { - type: 'noise', - name: grad['Nm '], - roughness: grad.Smth / 4096, - colorModel: ClrS.decode(grad.ClrS), - randomSeed: grad.RndS, - restrictColors: !!grad.VctC, - addTransparency: !!grad.ShTr, - min: grad['Mnm '].map(x => x / 100), - max: grad['Mxm '].map(x => x / 100), - }; - } -} - -function serializeGradient(grad: EffectSolidGradient | EffectNoiseGradient): DesciptorGradient { - if (grad.type === 'solid') { - const samples = Math.round((grad.smoothness ?? 1) * 4096); - return { - 'Nm ': grad.name || '', - GrdF: 'GrdF.CstS', - Intr: samples, - Clrs: grad.colorStops.map(s => ({ - 'Clr ': serializeColor(s.color), - Type: 'Clry.UsrS', - Lctn: Math.round(s.location * samples), - Mdpn: Math.round((s.midpoint ?? 0.5) * 100), - })), - Trns: grad.opacityStops.map(s => ({ - Opct: unitsPercent(s.opacity), - Lctn: Math.round(s.location * samples), - Mdpn: Math.round((s.midpoint ?? 0.5) * 100), - })), - }; - } else { - return { - GrdF: 'GrdF.ClNs', - 'Nm ': grad.name || '', - ShTr: !!grad.addTransparency, - VctC: !!grad.restrictColors, - ClrS: ClrS.encode(grad.colorModel), - RndS: grad.randomSeed || 0, - Smth: Math.round((grad.roughness ?? 1) * 4096), - 'Mnm ': (grad.min || [0, 0, 0, 0]).map(x => x * 100), - 'Mxm ': (grad.max || [1, 1, 1, 1]).map(x => x * 100), - }; - } -} - -function parseGradientContent(descriptor: DescriptorGradientContent) { - const result = parseGradient(descriptor.Grad) as (EffectSolidGradient | EffectNoiseGradient) & ExtraGradientInfo; - result.style = GrdT.decode(descriptor.Type); - if (descriptor.Dthr !== undefined) result.dither = descriptor.Dthr; - if (descriptor.Rvrs !== undefined) result.reverse = descriptor.Rvrs; - if (descriptor.Angl !== undefined) result.angle = parseAngle(descriptor.Angl); - if (descriptor['Scl '] !== undefined) result.scale = parsePercent(descriptor['Scl ']); - if (descriptor.Algn !== undefined) result.align = descriptor.Algn; - if (descriptor.Ofst !== undefined) { - result.offset = { - x: parsePercent(descriptor.Ofst.Hrzn), - y: parsePercent(descriptor.Ofst.Vrtc) - }; - } - return result; -} - -function parsePatternContent(descriptor: DescriptorPatternContent) { - const result: EffectPattern & ExtraPatternInfo = { - name: descriptor.Ptrn['Nm '], - id: descriptor.Ptrn.Idnt, - }; - if (descriptor.Lnkd !== undefined) result.linked = descriptor.Lnkd; - if (descriptor.phase !== undefined) result.phase = { x: descriptor.phase.Hrzn, y: descriptor.phase.Vrtc }; - return result; -} - - -export function parseVectorContent(descriptor: DescriptorVectorContent): VectorContent { - if ('Grad' in descriptor) { - return parseGradientContent(descriptor); - } else if ('Ptrn' in descriptor) { - return { type: 'pattern', ...parsePatternContent(descriptor) }; - } else if ('Clr ' in descriptor) { - return { type: 'color', color: parseColor(descriptor['Clr ']) }; - } else { - throw new Error('Invalid vector content'); - } -} - -function serializeGradientContent(content: (EffectSolidGradient | EffectNoiseGradient) & ExtraGradientInfo) { - const result: DescriptorGradientContent = {} as any; - if (content.dither !== undefined) result.Dthr = content.dither; - if (content.reverse !== undefined) result.Rvrs = content.reverse; - if (content.angle !== undefined) result.Angl = unitsAngle(content.angle); - result.Type = GrdT.encode(content.style); - if (content.align !== undefined) result.Algn = content.align; - if (content.scale !== undefined) result['Scl '] = unitsPercent(content.scale); - if (content.offset) { - result.Ofst = { - Hrzn: unitsPercent(content.offset.x), - Vrtc: unitsPercent(content.offset.y), - }; - } - result.Grad = serializeGradient(content); - return result; -} - -function serializePatternContent(content: EffectPattern & ExtraPatternInfo) { - const result: DescriptorPatternContent = { - Ptrn: { - 'Nm ': content.name || '', - Idnt: content.id || '', - } - }; - if (content.linked !== undefined) result.Lnkd = !!content.linked; - if (content.phase !== undefined) result.phase = { Hrzn: content.phase.x, Vrtc: content.phase.y }; - return result; -} - -export function serializeVectorContent(content: VectorContent): { descriptor: DescriptorVectorContent; key: string; } { - if (content.type === 'color') { - return { key: 'SoCo', descriptor: { 'Clr ': serializeColor(content.color) } }; - } else if (content.type === 'pattern') { - return { key: 'PtFl', descriptor: serializePatternContent(content) }; - } else { - return { key: 'GdFl', descriptor: serializeGradientContent(content) }; - } -} - -export function parseColor(color: DescriptorColor): Color { - if ('H ' in color) { - return { h: parsePercentOrAngle(color['H ']), s: color.Strt, b: color.Brgh }; - } else if ('Rd ' in color) { - return { r: color['Rd '], g: color['Grn '], b: color['Bl '] }; - } else if ('Cyn ' in color) { - return { c: color['Cyn '], m: color.Mgnt, y: color['Ylw '], k: color.Blck }; - } else if ('Gry ' in color) { - return { k: color['Gry '] }; - } else if ('Lmnc' in color) { - return { l: color.Lmnc, a: color['A '], b: color['B '] }; - } else if ('redFloat' in color) { - return { fr: color.redFloat, fg: color.greenFloat, fb: color.blueFloat }; - } else { - throw new Error('Unsupported color descriptor'); - } -} - -export function serializeColor(color: Color | undefined): DescriptorColor { - if (!color) { - return { 'Rd ': 0, 'Grn ': 0, 'Bl ': 0 }; - } else if ('r' in color) { - return { 'Rd ': color.r || 0, 'Grn ': color.g || 0, 'Bl ': color.b || 0 }; - } else if ('fr' in color) { - return { redFloat: color.fr, greenFloat: color.fg, blueFloat: color.fb }; - } else if ('h' in color) { - return { 'H ': unitsAngle(color.h * 360), Strt: color.s || 0, Brgh: color.b || 0 }; - } else if ('c' in color) { - return { 'Cyn ': color.c || 0, Mgnt: color.m || 0, 'Ylw ': color.y || 0, Blck: color.k || 0 }; - } else if ('l' in color) { - return { Lmnc: color.l || 0, 'A ': color.a || 0, 'B ': color.b || 0 }; - } else if ('k' in color) { - return { 'Gry ': color.k }; - } else { - throw new Error('Invalid color value'); - } -} - -export function parseAngle(x: DescriptorUnitsValue) { - if (x === undefined) return 0; - if (x.units !== 'Angle') throw new Error(`Invalid units: ${x.units}`); - return x.value; -} - -export function parsePercent(x: DescriptorUnitsValue | undefined) { - if (x === undefined) return 1; - if (x.units !== 'Percent') throw new Error(`Invalid units: ${x.units}`); - return x.value / 100; -} - -export function parsePercentOrAngle(x: DescriptorUnitsValue | undefined) { - if (x === undefined) return 1; - if (x.units === 'Percent') return x.value / 100; - if (x.units === 'Angle') return x.value / 360; - throw new Error(`Invalid units: ${x.units}`); -} - -export function parseUnits({ units, value }: DescriptorUnitsValue): UnitsValue { - if ( - units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && - units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density' - ) { - throw new Error(`Invalid units: ${JSON.stringify({ units, value })}`); - } - return { value, units }; -} - -export function parseUnitsOrNumber(value: DescriptorUnitsValue | number, units: Units = 'Pixels'): UnitsValue { - if (typeof value === 'number') return { value, units }; - return parseUnits(value); -} - -export function parseUnitsToNumber({ units, value }: DescriptorUnitsValue, expectedUnits: string): number { - if (units !== expectedUnits) throw new Error(`Invalid units: ${JSON.stringify({ units, value })}`); - return value; -} - -export function unitsAngle(value: number | undefined): DescriptorUnitsValue { - return { units: 'Angle', value: value || 0 }; -} - -export function unitsPercent(value: number | undefined): DescriptorUnitsValue { - return { units: 'Percent', value: Math.round((value || 0) * 100) }; -} - -export function unitsValue(x: UnitsValue | undefined, key: string): DescriptorUnitsValue { - if (x == null) return { units: 'Pixels', value: 0 }; - - if (typeof x !== 'object') - throw new Error(`Invalid value: ${JSON.stringify(x)} (key: ${key}) (should have value and units)`); - - const { units, value } = x; - - if (typeof value !== 'number') - throw new Error(`Invalid value in ${JSON.stringify(x)} (key: ${key})`); - - if ( - units !== 'Pixels' && units !== 'Millimeters' && units !== 'Points' && units !== 'None' && - units !== 'Picas' && units !== 'Inches' && units !== 'Centimeters' && units !== 'Density' - ) { - throw new Error(`Invalid units in ${JSON.stringify(x)} (key: ${key})`); - } - - return { units, value }; -} - -export const textGridding = createEnum('textGridding', 'none', { - none: 'None', - round: 'Rnd ', -}); - -export const Ornt = createEnum('Ornt', 'horizontal', { - horizontal: 'Hrzn', - vertical: 'Vrtc', -}); - -export const Annt = createEnum('Annt', 'sharp', { - none: 'Anno', - sharp: 'antiAliasSharp', - crisp: 'AnCr', - strong: 'AnSt', - smooth: 'AnSm', - platform: 'antiAliasPlatformGray', - platformLCD: 'antiAliasPlatformLCD', -}); - -export const warpStyle = createEnum('warpStyle', 'none', { - none: 'warpNone', - arc: 'warpArc', - arcLower: 'warpArcLower', - arcUpper: 'warpArcUpper', - arch: 'warpArch', - bulge: 'warpBulge', - shellLower: 'warpShellLower', - shellUpper: 'warpShellUpper', - flag: 'warpFlag', - wave: 'warpWave', - fish: 'warpFish', - rise: 'warpRise', - fisheye: 'warpFisheye', - inflate: 'warpInflate', - squeeze: 'warpSqueeze', - twist: 'warpTwist', - cylinder: 'warpCylinder', - custom: 'warpCustom', -}); - -export const BlnM = createEnum('BlnM', 'normal', { - 'normal': 'Nrml', - 'dissolve': 'Dslv', - 'darken': 'Drkn', - 'multiply': 'Mltp', - 'color burn': 'CBrn', - 'linear burn': 'linearBurn', - 'darker color': 'darkerColor', - 'lighten': 'Lghn', - 'screen': 'Scrn', - 'color dodge': 'CDdg', - 'linear dodge': 'linearDodge', - 'lighter color': 'lighterColor', - 'overlay': 'Ovrl', - 'soft light': 'SftL', - 'hard light': 'HrdL', - 'vivid light': 'vividLight', - 'linear light': 'linearLight', - 'pin light': 'pinLight', - 'hard mix': 'hardMix', - 'difference': 'Dfrn', - 'exclusion': 'Xclu', - 'subtract': 'blendSubtraction', - 'divide': 'blendDivide', - 'hue': 'H ', - 'saturation': 'Strt', - 'color': 'Clr ', - 'luminosity': 'Lmns', - // used in ABR - 'linear height': 'linearHeight', - 'height': 'Hght', - 'subtraction': 'Sbtr', // 2nd version of subtract ? -}); - -export const BESl = createEnum('BESl', 'inner bevel', { - 'inner bevel': 'InrB', - 'outer bevel': 'OtrB', - 'emboss': 'Embs', - 'pillow emboss': 'PlEb', - 'stroke emboss': 'strokeEmboss', -}); - -export const bvlT = createEnum('bvlT', 'smooth', { - 'smooth': 'SfBL', - 'chisel hard': 'PrBL', - 'chisel soft': 'Slmt', -}); - -export const BESs = createEnum('BESs', 'up', { - up: 'In ', - down: 'Out ', -}); - -export const BETE = createEnum('BETE', 'softer', { - softer: 'SfBL', - precise: 'PrBL', -}); - -export const IGSr = createEnum('IGSr', 'edge', { - edge: 'SrcE', - center: 'SrcC', -}); - -export const GrdT = createEnum('GrdT', 'linear', { - linear: 'Lnr ', - radial: 'Rdl ', - angle: 'Angl', - reflected: 'Rflc', - diamond: 'Dmnd', -}); - -export const animInterpStyleEnum = createEnum('animInterpStyle', 'linear', { - linear: 'Lnr ', - hold: 'hold', -}); - -export const stdTrackID = createEnum('stdTrackID', 'opacity', { - opacity: 'opacityTrack', - style: 'styleTrack', - sheetTransform: 'sheetTransformTrack', - sheetPosition: 'sheetPositionTrack', - globalLighting: 'globalLightingTrack', -}); - -export const gradientInterpolationMethodType = createEnum('gradientInterpolationMethodType', 'perceptual', { - perceptual: 'Perc', - linear: 'Lnr', - classic: 'Gcls', -}); - -export const ClrS = createEnum<'rgb' | 'hsb' | 'lab'>('ClrS', 'rgb', { - rgb: 'RGBC', - hsb: 'HSBl', - lab: 'LbCl', -}); - -export const FStl = createEnum<'inside' | 'center' | 'outside'>('FStl', 'outside', { - outside: 'OutF', - center: 'CtrF', - inside: 'InsF' -}); - -export const FrFl = createEnum<'color' | 'gradient' | 'pattern'>('FrFl', 'color', { - color: 'SClr', - gradient: 'GrFl', - pattern: 'Ptrn', -}); - -export const ESliceType = createEnum<'image' | 'noImage'>('ESliceType', 'image', { - image: 'Img ', - noImage: 'noImage', -}); - -export const ESliceHorzAlign = createEnum<'default'>('ESliceHorzAlign', 'default', { - default: 'default', -}); - -export const ESliceVertAlign = createEnum<'default'>('ESliceVertAlign', 'default', { - default: 'default', -}); - -export const ESliceOrigin = createEnum<'userGenerated' | 'autoGenerated' | 'layer'>('ESliceOrigin', 'userGenerated', { - userGenerated: 'userGenerated', - autoGenerated: 'autoGenerated', - layer: 'layer', -}); - -export const ESliceBGColorType = createEnum<'none' | 'matte' | 'color'>('ESliceBGColorType', 'none', { - none: 'None', - matte: 'matte', - color: 'Clr ', -}); - -export const strokeStyleLineCapType = createEnum('strokeStyleLineCapType', 'butt', { - butt: 'strokeStyleButtCap', - round: 'strokeStyleRoundCap', - square: 'strokeStyleSquareCap', -}); - -export const strokeStyleLineJoinType = createEnum('strokeStyleLineJoinType', 'miter', { - miter: 'strokeStyleMiterJoin', - round: 'strokeStyleRoundJoin', - bevel: 'strokeStyleBevelJoin', -}); - -export const strokeStyleLineAlignment = createEnum('strokeStyleLineAlignment', 'inside', { - inside: 'strokeStyleAlignInside', - center: 'strokeStyleAlignCenter', - outside: 'strokeStyleAlignOutside', -}); diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/effectsHelpers.ts b/npm-packages/mac-v2.4.x/ag-psd/src/effectsHelpers.ts deleted file mode 100644 index 26c411a..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/effectsHelpers.ts +++ /dev/null @@ -1,305 +0,0 @@ -import { LayerEffectsInfo, BevelStyle, LayerEffectShadow } from './psd'; -import { toBlendMode, fromBlendMode } from './helpers'; -import { - PsdReader, checkSignature, readSignature, skipBytes, readUint16, readUint8, - readUint32, readFixedPoint32, readColor -} from './psdReader'; -import { - PsdWriter, writeSignature, writeUint16, writeZeros, writeFixedPoint32, - writeUint8, writeUint32, writeColor -} from './psdWriter'; - -const bevelStyles: BevelStyle[] = [ - undefined as any, 'outer bevel', 'inner bevel', 'emboss', 'pillow emboss', 'stroke emboss' -]; - -function readBlendMode(reader: PsdReader) { - checkSignature(reader, '8BIM'); - return toBlendMode[readSignature(reader)] || 'normal'; -} - -function writeBlendMode(writer: PsdWriter, mode: string | undefined) { - writeSignature(writer, '8BIM'); - writeSignature(writer, fromBlendMode[mode!] || 'norm'); -} - -function readFixedPoint8(reader: PsdReader) { - return readUint8(reader) / 0xff; -} - -function writeFixedPoint8(writer: PsdWriter, value: number) { - writeUint8(writer, Math.round(value * 0xff) | 0); -} - -export function readEffects(reader: PsdReader) { - const version = readUint16(reader); - if (version !== 0) throw new Error(`Invalid effects layer version: ${version}`); - - const effectsCount = readUint16(reader); - const effects: LayerEffectsInfo = {}; - - for (let i = 0; i < effectsCount; i++) { - checkSignature(reader, '8BIM'); - const type = readSignature(reader); - - switch (type) { - case 'cmnS': { // common state (see See Effects layer, common state info) - const size = readUint32(reader); - const version = readUint32(reader); - const visible = !!readUint8(reader); - skipBytes(reader, 2); - - if (size !== 7 || version !== 0 || !visible) throw new Error(`Invalid effects common state`); - break; - } - case 'dsdw': // drop shadow (see See Effects layer, drop shadow and inner shadow info) - case 'isdw': { // inner shadow (see See Effects layer, drop shadow and inner shadow info) - const blockSize = readUint32(reader); - const version = readUint32(reader); - - if (blockSize !== 41 && blockSize !== 51) throw new Error(`Invalid shadow size: ${blockSize}`); - if (version !== 0 && version !== 2) throw new Error(`Invalid shadow version: ${version}`); - - const size = readFixedPoint32(reader); - readFixedPoint32(reader); // intensity - const angle = readFixedPoint32(reader); - const distance = readFixedPoint32(reader); - const color = readColor(reader); - const blendMode = readBlendMode(reader); - const enabled = !!readUint8(reader); - const useGlobalLight = !!readUint8(reader); - const opacity = readFixedPoint8(reader); - if (blockSize >= 51) readColor(reader); // native color - const shadowInfo: LayerEffectShadow = { - size: { units: 'Pixels', value: size }, - distance: { units: 'Pixels', value: distance }, - angle, color, blendMode, enabled, useGlobalLight, opacity - }; - - if (type === 'dsdw') { - effects.dropShadow = [shadowInfo]; - } else { - effects.innerShadow = [shadowInfo]; - } - break; - } - case 'oglw': { // outer glow (see See Effects layer, outer glow info) - const blockSize = readUint32(reader); - const version = readUint32(reader); - - if (blockSize !== 32 && blockSize !== 42) throw new Error(`Invalid outer glow size: ${blockSize}`); - if (version !== 0 && version !== 2) throw new Error(`Invalid outer glow version: ${version}`); - - const size = readFixedPoint32(reader); - readFixedPoint32(reader); // intensity - const color = readColor(reader); - const blendMode = readBlendMode(reader); - const enabled = !!readUint8(reader); - const opacity = readFixedPoint8(reader); - if (blockSize >= 42) readColor(reader); // native color - - effects.outerGlow = { - size: { units: 'Pixels', value: size }, - color, blendMode, enabled, opacity - }; - break; - } - case 'iglw': { // inner glow (see See Effects layer, inner glow info) - const blockSize = readUint32(reader); - const version = readUint32(reader); - - if (blockSize !== 32 && blockSize !== 43) throw new Error(`Invalid inner glow size: ${blockSize}`); - if (version !== 0 && version !== 2) throw new Error(`Invalid inner glow version: ${version}`); - - const size = readFixedPoint32(reader); - readFixedPoint32(reader); // intensity - const color = readColor(reader); - const blendMode = readBlendMode(reader); - const enabled = !!readUint8(reader); - const opacity = readFixedPoint8(reader); - - if (blockSize >= 43) { - readUint8(reader); // inverted - readColor(reader); // native color - } - - effects.innerGlow = { - size: { units: 'Pixels', value: size }, - color, blendMode, enabled, opacity - }; - break; - } - case 'bevl': { // bevel (see See Effects layer, bevel info) - const blockSize = readUint32(reader); - const version = readUint32(reader); - - if (blockSize !== 58 && blockSize !== 78) throw new Error(`Invalid bevel size: ${blockSize}`); - if (version !== 0 && version !== 2) throw new Error(`Invalid bevel version: ${version}`); - - const angle = readFixedPoint32(reader); - const strength = readFixedPoint32(reader); - const size = readFixedPoint32(reader); - const highlightBlendMode = readBlendMode(reader); - const shadowBlendMode = readBlendMode(reader); - const highlightColor = readColor(reader); - const shadowColor = readColor(reader); - const style = bevelStyles[readUint8(reader)] || 'inner bevel'; - const highlightOpacity = readFixedPoint8(reader); - const shadowOpacity = readFixedPoint8(reader); - const enabled = !!readUint8(reader); - const useGlobalLight = !!readUint8(reader); - const direction = readUint8(reader) ? 'down' : 'up'; - - if (blockSize >= 78) { - readColor(reader); // real highlight color - readColor(reader); // real shadow color - } - - effects.bevel = { - size: { units: 'Pixels', value: size }, - angle, strength, highlightBlendMode, shadowBlendMode, highlightColor, shadowColor, - style, highlightOpacity, shadowOpacity, enabled, useGlobalLight, direction, - }; - break; - } - case 'sofi': { // solid fill (Photoshop 7.0) (see See Effects layer, solid fill (added in Photoshop 7.0)) - const size = readUint32(reader); - const version = readUint32(reader); - - if (size !== 34) throw new Error(`Invalid effects solid fill info size: ${size}`); - if (version !== 2) throw new Error(`Invalid effects solid fill info version: ${version}`); - - const blendMode = readBlendMode(reader); - const color = readColor(reader); - const opacity = readFixedPoint8(reader); - const enabled = !!readUint8(reader); - readColor(reader); // native color - - effects.solidFill = [{ blendMode, color, opacity, enabled }]; - break; - } - default: - throw new Error(`Invalid effect type: '${type}'`); - } - } - - return effects; -} - -function writeShadowInfo(writer: PsdWriter, shadow: LayerEffectShadow) { - writeUint32(writer, 51); - writeUint32(writer, 2); - writeFixedPoint32(writer, shadow.size && shadow.size.value || 0); - writeFixedPoint32(writer, 0); // intensity - writeFixedPoint32(writer, shadow.angle || 0); - writeFixedPoint32(writer, shadow.distance && shadow.distance.value || 0); - writeColor(writer, shadow.color); - writeBlendMode(writer, shadow.blendMode); - writeUint8(writer, shadow.enabled ? 1 : 0); - writeUint8(writer, shadow.useGlobalLight ? 1 : 0); - writeFixedPoint8(writer, shadow.opacity ?? 1); - writeColor(writer, shadow.color); // native color -} - -export function writeEffects(writer: PsdWriter, effects: LayerEffectsInfo) { - const dropShadow = effects.dropShadow?.[0]; - const innerShadow = effects.innerShadow?.[0]; - const outerGlow = effects.outerGlow; - const innerGlow = effects.innerGlow; - const bevel = effects.bevel; - const solidFill = effects.solidFill?.[0]; - - let count = 1; - if (dropShadow) count++; - if (innerShadow) count++; - if (outerGlow) count++; - if (innerGlow) count++; - if (bevel) count++; - if (solidFill) count++; - - writeUint16(writer, 0); - writeUint16(writer, count); - - writeSignature(writer, '8BIM'); - writeSignature(writer, 'cmnS'); - writeUint32(writer, 7); // size - writeUint32(writer, 0); // version - writeUint8(writer, 1); // visible - writeZeros(writer, 2); - - if (dropShadow) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'dsdw'); - writeShadowInfo(writer, dropShadow); - } - - if (innerShadow) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'isdw'); - writeShadowInfo(writer, innerShadow); - } - - if (outerGlow) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'oglw'); - writeUint32(writer, 42); - writeUint32(writer, 2); - writeFixedPoint32(writer, outerGlow.size?.value || 0); - writeFixedPoint32(writer, 0); // intensity - writeColor(writer, outerGlow.color); - writeBlendMode(writer, outerGlow.blendMode); - writeUint8(writer, outerGlow.enabled ? 1 : 0); - writeFixedPoint8(writer, outerGlow.opacity || 0); - writeColor(writer, outerGlow.color); - } - - if (innerGlow) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'iglw'); - writeUint32(writer, 43); - writeUint32(writer, 2); - writeFixedPoint32(writer, innerGlow.size?.value || 0); - writeFixedPoint32(writer, 0); // intensity - writeColor(writer, innerGlow.color); - writeBlendMode(writer, innerGlow.blendMode); - writeUint8(writer, innerGlow.enabled ? 1 : 0); - writeFixedPoint8(writer, innerGlow.opacity || 0); - writeUint8(writer, 0); // inverted - writeColor(writer, innerGlow.color); - } - - if (bevel) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'bevl'); - writeUint32(writer, 78); - writeUint32(writer, 2); - writeFixedPoint32(writer, bevel.angle || 0); - writeFixedPoint32(writer, bevel.strength || 0); - writeFixedPoint32(writer, bevel.size?.value || 0); - writeBlendMode(writer, bevel.highlightBlendMode); - writeBlendMode(writer, bevel.shadowBlendMode); - writeColor(writer, bevel.highlightColor); - writeColor(writer, bevel.shadowColor); - const style = bevelStyles.indexOf(bevel.style!); - writeUint8(writer, style <= 0 ? 1 : style); - writeFixedPoint8(writer, bevel.highlightOpacity || 0); - writeFixedPoint8(writer, bevel.shadowOpacity || 0); - writeUint8(writer, bevel.enabled ? 1 : 0); - writeUint8(writer, bevel.useGlobalLight ? 1 : 0); - writeUint8(writer, bevel.direction === 'down' ? 1 : 0); - writeColor(writer, bevel.highlightColor); - writeColor(writer, bevel.shadowColor); - } - - if (solidFill) { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'sofi'); - writeUint32(writer, 34); - writeUint32(writer, 2); - writeBlendMode(writer, solidFill.blendMode); - writeColor(writer, solidFill.color); - writeFixedPoint8(writer, solidFill.opacity || 0); - writeUint8(writer, solidFill.enabled ? 1 : 0); - writeColor(writer, solidFill.color); - } -} diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/engineData.ts b/npm-packages/mac-v2.4.x/ag-psd/src/engineData.ts deleted file mode 100644 index 20d271e..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/engineData.ts +++ /dev/null @@ -1,359 +0,0 @@ -function isWhitespace(char: number) { - // ' ', '\n', '\r', '\t' - return char === 32 || char === 10 || char === 13 || char === 9; -} - -function isNumber(char: number) { - // 0123456789.- - return (char >= 48 && char <= 57) || char === 46 || char === 45; -} - -export function parseEngineData(data: number[] | Uint8Array) { - let index = 0; - - function skipWhitespace() { - while (index < data.length && isWhitespace(data[index])) { - index++; - } - } - - function getTextByte() { - let byte = data[index]; - index++; - - if (byte === 92) { // \ - byte = data[index]; - index++; - } - - return byte; - } - - function getText() { - let result = ''; - - if (data[index] === 41) { // ) - index++; - return result; - } - - // Strings start with utf-16 BOM - if (data[index] !== 0xFE || data[index + 1] !== 0xFF) { - throw new Error('Invalid utf-16 BOM'); - } - - index += 2; - - // ), ( and \ characters are escaped in ascii manner, remove the escapes before interpreting - // the bytes as utf-16 - while (index < data.length && data[index] !== 41) { // ) - const high = getTextByte(); - const low = getTextByte(); - const char = (high << 8) | low; - result += String.fromCharCode(char); - } - - index++; - return result; - } - - let root: any = null; - const stack: any[] = []; - - function pushContainer(value: any) { - if (!stack.length) { - stack.push(value); - root = value; - } else { - pushValue(value); - stack.push(value); - } - } - - function pushValue(value: any) { - if (!stack.length) throw new Error('Invalid data'); - - const top = stack[stack.length - 1]; - - if (typeof top === 'string') { - stack[stack.length - 2][top] = value; - pop(); - } else if (Array.isArray(top)) { - top.push(value); - } else { - throw new Error('Invalid data'); - } - } - - function pushProperty(name: string) { - if (!stack.length) pushContainer({}); - - const top = stack[stack.length - 1]; - - if (top && typeof top === 'string') { - if (name === 'nil') { - pushValue(null); - } else { - pushValue(`/${name}`); - } - } else if (top && typeof top === 'object') { - stack.push(name); - } else { - throw new Error('Invalid data'); - } - } - - function pop() { - if (!stack.length) throw new Error('Invalid data'); - stack.pop(); - } - - skipWhitespace(); - - while (index < data.length) { - const i = index; - const char = data[i]; - - if (char === 60 && data[i + 1] === 60) { // << - index += 2; - pushContainer({}); - } else if (char === 62 && data[i + 1] === 62) { // >> - index += 2; - pop(); - } else if (char === 47) { // / - index += 1; - const start = index; - - while (index < data.length && !isWhitespace(data[index])) { - index++; - } - - let name = ''; - - for (let i = start; i < index; i++) { - name += String.fromCharCode(data[i]); - } - - pushProperty(name); - } else if (char === 40) { // ( - index += 1; - pushValue(getText()); - } else if (char === 91) { // [ - index += 1; - pushContainer([]); - } else if (char === 93) { // ] - index += 1; - pop(); - } else if (char === 110 && data[i + 1] === 117 && data[i + 2] === 108 && data[i + 3] === 108) { // null - index += 4; - pushValue(null); - } else if (char === 116 && data[i + 1] === 114 && data[i + 2] === 117 && data[i + 3] === 101) { // true - index += 4; - pushValue(true); - } else if (char === 102 && data[i + 1] === 97 && data[i + 2] === 108 && data[i + 3] === 115 && data[i + 4] === 101) { // false - index += 5; - pushValue(false); - } else if (isNumber(char)) { - let value = ''; - - while (index < data.length && isNumber(data[index])) { - value += String.fromCharCode(data[index]); - index++; - } - - pushValue(parseFloat(value)); - } else { - index += 1; - console.log(`Invalid token ${String.fromCharCode(char)} at ${index}`); - // ` near ${String.fromCharCode.apply(null, data.slice(index - 10, index + 20) as any)}` + - // `data [${Array.from(data.slice(index - 10, index + 20)).join(', ')}]` - } - - skipWhitespace(); - } - - return root; -} - -const floatKeys = [ - 'Axis', 'XY', 'Zone', 'WordSpacing', 'FirstLineIndent', 'GlyphSpacing', 'StartIndent', 'EndIndent', 'SpaceBefore', - 'SpaceAfter', 'LetterSpacing', 'Values', 'GridSize', 'GridLeading', 'PointBase', 'BoxBounds', 'TransformPoint0', 'TransformPoint1', - 'TransformPoint2', 'FontSize', 'Leading', 'HorizontalScale', 'VerticalScale', 'BaselineShift', 'Tsume', - 'OutlineWidth', 'AutoLeading', -]; - -const intArrays = ['RunLengthArray']; - -// TODO: handle /nil -export function serializeEngineData(data: any, condensed = false) { - let buffer = new Uint8Array(1024); - let offset = 0; - let indent = 0; - - function write(value: number) { - if (offset >= buffer.length) { - const newBuffer = new Uint8Array(buffer.length * 2); - newBuffer.set(buffer); - buffer = newBuffer; - } - - buffer[offset] = value; - offset++; - } - - function writeString(value: string) { - for (let i = 0; i < value.length; i++) { - write(value.charCodeAt(i)); - } - } - - function writeIndent() { - if (condensed) { - writeString(' '); - } else { - for (let i = 0; i < indent; i++) { - writeString('\t'); - } - } - } - - function writeProperty(key: string, value: any) { - writeIndent(); - writeString(`/${key}`); - writeValue(value, key, true); - if (!condensed) writeString('\n'); - } - - function serializeInt(value: number) { - return value.toString(); - } - - function serializeFloat(value: number) { - return value.toFixed(5) - .replace(/(\d)0+$/g, '$1') - .replace(/^0+\.([1-9])/g, '.$1') - .replace(/^-0+\.0(\d)/g, '-.0$1'); - } - - function serializeNumber(value: number, key?: string) { - const isFloat = (key && floatKeys.indexOf(key) !== -1) || (value | 0) !== value; - return isFloat ? serializeFloat(value) : serializeInt(value); - } - - function getKeys(value: any) { - const keys = Object.keys(value); - - if (keys.indexOf('98') !== -1) - keys.unshift(...keys.splice(keys.indexOf('99'), 1)); - - if (keys.indexOf('99') !== -1) - keys.unshift(...keys.splice(keys.indexOf('99'), 1)); - - return keys; - } - - function writeStringByte(value: number) { - if (value === 40 || value === 41 || value === 92) { // ( ) \ - write(92); // \ - } - - write(value); - } - - function writeValue(value: any, key?: string, inProperty = false) { - function writePrefix() { - if (inProperty) { - writeString(' '); - } else { - writeIndent(); - } - } - - if (value === null) { - writePrefix(); - writeString(condensed ? '/nil' : 'null'); - } else if (typeof value === 'number') { - writePrefix(); - writeString(serializeNumber(value, key)); - } else if (typeof value === 'boolean') { - writePrefix(); - writeString(value ? 'true' : 'false'); - } else if (typeof value === 'string') { - writePrefix(); - - if ((key === '99' || key === '98') && value.charAt(0) === '/') { - writeString(value); - } else { - writeString('('); - write(0xfe); - write(0xff); - - for (let i = 0; i < value.length; i++) { - const code = value.charCodeAt(i); - writeStringByte((code >> 8) & 0xff); - writeStringByte(code & 0xff); - } - - writeString(')'); - } - } else if (Array.isArray(value)) { - writePrefix(); - - if (value.every(x => typeof x === 'number')) { - writeString('['); - - const intArray = intArrays.indexOf(key!) !== -1; - - for (const x of value) { - writeString(' '); - writeString(intArray ? serializeNumber(x) : serializeFloat(x)); - } - - writeString(' ]'); - } else { - writeString('['); - if (!condensed) writeString('\n'); - - for (const x of value) { - writeValue(x, key); - if (!condensed) writeString('\n'); - } - - writeIndent(); - writeString(']'); - } - } else if (typeof value === 'object') { - if (inProperty && !condensed) writeString('\n'); - - writeIndent(); - writeString('<<'); - - if (!condensed) writeString('\n'); - - indent++; - - for (const key of getKeys(value)) { - writeProperty(key, value[key]); - } - - indent--; - writeIndent(); - writeString('>>'); - } - - return undefined; - } - - if (condensed) { - if (typeof data === 'object') { - for (const key of getKeys(data)) { - writeProperty(key, data[key]); - } - } - } else { - writeString('\n\n'); - writeValue(data); - } - - return buffer.slice(0, offset); -} diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/helpers.ts b/npm-packages/mac-v2.4.x/ag-psd/src/helpers.ts deleted file mode 100644 index 6391d08..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/helpers.ts +++ /dev/null @@ -1,387 +0,0 @@ -import { fromByteArray } from 'base64-js'; -import { deflate } from 'pako'; -import { Layer, BlendMode, LayerColor } from './psd'; - -export const MOCK_HANDLERS = false; -export const RAW_IMAGE_DATA = false; - -export const fromBlendMode: { [key: string]: string } = {}; -export const toBlendMode: { [key: string]: BlendMode } = { - 'pass': 'pass through', - 'norm': 'normal', - 'diss': 'dissolve', - 'dark': 'darken', - 'mul ': 'multiply', - 'idiv': 'color burn', - 'lbrn': 'linear burn', - 'dkCl': 'darker color', - 'lite': 'lighten', - 'scrn': 'screen', - 'div ': 'color dodge', - 'lddg': 'linear dodge', - 'lgCl': 'lighter color', - 'over': 'overlay', - 'sLit': 'soft light', - 'hLit': 'hard light', - 'vLit': 'vivid light', - 'lLit': 'linear light', - 'pLit': 'pin light', - 'hMix': 'hard mix', - 'diff': 'difference', - 'smud': 'exclusion', - 'fsub': 'subtract', - 'fdiv': 'divide', - 'hue ': 'hue', - 'sat ': 'saturation', - 'colr': 'color', - 'lum ': 'luminosity', -}; - -Object.keys(toBlendMode).forEach(key => fromBlendMode[toBlendMode[key]] = key); - -export const layerColors: LayerColor[] = [ - 'none', 'red', 'orange', 'yellow', 'green', 'blue', 'violet', 'gray' -]; - -export const largeAdditionalInfoKeys = [ - // from documentation - 'LMsk', 'Lr16', 'Lr32', 'Layr', 'Mt16', 'Mt32', 'Mtrn', 'Alph', 'FMsk', 'lnk2', 'FEid', 'FXid', 'PxSD', - // from guessing - 'cinf', -]; - -export interface Dict { - [key: string]: string; -} - -export function revMap(map: Dict) { - const result: Dict = {}; - Object.keys(map).forEach(key => result[map[key]] = key); - return result; -} - -export function createEnum(prefix: string, def: string, map: Dict) { - const rev = revMap(map); - const decode = (val: string): T => { - const value = val.split('.')[1]; - if (value && !rev[value]) throw new Error(`Unrecognized value for enum: '${val}'`); - return (rev[value] as any) || def; - }; - const encode = (val: T | undefined): string => { - if (val && !map[val as any]) throw new Error(`Invalid value for enum: '${val}'`); - return `${prefix}.${map[val as any] || map[def]}`; - }; - return { decode, encode }; -} - -export const enum ColorSpace { - RGB = 0, - HSB = 1, - CMYK = 2, - Lab = 7, - Grayscale = 8, -} - -export const enum LayerMaskFlags { - PositionRelativeToLayer = 1, - LayerMaskDisabled = 2, - InvertLayerMaskWhenBlending = 4, // obsolete - LayerMaskFromRenderingOtherData = 8, - MaskHasParametersAppliedToIt = 16, -} - -export const enum MaskParams { - UserMaskDensity = 1, - UserMaskFeather = 2, - VectorMaskDensity = 4, - VectorMaskFeather = 8, -} - -export const enum ChannelID { - Color0 = 0, // red (rgb) / cyan (cmyk) - Color1 = 1, // green (rgb) / magenta (cmyk) - Color2 = 2, // blue (rgb) / yellow (cmyk) - Color3 = 3, // - (rgb) / black (cmyk) - Transparency = -1, - UserMask = -2, - RealUserMask = -3, -} - -export const enum Compression { - RawData = 0, - RleCompressed = 1, - ZipWithoutPrediction = 2, - ZipWithPrediction = 3, -} - -export interface ChannelData { - channelId: ChannelID; - compression: Compression; - buffer: Uint8Array | undefined; - length: number; -} - -export interface Bounds { - top: number; - left: number; - right: number; - bottom: number; -} - -export interface LayerChannelData { - layer: Layer; - channels: ChannelData[]; - top: number; - left: number; - right: number; - bottom: number; - mask?: Bounds; -} - -export type PixelArray = Uint8ClampedArray | Uint8Array; - -export interface PixelData { - data: PixelArray; - width: number; - height: number; -} - -export function offsetForChannel(channelId: ChannelID, cmyk: boolean) { - switch (channelId) { - case ChannelID.Color0: return 0; - case ChannelID.Color1: return 1; - case ChannelID.Color2: return 2; - case ChannelID.Color3: return cmyk ? 3 : channelId + 1; - case ChannelID.Transparency: return cmyk ? 4 : 3; - default: return channelId + 1; - } -} - -export function clamp(value: number, min: number, max: number) { - return value < min ? min : (value > max ? max : value); -} - -export function hasAlpha(data: PixelData) { - const size = data.width * data.height * 4; - - for (let i = 3; i < size; i += 4) { - if (data.data[i] !== 255) { - return true; - } - } - - return false; -} - -export function resetImageData({ data }: PixelData) { - const buffer = new Uint32Array(data.buffer); - const size = buffer.length | 0; - - for (let p = 0; p < size; p = (p + 1) | 0) { - buffer[p] = 0xff000000; - } -} - -export function decodeBitmap(input: PixelArray, output: PixelArray, width: number, height: number) { - for (let y = 0, p = 0, o = 0; y < height; y++) { - for (let x = 0; x < width;) { - let b = input[o++]; - - for (let i = 0; i < 8 && x < width; i++, x++) { - const v = b & 0x80 ? 0 : 255; - b = b << 1; - output[p++] = v; - output[p++] = v; - output[p++] = v; - output[p++] = 255; - } - } - } -} - -export function writeDataRaw(data: PixelData, offset: number, width: number, height: number) { - if (!width || !height) - return undefined; - - const array = new Uint8Array(width * height); - - for (let i = 0; i < array.length; i++) { - array[i] = data.data[i * 4 + offset]; - } - - return array; -} - -export function writeDataRLE(buffer: Uint8Array, { data, width, height }: PixelData, offsets: number[], large: boolean) { - if (!width || !height) return undefined; - - const stride = (4 * width) | 0; - - let ol = 0; - let o = (offsets.length * (large ? 4 : 2) * height) | 0; - - for (const offset of offsets) { - for (let y = 0, p = offset | 0; y < height; y++) { - const strideStart = (y * stride) | 0; - const strideEnd = (strideStart + stride) | 0; - const lastIndex = (strideEnd + offset - 4) | 0; - const lastIndex2 = (lastIndex - 4) | 0; - const startOffset = o; - - for (p = (strideStart + offset) | 0; p < strideEnd; p = (p + 4) | 0) { - if (p < lastIndex2) { - let value1 = data[p]; - p = (p + 4) | 0; - let value2 = data[p]; - p = (p + 4) | 0; - let value3 = data[p]; - - if (value1 === value2 && value1 === value3) { - let count = 3; - - while (count < 128 && p < lastIndex && data[(p + 4) | 0] === value1) { - count = (count + 1) | 0; - p = (p + 4) | 0; - } - - buffer[o++] = 1 - count; - buffer[o++] = value1; - } else { - const countIndex = o; - let writeLast = true; - let count = 1; - buffer[o++] = 0; - buffer[o++] = value1; - - while (p < lastIndex && count < 128) { - p = (p + 4) | 0; - value1 = value2; - value2 = value3; - value3 = data[p]; - - if (value1 === value2 && value1 === value3) { - p = (p - 12) | 0; - writeLast = false; - break; - } else { - count++; - buffer[o++] = value1; - } - } - - if (writeLast) { - if (count < 127) { - buffer[o++] = value2; - buffer[o++] = value3; - count += 2; - } else if (count < 128) { - buffer[o++] = value2; - count++; - p = (p - 4) | 0; - } else { - p = (p - 8) | 0; - } - } - - buffer[countIndex] = count - 1; - } - } else if (p === lastIndex) { - buffer[o++] = 0; - buffer[o++] = data[p]; - } else { // p === lastIndex2 - buffer[o++] = 1; - buffer[o++] = data[p]; - p = (p + 4) | 0; - buffer[o++] = data[p]; - } - } - - const length = o - startOffset; - - if (large) { - buffer[ol++] = (length >> 24) & 0xff; - buffer[ol++] = (length >> 16) & 0xff; - } - - buffer[ol++] = (length >> 8) & 0xff; - buffer[ol++] = length & 0xff; - } - } - - return buffer.slice(0, o); -} - -export function writeDataZipWithoutPrediction({ data, width, height }: PixelData, offsets: number[]) { - const size = width * height; - const channel = new Uint8Array(size); - const buffers: Uint8Array[] = []; - let totalLength = 0; - - for (const offset of offsets) { - for (let i = 0, o = offset; i < size; i++, o += 4) { - channel[i] = data[o]; - } - - const buffer = deflate(channel); - buffers.push(buffer); - totalLength += buffer.byteLength; - } - - if (buffers.length > 0) { - const buffer = new Uint8Array(totalLength); - let offset = 0; - - for (const b of buffers) { - buffer.set(b, offset); - offset += b.byteLength; - } - - return buffer; - } else { - return buffers[0]; - } -} - -export let createCanvas: (width: number, height: number) => HTMLCanvasElement = () => { - throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvas method'); -}; - -export let createCanvasFromData: (data: Uint8Array) => HTMLCanvasElement = () => { - throw new Error('Canvas not initialized, use initializeCanvas method to set up createCanvasFromData method'); -}; - -let tempCanvas: HTMLCanvasElement | undefined = undefined; - -export let createImageData: (width: number, height: number) => ImageData = (width, height) => { - if (!tempCanvas) tempCanvas = createCanvas(1, 1); - return tempCanvas.getContext('2d')!.createImageData(width, height); -}; - -if (typeof document !== 'undefined') { - createCanvas = (width, height) => { - const canvas = document.createElement('canvas'); - canvas.width = width; - canvas.height = height; - return canvas; - }; - - createCanvasFromData = (data) => { - const image = new Image(); - image.src = 'data:image/jpeg;base64,' + fromByteArray(data); - const canvas = document.createElement('canvas'); - canvas.width = image.width; - canvas.height = image.height; - canvas.getContext('2d')!.drawImage(image, 0, 0); - return canvas; - }; -} - -export function initializeCanvas( - createCanvasMethod: (width: number, height: number) => HTMLCanvasElement, - createCanvasFromDataMethod?: (data: Uint8Array) => HTMLCanvasElement, - createImageDataMethod?: (width: number, height: number) => ImageData -) { - createCanvas = createCanvasMethod; - createCanvasFromData = createCanvasFromDataMethod || createCanvasFromData; - createImageData = createImageDataMethod || createImageData; -} diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/imageResources.ts b/npm-packages/mac-v2.4.x/ag-psd/src/imageResources.ts deleted file mode 100644 index 7f2259c..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/imageResources.ts +++ /dev/null @@ -1,1439 +0,0 @@ -import { toByteArray } from 'base64-js'; -import { BlendMode, ImageResources, ReadOptions, RenderingIntent } from './psd'; -import { - PsdReader, readPascalString, readUnicodeString, readUint32, readUint16, readUint8, readFloat64, - readBytes, skipBytes, readFloat32, readInt16, readFixedPoint32, readSignature, checkSignature, - readSection, readColor, readInt32 -} from './psdReader'; -import { - PsdWriter, writePascalString, writeUnicodeString, writeUint32, writeUint8, writeFloat64, writeUint16, - writeBytes, writeInt16, writeFloat32, writeFixedPoint32, writeUnicodeStringWithPadding, writeColor, writeSignature, - writeSection, writeInt32, -} from './psdWriter'; -import { createCanvasFromData, createEnum, MOCK_HANDLERS } from './helpers'; -import { decodeString, encodeString } from './utf8'; -import { ESliceBGColorType, ESliceHorzAlign, ESliceOrigin, ESliceType, ESliceVertAlign, FractionDescriptor, parseTrackList, readVersionAndDescriptor, serializeTrackList, TimelineTrackDescriptor, TimeScopeDescriptor, writeVersionAndDescriptor } from './descriptor'; - -export interface ResourceHandler { - key: number; - has: (target: ImageResources) => boolean | number; - read: (reader: PsdReader, target: ImageResources, left: () => number, options: ReadOptions) => void; - write: (writer: PsdWriter, target: ImageResources, index: number) => void; -} - -export const resourceHandlers: ResourceHandler[] = []; -export const resourceHandlersMap: { [key: number]: ResourceHandler } = {}; - -function addHandler( - key: number, - has: (target: ImageResources) => boolean | number, - read: (reader: PsdReader, target: ImageResources, left: () => number, options: ReadOptions) => void, - write: (writer: PsdWriter, target: ImageResources, index: number) => void, -) { - const handler: ResourceHandler = { key, has, read, write }; - resourceHandlers.push(handler); - resourceHandlersMap[handler.key] = handler; -} - -const LOG_MOCK_HANDLERS = false; -const RESOLUTION_UNITS = [undefined, 'PPI', 'PPCM']; -const MEASUREMENT_UNITS = [undefined, 'Inches', 'Centimeters', 'Points', 'Picas', 'Columns']; -const hex = '0123456789abcdef'; - -function charToNibble(code: number) { - return code <= 57 ? code - 48 : code - 87; -} - -function byteAt(value: string, index: number) { - return (charToNibble(value.charCodeAt(index)) << 4) | charToNibble(value.charCodeAt(index + 1)); -} - -function readUtf8String(reader: PsdReader, length: number) { - const buffer = readBytes(reader, length); - return decodeString(buffer); -} - -function writeUtf8String(writer: PsdWriter, value: string) { - const buffer = encodeString(value); - writeBytes(writer, buffer); -} - -MOCK_HANDLERS && addHandler( - 1028, // IPTC-NAA record - target => (target as any)._ir1028 !== undefined, - (reader, target, left) => { - LOG_MOCK_HANDLERS && console.log('image resource 1028', left()); - (target as any)._ir1028 = readBytes(reader, left()); - }, - (writer, target) => { - writeBytes(writer, (target as any)._ir1028); - }, -); - -addHandler( - 1061, - target => target.captionDigest !== undefined, - (reader, target) => { - let captionDigest = ''; - - for (let i = 0; i < 16; i++) { - const byte = readUint8(reader); - captionDigest += hex[byte >> 4]; - captionDigest += hex[byte & 0xf]; - } - - target.captionDigest = captionDigest; - }, - (writer, target) => { - for (let i = 0; i < 16; i++) { - writeUint8(writer, byteAt(target.captionDigest!, i * 2)); - } - }, -); - -addHandler( - 1060, - target => target.xmpMetadata !== undefined, - (reader, target, left) => target.xmpMetadata = readUtf8String(reader, left()), - (writer, target) => writeUtf8String(writer, target.xmpMetadata!), -); - -const Inte = createEnum('Inte', 'perceptual', { - 'perceptual': 'Img ', - 'saturation': 'Grp ', - 'relative colorimetric': 'Clrm', - 'absolute colorimetric': 'AClr', -}); - -interface PrintInformationDescriptor { - 'Nm '?: string; - ClrS?: string; - PstS?: boolean; - MpBl?: boolean; - Inte?: string; - hardProof?: boolean; - printSixteenBit?: boolean; - printerName?: string; - printProofSetup?: { - Bltn: string; - } | { - profile: string; - Inte: string; - MpBl: boolean; - paperWhite: boolean; - }; -} - -addHandler( - 1082, - target => target.printInformation !== undefined, - (reader, target) => { - const desc: PrintInformationDescriptor = readVersionAndDescriptor(reader); - - target.printInformation = { - printerName: desc.printerName || '', - renderingIntent: Inte.decode(desc.Inte ?? 'Inte.Img '), - }; - - const info = target.printInformation; - - if (desc.PstS !== undefined) info.printerManagesColors = desc.PstS; - if (desc['Nm '] !== undefined) info.printerProfile = desc['Nm ']; - if (desc.MpBl !== undefined) info.blackPointCompensation = desc.MpBl; - if (desc.printSixteenBit !== undefined) info.printSixteenBit = desc.printSixteenBit; - if (desc.hardProof !== undefined) info.hardProof = desc.hardProof; - if (desc.printProofSetup) { - if ('Bltn' in desc.printProofSetup) { - info.proofSetup = { builtin: desc.printProofSetup.Bltn.split('.')[1] }; - } else { - info.proofSetup = { - profile: desc.printProofSetup.profile, - renderingIntent: Inte.decode(desc.printProofSetup.Inte ?? 'Inte.Img '), - blackPointCompensation: !!desc.printProofSetup.MpBl, - paperWhite: !!desc.printProofSetup.paperWhite, - }; - } - } - }, - (writer, target) => { - const info = target.printInformation!; - const desc: PrintInformationDescriptor = {}; - - if (info.printerManagesColors) { - desc.PstS = true; - } else { - if (info.hardProof !== undefined) desc.hardProof = !!info.hardProof; - desc.ClrS = 'ClrS.RGBC'; // TODO: ??? - desc['Nm '] = info.printerProfile ?? 'CIE RGB'; - } - - desc.Inte = Inte.encode(info.renderingIntent); - - if (!info.printerManagesColors) desc.MpBl = !!info.blackPointCompensation; - - desc.printSixteenBit = !!info.printSixteenBit; - desc.printerName = info.printerName || ''; - - if (info.proofSetup && 'profile' in info.proofSetup) { - desc.printProofSetup = { - profile: info.proofSetup.profile || '', - Inte: Inte.encode(info.proofSetup.renderingIntent), - MpBl: !!info.proofSetup.blackPointCompensation, - paperWhite: !!info.proofSetup.paperWhite, - }; - } else { - desc.printProofSetup = { - Bltn: info.proofSetup?.builtin ? `builtinProof.${info.proofSetup.builtin}` : 'builtinProof.proofCMYK', - }; - } - - writeVersionAndDescriptor(writer, '', 'printOutput', desc); - }, -); - -MOCK_HANDLERS && addHandler( - 1083, // Print style - target => (target as any)._ir1083 !== undefined, - (reader, target, left) => { - LOG_MOCK_HANDLERS && console.log('image resource 1083', left()); - (target as any)._ir1083 = readBytes(reader, left()); - - // TODO: - // const desc = readVersionAndDescriptor(reader); - // console.log('1083', require('util').inspect(desc, false, 99, true)); - }, - (writer, target) => { - writeBytes(writer, (target as any)._ir1083); - }, -); - -addHandler( - 1005, - target => target.resolutionInfo !== undefined, - (reader, target) => { - const horizontalResolution = readFixedPoint32(reader); - const horizontalResolutionUnit = readUint16(reader); - const widthUnit = readUint16(reader); - const verticalResolution = readFixedPoint32(reader); - const verticalResolutionUnit = readUint16(reader); - const heightUnit = readUint16(reader); - - target.resolutionInfo = { - horizontalResolution, - horizontalResolutionUnit: RESOLUTION_UNITS[horizontalResolutionUnit] || 'PPI' as any, - widthUnit: MEASUREMENT_UNITS[widthUnit] || 'Inches' as any, - verticalResolution, - verticalResolutionUnit: RESOLUTION_UNITS[verticalResolutionUnit] || 'PPI' as any, - heightUnit: MEASUREMENT_UNITS[heightUnit] || 'Inches' as any, - }; - }, - (writer, target) => { - const info = target.resolutionInfo!; - - writeFixedPoint32(writer, info.horizontalResolution || 0); - writeUint16(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.horizontalResolutionUnit))); - writeUint16(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.widthUnit))); - writeFixedPoint32(writer, info.verticalResolution || 0); - writeUint16(writer, Math.max(1, RESOLUTION_UNITS.indexOf(info.verticalResolutionUnit))); - writeUint16(writer, Math.max(1, MEASUREMENT_UNITS.indexOf(info.heightUnit))); - }, -); - -const printScaleStyles = ['centered', 'size to fit', 'user defined']; - -addHandler( - 1062, - target => target.printScale !== undefined, - (reader, target) => { - target.printScale = { - style: printScaleStyles[readInt16(reader)] as any, - x: readFloat32(reader), - y: readFloat32(reader), - scale: readFloat32(reader), - }; - }, - (writer, target) => { - const { style, x, y, scale } = target.printScale!; - writeInt16(writer, Math.max(0, printScaleStyles.indexOf(style!))); - writeFloat32(writer, x || 0); - writeFloat32(writer, y || 0); - writeFloat32(writer, scale || 0); - }, -); - -addHandler( - 1006, - target => target.alphaChannelNames !== undefined, - (reader, target, left) => { - target.alphaChannelNames = []; - - while (left()) { - const value = readPascalString(reader, 1); - target.alphaChannelNames.push(value); - } - }, - (writer, target) => { - for (const name of target.alphaChannelNames!) { - writePascalString(writer, name, 1); - } - }, -); - -addHandler( - 1045, - target => target.alphaChannelNames !== undefined, - (reader, target, left) => { - target.alphaChannelNames = []; - - while (left()) { - target.alphaChannelNames.push(readUnicodeString(reader)); - } - }, - (writer, target) => { - for (const name of target.alphaChannelNames!) { - writeUnicodeStringWithPadding(writer, name); - } - }, -); - -MOCK_HANDLERS && addHandler( - 1077, - target => (target as any)._ir1077 !== undefined, - (reader, target, left) => { - LOG_MOCK_HANDLERS && console.log('image resource 1077', left()); - (target as any)._ir1077 = readBytes(reader, left()); - }, - (writer, target) => { - writeBytes(writer, (target as any)._ir1077); - }, -); - -addHandler( - 1053, - target => target.alphaIdentifiers !== undefined, - (reader, target, left) => { - target.alphaIdentifiers = []; - - while (left() >= 4) { - target.alphaIdentifiers.push(readUint32(reader)); - } - }, - (writer, target) => { - for (const id of target.alphaIdentifiers!) { - writeUint32(writer, id); - } - }, -); - -addHandler( - 1010, - target => target.backgroundColor !== undefined, - (reader, target) => target.backgroundColor = readColor(reader), - (writer, target) => writeColor(writer, target.backgroundColor!), -); - -addHandler( - 1037, - target => target.globalAngle !== undefined, - (reader, target) => target.globalAngle = readUint32(reader), - (writer, target) => writeUint32(writer, target.globalAngle!), -); - -addHandler( - 1049, - target => target.globalAltitude !== undefined, - (reader, target) => target.globalAltitude = readUint32(reader), - (writer, target) => writeUint32(writer, target.globalAltitude!), -); - -addHandler( - 1011, - target => target.printFlags !== undefined, - (reader, target) => { - target.printFlags = { - labels: !!readUint8(reader), - cropMarks: !!readUint8(reader), - colorBars: !!readUint8(reader), - registrationMarks: !!readUint8(reader), - negative: !!readUint8(reader), - flip: !!readUint8(reader), - interpolate: !!readUint8(reader), - caption: !!readUint8(reader), - printFlags: !!readUint8(reader), - }; - }, - (writer, target) => { - const flags = target.printFlags!; - writeUint8(writer, flags.labels ? 1 : 0); - writeUint8(writer, flags.cropMarks ? 1 : 0); - writeUint8(writer, flags.colorBars ? 1 : 0); - writeUint8(writer, flags.registrationMarks ? 1 : 0); - writeUint8(writer, flags.negative ? 1 : 0); - writeUint8(writer, flags.flip ? 1 : 0); - writeUint8(writer, flags.interpolate ? 1 : 0); - writeUint8(writer, flags.caption ? 1 : 0); - writeUint8(writer, flags.printFlags ? 1 : 0); - }, -); - -MOCK_HANDLERS && addHandler( - 10000, // Print flags - target => (target as any)._ir10000 !== undefined, - (reader, target, left) => { - LOG_MOCK_HANDLERS && console.log('image resource 10000', left()); - (target as any)._ir10000 = readBytes(reader, left()); - }, - (writer, target) => { - writeBytes(writer, (target as any)._ir10000); - }, -); - -MOCK_HANDLERS && addHandler( - 1013, // Color halftoning - target => (target as any)._ir1013 !== undefined, - (reader, target, left) => { - LOG_MOCK_HANDLERS && console.log('image resource 1013', left()); - (target as any)._ir1013 = readBytes(reader, left()); - }, - (writer, target) => { - writeBytes(writer, (target as any)._ir1013); - }, -); - -MOCK_HANDLERS && addHandler( - 1016, // Color transfer functions - target => (target as any)._ir1016 !== undefined, - (reader, target, left) => { - LOG_MOCK_HANDLERS && console.log('image resource 1016', left()); - (target as any)._ir1016 = readBytes(reader, left()); - }, - (writer, target) => { - writeBytes(writer, (target as any)._ir1016); - }, -); - -interface CountInformationDesc { - Vrsn: 1; - countGroupList: { - 'Rd ': number; // 0-255 - 'Grn ': number; - 'Bl ': number; - 'Nm ': string; - 'Rds ': number; // Marker size - fontSize: number; - Vsbl: boolean; - countObjectList: { - 'X ': number; - 'Y ': number; - }[]; - }[]; -} - -addHandler( - 1080, // Count Information - target => target.countInformation !== undefined, - (reader, target) => { - const desc = readVersionAndDescriptor(reader) as CountInformationDesc; - target.countInformation = desc.countGroupList.map(g => ({ - color: { r: g['Rd '], g: g['Grn '], b: g['Bl '] }, - name: g['Nm '], - size: g['Rds '], - fontSize: g.fontSize, - visible: g.Vsbl, - points: g.countObjectList.map(p => ({ x: p['X '], y: p['Y '] })), - })); - }, - (writer, target) => { - const desc: CountInformationDesc = { - Vrsn: 1, - countGroupList: target.countInformation!.map(g => ({ - 'Rd ': g.color.r, - 'Grn ': g.color.g, - 'Bl ': g.color.b, - 'Nm ': g.name, - 'Rds ': g.size, - fontSize: g.fontSize, - Vsbl: g.visible, - countObjectList: g.points.map(p => ({ 'X ': p.x, 'Y ': p.y })), - })), - }; - writeVersionAndDescriptor(writer, '', 'Cnt ', desc); - }, -); - -addHandler( - 1024, - target => target.layerState !== undefined, - (reader, target) => target.layerState = readUint16(reader), - (writer, target) => writeUint16(writer, target.layerState!), -); - -addHandler( - 1026, - target => target.layersGroup !== undefined, - (reader, target, left) => { - target.layersGroup = []; - - while (left()) { - target.layersGroup.push(readUint16(reader)); - } - }, - (writer, target) => { - for (const g of target.layersGroup!) { - writeUint16(writer, g); - } - }, -); - -addHandler( - 1072, - target => target.layerGroupsEnabledId !== undefined, - (reader, target, left) => { - target.layerGroupsEnabledId = []; - - while (left()) { - target.layerGroupsEnabledId.push(readUint8(reader)); - } - }, - (writer, target) => { - for (const id of target.layerGroupsEnabledId!) { - writeUint8(writer, id); - } - }, -); - -addHandler( - 1069, - target => target.layerSelectionIds !== undefined, - (reader, target) => { - let count = readUint16(reader); - target.layerSelectionIds = []; - - while (count--) { - target.layerSelectionIds.push(readUint32(reader)); - } - }, - (writer, target) => { - writeUint16(writer, target.layerSelectionIds!.length); - - for (const id of target.layerSelectionIds!) { - writeUint32(writer, id); - } - }, -); - -addHandler( - 1032, - target => target.gridAndGuidesInformation !== undefined, - (reader, target) => { - const version = readUint32(reader); - const horizontal = readUint32(reader); - const vertical = readUint32(reader); - const count = readUint32(reader); - - if (version !== 1) throw new Error(`Invalid 1032 resource version: ${version}`); - - target.gridAndGuidesInformation = { - grid: { horizontal, vertical }, - guides: [], - }; - - for (let i = 0; i < count; i++) { - target.gridAndGuidesInformation.guides!.push({ - location: readUint32(reader) / 32, - direction: readUint8(reader) ? 'horizontal' : 'vertical' - }); - } - }, - (writer, target) => { - const info = target.gridAndGuidesInformation!; - const grid = info.grid || { horizontal: 18 * 32, vertical: 18 * 32 }; - const guides = info.guides || []; - - writeUint32(writer, 1); - writeUint32(writer, grid.horizontal); - writeUint32(writer, grid.vertical); - writeUint32(writer, guides.length); - - for (const g of guides) { - writeUint32(writer, g.location * 32); - writeUint8(writer, g.direction === 'horizontal' ? 1 : 0); - } - }, -); - -interface OnionSkinsDescriptor { - Vrsn: 1; - enab: boolean; - numBefore: number; - numAfter: number; - Spcn: number; - minOpacity: number; - maxOpacity: number; - BlnM: number; -} - -// 0 - normal, 7 - multiply, 8 - screen, 23 - difference -const onionSkinsBlendModes: (BlendMode | undefined)[] = [ - 'normal', undefined, undefined, undefined, undefined, undefined, undefined, 'multiply', - 'screen', undefined, undefined, undefined, undefined, undefined, undefined, undefined, - undefined, undefined, undefined, undefined, undefined, undefined, undefined, 'difference', -]; - -addHandler( - 1078, // Onion Skins - target => target.onionSkins !== undefined, - (reader, target) => { - const desc = readVersionAndDescriptor(reader) as OnionSkinsDescriptor; - // console.log('1078', require('util').inspect(desc, false, 99, true)); - - target.onionSkins = { - enabled: desc.enab, - framesBefore: desc.numBefore, - framesAfter: desc.numAfter, - frameSpacing: desc.Spcn, - minOpacity: desc.minOpacity / 100, - maxOpacity: desc.maxOpacity / 100, - blendMode: onionSkinsBlendModes[desc.BlnM] || 'normal', - }; - }, - (writer, target) => { - const onionSkins = target.onionSkins!; - const desc: OnionSkinsDescriptor = { - Vrsn: 1, - enab: onionSkins.enabled, - numBefore: onionSkins.framesBefore, - numAfter: onionSkins.framesAfter, - Spcn: onionSkins.frameSpacing, - minOpacity: (onionSkins.minOpacity * 100) | 0, - maxOpacity: (onionSkins.maxOpacity * 100) | 0, - BlnM: Math.max(0, onionSkinsBlendModes.indexOf(onionSkins.blendMode)), - }; - - writeVersionAndDescriptor(writer, '', 'null', desc); - }, -); - -interface TimelineAudioClipDescriptor { - clipID: string; - timeScope: TimeScopeDescriptor; - frameReader: { - frameReaderType: number; - descVersion: 1; - 'Lnk ': { - descVersion: 1; - 'Nm ': string; - fullPath: string; - relPath: string; - }, - mediaDescriptor: string; - }, - muted: boolean; - audioLevel: number; -} - -interface TimelineAudioClipGroupDescriptor { - groupID: string; - muted: boolean; - audioClipList: TimelineAudioClipDescriptor[]; -} - -interface TimelineInformationDescriptor { - Vrsn: 1; - enab: boolean; - frameStep: FractionDescriptor; - frameRate: number; - time: FractionDescriptor; - duration: FractionDescriptor; - workInTime: FractionDescriptor; - workOutTime: FractionDescriptor; - LCnt: number; - globalTrackList: TimelineTrackDescriptor[]; - audioClipGroupList?: { - audioClipGroupList?: TimelineAudioClipGroupDescriptor[]; - }, - hasMotion: boolean; -} - -addHandler( - 1075, // Timeline Information - target => target.timelineInformation !== undefined, - (reader, target, _, options) => { - const desc = readVersionAndDescriptor(reader) as TimelineInformationDescriptor; - // console.log('1075', require('util').inspect(desc, false, 99, true)); - - target.timelineInformation = { - enabled: desc.enab, - frameStep: desc.frameStep, - frameRate: desc.frameRate, - time: desc.time, - duration: desc.duration, - workInTime: desc.workInTime, - workOutTime: desc.workOutTime, - repeats: desc.LCnt, - hasMotion: desc.hasMotion, - globalTracks: parseTrackList(desc.globalTrackList, !!options.logMissingFeatures), - }; - - if (desc.audioClipGroupList?.audioClipGroupList?.length) { - target.timelineInformation.audioClipGroups = desc.audioClipGroupList.audioClipGroupList.map(g => ({ - id: g.groupID, - muted: g.muted, - audioClips: g.audioClipList.map(({ clipID, timeScope, muted, audioLevel, frameReader }) => ({ - id: clipID, - start: timeScope.Strt, - duration: timeScope.duration, - inTime: timeScope.inTime, - outTime: timeScope.outTime, - muted: muted, - audioLevel: audioLevel, - frameReader: { - type: frameReader.frameReaderType, - mediaDescriptor: frameReader.mediaDescriptor, - link: { - name: frameReader['Lnk ']['Nm '], - fullPath: frameReader['Lnk '].fullPath, - relativePath: frameReader['Lnk '].relPath, - }, - }, - })), - })); - } - }, - (writer, target) => { - const timeline = target.timelineInformation!; - const desc: TimelineInformationDescriptor = { - Vrsn: 1, - enab: timeline.enabled, - frameStep: timeline.frameStep, - frameRate: timeline.frameRate, - time: timeline.time, - duration: timeline.duration, - workInTime: timeline.workInTime, - workOutTime: timeline.workOutTime, - LCnt: timeline.repeats, - globalTrackList: serializeTrackList(timeline.globalTracks), - audioClipGroupList: { - audioClipGroupList: timeline.audioClipGroups?.map(a => ({ - groupID: a.id, - muted: a.muted, - audioClipList: a.audioClips.map(c => ({ - clipID: c.id, - timeScope: { - Vrsn: 1, - Strt: c.start, - duration: c.duration, - inTime: c.inTime, - outTime: c.outTime, - }, - frameReader: { - frameReaderType: c.frameReader.type, - descVersion: 1, - 'Lnk ': { - descVersion: 1, - 'Nm ': c.frameReader.link.name, - fullPath: c.frameReader.link.fullPath, - relPath: c.frameReader.link.relativePath, - }, - mediaDescriptor: c.frameReader.mediaDescriptor, - }, - muted: c.muted, - audioLevel: c.audioLevel, - })), - })), - }, - hasMotion: timeline.hasMotion, - }; - - // console.log('WRITE:1075', require('util').inspect(desc, false, 99, true)); - writeVersionAndDescriptor(writer, '', 'null', desc, 'anim'); - }, -); - -interface SheetDisclosureDescriptor { - Vrsn: 1; - sheetTimelineOptions?: { - Vrsn: 2; - sheetID: number; - sheetDisclosed: boolean; - lightsDisclosed: boolean; - meshesDisclosed: boolean; - materialsDisclosed: boolean; - }[]; -} - -addHandler( - 1076, // Sheet Disclosure - target => target.sheetDisclosure !== undefined, - (reader, target) => { - const desc = readVersionAndDescriptor(reader) as SheetDisclosureDescriptor; - // console.log('1076', require('util').inspect(desc, false, 99, true)); - - target.sheetDisclosure = {}; - - if (desc.sheetTimelineOptions) { - target.sheetDisclosure.sheetTimelineOptions = desc.sheetTimelineOptions.map(o => ({ - sheetID: o.sheetID, - sheetDisclosed: o.sheetDisclosed, - lightsDisclosed: o.lightsDisclosed, - meshesDisclosed: o.meshesDisclosed, - materialsDisclosed: o.materialsDisclosed, - })); - } - }, - (writer, target) => { - const disclosure = target.sheetDisclosure!; - const desc: SheetDisclosureDescriptor = { Vrsn: 1 }; - - if (disclosure.sheetTimelineOptions) { - desc.sheetTimelineOptions = disclosure.sheetTimelineOptions.map(d => ({ - Vrsn: 2, - sheetID: d.sheetID, - sheetDisclosed: d.sheetDisclosed, - lightsDisclosed: d.lightsDisclosed, - meshesDisclosed: d.meshesDisclosed, - materialsDisclosed: d.materialsDisclosed, - })); - } - - writeVersionAndDescriptor(writer, '', 'null', desc); - }, -); - -addHandler( - 1054, // URL List - target => target.urlsList !== undefined, - (reader, target, _, options) => { - const count = readUint32(reader); - target.urlsList = []; - - for (let i = 0; i < count; i++) { - const long = readSignature(reader); - if (long !== 'slic' && options.throwForMissingFeatures) throw new Error('Unknown long'); - const id = readUint32(reader); - const url = readUnicodeString(reader); - target.urlsList.push({ id, url, ref: 'slice' }); - } - }, - (writer, target) => { - const list = target.urlsList!; - writeUint32(writer, list.length); - - for (let i = 0; i < list.length; i++) { - writeSignature(writer, 'slic'); - writeUint32(writer, list[i].id); - writeUnicodeString(writer, list[i].url); - } - }, -); - -interface BoundsDesc { - 'Top ': number; - Left: number; - Btom: number; - Rght: number; -} - -interface SlicesSliceDesc { - sliceID: number; - groupID: number; - origin: string; - 'Nm '?: string; - Type: string; - bounds: BoundsDesc; - url: string; - null: string; - Msge: string; - altTag: string; - cellTextIsHTML: boolean; - cellText: string; - horzAlign: string; - vertAlign: string; - bgColorType: string; - bgColor?: { 'Rd ': number; 'Grn ': number; 'Bl ': number; alpha: number; }; - topOutset?: number; - leftOutset?: number; - bottomOutset?: number; - rightOutset?: number; -} - -interface SlicesDesc { - bounds: BoundsDesc; - slices: SlicesSliceDesc[]; -} - -interface SlicesDesc7 extends SlicesDesc { - baseName: string; -} - -function boundsToBounds(bounds: { left: number; top: number; right: number; bottom: number }): BoundsDesc { - return { 'Top ': bounds.top, Left: bounds.left, Btom: bounds.bottom, Rght: bounds.right }; -} - -function boundsFromBounds(bounds: BoundsDesc): { left: number; top: number; right: number; bottom: number } { - return { top: bounds['Top '], left: bounds.Left, bottom: bounds.Btom, right: bounds.Rght }; -} - -function clamped(array: T[], index: number) { - return array[Math.max(0, Math.min(array.length - 1, index))]; -} - -const sliceOrigins: ('userGenerated' | 'autoGenerated' | 'layer')[] = ['autoGenerated', 'layer', 'userGenerated']; -const sliceTypes: ('image' | 'noImage')[] = ['noImage', 'image']; -const sliceAlignments: ('default')[] = ['default']; - -addHandler( - 1050, // Slices - target => target.slices ? target.slices.length : 0, - (reader, target) => { - const version = readUint32(reader); - - if (version == 6) { - if (!target.slices) target.slices = []; - - const top = readInt32(reader); - const left = readInt32(reader); - const bottom = readInt32(reader); - const right = readInt32(reader); - const groupName = readUnicodeString(reader); - const count = readUint32(reader); - target.slices.push({ bounds: { top, left, bottom, right }, groupName, slices: [] }); - const slices = target.slices[target.slices.length - 1].slices; - - for (let i = 0; i < count; i++) { - const id = readUint32(reader); - const groupId = readUint32(reader); - const origin = clamped(sliceOrigins, readUint32(reader)); - const associatedLayerId = origin == 'layer' ? readUint32(reader) : 0; - const name = readUnicodeString(reader); - const type = clamped(sliceTypes, readUint32(reader)); - const top = readInt32(reader); - const left = readInt32(reader); - const bottom = readInt32(reader); - const right = readInt32(reader); - const url = readUnicodeString(reader); - const target = readUnicodeString(reader); - const message = readUnicodeString(reader); - const altTag = readUnicodeString(reader); - const cellTextIsHTML = !!readUint8(reader); - const cellText = readUnicodeString(reader); - const horizontalAlignment = clamped(sliceAlignments, readUint32(reader)); - const verticalAlignment = clamped(sliceAlignments, readUint32(reader)); - const a = readUint8(reader); - const r = readUint8(reader); - const g = readUint8(reader); - const b = readUint8(reader); - const backgroundColorType = ((a + r + g + b) === 0) ? 'none' : (a === 0 ? 'matte' : 'color'); - slices.push({ - id, groupId, origin, associatedLayerId, name, target, message, altTag, cellTextIsHTML, cellText, - horizontalAlignment, verticalAlignment, type, url, - bounds: { top, left, bottom, right }, - backgroundColorType, backgroundColor: { r, g, b, a }, - }); - // console.log(require('util').inspect(slices[slices.length - 1], false, 99, true)); - } - const desc = readVersionAndDescriptor(reader) as SlicesDesc; - desc.slices.forEach(d => { - const slice = slices.find(s => d.sliceID == s.id); - if (slice) { - slice.topOutset = d.topOutset; - slice.leftOutset = d.leftOutset; - slice.bottomOutset = d.bottomOutset; - slice.rightOutset = d.rightOutset; - } - }); - - // console.log(require('util').inspect(desc, false, 99, true)); - // console.log(require('util').inspect(target.slices, false, 99, true)); - } else if (version == 7 || version == 8) { - const desc = readVersionAndDescriptor(reader) as SlicesDesc7; - // console.log(require('util').inspect(desc, false, 99, true)); - - if (!target.slices) target.slices = []; - target.slices.push({ - groupName: desc.baseName, - bounds: boundsFromBounds(desc.bounds), - slices: desc.slices.map(s => ({ - name: '', - id: s.sliceID, - groupId: s.groupID, - associatedLayerId: 0, - origin: ESliceOrigin.decode(s.origin), - type: ESliceType.decode(s.Type), - bounds: boundsFromBounds(s.bounds), - url: s.url, - target: s.null, - message: s.Msge, - altTag: s.altTag, - cellTextIsHTML: s.cellTextIsHTML, - cellText: s.cellText, - horizontalAlignment: ESliceHorzAlign.decode(s.horzAlign), - verticalAlignment: ESliceVertAlign.decode(s.vertAlign), - backgroundColorType: ESliceBGColorType.decode(s.bgColorType), - backgroundColor: s.bgColor ? { r: s.bgColor['Rd '], g: s.bgColor['Grn '], b: s.bgColor['Bl '], a: s.bgColor.alpha } : { r: 0, g: 0, b: 0, a: 0 }, - topOutset: s.topOutset || 0, - leftOutset: s.leftOutset || 0, - bottomOutset: s.bottomOutset || 0, - rightOutset: s.rightOutset || 0, - })), - }); - } else { - throw new Error(`Invalid slices version (${version})`); - } - }, - (writer, target, index) => { - const { bounds, groupName, slices } = target.slices![index]; - - writeUint32(writer, 6); // version - writeInt32(writer, bounds.top); - writeInt32(writer, bounds.left); - writeInt32(writer, bounds.bottom); - writeInt32(writer, bounds.right); - writeUnicodeString(writer, groupName); - writeUint32(writer, slices.length); - - for (let i = 0; i < slices.length; i++) { - const slice = slices[i]; - let { a, r, g, b } = slice.backgroundColor; - - if (slice.backgroundColorType === 'none') { - a = r = g = b = 0; - } else if (slice.backgroundColorType === 'matte') { - a = 0; - r = g = b = 255; - } - - writeUint32(writer, slice.id); - writeUint32(writer, slice.groupId); - writeUint32(writer, sliceOrigins.indexOf(slice.origin)); - if (slice.origin === 'layer') writeUint32(writer, slice.associatedLayerId); - writeUnicodeString(writer, slice.name); - writeUint32(writer, sliceTypes.indexOf(slice.type)); - writeInt32(writer, slice.bounds.top); - writeInt32(writer, slice.bounds.left); - writeInt32(writer, slice.bounds.bottom); - writeInt32(writer, slice.bounds.right); - writeUnicodeString(writer, slice.url); - writeUnicodeString(writer, slice.target); - writeUnicodeString(writer, slice.message); - writeUnicodeString(writer, slice.altTag); - writeUint8(writer, slice.cellTextIsHTML ? 1 : 0); - writeUnicodeString(writer, slice.cellText); - writeUint32(writer, sliceAlignments.indexOf(slice.horizontalAlignment)); - writeUint32(writer, sliceAlignments.indexOf(slice.verticalAlignment)); - writeUint8(writer, a); - writeUint8(writer, r); - writeUint8(writer, g); - writeUint8(writer, b); - } - - const desc: SlicesDesc = { - bounds: boundsToBounds(bounds), - slices: [], - }; - - slices.forEach(s => { - const slice: SlicesSliceDesc = { - sliceID: s.id, - groupID: s.groupId, - origin: ESliceOrigin.encode(s.origin), - Type: ESliceType.encode(s.type), - bounds: boundsToBounds(s.bounds), - ...(s.name ? { 'Nm ': s.name } : {}), - url: s.url, - null: s.target, - Msge: s.message, - altTag: s.altTag, - cellTextIsHTML: s.cellTextIsHTML, - cellText: s.cellText, - horzAlign: ESliceHorzAlign.encode(s.horizontalAlignment), - vertAlign: ESliceVertAlign.encode(s.verticalAlignment), - bgColorType: ESliceBGColorType.encode(s.backgroundColorType), - }; - - if (s.backgroundColorType === 'color') { - const { r, g, b, a } = s.backgroundColor; - slice.bgColor = { 'Rd ': r, 'Grn ': g, 'Bl ': b, alpha: a }; - } - - slice.topOutset = s.topOutset || 0; - slice.leftOutset = s.leftOutset || 0; - slice.bottomOutset = s.bottomOutset || 0; - slice.rightOutset = s.rightOutset || 0; - desc.slices.push(slice); - }); - - writeVersionAndDescriptor(writer, '', 'null', desc, 'slices'); - }, -); - -addHandler( - 1064, - target => target.pixelAspectRatio !== undefined, - (reader, target) => { - if (readUint32(reader) > 2) throw new Error('Invalid pixelAspectRatio version'); - target.pixelAspectRatio = { aspect: readFloat64(reader) }; - }, - (writer, target) => { - writeUint32(writer, 2); // version - writeFloat64(writer, target.pixelAspectRatio!.aspect); - }, -); - -addHandler( - 1041, - target => target.iccUntaggedProfile !== undefined, - (reader, target) => { - target.iccUntaggedProfile = !!readUint8(reader); - }, - (writer, target) => { - writeUint8(writer, target.iccUntaggedProfile ? 1 : 0); - }, -); - -MOCK_HANDLERS && addHandler( - 1039, // ICC Profile - target => (target as any)._ir1039 !== undefined, - (reader, target, left) => { - // TODO: this is raw bytes, just return as a byte array - LOG_MOCK_HANDLERS && console.log('image resource 1039', left()); - (target as any)._ir1039 = readBytes(reader, left()); - }, - (writer, target) => { - writeBytes(writer, (target as any)._ir1039); - }, -); - -addHandler( - 1044, - target => target.idsSeedNumber !== undefined, - (reader, target) => target.idsSeedNumber = readUint32(reader), - (writer, target) => writeUint32(writer, target.idsSeedNumber!), -); - -addHandler( - 1036, - target => target.thumbnail !== undefined || target.thumbnailRaw !== undefined, - (reader, target, left, options) => { - const format = readUint32(reader); // 1 = kJpegRGB, 0 = kRawRGB - const width = readUint32(reader); - const height = readUint32(reader); - readUint32(reader); // widthBytes = (width * bits_per_pixel + 31) / 32 * 4. - readUint32(reader); // totalSize = widthBytes * height * planes - readUint32(reader); // sizeAfterCompression - const bitsPerPixel = readUint16(reader); // 24 - const planes = readUint16(reader); // 1 - - if (format !== 1 || bitsPerPixel !== 24 || planes !== 1) { - options.logMissingFeatures && console.log(`Invalid thumbnail data (format: ${format}, bitsPerPixel: ${bitsPerPixel}, planes: ${planes})`); - skipBytes(reader, left()); - return; - } - - const size = left(); - const data = readBytes(reader, size); - - if (options.useRawThumbnail) { - target.thumbnailRaw = { width, height, data }; - } else if (data.byteLength) { - target.thumbnail = createCanvasFromData(data); - } - }, - (writer, target) => { - let width = 0; - let height = 0; - let data: Uint8Array; - - if (target.thumbnailRaw) { - width = target.thumbnailRaw.width; - height = target.thumbnailRaw.height; - data = target.thumbnailRaw.data; - } else { - const dataUrl = target.thumbnail!.toDataURL('image/jpeg', 1)?.substring('data:image/jpeg;base64,'.length); - - if (dataUrl) { - width = target.thumbnail!.width; - height = target.thumbnail!.height; - data = toByteArray(dataUrl); - } else { - data = new Uint8Array(0); - } - } - - const bitsPerPixel = 24; - const widthBytes = Math.floor((width * bitsPerPixel + 31) / 32) * 4; - const planes = 1; - const totalSize = widthBytes * height * planes; - const sizeAfterCompression = data.length; - - writeUint32(writer, 1); // 1 = kJpegRGB - writeUint32(writer, width); - writeUint32(writer, height); - writeUint32(writer, widthBytes); - writeUint32(writer, totalSize); - writeUint32(writer, sizeAfterCompression); - writeUint16(writer, bitsPerPixel); - writeUint16(writer, planes); - writeBytes(writer, data); - }, -); - -addHandler( - 1057, - target => target.versionInfo !== undefined, - (reader, target, left) => { - const version = readUint32(reader); - if (version !== 1) throw new Error('Invalid versionInfo version'); - - target.versionInfo = { - hasRealMergedData: !!readUint8(reader), - writerName: readUnicodeString(reader), - readerName: readUnicodeString(reader), - fileVersion: readUint32(reader), - }; - - skipBytes(reader, left()); - }, - (writer, target) => { - const versionInfo = target.versionInfo!; - writeUint32(writer, 1); // version - writeUint8(writer, versionInfo.hasRealMergedData ? 1 : 0); - writeUnicodeString(writer, versionInfo.writerName); - writeUnicodeString(writer, versionInfo.readerName); - writeUint32(writer, versionInfo.fileVersion); - }, -); - -MOCK_HANDLERS && addHandler( - 1058, // EXIF data 1. - target => (target as any)._ir1058 !== undefined, - (reader, target, left) => { - LOG_MOCK_HANDLERS && console.log('image resource 1058', left()); - (target as any)._ir1058 = readBytes(reader, left()); - }, - (writer, target) => { - writeBytes(writer, (target as any)._ir1058); - }, -); - -addHandler( - 7000, - target => target.imageReadyVariables !== undefined, - (reader, target, left) => { - target.imageReadyVariables = readUtf8String(reader, left()); - }, - (writer, target) => { - writeUtf8String(writer, target.imageReadyVariables!); - }, -); - -addHandler( - 7001, - target => target.imageReadyDataSets !== undefined, - (reader, target, left) => { - target.imageReadyDataSets = readUtf8String(reader, left()); - }, - (writer, target) => { - writeUtf8String(writer, target.imageReadyDataSets!); - }, -); - -interface Descriptor1088 { - 'null': string[]; -} - -addHandler( - 1088, - target => target.pathSelectionState !== undefined, - (reader, target, _left) => { - const desc: Descriptor1088 = readVersionAndDescriptor(reader); - // console.log(require('util').inspect(desc, false, 99, true)); - target.pathSelectionState = desc['null']; - }, - (writer, target) => { - const desc: Descriptor1088 = { 'null': target.pathSelectionState! }; - writeVersionAndDescriptor(writer, '', 'null', desc); - }, -); - -MOCK_HANDLERS && addHandler( - 1025, - target => (target as any)._ir1025 !== undefined, - (reader, target, left) => { - LOG_MOCK_HANDLERS && console.log('image resource 1025', left()); - (target as any)._ir1025 = readBytes(reader, left()); - }, - (writer, target) => { - writeBytes(writer, (target as any)._ir1025); - }, -); - -const FrmD = createEnum<'auto' | 'none' | 'dispose'>('FrmD', '', { - auto: 'Auto', - none: 'None', - dispose: 'Disp', -}); - -interface AnimationFrameDescriptor { - FrID: number; - FrDl?: number; - FrDs: string; - FrGA?: number; -} - -interface AnimationDescriptor { - FsID: number; - AFrm?: number; - FsFr: number[]; - LCnt: number; -} - -interface AnimationsDescriptor { - AFSt?: number; - FrIn: AnimationFrameDescriptor[]; - FSts: AnimationDescriptor[]; -} - -addHandler( - 4000, // Plug-In resource(s) - target => target.animations !== undefined, - (reader, target, left, { logMissingFeatures, logDevFeatures }) => { - const key = readSignature(reader); - - if (key === 'mani') { - checkSignature(reader, 'IRFR'); - readSection(reader, 1, left => { - while (left()) { - checkSignature(reader, '8BIM'); - const key = readSignature(reader); - - readSection(reader, 1, left => { - if (key === 'AnDs') { - const desc = readVersionAndDescriptor(reader) as AnimationsDescriptor; - target.animations = { - // desc.AFSt ??? - frames: desc.FrIn.map(x => ({ - id: x.FrID, - delay: (x.FrDl || 0) / 100, - dispose: x.FrDs ? FrmD.decode(x.FrDs) : 'auto', // missing == auto - // x.FrGA ??? - })), - animations: desc.FSts.map(x => ({ - id: x.FsID, - frames: x.FsFr, - repeats: x.LCnt, - activeFrame: x.AFrm || 0, - })), - }; - - // console.log('#4000 AnDs', require('util').inspect(desc, false, 99, true)); - // console.log('#4000 AnDs:result', require('util').inspect(target.animations, false, 99, true)); - } else if (key === 'Roll') { - const bytes = readBytes(reader, left()); - logDevFeatures && console.log('#4000 Roll', bytes); - } else { - logMissingFeatures && console.log('Unhandled subsection in #4000', key); - } - }); - } - }); - } else if (key === 'mopt') { - const bytes = readBytes(reader, left()); - logDevFeatures && console.log('#4000 mopt', bytes); - } else { - logMissingFeatures && console.log('Unhandled key in #4000:', key); - } - }, - (writer, target) => { - if (target.animations) { - writeSignature(writer, 'mani'); - writeSignature(writer, 'IRFR'); - writeSection(writer, 1, () => { - writeSignature(writer, '8BIM'); - writeSignature(writer, 'AnDs'); - writeSection(writer, 1, () => { - const desc: AnimationsDescriptor = { - // AFSt: 0, // ??? - FrIn: [], - FSts: [], - }; - - for (let i = 0; i < target.animations!.frames.length; i++) { - const f = target.animations!.frames[i]; - const frame: AnimationFrameDescriptor = { - FrID: f.id, - } as any; - if (f.delay) frame.FrDl = (f.delay * 100) | 0; - frame.FrDs = FrmD.encode(f.dispose); - // if (i === 0) frame.FrGA = 30; // ??? - desc.FrIn.push(frame); - } - - for (let i = 0; i < target.animations!.animations.length; i++) { - const a = target.animations!.animations[i]; - const anim: AnimationDescriptor = { - FsID: a.id, - AFrm: a.activeFrame! | 0, - FsFr: a.frames, - LCnt: a.repeats! | 0, - }; - desc.FSts.push(anim); - } - - writeVersionAndDescriptor(writer, '', 'null', desc); - }); - - // writeSignature(writer, '8BIM'); - // writeSignature(writer, 'Roll'); - // writeSection(writer, 1, () => { - // writeZeros(writer, 8); - // }); - }); - } - }, -); - -// TODO: Unfinished -MOCK_HANDLERS && addHandler( - 4001, // Plug-In resource(s) - target => (target as any)._ir4001 !== undefined, - (reader, target, left, { logMissingFeatures, logDevFeatures }) => { - if (MOCK_HANDLERS) { - LOG_MOCK_HANDLERS && console.log('image resource 4001', left()); - (target as any)._ir4001 = readBytes(reader, left()); - return; - } - - const key = readSignature(reader); - - if (key === 'mfri') { - const version = readUint32(reader); - if (version !== 2) throw new Error('Invalid mfri version'); - - const length = readUint32(reader); - const bytes = readBytes(reader, length); - logDevFeatures && console.log('mfri', bytes); - } else if (key === 'mset') { - const desc = readVersionAndDescriptor(reader); - logDevFeatures && console.log('mset', desc); - } else { - logMissingFeatures && console.log('Unhandled key in #4001', key); - } - }, - (writer, target) => { - writeBytes(writer, (target as any)._ir4001); - }, -); - -// TODO: Unfinished -MOCK_HANDLERS && addHandler( - 4002, // Plug-In resource(s) - target => (target as any)._ir4002 !== undefined, - (reader, target, left) => { - LOG_MOCK_HANDLERS && console.log('image resource 4002', left()); - (target as any)._ir4002 = readBytes(reader, left()); - }, - (writer, target) => { - writeBytes(writer, (target as any)._ir4002); - }, -); diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/index.ts b/npm-packages/mac-v2.4.x/ag-psd/src/index.ts deleted file mode 100644 index f7419dc..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/index.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Psd, ReadOptions, WriteOptions } from './psd'; -import { PsdWriter, writePsd as writePsdInternal, getWriterBuffer, createWriter, getWriterBufferNoCopy } from './psdWriter'; -import { PsdReader, readPsd as readPsdInternal, createReader } from './psdReader'; -export * from './abr'; -export * from './csh'; -export { initializeCanvas } from './helpers'; -export * from './psd'; -import { fromByteArray } from 'base64-js'; -export { PsdReader, PsdWriter }; - -interface BufferLike { - buffer: ArrayBuffer; - byteOffset: number; - byteLength: number; -} - -export const byteArrayToBase64 = fromByteArray; - -export function readPsd(buffer: ArrayBuffer | BufferLike, options?: ReadOptions): Psd { - const reader = 'buffer' in buffer ? - createReader(buffer.buffer, buffer.byteOffset, buffer.byteLength) : - createReader(buffer); - return readPsdInternal(reader, options); -} - -export function writePsd(psd: Psd, options?: WriteOptions): ArrayBuffer { - const writer = createWriter(); - writePsdInternal(writer, psd, options); - return getWriterBuffer(writer); -} - -export function writePsdUint8Array(psd: Psd, options?: WriteOptions): Uint8Array { - const writer = createWriter(); - writePsdInternal(writer, psd, options); - return getWriterBufferNoCopy(writer); -} - -export function writePsdBuffer(psd: Psd, options?: WriteOptions): Buffer { - if (typeof Buffer === 'undefined') { - throw new Error('Buffer not supported on this platform'); - } - - return Buffer.from(writePsdUint8Array(psd, options)); -} diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/initializeCanvas.ts b/npm-packages/mac-v2.4.x/ag-psd/src/initializeCanvas.ts deleted file mode 100644 index eb82cd7..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/initializeCanvas.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { createCanvas } from 'canvas'; -import { initializeCanvas } from './index'; -import { decodeJpeg } from './jpeg'; - -function createCanvasFromData(data: Uint8Array) { - const canvas = createCanvas(100, 100); - - try { - const context = canvas.getContext('2d')!; - const imageData = decodeJpeg(data, (w, h) => context.createImageData(w, h)); - canvas.width = imageData.width; - canvas.height = imageData.height; - context.putImageData(imageData, 0, 0); - } catch (e: any) { - console.error('JPEG decompression error', e.message); - } - - return canvas; -} - -initializeCanvas(createCanvas, createCanvasFromData); - -export function initialize() { - initializeCanvas(createCanvas, createCanvasFromData); -} diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/jpeg.ts b/npm-packages/mac-v2.4.x/ag-psd/src/jpeg.ts deleted file mode 100644 index ab5ce40..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/jpeg.ts +++ /dev/null @@ -1,1166 +0,0 @@ -// based on https://github.com/jpeg-js/jpeg-js -/* - Copyright 2011 notmasteryet - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -interface DecodedComponent { - lines: Uint8Array[]; - scaleX: number; - scaleY: number; -} - -interface Decoded { - width: number; - height: number; - comments: string[]; - exifBuffer: Uint8Array | undefined; - jfif: any; - adobe: any; - components: DecodedComponent[]; -} - -interface Component { - h: number; - v: number; - blocksPerLine: number; - blocksPerColumn: number; - blocks: Int32Array[][]; - pred: number; // ??? - quantizationIdx?: number; - quantizationTable?: Int32Array; - huffmanTableDC?: number[] | number[][]; - huffmanTableAC?: number[] | number[][]; -} - -interface Frame { - extended: boolean; - progressive: boolean; - precision: number; - scanLines: number; - samplesPerLine: number; - components: { [key: number]: Component; }; - componentsOrder: number[]; - maxH: number; - maxV: number; - mcusPerLine: number; - mcusPerColumn: number; -} - -const dctZigZag = new Int32Array([ - 0, - 1, 8, - 16, 9, 2, - 3, 10, 17, 24, - 32, 25, 18, 11, 4, - 5, 12, 19, 26, 33, 40, - 48, 41, 34, 27, 20, 13, 6, - 7, 14, 21, 28, 35, 42, 49, 56, - 57, 50, 43, 36, 29, 22, 15, - 23, 30, 37, 44, 51, 58, - 59, 52, 45, 38, 31, - 39, 46, 53, 60, - 61, 54, 47, - 55, 62, - 63 -]); -const dctCos1 = 4017; // cos(pi/16) -const dctSin1 = 799; // sin(pi/16) -const dctCos3 = 3406; // cos(3*pi/16) -const dctSin3 = 2276; // sin(3*pi/16) -const dctCos6 = 1567; // cos(6*pi/16) -const dctSin6 = 3784; // sin(6*pi/16) -const dctSqrt2 = 5793; // sqrt(2) -const dctSqrt1d2 = 2896; // sqrt(2) / 2 - -const maxResolutionInMP = 100; // Don't decode more than 100 megapixels -const maxMemoryUsageBytes = 64 * 1024 * 1024; // Don't decode if memory footprint is more than 64MB -let totalBytesAllocated = 0; // avoid unexpected OOMs from untrusted content. - -function requestMemoryAllocation(increaseAmount: number) { - const totalMemoryImpactBytes = totalBytesAllocated + increaseAmount; - if (totalMemoryImpactBytes > maxMemoryUsageBytes) { - const exceededAmount = Math.ceil((totalMemoryImpactBytes - maxMemoryUsageBytes) / 1024 / 1024); - throw new Error(`Max memory limit exceeded by at least ${exceededAmount}MB`); - } - - totalBytesAllocated = totalMemoryImpactBytes; -} - -function buildHuffmanTable(codeLengths: Uint8Array, values: Uint8Array) { - let length = 16; - - while (length > 0 && !codeLengths[length - 1]) length--; - - interface Code { - children: number[] | number[][]; - index: number; - } - - const code: Code[] = [{ children: [], index: 0 }]; - let k = 0; - let p = code[0]; - - for (let i = 0; i < length; i++) { - for (let j = 0; j < codeLengths[i]; j++) { - p = code.pop()!; - p.children[p.index] = values[k]; - while (p.index > 0) { - if (code.length === 0) throw new Error('Could not recreate Huffman Table'); - p = code.pop()!; - } - p.index++; - code.push(p); - while (code.length <= i) { - const q: Code = { children: [], index: 0 }; - code.push(q); - p.children[p.index] = q.children as number[]; - p = q; - } - k++; - } - if (i + 1 < length) { - // p here points to last code - const q: Code = { children: [], index: 0 }; - code.push(q); - p.children[p.index] = q.children as number[]; - p = q; - } - } - - return code[0].children; -} - -function decodeScan( - data: Uint8Array, offset: number, frame: Frame, components: Component[], resetInterval: number, - spectralStart: number, spectralEnd: number, successivePrev: number, successive: number -) { - const mcusPerLine = frame.mcusPerLine; - const progressive = frame.progressive; - const startOffset = offset; - let bitsData = 0; - let bitsCount = 0; - - function readBit() { - if (bitsCount > 0) { - bitsCount--; - return (bitsData >> bitsCount) & 1; - } - - bitsData = data[offset++]; - - if (bitsData == 0xFF) { - const nextByte = data[offset++]; - if (nextByte) throw new Error(`unexpected marker: ${((bitsData << 8) | nextByte).toString(16)}`); - // unstuff 0 - } - - bitsCount = 7; - return bitsData >>> 7; - } - - function decodeHuffman(tree: number[] | number[][]) { - let node: number | number[] | number[][] = tree; - - while (true) { - node = node[readBit()]; - if (typeof node === 'number') return node; - if (node === undefined) throw new Error('invalid huffman sequence'); - } - } - - function receive(length: number) { - let n = 0; - while (length > 0) { - n = (n << 1) | readBit(); - length--; - } - return n; - } - - function receiveAndExtend(length: number) { - let n = receive(length); - if (n >= 1 << (length - 1)) return n; - return n + (-1 << length) + 1; - } - - type DecodeFn = (component: Component, zz: Int32Array) => void; - - function decodeBaseline(component: Component, zz: Int32Array) { - const t = decodeHuffman(component.huffmanTableDC!); - const diff = t === 0 ? 0 : receiveAndExtend(t); - zz[0] = (component.pred += diff); - let k = 1; - - while (k < 64) { - const rs = decodeHuffman(component.huffmanTableAC!); - const s = rs & 15; - const r = rs >> 4; - if (s === 0) { - if (r < 15) break; - k += 16; - continue; - } - k += r; - const z = dctZigZag[k]; - zz[z] = receiveAndExtend(s); - k++; - } - } - - function decodeDCFirst(component: Component, zz: Int32Array) { - const t = decodeHuffman(component.huffmanTableDC!); - const diff = t === 0 ? 0 : (receiveAndExtend(t) << successive); - zz[0] = (component.pred += diff); - } - - function decodeDCSuccessive(_component: Component, zz: Int32Array) { - zz[0] |= readBit() << successive; - } - - let eobrun = 0; - - function decodeACFirst(component: Component, zz: Int32Array) { - if (eobrun > 0) { - eobrun--; - return; - } - let k = spectralStart, e = spectralEnd; - while (k <= e) { - const rs = decodeHuffman(component.huffmanTableAC!); - const s = rs & 15; - const r = rs >> 4; - if (s === 0) { - if (r < 15) { - eobrun = receive(r) + (1 << r) - 1; - break; - } - k += 16; - continue; - } - k += r; - const z = dctZigZag[k]; - zz[z] = receiveAndExtend(s) * (1 << successive); - k++; - } - } - - let successiveACState = 0; - let successiveACNextValue = 0; - - function decodeACSuccessive(component: Component, zz: Int32Array) { - let k = spectralStart; - let e = spectralEnd; - let r = 0; - - while (k <= e) { - const z = dctZigZag[k]; - const direction = zz[z] < 0 ? -1 : 1; - - switch (successiveACState) { - case 0: // initial state - const rs = decodeHuffman(component.huffmanTableAC!); - const s = rs & 15; - r = rs >> 4; // this was new variable in old code - if (s === 0) { - if (r < 15) { - eobrun = receive(r) + (1 << r); - successiveACState = 4; - } else { - r = 16; - successiveACState = 1; - } - } else { - if (s !== 1) throw new Error('invalid ACn encoding'); - successiveACNextValue = receiveAndExtend(s); - successiveACState = r ? 2 : 3; - } - continue; - case 1: // skipping r zero items - case 2: - if (zz[z]) { - zz[z] += (readBit() << successive) * direction; - } else { - r--; - if (r === 0) successiveACState = successiveACState == 2 ? 3 : 0; - } - break; - case 3: // set value for a zero item - if (zz[z]) { - zz[z] += (readBit() << successive) * direction; - } else { - zz[z] = successiveACNextValue << successive; - successiveACState = 0; - } - break; - case 4: // eob - if (zz[z]) { - zz[z] += (readBit() << successive) * direction; - } - break; - } - k++; - } - - if (successiveACState === 4) { - eobrun--; - if (eobrun === 0) successiveACState = 0; - } - } - - function decodeMcu(component: Component, decode: DecodeFn, mcu: number, row: number, col: number) { - const mcuRow = (mcu / mcusPerLine) | 0; - const mcuCol = mcu % mcusPerLine; - const blockRow = mcuRow * component.v + row; - const blockCol = mcuCol * component.h + col; - // If the block is missing, just skip it. - if (component.blocks[blockRow] === undefined) return; - decode(component, component.blocks[blockRow][blockCol]); - } - - function decodeBlock(component: Component, decode: DecodeFn, mcu: number) { - const blockRow = (mcu / component.blocksPerLine) | 0; - const blockCol = mcu % component.blocksPerLine; - // If the block is missing, just skip it. - if (component.blocks[blockRow] === undefined) return; - decode(component, component.blocks[blockRow][blockCol]); - } - - const componentsLength = components.length; - let component: Component; - let decodeFn: DecodeFn; - - if (progressive) { - if (spectralStart === 0) { - decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive; - } else { - decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive; - } - } else { - decodeFn = decodeBaseline; - } - - let mcu = 0; - let mcuExpected: number; - - if (componentsLength == 1) { - mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn; - } else { - mcuExpected = mcusPerLine * frame.mcusPerColumn; - } - - if (!resetInterval) resetInterval = mcuExpected; - - let h: number; - let v: number; - let marker: number; - - while (mcu < mcuExpected) { - // reset interval stuff - for (let i = 0; i < componentsLength; i++) components[i].pred = 0; - eobrun = 0; - - if (componentsLength == 1) { - component = components[0]; - for (let n = 0; n < resetInterval; n++) { - decodeBlock(component, decodeFn, mcu); - mcu++; - } - } else { - for (let n = 0; n < resetInterval; n++) { - for (let i = 0; i < componentsLength; i++) { - component = components[i]; - h = component.h; - v = component.v; - for (let j = 0; j < v; j++) { - for (let k = 0; k < h; k++) { - decodeMcu(component, decodeFn, mcu, j, k); - } - } - } - mcu++; - - // If we've reached our expected MCU's, stop decoding - if (mcu === mcuExpected) break; - } - } - - if (mcu === mcuExpected) { - // Skip trailing bytes at the end of the scan - until we reach the next marker - do { - if (data[offset] === 0xFF) { - if (data[offset + 1] !== 0x00) { - break; - } - } - offset += 1; - } while (offset < data.length - 2); - } - - // find marker - bitsCount = 0; - marker = (data[offset] << 8) | data[offset + 1]; - - if (marker < 0xFF00) throw new Error('marker was not found'); - - if (marker >= 0xFFD0 && marker <= 0xFFD7) { // RSTx - offset += 2; - } else { - break; - } - } - - return offset - startOffset; -} - -function buildComponentData(component: Component) { - const lines = []; - const blocksPerLine = component.blocksPerLine; - const blocksPerColumn = component.blocksPerColumn; - const samplesPerLine = blocksPerLine << 3; - // Only 1 used per invocation of this function and garbage collected after invocation, so no need to account for its memory footprint. - const R = new Int32Array(64); - const r = new Uint8Array(64); - - // A port of poppler's IDCT method which in turn is taken from: - // Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz, - // "Practical Fast 1-D DCT Algorithms with 11 Multiplications", - // IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989, - // 988-991. - function quantizeAndInverse(zz: Int32Array, dataOut: Uint8Array, dataIn: Int32Array) { - const qt = component.quantizationTable!; - const p = dataIn; - - // dequant - for (let i = 0; i < 64; i++) { - p[i] = zz[i] * qt[i]; - } - - // inverse DCT on rows - for (let i = 0; i < 8; ++i) { - const row = 8 * i; - - // check for all-zero AC coefficients - if (p[1 + row] == 0 && p[2 + row] == 0 && p[3 + row] == 0 && - p[4 + row] == 0 && p[5 + row] == 0 && p[6 + row] == 0 && - p[7 + row] == 0) { - const t = (dctSqrt2 * p[0 + row] + 512) >> 10; - p[0 + row] = t; - p[1 + row] = t; - p[2 + row] = t; - p[3 + row] = t; - p[4 + row] = t; - p[5 + row] = t; - p[6 + row] = t; - p[7 + row] = t; - continue; - } - - // stage 4 - let v0 = (dctSqrt2 * p[0 + row] + 128) >> 8; - let v1 = (dctSqrt2 * p[4 + row] + 128) >> 8; - let v2 = p[2 + row]; - let v3 = p[6 + row]; - let v4 = (dctSqrt1d2 * (p[1 + row] - p[7 + row]) + 128) >> 8; - let v7 = (dctSqrt1d2 * (p[1 + row] + p[7 + row]) + 128) >> 8; - let v5 = p[3 + row] << 4; - let v6 = p[5 + row] << 4; - - // stage 3 - let t = (v0 - v1 + 1) >> 1; - v0 = (v0 + v1 + 1) >> 1; - v1 = t; - t = (v2 * dctSin6 + v3 * dctCos6 + 128) >> 8; - v2 = (v2 * dctCos6 - v3 * dctSin6 + 128) >> 8; - v3 = t; - t = (v4 - v6 + 1) >> 1; - v4 = (v4 + v6 + 1) >> 1; - v6 = t; - t = (v7 + v5 + 1) >> 1; - v5 = (v7 - v5 + 1) >> 1; - v7 = t; - - // stage 2 - t = (v0 - v3 + 1) >> 1; - v0 = (v0 + v3 + 1) >> 1; - v3 = t; - t = (v1 - v2 + 1) >> 1; - v1 = (v1 + v2 + 1) >> 1; - v2 = t; - t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12; - v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12; - v7 = t; - t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12; - v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12; - v6 = t; - - // stage 1 - p[0 + row] = v0 + v7; - p[7 + row] = v0 - v7; - p[1 + row] = v1 + v6; - p[6 + row] = v1 - v6; - p[2 + row] = v2 + v5; - p[5 + row] = v2 - v5; - p[3 + row] = v3 + v4; - p[4 + row] = v3 - v4; - } - - // inverse DCT on columns - for (let i = 0; i < 8; ++i) { - const col = i; - - // check for all-zero AC coefficients - if (p[1 * 8 + col] == 0 && p[2 * 8 + col] == 0 && p[3 * 8 + col] == 0 && - p[4 * 8 + col] == 0 && p[5 * 8 + col] == 0 && p[6 * 8 + col] == 0 && - p[7 * 8 + col] == 0) { - const t = (dctSqrt2 * dataIn[i + 0] + 8192) >> 14; - p[0 * 8 + col] = t; - p[1 * 8 + col] = t; - p[2 * 8 + col] = t; - p[3 * 8 + col] = t; - p[4 * 8 + col] = t; - p[5 * 8 + col] = t; - p[6 * 8 + col] = t; - p[7 * 8 + col] = t; - continue; - } - - // stage 4 - let v0 = (dctSqrt2 * p[0 * 8 + col] + 2048) >> 12; - let v1 = (dctSqrt2 * p[4 * 8 + col] + 2048) >> 12; - let v2 = p[2 * 8 + col]; - let v3 = p[6 * 8 + col]; - let v4 = (dctSqrt1d2 * (p[1 * 8 + col] - p[7 * 8 + col]) + 2048) >> 12; - let v7 = (dctSqrt1d2 * (p[1 * 8 + col] + p[7 * 8 + col]) + 2048) >> 12; - let v5 = p[3 * 8 + col]; - let v6 = p[5 * 8 + col]; - - // stage 3 - let t = (v0 - v1 + 1) >> 1; - v0 = (v0 + v1 + 1) >> 1; - v1 = t; - t = (v2 * dctSin6 + v3 * dctCos6 + 2048) >> 12; - v2 = (v2 * dctCos6 - v3 * dctSin6 + 2048) >> 12; - v3 = t; - t = (v4 - v6 + 1) >> 1; - v4 = (v4 + v6 + 1) >> 1; - v6 = t; - t = (v7 + v5 + 1) >> 1; - v5 = (v7 - v5 + 1) >> 1; - v7 = t; - - // stage 2 - t = (v0 - v3 + 1) >> 1; - v0 = (v0 + v3 + 1) >> 1; - v3 = t; - t = (v1 - v2 + 1) >> 1; - v1 = (v1 + v2 + 1) >> 1; - v2 = t; - t = (v4 * dctSin3 + v7 * dctCos3 + 2048) >> 12; - v4 = (v4 * dctCos3 - v7 * dctSin3 + 2048) >> 12; - v7 = t; - t = (v5 * dctSin1 + v6 * dctCos1 + 2048) >> 12; - v5 = (v5 * dctCos1 - v6 * dctSin1 + 2048) >> 12; - v6 = t; - - // stage 1 - p[0 * 8 + col] = v0 + v7; - p[7 * 8 + col] = v0 - v7; - p[1 * 8 + col] = v1 + v6; - p[6 * 8 + col] = v1 - v6; - p[2 * 8 + col] = v2 + v5; - p[5 * 8 + col] = v2 - v5; - p[3 * 8 + col] = v3 + v4; - p[4 * 8 + col] = v3 - v4; - } - - // convert to 8-bit integers - for (let i = 0; i < 64; ++i) { - const sample = 128 + ((p[i] + 8) >> 4); - dataOut[i] = sample < 0 ? 0 : sample > 0xFF ? 0xFF : sample; - } - } - - requestMemoryAllocation(samplesPerLine * blocksPerColumn * 8); - - for (let blockRow = 0; blockRow < blocksPerColumn; blockRow++) { - const scanLine = blockRow << 3; - - for (let i = 0; i < 8; i++) - lines.push(new Uint8Array(samplesPerLine)); - - for (let blockCol = 0; blockCol < blocksPerLine; blockCol++) { - quantizeAndInverse(component.blocks[blockRow][blockCol], r, R); - - let offset = 0; - const sample = blockCol << 3; - for (let j = 0; j < 8; j++) { - const line = lines[scanLine + j]; - for (let i = 0; i < 8; i++) - line[sample + i] = r[offset++]; - } - } - } - return lines; -} - -function clampTo8bit(a: number) { - return a < 0 ? 0 : a > 255 ? 255 : a; -} - -function parse(data: Uint8Array) { - const self: Decoded = { - width: 0, - height: 0, - comments: [], - adobe: undefined, - components: [], - exifBuffer: undefined, - jfif: undefined, - }; - - const maxResolutionInPixels = maxResolutionInMP * 1000 * 1000; - let offset = 0; - - function readUint16() { - const value = (data[offset] << 8) | data[offset + 1]; - offset += 2; - return value; - } - - function readDataBlock() { - const length = readUint16(); - const array = data.subarray(offset, offset + length - 2); - offset += array.length; - return array; - } - - function prepareComponents(frame: Frame) { - let maxH = 0, maxV = 0; - - for (let componentId in frame.components) { - if (frame.components.hasOwnProperty(componentId)) { - const component = frame.components[componentId]; - if (maxH < component.h) maxH = component.h; - if (maxV < component.v) maxV = component.v; - } - } - - const mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / maxH); - const mcusPerColumn = Math.ceil(frame.scanLines / 8 / maxV); - - for (let componentId in frame.components) { - if (frame.components.hasOwnProperty(componentId)) { - const component = frame.components[componentId]; - const blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / maxH); - const blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / maxV); - const blocksPerLineForMcu = mcusPerLine * component.h; - const blocksPerColumnForMcu = mcusPerColumn * component.v; - const blocksToAllocate = blocksPerColumnForMcu * blocksPerLineForMcu; - const blocks: Int32Array[][] = []; - - // Each block is a Int32Array of length 64 (4 x 64 = 256 bytes) - requestMemoryAllocation(blocksToAllocate * 256); - - for (let i = 0; i < blocksPerColumnForMcu; i++) { - const row: Int32Array[] = []; - for (let j = 0; j < blocksPerLineForMcu; j++) { - row.push(new Int32Array(64)); - } - blocks.push(row); - } - component.blocksPerLine = blocksPerLine; - component.blocksPerColumn = blocksPerColumn; - component.blocks = blocks; - } - } - - frame.maxH = maxH; - frame.maxV = maxV; - frame.mcusPerLine = mcusPerLine; - frame.mcusPerColumn = mcusPerColumn; - } - - let jfif = null; - let adobe = null; - let frame: Frame | undefined = undefined; - let resetInterval = 0; - let quantizationTables = []; - let frames: Frame[] = []; - let huffmanTablesAC: (number[] | number[][])[] = []; - let huffmanTablesDC: (number[] | number[][])[] = []; - let fileMarker = readUint16(); - let malformedDataOffset = -1; - - if (fileMarker != 0xFFD8) { // SOI (Start of Image) - throw new Error('SOI not found'); - } - - fileMarker = readUint16(); - while (fileMarker != 0xFFD9) { // EOI (End of image) - switch (fileMarker) { - case 0xFF00: break; - case 0xFFE0: // APP0 (Application Specific) - case 0xFFE1: // APP1 - case 0xFFE2: // APP2 - case 0xFFE3: // APP3 - case 0xFFE4: // APP4 - case 0xFFE5: // APP5 - case 0xFFE6: // APP6 - case 0xFFE7: // APP7 - case 0xFFE8: // APP8 - case 0xFFE9: // APP9 - case 0xFFEA: // APP10 - case 0xFFEB: // APP11 - case 0xFFEC: // APP12 - case 0xFFED: // APP13 - case 0xFFEE: // APP14 - case 0xFFEF: // APP15 - case 0xFFFE: { // COM (Comment) - const appData = readDataBlock(); - - if (fileMarker === 0xFFFE) { - let comment = ''; - for (let ii = 0; ii < appData.byteLength; ii++) { - comment += String.fromCharCode(appData[ii]); - } - self.comments.push(comment); - } - - if (fileMarker === 0xFFE0) { - if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49 && - appData[3] === 0x46 && appData[4] === 0) { // 'JFIF\x00' - jfif = { - version: { major: appData[5], minor: appData[6] }, - densityUnits: appData[7], - xDensity: (appData[8] << 8) | appData[9], - yDensity: (appData[10] << 8) | appData[11], - thumbWidth: appData[12], - thumbHeight: appData[13], - thumbData: appData.subarray(14, 14 + 3 * appData[12] * appData[13]) - }; - } - } - // TODO APP1 - Exif - if (fileMarker === 0xFFE1) { - if (appData[0] === 0x45 && - appData[1] === 0x78 && - appData[2] === 0x69 && - appData[3] === 0x66 && - appData[4] === 0) { // 'EXIF\x00' - self.exifBuffer = appData.subarray(5, appData.length); - } - } - - if (fileMarker === 0xFFEE) { - if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6F && - appData[3] === 0x62 && appData[4] === 0x65 && appData[5] === 0) { // 'Adobe\x00' - adobe = { - version: appData[6], - flags0: (appData[7] << 8) | appData[8], - flags1: (appData[9] << 8) | appData[10], - transformCode: appData[11] - }; - } - } - break; - } - case 0xFFDB: { // DQT (Define Quantization Tables) - const quantizationTablesLength = readUint16(); - const quantizationTablesEnd = quantizationTablesLength + offset - 2; - while (offset < quantizationTablesEnd) { - const quantizationTableSpec = data[offset++]; - requestMemoryAllocation(64 * 4); - const tableData = new Int32Array(64); - if ((quantizationTableSpec >> 4) === 0) { // 8 bit values - for (let j = 0; j < 64; j++) { - const z = dctZigZag[j]; - tableData[z] = data[offset++]; - } - } else if ((quantizationTableSpec >> 4) === 1) { //16 bit - for (let j = 0; j < 64; j++) { - const z = dctZigZag[j]; - tableData[z] = readUint16(); - } - } else - throw new Error('DQT: invalid table spec'); - quantizationTables[quantizationTableSpec & 15] = tableData; - } - break; - } - case 0xFFC0: // SOF0 (Start of Frame, Baseline DCT) - case 0xFFC1: // SOF1 (Start of Frame, Extended DCT) - case 0xFFC2: { // SOF2 (Start of Frame, Progressive DCT) - readUint16(); // skip data length - frame = { - extended: (fileMarker === 0xFFC1), - progressive: (fileMarker === 0xFFC2), - precision: data[offset++], - scanLines: readUint16(), - samplesPerLine: readUint16(), - components: {}, - componentsOrder: [], - maxH: 0, - maxV: 0, - mcusPerLine: 0, - mcusPerColumn: 0, - }; - - const pixelsInFrame = frame!.scanLines * frame!.samplesPerLine; - if (pixelsInFrame > maxResolutionInPixels) { - const exceededAmount = Math.ceil((pixelsInFrame - maxResolutionInPixels) / 1e6); - throw new Error(`maxResolutionInMP limit exceeded by ${exceededAmount}MP`); - } - - const componentsCount = data[offset++]; - - for (let i = 0; i < componentsCount; i++) { - const componentId = data[offset]; - const h = data[offset + 1] >> 4; - const v = data[offset + 1] & 15; - const qId = data[offset + 2]; - frame!.componentsOrder.push(componentId); - frame!.components[componentId] = { - h: h, - v: v, - quantizationIdx: qId, - blocksPerColumn: 0, - blocksPerLine: 0, - blocks: [], - pred: 0, - }; - offset += 3; - } - prepareComponents(frame!); - frames.push(frame); - break; - } - case 0xFFC4: {// DHT (Define Huffman Tables) - const huffmanLength = readUint16(); - - for (let i = 2; i < huffmanLength;) { - const huffmanTableSpec = data[offset++]; - const codeLengths = new Uint8Array(16); - let codeLengthSum = 0; - - for (let j = 0; j < 16; j++, offset++) { - codeLengthSum += (codeLengths[j] = data[offset]); - } - - requestMemoryAllocation(16 + codeLengthSum); - const huffmanValues = new Uint8Array(codeLengthSum); - - for (let j = 0; j < codeLengthSum; j++, offset++) { - huffmanValues[j] = data[offset]; - } - - i += 17 + codeLengthSum; - - const index = huffmanTableSpec & 15; - const table = (huffmanTableSpec >> 4) === 0 ? huffmanTablesDC : huffmanTablesAC; - table[index] = buildHuffmanTable(codeLengths, huffmanValues); - } - break; - } - case 0xFFDD: // DRI (Define Restart Interval) - readUint16(); // skip data length - resetInterval = readUint16(); - break; - case 0xFFDC: // Number of Lines marker - readUint16() // skip data length - readUint16() // Ignore this data since it represents the image height - break; - case 0xFFDA: { // SOS (Start of Scan) - readUint16(); // skip data length - const selectorsCount = data[offset++]; - const components: Component[] = []; - for (let i = 0; i < selectorsCount; i++) { - const component = frame!.components[data[offset++]]; - const tableSpec = data[offset++]; - component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4]; - component.huffmanTableAC = huffmanTablesAC[tableSpec & 15]; - components.push(component); - } - const spectralStart = data[offset++]; - const spectralEnd = data[offset++]; - const successiveApproximation = data[offset++]; - const processed = decodeScan( - data, offset, frame!, components, resetInterval, spectralStart, spectralEnd, - successiveApproximation >> 4, successiveApproximation & 15); - offset += processed; - break; - } - case 0xFFFF: // Fill bytes - if (data[offset] !== 0xFF) { // Avoid skipping a valid marker. - offset--; - } - break; - default: { - if (data[offset - 3] == 0xFF && data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) { - // could be incorrect encoding -- last 0xFF byte of the previous - // block was eaten by the encoder - offset -= 3; - break; - } else if (fileMarker === 0xE0 || fileMarker == 0xE1) { - // Recover from malformed APP1 markers popular in some phone models. - // See https://github.com/eugeneware/jpeg-js/issues/82 - if (malformedDataOffset !== -1) { - throw new Error(`first unknown JPEG marker at offset ${malformedDataOffset.toString(16)}, second unknown JPEG marker ${fileMarker.toString(16)} at offset ${(offset - 1).toString(16)}`); - } - malformedDataOffset = offset - 1; - const nextOffset = readUint16(); - if (data[offset + nextOffset - 2] === 0xFF) { - offset += nextOffset - 2; - break; - } - } - - throw new Error('unknown JPEG marker ' + fileMarker.toString(16)); - } - } - - fileMarker = readUint16(); - } - - if (frames.length != 1) throw new Error('only single frame JPEGs supported'); - - // set each frame's components quantization table - for (let i = 0; i < frames.length; i++) { - const cp = frames[i].components; - for (let j in cp) { // TODO: don't use `in` - cp[j].quantizationTable = quantizationTables[cp[j].quantizationIdx!]; - delete cp[j].quantizationIdx; // TODO: why ??? - } - } - - self.width = frame!.samplesPerLine; - self.height = frame!.scanLines; - self.jfif = jfif; - self.adobe = adobe; - self.components = []; - - for (let i = 0; i < frame!.componentsOrder.length; i++) { - const component = frame!.components[frame!.componentsOrder[i]]; - self.components.push({ - lines: buildComponentData(component), - scaleX: component.h / frame!.maxH, - scaleY: component.v / frame!.maxV - }); - } - - return self; -} - -function getData(decoded: Decoded) { - let offset = 0; - let colorTransform = false; - - const width = decoded.width; - const height = decoded.height; - const dataLength = width * height * decoded.components.length; - requestMemoryAllocation(dataLength); - const data = new Uint8Array(dataLength); - - switch (decoded.components.length) { - case 1: { - const component1 = decoded.components[0]; - - for (let y = 0; y < height; y++) { - const component1Line = component1.lines[0 | (y * component1.scaleY)]; - - for (let x = 0; x < width; x++) { - const Y = component1Line[0 | (x * component1.scaleX)]; - data[offset++] = Y; - } - } - break; - } - case 2: { - // PDF might compress two component data in custom colorspace - const component1 = decoded.components[0]; - const component2 = decoded.components[1]; - - for (let y = 0; y < height; y++) { - const component1Line = component1.lines[0 | (y * component1.scaleY)]; - const component2Line = component2.lines[0 | (y * component2.scaleY)]; - - for (let x = 0; x < width; x++) { - const Y1 = component1Line[0 | (x * component1.scaleX)]; - data[offset++] = Y1; - const Y2 = component2Line[0 | (x * component2.scaleX)]; - data[offset++] = Y2; - } - } - break; - } - case 3: { - // The default transform for three components is true - colorTransform = true; - // The adobe transform marker overrides any previous setting - if (decoded.adobe && decoded.adobe.transformCode) colorTransform = true; - - const component1 = decoded.components[0]; - const component2 = decoded.components[1]; - const component3 = decoded.components[2]; - - for (let y = 0; y < height; y++) { - const component1Line = component1.lines[0 | (y * component1.scaleY)]; - const component2Line = component2.lines[0 | (y * component2.scaleY)]; - const component3Line = component3.lines[0 | (y * component3.scaleY)]; - - for (let x = 0; x < width; x++) { - let Y, Cb, Cr, R, G, B; - - if (!colorTransform) { - R = component1Line[0 | (x * component1.scaleX)]; - G = component2Line[0 | (x * component2.scaleX)]; - B = component3Line[0 | (x * component3.scaleX)]; - } else { - Y = component1Line[0 | (x * component1.scaleX)]; - Cb = component2Line[0 | (x * component2.scaleX)]; - Cr = component3Line[0 | (x * component3.scaleX)]; - - R = clampTo8bit(Y + 1.402 * (Cr - 128)); - G = clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128)); - B = clampTo8bit(Y + 1.772 * (Cb - 128)); - } - - data[offset++] = R; - data[offset++] = G; - data[offset++] = B; - } - } - break; - } - case 4: { - if (!decoded.adobe) throw new Error('Unsupported color mode (4 components)'); - // The default transform for four components is false - colorTransform = false; - // The adobe transform marker overrides any previous setting - if (decoded.adobe && decoded.adobe.transformCode) colorTransform = true; - - const component1 = decoded.components[0]; - const component2 = decoded.components[1]; - const component3 = decoded.components[2]; - const component4 = decoded.components[3]; - - for (let y = 0; y < height; y++) { - const component1Line = component1.lines[0 | (y * component1.scaleY)]; - const component2Line = component2.lines[0 | (y * component2.scaleY)]; - const component3Line = component3.lines[0 | (y * component3.scaleY)]; - const component4Line = component4.lines[0 | (y * component4.scaleY)]; - - for (let x = 0; x < width; x++) { - let Y, Cb, Cr, K, C, M, Ye; - - if (!colorTransform) { - C = component1Line[0 | (x * component1.scaleX)]; - M = component2Line[0 | (x * component2.scaleX)]; - Ye = component3Line[0 | (x * component3.scaleX)]; - K = component4Line[0 | (x * component4.scaleX)]; - } else { - Y = component1Line[0 | (x * component1.scaleX)]; - Cb = component2Line[0 | (x * component2.scaleX)]; - Cr = component3Line[0 | (x * component3.scaleX)]; - K = component4Line[0 | (x * component4.scaleX)]; - - C = 255 - clampTo8bit(Y + 1.402 * (Cr - 128)); - M = 255 - clampTo8bit(Y - 0.3441363 * (Cb - 128) - 0.71413636 * (Cr - 128)); - Ye = 255 - clampTo8bit(Y + 1.772 * (Cb - 128)); - } - data[offset++] = 255 - C; - data[offset++] = 255 - M; - data[offset++] = 255 - Ye; - data[offset++] = 255 - K; - } - } - break; - } - default: - throw new Error('Unsupported color mode'); - } - - return data; -} - -export function decodeJpeg(encoded: Uint8Array, createImageData: (width: number, height: number) => ImageData) { - totalBytesAllocated = 0; - - if (encoded.length === 0) throw new Error('Empty jpeg buffer'); - - const decoded = parse(encoded); - requestMemoryAllocation(decoded.width * decoded.height * 4); - - const data = getData(decoded); - - const imageData = createImageData(decoded.width, decoded.height); - const width = imageData.width; - const height = imageData.height; - const imageDataArray = imageData.data; - - let i = 0; - let j = 0; - - switch (decoded.components.length) { - case 1: - for (let y = 0; y < height; y++) { - for (let x = 0; x < width; x++) { - const Y = data[i++]; - - imageDataArray[j++] = Y; - imageDataArray[j++] = Y; - imageDataArray[j++] = Y; - imageDataArray[j++] = 255; - } - } - break; - case 3: - for (let y = 0; y < height; y++) { - for (let x = 0; x < width; x++) { - const R = data[i++]; - const G = data[i++]; - const B = data[i++]; - - imageDataArray[j++] = R; - imageDataArray[j++] = G; - imageDataArray[j++] = B; - imageDataArray[j++] = 255; - } - } - break; - case 4: - for (let y = 0; y < height; y++) { - for (let x = 0; x < width; x++) { - const C = data[i++]; - const M = data[i++]; - const Y = data[i++]; - const K = data[i++]; - - const R = 255 - clampTo8bit(C * (1 - K / 255) + K); - const G = 255 - clampTo8bit(M * (1 - K / 255) + K); - const B = 255 - clampTo8bit(Y * (1 - K / 255) + K); - - imageDataArray[j++] = R; - imageDataArray[j++] = G; - imageDataArray[j++] = B; - imageDataArray[j++] = 255; - } - } - break; - default: - throw new Error('Unsupported color mode'); - } - - return imageData; -} diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/psd.ts b/npm-packages/mac-v2.4.x/ag-psd/src/psd.ts deleted file mode 100644 index ca0d9d2..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/psd.ts +++ /dev/null @@ -1,1243 +0,0 @@ -export type BlendMode = 'pass through' | 'normal' | 'dissolve' | 'darken' | 'multiply' | - 'color burn' | 'linear burn' | 'darker color' | 'lighten' | 'screen' | 'color dodge' | - 'linear dodge' | 'lighter color' | 'overlay' | 'soft light' | 'hard light' | - 'vivid light' | 'linear light' | 'pin light' | 'hard mix' | 'difference' | 'exclusion' | - 'subtract' | 'divide' | 'hue' | 'saturation' | 'color' | 'luminosity'; - -export const enum ColorMode { - Bitmap = 0, - Grayscale = 1, - Indexed = 2, - RGB = 3, - CMYK = 4, - Multichannel = 7, - Duotone = 8, - Lab = 9, -} - -export const enum SectionDividerType { - Other = 0, - OpenFolder = 1, - ClosedFolder = 2, - BoundingSectionDivider = 3, -} - -export type RGBA = { r: number; g: number; b: number; a: number; }; // values from 0 to 255 -export type RGB = { r: number; g: number; b: number; }; // values from 0 to 255 -export type FRGB = { fr: number; fg: number; fb: number; }; // values from 0 to 1 (can be above 1) -export type HSB = { h: number; s: number; b: number; }; // values from 0 to 1 -export type CMYK = { c: number; m: number; y: number; k: number; }; // values from 0 to 255 -export type LAB = { l: number; a: number; b: number; }; // values `l` from 0 to 1; `a` and `b` from -1 to 1 -export type Grayscale = { k: number }; // values from 0 to 255 -export type Color = RGBA | RGB | FRGB | HSB | CMYK | LAB | Grayscale; - -export interface EffectContour { - name: string; - curve: { x: number; y: number; }[]; -} - -export interface EffectPattern { - name: string; - id: string; - // TODO: add fields -} - -export interface LayerEffectShadow { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - angle?: number; - distance?: UnitsValue; - color?: Color; - blendMode?: BlendMode; - opacity?: number; - useGlobalLight?: boolean; - antialiased?: boolean; - contour?: EffectContour; - choke?: UnitsValue; // spread - layerConceals?: boolean; // only drop shadow -} - -export interface LayerEffectsOuterGlow { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - color?: Color; - blendMode?: BlendMode; - opacity?: number; - source?: GlowSource; - antialiased?: boolean; - noise?: number; - range?: number; - choke?: UnitsValue; - jitter?: number; - contour?: EffectContour; -} - -export interface LayerEffectInnerGlow { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - color?: Color; - blendMode?: BlendMode; - opacity?: number; - source?: GlowSource; - technique?: GlowTechnique; - antialiased?: boolean; - noise?: number; - range?: number; - choke?: UnitsValue; // spread - jitter?: number; - contour?: EffectContour; -} - -export interface LayerEffectBevel { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - angle?: number; - strength?: number; // depth - highlightBlendMode?: BlendMode; - shadowBlendMode?: BlendMode; - highlightColor?: Color; - shadowColor?: Color; - style?: BevelStyle; - highlightOpacity?: number; - shadowOpacity?: number; - soften?: UnitsValue; - useGlobalLight?: boolean; - altitude?: number; - technique?: BevelTechnique; - direction?: BevelDirection; - useTexture?: boolean; - useShape?: boolean; - antialiasGloss?: boolean; - contour?: EffectContour; -} - -export interface LayerEffectSolidFill { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - blendMode?: BlendMode; - color?: Color; - opacity?: number; -} - -export interface LayerEffectStroke { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - overprint?: boolean; - size?: UnitsValue; - position?: 'inside' | 'center' | 'outside'; - fillType?: 'color' | 'gradient' | 'pattern'; - blendMode?: BlendMode; - opacity?: number; - color?: Color; - gradient?: (EffectSolidGradient | EffectNoiseGradient) & ExtraGradientInfo; - pattern?: EffectPattern & {}; // TODO: additional pattern info -} - -export interface LayerEffectSatin { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - size?: UnitsValue; - blendMode?: BlendMode; - color?: Color; - antialiased?: boolean; - opacity?: number; - distance?: UnitsValue; - invert?: boolean; - angle?: number; - contour?: EffectContour; -} - -// not supported yet because of `Patt` section not implemented -export interface LayerEffectPatternOverlay { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - blendMode?: BlendMode; - opacity?: number; - scale?: number; - pattern?: EffectPattern; - phase?: { x: number; y: number; }; - align?: boolean; -} - -export interface EffectSolidGradient { - name: string; - type: 'solid'; - smoothness?: number; - colorStops: ColorStop[]; - opacityStops: OpacityStop[]; -} - -export interface EffectNoiseGradient { - name: string; - type: 'noise'; - roughness?: number; - colorModel?: 'rgb' | 'hsb' | 'lab'; - randomSeed?: number; - restrictColors?: boolean; - addTransparency?: boolean; - min: number[]; - max: number[]; -} - -export interface LayerEffectGradientOverlay { - present?: boolean; - showInDialog?: boolean; - enabled?: boolean; - blendMode?: string; - opacity?: number; - align?: boolean; - scale?: number; - dither?: boolean; - reverse?: boolean; - type?: GradientStyle; - offset?: { x: number; y: number; }; - gradient?: EffectSolidGradient | EffectNoiseGradient; - interpolationMethod?: InterpolationMethod; -} - -export interface LayerEffectsInfo { - disabled?: boolean; - scale?: number; - dropShadow?: LayerEffectShadow[]; - innerShadow?: LayerEffectShadow[]; - outerGlow?: LayerEffectsOuterGlow; - innerGlow?: LayerEffectInnerGlow; - bevel?: LayerEffectBevel; - solidFill?: LayerEffectSolidFill[]; - satin?: LayerEffectSatin; - stroke?: LayerEffectStroke[]; - gradientOverlay?: LayerEffectGradientOverlay[]; - patternOverlay?: LayerEffectPatternOverlay; // not supported yet because of `Patt` section not implemented -} - -export interface LayerMaskData { - top?: number; - left?: number; - bottom?: number; - right?: number; - defaultColor?: number; - disabled?: boolean; - positionRelativeToLayer?: boolean; - fromVectorData?: boolean; // set to true if the mask is generated from vector data, false if it's a bitmap provided by user - userMaskDensity?: number; - userMaskFeather?: number; // px - vectorMaskDensity?: number; - vectorMaskFeather?: number; - canvas?: HTMLCanvasElement; - imageData?: ImageData; -} - -export type TextGridding = 'none' | 'round'; // TODO: other values (no idea where to set it up in Photoshop) -export type Orientation = 'horizontal' | 'vertical'; -export type AntiAlias = 'none' | 'sharp' | 'crisp' | 'strong' | 'smooth' | 'platform' | 'platformLCD'; -export type WarpStyle = - 'none' | 'arc' | 'arcLower' | 'arcUpper' | 'arch' | 'bulge' | 'shellLower' | 'shellUpper' | 'flag' | - 'wave' | 'fish' | 'rise' | 'fisheye' | 'inflate' | 'squeeze' | 'twist' | 'custom' | 'cylinder'; -export type BevelStyle = 'outer bevel' | 'inner bevel' | 'emboss' | 'pillow emboss' | 'stroke emboss'; -export type BevelTechnique = 'smooth' | 'chisel hard' | 'chisel soft'; -export type BevelDirection = 'up' | 'down'; -export type GlowTechnique = 'softer' | 'precise'; -export type GlowSource = 'edge' | 'center'; -export type GradientStyle = 'linear' | 'radial' | 'angle' | 'reflected' | 'diamond'; -export type Justification = 'left' | 'right' | 'center'; -export type LineCapType = 'butt' | 'round' | 'square'; -export type LineJoinType = 'miter' | 'round' | 'bevel'; -export type LineAlignment = 'inside' | 'center' | 'outside'; -export type InterpolationMethod = 'classic' | 'perceptual' | 'linear'; - -export interface Warp { - style?: WarpStyle; - value?: number; - values?: number[]; - perspective?: number; - perspectiveOther?: number; - rotate?: Orientation; - // for custom warps - bounds?: { top: UnitsValue; left: UnitsValue; bottom: UnitsValue; right: UnitsValue; }; - uOrder?: number; - vOrder?: number; - deformNumRows?: number; - deformNumCols?: number; - customEnvelopeWarp?: { - quiltSliceX?: number[]; - quiltSliceY?: number[]; - // 16 points from top left to bottom right, rows first, all points are relative to the first point - meshPoints: { x: number; y: number; }[]; - }; -} - -export interface Animations { - frames: { - id: number; - delay: number; - dispose?: 'auto' | 'none' | 'dispose'; - }[]; - animations: { - id: number; - frames: number[]; - repeats?: number; - activeFrame?: number; - }[]; -} - -export interface Font { - name: string; - script?: number; - type?: number; - synthetic?: number; -} - -export interface ParagraphStyle { - justification?: Justification; - firstLineIndent?: number; - startIndent?: number; - endIndent?: number; - spaceBefore?: number; - spaceAfter?: number; - autoHyphenate?: boolean; - hyphenatedWordSize?: number; - preHyphen?: number; - postHyphen?: number; - consecutiveHyphens?: number; - zone?: number; - wordSpacing?: number[]; - letterSpacing?: number[]; - glyphSpacing?: number[]; - autoLeading?: number; - leadingType?: number; - hanging?: boolean; - burasagari?: boolean; - kinsokuOrder?: number; - everyLineComposer?: boolean; -} - -export interface ParagraphStyleRun { - length: number; - style: ParagraphStyle; -} - -export interface TextStyle { - font?: Font; - fontSize?: number; - fauxBold?: boolean; - fauxItalic?: boolean; - autoLeading?: boolean; - leading?: number; - horizontalScale?: number; - verticalScale?: number; - tracking?: number; - autoKerning?: boolean; - kerning?: number; - baselineShift?: number; - fontCaps?: number; // 0 - none, 1 - small caps, 2 - all caps - fontBaseline?: number; // 0 - normal, 1 - superscript, 2 - subscript - underline?: boolean; - strikethrough?: boolean; - ligatures?: boolean; - dLigatures?: boolean; - baselineDirection?: number; - tsume?: number; - styleRunAlignment?: number; - language?: number; - noBreak?: boolean; - fillColor?: Color; - strokeColor?: Color; - fillFlag?: boolean; - strokeFlag?: boolean; - fillFirst?: boolean; - yUnderline?: number; - outlineWidth?: number; - characterDirection?: number; - hindiNumbers?: boolean; - kashida?: number; - diacriticPos?: number; -} - -export interface TextStyleRun { - length: number; - style: TextStyle; -} - -export interface TextGridInfo { - isOn?: boolean; - show?: boolean; - size?: number; - leading?: number; - color?: Color; - leadingFillColor?: Color; - alignLineHeightToGridFlags?: boolean; -} - -export interface LayerTextData { - text: string; - transform?: number[]; // 2d transform matrix [xx, xy, yx, yy, tx, ty] - antiAlias?: AntiAlias; - gridding?: TextGridding; - orientation?: Orientation; - index?: number; - warp?: Warp; - top?: number; - left?: number; - bottom?: number; - right?: number; - - gridInfo?: TextGridInfo; - useFractionalGlyphWidths?: boolean; - style?: TextStyle; // base style - styleRuns?: TextStyleRun[]; // spans of different style - paragraphStyle?: ParagraphStyle; // base paragraph style - paragraphStyleRuns?: ParagraphStyleRun[]; // style for each line - - superscriptSize?: number; - superscriptPosition?: number; - subscriptSize?: number; - subscriptPosition?: number; - smallCapSize?: number; - - shapeType?: 'point' | 'box'; - pointBase?: number[]; - boxBounds?: number[]; -} - -export interface PatternInfo { - name: string; - id: string; - x: number; - y: number; - bounds: { x: number; y: number; w: number, h: number; }; - data: Uint8Array; -} - -export interface BezierKnot { - linked: boolean; - points: number[]; // x0, y0, x1, y1, x2, y2 -} - -export type BooleanOperation = 'exclude' | 'combine' | 'subtract' | 'intersect'; - -export interface BezierPath { - open: boolean; - operation: BooleanOperation; - knots: BezierKnot[]; -} - -export interface ExtraGradientInfo { - style?: GradientStyle; - scale?: number; - angle?: number; - dither?: boolean; - reverse?: boolean; - align?: boolean; - offset?: { x: number; y: number; }; -} - -export interface ExtraPatternInfo { - linked?: boolean; - phase?: { x: number; y: number; }; -} - -export type VectorContent = { type: 'color'; color: Color; } | - (EffectSolidGradient & ExtraGradientInfo) | - (EffectNoiseGradient & ExtraGradientInfo) | - (EffectPattern & { type: 'pattern'; } & ExtraPatternInfo); - -export type RenderingIntent = 'perceptual' | 'saturation' | 'relative colorimetric' | 'absolute colorimetric'; - -export type Units = 'Pixels' | 'Points' | 'Picas' | 'Millimeters' | 'Centimeters' | 'Inches' | 'None' | 'Density'; - -export interface UnitsValue { - units: Units; - value: number; -} - -export interface BrightnessAdjustment { - type: 'brightness/contrast'; - brightness?: number; - contrast?: number; - meanValue?: number; - useLegacy?: boolean; - labColorOnly?: boolean; - auto?: boolean; -} - -export interface LevelsAdjustmentChannel { - shadowInput: number; - highlightInput: number; - shadowOutput: number; - highlightOutput: number; - midtoneInput: number; -} - -export interface PresetInfo { - presetKind?: number; - presetFileName?: string; -} - -export interface LevelsAdjustment extends PresetInfo { - type: 'levels'; - rgb?: LevelsAdjustmentChannel; - red?: LevelsAdjustmentChannel; - green?: LevelsAdjustmentChannel; - blue?: LevelsAdjustmentChannel; -} - -export type CurvesAdjustmentChannel = { input: number; output: number; }[]; - -export interface CurvesAdjustment extends PresetInfo { - type: 'curves'; - rgb?: CurvesAdjustmentChannel; - red?: CurvesAdjustmentChannel; - green?: CurvesAdjustmentChannel; - blue?: CurvesAdjustmentChannel; -} - -export interface ExposureAdjustment extends PresetInfo { - type: 'exposure'; - exposure?: number; - offset?: number; - gamma?: number; -} - -export interface VibranceAdjustment { - type: 'vibrance'; - vibrance?: number; - saturation?: number; -} - -export interface HueSaturationAdjustmentChannel { - a: number; - b: number; - c: number; - d: number; - hue: number; - saturation: number; - lightness: number; -} - -export interface HueSaturationAdjustment extends PresetInfo { - type: 'hue/saturation'; - master?: HueSaturationAdjustmentChannel; - reds?: HueSaturationAdjustmentChannel; - yellows?: HueSaturationAdjustmentChannel; - greens?: HueSaturationAdjustmentChannel; - cyans?: HueSaturationAdjustmentChannel; - blues?: HueSaturationAdjustmentChannel; - magentas?: HueSaturationAdjustmentChannel; -} - -export interface ColorBalanceValues { - cyanRed: number; - magentaGreen: number; - yellowBlue: number; -} - -export interface ColorBalanceAdjustment { - type: 'color balance'; - shadows?: ColorBalanceValues; - midtones?: ColorBalanceValues; - highlights?: ColorBalanceValues; - preserveLuminosity?: boolean; -} - -export interface BlackAndWhiteAdjustment extends PresetInfo { - type: 'black & white'; - reds?: number; - yellows?: number; - greens?: number; - cyans?: number; - blues?: number; - magentas?: number; - useTint?: boolean; - tintColor?: Color; -} - -export interface PhotoFilterAdjustment { - type: 'photo filter'; - color?: Color; - density?: number; - preserveLuminosity?: boolean; -} - -export interface ChannelMixerChannel { - red: number; - green: number; - blue: number; - constant: number; -} - -export interface ChannelMixerAdjustment extends PresetInfo { - type: 'channel mixer'; - monochrome?: boolean; - red?: ChannelMixerChannel; - green?: ChannelMixerChannel; - blue?: ChannelMixerChannel; - gray?: ChannelMixerChannel; -} - -export interface ColorLookupAdjustment { - type: 'color lookup'; - lookupType?: '3dlut' | 'abstractProfile' | 'deviceLinkProfile'; - name?: string; - dither?: boolean; - profile?: Uint8Array; - lutFormat?: 'look' | 'cube' | '3dl'; - dataOrder?: 'rgb' | 'bgr'; - tableOrder?: 'rgb' | 'bgr'; - lut3DFileData?: Uint8Array; - lut3DFileName?: string; -} - -export interface InvertAdjustment { - type: 'invert'; -} - -export interface PosterizeAdjustment { - type: 'posterize'; - levels?: number; -} - -export interface ThresholdAdjustment { - type: 'threshold'; - level?: number; -} - -export interface ColorStop { - color: Color; - location: number; - midpoint: number; -} - -export interface OpacityStop { - opacity: number; - location: number; - midpoint: number; -} - -export interface GradientMapAdjustment { - type: 'gradient map'; - name?: string; - gradientType: 'solid' | 'noise'; - dither?: boolean; - reverse?: boolean; - // solid - smoothness?: number; - colorStops?: ColorStop[]; - opacityStops?: OpacityStop[]; - // noise - roughness?: number; - colorModel?: 'rgb' | 'hsb' | 'lab'; - randomSeed?: number; - restrictColors?: boolean; - addTransparency?: boolean; - min?: number[]; - max?: number[]; -} - -export interface SelectiveColorAdjustment { - type: 'selective color'; - mode?: 'relative' | 'absolute'; - reds?: CMYK; - yellows?: CMYK; - greens?: CMYK; - cyans?: CMYK; - blues?: CMYK; - magentas?: CMYK; - whites?: CMYK; - neutrals?: CMYK; - blacks?: CMYK; -} - -export interface LinkedFile { - id: string; - name: string; - type?: string; - creator?: string; - data?: Uint8Array; - time?: string; // for external files - descriptor?: { - compInfo: { compID: number; originalCompID: number; }; - }; - childDocumentID?: string; - assetModTime?: number; - assetLockedState?: number; -} - -export interface PlacedLayerFilter { - enabled: boolean; - validAtPosition: boolean; - maskEnabled: boolean; - maskLinked: boolean; - maskExtendWithWhite: boolean; - list: { - id: number; - name: string; - opacity: number; - blendMode: BlendMode; - enabled: boolean; - hasOptions: boolean; - foregroundColor: Color; - backgroundColor: Color; - filter: { - rigidType: boolean; - bounds: { x: number; y: number; }[]; - puppetShapeList: { - rigidType: boolean; - // VrsM: number; - // VrsN: number; - originalVertexArray: { x: number; y: number; }[]; - deformedVertexArray: { x: number; y: number; }[]; - indexArray: number[]; - pinOffsets: { x: number; y: number; }[]; - posFinalPins: { x: number; y: number; }[]; - pinVertexIndices: number[]; - selectedPin: number[]; - pinPosition: { x: number; y: number; }[]; - pinRotation: number[]; // in degrees - pinOverlay: boolean[]; - pinDepth: number[]; - meshQuality: number; - meshExpansion: number; - meshRigidity: number; - imageResolution: number; - meshBoundaryPath: { - pathComponents: { - shapeOperation: string; - paths: { - closed: boolean; - points: { - anchor: { x: UnitsValue; y: UnitsValue; }; - forward: { x: UnitsValue; y: UnitsValue; }; - backward: { x: UnitsValue; y: UnitsValue; }; - smooth: boolean; - }[]; - }[]; - }[]; - }; - }[]; - }; - }[]; -} - -export type PlacedLayerType = 'unknown' | 'vector' | 'raster' | 'image stack'; - -export interface PlacedLayer { - id: string; // id of linked image file (psd.linkedFiles) - placed?: string; // unique id - type: PlacedLayerType; - pageNumber?: number; - totalPages?: number; - frameStep?: { numerator: number; denominator: number; }; - duration?: { numerator: number; denominator: number; }; - frameCount?: number; - transform: number[]; // x, y of 4 corners of the transform - nonAffineTransform?: number[]; // x, y of 4 corners of the transform - width?: number; - height?: number; - resolution?: UnitsValue; - // antialias ? - warp?: Warp; - crop?: number; - comp?: number; - compInfo?: { compID: number; originalCompID: number; }; - filter?: PlacedLayerFilter; -} - -export type AdjustmentLayer = BrightnessAdjustment | LevelsAdjustment | CurvesAdjustment | - ExposureAdjustment | VibranceAdjustment | HueSaturationAdjustment | ColorBalanceAdjustment | - BlackAndWhiteAdjustment | PhotoFilterAdjustment | ChannelMixerAdjustment | ColorLookupAdjustment | - InvertAdjustment | PosterizeAdjustment | ThresholdAdjustment | GradientMapAdjustment | - SelectiveColorAdjustment; - -export type LayerColor = 'none' | 'red' | 'orange' | 'yellow' | 'green' | 'blue' | 'violet' | 'gray'; - -export interface KeyDescriptorItem { - keyShapeInvalidated?: boolean; - keyOriginType?: number; - keyOriginResolution?: number; - keyOriginRRectRadii?: { - topRight: UnitsValue; - topLeft: UnitsValue; - bottomLeft: UnitsValue; - bottomRight: UnitsValue; - }; - keyOriginShapeBoundingBox?: { - top: UnitsValue; - left: UnitsValue; - bottom: UnitsValue; - right: UnitsValue; - }; - keyOriginBoxCorners?: { x: number; y: number; }[]; - transform?: number[]; // 2d transform matrix [xx, xy, yx, yy, tx, ty] -} - -export interface LayerVectorMask { - invert?: boolean; - notLink?: boolean; - disable?: boolean; - fillStartsWithAllPixels?: boolean; - clipboard?: { - top: number; - left: number; - bottom: number; - right: number; - resolution: number; - }; - paths: BezierPath[]; -} - -export interface AnimationFrame { - frames: number[]; // IDs of frames that this modifiers applies to - enable?: boolean; - offset?: { x: number; y: number; }; - referencePoint?: { x: number; y: number; }; - opacity?: number; - effects?: LayerEffectsInfo; -} - -export interface Fraction { - numerator: number; - denominator: number; -} - -export type TimelineKeyInterpolation = 'linear' | 'hold'; - -export type TimelineKey = { - interpolation: TimelineKeyInterpolation; - time: Fraction; - selected?: boolean; -} & ({ - type: 'opacity'; - value: number; -} | { - type: 'position'; - x: number; - y: number; -} | { - type: 'transform'; - scale: { x: number; y: number; }; - skew: { x: number; y: number; }; - rotation: number; - translation: { x: number; y: number; }; -} | { - type: 'style'; - style?: LayerEffectsInfo; -} | { - type: 'globalLighting'; - globalAngle: number; - globalAltitude: number; -}); - -export type TimelineTrackType = 'opacity' | 'style' | 'sheetTransform' | 'sheetPosition' | 'globalLighting'; - -export interface TimelineTrack { - type: TimelineTrackType; - enabled?: boolean; - effectParams?: { - keys: TimelineKey[]; - fillCanvas: boolean; - zoomOrigin: number; - }; - keys: TimelineKey[]; -} - -export interface Timeline { - start: Fraction; - duration: Fraction; - inTime: Fraction; - outTime: Fraction; - autoScope: boolean; - audioLevel: number; - tracks?: TimelineTrack[]; -} - -export interface LayerAdditionalInfo { - name?: string; // layer name - nameSource?: string; // layer name source - id?: number; // layer id - version?: number; // layer version - mask?: LayerMaskData; - blendClippendElements?: boolean; // has to be set to `true` when using `color burn` blend mode (otherwise `transparencyShapesLayer` is set incorrectly) - blendInteriorElements?: boolean; - knockout?: boolean; - layerMaskAsGlobalMask?: boolean; - protected?: { - transparency?: boolean; - composite?: boolean; - position?: boolean; - artboards?: boolean; - }; - layerColor?: LayerColor; - referencePoint?: { - x: number; - y: number; - }; - sectionDivider?: { - type: SectionDividerType; - key?: string; - subType?: number; // 0 = normal, 1 = scene group, affects the animation timeline. - }; - filterMask?: { - colorSpace: Color; - opacity: number; - }; - effects?: LayerEffectsInfo; - text?: LayerTextData; - patterns?: PatternInfo[]; // not supported yet - vectorFill?: VectorContent; - vectorStroke?: { - strokeEnabled?: boolean; - fillEnabled?: boolean; - lineWidth?: UnitsValue; - lineDashOffset?: UnitsValue; - miterLimit?: number; - lineCapType?: LineCapType; - lineJoinType?: LineJoinType; - lineAlignment?: LineAlignment; - scaleLock?: boolean; - strokeAdjust?: boolean; - lineDashSet?: UnitsValue[]; - blendMode?: BlendMode; - opacity?: number; - content?: VectorContent; - resolution?: number; - }; - vectorMask?: LayerVectorMask; - usingAlignedRendering?: boolean; - timestamp?: number; // seconds - pathList?: { - // TODO: ... - }[]; - adjustment?: AdjustmentLayer; - placedLayer?: PlacedLayer; - vectorOrigination?: { - keyDescriptorList: KeyDescriptorItem[]; - }; - compositorUsed?: { - description: string; - reason: string; - engine: string; - enableCompCore: string; - enableCompCoreGPU: string; - compCoreSupport: string; - compCoreGPUSupport: string; - }; - artboard?: { - rect: { top: number; left: number; bottom: number; right: number; }; - guideIndices?: any[]; - presetName?: string; - color?: Color; - backgroundType?: number; - }; - fillOpacity?: number; - transparencyShapesLayer?: boolean; - channelBlendingRestrictions?: number[]; - animationFrames?: AnimationFrame[]; - animationFrameFlags?: { - propagateFrameOne?: boolean; - unifyLayerPosition?: boolean; - unifyLayerStyle?: boolean; - unifyLayerVisibility?: boolean; - }; - timeline?: Timeline; - filterEffects?: any; - - // Base64 encoded raw EngineData, currently just kept in original state to support - // loading and modifying PSD file without breaking text layers. - engineData?: string; -} - -export interface ImageResources { - layerState?: number; - layersGroup?: number[]; - layerSelectionIds?: number[]; - layerGroupsEnabledId?: number[]; - versionInfo?: { - hasRealMergedData: boolean; - writerName: string; - readerName: string; - fileVersion: number; - }; - alphaIdentifiers?: number[]; - alphaChannelNames?: string[]; - globalAngle?: number; - globalAltitude?: number; - pixelAspectRatio?: { - aspect: number; - }; - urlsList?: { - id: number; - ref: 'slice'; - url: string; - }[]; - gridAndGuidesInformation?: { - grid?: { - horizontal: number; - vertical: number; - }, - guides?: { - location: number; - direction: 'horizontal' | 'vertical'; - }[]; - }; - resolutionInfo?: { - horizontalResolution: number; - horizontalResolutionUnit: 'PPI' | 'PPCM'; - widthUnit: 'Inches' | 'Centimeters' | 'Points' | 'Picas' | 'Columns'; - verticalResolution: number; - verticalResolutionUnit: 'PPI' | 'PPCM'; - heightUnit: 'Inches' | 'Centimeters' | 'Points' | 'Picas' | 'Columns'; - }; - thumbnail?: HTMLCanvasElement; - thumbnailRaw?: { width: number; height: number; data: Uint8Array; }; - captionDigest?: string; - xmpMetadata?: string; - printScale?: { - style?: 'centered' | 'size to fit' | 'user defined'; - x?: number; - y?: number; - scale?: number; - }; - printInformation?: { - printerManagesColors?: boolean; - printerName?: string; - printerProfile?: string; - printSixteenBit?: boolean; - renderingIntent?: RenderingIntent; - hardProof?: boolean; - blackPointCompensation?: boolean; - proofSetup?: { - builtin: string; - } | { - profile: string; - renderingIntent?: RenderingIntent; - blackPointCompensation?: boolean; - paperWhite?: boolean; - }; - }; - backgroundColor?: Color; - idsSeedNumber?: number; - printFlags?: { - labels?: boolean; - cropMarks?: boolean; - colorBars?: boolean; - registrationMarks?: boolean; - negative?: boolean; - flip?: boolean; - interpolate?: boolean; - caption?: boolean; - printFlags?: boolean; - }; - iccUntaggedProfile?: boolean; - pathSelectionState?: string[]; - imageReadyVariables?: string; - imageReadyDataSets?: string; - animations?: Animations; - onionSkins?: { - enabled: boolean; - framesBefore: number; - framesAfter: number; - frameSpacing: number; - minOpacity: number; - maxOpacity: number; - blendMode: BlendMode; - }; - timelineInformation?: { - enabled: boolean; - frameStep: Fraction; - frameRate: number; - time: Fraction; - duration: Fraction; - workInTime: Fraction; - workOutTime: Fraction; - repeats: number; - hasMotion: boolean; - globalTracks: TimelineTrack[]; - audioClipGroups?: { - id: string; - muted: boolean; - audioClips: { - id: string; - start: Fraction; - duration: Fraction; - inTime: Fraction; - outTime: Fraction; - muted: boolean; - audioLevel: number; - frameReader: { - type: number; - mediaDescriptor: string; - link: { - name: string; - fullPath: string; - relativePath: string; - }; - }; - }[]; - }[]; - }; - sheetDisclosure?: { - sheetTimelineOptions?: { - sheetID: number; - sheetDisclosed: boolean; - lightsDisclosed: boolean; - meshesDisclosed: boolean; - materialsDisclosed: boolean; - }[]; - }; - countInformation?: { - color: RGB; - name: string; - size: number; - fontSize: number; - visible: boolean; - points: { x: number; y: number }[]; - }[]; - slices?: { - bounds: { left: number; top: number; right: number; bottom: number }; - groupName: string; - slices: { - id: number; - groupId: number; - origin: 'userGenerated' | 'autoGenerated' | 'layer'; - associatedLayerId: number; - name: string; - type: 'image' | 'noImage'; - bounds: { left: number; top: number; right: number; bottom: number }; - url: string; - target: string; - message: string; - altTag: string; - cellTextIsHTML: boolean; - cellText: string; - horizontalAlignment: 'default'; - verticalAlignment: 'default'; - backgroundColorType: 'none' | 'matte' | 'color'; - backgroundColor: RGBA; - topOutset?: number; - leftOutset?: number; - bottomOutset?: number; - rightOutset?: number; - }[]; - }[]; -} - -export interface GlobalLayerMaskInfo { - overlayColorSpace: number; - colorSpace1: number; - colorSpace2: number; - colorSpace3: number; - colorSpace4: number; - opacity: number; - kind: number; -} - -export interface Annotation { - type: 'text' | 'sound'; - open: boolean; - iconLocation: { left: number; top: number; right: number; bottom: number }; - popupLocation: { left: number; top: number; right: number; bottom: number }; - color: Color; - author: string; - name: string; - date: string; - data: string | Uint8Array; -} - -export interface Layer extends LayerAdditionalInfo { - top?: number; - left?: number; - bottom?: number; - right?: number; - blendMode?: BlendMode; - opacity?: number; - transparencyProtected?: boolean; - hidden?: boolean; - clipping?: boolean; - canvas?: HTMLCanvasElement; - imageData?: ImageData; - children?: Layer[]; - /** Applies only for layer groups. */ - opened?: boolean; -} - -export interface Psd extends LayerAdditionalInfo { - width: number; - height: number; - channels?: number; - bitsPerChannel?: number; - colorMode?: ColorMode; - children?: Layer[]; - canvas?: HTMLCanvasElement; - imageData?: ImageData; - imageResources?: ImageResources; - linkedFiles?: LinkedFile[]; // used in smart objects - artboards?: { - count: number; // number of artboards in the document - autoExpandOffset?: { horizontal: number; vertical: number; }; - origin?: { horizontal: number; vertical: number; }; - autoExpandEnabled?: boolean; - autoNestEnabled?: boolean; - autoPositionEnabled?: boolean; - shrinkwrapOnSaveEnabled?: boolean; - docDefaultNewArtboardBackgroundColor?: Color; - docDefaultNewArtboardBackgroundType?: number; - }; - globalLayerMaskInfo?: GlobalLayerMaskInfo; - annotations?: Annotation[]; -} - -export interface ReadOptions { - /** Does not load layer image data. */ - skipLayerImageData?: boolean; - /** Does not load composite image data. */ - skipCompositeImageData?: boolean; - /** Does not load thumbnail. */ - skipThumbnail?: boolean; - /** Does not load linked files (used in smart-objects). */ - skipLinkedFilesData?: boolean; - /** Throws exception if features are missing. */ - throwForMissingFeatures?: boolean; - /** Logs if features are missing. */ - logMissingFeatures?: boolean; - /** Keep image data as byte array instead of canvas. - * (image data will appear in `imageData` fields instead of `canvas` fields) - * This avoids issues with canvas premultiplied alpha corrupting image data. */ - useImageData?: boolean; - /** Loads thumbnail raw data instead of decoding it's content into canvas. - * `thumnailRaw` field is used instead. */ - useRawThumbnail?: boolean; - /** Usend only for development. */ - logDevFeatures?: boolean; -} - -export interface WriteOptions { - /** Automatically generates thumbnail from composite image. */ - generateThumbnail?: boolean; - /** Trims transparent pixels from layer image data. */ - trimImageData?: boolean; - /** Invalidates text layer data, forcing Photoshop to redraw them on load. - * Use this option if you're updating loaded text layer properties. */ - invalidateTextLayers?: boolean; - /** Logs if features are missing. */ - logMissingFeatures?: boolean; - /** Forces bottom layer to be treated as layer and not background even when it's missing any transparency - * (by default Photoshop treats bottom layer as background it it doesn't have any transparent pixels). */ - noBackground?: boolean; - /** Saves document as PSB (Large Document Format) file. */ - psb?: boolean; - /** Uses zip compression when writing PSD file, will result in smaller file size but may be incompatible - * with some software. It may also be significantly slower. */ - compress?: boolean; -} diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/psdReader.ts b/npm-packages/mac-v2.4.x/ag-psd/src/psdReader.ts deleted file mode 100644 index c17834b..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/psdReader.ts +++ /dev/null @@ -1,1091 +0,0 @@ -import { inflate } from 'pako'; -import { - Psd, Layer, ColorMode, SectionDividerType, LayerAdditionalInfo, ReadOptions, LayerMaskData, Color, - PatternInfo, GlobalLayerMaskInfo, RGB -} from './psd'; -import { - resetImageData, offsetForChannel, decodeBitmap, PixelData, createCanvas, createImageData, - toBlendMode, ChannelID, Compression, LayerMaskFlags, MaskParams, ColorSpace, RAW_IMAGE_DATA, largeAdditionalInfoKeys -} from './helpers'; -import { infoHandlersMap } from './additionalInfo'; -import { resourceHandlersMap } from './imageResources'; - -interface ChannelInfo { - id: ChannelID; - length: number; -} - -interface ReadOptionsExt extends ReadOptions { - large: boolean; -} - -export const supportedColorModes = [ColorMode.Bitmap, ColorMode.Grayscale, ColorMode.RGB]; -const colorModes = ['bitmap', 'grayscale', 'indexed', 'RGB', 'CMYK', 'multichannel', 'duotone', 'lab']; - -function setupGrayscale(data: PixelData) { - const size = data.width * data.height * 4; - - for (let i = 0; i < size; i += 4) { - data.data[i + 1] = data.data[i]; - data.data[i + 2] = data.data[i]; - } -} - -export interface PsdReader { - offset: number; - view: DataView; - strict: boolean; - debug: boolean; -} - -export function createReader(buffer: ArrayBuffer, offset?: number, length?: number): PsdReader { - const view = new DataView(buffer, offset, length); - return { view, offset: 0, strict: false, debug: false }; -} - -export function warnOrThrow(reader: PsdReader, message: string) { - if (reader.strict) throw new Error(message); - if (reader.debug) console.warn(message); -} - -export function readUint8(reader: PsdReader) { - reader.offset += 1; - return reader.view.getUint8(reader.offset - 1); -} - -export function peekUint8(reader: PsdReader) { - return reader.view.getUint8(reader.offset); -} - -export function readInt16(reader: PsdReader) { - reader.offset += 2; - return reader.view.getInt16(reader.offset - 2, false); -} - -export function readUint16(reader: PsdReader) { - reader.offset += 2; - return reader.view.getUint16(reader.offset - 2, false); -} - -export function readInt32(reader: PsdReader) { - reader.offset += 4; - return reader.view.getInt32(reader.offset - 4, false); -} - -export function readInt32LE(reader: PsdReader) { - reader.offset += 4; - return reader.view.getInt32(reader.offset - 4, true); -} - -export function readUint32(reader: PsdReader) { - reader.offset += 4; - return reader.view.getUint32(reader.offset - 4, false); -} - -export function readFloat32(reader: PsdReader) { - reader.offset += 4; - return reader.view.getFloat32(reader.offset - 4, false); -} - -export function readFloat64(reader: PsdReader) { - reader.offset += 8; - return reader.view.getFloat64(reader.offset - 8, false); -} - -// 32-bit fixed-point number 16.16 -export function readFixedPoint32(reader: PsdReader): number { - return readInt32(reader) / (1 << 16); -} - -// 32-bit fixed-point number 8.24 -export function readFixedPointPath32(reader: PsdReader): number { - return readInt32(reader) / (1 << 24); -} - -export function readBytes(reader: PsdReader, length: number) { - const start = reader.view.byteOffset + reader.offset; - reader.offset += length; - - if ((start + length) > reader.view.buffer.byteLength) { - // fix for broken PSD files that are missing part of file at the end - warnOrThrow(reader, 'Reading bytes exceeding buffer length'); - if (length > (100 * 1024 * 1024)) throw new Error('Reading past end of file'); // limit to 100MB - const result = new Uint8Array(length); - const len = Math.min(length, reader.view.byteLength - start); - if (len > 0) result.set(new Uint8Array(reader.view.buffer, start, len)); - return result; - } else { - return new Uint8Array(reader.view.buffer, start, length); - } -} - -export function readSignature(reader: PsdReader) { - return readShortString(reader, 4); -} - -export function readPascalString(reader: PsdReader, padTo: number) { - let length = readUint8(reader); - const text = length ? readShortString(reader, length) : ''; - - while (++length % padTo) { - reader.offset++; - } - - return text; -} - -export function readUnicodeString(reader: PsdReader) { - const length = readUint32(reader); - return readUnicodeStringWithLength(reader, length); -} - -export function readUnicodeStringWithLength(reader: PsdReader, length: number) { - let text = ''; - - while (length--) { - const value = readUint16(reader); - - if (value || length > 0) { // remove trailing \0 - text += String.fromCharCode(value); - } - } - - return text; -} - -export function readAsciiString(reader: PsdReader, length: number) { - let text = ''; - - while (length--) { - text += String.fromCharCode(readUint8(reader)); - } - - return text; -} - -export function skipBytes(reader: PsdReader, count: number) { - reader.offset += count; -} - -export function checkSignature(reader: PsdReader, a: string, b?: string) { - const offset = reader.offset; - const signature = readSignature(reader); - - if (signature !== a && signature !== b) { - throw new Error(`Invalid signature: '${signature}' at 0x${offset.toString(16)}`); - } -} - -function readShortString(reader: PsdReader, length: number) { - const buffer = readBytes(reader, length); - let result = ''; - - for (let i = 0; i < buffer.length; i++) { - result += String.fromCharCode(buffer[i]); - } - - return result; -} - -function isValidSignature(sig: string) { - return sig === '8BIM' || sig === 'MeSa' || sig === 'AgHg' || sig === 'PHUT' || sig === 'DCSR'; -} - -export function readPsd(reader: PsdReader, options: ReadOptions = {}) { - // header - checkSignature(reader, '8BPS'); - const version = readUint16(reader); - if (version !== 1 && version !== 2) throw new Error(`Invalid PSD file version: ${version}`); - - skipBytes(reader, 6); - const channels = readUint16(reader); - const height = readUint32(reader); - const width = readUint32(reader); - const bitsPerChannel = readUint16(reader); - const colorMode = readUint16(reader); - const maxSize = version === 1 ? 30000 : 300000; - - if (width > maxSize || height > maxSize) throw new Error(`Invalid size`); - if (channels > 16) throw new Error(`Invalid channel count`); - if (bitsPerChannel > 32) throw new Error(`Invalid bitsPerChannel count`); - if (supportedColorModes.indexOf(colorMode) === -1) - throw new Error(`Color mode not supported: ${colorModes[colorMode] ?? colorMode}`); - - const psd: Psd = { width, height, channels, bitsPerChannel, colorMode }; - const opt: ReadOptionsExt = { ...options, large: version === 2 }; - const fixOffsets = [0, 1, -1, 2, -2, 3, -3, 4, -4]; - - // color mode data - readSection(reader, 1, left => { - if (opt.throwForMissingFeatures) throw new Error('Color mode data not supported'); - skipBytes(reader, left()); - }); - - // image resources - readSection(reader, 1, left => { - while (left()) { - const sigOffset = reader.offset; - let sig = ''; - - // attempt to fix broken document by realigning with the signature - for (const offset of fixOffsets) { - try { - reader.offset = sigOffset + offset; - sig = readSignature(reader); - } catch { } - if (isValidSignature(sig)) break; - } - - if (!isValidSignature(sig)) { - throw new Error(`Invalid signature: '${sig}' at 0x${(sigOffset).toString(16)}`); - } - - const id = readUint16(reader); - readPascalString(reader, 2); // name - - readSection(reader, 2, left => { - const handler = resourceHandlersMap[id]; - const skip = id === 1036 && !!opt.skipThumbnail; - - if (!psd.imageResources) { - psd.imageResources = {}; - } - - if (handler && !skip) { - try { - handler.read(reader, psd.imageResources, left, opt); - } catch (e) { - if (opt.throwForMissingFeatures) throw e; - skipBytes(reader, left()); - } - } else { - // options.logMissingFeatures && console.log(`Unhandled image resource: ${id}`); - skipBytes(reader, left()); - } - }); - } - }); - - // layer and mask info - let globalAlpha = false; - - readSection(reader, 1, left => { - globalAlpha = readLayerInfo(reader, psd, opt); - - // SAI does not include this section - if (left() > 0) { - const globalLayerMaskInfo = readGlobalLayerMaskInfo(reader); - if (globalLayerMaskInfo) psd.globalLayerMaskInfo = globalLayerMaskInfo; - } else { - // revert back to end of section if exceeded section limits - // opt.logMissingFeatures && console.log('reverting to end of section'); - skipBytes(reader, left()); - } - - while (left() > 0) { - // sometimes there are empty bytes here - while (left() && peekUint8(reader) === 0) { - // opt.logMissingFeatures && console.log('skipping 0 byte'); - skipBytes(reader, 1); - } - - if (left() >= 12) { - readAdditionalLayerInfo(reader, psd, psd, opt); - } else { - // opt.logMissingFeatures && console.log('skipping leftover bytes', left()); - skipBytes(reader, left()); - } - } - }, undefined, opt.large); - - const hasChildren = psd.children && psd.children.length; - const skipComposite = opt.skipCompositeImageData && (opt.skipLayerImageData || hasChildren); - - if (!skipComposite) { - readImageData(reader, psd, globalAlpha, opt); - } - - // TODO: show converted color mode instead of original PSD file color mode - // but add option to preserve file color mode (need to return image data instead of canvas in that case) - // psd.colorMode = ColorMode.RGB; // we convert all color modes to RGB - - return psd; -} - -function readLayerInfo(reader: PsdReader, psd: Psd, options: ReadOptionsExt) { - let globalAlpha = false; - - readSection(reader, 2, left => { - let layerCount = readInt16(reader); - - if (layerCount < 0) { - globalAlpha = true; - layerCount = -layerCount; - } - - const layers: Layer[] = []; - const layerChannels: ChannelInfo[][] = []; - - for (let i = 0; i < layerCount; i++) { - const { layer, channels } = readLayerRecord(reader, psd, options); - layers.push(layer); - layerChannels.push(channels); - } - - if (!options.skipLayerImageData) { - for (let i = 0; i < layerCount; i++) { - readLayerChannelImageData(reader, psd, layers[i], layerChannels[i], options); - } - } - - skipBytes(reader, left()); - - if (!psd.children) psd.children = []; - - const stack: (Layer | Psd)[] = [psd]; - - for (let i = layers.length - 1; i >= 0; i--) { - const l = layers[i]; - const type = l.sectionDivider ? l.sectionDivider.type : SectionDividerType.Other; - - if (type === SectionDividerType.OpenFolder || type === SectionDividerType.ClosedFolder) { - l.opened = type === SectionDividerType.OpenFolder; - l.children = []; - stack[stack.length - 1].children!.unshift(l); - stack.push(l); - } else if (type === SectionDividerType.BoundingSectionDivider) { - stack.pop(); - // this was workaround because I didn't know what `lsdk` section was, now it's probably not needed anymore - // } else if (l.name === '' && !l.sectionDivider && !l.top && !l.left && !l.bottom && !l.right) { - // // sometimes layer group terminator doesn't have sectionDivider, so we just guess here (PS bug ?) - // stack.pop(); - } else { - stack[stack.length - 1].children!.unshift(l); - } - } - }, undefined, options.large); - - return globalAlpha; -} - -function readLayerRecord(reader: PsdReader, psd: Psd, options: ReadOptionsExt) { - const layer: Layer = {}; - layer.top = readInt32(reader); - layer.left = readInt32(reader); - layer.bottom = readInt32(reader); - layer.right = readInt32(reader); - - const channelCount = readUint16(reader); - const channels: ChannelInfo[] = []; - - for (let i = 0; i < channelCount; i++) { - let channelID = readInt16(reader) as ChannelID; - let channelLength = readUint32(reader); - - if (options.large) { - if (channelLength !== 0) throw new Error('Sizes larger than 4GB are not supported'); - channelLength = readUint32(reader); - } - - channels.push({ id: channelID, length: channelLength }); - } - - checkSignature(reader, '8BIM'); - const blendMode = readSignature(reader); - if (!toBlendMode[blendMode]) throw new Error(`Invalid blend mode: '${blendMode}'`); - layer.blendMode = toBlendMode[blendMode]; - - layer.opacity = readUint8(reader) / 0xff; - layer.clipping = readUint8(reader) === 1; - - const flags = readUint8(reader); - layer.transparencyProtected = (flags & 0x01) !== 0; - layer.hidden = (flags & 0x02) !== 0; - // 0x04 - obsolete - // 0x08 - 1 for Photoshop 5.0 and later, tells if bit 4 has useful information - // 0x10 - pixel data irrelevant to appearance of document - // 0x20 - ??? - // if (flags & 0x20) (layer as any)._2 = true; // TEMP !!!! - - skipBytes(reader, 1); - - readSection(reader, 1, left => { - const mask = readLayerMaskData(reader, options); - if (mask) layer.mask = mask; - - /*const blendingRanges =*/ readLayerBlendingRanges(reader); - layer.name = readPascalString(reader, 4); - - while (left()) { - readAdditionalLayerInfo(reader, layer, psd, options); - } - }); - - return { layer, channels }; -} - -function readLayerMaskData(reader: PsdReader, options: ReadOptions) { - return readSection(reader, 1, left => { - if (!left()) return undefined; - - const mask: LayerMaskData = {}; - mask.top = readInt32(reader); - mask.left = readInt32(reader); - mask.bottom = readInt32(reader); - mask.right = readInt32(reader); - mask.defaultColor = readUint8(reader); - - const flags = readUint8(reader); - mask.positionRelativeToLayer = (flags & LayerMaskFlags.PositionRelativeToLayer) !== 0; - mask.disabled = (flags & LayerMaskFlags.LayerMaskDisabled) !== 0; - mask.fromVectorData = (flags & LayerMaskFlags.LayerMaskFromRenderingOtherData) !== 0; - - if (flags & LayerMaskFlags.MaskHasParametersAppliedToIt) { - const params = readUint8(reader); - if (params & MaskParams.UserMaskDensity) mask.userMaskDensity = readUint8(reader) / 0xff; - if (params & MaskParams.UserMaskFeather) mask.userMaskFeather = readFloat64(reader); - if (params & MaskParams.VectorMaskDensity) mask.vectorMaskDensity = readUint8(reader) / 0xff; - if (params & MaskParams.VectorMaskFeather) mask.vectorMaskFeather = readFloat64(reader); - } - - if (left() > 2) { - options.logMissingFeatures && console.log('Unhandled extra mask params'); - // TODO: handle these values - /*const realFlags =*/ readUint8(reader); - /*const realUserMaskBackground =*/ readUint8(reader); - /*const top2 =*/ readInt32(reader); - /*const left2 =*/ readInt32(reader); - /*const bottom2 =*/ readInt32(reader); - /*const right2 =*/ readInt32(reader); - } - - skipBytes(reader, left()); - return mask; - }); -} - -function readLayerBlendingRanges(reader: PsdReader) { - return readSection(reader, 1, left => { - const compositeGrayBlendSource = readUint32(reader); - const compositeGraphBlendDestinationRange = readUint32(reader); - const ranges = []; - - while (left()) { - const sourceRange = readUint32(reader); - const destRange = readUint32(reader); - ranges.push({ sourceRange, destRange }); - } - - return { compositeGrayBlendSource, compositeGraphBlendDestinationRange, ranges }; - }); -} - -function readLayerChannelImageData( - reader: PsdReader, psd: Psd, layer: Layer, channels: ChannelInfo[], options: ReadOptionsExt -) { - const layerWidth = (layer.right || 0) - (layer.left || 0); - const layerHeight = (layer.bottom || 0) - (layer.top || 0); - const cmyk = psd.colorMode === ColorMode.CMYK; - - let imageData: ImageData | undefined; - - if (layerWidth && layerHeight) { - if (cmyk) { - imageData = { width: layerWidth, height: layerHeight, data: new Uint8ClampedArray(layerWidth * layerHeight * 5) } as any as ImageData; - for (let p = 4; p < imageData.data.byteLength; p += 5) imageData.data[p] = 255; - } else { - imageData = createImageData(layerWidth, layerHeight); - resetImageData(imageData); - } - } - - if (RAW_IMAGE_DATA) (layer as any).imageDataRaw = []; - - for (const channel of channels) { - if (channel.length === 0) continue; - if (channel.length < 2) throw new Error('Invalid channel length'); - - const start = reader.offset; - - let compression = readUint16(reader) as Compression; - - // try to fix broken files where there's 1 byte shift of channel - if (compression > 3) { - reader.offset -= 1; - compression = readUint16(reader) as Compression; - } - - // try to fix broken files where there's 1 byte shift of channel - if (compression > 3) { - reader.offset -= 3; - compression = readUint16(reader) as Compression; - } - - if (compression > 3) throw new Error(`Invalid compression: ${compression}`); - - if (channel.id === ChannelID.UserMask) { - const mask = layer.mask; - - if (!mask) throw new Error(`Missing layer mask data`); - - const maskWidth = (mask.right || 0) - (mask.left || 0); - const maskHeight = (mask.bottom || 0) - (mask.top || 0); - - if (maskWidth && maskHeight) { - const maskData = createImageData(maskWidth, maskHeight); - resetImageData(maskData); - - const start = reader.offset; - readData(reader, channel.length, maskData, compression, maskWidth, maskHeight, 0, options.large, 4); - - if (RAW_IMAGE_DATA) { - (layer as any).maskDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); - } - - setupGrayscale(maskData); - - if (options.useImageData) { - mask.imageData = maskData; - } else { - mask.canvas = createCanvas(maskWidth, maskHeight); - mask.canvas.getContext('2d')!.putImageData(maskData, 0, 0); - } - } - } else { - const offset = offsetForChannel(channel.id, cmyk); - let targetData = imageData; - - if (offset < 0) { - targetData = undefined; - - if (options.throwForMissingFeatures) { - throw new Error(`Channel not supported: ${channel.id}`); - } - } - - readData(reader, channel.length, targetData, compression, layerWidth, layerHeight, offset, options.large, cmyk ? 5 : 4); - - if (RAW_IMAGE_DATA) { - (layer as any).imageDataRaw[channel.id] = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start + 2, channel.length - 2); - } - - reader.offset = start + channel.length; - - if (targetData && psd.colorMode === ColorMode.Grayscale) { - setupGrayscale(targetData); - } - } - } - - if (imageData) { - if (cmyk) { - const cmykData = imageData; - imageData = createImageData(cmykData.width, cmykData.height); - cmykToRgb(cmykData, imageData, false); - } - - if (options.useImageData) { - layer.imageData = imageData; - } else { - layer.canvas = createCanvas(layerWidth, layerHeight); - layer.canvas.getContext('2d')!.putImageData(imageData, 0, 0); - } - } -} - -function readData( - reader: PsdReader, length: number, data: ImageData | undefined, compression: Compression, width: number, height: number, - offset: number, large: boolean, step: number -) { - if (compression === Compression.RawData) { - readDataRaw(reader, data, width, height, step, offset); - } else if (compression === Compression.RleCompressed) { - readDataRLE(reader, data, width, height, step, [offset], large); - } else if (compression === Compression.ZipWithoutPrediction) { - readDataZipWithoutPrediction(reader, length, data, width, height, step, offset); - } else if (compression === Compression.ZipWithPrediction) { - throw new Error(`Compression type not supported: ${compression}`); - } else { - throw new Error(`Invalid Compression type: ${compression}`); - } -} - -function readGlobalLayerMaskInfo(reader: PsdReader) { - return readSection(reader, 1, left => { - if (!left()) return undefined; - - const overlayColorSpace = readUint16(reader); - const colorSpace1 = readUint16(reader); - const colorSpace2 = readUint16(reader); - const colorSpace3 = readUint16(reader); - const colorSpace4 = readUint16(reader); - const opacity = readUint16(reader) / 0xff; - const kind = readUint8(reader); - skipBytes(reader, left()); // 3 bytes of padding ? - return { overlayColorSpace, colorSpace1, colorSpace2, colorSpace3, colorSpace4, opacity, kind }; - }); -} - -function readAdditionalLayerInfo(reader: PsdReader, target: LayerAdditionalInfo, psd: Psd, options: ReadOptionsExt) { - const sig = readSignature(reader); - if (sig !== '8BIM' && sig !== '8B64') throw new Error(`Invalid signature: '${sig}' at 0x${(reader.offset - 4).toString(16)}`); - const key = readSignature(reader); - - // `largeAdditionalInfoKeys` fallback, because some keys don't have 8B64 signature even when they are 64bit - const u64 = sig === '8B64' || (options.large && largeAdditionalInfoKeys.indexOf(key) !== -1); - - readSection(reader, 2, left => { - const handler = infoHandlersMap[key]; - - if (handler) { - try { - handler.read(reader, target, left, psd, options); - } catch (e) { - if (options.throwForMissingFeatures) throw e; - } - } else { - options.logMissingFeatures && console.log(`Unhandled additional info: ${key}`); - skipBytes(reader, left()); - } - - if (left()) { - options.logMissingFeatures && console.log(`Unread ${left()} bytes left for additional info: ${key}`); - skipBytes(reader, left()); - } - }, false, u64); -} - -function readImageData(reader: PsdReader, psd: Psd, globalAlpha: boolean, options: ReadOptionsExt) { - const compression = readUint16(reader) as Compression; - - if (supportedColorModes.indexOf(psd.colorMode!) === -1) - throw new Error(`Color mode not supported: ${psd.colorMode}`); - - if (compression !== Compression.RawData && compression !== Compression.RleCompressed) - throw new Error(`Compression type not supported: ${compression}`); - - const imageData = createImageData(psd.width, psd.height); - resetImageData(imageData); - - switch (psd.colorMode) { - case ColorMode.Bitmap: { - let bytes: Uint8Array; - - if (compression === Compression.RawData) { - bytes = readBytes(reader, Math.ceil(psd.width / 8) * psd.height); - } else if (compression === Compression.RleCompressed) { - bytes = new Uint8Array(psd.width * psd.height); - readDataRLE(reader, { data: bytes, width: psd.width, height: psd.height }, psd.width, psd.height, 1, [0], options.large); - } else { - throw new Error(`Bitmap compression not supported: ${compression}`); - } - - decodeBitmap(bytes, imageData.data, psd.width, psd.height); - break; - } - case ColorMode.RGB: - case ColorMode.Grayscale: { - const channels = psd.colorMode === ColorMode.Grayscale ? [0] : [0, 1, 2]; - - if (psd.channels && psd.channels > 3) { - for (let i = 3; i < psd.channels; i++) { - // TODO: store these channels in additional image data - channels.push(i); - } - } else if (globalAlpha) { - channels.push(3); - } - - if (compression === Compression.RawData) { - for (let i = 0; i < channels.length; i++) { - readDataRaw(reader, imageData, psd.width, psd.height, 4, channels[i]); - } - } else if (compression === Compression.RleCompressed) { - const start = reader.offset; - readDataRLE(reader, imageData, psd.width, psd.height, 4, channels, options.large); - if (RAW_IMAGE_DATA) (psd as any).imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); - } - - if (psd.colorMode === ColorMode.Grayscale) { - setupGrayscale(imageData); - } - break; - } - case ColorMode.CMYK: { - if (psd.channels !== 4) throw new Error(`Invalid channel count`); - - const channels = [0, 1, 2, 3]; - if (globalAlpha) channels.push(4); - - if (compression === Compression.RawData) { - throw new Error(`Not implemented`); - // TODO: ... - // for (let i = 0; i < channels.length; i++) { - // readDataRaw(reader, imageData, channels[i], psd.width, psd.height); - // } - } else if (compression === Compression.RleCompressed) { - const cmykImageData: PixelData = { - width: imageData.width, - height: imageData.height, - data: new Uint8Array(imageData.width * imageData.height * 5), - }; - - const start = reader.offset; - readDataRLE(reader, cmykImageData, psd.width, psd.height, 5, channels, options.large); - cmykToRgb(cmykImageData, imageData, true); - - if (RAW_IMAGE_DATA) (psd as any).imageDataRaw = new Uint8Array(reader.view.buffer, reader.view.byteOffset + start, reader.offset - start); - } - - break; - } - default: throw new Error(`Color mode not supported: ${psd.colorMode}`); - } - - // remove weird white matte - if (globalAlpha) { - const p = imageData.data; - const size = imageData.width * imageData.height * 4; - for (let i = 0; i < size; i += 4) { - const pa = p[i + 3]; - if (pa != 0 && pa != 255) { - const a = pa / 255; - const ra = 1 / a; - const invA = 255 * (1 - ra); - p[i + 0] = p[i + 0] * ra + invA; - p[i + 1] = p[i + 1] * ra + invA; - p[i + 2] = p[i + 2] * ra + invA; - } - } - } - - if (options.useImageData) { - psd.imageData = imageData; - } else { - psd.canvas = createCanvas(psd.width, psd.height); - psd.canvas.getContext('2d')!.putImageData(imageData, 0, 0); - } -} - -function cmykToRgb(cmyk: PixelData, rgb: PixelData, reverseAlpha: boolean) { - const size = rgb.width * rgb.height * 4; - const srcData = cmyk.data; - const dstData = rgb.data; - - for (let src = 0, dst = 0; dst < size; src += 5, dst += 4) { - const c = srcData[src]; - const m = srcData[src + 1]; - const y = srcData[src + 2]; - const k = srcData[src + 3]; - dstData[dst] = ((((c * k) | 0) / 255) | 0); - dstData[dst + 1] = ((((m * k) | 0) / 255) | 0); - dstData[dst + 2] = ((((y * k) | 0) / 255) | 0); - dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; - } - - // for (let src = 0, dst = 0; dst < size; src += 5, dst += 4) { - // const c = 1 - (srcData[src + 0] / 255); - // const m = 1 - (srcData[src + 1] / 255); - // const y = 1 - (srcData[src + 2] / 255); - // // const k = srcData[src + 3] / 255; - // dstData[dst + 0] = ((1 - c * 0.8) * 255) | 0; - // dstData[dst + 1] = ((1 - m * 0.8) * 255) | 0; - // dstData[dst + 2] = ((1 - y * 0.8) * 255) | 0; - // dstData[dst + 3] = reverseAlpha ? 255 - srcData[src + 4] : srcData[src + 4]; - // } -} - -function readDataRaw(reader: PsdReader, pixelData: PixelData | undefined, width: number, height: number, step: number, offset: number) { - const size = width * height; - const buffer = readBytes(reader, size); - - if (pixelData && offset < step) { - const data = pixelData.data; - - for (let i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { - data[p] = buffer[i]; - } - } -} - -export function readDataZipWithoutPrediction( - reader: PsdReader, length: number, pixelData: PixelData | undefined, width: number, height: number, - step: number, offset: number -) { - const compressed = readBytes(reader, length); - const decompressed = inflate(compressed); - const size = width * height; - - if (pixelData && offset < step) { - const data = pixelData.data; - - for (let i = 0, p = offset | 0; i < size; i++, p = (p + step) | 0) { - data[p] = decompressed[i]; - } - } -} - -export function readDataRLE( - reader: PsdReader, pixelData: PixelData | undefined, _width: number, height: number, step: number, offsets: number[], - large: boolean -) { - const data = pixelData && pixelData.data; - let lengths: Uint16Array | Uint32Array; - - if (large) { - lengths = new Uint32Array(offsets.length * height); - - for (let o = 0, li = 0; o < offsets.length; o++) { - for (let y = 0; y < height; y++, li++) { - lengths[li] = readUint32(reader); - } - } - } else { - lengths = new Uint16Array(offsets.length * height); - - for (let o = 0, li = 0; o < offsets.length; o++) { - for (let y = 0; y < height; y++, li++) { - lengths[li] = readUint16(reader); - } - } - } - - const extraLimit = (step - 1) | 0; // 3 for rgb, 4 for cmyk - - for (let c = 0, li = 0; c < offsets.length; c++) { - const offset = offsets[c] | 0; - const extra = c > extraLimit || offset > extraLimit; - - if (!data || extra) { - for (let y = 0; y < height; y++, li++) { - skipBytes(reader, lengths[li]); - } - } else { - for (let y = 0, p = offset | 0; y < height; y++, li++) { - const length = lengths[li]; - const buffer = readBytes(reader, length); - - for (let i = 0; i < length; i++) { - let header = buffer[i]; - - if (header > 128) { - const value = buffer[++i]; - header = (256 - header) | 0; - - for (let j = 0; j <= header; j = (j + 1) | 0) { - data[p] = value; - p = (p + step) | 0; - } - } else if (header < 128) { - for (let j = 0; j <= header; j = (j + 1) | 0) { - data[p] = buffer[++i]; - p = (p + step) | 0; - } - } else { - // ignore 128 - } - - // This showed up on some images from non-photoshop programs, ignoring it seems to work just fine. - // if (i >= length) throw new Error(`Invalid RLE data: exceeded buffer size ${i}/${length}`); - } - } - } - } -} - -export function readSection( - reader: PsdReader, round: number, func: (left: () => number) => T, skipEmpty = true, eightBytes = false -): T | undefined { - let length = readUint32(reader); - - if (eightBytes) { - if (length !== 0) throw new Error('Sizes larger than 4GB are not supported'); - length = readUint32(reader); - } - - if (length <= 0 && skipEmpty) return undefined; - - let end = reader.offset + length; - if (end > reader.view.byteLength) throw new Error('Section exceeds file size'); - - const result = func(() => end - reader.offset); - - if (reader.offset !== end) { - if (reader.offset > end) { - warnOrThrow(reader, 'Exceeded section limits'); - } else { - warnOrThrow(reader, `Unread section data`); // : ${end - reader.offset} bytes at 0x${reader.offset.toString(16)}`); - } - } - - while (end % round) end++; - reader.offset = end; - - return result; -} - -export function readColor(reader: PsdReader): Color { - const colorSpace = readUint16(reader) as ColorSpace; - - switch (colorSpace) { - case ColorSpace.RGB: { - const r = readUint16(reader) / 257; - const g = readUint16(reader) / 257; - const b = readUint16(reader) / 257; - skipBytes(reader, 2); - return { r, g, b }; - } - case ColorSpace.HSB: { - const h = readUint16(reader) / 0xffff; - const s = readUint16(reader) / 0xffff; - const b = readUint16(reader) / 0xffff; - skipBytes(reader, 2); - return { h, s, b }; - } - case ColorSpace.CMYK: { - const c = readUint16(reader) / 257; - const m = readUint16(reader) / 257; - const y = readUint16(reader) / 257; - const k = readUint16(reader) / 257; - return { c, m, y, k }; - } - case ColorSpace.Lab: { - const l = readInt16(reader) / 10000; - const ta = readInt16(reader); - const tb = readInt16(reader); - const a = ta < 0 ? (ta / 12800) : (ta / 12700); - const b = tb < 0 ? (tb / 12800) : (tb / 12700); - skipBytes(reader, 2); - return { l, a, b }; - } - case ColorSpace.Grayscale: { - const k = readUint16(reader) * 255 / 10000; - skipBytes(reader, 6); - return { k }; - } - default: - throw new Error('Invalid color space'); - } -} - -export function readPattern(reader: PsdReader): PatternInfo { - readUint32(reader); // length - const version = readUint32(reader); - if (version !== 1) throw new Error(`Invalid pattern version: ${version}`); - - const colorMode = readUint32(reader) as ColorMode; - const x = readInt16(reader); - const y = readInt16(reader); - - // we only support RGB and grayscale for now - if (colorMode !== ColorMode.RGB && colorMode !== ColorMode.Grayscale && colorMode !== ColorMode.Indexed) { - throw new Error(`Unsupported pattern color mode: ${colorMode}`); - } - - let name = readUnicodeString(reader); - const id = readPascalString(reader, 1); - const palette: RGB[] = []; - - if (colorMode === ColorMode.Indexed) { - for (let i = 0; i < 256; i++) { - palette.push({ - r: readUint8(reader), - g: readUint8(reader), - b: readUint8(reader), - }) - } - - skipBytes(reader, 4); // no idea what this is - } - - // virtual memory array list - const version2 = readUint32(reader); - if (version2 !== 3) throw new Error(`Invalid pattern VMAL version: ${version2}`); - - readUint32(reader); // length - const top = readUint32(reader); - const left = readUint32(reader); - const bottom = readUint32(reader); - const right = readUint32(reader); - const channelsCount = readUint32(reader); - const width = right - left; - const height = bottom - top; - const data = new Uint8Array(width * height * 4); - - for (let i = 3; i < data.byteLength; i += 4) { - data[i] = 255; - } - - for (let i = 0, ch = 0; i < (channelsCount + 2); i++) { - const has = readUint32(reader); - if (!has) continue; - - const length = readUint32(reader); - const pixelDepth = readUint32(reader); - const ctop = readUint32(reader); - const cleft = readUint32(reader); - const cbottom = readUint32(reader); - const cright = readUint32(reader); - const pixelDepth2 = readUint16(reader); - const compressionMode = readUint8(reader); // 0 - raw, 1 - zip - const dataLength = length - (4 + 16 + 2 + 1); - const cdata = readBytes(reader, dataLength); - - if (pixelDepth !== 8 || pixelDepth2 !== 8) { - throw new Error('16bit pixel depth not supported for patterns'); - } - - const w = cright - cleft; - const h = cbottom - ctop; - const ox = cleft - left; - const oy = ctop - top; - - if (compressionMode === 0) { - if (colorMode === ColorMode.RGB && ch < 3) { - for (let y = 0; y < h; y++) { - for (let x = 0; x < w; x++) { - const src = x + y * w; - const dst = (ox + x + (y + oy) * width) * 4; - data[dst + ch] = cdata[src]; - } - } - } - - if (colorMode === ColorMode.Grayscale && ch < 1) { - for (let y = 0; y < h; y++) { - for (let x = 0; x < w; x++) { - const src = x + y * w; - const dst = (ox + x + (y + oy) * width) * 4; - const value = cdata[src]; - data[dst + 0] = value; - data[dst + 1] = value; - data[dst + 2] = value; - } - } - } - - if (colorMode === ColorMode.Indexed) { - // TODO: - throw new Error('Indexed pattern color mode not implemented'); - } - } else if (compressionMode === 1) { - // console.log({ colorMode }); - // require('fs').writeFileSync('zip.bin', Buffer.from(cdata)); - // const data = require('zlib').inflateRawSync(cdata); - // const data = require('zlib').unzipSync(cdata); - // console.log(data); - // throw new Error('Zip compression not supported for pattern'); - // throw new Error('Unsupported pattern compression'); - console.error('Unsupported pattern compression'); - name += ' (failed to decode)'; - } else { - throw new Error('Invalid pattern compression mode'); - } - - ch++; - } - - // TODO: use canvas instead of data ? - - return { id, name, x, y, bounds: { x: left, y: top, w: width, h: height }, data }; -} diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/psdWriter.ts b/npm-packages/mac-v2.4.x/ag-psd/src/psdWriter.ts deleted file mode 100644 index d8561f7..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/psdWriter.ts +++ /dev/null @@ -1,760 +0,0 @@ -import { Psd, Layer, LayerAdditionalInfo, ColorMode, SectionDividerType, WriteOptions, Color, GlobalLayerMaskInfo } from './psd'; -import { - hasAlpha, createCanvas, writeDataRLE, PixelData, LayerChannelData, ChannelData, - offsetForChannel, createImageData, fromBlendMode, ChannelID, Compression, clamp, - LayerMaskFlags, MaskParams, ColorSpace, Bounds, largeAdditionalInfoKeys, RAW_IMAGE_DATA, writeDataZipWithoutPrediction -} from './helpers'; -import { ExtendedWriteOptions, hasMultiEffects, infoHandlers } from './additionalInfo'; -import { resourceHandlers } from './imageResources'; - -export interface PsdWriter { - offset: number; - buffer: ArrayBuffer; - view: DataView; -} - -export function createWriter(size = 4096): PsdWriter { - const buffer = new ArrayBuffer(size); - const view = new DataView(buffer); - const offset = 0; - return { buffer, view, offset }; -} - -export function getWriterBuffer(writer: PsdWriter) { - return writer.buffer.slice(0, writer.offset); -} - -export function getWriterBufferNoCopy(writer: PsdWriter) { - return new Uint8Array(writer.buffer, 0, writer.offset); -} - -export function writeUint8(writer: PsdWriter, value: number) { - const offset = addSize(writer, 1); - writer.view.setUint8(offset, value); -} - -export function writeInt16(writer: PsdWriter, value: number) { - const offset = addSize(writer, 2); - writer.view.setInt16(offset, value, false); -} - -export function writeUint16(writer: PsdWriter, value: number) { - const offset = addSize(writer, 2); - writer.view.setUint16(offset, value, false); -} - -export function writeInt32(writer: PsdWriter, value: number) { - const offset = addSize(writer, 4); - writer.view.setInt32(offset, value, false); -} - -export function writeUint32(writer: PsdWriter, value: number) { - const offset = addSize(writer, 4); - writer.view.setUint32(offset, value, false); -} - -export function writeFloat32(writer: PsdWriter, value: number) { - const offset = addSize(writer, 4); - writer.view.setFloat32(offset, value, false); -} - -export function writeFloat64(writer: PsdWriter, value: number) { - const offset = addSize(writer, 8); - writer.view.setFloat64(offset, value, false); -} - -// 32-bit fixed-point number 16.16 -export function writeFixedPoint32(writer: PsdWriter, value: number) { - writeInt32(writer, value * (1 << 16)); -} - -// 32-bit fixed-point number 8.24 -export function writeFixedPointPath32(writer: PsdWriter, value: number) { - writeInt32(writer, value * (1 << 24)); -} - -export function writeBytes(writer: PsdWriter, buffer: Uint8Array | undefined) { - if (buffer) { - ensureSize(writer, writer.offset + buffer.length); - const bytes = new Uint8Array(writer.buffer); - bytes.set(buffer, writer.offset); - writer.offset += buffer.length; - } -} - -export function writeZeros(writer: PsdWriter, count: number) { - for (let i = 0; i < count; i++) { - writeUint8(writer, 0); - } -} - -export function writeSignature(writer: PsdWriter, signature: string) { - if (signature.length !== 4) throw new Error(`Invalid signature: '${signature}'`); - - for (let i = 0; i < 4; i++) { - writeUint8(writer, signature.charCodeAt(i)); - } -} - -export function writePascalString(writer: PsdWriter, text: string, padTo: number) { - let length = text.length; - writeUint8(writer, length); - - for (let i = 0; i < length; i++) { - const code = text.charCodeAt(i); - writeUint8(writer, code < 128 ? code : '?'.charCodeAt(0)); - } - - while (++length % padTo) { - writeUint8(writer, 0); - } -} - -export function writeUnicodeString(writer: PsdWriter, text: string) { - writeUint32(writer, text.length); - - for (let i = 0; i < text.length; i++) { - writeUint16(writer, text.charCodeAt(i)); - } -} - -export function writeUnicodeStringWithPadding(writer: PsdWriter, text: string) { - writeUint32(writer, text.length + 1); - - for (let i = 0; i < text.length; i++) { - writeUint16(writer, text.charCodeAt(i)); - } - - writeUint16(writer, 0); -} - -function getLargestLayerSize(layers: Layer[] = []): number { - let max = 0; - - for (const layer of layers) { - if (layer.canvas || layer.imageData) { - const { width, height } = getLayerDimentions(layer); - max = Math.max(max, 2 * height + 2 * width * height); - } - - if (layer.children) { - max = Math.max(max, getLargestLayerSize(layer.children)); - } - } - - return max; -} - -export function writeSection(writer: PsdWriter, round: number, func: () => void, writeTotalLength = false, large = false) { - if (large) writeUint32(writer, 0); - const offset = writer.offset; - writeUint32(writer, 0); - - func(); - - let length = writer.offset - offset - 4; - let len = length; - - while ((len % round) !== 0) { - writeUint8(writer, 0); - len++; - } - - if (writeTotalLength) { - length = len; - } - - writer.view.setUint32(offset, length, false); -} - -export function writePsd(writer: PsdWriter, psd: Psd, options: WriteOptions = {}) { - if (!(+psd.width > 0 && +psd.height > 0)) - throw new Error('Invalid document size'); - - if ((psd.width > 30000 || psd.height > 30000) && !options.psb) - throw new Error('Document size is too large (max is 30000x30000, use PSB format instead)'); - - let imageResources = psd.imageResources || {}; - - const opt: ExtendedWriteOptions = { ...options, layerIds: new Set(), layerToId: new Map() }; - - if (opt.generateThumbnail) { - imageResources = { ...imageResources, thumbnail: createThumbnail(psd) }; - } - - let imageData = psd.imageData; - - if (!imageData && psd.canvas) { - imageData = psd.canvas.getContext('2d')!.getImageData(0, 0, psd.canvas.width, psd.canvas.height); - } - - if (imageData && (psd.width !== imageData.width || psd.height !== imageData.height)) - throw new Error('Document canvas must have the same size as document'); - - const globalAlpha = !!imageData && hasAlpha(imageData); - const maxBufferSize = Math.max(getLargestLayerSize(psd.children), 4 * 2 * psd.width * psd.height + 2 * psd.height); - const tempBuffer = new Uint8Array(maxBufferSize); - - // header - writeSignature(writer, '8BPS'); - writeUint16(writer, options.psb ? 2 : 1); // version - writeZeros(writer, 6); - writeUint16(writer, globalAlpha ? 4 : 3); // channels - writeUint32(writer, psd.height); - writeUint32(writer, psd.width); - writeUint16(writer, 8); // bits per channel - writeUint16(writer, ColorMode.RGB); // we only support saving RGB right now - - // color mode data - writeSection(writer, 1, () => { - // TODO: implement - }); - - // image resources - writeSection(writer, 1, () => { - for (const handler of resourceHandlers) { - const has = handler.has(imageResources); - const count = has === false ? 0 : (has === true ? 1 : has); - for (let i = 0; i < count; i++) { - writeSignature(writer, '8BIM'); - writeUint16(writer, handler.key); - writePascalString(writer, '', 2); - writeSection(writer, 2, () => handler.write(writer, imageResources, i)); - } - } - }); - - // layer and mask info - writeSection(writer, 2, () => { - writeLayerInfo(tempBuffer, writer, psd, globalAlpha, opt); - writeGlobalLayerMaskInfo(writer, psd.globalLayerMaskInfo); - writeAdditionalLayerInfo(writer, psd, psd, opt); - }, undefined, !!opt.psb); - - // image data - const channels = globalAlpha ? [0, 1, 2, 3] : [0, 1, 2]; - const width = imageData ? imageData.width : psd.width; - const height = imageData ? imageData.height : psd.height; - const data: PixelData = { data: new Uint8Array(width * height * 4), width, height }; - - writeUint16(writer, Compression.RleCompressed); // Photoshop doesn't support zip compression of composite image data - - if (RAW_IMAGE_DATA && (psd as any).imageDataRaw) { - console.log('writing raw image data'); - writeBytes(writer, (psd as any).imageDataRaw); - } else { - if (imageData) data.data.set(new Uint8Array(imageData.data.buffer, imageData.data.byteOffset, imageData.data.byteLength)); - - // add weird white matte - if (globalAlpha) { - const size = data.width * data.height * 4; - const p = data.data; - for (let i = 0; i < size; i += 4) { - const pa = p[i + 3]; - if (pa != 0 && pa != 255) { - const a = pa / 255; - const ra = 255 * (1 - a); - p[i + 0] = p[i + 0] * a + ra; - p[i + 1] = p[i + 1] * a + ra; - p[i + 2] = p[i + 2] * a + ra; - } - } - } - - writeBytes(writer, writeDataRLE(tempBuffer, data, channels, !!options.psb)); - } -} - -function writeLayerInfo(tempBuffer: Uint8Array, writer: PsdWriter, psd: Psd, globalAlpha: boolean, options: ExtendedWriteOptions) { - writeSection(writer, 4, () => { - const layers: Layer[] = []; - - addChildren(layers, psd.children); - - if (!layers.length) layers.push({}); - - writeInt16(writer, globalAlpha ? -layers.length : layers.length); - - const layersData = layers.map((l, i) => getChannels(tempBuffer, l, i === 0, options)); - - // layer records - for (const layerData of layersData) { - const { layer, top, left, bottom, right, channels } = layerData; - - writeInt32(writer, top); - writeInt32(writer, left); - writeInt32(writer, bottom); - writeInt32(writer, right); - writeUint16(writer, channels.length); - - for (const c of channels) { - writeInt16(writer, c.channelId); - if (options.psb) writeUint32(writer, 0); - writeUint32(writer, c.length); - } - - writeSignature(writer, '8BIM'); - writeSignature(writer, fromBlendMode[layer.blendMode!] || 'norm'); - writeUint8(writer, Math.round(clamp(layer.opacity ?? 1, 0, 1) * 255)); - writeUint8(writer, layer.clipping ? 1 : 0); - - let flags = 0x08; // 1 for Photoshop 5.0 and later, tells if bit 4 has useful information - if (layer.transparencyProtected) flags |= 0x01; - if (layer.hidden) flags |= 0x02; - if (layer.vectorMask || (layer.sectionDivider && layer.sectionDivider.type !== SectionDividerType.Other)) { - flags |= 0x10; // pixel data irrelevant to appearance of document - } - if (layer.effects && hasMultiEffects(layer.effects)) { // TODO: this is not correct - flags |= 0x20; // just guessing this one, might be completely incorrect - } - // if ('_2' in layer) flags |= 0x20; // TEMP!!! - - writeUint8(writer, flags); - writeUint8(writer, 0); // filler - writeSection(writer, 1, () => { - writeLayerMaskData(writer, layer, layerData); - writeLayerBlendingRanges(writer, psd); - writePascalString(writer, layer.name || '', 4); - writeAdditionalLayerInfo(writer, layer, psd, options); - }); - } - - // layer channel image data - for (const layerData of layersData) { - for (const channel of layerData.channels) { - writeUint16(writer, channel.compression); - - if (channel.buffer) { - writeBytes(writer, channel.buffer); - } - } - } - }, true, options.psb); -} - -function writeLayerMaskData(writer: PsdWriter, { mask }: Layer, layerData: LayerChannelData) { - writeSection(writer, 1, () => { - if (!mask) return; - - const m = layerData.mask || {} as Partial; - writeInt32(writer, m.top!); - writeInt32(writer, m.left!); - writeInt32(writer, m.bottom!); - writeInt32(writer, m.right!); - writeUint8(writer, mask.defaultColor!); - - let params = 0; - if (mask.userMaskDensity !== undefined) params |= MaskParams.UserMaskDensity; - if (mask.userMaskFeather !== undefined) params |= MaskParams.UserMaskFeather; - if (mask.vectorMaskDensity !== undefined) params |= MaskParams.VectorMaskDensity; - if (mask.vectorMaskFeather !== undefined) params |= MaskParams.VectorMaskFeather; - - let flags = 0; - if (mask.disabled) flags |= LayerMaskFlags.LayerMaskDisabled; - if (mask.positionRelativeToLayer) flags |= LayerMaskFlags.PositionRelativeToLayer; - if (mask.fromVectorData) flags |= LayerMaskFlags.LayerMaskFromRenderingOtherData; - if (params) flags |= LayerMaskFlags.MaskHasParametersAppliedToIt; - - writeUint8(writer, flags); - - if (params) { - writeUint8(writer, params); - - if (mask.userMaskDensity !== undefined) writeUint8(writer, Math.round(mask.userMaskDensity * 0xff)); - if (mask.userMaskFeather !== undefined) writeFloat64(writer, mask.userMaskFeather); - if (mask.vectorMaskDensity !== undefined) writeUint8(writer, Math.round(mask.vectorMaskDensity * 0xff)); - if (mask.vectorMaskFeather !== undefined) writeFloat64(writer, mask.vectorMaskFeather); - } - - // TODO: handle rest of the fields - - writeZeros(writer, 2); - }); -} - -function writeLayerBlendingRanges(writer: PsdWriter, psd: Psd) { - writeSection(writer, 1, () => { - writeUint32(writer, 65535); - writeUint32(writer, 65535); - - let channels = psd.channels || 0; // TODO: use always 4 instead ? - // channels = 4; // TESTING - - for (let i = 0; i < channels; i++) { - writeUint32(writer, 65535); - writeUint32(writer, 65535); - } - }); -} - -function writeGlobalLayerMaskInfo(writer: PsdWriter, info: GlobalLayerMaskInfo | undefined) { - writeSection(writer, 1, () => { - if (info) { - writeUint16(writer, info.overlayColorSpace); - writeUint16(writer, info.colorSpace1); - writeUint16(writer, info.colorSpace2); - writeUint16(writer, info.colorSpace3); - writeUint16(writer, info.colorSpace4); - writeUint16(writer, info.opacity * 0xff); - writeUint8(writer, info.kind); - writeZeros(writer, 3); - } - }); -} - -function writeAdditionalLayerInfo(writer: PsdWriter, target: LayerAdditionalInfo, psd: Psd, options: ExtendedWriteOptions) { - for (const handler of infoHandlers) { - let key = handler.key; - - if (key === 'Txt2' && options.invalidateTextLayers) continue; - if (key === 'vmsk' && options.psb) key = 'vsms'; - - if (handler.has(target)) { - const large = options.psb && largeAdditionalInfoKeys.indexOf(key) !== -1; - - writeSignature(writer, large ? '8B64' : '8BIM'); - writeSignature(writer, key); - - const fourBytes = key === 'Txt2' || key === 'luni' || key === 'vmsk' || key === 'artb' || key === 'artd' || - key === 'vogk' || key === 'SoLd' || key === 'lnk2' || key === 'vscg' || key === 'vsms' || key === 'GdFl' || - key === 'lmfx' || key === 'lrFX' || key === 'cinf' || key === 'PlLd' || key === 'Anno'; - - writeSection(writer, fourBytes ? 4 : 2, () => { - handler.write(writer, target, psd, options); - }, key !== 'Txt2' && key !== 'cinf' && key !== 'extn', large); - } - } -} - -function addChildren(layers: Layer[], children: Layer[] | undefined) { - if (!children) return; - - for (const c of children) { - if (c.children && c.canvas) throw new Error(`Invalid layer, cannot have both 'canvas' and 'children' properties`); - if (c.children && c.imageData) throw new Error(`Invalid layer, cannot have both 'imageData' and 'children' properties`); - - if (c.children) { - layers.push({ - name: '', - sectionDivider: { - type: SectionDividerType.BoundingSectionDivider, - }, - // TESTING - // nameSource: 'lset', - // id: [4, 0, 0, 8, 11, 0, 0, 0, 0, 14][layers.length] || 0, - // layerColor: 'none', - // timestamp: [1611346817.349021, 0, 0, 1611346817.349175, 1611346817.3491833, 0, 0, 0, 0, 1611346817.349832][layers.length] || 0, - // protected: {}, - // referencePoint: { x: 0, y: 0 }, - }); - addChildren(layers, c.children); - layers.push({ - sectionDivider: { - type: c.opened === false ? SectionDividerType.ClosedFolder : SectionDividerType.OpenFolder, - key: fromBlendMode[c.blendMode!] || 'pass', - subType: 0, - }, - ...c, - }); - } else { - layers.push({ ...c }); - } - } -} - -function resizeBuffer(writer: PsdWriter, size: number) { - let newLength = writer.buffer.byteLength; - - do { - newLength *= 2; - } while (size > newLength); - - const newBuffer = new ArrayBuffer(newLength); - const newBytes = new Uint8Array(newBuffer); - const oldBytes = new Uint8Array(writer.buffer); - newBytes.set(oldBytes); - writer.buffer = newBuffer; - writer.view = new DataView(writer.buffer); -} - -function ensureSize(writer: PsdWriter, size: number) { - if (size > writer.buffer.byteLength) { - resizeBuffer(writer, size); - } -} - -function addSize(writer: PsdWriter, size: number) { - const offset = writer.offset; - ensureSize(writer, writer.offset += size); - return offset; -} - -function createThumbnail(psd: Psd) { - const canvas = createCanvas(10, 10); - let scale = 1; - - if (psd.width > psd.height) { - canvas.width = 160; - canvas.height = Math.floor(psd.height * (canvas.width / psd.width)); - scale = canvas.width / psd.width; - } else { - canvas.height = 160; - canvas.width = Math.floor(psd.width * (canvas.height / psd.height)); - scale = canvas.height / psd.height; - } - - const context = canvas.getContext('2d')!; - context.scale(scale, scale); - - if (psd.imageData) { - const temp = createCanvas(psd.imageData.width, psd.imageData.height); - temp.getContext('2d')!.putImageData(psd.imageData, 0, 0); - context.drawImage(temp, 0, 0); - } else if (psd.canvas) { - context.drawImage(psd.canvas, 0, 0); - } - - return canvas; -} - -function getChannels( - tempBuffer: Uint8Array, layer: Layer, background: boolean, options: WriteOptions -): LayerChannelData { - const layerData = getLayerChannels(tempBuffer, layer, background, options); - const mask = layer.mask; - - if (mask) { - let top = (mask.top as any) | 0; - let left = (mask.left as any) | 0; - let right = (mask.right as any) | 0; - let bottom = (mask.bottom as any) | 0; - let { width, height } = getLayerDimentions(mask); - let imageData = mask.imageData; - - if (!imageData && mask.canvas && width && height) { - imageData = mask.canvas.getContext('2d')!.getImageData(0, 0, width, height); - } - - if (width && height && imageData) { - right = left + width; - bottom = top + height; - - if (imageData.width !== width || imageData.height !== height) { - throw new Error('Invalid imageData dimentions'); - } - - let buffer: Uint8Array; - let compression: Compression; - - if (RAW_IMAGE_DATA && (layer as any).maskDataRaw) { - // console.log('written raw layer image data'); - buffer = (layer as any).maskDataRaw; - compression = Compression.RleCompressed; - } else if (options.compress) { - buffer = writeDataZipWithoutPrediction(imageData, [0]); - compression = Compression.ZipWithoutPrediction; - } else { - buffer = writeDataRLE(tempBuffer, imageData, [0], !!options.psb)!; - compression = Compression.RleCompressed; - } - - layerData.mask = { top, left, right, bottom }; - layerData.channels.push({ channelId: ChannelID.UserMask, compression, buffer, length: 2 + buffer.length }); - } else { - layerData.mask = { top: 0, left: 0, right: 0, bottom: 0 }; - layerData.channels.push({ channelId: ChannelID.UserMask, compression: Compression.RawData, buffer: new Uint8Array(0), length: 0 }); - } - } - - return layerData; -} - -function getLayerDimentions({ canvas, imageData }: Layer): { width: number; height: number; } { - return imageData || canvas || { width: 0, height: 0 }; -} - -function cropImageData(data: ImageData, left: number, top: number, width: number, height: number) { - const croppedData = createImageData(width, height); - const srcData = data.data; - const dstData = croppedData.data; - - for (let y = 0; y < height; y++) { - for (let x = 0; x < width; x++) { - let src = ((x + left) + (y + top) * width) * 4; - let dst = (x + y * width) * 4; - dstData[dst] = srcData[src]; - dstData[dst + 1] = srcData[src + 1]; - dstData[dst + 2] = srcData[src + 2]; - dstData[dst + 3] = srcData[src + 3]; - } - } - - return croppedData; -} - -function getLayerChannels( - tempBuffer: Uint8Array, layer: Layer, background: boolean, options: WriteOptions -): LayerChannelData { - let top = (layer.top as any) | 0; - let left = (layer.left as any) | 0; - let right = (layer.right as any) | 0; - let bottom = (layer.bottom as any) | 0; - let channels: ChannelData[] = [ - { channelId: ChannelID.Transparency, compression: Compression.RawData, buffer: undefined, length: 2 }, - { channelId: ChannelID.Color0, compression: Compression.RawData, buffer: undefined, length: 2 }, - { channelId: ChannelID.Color1, compression: Compression.RawData, buffer: undefined, length: 2 }, - { channelId: ChannelID.Color2, compression: Compression.RawData, buffer: undefined, length: 2 }, - ]; - let { width, height } = getLayerDimentions(layer); - - if (!(layer.canvas || layer.imageData) || !width || !height) { - right = left; - bottom = top; - return { layer, top, left, right, bottom, channels }; - } - - right = left + width; - bottom = top + height; - - let data = layer.imageData || layer.canvas!.getContext('2d')!.getImageData(0, 0, width, height); - - if (options.trimImageData) { - const trimmed = trimData(data); - - if (trimmed.left !== 0 || trimmed.top !== 0 || trimmed.right !== data.width || trimmed.bottom !== data.height) { - left += trimmed.left; - top += trimmed.top; - right -= (data.width - trimmed.right); - bottom -= (data.height - trimmed.bottom); - width = right - left; - height = bottom - top; - - if (!width || !height) { - return { layer, top, left, right, bottom, channels }; - } - - if (layer.imageData) { - data = cropImageData(data, trimmed.left, trimmed.top, width, height); - } else { - data = layer.canvas!.getContext('2d')!.getImageData(trimmed.left, trimmed.top, width, height); - } - } - } - - const channelIds = [ - ChannelID.Color0, - ChannelID.Color1, - ChannelID.Color2, - ]; - - if (!background || options.noBackground || layer.mask || hasAlpha(data) || (RAW_IMAGE_DATA && (layer as any).imageDataRaw?.['-1'])) { - channelIds.unshift(ChannelID.Transparency); - } - - channels = channelIds.map(channelId => { - const offset = offsetForChannel(channelId, false); // TODO: psd.colorMode === ColorMode.CMYK); - let buffer: Uint8Array; - let compression: Compression; - - if (RAW_IMAGE_DATA && (layer as any).imageDataRaw) { - // console.log('written raw layer image data'); - buffer = (layer as any).imageDataRaw[channelId]; - compression = Compression.RleCompressed; - } else if (options.compress) { - buffer = writeDataZipWithoutPrediction(data, [offset]); - compression = Compression.ZipWithoutPrediction; - } else { - buffer = writeDataRLE(tempBuffer, data, [offset], !!options.psb)!; - compression = Compression.RleCompressed; - } - - return { channelId, compression, buffer, length: 2 + buffer.length }; - }); - - return { layer, top, left, right, bottom, channels }; -} - -function isRowEmpty({ data, width }: PixelData, y: number, left: number, right: number) { - const start = ((y * width + left) * 4 + 3) | 0; - const end = (start + (right - left) * 4) | 0; - - for (let i = start; i < end; i = (i + 4) | 0) { - if (data[i] !== 0) { - return false; - } - } - - return true; -} - -function isColEmpty({ data, width }: PixelData, x: number, top: number, bottom: number) { - const stride = (width * 4) | 0; - const start = (top * stride + x * 4 + 3) | 0; - - for (let y = top, i = start; y < bottom; y++, i = (i + stride) | 0) { - if (data[i] !== 0) { - return false; - } - } - - return true; -} - -function trimData(data: PixelData) { - let top = 0; - let left = 0; - let right = data.width; - let bottom = data.height; - - while (top < bottom && isRowEmpty(data, top, left, right)) - top++; - while (bottom > top && isRowEmpty(data, bottom - 1, left, right)) - bottom--; - while (left < right && isColEmpty(data, left, top, bottom)) - left++; - while (right > left && isColEmpty(data, right - 1, top, bottom)) - right--; - - return { top, left, right, bottom }; -} - -export function writeColor(writer: PsdWriter, color: Color | undefined) { - if (!color) { - writeUint16(writer, ColorSpace.RGB); - writeZeros(writer, 8); - } else if ('r' in color) { - writeUint16(writer, ColorSpace.RGB); - writeUint16(writer, Math.round(color.r * 257)); - writeUint16(writer, Math.round(color.g * 257)); - writeUint16(writer, Math.round(color.b * 257)); - writeUint16(writer, 0); - } else if ('fr' in color) { - writeUint16(writer, ColorSpace.RGB); - writeUint16(writer, Math.round(color.fr * 255 * 257)); - writeUint16(writer, Math.round(color.fg * 255 * 257)); - writeUint16(writer, Math.round(color.fb * 255 * 257)); - writeUint16(writer, 0); - } else if ('l' in color) { - writeUint16(writer, ColorSpace.Lab); - writeInt16(writer, Math.round(color.l * 10000)); - writeInt16(writer, Math.round(color.a < 0 ? (color.a * 12800) : (color.a * 12700))); - writeInt16(writer, Math.round(color.b < 0 ? (color.b * 12800) : (color.b * 12700))); - writeUint16(writer, 0); - } else if ('h' in color) { - writeUint16(writer, ColorSpace.HSB); - writeUint16(writer, Math.round(color.h * 0xffff)); - writeUint16(writer, Math.round(color.s * 0xffff)); - writeUint16(writer, Math.round(color.b * 0xffff)); - writeUint16(writer, 0); - } else if ('c' in color) { - writeUint16(writer, ColorSpace.CMYK); - writeUint16(writer, Math.round(color.c * 257)); - writeUint16(writer, Math.round(color.m * 257)); - writeUint16(writer, Math.round(color.y * 257)); - writeUint16(writer, Math.round(color.k * 257)); - } else { - writeUint16(writer, ColorSpace.Grayscale); - writeUint16(writer, Math.round(color.k * 10000 / 255)); - writeZeros(writer, 6); - } -} diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/text.ts b/npm-packages/mac-v2.4.x/ag-psd/src/text.ts deleted file mode 100644 index b40e6ef..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/text.ts +++ /dev/null @@ -1,752 +0,0 @@ -import { TextStyle, LayerTextData, ParagraphStyle, Font, AntiAlias, TextGridInfo, Justification, Color } from './psd'; - -interface Adjustments { - Axis: number[]; - XY: number[]; -} - -interface TypeValues { - Type: number; - Values: number[]; -} - -interface ParagraphProperties { - Justification?: number; - FirstLineIndent?: number; - StartIndent?: number; - EndIndent?: number; - SpaceBefore?: number; - SpaceAfter?: number; - AutoHyphenate?: boolean; - HyphenatedWordSize?: number; - PreHyphen?: number; - PostHyphen?: number; - ConsecutiveHyphens?: number; - Zone?: number; - WordSpacing?: number[]; - LetterSpacing?: number[]; - GlyphSpacing?: number[]; - AutoLeading?: number; - LeadingType?: number; - Hanging?: boolean; - Burasagari?: boolean; - KinsokuOrder?: number; - EveryLineComposer?: boolean; -} - -interface ParagraphSheet { - Name?: string; - DefaultStyleSheet: number; - Properties: ParagraphProperties; -} - -interface StyleSheetData { - Font?: number; - FontSize?: number; - FauxBold?: boolean; - FauxItalic?: boolean; - AutoLeading?: boolean; - Leading?: number; - HorizontalScale?: number; - VerticalScale?: number; - Tracking?: number; - AutoKerning?: boolean; - Kerning?: number; - BaselineShift?: number; - FontCaps?: number; - FontBaseline?: number; - Underline?: boolean; - Strikethrough?: boolean; - Ligatures?: boolean; - DLigatures?: boolean; - BaselineDirection?: number; - Tsume?: number; - StyleRunAlignment?: number; - Language?: number; - NoBreak?: boolean; - FillColor?: TypeValues; - StrokeColor?: TypeValues; - FillFlag?: boolean; - StrokeFlag?: boolean; - FillFirst?: boolean; - YUnderline?: number; - OutlineWidth?: number; - CharacterDirection?: number; - HindiNumbers?: boolean; - Kashida?: number; - DiacriticPos?: number; -} - -interface FontSet { - Name: string; - Script: number; - FontType: number; - Synthetic: number; -} - -interface ResourceDict { - KinsokuSet: any[]; - MojiKumiSet: any[]; - TheNormalStyleSheet: number; - TheNormalParagraphSheet: number; - ParagraphSheetSet: ParagraphSheet[]; - StyleSheetSet: { Name: string; StyleSheetData: StyleSheetData; }[]; - FontSet: FontSet[]; - SuperscriptSize: number; - SuperscriptPosition: number; - SubscriptSize: number; - SubscriptPosition: number; - SmallCapSize: number; -} - -interface ParagraphRun { - ParagraphSheet: ParagraphSheet; - Adjustments: Adjustments; -} - -interface StyleRun { - StyleSheet: { StyleSheetData: StyleSheetData; }; -} - -interface PhotoshopNode { - ShapeType?: number; - PointBase?: number[]; - BoxBounds?: number[]; - Base?: { - ShapeType: number; - TransformPoint0: number[]; - TransformPoint1: number[]; - TransformPoint2: number[]; - }; -} - -interface EngineData { - EngineDict: { - Editor: { Text: string; }; - ParagraphRun: { - DefaultRunData: ParagraphRun; - RunArray: ParagraphRun[]; - RunLengthArray: number[]; - IsJoinable: number; - }; - StyleRun: { - DefaultRunData: StyleRun; - RunArray: StyleRun[]; - RunLengthArray: number[]; - IsJoinable: number; - }; - GridInfo: { - GridIsOn: boolean; - ShowGrid: boolean; - GridSize: number; - GridLeading: number; - GridColor: TypeValues; - GridLeadingFillColor: TypeValues; - AlignLineHeightToGridFlags: boolean; - }; - AntiAlias: number; - UseFractionalGlyphWidths: boolean; - Rendered?: { - Version: number; - Shapes?: { - WritingDirection: number; - Children?: { - ShapeType?: number; - Procession: number; - Lines: { WritingDirection: number; Children: any[]; }; - Cookie?: { - Photoshop?: PhotoshopNode; - }; - }[]; - }; - }; - }; - ResourceDict: ResourceDict; - DocumentResources: ResourceDict; -} - -const defaultFont: Font = { - name: 'MyriadPro-Regular', - script: 0, - type: 0, - synthetic: 0, -}; - -const defaultParagraphStyle: ParagraphStyle = { - justification: 'left', - firstLineIndent: 0, - startIndent: 0, - endIndent: 0, - spaceBefore: 0, - spaceAfter: 0, - autoHyphenate: true, - hyphenatedWordSize: 6, - preHyphen: 2, - postHyphen: 2, - consecutiveHyphens: 8, - zone: 36, - wordSpacing: [0.8, 1, 1.33], - letterSpacing: [0, 0, 0], - glyphSpacing: [1, 1, 1], - autoLeading: 1.2, - leadingType: 0, - hanging: false, - burasagari: false, - kinsokuOrder: 0, - everyLineComposer: false, -}; - -const defaultStyle: TextStyle = { - font: defaultFont, - fontSize: 12, - fauxBold: false, - fauxItalic: false, - autoLeading: true, - leading: 0, - horizontalScale: 1, - verticalScale: 1, - tracking: 0, - autoKerning: true, - kerning: 0, - baselineShift: 0, - fontCaps: 0, - fontBaseline: 0, - underline: false, - strikethrough: false, - ligatures: true, - dLigatures: false, - baselineDirection: 2, - tsume: 0, - styleRunAlignment: 2, - language: 0, - noBreak: false, - fillColor: { r: 0, g: 0, b: 0 }, - strokeColor: { r: 0, g: 0, b: 0 }, - fillFlag: true, - strokeFlag: false, - fillFirst: true, - yUnderline: 1, - outlineWidth: 1, - characterDirection: 0, - hindiNumbers: false, - kashida: 1, - diacriticPos: 2, -}; - -const defaultGridInfo: TextGridInfo = { - isOn: false, - show: false, - size: 18, - leading: 22, - color: { r: 0, g: 0, b: 255 }, - leadingFillColor: { r: 0, g: 0, b: 255 }, - alignLineHeightToGridFlags: false, -}; - -const paragraphStyleKeys: (keyof ParagraphStyle)[] = [ - 'justification', 'firstLineIndent', 'startIndent', 'endIndent', 'spaceBefore', 'spaceAfter', - 'autoHyphenate', 'hyphenatedWordSize', 'preHyphen', 'postHyphen', 'consecutiveHyphens', - 'zone', 'wordSpacing', 'letterSpacing', 'glyphSpacing', 'autoLeading', 'leadingType', - 'hanging', 'burasagari', 'kinsokuOrder', 'everyLineComposer', -]; - -const styleKeys: (keyof TextStyle)[] = [ - 'font', 'fontSize', 'fauxBold', 'fauxItalic', 'autoLeading', 'leading', 'horizontalScale', - 'verticalScale', 'tracking', 'autoKerning', 'kerning', 'baselineShift', 'fontCaps', 'fontBaseline', - 'underline', 'strikethrough', 'ligatures', 'dLigatures', 'baselineDirection', 'tsume', - 'styleRunAlignment', 'language', 'noBreak', 'fillColor', 'strokeColor', 'fillFlag', - 'strokeFlag', 'fillFirst', 'yUnderline', 'outlineWidth', 'characterDirection', 'hindiNumbers', - 'kashida', 'diacriticPos', -]; - -const antialias: AntiAlias[] = ['none', 'crisp', 'strong', 'smooth', 'sharp']; -const justification: Justification[] = ['left', 'right', 'center']; - -function upperFirst(value: string) { - return value.substr(0, 1).toUpperCase() + value.substr(1); -} - -function decodeColor(color: { Type: number; Values: number[]; }): Color { - const c = color.Values; - - if (color.Type === 0) { // grayscale - return { r: c[1] * 255, g: c[1] * 255, b: c[1] * 255 }; // , c[0] * 255]; - } else { // rgb - return { r: c[1] * 255, g: c[2] * 255, b: c[3] * 255, a: c[0] }; // , c[0] * 255]; - } -} - -function encodeColor(color: Color | undefined) { - if (color && 'r' in color) { - return ['a' in color ? color.a : 1, color.r / 255, color.g / 255, color.b / 255]; - } else { - return [0, 0, 0, 0]; - } -} - -function arraysEqual(a: any[], b: any[]) { - if (!a || !b) return false; - if (a.length !== b.length) return false; - for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false; - return true; -} - -function objectsEqual(a: any, b: any) { - if (!a || !b) return false; - for (const key of Object.keys(a)) if (a[key] !== b[key]) return false; - for (const key of Object.keys(b)) if (a[key] !== b[key]) return false; - return true; -} - -function findOrAddFont(fonts: Font[], font: Font) { - for (let i = 0; i < fonts.length; i++) { - if (fonts[i].name === font.name) return i; - } - - fonts.push(font); - return fonts.length - 1; -} - -function decodeObject(obj: any, keys: string[], fonts: Font[]) { - const result: any = {}; - - for (const key of keys) { - const Key = upperFirst(key); - - if (obj[Key] === undefined) continue; - - if (key === 'justification') { - result[key] = justification[obj[Key]]; - } else if (key === 'font') { - result[key] = fonts[obj[Key]]; - } else if (key === 'fillColor' || key === 'strokeColor') { - result[key] = decodeColor(obj[Key]); - } else { - result[key] = obj[Key]; - } - } - - return result; -} - -function encodeObject(obj: any, keys: string[], fonts: Font[]) { - const result: any = {}; - - for (const key of keys) { - const Key = upperFirst(key); - - if (obj[key] === undefined) continue; - - if (key === 'justification') { - result[Key] = justification.indexOf(obj[key] ?? 'left'); - } else if (key === 'font') { - result[Key] = findOrAddFont(fonts, obj[key]); - } else if (key === 'fillColor' || key === 'strokeColor') { - result[Key] = { Type: 1, Values: encodeColor(obj[key]) } as TypeValues; - } else { - result[Key] = obj[key]; - } - } - - return result; -} - -function decodeParagraphStyle(obj: ParagraphProperties, fonts: Font[]): ParagraphStyle { - return decodeObject(obj, paragraphStyleKeys, fonts); -} - -function decodeStyle(obj: StyleSheetData, fonts: Font[]): TextStyle { - return decodeObject(obj, styleKeys, fonts); -} - -function encodeParagraphStyle(obj: ParagraphStyle, fonts: Font[]): ParagraphProperties { - return encodeObject(obj, paragraphStyleKeys, fonts); -} - -function encodeStyle(obj: TextStyle, fonts: Font[]): StyleSheetData { - return encodeObject(obj, styleKeys, fonts); -} - -function deduplicateValues(base: T, runs: { style: T; }[], keys: (keyof T)[]) { - if (!runs.length) return; - - for (const key of keys) { - const value = runs[0].style[key]; - - if (value !== undefined) { - let identical = false; - - if (Array.isArray(value)) { - identical = runs.every(r => arraysEqual(r.style[key] as any, value)); - } else if (typeof value === 'object') { - identical = runs.every(r => objectsEqual(r.style[key] as any, value)); - } else { - identical = runs.every(r => r.style[key] === value); - } - - if (identical) { - base[key] = value as any; - } - } - - const styleValue = base[key]; - - if (styleValue !== undefined) { - for (const r of runs) { - let same = false; - - if (Array.isArray(value)) { - same = arraysEqual(r.style[key] as any, value); - } else if (typeof value === 'object') { - same = objectsEqual(r.style[key] as any, value); - } else { - same = r.style[key] === value; - } - - if (same) delete r.style[key]; - } - } - } - - if (runs.every(x => Object.keys(x.style as any).length === 0)) { - runs.length = 0; - } -} - -export function decodeEngineData(engineData: EngineData) { - // console.log('engineData', require('util').inspect(engineData, false, 99, true)); - const engineDict = engineData.EngineDict; - const resourceDict = engineData.ResourceDict; - - const fonts = resourceDict.FontSet.map(f => ({ - name: f.Name, - script: f.Script, - type: f.FontType, - synthetic: f.Synthetic, - })); - - let text = engineDict.Editor.Text.replace(/\r/g, '\n'); - let removedCharacters = 0; - - while (/\n$/.test(text)) { - text = text.substr(0, text.length - 1); - removedCharacters++; - } - - const result: LayerTextData = { - text, - antiAlias: antialias[engineDict.AntiAlias] ?? 'smooth', - useFractionalGlyphWidths: !!engineDict.UseFractionalGlyphWidths, - superscriptSize: resourceDict.SuperscriptSize, - superscriptPosition: resourceDict.SuperscriptPosition, - subscriptSize: resourceDict.SubscriptSize, - subscriptPosition: resourceDict.SubscriptPosition, - smallCapSize: resourceDict.SmallCapSize, - }; - - // shape - - const photoshop = engineDict.Rendered?.Shapes?.Children?.[0]?.Cookie?.Photoshop; - - if (photoshop) { - result.shapeType = photoshop.ShapeType === 1 ? 'box' : 'point'; - if (photoshop.PointBase) result.pointBase = photoshop.PointBase; - if (photoshop.BoxBounds) result.boxBounds = photoshop.BoxBounds; - } - - // paragraph style - - // const theNormalParagraphSheet = resourceDict.TheNormalParagraphSheet; - // const paragraphSheetSet = resourceDict.ParagraphSheetSet; - // const paragraphProperties = paragraphSheetSet[theNormalParagraphSheet].Properties; - const paragraphRun = engineData.EngineDict.ParagraphRun; - - result.paragraphStyle = {}; // decodeParagraphStyle(paragraphProperties, fonts); - result.paragraphStyleRuns = []; - - for (let i = 0; i < paragraphRun.RunArray.length; i++) { - const run = paragraphRun.RunArray[i]; - const length = paragraphRun.RunLengthArray[i]; - const style = decodeParagraphStyle(run.ParagraphSheet.Properties, fonts); - // const adjustments = { - // axis: run.Adjustments.Axis, - // xy: run.Adjustments.XY, - // }; - result.paragraphStyleRuns.push({ length, style/*, adjustments*/ }); - } - - for (let counter = removedCharacters; result.paragraphStyleRuns.length && counter > 0; counter--) { - if (--result.paragraphStyleRuns[result.paragraphStyleRuns.length - 1].length === 0) { - result.paragraphStyleRuns.pop(); - } - } - - deduplicateValues(result.paragraphStyle, result.paragraphStyleRuns, paragraphStyleKeys); - - if (!result.paragraphStyleRuns.length) delete result.paragraphStyleRuns; - - // style - - // const theNormalStyleSheet = resourceDict.TheNormalStyleSheet; - // const styleSheetSet = resourceDict.StyleSheetSet; - // const styleSheetData = styleSheetSet[theNormalStyleSheet].StyleSheetData; - const styleRun = engineData.EngineDict.StyleRun; - - result.style = {}; // decodeStyle(styleSheetData, fonts); - result.styleRuns = []; - - for (let i = 0; i < styleRun.RunArray.length; i++) { - const length = styleRun.RunLengthArray[i]; - const style = decodeStyle(styleRun.RunArray[i].StyleSheet.StyleSheetData, fonts); - if (!style.font) style.font = fonts[0]; - result.styleRuns.push({ length, style }); - } - - for (let counter = removedCharacters; result.styleRuns.length && counter > 0; counter--) { - if (--result.styleRuns[result.styleRuns.length - 1].length === 0) { - result.styleRuns.pop(); - } - } - - deduplicateValues(result.style, result.styleRuns, styleKeys); - - if (!result.styleRuns.length) delete result.styleRuns; - - return result; -} - -export function encodeEngineData(data: LayerTextData) { - const text = `${(data.text || '').replace(/\r?\n/g, '\r')}\r`; - - const fonts: Font[] = [ - { name: 'AdobeInvisFont', script: 0, type: 0, synthetic: 0 }, - ]; - - const defFont = data.style?.font || data.styleRuns?.find(s => s.style.font)?.style.font || defaultFont; - const paragraphRunArray: ParagraphRun[] = []; - const paragraphRunLengthArray: number[] = []; - const paragraphRuns = data.paragraphStyleRuns; - - if (paragraphRuns && paragraphRuns.length) { - let leftLength = text.length; - - for (const run of paragraphRuns) { - let runLength = Math.min(run.length, leftLength); - leftLength -= runLength; - - if (!runLength) continue; // ignore 0 size runs - - // extend last run if it's only for trailing \r - if (leftLength === 1 && run === paragraphRuns[paragraphRuns.length - 1]) { - runLength++; - leftLength--; - } - - paragraphRunLengthArray.push(runLength); - paragraphRunArray.push({ - ParagraphSheet: { - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle({ ...defaultParagraphStyle, ...data.paragraphStyle, ...run.style }, fonts), - }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }); - } - - if (leftLength) { - paragraphRunLengthArray.push(leftLength); - paragraphRunArray.push({ - ParagraphSheet: { - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle({ ...defaultParagraphStyle, ...data.paragraphStyle }, fonts), - }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }); - } - } else { - for (let i = 0, last = 0; i < text.length; i++) { - if (text.charCodeAt(i) === 13) { // \r - paragraphRunLengthArray.push(i - last + 1); - paragraphRunArray.push({ - ParagraphSheet: { - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle({ ...defaultParagraphStyle, ...data.paragraphStyle }, fonts), - }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }); - last = i + 1; - } - } - } - - const styleSheetData = encodeStyle({ ...defaultStyle, font: defFont }, fonts); - const styleRuns = data.styleRuns || [{ length: text.length, style: data.style || {} }]; - const styleRunArray: StyleRun[] = []; - const styleRunLengthArray: number[] = []; - - let leftLength = text.length; - - for (const run of styleRuns) { - let runLength = Math.min(run.length, leftLength); - leftLength -= runLength; - - if (!runLength) continue; // ignore 0 size runs - - // extend last run if it's only for trailing \r - if (leftLength === 1 && run === styleRuns[styleRuns.length - 1]) { - runLength++; - leftLength--; - } - - styleRunLengthArray.push(runLength); - styleRunArray.push({ - StyleSheet: { - StyleSheetData: encodeStyle({ - kerning: 0, - autoKerning: true, - fillColor: { r: 0, g: 0, b: 0 }, - ...data.style, - ...run.style, - }, fonts), - }, - }); - } - - // add extra run to the end if existing ones didn't fill it up - if (leftLength && styleRuns.length) { - styleRunLengthArray.push(leftLength); - styleRunArray.push({ - StyleSheet: { - StyleSheetData: encodeStyle({ - kerning: 0, - autoKerning: true, - fillColor: { r: 0, g: 0, b: 0 }, - ...data.style, - }, fonts), - }, - }); - } - - const gridInfo = { ...defaultGridInfo, ...data.gridInfo }; - const WritingDirection = data.orientation === 'vertical' ? 2 : 0; - const Procession = data.orientation === 'vertical' ? 1 : 0; - const ShapeType = data.shapeType === 'box' ? 1 : 0; - const Photoshop: PhotoshopNode = { - ShapeType, - }; - - if (ShapeType === 0) { - Photoshop.PointBase = data.pointBase || [0, 0]; - } else { - Photoshop.BoxBounds = data.boxBounds || [0, 0, 0, 0]; - } - - // needed for correct order of properties - Photoshop.Base = { - ShapeType, - TransformPoint0: [1, 0], - TransformPoint1: [0, 1], - TransformPoint2: [0, 0], - }; - - const defaultResources = { - KinsokuSet: [ - { - Name: 'PhotoshopKinsokuHard', - NoStart: '、。,.・:;?!ー―’”)〕]}〉》」』】ヽヾゝゞ々ぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮヵヶ゛゜?!)]},.:;℃℉¢%‰', - NoEnd: '‘“(〔[{〈《「『【([{¥$£@§〒#', - Keep: '―‥', - Hanging: '、。.,', - }, - { - Name: 'PhotoshopKinsokuSoft', - NoStart: '、。,.・:;?!’”)〕]}〉》」』】ヽヾゝゞ々', - NoEnd: '‘“(〔[{〈《「『【', - Keep: '―‥', - Hanging: '、。.,', - }, - ], - MojiKumiSet: [ - { InternalName: 'Photoshop6MojiKumiSet1' }, - { InternalName: 'Photoshop6MojiKumiSet2' }, - { InternalName: 'Photoshop6MojiKumiSet3' }, - { InternalName: 'Photoshop6MojiKumiSet4' }, - ], - TheNormalStyleSheet: 0, - TheNormalParagraphSheet: 0, - ParagraphSheetSet: [ - { - Name: 'Normal RGB', - DefaultStyleSheet: 0, - Properties: encodeParagraphStyle({ ...defaultParagraphStyle, ...data.paragraphStyle }, fonts), - }, - ], - StyleSheetSet: [ - { - Name: 'Normal RGB', - StyleSheetData: styleSheetData, - }, - ], - FontSet: fonts.map(f => ({ - Name: f.name, - Script: f.script || 0, - FontType: f.type || 0, - Synthetic: f.synthetic || 0, - })), - SuperscriptSize: data.superscriptSize ?? 0.583, - SuperscriptPosition: data.superscriptPosition ?? 0.333, - SubscriptSize: data.subscriptSize ?? 0.583, - SubscriptPosition: data.subscriptPosition ?? 0.333, - SmallCapSize: data.smallCapSize ?? 0.7, - }; - - const engineData: EngineData = { - EngineDict: { - Editor: { Text: text }, - ParagraphRun: { - DefaultRunData: { - ParagraphSheet: { DefaultStyleSheet: 0, Properties: {} }, - Adjustments: { Axis: [1, 0, 1], XY: [0, 0] }, - }, - RunArray: paragraphRunArray, - RunLengthArray: paragraphRunLengthArray, - IsJoinable: 1, - }, - StyleRun: { - DefaultRunData: { StyleSheet: { StyleSheetData: {} } }, - RunArray: styleRunArray, - RunLengthArray: styleRunLengthArray, - IsJoinable: 2, - }, - GridInfo: { - GridIsOn: !!gridInfo.isOn, - ShowGrid: !!gridInfo.show, - GridSize: gridInfo.size ?? 18, - GridLeading: gridInfo.leading ?? 22, - GridColor: { Type: 1, Values: encodeColor(gridInfo.color) }, - GridLeadingFillColor: { Type: 1, Values: encodeColor(gridInfo.color) }, - AlignLineHeightToGridFlags: !!gridInfo.alignLineHeightToGridFlags, - }, - AntiAlias: antialias.indexOf(data.antiAlias ?? 'sharp'), - UseFractionalGlyphWidths: data.useFractionalGlyphWidths ?? true, - Rendered: { - Version: 1, - Shapes: { - WritingDirection, - Children: [ - { - ShapeType, - Procession, - Lines: { WritingDirection, Children: [] }, - Cookie: { Photoshop }, - }, - ], - }, - }, - }, - ResourceDict: { ...defaultResources }, - DocumentResources: { ...defaultResources }, - }; - - // console.log('encodeEngineData', require('util').inspect(engineData, false, 99, true)); - return engineData; -} diff --git a/npm-packages/mac-v2.4.x/ag-psd/src/utf8.ts b/npm-packages/mac-v2.4.x/ag-psd/src/utf8.ts deleted file mode 100644 index 558a0a1..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/src/utf8.ts +++ /dev/null @@ -1,160 +0,0 @@ -function charLengthInBytes(code: number): number { - if ((code & 0xffffff80) === 0) { - return 1; - } else if ((code & 0xfffff800) === 0) { - return 2; - } else if ((code & 0xffff0000) === 0) { - return 3; - } else { - return 4; - } -} - -export function stringLengthInBytes(value: string): number { - let result = 0; - - for (let i = 0; i < value.length; i++) { - const code = value.charCodeAt(i); - - // high surrogate - if (code >= 0xd800 && code <= 0xdbff) { - if ((i + 1) < value.length) { - const extra = value.charCodeAt(i + 1); - - // low surrogate - if ((extra & 0xfc00) === 0xdc00) { - i++; - result += charLengthInBytes(((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000); - } - } - } else { - result += charLengthInBytes(code); - } - } - - return result; -} - -function writeCharacter(buffer: Uint8Array | Buffer, offset: number, code: number): number { - const length = charLengthInBytes(code); - - switch (length) { - case 1: - buffer[offset] = code; - break; - case 2: - buffer[offset] = ((code >> 6) & 0x1f) | 0xc0; - buffer[offset + 1] = (code & 0x3f) | 0x80; - break; - case 3: - buffer[offset] = ((code >> 12) & 0x0f) | 0xe0; - buffer[offset + 1] = ((code >> 6) & 0x3f) | 0x80; - buffer[offset + 2] = (code & 0x3f) | 0x80; - break; - default: - buffer[offset] = ((code >> 18) & 0x07) | 0xf0; - buffer[offset + 1] = ((code >> 12) & 0x3f) | 0x80; - buffer[offset + 2] = ((code >> 6) & 0x3f) | 0x80; - buffer[offset + 3] = (code & 0x3f) | 0x80; - break; - } - - return length; -} - -export function encodeStringTo(buffer: Uint8Array | Buffer, offset: number, value: string): number { - for (let i = 0; i < value.length; i++) { - const code = value.charCodeAt(i); - - // high surrogate - if (code >= 0xd800 && code <= 0xdbff) { - if ((i + 1) < value.length) { - const extra = value.charCodeAt(i + 1); - - // low surrogate - if ((extra & 0xfc00) === 0xdc00) { - i++; - const fullCode = ((code & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000; - offset += writeCharacter(buffer, offset, fullCode); - } - } - } else { - offset += writeCharacter(buffer, offset, code); - } - } - - return offset; -} - -export function encodeString(value: string): Uint8Array { - const buffer = new Uint8Array(stringLengthInBytes(value)); - encodeStringTo(buffer, 0, value); - return buffer; -} - -function continuationByte(buffer: Uint8Array, index: number): number { - if (index >= buffer.length) { - throw Error('Invalid byte index'); - } - - const continuationByte = buffer[index]; - - if ((continuationByte & 0xC0) === 0x80) { - return continuationByte & 0x3F; - } else { - throw Error('Invalid continuation byte'); - } -} - -export function decodeString(value: Uint8Array): string { - let result = ''; - - for (let i = 0; i < value.length;) { - const byte1 = value[i++]; - let code: number; - - if ((byte1 & 0x80) === 0) { - code = byte1; - } else if ((byte1 & 0xe0) === 0xc0) { - const byte2 = continuationByte(value, i++); - code = ((byte1 & 0x1f) << 6) | byte2; - - if (code < 0x80) { - throw Error('Invalid continuation byte'); - } - } else if ((byte1 & 0xf0) === 0xe0) { - const byte2 = continuationByte(value, i++); - const byte3 = continuationByte(value, i++); - code = ((byte1 & 0x0f) << 12) | (byte2 << 6) | byte3; - - if (code < 0x0800) { - throw Error('Invalid continuation byte'); - } - - if (code >= 0xd800 && code <= 0xdfff) { - throw Error(`Lone surrogate U+${code.toString(16).toUpperCase()} is not a scalar value`); - } - } else if ((byte1 & 0xf8) === 0xf0) { - const byte2 = continuationByte(value, i++); - const byte3 = continuationByte(value, i++); - const byte4 = continuationByte(value, i++); - code = ((byte1 & 0x0f) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; - - if (code < 0x010000 || code > 0x10ffff) { - throw Error('Invalid continuation byte'); - } - } else { - throw Error('Invalid UTF-8 detected'); - } - - if (code > 0xffff) { - code -= 0x10000; - result += String.fromCharCode(code >>> 10 & 0x3ff | 0xd800); - code = 0xdc00 | code & 0x3ff; - } - - result += String.fromCharCode(code); - } - - return result; -} diff --git a/npm-packages/mac-v2.4.x/ag-psd/tsconfig-es6.json b/npm-packages/mac-v2.4.x/ag-psd/tsconfig-es6.json deleted file mode 100644 index 4908dcd..0000000 --- a/npm-packages/mac-v2.4.x/ag-psd/tsconfig-es6.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "es6", - "outDir": "dist-es" - } -} \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/ag-psd/tsconfig.json b/npm-packages/mac-v2.4.x/ag-psd/tsconfig.json index d3af3bb..89591d7 100644 --- a/npm-packages/mac-v2.4.x/ag-psd/tsconfig.json +++ b/npm-packages/mac-v2.4.x/ag-psd/tsconfig.json @@ -8,14 +8,8 @@ "preserveConstEnums": true, "declaration": true, "useUnknownInCatchVariables": false, - "strict": true, - "sourceMap": true, - "sourceRoot": "../src", - "outDir": "dist" + "strict": true }, - "include": [ - "src/**/*" - ], "exclude": [ "node_modules", "dist" diff --git a/npm-packages/mac-v2.4.x/canvas/CHANGELOG.md b/npm-packages/mac-v2.4.x/canvas/CHANGELOG.md deleted file mode 100644 index cbbdb82..0000000 --- a/npm-packages/mac-v2.4.x/canvas/CHANGELOG.md +++ /dev/null @@ -1,1052 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/) and this -project adheres to [Semantic Versioning](http://semver.org/). - -(Unreleased) -================== -### Changed -### Added -### Fixed - -2.11.2 -================== -### Fixed -* Building on Windows in CI (and maybe other Windows configurations?) (#2216) - -2.11.1 -================== -### Fixed -* Add missing property `canvas` to the `CanvasRenderingContext2D` type -* Fixed glyph positions getting rounded, resulting text having a slight `letter-spacing` effect -* Fixed `ctx.font` not being restored correctly after `ctx.restore()` (#1946) - -2.11.0 -================== -### Fixed -* Replace triple-slash directive in types with own types to avoid polluting TS modules with globals ([#1656](https://github.com/Automattic/node-canvas/issues/1656)) - -2.10.2 -================== -### Fixed -* Fix `Assertion failed: (object->InternalFieldCount() > 0), function Unwrap, file nan_object_wrap.h, line 32.` ([#2025](https://github.com/Automattic/node-canvas/issues/2025)) -* `textBaseline` and `textAlign` were not saved/restored by `save()`/`restore()`. ([#1936](https://github.com/Automattic/node-canvas/issues/2029)) -* Update nan to v2.17.0 to ensure Node.js v18+ support. -### Changed -* Improve performance and memory usage of `save()`/`restore()`. -* `save()`/`restore()` no longer have a maximum depth (previously 64 states). - -2.10.1 -================== -### Fixed -* Fix `actualBoundingBoxLeft` and `actualBoundingBoxRight` when `textAlign='center'` or `'right'` ([#1909](https://github.com/Automattic/node-canvas/issues/1909)) -* Fix `rgba(r,g,b,0)` with alpha to 0 should parse as transparent, not opaque. ([#2110](https://github.com/Automattic/node-canvas/pull/2110)) - -2.10.0 -================== -### Added -* Export `pangoVersion` -* [`ctx.roundRect()`](https://developer.chrome.com/blog/canvas2d/#round-rect) -### Fixed -* `rgba(r,g,b)` with no alpha should parse as opaque, not transparent. ([#2029](https://github.com/Automattic/node-canvas/issues/2029)) -* Typo in `PngConfig.filters` types. ([#2072](https://github.com/Automattic/node-canvas/issues/2072)) -* `createPattern()` always used "repeat" mode; now supports "repeat-x" and "repeat-y". ([#2066](https://github.com/Automattic/node-canvas/issues/2066)) -* Crashes and hangs when using non-finite values in `context.arc()`. ([#2055](https://github.com/Automattic/node-canvas/issues/2055)) -* Incorrect `context.arc()` geometry logic for full ellipses. ([#1808](https://github.com/Automattic/node-canvas/issues/1808), ([#1736](https://github.com/Automattic/node-canvas/issues/1736))) -* Added missing `deregisterAllFonts` to the Typescript declaration file ([#2096](https://github.com/Automattic/node-canvas/pull/2096)) -* Add `User-Agent` header when requesting remote images ([#2099](https://github.com/Automattic/node-canvas/issues/2099)) - -2.9.3 -================== -### Fixed -* Wrong fonts used when calling `registerFont` multiple times with the same family name ([#2041](https://github.com/Automattic/node-canvas/issues/2041)) - -2.9.2 -================== -### Fixed -* All exports now work when Canvas is used in ES Modules (ESM). ([#2047](https://github.com/Automattic/node-canvas/pull/2047)) -* `npm rebuild` will now re-fetch prebuilt binaries to avoid `NODE_MODULE_VERSION` mismatch errors. ([#1982](https://github.com/Automattic/node-canvas/pull/1982)) - -2.9.1 -================== -### Fixed -* Stringify CanvasGradient, CanvasPattern and ImageData like browsers do. (#1639, #1646) -* Add missing include for `toupper`. -* Throw an error instead of crashing the process if `getImageData` or `putImageData` is called on a PDF or SVG canvas (#1853) -* Compatibility with Typescript 4.6 -* Near-perfect font matching on Linux (#1572) -* Fix multi-byte font path support on Windows. -* Allow rebuild of this library - -2.9.0 -================== -### Changed -* Refactor functions to classes. -* Changed `DOMPoint()` constructor to check for parameter nullability. -* Changed `DOMMatrix.js` to use string literals for non-special cases. -* Remove semicolons from Dommatrix.js. -* Update nan to v2.15.0 to ensure Node.js v14+ support. -* Clean up inf/nan macros and slightly speed up argument checking. -### Added -* Added `deregisterAllFonts` method to free up memory and reduce font conflicts. -### Fixed -* Support Apple M1 Homebrew install that puts canvas install library files in `/opt/homebrew/lib` - -2.8.0 -================== -### Changed -* Upgrade dtslint -* Upgrade node-pre-gyp to 1.0.0. Note that if you are using special node-pre-gyp - features like `node_pre_gyp_accessKeyId`, you may need to make changes to your - installation procedure. See https://github.com/mapbox/node-pre-gyp/blob/master/CHANGELOG.md#100. -* Add Node.js v16 to CI. -* The C++ class method `nBytes()` now returns a size_t. (Because this is a C++ - method only, this is not considered a breaking change.) -### Added -* Add support for `inverse()` and `invertSelf()` to `DOMMatrix` (#1648) -* Add support for `context.getTransform()` ([#1769](https://github.com/Automattic/node-canvas/pull/1769)) -* Add support for `context.setTransform(dommatrix)` ([#1769](https://github.com/Automattic/node-canvas/pull/1769)) -### Fixed -* Fix `actualBoundingBoxLeft` and `actualBoundingBoxRight` returned by `measureText` to be the ink rect ([#1776](https://github.com/Automattic/node-canvas/pull/1776), fixes [#1703](https://github.com/Automattic/node-canvas/issues/1703)). -* Fix Pango logging "expect ugly output" on Windows (#1643) -* Fix benchmark for createPNGStream (#1672) -* Fix dangling reference in BackendOperationNotAvailable exception (#1740) -* Fix always-false comparison warning in Canvas.cc. -* Fix Node.js crash when throwing from an onload or onerror handler. - -2.7.0 -================== -### Changed -* Switch CI to Github Actions. (Adds Windows and macOS builds.) -* Switch prebuilds to GitHub actions in the Automattic/node-canvas repository. - Previously these were in the [node-gfx/node-canvas-prebuilt](https://github.com/node-gfx/node-canvas-prebuilt) - and triggered manually. -* Speed up `fillStyle=` and `strokeStyle=` -### Added -* Export `rsvgVersion`. -* CanvasPattern’s `setTransform` method is no longer missing -### Fixed -* Fix BMP issues. (#1497) -* Update typings to support jpg and addPage on NodeCanvasRenderingContext2D (#1509) -* Fix assertion failure when using Visual Studio Code debugger to inspect Image prototype (#1534) -* Fix signed/unsigned comparison warning introduced in 2.6.0, and function cast warnings with GCC8+ -* Fix to compile without JPEG support (#1593). -* Fix compile errors with cairo -* Fix Image#complete if the image failed to load. -* Upgrade node-pre-gyp to v0.15.0 to use latest version of needle to fix error when downloading prebuilds. -* Don't throw if `fillStyle` or `strokeStyle` is set to an object, but that object is not a Gradient or Pattern. (This behavior was non-standard: invalid inputs are supposed to be ignored.) - -2.6.1 -================== -### Fixed -* Ignore `maxWidth` in `fillText` and `strokeText` if it is undefined -* Fix crash (assertion failure) in Node.js 12.x when patterns or gradients are used -* Fix crash (check failure) in Node.js 12.x when using RGB16_565 format. (The - underlying arraybuffer was incorrectly sized.) -* Fix rendering error when applying shadow width line style (lineCap lineJoin lineDash) - -2.6.0 -================== -### Changed -* Allow larger buffers to be returned from `toBuffer('raw')`. -### Added -* Support for various BMP headers and color depths (#1435) -### Fixed -* Fix crash when changing canvas width/height while `fillStyle` or `strokeStyle` - was set to a `CanvasPattern` or `CanvasGradient` (#1357). -* Fix crash when changing width/height of SVG canvases (#1380). -* Fix crash when using `toBuffer('raw')` with large canvases (#1158). -* Clarified meaning of byte ordering for `toBuffer('raw')` in readme. (#1416) -* Fix package.json Typings field to point to Declaration file (#1432) -* Properly check return value from `Set` and `Call`. (#1415) -* Use `Get` version from `Nan` instead of `v8`. (#1415) - -2.5.0 -================== -### Added -* Support redirects when fetching images (using [simple-get](https://github.com/feross/simple-get)) (#1398) -* Support Node.js v12 -### Fixed -* Fix object literal & arrow function syntax usage for IE. - -2.4.1 -================== -### Fixed -* Guard JPEG width/height against maximum supported (#1385) -* Fix electron 5 and node 12 compatibility -* Fix encoding options (quality) parameter in `canvas.toDataURL()` - -2.4.0 -================== -### Added -* (Actually) added `resolution` option for `canvas.toBuffer("image/png")` and - `canvas.createPNGStream()`. This was documented since 2.0.0 but not working. -* Add typescript definitions. -### Fixed -* PDF metadata (added in 2.3.0) wasn't being set with `canvas.createPDFStream()` -* Fix custom "inspect" function deprecation warnings (#1326) - -2.3.1 -================== -### Fixed -* Fix `canvas.toBuffer()` for JPEGs (#1350) - -2.3.0 -================== -### Added -* Add support for multiple PDF page sizes -* Add support for embedding document metadata in PDFs - -### Fixed -* Don't crash when font string is invalid (bug since 2.2.0) (#1328) -* Fix memory leak in `canvas.toBuffer()` (#1202, #1296) -* Fix memory leak in `ctx.font=` (#1202) - -2.2.0 -================== -### Added -* BMP support - -### Fixed -* Reset context on resurface (#1292) -* Support Jest test framework (#1311) - -2.1.0 -================== -### Added -* Warn when building with old, unsupported versions of cairo or libjpeg. - -2.0.0 -================== - -**Upgrading from 1.x** -```js -// (1) The Canvas constructor is no longer the default export from the module. -/* old: */ -const Canvas = require('canvas') -const mycanvas = new Canvas(width, height) -/* new: */ -const { createCanvas, Canvas } = require('canvas') -const mycanvas = createCanvas(width, height) -mycanvas instanceof Canvas // true - -/* old: */ -const Canvas = require('canvas') -const myimg = new Canvas.Image() -/* new: */ -const { Image } = require('canvas') -const myimg = new Image() - -// (2) The quality argument for canvas.createJPEGStream/canvas.jpegStream now -// goes from 0 to 1 instead of from 0 to 100: -canvas.createJPEGStream({ quality: 50 }) // old -canvas.createJPEGStream({ quality: 0.5 }) // new - -// (3) The ZLIB compression level and PNG filter options for canvas.toBuffer are -// now named instead of positional arguments: -canvas.toBuffer(undefined, 3, canvas.PNG_FILTER_NONE) // old -canvas.toBuffer(undefined, { compressionLevel: 3, filters: canvas.PNG_FILTER_NONE }) // new -// or specify the mime type explicitly: -canvas.toBuffer('image/png', { compressionLevel: 3, filters: canvas.PNG_FILTER_NONE }) // new - -// (4) #2 also applies for canvas.pngStream, although these arguments were not -// documented: -canvas.pngStream(3, canvas.PNG_FILTER_NONE) // old -canvas.pngStream({ compressionLevel: 3, filters: canvas.PNG_FILTER_NONE }) // new - -// (5) canvas.syncPNGStream() and canvas.syncJPEGStream() have been removed: -canvas.syncPNGStream() // old -canvas.createSyncPNGStream() // old -canvas.createPNGStream() // new - -canvas.syncJPEGStream() // old -canvas.createSyncJPEGStream() // old -canvas.createJPEGStream() // new - -// (6) Context2d.filter has been renamed to context2d.quality to avoid a -// conflict with the new standard 'filter' property. -context.filter = 'best' // old -context.quality = 'best' // new -``` - -### Breaking - * Drop support for Node.js <6.x - * Remove sync stream functions (bc53059). Note that most streams are still - synchronous (run in the main thread); this change just removed `syncPNGStream` - and `syncJPEGStream`. - * Pango is now *required* on all platforms (7716ae4). - * Make the `quality` argument for JPEG output go from 0 to 1 to match HTML spec. - * Make the `compressionLevel` and `filters` arguments for `canvas.toBuffer()` - named instead of positional. Same for `canvas.pngStream()`, although these - arguments were not documented. - * See also: *Correct some of the `globalCompositeOperator` types* under - **Fixed**. These changes were bug-fixes, but will break existing code relying - on the incorrect types. - * Rename `context2d.filter` to `context2d.quality` to avoid a conflict with the - new standard 'filter' property. Note that the standard 'filter' property is - not yet implemented. - -### Fixed - * Fix build with SVG support enabled (#1123) - * Prevent segfaults caused by loading invalid fonts (#1105) - * Fix memory leak in font loading - * Port has_lib.sh to javascript (#872) - * Correctly sample the edge of images when scaling (#1084) - * Detect CentOS libjpeg path (b180ea5) - * Improve measureText accuracy (2bbfec5) - * Fix memory leak when image callbacks reference the image (1f4b646) - * Fix putImageData(data, negative, negative) (2102e25) - * Fix SVG recognition when loading from buffer (77749e6) - * Re-rasterize SVG when drawing to a context and dimensions changed (79bf232) - * Prevent JPEG errors from crashing process (#1124) - * Improve handling of invalid arguments (#1129) - * Fix repeating patterns when drawing a canvas to itself (#1136) - * Prevent segfaults caused by creating a too large canvas - * Fix parse-font regex to allow for whitespaces. - * Allow assigning non-string values to fillStyle and strokeStyle - * Fix drawing zero-width and zero-height images. - * Fix DEP0005 deprecation warning - * Don't assume `data:` URIs assigned to `img.src` are always base64-encoded - * Fix formatting of color strings (e.g. `ctx.fillStyle`) on 32-bit platforms - * Explicitly export symbols for the C++ API - * Named CSS colors should match case-insensitive - * Correct some of the `globalCompositeOperator` types to match the spec: - * "hsl-hue" is now "hue" - * "hsl-saturation" is now "saturation" - * "hsl-color" is now "color" - * "hsl-luminosity" is now "luminosity" - * "darker" is now "darken" - * "dest" is now "destination" - * "add" is removed (but is the same as "lighter") - * "source" is now "copy" - * Provide better, Node.js core-style coded errors for failed sys calls. (For - example, provide an error with code 'ENOENT' if setting `img.src` to a path - that does not exist.) - * Support reading CMYK, YCCK JPEGs. - * Hide `Image.prototype.source` - * Fix behavior of maxWidth (#1088) - * Fix behavior of textAlignment with maxWidth (#1253) - -### Added - * Prebuilds (#992) with different libc versions to the prebuilt binary (#1140) - * Support `canvas.getContext("2d", {alpha: boolean})` and - `canvas.getContext("2d", {pixelFormat: "..."})` - * Support indexed PNG encoding. - * Support `currentTransform` (d6714ee) - * Export `CanvasGradient` (6a4c0ab) - * Support #RGBA , #RRGGBBAA hex colors (10a82ec) - * Support maxWidth arg for fill/strokeText (175b40d) - * Support image.naturalWidth/Height (a5915f8) - * Render SVG img elements when librsvg is available (1baf00e) - * Support ellipse method (4d4a726) - * Browser-compatible API (6a29a23) - * Support for jpeg on Windows (42e9a74) - * Support for backends (1a6dffe) - * Support for `canvas.toBuffer("image/jpeg")` - * Unified configuration options for `canvas.toBuffer()`, `canvas.pngStream()` - and `canvas.jpegStream()` - * ~~Added `resolution` option for `canvas.toBuffer("image/png")` and - `canvas.createPNGStream()`~~ this was not working - * Support for `canvas.toDataURI("image/jpeg")` (sync) - * Support for `img.src = ` to match browsers - * Support reading data URL on `img.src` - * Readme: add dependencies command for OpenBSD - * Throw error if calling jpegStream when canvas was not built with JPEG support - * Emit error if trying to load GIF, SVG or JPEG image when canvas was not built - with support for that format - -1.6.x (unreleased) -================== -### Fixed - * Make setLineDash able to handle full zeroed dashes (b8cf1d7) - * Fix reading fillStyle after setting it from gradient to color (a84b2bc) - -### Added - * Support for pattern repeat and no-repeat (#1066) - * Support for context globalAlpha for gradients and patterns (#1064) - -1.6.9 / 2017-12-20 -================== -### Fixed - * Fix some instances of crashes (7c9ec58, 8b792c3) - * Fix node 0.x compatibility (dca33f7) - -1.6.8 / 2017-12-12 -================== -### Fixed - * Faster, more compliant parseFont (4625efa, 37cd969) - -1.6.7 / 2017-09-08 -================== -### Fixed - * Minimal backport of #985 (rotated text baselines) (c19edb8) - -1.6.6 / 2017-05-03 -================== -### Fixed - * Use .node extension for requiring native module so webpack works (1b05599) - * Correct text baseline calculation (#1037) - -1.6.5 / 2017-03-18 -================== -### Changed - * Parse font using parse-css-font and units-css (d316416) - -1.6.4 / 2017-02-26 -================== -### Fixed - * Make sure Canvas#toDataURL is always async if callback is passed (8586d72) - -1.6.3 / 2017-02-14 -================== -### Fixed - * Fix isnan() and isinf() on clang (5941e13) - -1.6.2 / 2016-10-30 -================== -### Fixed - * Fix deprecation warnings (c264879) - * Bump nan (e4aea20) - -1.6.1 / 2016-10-23 -================== - -### Fixed - * Make has_lib.sh work on BSD OSes (1727d66) - -1.6.0 / 2016-10-16 -================== - - * Support canvas.getBuffer('raw') (#819) - -1.5.0 / 2016-09-11 -================== - - * Crude PDF stream implementation (#781) - * Update CI settings (#797) - * Reduce some of the install warnings (#794) - * Fix lineDash browser tests never finishing (#793) - * Add issue template (#791) - -1.4.0 / 2016-06-03 -================== - - * Add support for evenodd fill rule (#762) - -1.3.17 / 2016-06-03 -=================== - - * Removing redundant duplicate calls (#769) - * Cleanup examples (#776) - * Fix CanvasRenderingContext2D class name (#777) - -1.3.16 / 2016-05-29 -=================== - - * Fix leak of data when streaming JPEG (#774) - -1.3.15 / 2016-05-09 -=================== - - * Fix segfault in putImageData (#750) - -1.3.14 / 2016-05-05 -=================== - - * Clamp JPEG buffer size (#739) - -1.3.13 / 2016-05-01 -=================== - - * Bumb NAN version (#759) - -1.3.12 / 2016-03-01 -=================== - - * Expose freetype version (#718) - * Require new in constructor (#717) - -1.3.11 / 2016-03-01 -=================== - - * Properly clamp quality in toDataURL (#728) - * Strict mode (#719) - -1.3.10 / 2016-02-07 -=================== - - * Fix segfault on node 0.10.x (#712) - -1.3.9 / 2016-01-27 -================== - - * Allow to unbind onload/onerror callback handlers (#706) - -1.3.8 / 2016-01-22 -================== - - * Cleanup build scripts and fix pangocairo detection (#701) - -1.3.7 / 2016-01-13 -================== - - * Don't unbind onload/onerror callbacks after invoking them (#615) - -1.3.6 / 2016-01-06 -================== - - * Allow optional arguments in `toDataURL` to be `undefined` and improve `toDataURL`'s spec compliance (#690) - -1.3.5 / 2015-12-07 -================== - - * Add image/jpeg support to `toDataUrl` (#685) - -1.3.4 / 2015-11-21 -================== - - * Upgrade nan to 2.1.0 (#671) - -1.3.3 / 2015-11-21 -================== - - * Fix compilation on Visual Studio 2015 (#670) - -1.3.2 / 2015-11-18 -================== - - * Fix incorrect Y offset and scaling for shadows (#669) - -1.3.1 / 2015-11-09 -================== - - * Wrap std::min calls in paranthesis to prevent macro expansion on windows (#660) - -1.3.0 / 2015-10-26 -================== - - * Expose ImageData constructor and make it more spec-compliant (#569) - -1.2.11 / 2015-10-20 -=================== - - * Implement blur on images (#648) - -1.2.10 / 2015-10-12 -=================== - - * Fix segfault in Canvas#jpegStream (#629) - -1.2.9 / 2015-09-14 -================== - - * Upgrade to Nan 2.x with support for iojs 3.x and Node.js 4.x (#622) - -1.2.8 / 2015-08-30 -================== - - * Clean up the tests (#612) - * Replace CanvasPixelArray with Uint8ClampedArray to be API-compliant (#604) - * Specify travis iojs versions (#611) - -1.2.7 / 2015-07-29 -================== - - * Avoid future reserved keyword (#592) - -1.2.6 / 2015-07-29 -================== - - * Fix the build on windows (#589) - -1.2.5 / 2015-07-28 -================== - - * Another npm release, since 1.2.4 was botched (see #596) - -1.2.4 / 2015-07-23 -================== - - * Point `homepage` and `repository` links to [`github.com/Automattic/node-canvas`][repo] - * Fix Travis builds and Cairo include paths (thanks, Linus Unnebäck!) - -1.2.3 / 2015-05-21 -================== - - * Update TJ Holowaychuk's username in the readme - * Fix segmentation fault in `Image::loadFromBuffer` when buffer is empty - * Optimize getImageData() - * package: add "license" attribute - * package: update "nan" to v1.8.4 - * package: append `.git` to "repository" URL - -1.2.2 / 2015-04-18 -================== - - * Now works on io.js - * Fix 'drawImage' scaling (the dimensions of the region that gets clipped also needs to be scaled). - * Fix bug in StreamPNGSync - -1.2.1 / 2015-02-10 -================== - - * Use non-cairo 1.12 API for shadow blur - -1.2.0 / 2015-01-31 -================== - - * travis: drop support for node v0.6 - * Merge pull request #507 from salzhrani/iojs - * io.js compatibility - * Merge pull request #505 from woodcoder/shadow-blur - * Fix issue with line width not being correct in stroked shadows. - * Add another shadow/transform test. - * Refactor setSourceRGBA to allow the context to be supplied. - * Simple image shadow (no blurring or handling current transforms) based on image's alpha channel. - * Test showing issue #133, that images don't have shadows. - * The +1 on the offset seems to match the browser's output better, but I can't work out why it would be needed (unless it's pixel alignment related). - * Make the shadow radius more accurately match the browser's, making use of sigma scale as used in SKIA: https://github.com/google/skia/blob/master/src/effects/SkBlurMask.cpp#L26. - * Create a new image surface to render blurred shadows to, this means that vector formats like PDF will now render blurs. - * Add recommended calls to flush and dirty buffer, as per http://www.cairographics.org/manual/cairo-Image-Surfaces.html#cairo-image-surface-get-data. - * Add PDF button to test page to easily generate PDF version of the test image. - * Fix to ensure shadowOffset is unaffected by the current transform. - * New test illustrating that canvas implementation doesn't translate the shadowOffset. - * Merge pull request #490 from AllYearbooks/master - * Merge pull request #501 from motiz88/hsl-color - * Code style + attribution. Also removed parseClipped() and commented out wrapInt (now wrap_int). - * Added visual tests for hsl() and hsla() color parsing. - * Fixed handling in hsl/hsla color parser. parseNumber() was erroring out on numbers with long fractional parts. - * hsl/hsla color parsing + rebeccapurple hsl() and hsla() color values are now supported, with corresponding unit tests. Also added rebeccapurple (from CSS Color Level 4) to the named color list. - * float rather than int for drawImage arguments - * with_pango to true and use fontconfig to load fonts - * Merge pull request #399 from nulltask/fix/lighten - * Merge pull request #465 from espadrine/master - * Merge pull request #470 from tonylukasavage/patch-1 - * Add one-liner MacPorts install to docs - * Offer SVG output. - * Readme update: node-gyp. - * Readme: fix subheading size - * Readme: remove Gemnasium badge, use SVG for npm badge - * Readme: add Travis-CI badge - * change operator lighter to lighten - -1.1.6 / 2014-08-01 -================== - - * export canvas.CanvasPixelArray instead of canvas.PixelArray which is undefined - * Glib version test into giflib exists test - * Giflib 5.1 - * install: use an even older version of giflib (v4.1.6) - * install: use an older version of giflib (v4.2.3) - * install: install `giflib` - * install: use more compatible sh syntax - * travis: attempt to run the ./install script before testintg - * travis: test node v0.6, v0.8, v0.10, and v0.11 - * Distinguish between 'add' and 'lighter' - -1.1.5 / 2014-06-26 -================== - - * Readme: remove Contributors section - * Readme: update copyright - * On Windows, copy required DLLs next to ".node" file (#442 @pandell) - * Duplicate "msvc_settings" for "Debug" configuration - * Remove unneeded #include - * Use float constants to prevent double->float conversion warning - * Ignore Visual C++ 2013 warnings (#441 @pandell) - * Add algorithm include to CanvasRenderingContext2d.cc for std::min (#435 @kkoopa) - * Updated NAN to 1.2.0 (#434 @kkoopa) - -1.1.4 / 2014-06-08 -================== - - * Fix compile error with Visual C++ - * Add support for the lineDash API - * Update NAN - * New V8 compatibility - * Correctly limit bounds in PutImageData to prevent segment fault - * Fix segfault when onload and onerror are not function - * Add support for Node 0.11.9 - -1.1.3 / 2014-01-08 -================== - - * Add CAIRO_FORMAT_INVALID - * Readjust the amount of allocated memory - * Fix argument index for filter parameter - * Make has_lib.sh work properly on Debian 64bit - -1.1.2 / 2013-10-31 -================== - - * NAN dep upgrade, full node@<=0.11.8 compatibility - * Use node::MakeCallback() instead of v8::Function::Call() - * Improve nan location discovery - * Fix enabling gif/jpeg options on Ubuntu 13.04 - -1.1.1 / 2013-10-09 -================== - - * add better support for outdated versions of Cairo - -1.1.0 / 2013-08-01 -================== - - * add png compression options - * add jpeg stream progressive mode option - * fix resource leaks on read errors - -1.0.4 / 2013-07-23 -================== - - * 0.11.4+ compatibility using NAN - * fix typo in context2d for imageSmoothingEnabled - -1.0.3 / 2013-06-04 -================== - - * add "nearest" and "bilinear" to patternQuality - * fix fread() retval check (items not bytes) - * removed unneeded private fields - -1.0.2 / 2013-03-22 -================== - - * add Context2d#imageSmoothingEnabled= - -1.0.1 / 2013-02-25 -================== - - * travis: test modern node versions - * change the node-gyp build to use pkg-config - -1.0.0 / 2013-01-16 -================== - - * add conditional pango font support [Julian Viereck] - * add `Canvas#{png,jpeg}Stream()` alias of create* legacy methods - * add support for grayscale JPEGs - * fix: explicitly cast the after work callback function to "uv_after_work_cb" - * fix test server for express 3.x - * fix: call cairo_surface_finish in ~Canvas when pdf - * remove old 0.4.x binding support. Closes #197 - -0.13.1 / 2012-08-20 -================== - - * fix cases where GIF_LIB_VERSION is not defined - * fix auto-detection of optional libraries for OS X - * fix Context2d::SetFont for pango when setting normal weight/style - -0.13.0 / 2012-08-12 -================== - - * add pango support [c-spencer] - * add pango / png / jpeg gyp auto-detection [c-spencer] - * add `.gifVersion` [tootallnate] - * add `.jpegVersion` [tootallnate] - * add moar gyp stuff [tootallnate] - * remove wscript - * fix `closure_destroy()` with cast for `AdjustAmountOfExternalAllocatedMemory()` - -0.12.1 / 2012-06-29 -================== - - * fix jpeg malloc Image issue. Closes #160 [c-spencer] - * Improve Image mode API - * Add clearData method to handle reassignment of src, and clean up mime data memory handling. - * Improve how _data_len is managed and use to adjust memory, hide more of mime API behind cairo version conditional. - * Add optional mime-data tracking to Image. - * Refactor JPEG decoding into decodeJPEGIntoSurface - -0.12.0 / 2012-05-02 -================== - - * Added `textDrawingMode` context property [c-spencer] - * Added additional TextMetrics properties [c-spencer] - -0.11.3 / 2012-04-25 -================== - - * Fixed `Image` memory leak. Closes #150 - * Fixed Context2d::hasShadow() - -0.11.2 / 2012-04-12 -================== - - * Fixed: pdf memory leak, free closure and surface in ~Canvas - -0.11.1 / 2012-04-10 -================== - - * Changed: renamed .nextPage() to .addPage() - -0.11.0 / 2012-04-10 -================== - - * Added quick PDF support - * Added `Canvas#type` getter - * Added ./examples/pdf-images.js - * Added ./examples/multiple-page-pdf.js - * Added ./examples/small-pdf.js - -0.10.3 / 2012-02-27 -================== - - * Fixed quadratic curve starting point for undefined path. Closes #155 - -0.10.2 / 2012-02-06 -================== - - * Fixed: Context2d setters with invalid values ignored - * Changed: replaced seek with `fstat()` - -0.10.1 / 2012-01-31 -================== - - * Added _/opt/local/lib_ to wscript [obarthel] - * Added bounds checking to `rgba_to_string()` [obarthel] - * Fixed cleanup in JPEG Image loading [obarthel] - * Fixed missing CSS color table values [obarthel] - -0.10.0 / 2012-01-18 -================== - - * Added `ctx.createPattern()` [slaskis] - -0.9.0 / 2012-01-13 -================== - - * Added `createJPEGStream()` [Elijah Hamovitz] - -0.8.3 / 2012-01-04 -================== - - * Added support for libjpeg62-dev or libjpeg8-dev [wwlinx] - -0.8.2 / 2011-12-14 -================== - - * Fixed two memory leaks in context2d [Tharit] - * Fixed `make test-server` - -0.8.1 / 2011-10-31 -================== - - * Added 0.5.x support [TooTallNate] - * Fixed `measureText().width`. Closes #126 - -0.8.0 / 2011-10-28 -================== - - * Added data uri support. Closes #49 - -0.7.3 / 2011-09-14 -================== - - * Added better lineTo() / moveTo() exception messages - -0.7.2 / 2011-08-30 -================== - - * Changed: prefix some private methods with _ - -0.7.1 / 2011-08-25 -================== - - * Added better image format detection - * Added libpath options to waf configuration; this was necessary to correctly detect gif and jpeg support on FreeBSD - -0.7.0 / 2011-07-12 -================== - - * Added GIF support [Brian McKinney] - -0.6.0 / 2011-06-04 -================== - - * Added `Image#src=Buffer` support. Closes #91 - * Added `devDependencies` - * Added `source-atop` test - * Added _image-src.js_ example - * Removed `V8::AdjustAmountOfExternalAllocatedMemory()` call from `toBuffer()` - * Fixed v8 memory hint when resizing canvas [atomizer] - -0.5.4 / 2011-04-20 -================== - - * Added; special case of zero-width rectangle [atomizer] - * Fixed; do not clamp arguments to integer values [atomizer] - * Fixed; preserve current path during `fillRect()` and `strokeRect()` [atomizer] - * Fixed; `restorePath()`: clear current path before appending [atomizer] - -0.5.3 / 2011-04-11 -================== - - * Clamp image bounds in `PixelArray::PixelArray()` [Marcello Bastea-Forte] - -0.5.2 / 2011-04-09 -================== - - * Changed; make `PNGStream` a real `Stream` [Marcello Bastea-Forte] - -0.5.1 / 2011-03-16 -================== - - * Fixed (kinda) `img.src=` error handling - * Fixed; move closure.h down for malloc ref. Closes #80 - -0.5.0 / 2011-03-14 -================== - - * Added several more operators (color-dodge, color-burn, difference, etc) - * Performance; no longer re-allocating `closure->data` for each png write - * Fixed freeing of `Context2d` states - * Fixed text alignment / baseline [Olaf] - * Fixed HandleScopes [Olaf] - * Fixed small misc memory leaks - * Fixed `Buffer` usage for node 0.4.x - -0.4.3 / 2011-01-11 -================== - - * Fixed font family dereferencing. Closes #72 - * Fixed; stripping of quotes from font-family before applying - * Fixed duplicate textAlign getter - * Removed sans-serif default of _Arial_ - -0.4.2 / 2010-12-28 -================== - - * Fixed font size growing issue after successive calls. Closes #70 - -0.4.1 / 2010-12-18 -================== - - * Fixed; toString() first argument of `{fill,stroke}Text()`. Closes #68 - -0.4.0 / 2010-12-12 -================== - - * Added `drawImage()` with `Canvas` instance support. Closes #67 - -0.3.3 / 2010-11-30 -================== - - * Added `CanvasRenderingContext2d#patternQuality` accessor, accepting _fast_, _good_, and _best_ - * Fixed; pre-multiply `putImageData()` components - * Fixed; `PixelArray` data is not premultiplied - -0.3.2 / 2010-11-26 -================== - - * Added --profile option to config - * Fixed `eio_custom` segfault(s). Closes #46 - * Fixed two named colors. Closes #62 [thanks noonat] - * Fixed a few warnings - * Fixed; freeing data in `Image::loadJPEG()` on failure - * Fixed; include _jpeglib_ only when __HAVE_JPEG__ - * Fixed; using `strstr()` instead of `strnstr()` - -0.3.1 / 2010-11-24 -================== - - * Fixed; `Image` loading is sync until race-condition is resolved - * Fixed; `Image::loadJPEG()` return status based on errno - -0.3.0 / 2010-11-24 -================== - - * Added arcTo(). Closes #11 - * Added c color parser, _./examples/ray.js_ is now twice as fast - * Fixed `putImageData()` bug messing up rgba channels - -0.2.1 / 2010-11-19 -================== - - * Added image _resize_ example - * Fixed canvas resizing via `{width,height}=`. Closes #57 - * Fixed `Canvas#getContext()`, caching the CanvasRenderingContext - * Fixed async image loading (test server still messed) - -0.2.0 / 2010-11-18 -================== - - * Added jpeg `Image` support (when libjpeg is available) - * Added _hsl_ / _hsla_ color support. [Tom Carden] - -0.1.0 / 2010-11-17 -================== - - * Added `Image` - * Added `ImageData` - * Added `PixelArray` - * Added `CanvasRenderingContext2d#drawImage()` - * Added `CanvasRenderingContext2d#getImageData()` - * Added `CanvasRenderingContext2d#createImageData()` - * Added kraken blur benchmark example - * Added several new tests - * Fixed instanceof checks for many c++ methods - * Fixed test runner in firefox [Don Park] - -0.0.8 / 2010-11-12 -================== - - * Added `CanvasRenderingContext2d#drawImage()` - * Fixed `free()` call missing stdlib - * Fixed Image#{width,height} initialization to 0 - * Fixed; load image on non-LOADING state - -0.0.7 / 2010-11-12 -================== - - * Fixed _lighter_ for older versions of cairo - -0.0.6 / 2010-11-12 -================== - - * Added `Image` - * Added conditional support for cairo 1.10.0 operators - -0.0.5 / 2010-11-10 -================== - - * Added custom port support to _test/server.js_ - * Added more global composite operator support - * Added `Context2d#antialias=` - * Added _voronoi_ example - * Added -D__NDEBUG__ to default build - * Added __BUFFER_DATA__ macro for backwards compat buffer data access [Don Park] - * Fixed getter bug preventing patterns from being returned via `fillStyle` etc - - * Fixed; __CAIRO_STATUS_NO_MEMORY___ on failed {re,m}alloc() - * Fixed; free `Canvas::ToBuffer()` closure data - -0.0.4 / 2010-11-09 -================== - - * Bump to fix npm engine cache bug... - -0.0.3 / 2010-11-09 -================== - - * Added async `toDataURL()` support - * Added async `toBuffer()` support - * Removed buffer utils - -0.0.2 / 2010-11-08 -================== - - * Added shadow support (faster/better gaussian blur to come) - * Added node v0.3 support [Don Park] - * Added -O3 to build - * Removed `Canvas#savePNG()` use `Canvas#createPNGStream()` - -0.0.1 / 2010-11-04 -================== - - * Initial release - -[repo]: https://github.com/Automattic/node-canvas diff --git a/npm-packages/mac-v2.4.x/canvas/build/Makefile b/npm-packages/mac-v2.4.x/canvas/build/Makefile index 6323c09..6b0d7ca 100644 --- a/npm-packages/mac-v2.4.x/canvas/build/Makefile +++ b/npm-packages/mac-v2.4.x/canvas/build/Makefile @@ -331,8 +331,8 @@ ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ endif quiet_cmd_regen_makefile = ACTION Regenerating $@ -cmd_regen_makefile = cd $(srcdir); /Users/wsl/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/wsl/Library/Caches/node-gyp/16.14.0" "-Dnode_gyp_dir=/Users/wsl/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/Users/wsl/Library/Caches/node-gyp/16.14.0/<(target_arch)/node.lib" "-Dmodule_root_dir=/Users/wsl/Documents/Test/CC249Test/packages/ccc-tnt-psd2ui/node_modules/canvas" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/Users/wsl/Documents/Test/CC249Test/packages/ccc-tnt-psd2ui/node_modules/canvas/build/config.gypi -I/Users/wsl/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/wsl/Library/Caches/node-gyp/16.14.0/include/node/common.gypi "--toplevel-dir=." binding.gyp -Makefile: $(srcdir)/../../../../../../../Library/Caches/node-gyp/16.14.0/include/node/common.gypi $(srcdir)/binding.gyp $(srcdir)/build/config.gypi $(srcdir)/../../../../../../../.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi +cmd_regen_makefile = cd $(srcdir); /Users/wsl/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/wsl/Library/Caches/node-gyp/16.14.0" "-Dnode_gyp_dir=/Users/wsl/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp" "-Dnode_lib_file=/Users/wsl/Library/Caches/node-gyp/16.14.0/<(target_arch)/node.lib" "-Dmodule_root_dir=/Users/wsl/Documents/Git/ccc-tnt-psd2ui/ccc-tnt-psd2ui-v2.4.x/node_modules/canvas" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/Users/wsl/Documents/Git/ccc-tnt-psd2ui/ccc-tnt-psd2ui-v2.4.x/node_modules/canvas/build/config.gypi -I/Users/wsl/.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/wsl/Library/Caches/node-gyp/16.14.0/include/node/common.gypi "--toplevel-dir=." binding.gyp +Makefile: $(srcdir)/binding.gyp $(srcdir)/../../../../../../Library/Caches/node-gyp/16.14.0/include/node/common.gypi $(srcdir)/build/config.gypi $(srcdir)/../../../../../../.nvm/versions/node/v16.14.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi $(call do_cmd,regen_makefile) # "all" is a concatenation of the "all" targets from all the included diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/canvas.node b/npm-packages/mac-v2.4.x/canvas/build/Release/canvas.node index f176fec..64d1ec1 100755 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/canvas.node and b/npm-packages/mac-v2.4.x/canvas/build/Release/canvas.node differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/Backends.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/Backends.o index cdf1f4a..91f6e1c 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/Backends.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/Backends.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/Canvas.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/Canvas.o index 916bec7..1c83017 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/Canvas.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/Canvas.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/CanvasGradient.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/CanvasGradient.o index 7ba724e..d123848 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/CanvasGradient.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/CanvasGradient.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/CanvasPattern.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/CanvasPattern.o index 57a0181..cd808b2 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/CanvasPattern.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/CanvasPattern.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/CanvasRenderingContext2d.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/CanvasRenderingContext2d.o index 3ad928a..e83eb77 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/CanvasRenderingContext2d.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/CanvasRenderingContext2d.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/Image.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/Image.o index e9cd119..51ff4c4 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/Image.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/Image.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/ImageData.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/ImageData.o index e562ea3..c0a94aa 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/ImageData.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/ImageData.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/Backend.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/Backend.o index 387a486..d923fb7 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/Backend.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/Backend.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/ImageBackend.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/ImageBackend.o index 782bf69..788959a 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/ImageBackend.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/ImageBackend.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/PdfBackend.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/PdfBackend.o index f20c606..4cdc181 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/PdfBackend.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/PdfBackend.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/SvgBackend.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/SvgBackend.o index fef85a6..c3f5065 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/SvgBackend.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/backend/SvgBackend.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/bmp/BMPParser.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/bmp/BMPParser.o index 215d6a0..c0fb390 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/bmp/BMPParser.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/bmp/BMPParser.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/closure.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/closure.o index cd80556..b6db79a 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/closure.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/closure.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/color.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/color.o index a479fdb..00fa0d6 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/color.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/color.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/init.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/init.o index 00498ec..723401c 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/init.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/init.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/register_font.o b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/register_font.o index e47da8c..718c2aa 100644 Binary files a/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/register_font.o and b/npm-packages/mac-v2.4.x/canvas/build/Release/obj.target/canvas/src/register_font.o differ diff --git a/npm-packages/mac-v2.4.x/canvas/build/config.gypi b/npm-packages/mac-v2.4.x/canvas/build/config.gypi index c132337..f56968a 100644 --- a/npm-packages/mac-v2.4.x/canvas/build/config.gypi +++ b/npm-packages/mac-v2.4.x/canvas/build/config.gypi @@ -355,16 +355,16 @@ "standalone_static_library": 1, "fallback_to_build": "true", "update_binary": "true", - "module": "/Users/wsl/Documents/Test/CC249Test/packages/ccc-tnt-psd2ui/node_modules/canvas/build/Release/canvas.node", + "module": "/Users/wsl/Documents/Git/ccc-tnt-psd2ui/ccc-tnt-psd2ui-v2.4.x/node_modules/canvas/build/Release/canvas.node", "module_name": "canvas", - "module_path": "/Users/wsl/Documents/Test/CC249Test/packages/ccc-tnt-psd2ui/node_modules/canvas/build/Release", + "module_path": "/Users/wsl/Documents/Git/ccc-tnt-psd2ui/ccc-tnt-psd2ui-v2.4.x/node_modules/canvas/build/Release", "napi_version": "8", "node_abi_napi": "napi", "node_napi_label": "node-v93", "metrics_registry": "http://registry.npm.taobao.org/", "global_prefix": "/Users/wsl/.nvm/versions/node/v16.14.0", "registry": "http://registry.npm.taobao.org/", - "local_prefix": "/Users/wsl/Documents/Test/CC249Test/packages/ccc-tnt-psd2ui", + "local_prefix": "/Users/wsl/Documents/Git/ccc-tnt-psd2ui/ccc-tnt-psd2ui-v2.4.x", "globalconfig": "/Users/wsl/.nvm/versions/node/v16.14.0/etc/npmrc", "userconfig": "/Users/wsl/.npmrc", "init_module": "/Users/wsl/.npm-init.js", diff --git a/npm-packages/mac-v2.4.x/canvas/changes b/npm-packages/mac-v2.4.x/canvas/changes deleted file mode 100644 index a80b84b..0000000 --- a/npm-packages/mac-v2.4.x/canvas/changes +++ /dev/null @@ -1,19 +0,0 @@ -toBuffer and other canvas methods were static and unwrapped -the this arg. this seemed weird. they are now instance -methods since that's how object wrap works, XXX add -instanceof checks? - -node-canvas no lunger flushes microtasks when calling stream -cbs XXX wait now that I say it that sounds wrong? - -we don't need CHECK_RECEIVER anymore? dbl check that? - -TODO: check changes from As to AsX. bad assumption. - -dbl check try catch changes? - -Error is now CairoError - -global this in all callbacks, streamPNGSync now flushes microtasks - -streamPDF uses MakeCallback, not runInAsyncScope diff --git a/npm-packages/mac-v2.4.x/canvas/package.json b/npm-packages/mac-v2.4.x/canvas/package.json index 77e7232..bfc1522 100644 --- a/npm-packages/mac-v2.4.x/canvas/package.json +++ b/npm-packages/mac-v2.4.x/canvas/package.json @@ -1,7 +1,7 @@ { "name": "canvas", "description": "Canvas graphics API backed by Cairo", - "version": "2.11.2", + "version": "2.10.2", "author": "TJ Holowaychuk ", "main": "index.js", "browser": "browser.js", diff --git a/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.cc b/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.cc index b99c016..699ec88 100644 --- a/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.cc +++ b/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.cc @@ -171,13 +171,6 @@ Context2d::Context2d(Canvas *canvas) { _canvas = canvas; _context = canvas->createCairoContext(); _layout = pango_cairo_create_layout(_context); - - // As of January 2023, Pango rounds glyph positions which renders text wider - // or narrower than the browser. See #2184 for more information -#if PANGO_VERSION_CHECK(1, 44, 0) - pango_context_set_round_glyph_positions(pango_layout_get_context(_layout), FALSE); -#endif - states.emplace(); state = &states.top(); pango_layout_set_font_description(_layout, state->fontDescription); @@ -207,6 +200,7 @@ void Context2d::resetState() { void Context2d::_resetPersistentHandles() { _fillStyle.Reset(); _strokeStyle.Reset(); + _font.Reset(); } /* @@ -2552,8 +2546,15 @@ NAN_METHOD(Context2d::MoveTo) { NAN_GETTER(Context2d::GetFont) { CHECK_RECEIVER(Context2d.GetFont); Context2d *context = Nan::ObjectWrap::Unwrap(info.This()); + Isolate *iso = Isolate::GetCurrent(); + Local font; - info.GetReturnValue().Set(Nan::New(context->state->font).ToLocalChecked()); + if (context->_font.IsEmpty()) + font = Nan::New("10px sans-serif").ToLocalChecked(); + else + font = context->_font.Get(iso); + + info.GetReturnValue().Set(font); } /* @@ -2616,7 +2617,7 @@ NAN_SETTER(Context2d::SetFont) { context->state->fontDescription = sys_desc; pango_layout_set_font_description(context->_layout, sys_desc); - context->state->font = *Nan::Utf8String(value); + context->_font.Reset(value); } /* diff --git a/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.cc.orig b/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.cc.orig deleted file mode 100644 index 6dbc727..0000000 --- a/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.cc.orig +++ /dev/null @@ -1,3381 +0,0 @@ -// Copyright (c) 2010 LearnBoost - -#include "CanvasRenderingContext2d.h" - -#include -#include "backend/ImageBackend.h" -#include -#include "Canvas.h" -#include "CanvasGradient.h" -#include "CanvasPattern.h" -#include -#include -#include "Image.h" -#include "ImageData.h" -#include -#include -#include "Point.h" -#include -#include "Util.h" -#include - -using namespace Napi; - -Napi::FunctionReference Context2d::constructor; - -/* - * Rectangle arg assertions. - */ - -#define RECT_ARGS \ - double args[4]; \ - if(!checkArgs(info, args, 4)) \ - return; \ - double x = args[0]; \ - double y = args[1]; \ - double width = args[2]; \ - double height = args[3]; - -#define CHECK_RECEIVER(prop) \ - if (!Context2d::constructor.Get(info.GetIsolate())->HasInstance(info.This())) { \ - Napi::TypeError::New(env, "Method " #prop " called on incompatible receiver").ThrowAsJavaScriptException(); - \ - return; \ - } - -constexpr double twoPi = M_PI * 2.; - -/* - * Simple helper macro for a rather verbose function call. - */ - -#define PANGO_LAYOUT_GET_METRICS(LAYOUT) pango_context_get_metrics( \ - pango_layout_get_context(LAYOUT), \ - pango_layout_get_font_description(LAYOUT), \ - pango_context_get_language(pango_layout_get_context(LAYOUT))) - -inline static bool checkArgs(const Napi::CallbackInfo&info, double *args, int argsNum, int offset = 0){ - int argsEnd = offset + argsNum; - bool areArgsValid = true; - - for (int i = offset; i < argsEnd; i++) { - double val = info[i].As().DoubleValue().FromMaybe(0); - - if (areArgsValid) { - if (!std::isfinite(val)) { - // We should continue the loop instead of returning immediately - // See https://html.spec.whatwg.org/multipage/canvas.html - - areArgsValid = false; - continue; - } - - args[i - offset] = val; - } - } - - return areArgsValid; -} - -Napi::FunctionReference Context2d::_DOMMatrix; -Napi::FunctionReference Context2d::_parseFont; - -/* - * Initialize Context2d. - */ - -void -Context2d::Initialize(Napi::Env& env, Napi::Object& target) { - Napi::HandleScope scope(env); - - // Constructor - Napi::FunctionReference ctor = Napi::Function::New(env, Context2d::New); - constructor.Reset(ctor); - - ctor->SetClassName(Napi::String::New(env, "CanvasRenderingContext2D")); - - // Prototype - Local proto = ctor->PrototypeTemplate(); - InstanceMethod("drawImage", &DrawImage), - InstanceMethod("putImageData", &PutImageData), - InstanceMethod("getImageData", &GetImageData), - InstanceMethod("createImageData", &CreateImageData), - InstanceMethod("addPage", &AddPage), - InstanceMethod("save", &Save), - InstanceMethod("restore", &Restore), - InstanceMethod("rotate", &Rotate), - InstanceMethod("translate", &Translate), - InstanceMethod("transform", &Transform), - InstanceMethod("getTransform", &GetTransform), - InstanceMethod("resetTransform", &ResetTransform), - InstanceMethod("setTransform", &SetTransform), - InstanceMethod("isPointInPath", &IsPointInPath), - InstanceMethod("scale", &Scale), - InstanceMethod("clip", &Clip), - InstanceMethod("fill", &Fill), - InstanceMethod("stroke", &Stroke), - InstanceMethod("fillText", &FillText), - InstanceMethod("strokeText", &StrokeText), - InstanceMethod("fillRect", &FillRect), - InstanceMethod("strokeRect", &StrokeRect), - InstanceMethod("clearRect", &ClearRect), - InstanceMethod("rect", &Rect), - InstanceMethod("roundRect", &RoundRect), - InstanceMethod("measureText", &MeasureText), - InstanceMethod("moveTo", &MoveTo), - InstanceMethod("lineTo", &LineTo), - InstanceMethod("bezierCurveTo", &BezierCurveTo), - InstanceMethod("quadraticCurveTo", &QuadraticCurveTo), - InstanceMethod("beginPath", &BeginPath), - InstanceMethod("closePath", &ClosePath), - InstanceMethod("arc", &Arc), - InstanceMethod("arcTo", &ArcTo), - InstanceMethod("ellipse", &Ellipse), - InstanceMethod("setLineDash", &SetLineDash), - InstanceMethod("getLineDash", &GetLineDash), - InstanceMethod("createPattern", &CreatePattern), - InstanceMethod("createLinearGradient", &CreateLinearGradient), - InstanceMethod("createRadialGradient", &CreateRadialGradient), - Napi::SetAccessor(proto, Napi::String::New(env, "pixelFormat"), GetFormat); - Napi::SetAccessor(proto, Napi::String::New(env, "patternQuality"), GetPatternQuality, SetPatternQuality); - Napi::SetAccessor(proto, Napi::String::New(env, "imageSmoothingEnabled"), GetImageSmoothingEnabled, SetImageSmoothingEnabled); - Napi::SetAccessor(proto, Napi::String::New(env, "globalCompositeOperation"), GetGlobalCompositeOperation, SetGlobalCompositeOperation); - Napi::SetAccessor(proto, Napi::String::New(env, "globalAlpha"), GetGlobalAlpha, SetGlobalAlpha); - Napi::SetAccessor(proto, Napi::String::New(env, "shadowColor"), GetShadowColor, SetShadowColor); - Napi::SetAccessor(proto, Napi::String::New(env, "miterLimit"), GetMiterLimit, SetMiterLimit); - Napi::SetAccessor(proto, Napi::String::New(env, "lineWidth"), GetLineWidth, SetLineWidth); - Napi::SetAccessor(proto, Napi::String::New(env, "lineCap"), GetLineCap, SetLineCap); - Napi::SetAccessor(proto, Napi::String::New(env, "lineJoin"), GetLineJoin, SetLineJoin); - Napi::SetAccessor(proto, Napi::String::New(env, "lineDashOffset"), GetLineDashOffset, SetLineDashOffset); - Napi::SetAccessor(proto, Napi::String::New(env, "shadowOffsetX"), GetShadowOffsetX, SetShadowOffsetX); - Napi::SetAccessor(proto, Napi::String::New(env, "shadowOffsetY"), GetShadowOffsetY, SetShadowOffsetY); - Napi::SetAccessor(proto, Napi::String::New(env, "shadowBlur"), GetShadowBlur, SetShadowBlur); - Napi::SetAccessor(proto, Napi::String::New(env, "antialias"), GetAntiAlias, SetAntiAlias); - Napi::SetAccessor(proto, Napi::String::New(env, "textDrawingMode"), GetTextDrawingMode, SetTextDrawingMode); - Napi::SetAccessor(proto, Napi::String::New(env, "quality"), GetQuality, SetQuality); - Napi::SetAccessor(proto, Napi::String::New(env, "currentTransform"), GetCurrentTransform, SetCurrentTransform); - Napi::SetAccessor(proto, Napi::String::New(env, "fillStyle"), GetFillStyle, SetFillStyle); - Napi::SetAccessor(proto, Napi::String::New(env, "strokeStyle"), GetStrokeStyle, SetStrokeStyle); - Napi::SetAccessor(proto, Napi::String::New(env, "font"), GetFont, SetFont); - Napi::SetAccessor(proto, Napi::String::New(env, "textBaseline"), GetTextBaseline, SetTextBaseline); - Napi::SetAccessor(proto, Napi::String::New(env, "textAlign"), GetTextAlign, SetTextAlign); - Local ctx = Napi::GetCurrentContext(); - (target).Set(Napi::String::New(env, "CanvasRenderingContext2d"), ctor->GetFunction(ctx)); - (target).Set(Napi::String::New(env, "CanvasRenderingContext2dInit"), Napi::Function::New(env, SaveExternalModules)); -} - -/* - * Create a cairo context. - */ - -Context2d::Context2d(Canvas *canvas) { - _canvas = canvas; - _context = canvas->createCairoContext(); - _layout = pango_cairo_create_layout(_context); - - // As of January 2023, Pango rounds glyph positions which renders text wider - // or narrower than the browser. See #2184 for more information -#if PANGO_VERSION_CHECK(1, 44, 0) - pango_context_set_round_glyph_positions(pango_layout_get_context(_layout), FALSE); -#endif - - states.emplace(); - state = &states.top(); - pango_layout_set_font_description(_layout, state->fontDescription); -} - -/* - * Destroy cairo context. - */ - -Context2d::~Context2d() { - g_object_unref(_layout); - cairo_destroy(_context); - _resetPersistentHandles(); -} - -/* - * Reset canvas state. - */ - -void Context2d::resetState() { - states.pop(); - states.emplace(); - pango_layout_set_font_description(_layout, state->fontDescription); - _resetPersistentHandles(); -} - -void Context2d::_resetPersistentHandles() { - _fillStyle.Reset(); - _strokeStyle.Reset(); -} - -/* - * Save cairo / canvas state. - */ - -void -Context2d::save() { - cairo_save(_context); - states.emplace(states.top()); - state = &states.top(); -} - -/* - * Restore cairo / canvas state. - */ - -void -Context2d::restore() { - if (states.size() > 1) { - cairo_restore(_context); - states.pop(); - state = &states.top(); - pango_layout_set_font_description(_layout, state->fontDescription); - } -} - -/* - * Save flat path. - */ - -void -Context2d::savePath() { - _path = cairo_copy_path_flat(_context); - cairo_new_path(_context); -} - -/* - * Restore flat path. - */ - -void -Context2d::restorePath() { - cairo_new_path(_context); - cairo_append_path(_context, _path); - cairo_path_destroy(_path); -} - -/* - * Create temporary surface for gradient or pattern transparency - */ -cairo_pattern_t* -create_transparent_gradient(cairo_pattern_t *source, float alpha) { - double x0; - double y0; - double x1; - double y1; - double r0; - double r1; - int count; - int i; - double offset; - double r; - double g; - double b; - double a; - cairo_pattern_t *newGradient; - cairo_pattern_type_t type = cairo_pattern_get_type(source); - cairo_pattern_get_color_stop_count(source, &count); - if (type == CAIRO_PATTERN_TYPE_LINEAR) { - cairo_pattern_get_linear_points (source, &x0, &y0, &x1, &y1); - newGradient = cairo_pattern_create_linear(x0, y0, x1, y1); - } else if (type == CAIRO_PATTERN_TYPE_RADIAL) { - cairo_pattern_get_radial_circles(source, &x0, &y0, &r0, &x1, &y1, &r1); - newGradient = cairo_pattern_create_radial(x0, y0, r0, x1, y1, r1); - } else { - Napi::Error::New(env, "Unexpected gradient type").ThrowAsJavaScriptException(); - - return NULL; - } - for ( i = 0; i < count; i++ ) { - cairo_pattern_get_color_stop_rgba(source, i, &offset, &r, &g, &b, &a); - cairo_pattern_add_color_stop_rgba(newGradient, offset, r, g, b, a * alpha); - } - return newGradient; -} - -cairo_pattern_t* -create_transparent_pattern(cairo_pattern_t *source, float alpha) { - cairo_surface_t *surface; - cairo_pattern_get_surface(source, &surface); - int width = cairo_image_surface_get_width(surface); - int height = cairo_image_surface_get_height(surface); - cairo_surface_t *mask_surface = cairo_image_surface_create( - CAIRO_FORMAT_ARGB32, - width, - height); - cairo_t *mask_context = cairo_create(mask_surface); - if (cairo_status(mask_context) != CAIRO_STATUS_SUCCESS) { - Napi::Error::New(env, "Failed to initialize context").ThrowAsJavaScriptException(); - - return NULL; - } - cairo_set_source(mask_context, source); - cairo_paint_with_alpha(mask_context, alpha); - cairo_destroy(mask_context); - cairo_pattern_t* newPattern = cairo_pattern_create_for_surface(mask_surface); - cairo_surface_destroy(mask_surface); - return newPattern; -} - -/* - * Fill and apply shadow. - */ - -void -Context2d::setFillRule(Napi::Value value) { - Napi::Env env = value.Env(); - cairo_fill_rule_t rule = CAIRO_FILL_RULE_WINDING; - if (value.IsString()) { - std::string str = value.As(); - if (std::strcmp(*str, "evenodd") == 0) { - rule = CAIRO_FILL_RULE_EVEN_ODD; - } - } - cairo_set_fill_rule(_context, rule); -} - -void -Context2d::fill(bool preserve) { - cairo_pattern_t *new_pattern; - bool needsRestore = false; - if (state->fillPattern) { - if (state->globalAlpha < 1) { - new_pattern = create_transparent_pattern(state->fillPattern, state->globalAlpha); - if (new_pattern == NULL) { - // failed to allocate; Napi::ThrowError has already been called, so return from this fn. - return; - } - cairo_set_source(_context, new_pattern); - cairo_pattern_destroy(new_pattern); - } else { - cairo_pattern_set_filter(state->fillPattern, state->patternQuality); - cairo_set_source(_context, state->fillPattern); - } - repeat_type_t repeat = Pattern::get_repeat_type_for_cairo_pattern(state->fillPattern); - if (repeat == NO_REPEAT) { - cairo_pattern_set_extend(cairo_get_source(_context), CAIRO_EXTEND_NONE); - } else if (repeat == REPEAT) { - cairo_pattern_set_extend(cairo_get_source(_context), CAIRO_EXTEND_REPEAT); - } else { - cairo_save(_context); - cairo_path_t *savedPath = cairo_copy_path(_context); - cairo_surface_t *patternSurface = nullptr; - cairo_pattern_get_surface(cairo_get_source(_context), &patternSurface); - - double width, height; - if (repeat == REPEAT_X) { - double x1, x2; - cairo_path_extents(_context, &x1, nullptr, &x2, nullptr); - width = x2 - x1; - height = cairo_image_surface_get_height(patternSurface); - } else { - double y1, y2; - cairo_path_extents(_context, nullptr, &y1, nullptr, &y2); - width = cairo_image_surface_get_width(patternSurface); - height = y2 - y1; - } - - cairo_new_path(_context); - cairo_rectangle(_context, 0, 0, width, height); - cairo_clip(_context); - cairo_append_path(_context, savedPath); - cairo_path_destroy(savedPath); - cairo_pattern_set_extend(cairo_get_source(_context), CAIRO_EXTEND_REPEAT); - needsRestore = true; - } - } else if (state->fillGradient) { - if (state->globalAlpha < 1) { - new_pattern = create_transparent_gradient(state->fillGradient, state->globalAlpha); - if (new_pattern == NULL) { - // failed to recognize gradient; Napi::ThrowError has already been called, so return from this fn. - return; - } - cairo_pattern_set_filter(new_pattern, state->patternQuality); - cairo_set_source(_context, new_pattern); - cairo_pattern_destroy(new_pattern); - } else { - cairo_pattern_set_filter(state->fillGradient, state->patternQuality); - cairo_set_source(_context, state->fillGradient); - } - } else { - setSourceRGBA(state->fill); - } - if (preserve) { - hasShadow() - ? shadow(cairo_fill_preserve) - : cairo_fill_preserve(_context); - } else { - hasShadow() - ? shadow(cairo_fill) - : cairo_fill(_context); - } - if (needsRestore) { - cairo_restore(_context); - } -} - -/* - * Stroke and apply shadow. - */ - -void -Context2d::stroke(bool preserve) { - cairo_pattern_t *new_pattern; - if (state->strokePattern) { - if (state->globalAlpha < 1) { - new_pattern = create_transparent_pattern(state->strokePattern, state->globalAlpha); - if (new_pattern == NULL) { - // failed to allocate; Napi::ThrowError has already been called, so return from this fn. - return; - } - cairo_set_source(_context, new_pattern); - cairo_pattern_destroy(new_pattern); - } else { - cairo_pattern_set_filter(state->strokePattern, state->patternQuality); - cairo_set_source(_context, state->strokePattern); - } - repeat_type_t repeat = Pattern::get_repeat_type_for_cairo_pattern(state->strokePattern); - if (NO_REPEAT == repeat) { - cairo_pattern_set_extend(cairo_get_source(_context), CAIRO_EXTEND_NONE); - } else { - cairo_pattern_set_extend(cairo_get_source(_context), CAIRO_EXTEND_REPEAT); - } - } else if (state->strokeGradient) { - if (state->globalAlpha < 1) { - new_pattern = create_transparent_gradient(state->strokeGradient, state->globalAlpha); - if (new_pattern == NULL) { - // failed to recognize gradient; Napi::ThrowError has already been called, so return from this fn. - return; - } - cairo_pattern_set_filter(new_pattern, state->patternQuality); - cairo_set_source(_context, new_pattern); - cairo_pattern_destroy(new_pattern); - } else { - cairo_pattern_set_filter(state->strokeGradient, state->patternQuality); - cairo_set_source(_context, state->strokeGradient); - } - } else { - setSourceRGBA(state->stroke); - } - - if (preserve) { - hasShadow() - ? shadow(cairo_stroke_preserve) - : cairo_stroke_preserve(_context); - } else { - hasShadow() - ? shadow(cairo_stroke) - : cairo_stroke(_context); - } -} - -/* - * Apply shadow with the given draw fn. - */ - -void -Context2d::shadow(void (fn)(cairo_t *cr)) { - cairo_path_t *path = cairo_copy_path_flat(_context); - cairo_save(_context); - - // shadowOffset is unaffected by current transform - cairo_matrix_t path_matrix; - cairo_get_matrix(_context, &path_matrix); - cairo_identity_matrix(_context); - - // Apply shadow - cairo_push_group(_context); - - // No need to invoke blur if shadowBlur is 0 - if (state->shadowBlur) { - // find out extent of path - double x1, y1, x2, y2; - if (fn == cairo_fill || fn == cairo_fill_preserve) { - cairo_fill_extents(_context, &x1, &y1, &x2, &y2); - } else { - cairo_stroke_extents(_context, &x1, &y1, &x2, &y2); - } - - // create new image surface that size + padding for blurring - double dx = x2-x1, dy = y2-y1; - cairo_user_to_device_distance(_context, &dx, &dy); - int pad = state->shadowBlur * 2; - cairo_surface_t *shadow_surface = cairo_image_surface_create( - CAIRO_FORMAT_ARGB32, - dx + 2 * pad, - dy + 2 * pad); - cairo_t *shadow_context = cairo_create(shadow_surface); - - // transform path to the right place - cairo_translate(shadow_context, pad-x1, pad-y1); - cairo_transform(shadow_context, &path_matrix); - - // set lineCap lineJoin lineDash - cairo_set_line_cap(shadow_context, cairo_get_line_cap(_context)); - cairo_set_line_join(shadow_context, cairo_get_line_join(_context)); - - double offset; - int dashes = cairo_get_dash_count(_context); - std::vector a(dashes); - cairo_get_dash(_context, a.data(), &offset); - cairo_set_dash(shadow_context, a.data(), dashes, offset); - - // draw the path and blur - cairo_set_line_width(shadow_context, cairo_get_line_width(_context)); - cairo_new_path(shadow_context); - cairo_append_path(shadow_context, path); - setSourceRGBA(shadow_context, state->shadow); - fn(shadow_context); - blur(shadow_surface, state->shadowBlur); - - // paint to original context - cairo_set_source_surface(_context, shadow_surface, - x1 - pad + state->shadowOffsetX + 1, - y1 - pad + state->shadowOffsetY + 1); - cairo_paint(_context); - cairo_destroy(shadow_context); - cairo_surface_destroy(shadow_surface); - } else { - // Offset first, then apply path's transform - cairo_translate( - _context - , state->shadowOffsetX - , state->shadowOffsetY); - cairo_transform(_context, &path_matrix); - - // Apply shadow - cairo_new_path(_context); - cairo_append_path(_context, path); - setSourceRGBA(state->shadow); - - fn(_context); - } - - // Paint the shadow - cairo_pop_group_to_source(_context); - cairo_paint(_context); - - // Restore state - cairo_restore(_context); - cairo_new_path(_context); - cairo_append_path(_context, path); - fn(_context); - - cairo_path_destroy(path); -} - -/* - * Set source RGBA for the current context - */ - -void -Context2d::setSourceRGBA(rgba_t color) { - setSourceRGBA(_context, color); -} - -/* - * Set source RGBA - */ - -void -Context2d::setSourceRGBA(cairo_t *ctx, rgba_t color) { - cairo_set_source_rgba( - ctx - , color.r - , color.g - , color.b - , color.a * state->globalAlpha); -} - -/* - * Check if the context has a drawable shadow. - */ - -bool -Context2d::hasShadow() { - return state->shadow.a - && (state->shadowBlur || state->shadowOffsetX || state->shadowOffsetY); -} - -/* - * Blur the given surface with the given radius. - */ - -void -Context2d::blur(cairo_surface_t *surface, int radius) { - // Steve Hanov, 2009 - // Released into the public domain. - radius = radius * 0.57735f + 0.5f; - // get width, height - int width = cairo_image_surface_get_width( surface ); - int height = cairo_image_surface_get_height( surface ); - unsigned* precalc = - (unsigned*)malloc(width*height*sizeof(unsigned)); - cairo_surface_flush( surface ); - unsigned char* src = cairo_image_surface_get_data( surface ); - double mul=1.f/((radius*2)*(radius*2)); - int channel; - - // The number of times to perform the averaging. According to wikipedia, - // three iterations is good enough to pass for a gaussian. - const int MAX_ITERATIONS = 3; - int iteration; - - for ( iteration = 0; iteration < MAX_ITERATIONS; iteration++ ) { - for( channel = 0; channel < 4; channel++ ) { - int x,y; - - // precomputation step. - unsigned char* pix = src; - unsigned* pre = precalc; - - pix += channel; - for (y=0;y0) tot+=pre[-1]; - if (y>0) tot+=pre[-width]; - if (x>0 && y>0) tot-=pre[-width-1]; - *pre++=tot; - pix += 4; - } - } - - // blur step. - pix = src + (int)radius * width * 4 + (int)radius * 4 + channel; - for (y=radius;y= width ? width - 1 : x + radius; - int b = y + radius >= height ? height - 1 : y + radius; - int tot = precalc[r+b*width] + precalc[l+t*width] - - precalc[l+b*width] - precalc[r+t*width]; - *pix=(unsigned char)(tot*mul); - pix += 4; - } - pix += (int)radius * 2 * 4; - } - } - } - - cairo_surface_mark_dirty(surface); - free(precalc); -} - -/* - * Initialize a new Context2d with the given canvas. - */ - -Napi::Value Context2d::New(const Napi::CallbackInfo& info) { - if (!info.IsConstructCall()) { - Napi::TypeError::New(env, "Class constructors cannot be invoked without 'new'").ThrowAsJavaScriptException(); - return env.Null(); - } - - if (!info[0].IsObject()) - Napi::TypeError::New(env, "Canvas expected").ThrowAsJavaScriptException(); - return env.Null(); - Napi::Object obj = info[0].To(); - if (!Napi::New(env, Canvas::constructor)->HasInstance(obj)) - Napi::TypeError::New(env, "Canvas expected").ThrowAsJavaScriptException(); - return env.Null(); - Canvas *canvas = obj.Unwrap(); - - bool isImageBackend = canvas->backend()->getName() == "image"; - if (isImageBackend) { - cairo_format_t format = ImageBackend::DEFAULT_FORMAT; - if (info[1].IsObject()) { - Napi::Object ctxAttributes = info[1].To(); - - Napi::Value pixelFormat = (ctxAttributes).Get(Napi::String::New(env, "pixelFormat")); - if (pixelFormat.IsString()) { - std::string utf8PixelFormat = pixelFormat.As(); - if (!strcmp(*utf8PixelFormat, "RGBA32")) format = CAIRO_FORMAT_ARGB32; - else if (!strcmp(*utf8PixelFormat, "RGB24")) format = CAIRO_FORMAT_RGB24; - else if (!strcmp(*utf8PixelFormat, "A8")) format = CAIRO_FORMAT_A8; - else if (!strcmp(*utf8PixelFormat, "RGB16_565")) format = CAIRO_FORMAT_RGB16_565; - else if (!strcmp(*utf8PixelFormat, "A1")) format = CAIRO_FORMAT_A1; -#ifdef CAIRO_FORMAT_RGB30 - else if (!strcmp(utf8PixelFormat, "RGB30")) format = CAIRO_FORMAT_RGB30; -#endif - } - - // alpha: false forces use of RGB24 - Napi::Value alpha = (ctxAttributes).Get(Napi::String::New(env, "alpha")); - if (alpha->IsBoolean() && !alpha.As().Value().FromMaybe(false)) { - format = CAIRO_FORMAT_RGB24; - } - } - static_cast(canvas->backend())->setFormat(format); - } - - Context2d *context = new Context2d(canvas); - - context->Wrap(info.This()); - return info.This(); -} - -/* - * Save some external modules as private references. - */ - -Napi::Value Context2d::SaveExternalModules(const Napi::CallbackInfo& info) { - _DOMMatrix.Reset(info[0].To()); - _parseFont.Reset(info[1].To()); -} - -/* -* Get format (string). -*/ - -Napi::Value Context2d::GetFormat(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetFormat); - Context2d *context = info.This().Unwrap(); - std::string pixelFormatString; - switch (context->canvas()->backend()->getFormat()) { - case CAIRO_FORMAT_ARGB32: pixelFormatString = "RGBA32"; break; - case CAIRO_FORMAT_RGB24: pixelFormatString = "RGB24"; break; - case CAIRO_FORMAT_A8: pixelFormatString = "A8"; break; - case CAIRO_FORMAT_A1: pixelFormatString = "A1"; break; - case CAIRO_FORMAT_RGB16_565: pixelFormatString = "RGB16_565"; break; -#ifdef CAIRO_FORMAT_RGB30 - case CAIRO_FORMAT_RGB30: pixelFormatString = "RGB30"; break; -#endif - default: return info.GetReturnValue().SetNull(); - } - return Napi::String::New(env, pixelFormatString); -} - -/* - * Create a new page. - */ - -Napi::Value Context2d::AddPage(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - if (context->canvas()->backend()->getName() != "pdf") { - Napi::Error::New(env, "only PDF canvases support .addPage()").ThrowAsJavaScriptException(); - return env.Null(); - } - cairo_show_page(context->context()); - int width = info[0].As().Int32Value().FromMaybe(0); - int height = info[1].As().Int32Value().FromMaybe(0); - if (width < 1) width = context->canvas()->getWidth(); - if (height < 1) height = context->canvas()->getHeight(); - cairo_pdf_surface_set_size(context->canvas()->surface(), width, height); - return; -} - -/* - * Put image data. - * - * - imageData, dx, dy - * - imageData, dx, dy, sx, sy, sw, sh - * - */ - -Napi::Value Context2d::PutImageData(const Napi::CallbackInfo& info) { - if (!info[0].IsObject()) - Napi::TypeError::New(env, "ImageData expected").ThrowAsJavaScriptException(); - return env.Null(); - Napi::Object obj = info[0].To(); - if (!Napi::New(env, ImageData::constructor)->HasInstance(obj)) - Napi::TypeError::New(env, "ImageData expected").ThrowAsJavaScriptException(); - return env.Null(); - - Context2d *context = info.This().Unwrap(); - ImageData *imageData = obj.Unwrap(); - - uint8_t *src = imageData->data(); - uint8_t *dst = context->canvas()->data(); - - int dstStride = context->canvas()->stride(); - int Bpp = dstStride / context->canvas()->getWidth(); - int srcStride = Bpp * imageData->width(); - - int sx = 0 - , sy = 0 - , sw = 0 - , sh = 0 - , dx = info[1].As().Int32Value().FromMaybe(0) - , dy = info[2].As().Int32Value().FromMaybe(0) - , rows - , cols; - - switch (info.Length()) { - // imageData, dx, dy - case 3: - sw = imageData->width(); - sh = imageData->height(); - break; - // imageData, dx, dy, sx, sy, sw, sh - case 7: - sx = info[3].As().Int32Value().FromMaybe(0); - sy = info[4].As().Int32Value().FromMaybe(0); - sw = info[5].As().Int32Value().FromMaybe(0); - sh = info[6].As().Int32Value().FromMaybe(0); - // fix up negative height, width - if (sw < 0) sx += sw, sw = -sw; - if (sh < 0) sy += sh, sh = -sh; - // clamp the left edge - if (sx < 0) sw += sx, sx = 0; - if (sy < 0) sh += sy, sy = 0; - // clamp the right edge - if (sx + sw > imageData->width()) sw = imageData->width() - sx; - if (sy + sh > imageData->height()) sh = imageData->height() - sy; - // start destination at source offset - dx += sx; - dy += sy; - break; - default: - Napi::Error::New(env, "invalid arguments").ThrowAsJavaScriptException(); - return env.Null(); - } - - // chop off outlying source data - if (dx < 0) sw += dx, sx -= dx, dx = 0; - if (dy < 0) sh += dy, sy -= dy, dy = 0; - // clamp width at canvas size - // Need to wrap std::min calls using parens to prevent macro expansion on - // windows. See http://stackoverflow.com/questions/5004858/stdmin-gives-error - cols = (std::min)(sw, context->canvas()->getWidth() - dx); - rows = (std::min)(sh, context->canvas()->getHeight() - dy); - - if (cols <= 0 || rows <= 0) return; - - switch (context->canvas()->backend()->getFormat()) { - case CAIRO_FORMAT_ARGB32: { - src += sy * srcStride + sx * 4; - dst += dstStride * dy + 4 * dx; - for (int y = 0; y < rows; ++y) { - uint8_t *dstRow = dst; - uint8_t *srcRow = src; - for (int x = 0; x < cols; ++x) { - // rgba - uint8_t r = *srcRow++; - uint8_t g = *srcRow++; - uint8_t b = *srcRow++; - uint8_t a = *srcRow++; - - // argb - // performance optimization: fully transparent/opaque pixels can be - // processed more efficiently. - if (a == 0) { - *dstRow++ = 0; - *dstRow++ = 0; - *dstRow++ = 0; - *dstRow++ = 0; - } else if (a == 255) { - *dstRow++ = b; - *dstRow++ = g; - *dstRow++ = r; - *dstRow++ = a; - } else { - float alpha = (float)a / 255; - *dstRow++ = b * alpha; - *dstRow++ = g * alpha; - *dstRow++ = r * alpha; - *dstRow++ = a; - } - } - dst += dstStride; - src += srcStride; - } - break; - } - case CAIRO_FORMAT_RGB24: { - src += sy * srcStride + sx * 4; - dst += dstStride * dy + 4 * dx; - for (int y = 0; y < rows; ++y) { - uint8_t *dstRow = dst; - uint8_t *srcRow = src; - for (int x = 0; x < cols; ++x) { - // rgba - uint8_t r = *srcRow++; - uint8_t g = *srcRow++; - uint8_t b = *srcRow++; - srcRow++; - - // argb - *dstRow++ = b; - *dstRow++ = g; - *dstRow++ = r; - *dstRow++ = 255; - } - dst += dstStride; - src += srcStride; - } - break; - } - case CAIRO_FORMAT_A8: { - src += sy * srcStride + sx; - dst += dstStride * dy + dx; - if (srcStride == dstStride && cols == dstStride) { - // fast path: strides are the same and doing a full-width put - memcpy(dst, src, cols * rows); - } else { - for (int y = 0; y < rows; ++y) { - memcpy(dst, src, cols); - dst += dstStride; - src += srcStride; - } - } - break; - } - case CAIRO_FORMAT_A1: { - // TODO Should this be totally packed, or maintain a stride divisible by 4? - Napi::Error::New(env, "putImageData for CANVAS_FORMAT_A1 is not yet implemented").ThrowAsJavaScriptException(); - - break; - } - case CAIRO_FORMAT_RGB16_565: { - src += sy * srcStride + sx * 2; - dst += dstStride * dy + 2 * dx; - for (int y = 0; y < rows; ++y) { - memcpy(dst, src, cols * 2); - dst += dstStride; - src += srcStride; - } - break; - } -#ifdef CAIRO_FORMAT_RGB30 - case CAIRO_FORMAT_RGB30: { - // TODO - Napi::Error::New(env, "putImageData for CANVAS_FORMAT_RGB30 is not yet implemented").ThrowAsJavaScriptException(); - - break; - } -#endif - default: { - Napi::Error::New(env, "Invalid pixel format or not an image canvas").ThrowAsJavaScriptException(); - return env.Null(); - } - } - - cairo_surface_mark_dirty_rectangle( - context->canvas()->surface() - , dx - , dy - , cols - , rows); -} - -/* - * Get image data. - * - * - sx, sy, sw, sh - * - */ - -Napi::Value Context2d::GetImageData(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - Canvas *canvas = context->canvas(); - - int sx = info[0].As().Int32Value().FromMaybe(0); - int sy = info[1].As().Int32Value().FromMaybe(0); - int sw = info[2].As().Int32Value().FromMaybe(0); - int sh = info[3].As().Int32Value().FromMaybe(0); - - if (!sw) - Napi::Error::New(env, "IndexSizeError: The source width is 0.").ThrowAsJavaScriptException(); - return env.Null(); - if (!sh) - Napi::Error::New(env, "IndexSizeError: The source height is 0.").ThrowAsJavaScriptException(); - return env.Null(); - - int width = canvas->getWidth(); - int height = canvas->getHeight(); - - if (!width) - Napi::TypeError::New(env, "Canvas width is 0").ThrowAsJavaScriptException(); - return env.Null(); - if (!height) - Napi::TypeError::New(env, "Canvas height is 0").ThrowAsJavaScriptException(); - return env.Null(); - - // WebKit and Firefox have this behavior: - // Flip the coordinates so the origin is top/left-most: - if (sw < 0) { - sx += sw; - sw = -sw; - } - if (sh < 0) { - sy += sh; - sh = -sh; - } - - if (sx + sw > width) sw = width - sx; - if (sy + sh > height) sh = height - sy; - - // WebKit/moz functionality. node-canvas used to return in either case. - if (sw <= 0) sw = 1; - if (sh <= 0) sh = 1; - - // Non-compliant. "Pixels outside the canvas must be returned as transparent - // black." This instead clips the returned array to the canvas area. - if (sx < 0) { - sw += sx; - sx = 0; - } - if (sy < 0) { - sh += sy; - sy = 0; - } - - int srcStride = canvas->stride(); - int bpp = srcStride / width; - int size = sw * sh * bpp; - int dstStride = sw * bpp; - - uint8_t *src = canvas->data(); - - Local buffer = ArrayBuffer::New(Isolate::GetCurrent(), size); - Local dataArray; - - if (canvas->backend()->getFormat() == CAIRO_FORMAT_RGB16_565) { - dataArray = Uint16Array::New(buffer, 0, size >> 1); - } else { - dataArray = Uint8ClampedArray::New(buffer, 0, size); - } - - Napi::TypedArrayContents typedArrayContents(dataArray); - uint8_t* dst = *typedArrayContents; - - switch (canvas->backend()->getFormat()) { - case CAIRO_FORMAT_ARGB32: { - // Rearrange alpha (argb -> rgba), undo alpha pre-multiplication, - // and store in big-endian format - for (int y = 0; y < sh; ++y) { - uint32_t *row = (uint32_t *)(src + srcStride * (y + sy)); - for (int x = 0; x < sw; ++x) { - int bx = x * 4; - uint32_t *pixel = row + x + sx; - uint8_t a = *pixel >> 24; - uint8_t r = *pixel >> 16; - uint8_t g = *pixel >> 8; - uint8_t b = *pixel; - dst[bx + 3] = a; - - // Performance optimization: fully transparent/opaque pixels can be - // processed more efficiently. - if (a == 0 || a == 255) { - dst[bx + 0] = r; - dst[bx + 1] = g; - dst[bx + 2] = b; - } else { - // Undo alpha pre-multiplication - float alphaR = (float)255 / a; - dst[bx + 0] = (int)((float)r * alphaR); - dst[bx + 1] = (int)((float)g * alphaR); - dst[bx + 2] = (int)((float)b * alphaR); - } - - } - dst += dstStride; - } - break; - } - case CAIRO_FORMAT_RGB24: { - // Rearrange alpha (argb -> rgba) and store in big-endian format - for (int y = 0; y < sh; ++y) { - uint32_t *row = (uint32_t *)(src + srcStride * (y + sy)); - for (int x = 0; x < sw; ++x) { - int bx = x * 4; - uint32_t *pixel = row + x + sx; - uint8_t r = *pixel >> 16; - uint8_t g = *pixel >> 8; - uint8_t b = *pixel; - - dst[bx + 0] = r; - dst[bx + 1] = g; - dst[bx + 2] = b; - dst[bx + 3] = 255; - } - dst += dstStride; - } - break; - } - case CAIRO_FORMAT_A8: { - for (int y = 0; y < sh; ++y) { - uint8_t *row = (uint8_t *)(src + srcStride * (y + sy)); - memcpy(dst, row + sx, dstStride); - dst += dstStride; - } - break; - } - case CAIRO_FORMAT_A1: { - // TODO Should this be totally packed, or maintain a stride divisible by 4? - Napi::Error::New(env, "getImageData for CANVAS_FORMAT_A1 is not yet implemented").ThrowAsJavaScriptException(); - - break; - } - case CAIRO_FORMAT_RGB16_565: { - for (int y = 0; y < sh; ++y) { - uint16_t *row = (uint16_t *)(src + srcStride * (y + sy)); - memcpy(dst, row + sx, dstStride); - dst += dstStride; - } - break; - } -#ifdef CAIRO_FORMAT_RGB30 - case CAIRO_FORMAT_RGB30: { - // TODO - Napi::Error::New(env, "getImageData for CANVAS_FORMAT_RGB30 is not yet implemented").ThrowAsJavaScriptException(); - - break; - } -#endif - default: { - // Unlikely - Napi::Error::New(env, "Invalid pixel format or not an image canvas").ThrowAsJavaScriptException(); - return env.Null(); - } - } - - const int argc = 3; - Local swHandle = Napi::New(env, sw); - Local shHandle = Napi::New(env, sh); - Napi::Value argv[argc] = { dataArray, swHandle, shHandle }; - - Napi::Function ctor = Napi::GetFunction(Napi::New(env, ImageData::constructor)); - Napi::Object instance = Napi::NewInstance(ctor, argc, argv); - - return instance; -} - -/** - * Create `ImageData` with the given dimensions or - * `ImageData` instance for dimensions. - */ - -Napi::Value Context2d::CreateImageData(const Napi::CallbackInfo& info){ - Isolate *iso = Isolate::GetCurrent(); - Context2d *context = info.This().Unwrap(); - Canvas *canvas = context->canvas(); - int32_t width, height; - - if (info[0].IsObject()) { - Napi::Object obj = info[0].To(); - width = (obj).Get(Napi::String::New(env, "width".As().Int32Value())).FromMaybe(0); - height = (obj).Get(Napi::String::New(env, "height".As().Int32Value())).FromMaybe(0); - } else { - width = info[0].As().Int32Value().FromMaybe(0); - height = info[1].As().Int32Value().FromMaybe(0); - } - - int stride = canvas->stride(); - double Bpp = static_cast(stride) / canvas->getWidth(); - int nBytes = static_cast(Bpp * width * height + .5); - - Local ab = ArrayBuffer::New(iso, nBytes); - Napi::Object arr; - - if (canvas->backend()->getFormat() == CAIRO_FORMAT_RGB16_565) - arr = Uint16Array::New(ab, 0, nBytes / 2); - else - arr = Uint8ClampedArray::New(ab, 0, nBytes); - - const int argc = 3; - Napi::Value argv[argc] = { arr, Napi::New(env, width), Napi::New(env, height) }; - - Napi::Function ctor = Napi::GetFunction(Napi::New(env, ImageData::constructor)); - Napi::Object instance = Napi::NewInstance(ctor, argc, argv); - - return instance; -} - -/* - * Take a transform matrix and return its components - * 0: angle, 1: scaleX, 2: scaleY, 3: skewX, 4: translateX, 5: translateY - */ -void decompose_matrix(cairo_matrix_t matrix, double *destination) { - double denom = pow(matrix.xx, 2) + pow(matrix.yx, 2); - destination[0] = atan2(matrix.yx, matrix.xx); - destination[1] = sqrt(denom); - destination[2] = (matrix.xx * matrix.yy - matrix.xy * matrix.yx) / destination[1]; - destination[3] = atan2(matrix.xx * matrix.xy + matrix.yx * matrix.yy, denom); - destination[4] = matrix.x0; - destination[5] = matrix.y0; -} - -/* - * Draw image src image to the destination (context). - * - * - dx, dy - * - dx, dy, dw, dh - * - sx, sy, sw, sh, dx, dy, dw, dh - * - */ - -Napi::Value Context2d::DrawImage(const Napi::CallbackInfo& info) { - int infoLen = info.Length(); - if (infoLen != 3 && infoLen != 5 && infoLen != 9) - Napi::TypeError::New(env, "Invalid arguments").ThrowAsJavaScriptException(); - return env.Null(); - - if (!info[0].IsObject()) - Napi::TypeError::New(env, "The first argument must be an object").ThrowAsJavaScriptException(); - return env.Null(); - - double args[8]; - if(!checkArgs(info, args, infoLen - 1, 1)) - return; - - double sx = 0 - , sy = 0 - , sw = 0 - , sh = 0 - , dx = 0 - , dy = 0 - , dw = 0 - , dh = 0 - , source_w = 0 - , source_h = 0; - - cairo_surface_t *surface; - - Napi::Object obj = info[0].To(); - - // Image - if (Napi::New(env, Image::constructor)->HasInstance(obj)) { - Image *img = obj.Unwrap(); - if (!img->isComplete()) { - Napi::Error::New(env, "Image given has not completed loading").ThrowAsJavaScriptException(); - return env.Null(); - } - source_w = sw = img->width; - source_h = sh = img->height; - surface = img->surface(); - - // Canvas - } else if (Napi::New(env, Canvas::constructor)->HasInstance(obj)) { - Canvas *canvas = obj.Unwrap(); - source_w = sw = canvas->getWidth(); - source_h = sh = canvas->getHeight(); - surface = canvas->surface(); - - // Invalid - } else { - Napi::TypeError::New(env, "Image or Canvas expected").ThrowAsJavaScriptException(); - return env.Null(); - } - - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - - // Arguments - switch (infoLen) { - // img, sx, sy, sw, sh, dx, dy, dw, dh - case 9: - sx = args[0]; - sy = args[1]; - sw = args[2]; - sh = args[3]; - dx = args[4]; - dy = args[5]; - dw = args[6]; - dh = args[7]; - break; - // img, dx, dy, dw, dh - case 5: - dx = args[0]; - dy = args[1]; - dw = args[2]; - dh = args[3]; - break; - // img, dx, dy - case 3: - dx = args[0]; - dy = args[1]; - dw = sw; - dh = sh; - break; - } - - if (!(sw && sh && dw && dh)) - return; - - // Start draw - cairo_save(ctx); - - cairo_matrix_t matrix; - double transforms[6]; - cairo_get_matrix(context->context(), &matrix); - decompose_matrix(matrix, transforms); - // extract the scale value from the current transform so that we know how many pixels we - // need for our extra canvas in the drawImage operation. - double current_scale_x = std::abs(transforms[1]); - double current_scale_y = std::abs(transforms[2]); - double extra_dx = 0; - double extra_dy = 0; - double fx = dw / sw * current_scale_x; // transforms[1] is scale on X - double fy = dh / sh * current_scale_y; // transforms[2] is scale on X - bool needScale = dw != sw || dh != sh; - bool needCut = sw != source_w || sh != source_h || sx < 0 || sy < 0; - bool sameCanvas = surface == context->canvas()->surface(); - bool needsExtraSurface = sameCanvas || needCut || needScale; - cairo_surface_t *surfTemp = NULL; - cairo_t *ctxTemp = NULL; - - if (needsExtraSurface) { - // we want to create the extra surface as small as possible. - // fx and fy are the total scaling we need to apply to sw, sh. - // from sw and sh we want to remove the part that is outside the source_w and soruce_h - double real_w = sw; - double real_h = sh; - double translate_x = 0; - double translate_y = 0; - // if sx or sy are negative, a part of the area represented by sw and sh is empty - // because there are empty pixels, so we cut it out. - // On the other hand if sx or sy are positive, but sw and sh extend outside the real - // source pixels, we cut the area in that case too. - if (sx < 0) { - extra_dx = -sx * fx; - real_w = sw + sx; - } else if (sx + sw > source_w) { - real_w = sw - (sx + sw - source_w); - } - if (sy < 0) { - extra_dy = -sy * fy; - real_h = sh + sy; - } else if (sy + sh > source_h) { - real_h = sh - (sy + sh - source_h); - } - // if after cutting we are still bigger than source pixels, we restrict again - if (real_w > source_w) { - real_w = source_w; - } - if (real_h > source_h) { - real_h = source_h; - } - // TODO: find a way to limit the surfTemp to real_w and real_h if fx and fy are bigger than 1. - // there are no more pixel than the one available in the source, no need to create a bigger surface. - surfTemp = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, round(real_w * fx), round(real_h * fy)); - ctxTemp = cairo_create(surfTemp); - cairo_scale(ctxTemp, fx, fy); - if (sx > 0) { - translate_x = sx; - } - if (sy > 0) { - translate_y = sy; - } - cairo_set_source_surface(ctxTemp, surface, -translate_x, -translate_y); - cairo_pattern_set_filter(cairo_get_source(ctxTemp), context->state->imageSmoothingEnabled ? context->state->patternQuality : CAIRO_FILTER_NEAREST); - cairo_pattern_set_extend(cairo_get_source(ctxTemp), CAIRO_EXTEND_REFLECT); - cairo_paint_with_alpha(ctxTemp, 1); - surface = surfTemp; - } - // apply shadow if there is one - if (context->hasShadow()) { - if(context->state->shadowBlur) { - // we need to create a new surface in order to blur - int pad = context->state->shadowBlur * 2; - cairo_surface_t *shadow_surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, dw + 2 * pad, dh + 2 * pad); - cairo_t *shadow_context = cairo_create(shadow_surface); - - // mask and blur - context->setSourceRGBA(shadow_context, context->state->shadow); - cairo_mask_surface(shadow_context, surface, pad, pad); - context->blur(shadow_surface, context->state->shadowBlur); - - // paint - // @note: ShadowBlur looks different in each browser. This implementation matches chrome as close as possible. - // The 1.4 offset comes from visual tests with Chrome. I have read the spec and part of the shadowBlur - // implementation, and its not immediately clear why an offset is necessary, but without it, the result - // in chrome is different. - cairo_set_source_surface(ctx, shadow_surface, - dx + context->state->shadowOffsetX - pad + 1.4, - dy + context->state->shadowOffsetY - pad + 1.4); - cairo_paint(ctx); - // cleanup - cairo_destroy(shadow_context); - cairo_surface_destroy(shadow_surface); - } else { - context->setSourceRGBA(context->state->shadow); - cairo_mask_surface(ctx, surface, - dx + (context->state->shadowOffsetX), - dy + (context->state->shadowOffsetY)); - } - } - - double scaled_dx = dx; - double scaled_dy = dy; - - if (needsExtraSurface && (current_scale_x != 1 || current_scale_y != 1)) { - // in this case our surface contains already current_scale_x, we need to scale back - cairo_scale(ctx, 1 / current_scale_x, 1 / current_scale_y); - scaled_dx *= current_scale_x; - scaled_dy *= current_scale_y; - } - // Paint - cairo_set_source_surface(ctx, surface, scaled_dx + extra_dx, scaled_dy + extra_dy); - cairo_pattern_set_filter(cairo_get_source(ctx), context->state->imageSmoothingEnabled ? context->state->patternQuality : CAIRO_FILTER_NEAREST); - cairo_pattern_set_extend(cairo_get_source(ctx), CAIRO_EXTEND_NONE); - cairo_paint_with_alpha(ctx, context->state->globalAlpha); - - cairo_restore(ctx); - - if (needsExtraSurface) { - cairo_destroy(ctxTemp); - cairo_surface_destroy(surfTemp); - } -} - -/* - * Get global alpha. - */ - -Napi::Value Context2d::GetGlobalAlpha(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetGlobalAlpha); - Context2d *context = info.This().Unwrap(); - return Napi::Number::New(env, context->state->globalAlpha); -} - -/* - * Set global alpha. - */ - -void Context2d::SetGlobalAlpha(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetGlobalAlpha); - double n = value.As().DoubleValue().FromMaybe(0); - if (n >= 0 && n <= 1) { - Context2d *context = info.This().Unwrap(); - context->state->globalAlpha = n; - } -} - -/* - * Get global composite operation. - */ - -Napi::Value Context2d::GetGlobalCompositeOperation(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetGlobalCompositeOperation); - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - - const char *op = "source-over"; - switch (cairo_get_operator(ctx)) { - // composite modes: - case CAIRO_OPERATOR_CLEAR: op = "clear"; break; - case CAIRO_OPERATOR_SOURCE: op = "copy"; break; - case CAIRO_OPERATOR_DEST: op = "destination"; break; - case CAIRO_OPERATOR_OVER: op = "source-over"; break; - case CAIRO_OPERATOR_DEST_OVER: op = "destination-over"; break; - case CAIRO_OPERATOR_IN: op = "source-in"; break; - case CAIRO_OPERATOR_DEST_IN: op = "destination-in"; break; - case CAIRO_OPERATOR_OUT: op = "source-out"; break; - case CAIRO_OPERATOR_DEST_OUT: op = "destination-out"; break; - case CAIRO_OPERATOR_ATOP: op = "source-atop"; break; - case CAIRO_OPERATOR_DEST_ATOP: op = "destination-atop"; break; - case CAIRO_OPERATOR_XOR: op = "xor"; break; - case CAIRO_OPERATOR_ADD: op = "lighter"; break; - // blend modes: - // Note: "source-over" and "normal" are synonyms. Chrome and FF both report - // "source-over" after setting gCO to "normal". - // case CAIRO_OPERATOR_OVER: op = "normal"; - case CAIRO_OPERATOR_MULTIPLY: op = "multiply"; break; - case CAIRO_OPERATOR_SCREEN: op = "screen"; break; - case CAIRO_OPERATOR_OVERLAY: op = "overlay"; break; - case CAIRO_OPERATOR_DARKEN: op = "darken"; break; - case CAIRO_OPERATOR_LIGHTEN: op = "lighten"; break; - case CAIRO_OPERATOR_COLOR_DODGE: op = "color-dodge"; break; - case CAIRO_OPERATOR_COLOR_BURN: op = "color-burn"; break; - case CAIRO_OPERATOR_HARD_LIGHT: op = "hard-light"; break; - case CAIRO_OPERATOR_SOFT_LIGHT: op = "soft-light"; break; - case CAIRO_OPERATOR_DIFFERENCE: op = "difference"; break; - case CAIRO_OPERATOR_EXCLUSION: op = "exclusion"; break; - case CAIRO_OPERATOR_HSL_HUE: op = "hue"; break; - case CAIRO_OPERATOR_HSL_SATURATION: op = "saturation"; break; - case CAIRO_OPERATOR_HSL_COLOR: op = "color"; break; - case CAIRO_OPERATOR_HSL_LUMINOSITY: op = "luminosity"; break; - // non-standard: - case CAIRO_OPERATOR_SATURATE: op = "saturate"; break; - } - - return Napi::New(env, op); -} - -/* - * Set pattern quality. - */ - -void Context2d::SetPatternQuality(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetPatternQuality); - Context2d *context = info.This().Unwrap(); - std::string quality = value.As(.To()); - if (0 == strcmp("fast", *quality)) { - context->state->patternQuality = CAIRO_FILTER_FAST; - } else if (0 == strcmp("good", *quality)) { - context->state->patternQuality = CAIRO_FILTER_GOOD; - } else if (0 == strcmp("best", *quality)) { - context->state->patternQuality = CAIRO_FILTER_BEST; - } else if (0 == strcmp("nearest", *quality)) { - context->state->patternQuality = CAIRO_FILTER_NEAREST; - } else if (0 == strcmp("bilinear", *quality)) { - context->state->patternQuality = CAIRO_FILTER_BILINEAR; - } -} - -/* - * Get pattern quality. - */ - -Napi::Value Context2d::GetPatternQuality(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetPatternQuality); - Context2d *context = info.This().Unwrap(); - const char *quality; - switch (context->state->patternQuality) { - case CAIRO_FILTER_FAST: quality = "fast"; break; - case CAIRO_FILTER_BEST: quality = "best"; break; - case CAIRO_FILTER_NEAREST: quality = "nearest"; break; - case CAIRO_FILTER_BILINEAR: quality = "bilinear"; break; - default: quality = "good"; - } - return Napi::New(env, quality); -} - -/* - * Set ImageSmoothingEnabled value. - */ - -void Context2d::SetImageSmoothingEnabled(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetImageSmoothingEnabled); - Context2d *context = info.This().Unwrap(); - context->state->imageSmoothingEnabled = value.As().Value().FromMaybe(false); -} - -/* - * Get pattern quality. - */ - -Napi::Value Context2d::GetImageSmoothingEnabled(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetImageSmoothingEnabled); - Context2d *context = info.This().Unwrap(); - return Napi::Boolean::New(env, context->state->imageSmoothingEnabled); -} - -/* - * Set global composite operation. - */ - -void Context2d::SetGlobalCompositeOperation(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetGlobalCompositeOperation); - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - std::string opStr = value.As(.To()); // Unlike CSS colors, this *is* case-sensitive - const std::map blendmodes = { - // composite modes: - {"clear", CAIRO_OPERATOR_CLEAR}, - {"copy", CAIRO_OPERATOR_SOURCE}, - {"destination", CAIRO_OPERATOR_DEST}, // this seems to have been omitted from the spec - {"source-over", CAIRO_OPERATOR_OVER}, - {"destination-over", CAIRO_OPERATOR_DEST_OVER}, - {"source-in", CAIRO_OPERATOR_IN}, - {"destination-in", CAIRO_OPERATOR_DEST_IN}, - {"source-out", CAIRO_OPERATOR_OUT}, - {"destination-out", CAIRO_OPERATOR_DEST_OUT}, - {"source-atop", CAIRO_OPERATOR_ATOP}, - {"destination-atop", CAIRO_OPERATOR_DEST_ATOP}, - {"xor", CAIRO_OPERATOR_XOR}, - {"lighter", CAIRO_OPERATOR_ADD}, - // blend modes: - {"normal", CAIRO_OPERATOR_OVER}, - {"multiply", CAIRO_OPERATOR_MULTIPLY}, - {"screen", CAIRO_OPERATOR_SCREEN}, - {"overlay", CAIRO_OPERATOR_OVERLAY}, - {"darken", CAIRO_OPERATOR_DARKEN}, - {"lighten", CAIRO_OPERATOR_LIGHTEN}, - {"color-dodge", CAIRO_OPERATOR_COLOR_DODGE}, - {"color-burn", CAIRO_OPERATOR_COLOR_BURN}, - {"hard-light", CAIRO_OPERATOR_HARD_LIGHT}, - {"soft-light", CAIRO_OPERATOR_SOFT_LIGHT}, - {"difference", CAIRO_OPERATOR_DIFFERENCE}, - {"exclusion", CAIRO_OPERATOR_EXCLUSION}, - {"hue", CAIRO_OPERATOR_HSL_HUE}, - {"saturation", CAIRO_OPERATOR_HSL_SATURATION}, - {"color", CAIRO_OPERATOR_HSL_COLOR}, - {"luminosity", CAIRO_OPERATOR_HSL_LUMINOSITY}, - // non-standard: - {"saturate", CAIRO_OPERATOR_SATURATE} - }; - auto op = blendmodes.find(*opStr); - if (op != blendmodes.end()) cairo_set_operator(ctx, op->second); -} - -/* - * Get shadow offset x. - */ - -Napi::Value Context2d::GetShadowOffsetX(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetShadowOffsetX); - Context2d *context = info.This().Unwrap(); - return Napi::Number::New(env, context->state->shadowOffsetX); -} - -/* - * Set shadow offset x. - */ - -void Context2d::SetShadowOffsetX(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetShadowOffsetX); - Context2d *context = info.This().Unwrap(); - context->state->shadowOffsetX = value.As().DoubleValue().FromMaybe(0); -} - -/* - * Get shadow offset y. - */ - -Napi::Value Context2d::GetShadowOffsetY(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetShadowOffsetY); - Context2d *context = info.This().Unwrap(); - return Napi::Number::New(env, context->state->shadowOffsetY); -} - -/* - * Set shadow offset y. - */ - -void Context2d::SetShadowOffsetY(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetShadowOffsetY); - Context2d *context = info.This().Unwrap(); - context->state->shadowOffsetY = value.As().DoubleValue().FromMaybe(0); -} - -/* - * Get shadow blur. - */ - -Napi::Value Context2d::GetShadowBlur(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetShadowBlur); - Context2d *context = info.This().Unwrap(); - return Napi::Number::New(env, context->state->shadowBlur); -} - -/* - * Set shadow blur. - */ - -void Context2d::SetShadowBlur(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetShadowBlur); - int n = value.As().DoubleValue().FromMaybe(0); - if (n >= 0) { - Context2d *context = info.This().Unwrap(); - context->state->shadowBlur = n; - } -} - -/* - * Get current antialiasing setting. - */ - -Napi::Value Context2d::GetAntiAlias(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetAntiAlias); - Context2d *context = info.This().Unwrap(); - const char *aa; - switch (cairo_get_antialias(context->context())) { - case CAIRO_ANTIALIAS_NONE: aa = "none"; break; - case CAIRO_ANTIALIAS_GRAY: aa = "gray"; break; - case CAIRO_ANTIALIAS_SUBPIXEL: aa = "subpixel"; break; - default: aa = "default"; - } - return Napi::New(env, aa); -} - -/* - * Set antialiasing. - */ - -void Context2d::SetAntiAlias(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetAntiAlias); - std::string str = value.As(.To()); - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - cairo_antialias_t a; - if (0 == strcmp("none", *str)) { - a = CAIRO_ANTIALIAS_NONE; - } else if (0 == strcmp("default", *str)) { - a = CAIRO_ANTIALIAS_DEFAULT; - } else if (0 == strcmp("gray", *str)) { - a = CAIRO_ANTIALIAS_GRAY; - } else if (0 == strcmp("subpixel", *str)) { - a = CAIRO_ANTIALIAS_SUBPIXEL; - } else { - a = cairo_get_antialias(ctx); - } - cairo_set_antialias(ctx, a); -} - -/* - * Get text drawing mode. - */ - -Napi::Value Context2d::GetTextDrawingMode(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetTextDrawingMode); - Context2d *context = info.This().Unwrap(); - const char *mode; - if (context->state->textDrawingMode == TEXT_DRAW_PATHS) { - mode = "path"; - } else if (context->state->textDrawingMode == TEXT_DRAW_GLYPHS) { - mode = "glyph"; - } else { - mode = "unknown"; - } - return Napi::New(env, mode); -} - -/* - * Set text drawing mode. - */ - -void Context2d::SetTextDrawingMode(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetTextDrawingMode); - std::string str = value.As(.To()); - Context2d *context = info.This().Unwrap(); - if (0 == strcmp("path", *str)) { - context->state->textDrawingMode = TEXT_DRAW_PATHS; - } else if (0 == strcmp("glyph", *str)) { - context->state->textDrawingMode = TEXT_DRAW_GLYPHS; - } -} - -/* - * Get filter. - */ - -Napi::Value Context2d::GetQuality(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetQuality); - Context2d *context = info.This().Unwrap(); - const char *filter; - switch (cairo_pattern_get_filter(cairo_get_source(context->context()))) { - case CAIRO_FILTER_FAST: filter = "fast"; break; - case CAIRO_FILTER_BEST: filter = "best"; break; - case CAIRO_FILTER_NEAREST: filter = "nearest"; break; - case CAIRO_FILTER_BILINEAR: filter = "bilinear"; break; - default: filter = "good"; - } - return Napi::New(env, filter); -} - -/* - * Set filter. - */ - -void Context2d::SetQuality(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetQuality); - std::string str = value.As(.To()); - Context2d *context = info.This().Unwrap(); - cairo_filter_t filter; - if (0 == strcmp("fast", *str)) { - filter = CAIRO_FILTER_FAST; - } else if (0 == strcmp("best", *str)) { - filter = CAIRO_FILTER_BEST; - } else if (0 == strcmp("nearest", *str)) { - filter = CAIRO_FILTER_NEAREST; - } else if (0 == strcmp("bilinear", *str)) { - filter = CAIRO_FILTER_BILINEAR; - } else { - filter = CAIRO_FILTER_GOOD; - } - cairo_pattern_set_filter(cairo_get_source(context->context()), filter); -} - -/* - * Helper for get current transform matrix - */ - -Napi::Object -get_current_transform(Context2d *context) { - Isolate *iso = Isolate::GetCurrent(); - - Local arr = Float64Array::New(ArrayBuffer::New(iso, 48), 0, 6); - Napi::TypedArrayContents dest(arr); - cairo_matrix_t matrix; - cairo_get_matrix(context->context(), &matrix); - (*dest)[0] = matrix.xx; - (*dest)[1] = matrix.yx; - (*dest)[2] = matrix.xy; - (*dest)[3] = matrix.yy; - (*dest)[4] = matrix.x0; - (*dest)[5] = matrix.y0; - - const int argc = 1; - Napi::Value argv[argc] = { arr }; - return Napi::NewInstance(context->_DOMMatrix.Get(iso), argc, argv); -} - -/* - * Helper for get/set transform. - */ - -void parse_matrix_from_object(cairo_matrix_t &matrix, Napi::Object mat) { - cairo_matrix_init(&matrix, - (mat).Get(Napi::String::New(env, "a".As().DoubleValue())).FromMaybe(0), - (mat).Get(Napi::String::New(env, "b".As().DoubleValue())).FromMaybe(0), - (mat).Get(Napi::String::New(env, "c".As().DoubleValue())).FromMaybe(0), - (mat).Get(Napi::String::New(env, "d".As().DoubleValue())).FromMaybe(0), - (mat).Get(Napi::String::New(env, "e".As().DoubleValue())).FromMaybe(0), - (mat).Get(Napi::String::New(env, "f".As().DoubleValue())).FromMaybe(0) - ); -} - - -/* - * Get current transform. - */ - -Napi::Value Context2d::GetCurrentTransform(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetCurrentTransform); - Context2d *context = info.This().Unwrap(); - Napi::Object instance = get_current_transform(context); - - return instance; -} - -/* - * Set current transform. - */ - -void Context2d::SetCurrentTransform(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetCurrentTransform); - Context2d *context = info.This().Unwrap(); - Local ctx = Napi::GetCurrentContext(); - Napi::Object mat = value.To(); - -#if NODE_MAJOR_VERSION >= 8 - if (!mat->InstanceOf(ctx, _DOMMatrix.Get(Isolate::GetCurrent())).ToChecked()) { - Napi::TypeError::New(env, "Expected DOMMatrix").ThrowAsJavaScriptException(); - return env.Null(); - } -#endif - - cairo_matrix_t matrix; - parse_matrix_from_object(matrix, mat); - - cairo_transform(context->context(), &matrix); -} - -/* - * Get current fill style. - */ - -Napi::Value Context2d::GetFillStyle(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetFillStyle); - Context2d *context = info.This().Unwrap(); - Isolate *iso = Isolate::GetCurrent(); - Napi::Value style; - - if (context->_fillStyle.IsEmpty()) - style = context->_getFillColor(); - else - style = context->_fillStyle.Get(iso); - - return style; -} - -/* - * Set current fill style. - */ - -void Context2d::SetFillStyle(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetFillStyle); - Context2d *context = info.This().Unwrap(); - - if (value.IsString()) { - MaybeNapi::String mstr = value.To(); - if (mstr.IsEmpty()) return; - Napi::String str = mstr; - context->_fillStyle.Reset(); - context->_setFillColor(str); - } else if (value.IsObject()) { - Napi::Object obj = value.To(); - if (Napi::New(env, Gradient::constructor)->HasInstance(obj)) { - context->_fillStyle.Reset(value); - Gradient *grad = obj.Unwrap(); - context->state->fillGradient = grad->pattern(); - } else if (Napi::New(env, Pattern::constructor)->HasInstance(obj)) { - context->_fillStyle.Reset(value); - Pattern *pattern = obj.Unwrap(); - context->state->fillPattern = pattern->pattern(); - } - } -} - -/* - * Get current stroke style. - */ - -Napi::Value Context2d::GetStrokeStyle(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetStrokeStyle); - Context2d *context = info.This().Unwrap(); - Napi::Value style; - - if (context->_strokeStyle.IsEmpty()) - style = context->_getStrokeColor(); - else - style = context->_strokeStyle.Get(Isolate::GetCurrent()); - - return style; -} - -/* - * Set current stroke style. - */ - -void Context2d::SetStrokeStyle(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetStrokeStyle); - Context2d *context = info.This().Unwrap(); - - if (value.IsString()) { - MaybeNapi::String mstr = value.To(); - if (mstr.IsEmpty()) return; - Napi::String str = mstr; - context->_strokeStyle.Reset(); - context->_setStrokeColor(str); - } else if (value.IsObject()) { - Napi::Object obj = value.To(); - if (Napi::New(env, Gradient::constructor)->HasInstance(obj)) { - context->_strokeStyle.Reset(value); - Gradient *grad = obj.Unwrap(); - context->state->strokeGradient = grad->pattern(); - } else if (Napi::New(env, Pattern::constructor)->HasInstance(obj)) { - context->_strokeStyle.Reset(value); - Pattern *pattern = obj.Unwrap(); - context->state->strokePattern = pattern->pattern(); - } - } -} - -/* - * Get miter limit. - */ - -Napi::Value Context2d::GetMiterLimit(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetMiterLimit); - Context2d *context = info.This().Unwrap(); - return Napi::Number::New(env, cairo_get_miter_limit(context->context())); -} - -/* - * Set miter limit. - */ - -void Context2d::SetMiterLimit(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetMiterLimit); - double n = value.As().DoubleValue().FromMaybe(0); - if (n > 0) { - Context2d *context = info.This().Unwrap(); - cairo_set_miter_limit(context->context(), n); - } -} - -/* - * Get line width. - */ - -Napi::Value Context2d::GetLineWidth(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetLineWidth); - Context2d *context = info.This().Unwrap(); - return Napi::Number::New(env, cairo_get_line_width(context->context())); -} - -/* - * Set line width. - */ - -void Context2d::SetLineWidth(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetLineWidth); - double n = value.As().DoubleValue().FromMaybe(0); - if (n > 0 && n != std::numeric_limits::infinity()) { - Context2d *context = info.This().Unwrap(); - cairo_set_line_width(context->context(), n); - } -} - -/* - * Get line join. - */ - -Napi::Value Context2d::GetLineJoin(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetLineJoin); - Context2d *context = info.This().Unwrap(); - const char *join; - switch (cairo_get_line_join(context->context())) { - case CAIRO_LINE_JOIN_BEVEL: join = "bevel"; break; - case CAIRO_LINE_JOIN_ROUND: join = "round"; break; - default: join = "miter"; - } - return Napi::New(env, join); -} - -/* - * Set line join. - */ - -void Context2d::SetLineJoin(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetLineJoin); - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - std::string type = value.As(.To()); - if (0 == strcmp("round", *type)) { - cairo_set_line_join(ctx, CAIRO_LINE_JOIN_ROUND); - } else if (0 == strcmp("bevel", *type)) { - cairo_set_line_join(ctx, CAIRO_LINE_JOIN_BEVEL); - } else { - cairo_set_line_join(ctx, CAIRO_LINE_JOIN_MITER); - } -} - -/* - * Get line cap. - */ - -Napi::Value Context2d::GetLineCap(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetLineCap); - Context2d *context = info.This().Unwrap(); - const char *cap; - switch (cairo_get_line_cap(context->context())) { - case CAIRO_LINE_CAP_ROUND: cap = "round"; break; - case CAIRO_LINE_CAP_SQUARE: cap = "square"; break; - default: cap = "butt"; - } - return Napi::New(env, cap); -} - -/* - * Set line cap. - */ - -void Context2d::SetLineCap(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetLineCap); - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - std::string type = value.As(.To()); - if (0 == strcmp("round", *type)) { - cairo_set_line_cap(ctx, CAIRO_LINE_CAP_ROUND); - } else if (0 == strcmp("square", *type)) { - cairo_set_line_cap(ctx, CAIRO_LINE_CAP_SQUARE); - } else { - cairo_set_line_cap(ctx, CAIRO_LINE_CAP_BUTT); - } -} - -/* - * Check if the given point is within the current path. - */ - -Napi::Value Context2d::IsPointInPath(const Napi::CallbackInfo& info) { - if (info[0].IsNumber() && info[1].IsNumber()) { - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - double x = info[0].As().DoubleValue().FromMaybe(0) - , y = info[1].As().DoubleValue().FromMaybe(0); - context->setFillRule(info[2]); - return Napi::Boolean::New(env, cairo_in_fill(ctx, x, y) || cairo_in_stroke(ctx, x, y)); - return; - } - return env.False(); -} - -/* - * Set shadow color. - */ - -void Context2d::SetShadowColor(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetShadowColor); - short ok; - std::string str = value.As(.To()); - uint32_t rgba = rgba_from_string(*str, &ok); - if (ok) { - Context2d *context = info.This().Unwrap(); - context->state->shadow = rgba_create(rgba); - } -} - -/* - * Get shadow color. - */ - -Napi::Value Context2d::GetShadowColor(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetShadowColor); - char buf[64]; - Context2d *context = info.This().Unwrap(); - rgba_to_string(context->state->shadow, buf, sizeof(buf)); - return Napi::String::New(env, buf); -} - -/* - * Set fill color, used internally for fillStyle= - */ - -void Context2d::_setFillColor(Napi::Value arg) { - Napi::Env env = arg.Env(); - short ok; - std::string str = arg.As(); - uint32_t rgba = rgba_from_string(*str, &ok); - if (!ok) return; - state->fillPattern = state->fillGradient = NULL; - state->fill = rgba_create(rgba); -} - -/* - * Get fill color. - */ - -Napi::Value Context2d::_getFillColor() { - char buf[64]; - rgba_to_string(state->fill, buf, sizeof(buf)); - return Napi::String::New(env, buf); -} - -/* - * Set stroke color, used internally for strokeStyle= - */ - -void Context2d::_setStrokeColor(Napi::Value arg) { - Napi::Env env = arg.Env(); - short ok; - std::string str = arg.As(); - uint32_t rgba = rgba_from_string(*str, &ok); - if (!ok) return; - state->strokePattern = state->strokeGradient = NULL; - state->stroke = rgba_create(rgba); -} - -/* - * Get stroke color. - */ - -Napi::Value Context2d::_getStrokeColor() { - char buf[64]; - rgba_to_string(state->stroke, buf, sizeof(buf)); - return Napi::String::New(env, buf); -} - -Napi::Value Context2d::CreatePattern(const Napi::CallbackInfo& info) { - Napi::Value image = info[0]; - Napi::Value repetition = info[1]; - - if (!repetition.As().Value().FromMaybe(false)) - repetition = Napi::String::New(env, "repeat"); - - const int argc = 2; - Napi::Value argv[argc] = { image, repetition }; - - Napi::Function ctor = Napi::GetFunction(Napi::New(env, Pattern::constructor)); - Napi::Object instance = Napi::NewInstance(ctor, argc, argv); - - return instance; -} - -Napi::Value Context2d::CreateLinearGradient(const Napi::CallbackInfo& info) { - const int argc = 4; - Napi::Value argv[argc] = { info[0], info[1], info[2], info[3] }; - - Napi::Function ctor = Napi::GetFunction(Napi::New(env, Gradient::constructor)); - Napi::Object instance = Napi::NewInstance(ctor, argc, argv); - - return instance; -} - -Napi::Value Context2d::CreateRadialGradient(const Napi::CallbackInfo& info) { - const int argc = 6; - Napi::Value argv[argc] = { info[0], info[1], info[2], info[3], info[4], info[5] }; - - Napi::Function ctor = Napi::GetFunction(Napi::New(env, Gradient::constructor)); - Napi::Object instance = Napi::NewInstance(ctor, argc, argv); - - return instance; -} - -/* - * Bezier curve. - */ - -Napi::Value Context2d::BezierCurveTo(const Napi::CallbackInfo& info) { - double args[6]; - if(!checkArgs(info, args, 6)) - return; - - Context2d *context = info.This().Unwrap(); - cairo_curve_to(context->context() - , args[0] - , args[1] - , args[2] - , args[3] - , args[4] - , args[5]); -} - -/* - * Quadratic curve approximation from libsvg-cairo. - */ - -Napi::Value Context2d::QuadraticCurveTo(const Napi::CallbackInfo& info) { - double args[4]; - if(!checkArgs(info, args, 4)) - return; - - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - - double x, y - , x1 = args[0] - , y1 = args[1] - , x2 = args[2] - , y2 = args[3]; - - cairo_get_current_point(ctx, &x, &y); - - if (0 == x && 0 == y) { - x = x1; - y = y1; - } - - cairo_curve_to(ctx - , x + 2.0 / 3.0 * (x1 - x), y + 2.0 / 3.0 * (y1 - y) - , x2 + 2.0 / 3.0 * (x1 - x2), y2 + 2.0 / 3.0 * (y1 - y2) - , x2 - , y2); -} - -/* - * Save state. - */ - -Napi::Value Context2d::Save(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - context->save(); -} - -/* - * Restore state. - */ - -Napi::Value Context2d::Restore(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - context->restore(); -} - -/* - * Creates a new subpath. - */ - -Napi::Value Context2d::BeginPath(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - cairo_new_path(context->context()); -} - -/* - * Marks the subpath as closed. - */ - -Napi::Value Context2d::ClosePath(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - cairo_close_path(context->context()); -} - -/* - * Rotate transformation. - */ - -Napi::Value Context2d::Rotate(const Napi::CallbackInfo& info) { - double args[1]; - if(!checkArgs(info, args, 1)) - return; - - Context2d *context = info.This().Unwrap(); - cairo_rotate(context->context(), args[0]); -} - -/* - * Modify the CTM. - */ - -Napi::Value Context2d::Transform(const Napi::CallbackInfo& info) { - double args[6]; - if(!checkArgs(info, args, 6)) - return; - - cairo_matrix_t matrix; - cairo_matrix_init(&matrix - , args[0] - , args[1] - , args[2] - , args[3] - , args[4] - , args[5]); - - Context2d *context = info.This().Unwrap(); - cairo_transform(context->context(), &matrix); -} - -/* - * Get the CTM - */ - -Napi::Value Context2d::GetTransform(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - Napi::Object instance = get_current_transform(context); - - return instance; -} - -/* - * Reset the CTM, used internally by setTransform(). - */ - -Napi::Value Context2d::ResetTransform(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - cairo_identity_matrix(context->context()); -} - -/* - * Reset transform matrix to identity, then apply the given args. - */ - -Napi::Value Context2d::SetTransform(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - if (info.Length() == 1) { - Napi::Object mat = info[0].To(); - - #if NODE_MAJOR_VERSION >= 8 - Local ctx = Napi::GetCurrentContext(); - if (!mat->InstanceOf(ctx, _DOMMatrix.Get(Isolate::GetCurrent())).ToChecked()) { - Napi::TypeError::New(env, "Expected DOMMatrix").ThrowAsJavaScriptException(); - return env.Null(); - } - #endif - - cairo_matrix_t matrix; - parse_matrix_from_object(matrix, mat); - - cairo_set_matrix(context->context(), &matrix); - } else { - cairo_identity_matrix(context->context()); - Context2d::Transform(info); - } -} - -/* - * Translate transformation. - */ - -Napi::Value Context2d::Translate(const Napi::CallbackInfo& info) { - double args[2]; - if(!checkArgs(info, args, 2)) - return; - - Context2d *context = info.This().Unwrap(); - cairo_translate(context->context(), args[0], args[1]); -} - -/* - * Scale transformation. - */ - -Napi::Value Context2d::Scale(const Napi::CallbackInfo& info) { - double args[2]; - if(!checkArgs(info, args, 2)) - return; - - Context2d *context = info.This().Unwrap(); - cairo_scale(context->context(), args[0], args[1]); -} - -/* - * Use path as clipping region. - */ - -Napi::Value Context2d::Clip(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - context->setFillRule(info[0]); - cairo_t *ctx = context->context(); - cairo_clip_preserve(ctx); -} - -/* - * Fill the path. - */ - -Napi::Value Context2d::Fill(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - context->setFillRule(info[0]); - context->fill(true); -} - -/* - * Stroke the path. - */ - -Napi::Value Context2d::Stroke(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - context->stroke(true); -} - -/* - * Helper for fillText/strokeText - */ - -double -get_text_scale(PangoLayout *layout, double maxWidth) { - - PangoRectangle logical_rect; - pango_layout_get_pixel_extents(layout, NULL, &logical_rect); - - if (logical_rect.width > maxWidth) { - return maxWidth / logical_rect.width; - } else { - return 1.0; - } -} - -void -paintText(const Napi::CallbackInfo&info, bool stroke) { - int argsNum = info.Length() >= 4 ? 3 : 2; - - if (argsNum == 3 && info[3].IsUndefined()) - argsNum = 2; - - double args[3]; - if(!checkArgs(info, args, argsNum, 1)) - return; - - std::string str = info[0].As(.To()); - double x = args[0]; - double y = args[1]; - double scaled_by = 1; - - Context2d *context = info.This().Unwrap(); - PangoLayout *layout = context->layout(); - - pango_layout_set_text(layout, *str, -1); - pango_cairo_update_layout(context->context(), layout); - - if (argsNum == 3) { - scaled_by = get_text_scale(layout, args[2]); - cairo_save(context->context()); - cairo_scale(context->context(), scaled_by, 1); - } - - context->savePath(); - if (context->state->textDrawingMode == TEXT_DRAW_GLYPHS) { - if (stroke == true) { context->stroke(); } else { context->fill(); } - context->setTextPath(x / scaled_by, y); - } else if (context->state->textDrawingMode == TEXT_DRAW_PATHS) { - context->setTextPath(x / scaled_by, y); - if (stroke == true) { context->stroke(); } else { context->fill(); } - } - context->restorePath(); - if (argsNum == 3) { - cairo_restore(context->context()); - } -} - -/* - * Fill text at (x, y). - */ - -Napi::Value Context2d::FillText(const Napi::CallbackInfo& info) { - paintText(info, false); -} - -/* - * Stroke text at (x ,y). - */ - -Napi::Value Context2d::StrokeText(const Napi::CallbackInfo& info) { - paintText(info, true); -} - -/* - * Gets the baseline adjustment in device pixels - */ -inline double getBaselineAdjustment(PangoLayout* layout, short baseline) { - PangoRectangle logical_rect; - pango_layout_line_get_extents(pango_layout_get_line(layout, 0), NULL, &logical_rect); - - double scale = 1.0 / PANGO_SCALE; - double ascent = scale * pango_layout_get_baseline(layout); - double descent = scale * logical_rect.height - ascent; - - switch (baseline) { - case TEXT_BASELINE_ALPHABETIC: - return ascent; - case TEXT_BASELINE_MIDDLE: - return (ascent + descent) / 2.0; - case TEXT_BASELINE_BOTTOM: - return ascent + descent; - default: - return 0; - } -} - -/* - * Set text path for the string in the layout at (x, y). - * This function is called by paintText and won't behave correctly - * if is not called from there. - * it needs pango_layout_set_text and pango_cairo_update_layout to be called before - */ - -void -Context2d::setTextPath(double x, double y) { - PangoRectangle logical_rect; - - switch (state->textAlignment) { - case TEXT_ALIGNMENT_CENTER: - pango_layout_get_pixel_extents(_layout, NULL, &logical_rect); - x -= logical_rect.width / 2; - break; - case TEXT_ALIGNMENT_END: - case TEXT_ALIGNMENT_RIGHT: - pango_layout_get_pixel_extents(_layout, NULL, &logical_rect); - x -= logical_rect.width; - break; - } - - y -= getBaselineAdjustment(_layout, state->textBaseline); - - cairo_move_to(_context, x, y); - if (state->textDrawingMode == TEXT_DRAW_PATHS) { - pango_cairo_layout_path(_context, _layout); - } else if (state->textDrawingMode == TEXT_DRAW_GLYPHS) { - pango_cairo_show_layout(_context, _layout); - } -} - -/* - * Adds a point to the current subpath. - */ - -Napi::Value Context2d::LineTo(const Napi::CallbackInfo& info) { - double args[2]; - if(!checkArgs(info, args, 2)) - return; - - Context2d *context = info.This().Unwrap(); - cairo_line_to(context->context(), args[0], args[1]); -} - -/* - * Creates a new subpath at the given point. - */ - -Napi::Value Context2d::MoveTo(const Napi::CallbackInfo& info) { - double args[2]; - if(!checkArgs(info, args, 2)) - return; - - Context2d *context = info.This().Unwrap(); - cairo_move_to(context->context(), args[0], args[1]); -} - -/* - * Get font. - */ - -Napi::Value Context2d::GetFont(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetFont); - Context2d *context = info.This().Unwrap(); - - return Napi::New(env, context->state->font); -} - -/* - * Set font: - * - weight - * - style - * - size - * - unit - * - family - */ - -void Context2d::SetFont(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetFont); - if (!value.IsString()) return; - - Isolate *iso = Isolate::GetCurrent(); - Local ctx = Napi::GetCurrentContext(); - - Napi::String str = value.To(); - if (!str->Length()) return; - - const int argc = 1; - Napi::Value argv[argc] = { value }; - - Napi::Value mparsed = Napi::Call(_parseFont.Get(iso), ctx->Global(), argc, argv); - // parseFont returns undefined for invalid CSS font strings - if (mparsed->IsUndefined()) return; - Napi::Object font = mparsed.To(); - - std::string weight = (font).Get(Napi::New(env, "weight".As())); - std::string style = (font).Get(Napi::New(env, "style".As())); - double size = (font).Get(Napi::String::New(env, "size".As().DoubleValue())).FromMaybe(0); - std::string unit = (font).Get(Napi::New(env, "unit".As())); - std::string family = (font).Get(Napi::New(env, "family".As())); - - Context2d *context = info.This().Unwrap(); - - PangoFontDescription *desc = pango_font_description_copy(context->state->fontDescription); - pango_font_description_free(context->state->fontDescription); - - pango_font_description_set_style(desc, Canvas::GetStyleFromCSSString(*style)); - pango_font_description_set_weight(desc, Canvas::GetWeightFromCSSString(*weight)); - - if (strlen(*family) > 0) { - // See #1643 - Pango understands "sans" whereas CSS uses "sans-serif" - std::string s1(*family); - std::string s2("sans-serif"); - if (streq_casein(s1, s2)) { - pango_font_description_set_family(desc, "sans"); - } else { - pango_font_description_set_family(desc, *family); - } - } - - PangoFontDescription *sys_desc = Canvas::ResolveFontDescription(desc); - pango_font_description_free(desc); - - if (size > 0) pango_font_description_set_absolute_size(sys_desc, size * PANGO_SCALE); - - context->state->fontDescription = sys_desc; - pango_layout_set_font_description(context->_layout, sys_desc); - - context->state->font = value->As().Utf8Value().c_str(); -} - -/* - * Get text baseline. - */ - -Napi::Value Context2d::GetTextBaseline(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetTextBaseline); - Context2d *context = info.This().Unwrap(); - const char* baseline; - switch (context->state->textBaseline) { - default: - case TEXT_BASELINE_ALPHABETIC: baseline = "alphabetic"; break; - case TEXT_BASELINE_TOP: baseline = "top"; break; - case TEXT_BASELINE_BOTTOM: baseline = "bottom"; break; - case TEXT_BASELINE_MIDDLE: baseline = "middle"; break; - case TEXT_BASELINE_IDEOGRAPHIC: baseline = "ideographic"; break; - case TEXT_BASELINE_HANGING: baseline = "hanging"; break; - } - return Napi::New(env, baseline); -} - -/* - * Set text baseline. - */ - -void Context2d::SetTextBaseline(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetTextBaseline); - if (!value.IsString()) return; - - std::string opStr = value.As(.To()); - const std::map modes = { - {"alphabetic", TEXT_BASELINE_ALPHABETIC}, - {"top", TEXT_BASELINE_TOP}, - {"bottom", TEXT_BASELINE_BOTTOM}, - {"middle", TEXT_BASELINE_MIDDLE}, - {"ideographic", TEXT_BASELINE_IDEOGRAPHIC}, - {"hanging", TEXT_BASELINE_HANGING} - }; - auto op = modes.find(*opStr); - if (op == modes.end()) return; - - Context2d *context = info.This().Unwrap(); - context->state->textBaseline = op->second; -} - -/* - * Get text align. - */ - -Napi::Value Context2d::GetTextAlign(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetTextAlign); - Context2d *context = info.This().Unwrap(); - const char* align; - switch (context->state->textAlignment) { - default: - // TODO the default is supposed to be "start" - case TEXT_ALIGNMENT_LEFT: align = "left"; break; - case TEXT_ALIGNMENT_START: align = "start"; break; - case TEXT_ALIGNMENT_CENTER: align = "center"; break; - case TEXT_ALIGNMENT_RIGHT: align = "right"; break; - case TEXT_ALIGNMENT_END: align = "end"; break; - } - return Napi::New(env, align); -} - -/* - * Set text align. - */ - -void Context2d::SetTextAlign(const Napi::CallbackInfo& info, const Napi::Value& value) { - CHECK_RECEIVER(Context2d.SetTextAlign); - if (!value.IsString()) return; - - std::string opStr = value.As(.To()); - const std::map modes = { - {"center", TEXT_ALIGNMENT_CENTER}, - {"left", TEXT_ALIGNMENT_LEFT}, - {"start", TEXT_ALIGNMENT_START}, - {"right", TEXT_ALIGNMENT_RIGHT}, - {"end", TEXT_ALIGNMENT_END} - }; - auto op = modes.find(*opStr); - if (op == modes.end()) return; - - Context2d *context = info.This().Unwrap(); - context->state->textAlignment = op->second; -} - -/* - * Return the given text extents. - * TODO: Support for: - * hangingBaseline, ideographicBaseline, - * fontBoundingBoxAscent, fontBoundingBoxDescent - */ - -Napi::Value Context2d::MeasureText(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - - std::string str = info[0].As(.To()); - Napi::Object obj = Napi::Object::New(env); - - PangoRectangle _ink_rect, _logical_rect; - float_rectangle ink_rect, logical_rect; - PangoFontMetrics *metrics; - PangoLayout *layout = context->layout(); - - pango_layout_set_text(layout, *str, -1); - pango_cairo_update_layout(ctx, layout); - - // Normally you could use pango_layout_get_pixel_extents and be done, or use - // pango_extents_to_pixels, but both of those round the pixels, so we have to - // divide by PANGO_SCALE manually - pango_layout_get_extents(layout, &_ink_rect, &_logical_rect); - - float inverse_pango_scale = 1. / PANGO_SCALE; - - logical_rect.x = _logical_rect.x * inverse_pango_scale; - logical_rect.y = _logical_rect.y * inverse_pango_scale; - logical_rect.width = _logical_rect.width * inverse_pango_scale; - logical_rect.height = _logical_rect.height * inverse_pango_scale; - - ink_rect.x = _ink_rect.x * inverse_pango_scale; - ink_rect.y = _ink_rect.y * inverse_pango_scale; - ink_rect.width = _ink_rect.width * inverse_pango_scale; - ink_rect.height = _ink_rect.height * inverse_pango_scale; - - metrics = PANGO_LAYOUT_GET_METRICS(layout); - - double x_offset; - switch (context->state->textAlignment) { - case TEXT_ALIGNMENT_CENTER: - x_offset = logical_rect.width / 2.; - break; - case TEXT_ALIGNMENT_END: - case TEXT_ALIGNMENT_RIGHT: - x_offset = logical_rect.width; - break; - case TEXT_ALIGNMENT_START: - case TEXT_ALIGNMENT_LEFT: - default: - x_offset = 0.0; - } - - cairo_matrix_t matrix; - cairo_get_matrix(ctx, &matrix); - double y_offset = getBaselineAdjustment(layout, context->state->textBaseline); - - (obj).Set(Napi::String::New(env, "width"), - Napi::Number::New(env, logical_rect.width)).Check(); - (obj).Set(Napi::String::New(env, "actualBoundingBoxLeft"), - Napi::Number::New(env, PANGO_LBEARING(ink_rect) + x_offset)).Check(); - (obj).Set(Napi::String::New(env, "actualBoundingBoxRight"), - Napi::Number::New(env, PANGO_RBEARING(ink_rect) - x_offset)).Check(); - (obj).Set(Napi::String::New(env, "actualBoundingBoxAscent"), - Napi::Number::New(env, y_offset + PANGO_ASCENT(ink_rect))).Check(); - (obj).Set(Napi::String::New(env, "actualBoundingBoxDescent"), - Napi::Number::New(env, PANGO_DESCENT(ink_rect) - y_offset)).Check(); - (obj).Set(Napi::String::New(env, "emHeightAscent"), - Napi::Number::New(env, -(PANGO_ASCENT(logical_rect) - y_offset))).Check(); - (obj).Set(Napi::String::New(env, "emHeightDescent"), - Napi::Number::New(env, PANGO_DESCENT(logical_rect) - y_offset)).Check(); - (obj).Set(Napi::String::New(env, "alphabeticBaseline"), - Napi::Number::New(env, -(pango_font_metrics_get_ascent(metrics) * inverse_pango_scale - y_offset))).Check(); - - pango_font_metrics_unref(metrics); - - return obj; -} - -/* - * Set line dash - * ref: http://www.w3.org/TR/2dcontext/#dom-context-2d-setlinedash - */ - -Napi::Value Context2d::SetLineDash(const Napi::CallbackInfo& info) { - if (!info[0].IsArray()) return; - Napi::Array dash = info[0].As(); - uint32_t dashes = dash->Length() & 1 ? dash->Length() * 2 : dash->Length(); - uint32_t zero_dashes = 0; - std::vector a(dashes); - for (uint32_t i=0; iLength()); - if (!d.IsNumber()) return; - a[i] = d.As().DoubleValue().FromMaybe(0); - if (a[i] == 0) zero_dashes++; - if (a[i] < 0 || !std::isfinite(a[i])) return; - } - - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - double offset; - cairo_get_dash(ctx, NULL, &offset); - if (zero_dashes == dashes) { - std::vector b(0); - cairo_set_dash(ctx, b.data(), 0, offset); - } else { - cairo_set_dash(ctx, a.data(), dashes, offset); - } -} - -/* - * Get line dash - * ref: http://www.w3.org/TR/2dcontext/#dom-context-2d-setlinedash - */ -Napi::Value Context2d::GetLineDash(const Napi::CallbackInfo& info) { - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - int dashes = cairo_get_dash_count(ctx); - std::vector a(dashes); - cairo_get_dash(ctx, a.data(), NULL); - - Napi::Array dash = Napi::Array::New(env, dashes); - for (int i=0; i().DoubleValue().FromMaybe(0); - if (!std::isfinite(offset)) return; - - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - - int dashes = cairo_get_dash_count(ctx); - std::vector a(dashes); - cairo_get_dash(ctx, a.data(), NULL); - cairo_set_dash(ctx, a.data(), dashes, offset); -} - -/* - * Get line dash offset - * ref: http://www.w3.org/TR/2dcontext/#dom-context-2d-setlinedash - */ -Napi::Value Context2d::GetLineDashOffset(const Napi::CallbackInfo& info) { - CHECK_RECEIVER(Context2d.GetLineDashOffset); - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - double offset; - cairo_get_dash(ctx, NULL, &offset); - - return Napi::Number::New(env, offset); -} - -/* - * Fill the rectangle defined by x, y, width and height. - */ - -Napi::Value Context2d::FillRect(const Napi::CallbackInfo& info) { - RECT_ARGS; - if (0 == width || 0 == height) return; - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - context->savePath(); - cairo_rectangle(ctx, x, y, width, height); - context->fill(); - context->restorePath(); -} - -/* - * Stroke the rectangle defined by x, y, width and height. - */ - -Napi::Value Context2d::StrokeRect(const Napi::CallbackInfo& info) { - RECT_ARGS; - if (0 == width && 0 == height) return; - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - context->savePath(); - cairo_rectangle(ctx, x, y, width, height); - context->stroke(); - context->restorePath(); -} - -/* - * Clears all pixels defined by x, y, width and height. - */ - -Napi::Value Context2d::ClearRect(const Napi::CallbackInfo& info) { - RECT_ARGS; - if (0 == width || 0 == height) return; - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - cairo_save(ctx); - context->savePath(); - cairo_rectangle(ctx, x, y, width, height); - cairo_set_operator(ctx, CAIRO_OPERATOR_CLEAR); - cairo_fill(ctx); - context->restorePath(); - cairo_restore(ctx); -} - -/* - * Adds a rectangle subpath. - */ - -Napi::Value Context2d::Rect(const Napi::CallbackInfo& info) { - RECT_ARGS; - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - if (width == 0) { - cairo_move_to(ctx, x, y); - cairo_line_to(ctx, x, y + height); - } else if (height == 0) { - cairo_move_to(ctx, x, y); - cairo_line_to(ctx, x + width, y); - } else { - cairo_rectangle(ctx, x, y, width, height); - } -} - -// Draws an arc with two potentially different radii. -inline static -void elli_arc(cairo_t* ctx, double xc, double yc, double rx, double ry, double a1, double a2, bool clockwise=true) { - if (rx == 0. || ry == 0.) { - cairo_line_to(ctx, xc + rx, yc + ry); - } else { - cairo_save(ctx); - cairo_translate(ctx, xc, yc); - cairo_scale(ctx, rx, ry); - if (clockwise) - cairo_arc(ctx, 0., 0., 1., a1, a2); - else - cairo_arc_negative(ctx, 0., 0., 1., a2, a1); - cairo_restore(ctx); - } -} - -inline static -bool getRadius(Point& p, const Napi::Value& v) { - if (v.IsObject()) { // 5.1 DOMPointInit - auto rx = (v.As()).Get(Napi::String::New(env, "x")); - auto ry = (v.As()).Get(Napi::String::New(env, "y")); - if (rx.IsNumber() && ry.IsNumber()) { - auto rxv = rx.As().DoubleValue(); - auto ryv = ry.As().DoubleValue(); - if (!std::isfinite(rxv) || !std::isfinite(ryv)) - return true; - if (rxv < 0 || ryv < 0) { - Napi::RangeError::New(env, "radii must be positive.").ThrowAsJavaScriptException(); - - return true; - } - p.x = rxv; - p.y = ryv; - return false; - } - } else if (v.IsNumber()) { // 5.2 unrestricted double - auto rv = v.As().DoubleValue(); - if (!std::isfinite(rv)) - return true; - if (rv < 0) { - Napi::RangeError::New(env, "radii must be positive.").ThrowAsJavaScriptException(); - - return true; - } - p.x = p.y = rv; - return false; - } - return true; -} - -/** - * https://html.spec.whatwg.org/multipage/canvas.html#dom-context-2d-roundrect - * x, y, w, h, [radius|[radii]] - */ -Napi::Value Context2d::RoundRect(const Napi::CallbackInfo& info) { - RECT_ARGS; - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - - // 4. Let normalizedRadii be an empty list - Point normalizedRadii[4]; - size_t nRadii = 4; - - if (info[4].IsUndefined()) { - for (size_t i = 0; i < 4; i++) - normalizedRadii[i].x = normalizedRadii[i].y = 0.; - - } else if (info[4].IsArray()) { - auto radiiList = info[4].As(); - nRadii = radiiList->Length(); - if (!(nRadii >= 1 && nRadii <= 4)) { - Napi::RangeError::New(env, "radii must be a list of one, two, three or four radii.").ThrowAsJavaScriptException(); - return env.Null(); - } - // 5. For each radius of radii - for (size_t i = 0; i < nRadii; i++) { - auto r = (radiiList).Get(i); - if (getRadius(normalizedRadii[i], r)) - return; - } - - } else { - // 2. If radii is a double, then set radii to <> - if (getRadius(normalizedRadii[0], info[4])) - return; - for (size_t i = 1; i < 4; i++) { - normalizedRadii[i].x = normalizedRadii[0].x; - normalizedRadii[i].y = normalizedRadii[0].y; - } - } - - Point upperLeft, upperRight, lowerRight, lowerLeft; - if (nRadii == 4) { - upperLeft = normalizedRadii[0]; - upperRight = normalizedRadii[1]; - lowerRight = normalizedRadii[2]; - lowerLeft = normalizedRadii[3]; - } else if (nRadii == 3) { - upperLeft = normalizedRadii[0]; - upperRight = normalizedRadii[1]; - lowerLeft = normalizedRadii[1]; - lowerRight = normalizedRadii[2]; - } else if (nRadii == 2) { - upperLeft = normalizedRadii[0]; - lowerRight = normalizedRadii[0]; - upperRight = normalizedRadii[1]; - lowerLeft = normalizedRadii[1]; - } else { - upperLeft = normalizedRadii[0]; - upperRight = normalizedRadii[0]; - lowerRight = normalizedRadii[0]; - lowerLeft = normalizedRadii[0]; - } - - bool clockwise = true; - if (width < 0) { - clockwise = false; - x += width; - width = -width; - std::swap(upperLeft, upperRight); - std::swap(lowerLeft, lowerRight); - } - - if (height < 0) { - clockwise = !clockwise; - y += height; - height = -height; - std::swap(upperLeft, lowerLeft); - std::swap(upperRight, lowerRight); - } - - // 11. Corner curves must not overlap. Scale radii to prevent this. - { - auto top = upperLeft.x + upperRight.x; - auto right = upperRight.y + lowerRight.y; - auto bottom = lowerRight.x + lowerLeft.x; - auto left = upperLeft.y + lowerLeft.y; - auto scale = std::min({ width / top, height / right, width / bottom, height / left }); - if (scale < 1.) { - upperLeft.x *= scale; - upperLeft.y *= scale; - upperRight.x *= scale; - upperRight.x *= scale; - lowerLeft.y *= scale; - lowerLeft.y *= scale; - lowerRight.y *= scale; - lowerRight.y *= scale; - } - } - - // 12. Draw - cairo_move_to(ctx, x + upperLeft.x, y); - if (clockwise) { - cairo_line_to(ctx, x + width - upperRight.x, y); - elli_arc(ctx, x + width - upperRight.x, y + upperRight.y, upperRight.x, upperRight.y, 3. * M_PI / 2., 0.); - cairo_line_to(ctx, x + width, y + height - lowerRight.y); - elli_arc(ctx, x + width - lowerRight.x, y + height - lowerRight.y, lowerRight.x, lowerRight.y, 0, M_PI / 2.); - cairo_line_to(ctx, x + lowerLeft.x, y + height); - elli_arc(ctx, x + lowerLeft.x, y + height - lowerLeft.y, lowerLeft.x, lowerLeft.y, M_PI / 2., M_PI); - cairo_line_to(ctx, x, y + upperLeft.y); - elli_arc(ctx, x + upperLeft.x, y + upperLeft.y, upperLeft.x, upperLeft.y, M_PI, 3. * M_PI / 2.); - } else { - elli_arc(ctx, x + upperLeft.x, y + upperLeft.y, upperLeft.x, upperLeft.y, M_PI, 3. * M_PI / 2., false); - cairo_line_to(ctx, x, y + upperLeft.y); - elli_arc(ctx, x + lowerLeft.x, y + height - lowerLeft.y, lowerLeft.x, lowerLeft.y, M_PI / 2., M_PI, false); - cairo_line_to(ctx, x + lowerLeft.x, y + height); - elli_arc(ctx, x + width - lowerRight.x, y + height - lowerRight.y, lowerRight.x, lowerRight.y, 0, M_PI / 2., false); - cairo_line_to(ctx, x + width, y + height - lowerRight.y); - elli_arc(ctx, x + width - upperRight.x, y + upperRight.y, upperRight.x, upperRight.y, 3. * M_PI / 2., 0., false); - cairo_line_to(ctx, x + width - upperRight.x, y); - } - cairo_close_path(ctx); -} - -// Adapted from https://chromium.googlesource.com/chromium/blink/+/refs/heads/main/Source/modules/canvas2d/CanvasPathMethods.cpp -static void canonicalizeAngle(double& startAngle, double& endAngle) { - // Make 0 <= startAngle < 2*PI - double newStartAngle = std::fmod(startAngle, twoPi); - if (newStartAngle < 0) { - newStartAngle += twoPi; - // Check for possible catastrophic cancellation in cases where - // newStartAngle was a tiny negative number (c.f. crbug.com/503422) - if (newStartAngle >= twoPi) - newStartAngle -= twoPi; - } - double delta = newStartAngle - startAngle; - startAngle = newStartAngle; - endAngle = endAngle + delta; -} - -// Adapted from https://chromium.googlesource.com/chromium/blink/+/refs/heads/main/Source/modules/canvas2d/CanvasPathMethods.cpp -static double adjustEndAngle(double startAngle, double endAngle, bool counterclockwise) { - double newEndAngle = endAngle; - /* http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-context-2d-arc - * If the counterclockwise argument is false and endAngle-startAngle is equal to or greater than 2pi, or, - * if the counterclockwise argument is true and startAngle-endAngle is equal to or greater than 2pi, - * then the arc is the whole circumference of this ellipse, and the point at startAngle along this circle's circumference, - * measured in radians clockwise from the ellipse's semi-major axis, acts as both the start point and the end point. - */ - if (!counterclockwise && endAngle - startAngle >= twoPi) - newEndAngle = startAngle + twoPi; - else if (counterclockwise && startAngle - endAngle >= twoPi) - newEndAngle = startAngle - twoPi; - /* - * Otherwise, the arc is the path along the circumference of this ellipse from the start point to the end point, - * going anti-clockwise if the counterclockwise argument is true, and clockwise otherwise. - * Since the points are on the ellipse, as opposed to being simply angles from zero, - * the arc can never cover an angle greater than 2pi radians. - */ - /* NOTE: When startAngle = 0, endAngle = 2Pi and counterclockwise = true, the spec does not indicate clearly. - * We draw the entire circle, because some web sites use arc(x, y, r, 0, 2*Math.PI, true) to draw circle. - * We preserve backward-compatibility. - */ - else if (!counterclockwise && startAngle > endAngle) - newEndAngle = startAngle + (twoPi - std::fmod(startAngle - endAngle, twoPi)); - else if (counterclockwise && startAngle < endAngle) - newEndAngle = startAngle - (twoPi - std::fmod(endAngle - startAngle, twoPi)); - return newEndAngle; -} - -/* - * Adds an arc at x, y with the given radii and start/end angles. - */ - -Napi::Value Context2d::Arc(const Napi::CallbackInfo& info) { - double args[5]; - if(!checkArgs(info, args, 5)) - return; - - auto x = args[0]; - auto y = args[1]; - auto radius = args[2]; - auto startAngle = args[3]; - auto endAngle = args[4]; - - if (radius < 0) { - Napi::RangeError::New(env, "The radius provided is negative.").ThrowAsJavaScriptException(); - return env.Null(); - } - - bool counterclockwise = info[5].As().Value().FromMaybe(false); - - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - - canonicalizeAngle(startAngle, endAngle); - endAngle = adjustEndAngle(startAngle, endAngle, counterclockwise); - - if (counterclockwise) { - cairo_arc_negative(ctx, x, y, radius, startAngle, endAngle); - } else { - cairo_arc(ctx, x, y, radius, startAngle, endAngle); - } -} - -/* - * Adds an arcTo point (x0,y0) to (x1,y1) with the given radius. - * - * Implementation influenced by WebKit. - */ - -Napi::Value Context2d::ArcTo(const Napi::CallbackInfo& info) { - double args[5]; - if(!checkArgs(info, args, 5)) - return; - - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - - // Current path point - double x, y; - cairo_get_current_point(ctx, &x, &y); - Point p0(x, y); - - // Point (x0,y0) - Point p1(args[0], args[1]); - - // Point (x1,y1) - Point p2(args[2], args[3]); - - float radius = args[4]; - - if ((p1.x == p0.x && p1.y == p0.y) - || (p1.x == p2.x && p1.y == p2.y) - || radius == 0.f) { - cairo_line_to(ctx, p1.x, p1.y); - return; - } - - Point p1p0((p0.x - p1.x),(p0.y - p1.y)); - Point p1p2((p2.x - p1.x),(p2.y - p1.y)); - float p1p0_length = sqrtf(p1p0.x * p1p0.x + p1p0.y * p1p0.y); - float p1p2_length = sqrtf(p1p2.x * p1p2.x + p1p2.y * p1p2.y); - - double cos_phi = (p1p0.x * p1p2.x + p1p0.y * p1p2.y) / (p1p0_length * p1p2_length); - // all points on a line logic - if (-1 == cos_phi) { - cairo_line_to(ctx, p1.x, p1.y); - return; - } - - if (1 == cos_phi) { - // add infinite far away point - unsigned int max_length = 65535; - double factor_max = max_length / p1p0_length; - Point ep((p0.x + factor_max * p1p0.x), (p0.y + factor_max * p1p0.y)); - cairo_line_to(ctx, ep.x, ep.y); - return; - } - - float tangent = radius / tan(acos(cos_phi) / 2); - float factor_p1p0 = tangent / p1p0_length; - Point t_p1p0((p1.x + factor_p1p0 * p1p0.x), (p1.y + factor_p1p0 * p1p0.y)); - - Point orth_p1p0(p1p0.y, -p1p0.x); - float orth_p1p0_length = sqrt(orth_p1p0.x * orth_p1p0.x + orth_p1p0.y * orth_p1p0.y); - float factor_ra = radius / orth_p1p0_length; - - double cos_alpha = (orth_p1p0.x * p1p2.x + orth_p1p0.y * p1p2.y) / (orth_p1p0_length * p1p2_length); - if (cos_alpha < 0.f) - orth_p1p0 = Point(-orth_p1p0.x, -orth_p1p0.y); - - Point p((t_p1p0.x + factor_ra * orth_p1p0.x), (t_p1p0.y + factor_ra * orth_p1p0.y)); - - orth_p1p0 = Point(-orth_p1p0.x, -orth_p1p0.y); - float sa = acos(orth_p1p0.x / orth_p1p0_length); - if (orth_p1p0.y < 0.f) - sa = 2 * M_PI - sa; - - bool anticlockwise = false; - - float factor_p1p2 = tangent / p1p2_length; - Point t_p1p2((p1.x + factor_p1p2 * p1p2.x), (p1.y + factor_p1p2 * p1p2.y)); - Point orth_p1p2((t_p1p2.x - p.x),(t_p1p2.y - p.y)); - float orth_p1p2_length = sqrtf(orth_p1p2.x * orth_p1p2.x + orth_p1p2.y * orth_p1p2.y); - float ea = acos(orth_p1p2.x / orth_p1p2_length); - - if (orth_p1p2.y < 0) ea = 2 * M_PI - ea; - if ((sa > ea) && ((sa - ea) < M_PI)) anticlockwise = true; - if ((sa < ea) && ((ea - sa) > M_PI)) anticlockwise = true; - - cairo_line_to(ctx, t_p1p0.x, t_p1p0.y); - - if (anticlockwise && M_PI * 2 != radius) { - cairo_arc_negative(ctx - , p.x - , p.y - , radius - , sa - , ea); - } else { - cairo_arc(ctx - , p.x - , p.y - , radius - , sa - , ea); - } -} - -/* - * Adds an ellipse to the path which is centered at (x, y) position with the - * radii radiusX and radiusY starting at startAngle and ending at endAngle - * going in the given direction by anticlockwise (defaulting to clockwise). - */ - -Napi::Value Context2d::Ellipse(const Napi::CallbackInfo& info) { - double args[7]; - if(!checkArgs(info, args, 7)) - return; - - double radiusX = args[2]; - double radiusY = args[3]; - - if (radiusX == 0 || radiusY == 0) return; - - double x = args[0]; - double y = args[1]; - double rotation = args[4]; - double startAngle = args[5]; - double endAngle = args[6]; - bool anticlockwise = info[7].As().Value().FromMaybe(false); - - Context2d *context = info.This().Unwrap(); - cairo_t *ctx = context->context(); - - // See https://www.cairographics.org/cookbook/ellipses/ - double xRatio = radiusX / radiusY; - - cairo_matrix_t save_matrix; - cairo_get_matrix(ctx, &save_matrix); - cairo_translate(ctx, x, y); - cairo_rotate(ctx, rotation); - cairo_scale(ctx, xRatio, 1.0); - cairo_translate(ctx, -x, -y); - if (anticlockwise && M_PI * 2 != args[4]) { - cairo_arc_negative(ctx, - x, - y, - radiusY, - startAngle, - endAngle); - } else { - cairo_arc(ctx, - x, - y, - radiusY, - startAngle, - endAngle); - } - cairo_set_matrix(ctx, &save_matrix); -} - -#undef CHECK_RECEIVER diff --git a/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.h b/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.h index 8ea4d60..568ebc8 100644 --- a/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.h +++ b/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.h @@ -27,7 +27,6 @@ struct canvas_state_t { cairo_pattern_t* fillGradient = nullptr; cairo_pattern_t* strokeGradient = nullptr; PangoFontDescription* fontDescription = nullptr; - std::string font = "10px sans-serif"; cairo_filter_t patternQuality = CAIRO_FILTER_GOOD; float globalAlpha = 1.f; int shadowBlur = 0; @@ -58,7 +57,6 @@ struct canvas_state_t { shadowOffsetY = other.shadowOffsetY; textDrawingMode = other.textDrawingMode; fontDescription = pango_font_description_copy(other.fontDescription); - font = other.font; imageSmoothingEnabled = other.imageSmoothingEnabled; } @@ -218,6 +216,7 @@ class Context2d : public Nan::ObjectWrap { void _setStrokePattern(v8::Local arg); Nan::Persistent _fillStyle; Nan::Persistent _strokeStyle; + Nan::Persistent _font; Canvas *_canvas; cairo_t *_context; cairo_path_t *_path; diff --git a/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.h.orig b/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.h.orig deleted file mode 100644 index 94bcfd5..0000000 --- a/npm-packages/mac-v2.4.x/canvas/src/CanvasRenderingContext2d.h.orig +++ /dev/null @@ -1,226 +0,0 @@ -// Copyright (c) 2010 LearnBoost - -#pragma once - -#include "cairo.h" -#include "Canvas.h" -#include "color.h" -#include "napi.h" -#include "uv.h" -#include -#include - -/* - * State struct. - * - * Used in conjunction with Save() / Restore() since - * cairo's gstate maintains only a single source pattern at a time. - */ - -struct canvas_state_t { - rgba_t fill = { 0, 0, 0, 1 }; - rgba_t stroke = { 0, 0, 0, 1 }; - rgba_t shadow = { 0, 0, 0, 0 }; - double shadowOffsetX = 0.; - double shadowOffsetY = 0.; - cairo_pattern_t* fillPattern = nullptr; - cairo_pattern_t* strokePattern = nullptr; - cairo_pattern_t* fillGradient = nullptr; - cairo_pattern_t* strokeGradient = nullptr; - PangoFontDescription* fontDescription = nullptr; - std::string font = "10px sans-serif"; - cairo_filter_t patternQuality = CAIRO_FILTER_GOOD; - float globalAlpha = 1.f; - int shadowBlur = 0; - text_align_t textAlignment = TEXT_ALIGNMENT_LEFT; // TODO default is supposed to be START - text_baseline_t textBaseline = TEXT_BASELINE_ALPHABETIC; - canvas_draw_mode_t textDrawingMode = TEXT_DRAW_PATHS; - bool imageSmoothingEnabled = true; - - canvas_state_t() { - fontDescription = pango_font_description_from_string("sans"); - pango_font_description_set_absolute_size(fontDescription, 10 * PANGO_SCALE); - } - - canvas_state_t(const canvas_state_t& other) { - fill = other.fill; - stroke = other.stroke; - patternQuality = other.patternQuality; - fillPattern = other.fillPattern; - strokePattern = other.strokePattern; - fillGradient = other.fillGradient; - strokeGradient = other.strokeGradient; - globalAlpha = other.globalAlpha; - textAlignment = other.textAlignment; - textBaseline = other.textBaseline; - shadow = other.shadow; - shadowBlur = other.shadowBlur; - shadowOffsetX = other.shadowOffsetX; - shadowOffsetY = other.shadowOffsetY; - textDrawingMode = other.textDrawingMode; - fontDescription = pango_font_description_copy(other.fontDescription); - font = other.font; - imageSmoothingEnabled = other.imageSmoothingEnabled; - } - - ~canvas_state_t() { - pango_font_description_free(fontDescription); - } -}; - -/* - * Equivalent to a PangoRectangle but holds floats instead of ints - * (software pixels are stored here instead of pango units) - * - * Should be compatible with PANGO_ASCENT, PANGO_LBEARING, etc. - */ - -typedef struct { - float x; - float y; - float width; - float height; -} float_rectangle; - -class Context2d : public Napi::ObjectWrap { - public: - std::stack states; - canvas_state_t *state; - Context2d(Canvas *canvas); - static Napi::FunctionReference _DOMMatrix; - static Napi::FunctionReference _parseFont; - static Napi::FunctionReference constructor; - static void Initialize(Napi::Env& env, Napi::Object& target); - static Napi::Value New(const Napi::CallbackInfo& info); - static Napi::Value SaveExternalModules(const Napi::CallbackInfo& info); - static Napi::Value DrawImage(const Napi::CallbackInfo& info); - static Napi::Value PutImageData(const Napi::CallbackInfo& info); - static Napi::Value Save(const Napi::CallbackInfo& info); - static Napi::Value Restore(const Napi::CallbackInfo& info); - static Napi::Value Rotate(const Napi::CallbackInfo& info); - static Napi::Value Translate(const Napi::CallbackInfo& info); - static Napi::Value Scale(const Napi::CallbackInfo& info); - static Napi::Value Transform(const Napi::CallbackInfo& info); - static Napi::Value GetTransform(const Napi::CallbackInfo& info); - static Napi::Value ResetTransform(const Napi::CallbackInfo& info); - static Napi::Value SetTransform(const Napi::CallbackInfo& info); - static Napi::Value IsPointInPath(const Napi::CallbackInfo& info); - static Napi::Value BeginPath(const Napi::CallbackInfo& info); - static Napi::Value ClosePath(const Napi::CallbackInfo& info); - static Napi::Value AddPage(const Napi::CallbackInfo& info); - static Napi::Value Clip(const Napi::CallbackInfo& info); - static Napi::Value Fill(const Napi::CallbackInfo& info); - static Napi::Value Stroke(const Napi::CallbackInfo& info); - static Napi::Value FillText(const Napi::CallbackInfo& info); - static Napi::Value StrokeText(const Napi::CallbackInfo& info); - static Napi::Value SetFont(const Napi::CallbackInfo& info); - static Napi::Value SetFillColor(const Napi::CallbackInfo& info); - static Napi::Value SetStrokeColor(const Napi::CallbackInfo& info); - static Napi::Value SetStrokePattern(const Napi::CallbackInfo& info); - static Napi::Value SetTextAlignment(const Napi::CallbackInfo& info); - static Napi::Value SetLineDash(const Napi::CallbackInfo& info); - static Napi::Value GetLineDash(const Napi::CallbackInfo& info); - static Napi::Value MeasureText(const Napi::CallbackInfo& info); - static Napi::Value BezierCurveTo(const Napi::CallbackInfo& info); - static Napi::Value QuadraticCurveTo(const Napi::CallbackInfo& info); - static Napi::Value LineTo(const Napi::CallbackInfo& info); - static Napi::Value MoveTo(const Napi::CallbackInfo& info); - static Napi::Value FillRect(const Napi::CallbackInfo& info); - static Napi::Value StrokeRect(const Napi::CallbackInfo& info); - static Napi::Value ClearRect(const Napi::CallbackInfo& info); - static Napi::Value Rect(const Napi::CallbackInfo& info); - static Napi::Value RoundRect(const Napi::CallbackInfo& info); - static Napi::Value Arc(const Napi::CallbackInfo& info); - static Napi::Value ArcTo(const Napi::CallbackInfo& info); - static Napi::Value Ellipse(const Napi::CallbackInfo& info); - static Napi::Value GetImageData(const Napi::CallbackInfo& info); - static Napi::Value CreateImageData(const Napi::CallbackInfo& info); - static Napi::Value GetStrokeColor(const Napi::CallbackInfo& info); - static Napi::Value CreatePattern(const Napi::CallbackInfo& info); - static Napi::Value CreateLinearGradient(const Napi::CallbackInfo& info); - static Napi::Value CreateRadialGradient(const Napi::CallbackInfo& info); - Napi::Value GetFormat(const Napi::CallbackInfo& info); - Napi::Value GetPatternQuality(const Napi::CallbackInfo& info); - Napi::Value GetImageSmoothingEnabled(const Napi::CallbackInfo& info); - Napi::Value GetGlobalCompositeOperation(const Napi::CallbackInfo& info); - Napi::Value GetGlobalAlpha(const Napi::CallbackInfo& info); - Napi::Value GetShadowColor(const Napi::CallbackInfo& info); - Napi::Value GetMiterLimit(const Napi::CallbackInfo& info); - Napi::Value GetLineCap(const Napi::CallbackInfo& info); - Napi::Value GetLineJoin(const Napi::CallbackInfo& info); - Napi::Value GetLineWidth(const Napi::CallbackInfo& info); - Napi::Value GetLineDashOffset(const Napi::CallbackInfo& info); - Napi::Value GetShadowOffsetX(const Napi::CallbackInfo& info); - Napi::Value GetShadowOffsetY(const Napi::CallbackInfo& info); - Napi::Value GetShadowBlur(const Napi::CallbackInfo& info); - Napi::Value GetAntiAlias(const Napi::CallbackInfo& info); - Napi::Value GetTextDrawingMode(const Napi::CallbackInfo& info); - Napi::Value GetQuality(const Napi::CallbackInfo& info); - Napi::Value GetCurrentTransform(const Napi::CallbackInfo& info); - Napi::Value GetFillStyle(const Napi::CallbackInfo& info); - Napi::Value GetStrokeStyle(const Napi::CallbackInfo& info); - Napi::Value GetFont(const Napi::CallbackInfo& info); - Napi::Value GetTextBaseline(const Napi::CallbackInfo& info); - Napi::Value GetTextAlign(const Napi::CallbackInfo& info); - void SetPatternQuality(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetImageSmoothingEnabled(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetGlobalCompositeOperation(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetGlobalAlpha(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetShadowColor(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetMiterLimit(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetLineCap(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetLineJoin(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetLineWidth(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetLineDashOffset(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetShadowOffsetX(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetShadowOffsetY(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetShadowBlur(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetAntiAlias(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetTextDrawingMode(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetQuality(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetCurrentTransform(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetFillStyle(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetStrokeStyle(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetFont(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetTextBaseline(const Napi::CallbackInfo& info, const Napi::Value& value); - void SetTextAlign(const Napi::CallbackInfo& info, const Napi::Value& value); - inline void setContext(cairo_t *ctx) { _context = ctx; } - inline cairo_t *context(){ return _context; } - inline Canvas *canvas(){ return _canvas; } - inline bool hasShadow(); - void inline setSourceRGBA(rgba_t color); - void inline setSourceRGBA(cairo_t *ctx, rgba_t color); - void setTextPath(double x, double y); - void blur(cairo_surface_t *surface, int radius); - void shadow(void (fn)(cairo_t *cr)); - void shadowStart(); - void shadowApply(); - void savePath(); - void restorePath(); - void saveState(); - void restoreState(); - void inline setFillRule(Napi::Value value); - void fill(bool preserve = false); - void stroke(bool preserve = false); - void save(); - void restore(); - void setFontFromState(); - void resetState(); - inline PangoLayout *layout(){ return _layout; } - - private: - ~Context2d(); - void _resetPersistentHandles(); - Napi::Value _getFillColor(); - Napi::Value _getStrokeColor(); - void _setFillColor(Napi::Value arg); - void _setFillPattern(Napi::Value arg); - void _setStrokeColor(Napi::Value arg); - void _setStrokePattern(Napi::Value arg); - Napi::Persistent _fillStyle; - Napi::Persistent _strokeStyle; - Canvas *_canvas; - cairo_t *_context; - cairo_path_t *_path; - PangoLayout *_layout; -}; diff --git a/npm-packages/mac-v2.4.x/canvas/src/InstanceData.h b/npm-packages/mac-v2.4.x/canvas/src/InstanceData.h deleted file mode 100644 index 9fb3cf4..0000000 --- a/npm-packages/mac-v2.4.x/canvas/src/InstanceData.h +++ /dev/null @@ -1,8 +0,0 @@ -#include - -struct InstanceData { - Napi::FunctionReference ImageBackendCtor; - Napi::FunctionReference PdfBackendCtor; - Napi::FunctionReference SvgBackendCtor; - Napi::FunctionReference CanvasCtor; -}; diff --git a/npm-packages/mac-v2.4.x/canvas/src/register_font.cc b/npm-packages/mac-v2.4.x/canvas/src/register_font.cc index e43dd81..ae44c9a 100644 --- a/npm-packages/mac-v2.4.x/canvas/src/register_font.cc +++ b/npm-packages/mac-v2.4.x/canvas/src/register_font.cc @@ -264,7 +264,7 @@ get_pango_font_description(unsigned char* filepath) { FILE_SHARE_READ, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, + NULL, NULL ); if(!hFile){ diff --git a/npm-packages/mac-v2.4.x/canvas/types/Readme.md b/npm-packages/mac-v2.4.x/canvas/types/Readme.md deleted file mode 100644 index 4beb7f5..0000000 --- a/npm-packages/mac-v2.4.x/canvas/types/Readme.md +++ /dev/null @@ -1,3 +0,0 @@ -Notes: - -* `"unified-signatures": false` because of https://github.com/Microsoft/dtslint/issues/183 diff --git a/npm-packages/mac-v2.4.x/canvas/types/index.d.ts b/npm-packages/mac-v2.4.x/canvas/types/index.d.ts index 8bcfd10..7b53f48 100644 --- a/npm-packages/mac-v2.4.x/canvas/types/index.d.ts +++ b/npm-packages/mac-v2.4.x/canvas/types/index.d.ts @@ -1,4 +1,5 @@ // TypeScript Version: 3.0 +/// import { Readable } from 'stream' @@ -79,7 +80,7 @@ export class Canvas { constructor(width: number, height: number, type?: 'image'|'pdf'|'svg') - getContext(contextId: '2d', contextAttributes?: NodeCanvasRenderingContext2DSettings): CanvasRenderingContext2D + getContext(contextId: '2d', contextAttributes?: NodeCanvasRenderingContext2DSettings): NodeCanvasRenderingContext2D /** * For image canvases, encodes the canvas as a PNG. For PDF canvases, @@ -127,126 +128,19 @@ export class Canvas { toDataURL(mimeType: 'image/jpeg', quality: number, cb: (err: Error|null, result: string) => void): void } -export interface TextMetrics { - readonly actualBoundingBoxAscent: number; - readonly actualBoundingBoxDescent: number; - readonly actualBoundingBoxLeft: number; - readonly actualBoundingBoxRight: number; - readonly fontBoundingBoxAscent: number; - readonly fontBoundingBoxDescent: number; - readonly width: number; -} - -export type CanvasFillRule = 'evenodd' | 'nonzero'; - -export type GlobalCompositeOperation = - | 'clear' - | 'copy' - | 'destination' - | 'source-over' - | 'destination-over' - | 'source-in' - | 'destination-in' - | 'source-out' - | 'destination-out' - | 'source-atop' - | 'destination-atop' - | 'xor' - | 'lighter' - | 'normal' - | 'multiply' - | 'screen' - | 'overlay' - | 'darken' - | 'lighten' - | 'color-dodge' - | 'color-burn' - | 'hard-light' - | 'soft-light' - | 'difference' - | 'exclusion' - | 'hue' - | 'saturation' - | 'color' - | 'luminosity' - | 'saturate'; - -export type CanvasLineCap = 'butt' | 'round' | 'square'; - -export type CanvasLineJoin = 'bevel' | 'miter' | 'round'; - -export type CanvasTextBaseline = 'alphabetic' | 'bottom' | 'hanging' | 'ideographic' | 'middle' | 'top'; - -export type CanvasTextAlign = 'center' | 'end' | 'left' | 'right' | 'start'; - -export class CanvasRenderingContext2D { - drawImage(image: Canvas|Image, dx: number, dy: number): void - drawImage(image: Canvas|Image, dx: number, dy: number, dw: number, dh: number): void - drawImage(image: Canvas|Image, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number): void - putImageData(imagedata: ImageData, dx: number, dy: number): void; - putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void; - getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; - createImageData(sw: number, sh: number): ImageData; - createImageData(imagedata: ImageData): ImageData; - /** - * For PDF canvases, adds another page. If width and/or height are omitted, - * the canvas's initial size is used. - */ - addPage(width?: number, height?: number): void - save(): void; - restore(): void; - rotate(angle: number): void; - translate(x: number, y: number): void; - transform(a: number, b: number, c: number, d: number, e: number, f: number): void; - getTransform(): DOMMatrix; - resetTransform(): void; - setTransform(transform?: DOMMatrix): void; - isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean; - scale(x: number, y: number): void; - clip(fillRule?: CanvasFillRule): void; - fill(fillRule?: CanvasFillRule): void; - stroke(): void; - fillText(text: string, x: number, y: number, maxWidth?: number): void; - strokeText(text: string, x: number, y: number, maxWidth?: number): void; - fillRect(x: number, y: number, w: number, h: number): void; - strokeRect(x: number, y: number, w: number, h: number): void; - clearRect(x: number, y: number, w: number, h: number): void; - rect(x: number, y: number, w: number, h: number): void; - roundRect(x: number, y: number, w: number, h: number, radii?: number | number[]): void; - measureText(text: string): TextMetrics; - moveTo(x: number, y: number): void; - lineTo(x: number, y: number): void; - bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; - quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; - beginPath(): void; - closePath(): void; - arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; - arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; - ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean): void; - setLineDash(segments: number[]): void; - getLineDash(): number[]; - createPattern(image: Canvas|Image, repetition: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat' | '' | null): CanvasPattern - createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient; - createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; +declare class NodeCanvasRenderingContext2D extends CanvasRenderingContext2D { /** * _Non-standard_. Defaults to 'good'. Affects pattern (gradient, image, * etc.) rendering quality. */ patternQuality: 'fast' | 'good' | 'best' | 'nearest' | 'bilinear' - imageSmoothingEnabled: boolean; - globalCompositeOperation: GlobalCompositeOperation; - globalAlpha: number; - shadowColor: string; - miterLimit: number; - lineWidth: number; - lineCap: CanvasLineCap; - lineJoin: CanvasLineJoin; - lineDashOffset: number; - shadowOffsetX: number; - shadowOffsetY: number; - shadowBlur: number; - /** _Non-standard_. Sets the antialiasing mode. */ - antialias: 'default' | 'gray' | 'none' | 'subpixel' + + /** + * _Non-standard_. Defaults to 'good'. Like `patternQuality`, but applies to + * transformations affecting more than just patterns. + */ + quality: 'fast' | 'good' | 'best' | 'nearest' | 'bilinear' + /** * Defaults to 'path'. The effect depends on the canvas type: * @@ -271,28 +165,55 @@ export class CanvasRenderingContext2D { * (aside from using the stroke and fill style, respectively). */ textDrawingMode: 'path' | 'glyph' - /** - * _Non-standard_. Defaults to 'good'. Like `patternQuality`, but applies to - * transformations affecting more than just patterns. - */ - quality: 'fast' | 'good' | 'best' | 'nearest' | 'bilinear' + + /** _Non-standard_. Sets the antialiasing mode. */ + antialias: 'default' | 'gray' | 'none' | 'subpixel' + + // Standard, but not in the TS lib and needs node-canvas class return type. /** Returns or sets a `DOMMatrix` for the current transformation matrix. */ - currentTransform: DOMMatrix - fillStyle: string | CanvasGradient | CanvasPattern; - strokeStyle: string | CanvasGradient | CanvasPattern; - font: string; - textBaseline: CanvasTextBaseline; - textAlign: CanvasTextAlign; - canvas: Canvas; -} + currentTransform: NodeCanvasDOMMatrix -export class CanvasGradient { - addColorStop(offset: number, color: string): void; -} + // Standard, but need node-canvas class versions: + getTransform(): NodeCanvasDOMMatrix + setTransform(a: number, b: number, c: number, d: number, e: number, f: number): void + setTransform(transform?: NodeCanvasDOMMatrix): void + createImageData(sw: number, sh: number): NodeCanvasImageData + createImageData(imagedata: NodeCanvasImageData): NodeCanvasImageData + getImageData(sx: number, sy: number, sw: number, sh: number): NodeCanvasImageData + putImageData(imagedata: NodeCanvasImageData, dx: number, dy: number): void + putImageData(imagedata: NodeCanvasImageData, dx: number, dy: number, dirtyX: number, dirtyY: number, dirtyWidth: number, dirtyHeight: number): void + drawImage(image: Canvas|Image, dx: number, dy: number): void + drawImage(image: Canvas|Image, dx: number, dy: number, dw: number, dh: number): void + drawImage(image: Canvas|Image, sx: number, sy: number, sw: number, sh: number, dx: number, dy: number, dw: number, dh: number): void + /** + * **Do not use this overload. Use one of the other three overloads.** This + * is a catch-all definition required for compatibility with the base + * `CanvasRenderingContext2D` interface. + */ + drawImage(...args: any[]): void + createPattern(image: Canvas|Image, repetition: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat' | '' | null): NodeCanvasCanvasPattern + /** + * **Do not use this overload. Use the other three overload.** This is a + * catch-all definition required for compatibility with the base + * `CanvasRenderingContext2D` interface. + */ + createPattern(...args: any[]): NodeCanvasCanvasPattern + createLinearGradient(x0: number, y0: number, x1: number, y1: number): NodeCanvasCanvasGradient; + createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): NodeCanvasCanvasGradient; -export class CanvasPattern { - setTransform(transform?: DOMMatrix): void; + /** + * For PDF canvases, adds another page. If width and/or height are omitted, + * the canvas's initial size is used. + */ + addPage(width?: number, height?: number): void } +export { NodeCanvasRenderingContext2D as CanvasRenderingContext2D } + +declare class NodeCanvasCanvasGradient extends CanvasGradient {} +export { NodeCanvasCanvasGradient as CanvasGradient } + +declare class NodeCanvasCanvasPattern extends CanvasPattern {} +export { NodeCanvasCanvasPattern as CanvasPattern } // This does not extend HTMLImageElement because there are dozens of inherited // methods and properties that we do not provide. @@ -391,79 +312,14 @@ export class JPEGStream extends Readable {} /** This class must not be constructed directly; use `canvas.createPDFStream()`. */ export class PDFStream extends Readable {} -export class DOMPoint { - w: number; - x: number; - y: number; - z: number; -} +declare class NodeCanvasDOMMatrix extends DOMMatrix {} +export { NodeCanvasDOMMatrix as DOMMatrix } -export class DOMMatrix { - constructor(init: string | number[]); - toString(): string; - multiply(other?: DOMMatrix): DOMMatrix; - multiplySelf(other?: DOMMatrix): DOMMatrix; - preMultiplySelf(other?: DOMMatrix): DOMMatrix; - translate(tx?: number, ty?: number, tz?: number): DOMMatrix; - translateSelf(tx?: number, ty?: number, tz?: number): DOMMatrix; - scale(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; - scale3d(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; - scale3dSelf(scale?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; - scaleSelf(scaleX?: number, scaleY?: number, scaleZ?: number, originX?: number, originY?: number, originZ?: number): DOMMatrix; - rotateFromVector(x?: number, y?: number): DOMMatrix; - rotateFromVectorSelf(x?: number, y?: number): DOMMatrix; - rotate(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix; - rotateSelf(rotX?: number, rotY?: number, rotZ?: number): DOMMatrix; - rotateAxisAngle(x?: number, y?: number, z?: number, angle?: number): DOMMatrix; - rotateAxisAngleSelf(x?: number, y?: number, z?: number, angle?: number): DOMMatrix; - skewX(sx?: number): DOMMatrix; - skewXSelf(sx?: number): DOMMatrix; - skewY(sy?: number): DOMMatrix; - skewYSelf(sy?: number): DOMMatrix; - flipX(): DOMMatrix; - flipY(): DOMMatrix; - inverse(): DOMMatrix; - invertSelf(): DOMMatrix; - setMatrixValue(transformList: string): DOMMatrix; - transformPoint(point?: DOMPoint): DOMPoint; - toFloat32Array(): Float32Array; - toFloat64Array(): Float64Array; - readonly is2D: boolean; - readonly isIdentity: boolean; - a: number; - b: number; - c: number; - d: number; - e: number; - f: number; - m11: number; - m12: number; - m13: number; - m14: number; - m21: number; - m22: number; - m23: number; - m24: number; - m31: number; - m32: number; - m33: number; - m34: number; - m41: number; - m42: number; - m43: number; - m44: number; - static fromMatrix(other: DOMMatrix): DOMMatrix; - static fromFloat32Array(a: Float32Array): DOMMatrix; - static fromFloat64Array(a: Float64Array): DOMMatrix; -} +declare class NodeCanvasDOMPoint extends DOMPoint {} +export { NodeCanvasDOMPoint as DOMPoint } -export class ImageData { - constructor(sw: number, sh: number); - constructor(data: Uint8ClampedArray, sw: number, sh?: number); - readonly data: Uint8ClampedArray; - readonly height: number; - readonly width: number; -} +declare class NodeCanvasImageData extends ImageData {} +export { NodeCanvasImageData as ImageData } // This is marked private, but is exported... // export function parseFont(description: string): object diff --git a/npm-packages/mac-v2.4.x/detect-libc/README.md b/npm-packages/mac-v2.4.x/detect-libc/README.md index 23212fd..cd5972f 100644 --- a/npm-packages/mac-v2.4.x/detect-libc/README.md +++ b/npm-packages/mac-v2.4.x/detect-libc/README.md @@ -8,9 +8,6 @@ Currently supports detection of GNU glibc and MUSL libc. Provides asychronous and synchronous functions for the family (e.g. `glibc`, `musl`) and version (e.g. `1.23`, `1.2.3`). -The version numbers of libc implementations -are not guaranteed to be semver-compliant. - For previous v1.x releases, please see the [v1](https://github.com/lovell/detect-libc/tree/v1) branch. @@ -150,7 +147,7 @@ if (isNonGlibcLinuxSync()) { ... } ## Licensing -Copyright 2017 Lovell Fuller and others. +Copyright 2017, 2022 Lovell Fuller Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/npm-packages/mac-v2.4.x/detect-libc/index.d.ts b/npm-packages/mac-v2.4.x/detect-libc/index.d.ts index 4c0fb2b..aabe808 100644 --- a/npm-packages/mac-v2.4.x/detect-libc/index.d.ts +++ b/npm-packages/mac-v2.4.x/detect-libc/index.d.ts @@ -1,6 +1,3 @@ -// Copyright 2017 Lovell Fuller and others. -// SPDX-License-Identifier: Apache-2.0 - export const GLIBC: 'glibc'; export const MUSL: 'musl'; diff --git a/npm-packages/mac-v2.4.x/detect-libc/lib/detect-libc.js b/npm-packages/mac-v2.4.x/detect-libc/lib/detect-libc.js index d4ea6f0..5b66e61 100644 --- a/npm-packages/mac-v2.4.x/detect-libc/lib/detect-libc.js +++ b/npm-packages/mac-v2.4.x/detect-libc/lib/detect-libc.js @@ -1,14 +1,7 @@ -// Copyright 2017 Lovell Fuller and others. -// SPDX-License-Identifier: Apache-2.0 - 'use strict'; const childProcess = require('child_process'); const { isLinux, getReport } = require('./process'); -const { LDD_PATH, readFile, readFileSync } = require('./filesystem'); - -let cachedFamilyFilesystem; -let cachedVersionFilesystem; const command = 'getconf GNU_LIBC_VERSION 2>&1 || true; ldd --version 2>&1 || true'; let commandOut = ''; @@ -43,12 +36,6 @@ const safeCommandSync = () => { */ const GLIBC = 'glibc'; -/** - * A Regexp constant to get the GLIBC Version. - * @type {string} - */ -const RE_GLIBC_VERSION = /GLIBC\s(\d+\.\d+)/; - /** * A String constant containing the value `musl`. * @type {string} @@ -56,18 +43,6 @@ const RE_GLIBC_VERSION = /GLIBC\s(\d+\.\d+)/; */ const MUSL = 'musl'; -/** - * This string is used to find if the {@link LDD_PATH} is GLIBC - * @type {string} - */ -const GLIBC_ON_LDD = GLIBC.toUpperCase(); - -/** - * This string is used to find if the {@link LDD_PATH} is musl - * @type {string} - */ -const MUSL_ON_LDD = MUSL.toLowerCase(); - const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-'); const familyFromReport = () => { @@ -94,40 +69,6 @@ const familyFromCommand = (out) => { return null; }; -const getFamilyFromLddContent = (content) => { - if (content.includes(MUSL_ON_LDD)) { - return MUSL; - } - if (content.includes(GLIBC_ON_LDD)) { - return GLIBC; - } - return null; -}; - -const familyFromFilesystem = async () => { - if (cachedFamilyFilesystem !== undefined) { - return cachedFamilyFilesystem; - } - cachedFamilyFilesystem = null; - try { - const lddContent = await readFile(LDD_PATH); - cachedFamilyFilesystem = getFamilyFromLddContent(lddContent); - } catch (e) {} - return cachedFamilyFilesystem; -}; - -const familyFromFilesystemSync = () => { - if (cachedFamilyFilesystem !== undefined) { - return cachedFamilyFilesystem; - } - cachedFamilyFilesystem = null; - try { - const lddContent = readFileSync(LDD_PATH); - cachedFamilyFilesystem = getFamilyFromLddContent(lddContent); - } catch (e) {} - return cachedFamilyFilesystem; -}; - /** * Resolves with the libc family when it can be determined, `null` otherwise. * @returns {Promise} @@ -135,10 +76,7 @@ const familyFromFilesystemSync = () => { const family = async () => { let family = null; if (isLinux()) { - family = await familyFromFilesystem(); - if (!family) { - family = familyFromReport(); - } + family = familyFromReport(); if (!family) { const out = await safeCommand(); family = familyFromCommand(out); @@ -154,10 +92,7 @@ const family = async () => { const familySync = () => { let family = null; if (isLinux()) { - family = familyFromFilesystemSync(); - if (!family) { - family = familyFromReport(); - } + family = familyFromReport(); if (!family) { const out = safeCommandSync(); family = familyFromCommand(out); @@ -178,36 +113,6 @@ const isNonGlibcLinux = async () => isLinux() && await family() !== GLIBC; */ const isNonGlibcLinuxSync = () => isLinux() && familySync() !== GLIBC; -const versionFromFilesystem = async () => { - if (cachedVersionFilesystem !== undefined) { - return cachedVersionFilesystem; - } - cachedVersionFilesystem = null; - try { - const lddContent = await readFile(LDD_PATH); - const versionMatch = lddContent.match(RE_GLIBC_VERSION); - if (versionMatch) { - cachedVersionFilesystem = versionMatch[1]; - } - } catch (e) {} - return cachedVersionFilesystem; -}; - -const versionFromFilesystemSync = () => { - if (cachedVersionFilesystem !== undefined) { - return cachedVersionFilesystem; - } - cachedVersionFilesystem = null; - try { - const lddContent = readFileSync(LDD_PATH); - const versionMatch = lddContent.match(RE_GLIBC_VERSION); - if (versionMatch) { - cachedVersionFilesystem = versionMatch[1]; - } - } catch (e) {} - return cachedVersionFilesystem; -}; - const versionFromReport = () => { const report = getReport(); if (report.header && report.header.glibcVersionRuntime) { @@ -236,10 +141,7 @@ const versionFromCommand = (out) => { const version = async () => { let version = null; if (isLinux()) { - version = await versionFromFilesystem(); - if (!version) { - version = versionFromReport(); - } + version = versionFromReport(); if (!version) { const out = await safeCommand(); version = versionFromCommand(out); @@ -255,10 +157,7 @@ const version = async () => { const versionSync = () => { let version = null; if (isLinux()) { - version = versionFromFilesystemSync(); - if (!version) { - version = versionFromReport(); - } + version = versionFromReport(); if (!version) { const out = safeCommandSync(); version = versionFromCommand(out); diff --git a/npm-packages/mac-v2.4.x/detect-libc/lib/filesystem.js b/npm-packages/mac-v2.4.x/detect-libc/lib/filesystem.js deleted file mode 100644 index de7e007..0000000 --- a/npm-packages/mac-v2.4.x/detect-libc/lib/filesystem.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2017 Lovell Fuller and others. -// SPDX-License-Identifier: Apache-2.0 - -'use strict'; - -const fs = require('fs'); - -/** - * The path where we can find the ldd - */ -const LDD_PATH = '/usr/bin/ldd'; - -/** - * Read the content of a file synchronous - * - * @param {string} path - * @returns {string} - */ -const readFileSync = (path) => fs.readFileSync(path, 'utf-8'); - -/** - * Read the content of a file - * - * @param {string} path - * @returns {Promise} - */ -const readFile = (path) => new Promise((resolve, reject) => { - fs.readFile(path, 'utf-8', (err, data) => { - if (err) { - reject(err); - } else { - resolve(data); - } - }); -}); - -module.exports = { - LDD_PATH, - readFileSync, - readFile -}; diff --git a/npm-packages/mac-v2.4.x/detect-libc/lib/process.js b/npm-packages/mac-v2.4.x/detect-libc/lib/process.js index d27fcb7..8d5840f 100644 --- a/npm-packages/mac-v2.4.x/detect-libc/lib/process.js +++ b/npm-packages/mac-v2.4.x/detect-libc/lib/process.js @@ -1,6 +1,3 @@ -// Copyright 2017 Lovell Fuller and others. -// SPDX-License-Identifier: Apache-2.0 - 'use strict'; const isLinux = () => process.platform === 'linux'; diff --git a/npm-packages/mac-v2.4.x/detect-libc/package.json b/npm-packages/mac-v2.4.x/detect-libc/package.json index dd8e42c..aeb7cc1 100644 --- a/npm-packages/mac-v2.4.x/detect-libc/package.json +++ b/npm-packages/mac-v2.4.x/detect-libc/package.json @@ -1,6 +1,6 @@ { "name": "detect-libc", - "version": "2.0.2", + "version": "2.0.1", "description": "Node.js module to detect the C standard library (libc) implementation family and version", "main": "lib/detect-libc.js", "files": [ @@ -8,9 +8,7 @@ "index.d.ts" ], "scripts": { - "test": "semistandard && nyc --reporter=lcov --check-coverage --branches=100 ava test/unit.js", - "bench": "node benchmark/detect-libc", - "bench:calls": "node benchmark/call-familySync.js && sleep 1 && node benchmark/call-isNonGlibcLinuxSync.js && sleep 1 && node benchmark/call-versionSync.js" + "test": "semistandard && nyc --reporter=lcov --check-coverage --branches=100 ava test/unit.js" }, "repository": { "type": "git", @@ -23,13 +21,11 @@ ], "author": "Lovell Fuller ", "contributors": [ - "Niklas Salmoukas ", - "Vinícius Lourenço " + "Niklas Salmoukas " ], "license": "Apache-2.0", "devDependencies": { "ava": "^2.4.0", - "benchmark": "^2.1.4", "nyc": "^15.1.0", "proxyquire": "^2.1.3", "semistandard": "^14.2.3" diff --git a/npm-packages/mac-v2.4.x/graceful-fs/package.json b/npm-packages/mac-v2.4.x/graceful-fs/package.json index 87babf0..3057856 100644 --- a/npm-packages/mac-v2.4.x/graceful-fs/package.json +++ b/npm-packages/mac-v2.4.x/graceful-fs/package.json @@ -1,7 +1,7 @@ { "name": "graceful-fs", "description": "A drop-in replacement for fs, making various improvements.", - "version": "4.2.11", + "version": "4.2.10", "repository": { "type": "git", "url": "https://github.com/isaacs/node-graceful-fs" @@ -38,7 +38,7 @@ "import-fresh": "^2.0.0", "mkdirp": "^0.5.0", "rimraf": "^2.2.8", - "tap": "^16.3.4" + "tap": "^12.7.0" }, "files": [ "fs.js", @@ -46,8 +46,5 @@ "legacy-streams.js", "polyfills.js", "clone.js" - ], - "tap": { - "reporter": "classic" - } + ] } diff --git a/npm-packages/mac-v2.4.x/graceful-fs/polyfills.js b/npm-packages/mac-v2.4.x/graceful-fs/polyfills.js index 453f1a9..46dea36 100644 --- a/npm-packages/mac-v2.4.x/graceful-fs/polyfills.js +++ b/npm-packages/mac-v2.4.x/graceful-fs/polyfills.js @@ -101,7 +101,7 @@ function patch (fs) { var backoff = 0; fs$rename(from, to, function CB (er) { if (er - && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") + && (er.code === "EACCES" || er.code === "EPERM") && Date.now() - start < 60000) { setTimeout(function() { fs.stat(to, function (stater, st) { diff --git a/npm-packages/mac-v2.4.x/minimist/.eslintrc b/npm-packages/mac-v2.4.x/minimist/.eslintrc index bd1a5e0..137f67b 100644 --- a/npm-packages/mac-v2.4.x/minimist/.eslintrc +++ b/npm-packages/mac-v2.4.x/minimist/.eslintrc @@ -1,29 +1,54 @@ { - "root": true, + "root": true, - "extends": "@ljharb/eslint-config/node/0.4", + "extends": "@ljharb/eslint-config/node/0.4", - "rules": { - "array-element-newline": 0, - "complexity": 0, - "func-style": [2, "declaration"], - "max-lines-per-function": 0, - "max-nested-callbacks": 1, - "max-statements-per-line": 1, - "max-statements": 0, - "multiline-comment-style": 0, - "no-continue": 1, - "no-param-reassign": 1, - "no-restricted-syntax": 1, - "object-curly-newline": 0, - }, - - "overrides": [ - { - "files": "test/**", - "rules": { - "camelcase": 0, - }, - }, - ] + "rules": { + "array-bracket-spacing": 0, + "array-element-newline": 0, + "brace-style": 1, + "camelcase": 1, + "comma-dangle": 1, + "comma-spacing": 1, + "complexity": 0, + "curly": 1, + "dot-notation": 1, + "eol-last": 1, + "func-style": 1, + "function-paren-newline": 1, + "indent": [1, 4], + "key-spacing": 1, + "max-lines-per-function": 0, + "max-nested-callbacks": 1, + "max-statements": 0, + "multiline-comment-style": 1, + "no-array-constructor": 1, + "no-continue": 1, + "no-div-regex": 1, + "no-extra-parens": 1, + "no-mixed-operators": 1, + "no-multi-spaces": 1, + "no-multiple-empty-lines": 1, + "no-param-reassign": 1, + "no-plusplus": 1, + "no-proto": 1, + "no-redeclare": 1, + "no-restricted-syntax": 1, + "no-shadow": 1, + "no-trailing-spaces": 1, + "no-unused-vars": 1, + "no-use-before-define": 1, + "object-curly-newline": 1, + "object-curly-spacing": 1, + "operator-linebreak": 1, + "quote-props": 1, + "quotes": 1, + "semi-style": 1, + "semi": 1, + "space-before-blocks": 1, + "space-before-function-paren": 1, + "space-infix-ops": 1, + "strict": 1, + "wrap-regex": 1, + }, } diff --git a/npm-packages/mac-v2.4.x/minimist/CHANGELOG.md b/npm-packages/mac-v2.4.x/minimist/CHANGELOG.md index c9a1e15..e0e00bd 100644 --- a/npm-packages/mac-v2.4.x/minimist/CHANGELOG.md +++ b/npm-packages/mac-v2.4.x/minimist/CHANGELOG.md @@ -5,52 +5,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [v1.2.8](https://github.com/minimistjs/minimist/compare/v1.2.7...v1.2.8) - 2023-02-09 - -### Merged - -- [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17) -- [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12) -- [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10) - -### Fixed - -- [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15) -- [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8) -- [Fix] Fix long option followed by single dash [`#15`](https://github.com/minimistjs/minimist/issues/15) -- [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9) -- [Fix] Fix handling of short option with non-trivial equals [`#5`](https://github.com/minimistjs/minimist/issues/5) -- [Tests] Remove duplicate test [`#8`](https://github.com/minimistjs/minimist/issues/8) -- [Fix] opt.string works with multiple aliases [`#9`](https://github.com/minimistjs/minimist/issues/9) - -### Commits - -- Merge tag 'v0.2.3' [`a026794`](https://github.com/minimistjs/minimist/commit/a0267947c7870fc5847cf2d437fbe33f392767da) -- [eslint] fix indentation and whitespace [`5368ca4`](https://github.com/minimistjs/minimist/commit/5368ca4147e974138a54cc0dc4cea8f756546b70) -- [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7) -- [eslint] more cleanup [`62fde7d`](https://github.com/minimistjs/minimist/commit/62fde7d935f83417fb046741531a9e2346a36976) -- [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1) -- [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c) -- [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91) -- [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4) -- [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982) -- [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0) -- [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07) -- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b) -- [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa) -- [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e) -- Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf) -- isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11) -- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79) -- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`3124ed3`](https://github.com/minimistjs/minimist/commit/3124ed3e46306301ebb3c834874ce0241555c2c4) -- [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6) -- [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c) -- [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a) -- [actions] Avoid 0.6 tests due to build failures [`ba92fe6`](https://github.com/minimistjs/minimist/commit/ba92fe6ebbdc0431cca9a2ea8f27beb492f5e4ec) -- [Dev Deps] update `tape` [`950eaa7`](https://github.com/minimistjs/minimist/commit/950eaa74f112e04d23e9c606c67472c46739b473) -- [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b) -- Merge tag 'v0.2.2' [`980d7ac`](https://github.com/minimistjs/minimist/commit/980d7ac61a0b4bd552711251ac107d506b23e41f) - ## [v1.2.7](https://github.com/minimistjs/minimist/compare/v1.2.6...v1.2.7) - 2022-10-10 ### Commits @@ -155,53 +109,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - coverage script [`e5531ba`](https://github.com/minimistjs/minimist/commit/e5531ba0479da3b8138d3d8cac545d84ccb1c8df) - extra fn to get 100% coverage again [`a6972da`](https://github.com/minimistjs/minimist/commit/a6972da89e56bf77642f8ec05a13b6558db93498) -## [v1.0.0](https://github.com/minimistjs/minimist/compare/v0.2.3...v1.0.0) - 2014-08-10 +## [v1.0.0](https://github.com/minimistjs/minimist/compare/v0.2.1...v1.0.0) - 2014-08-10 ### Commits - added stopEarly option [`471c7e4`](https://github.com/minimistjs/minimist/commit/471c7e4a7e910fc7ad8f9df850a186daf32c64e9) - fix list [`fef6ae7`](https://github.com/minimistjs/minimist/commit/fef6ae79c38b9dc1c49569abb7cd04eb965eac5e) -## [v0.2.3](https://github.com/minimistjs/minimist/compare/v0.2.2...v0.2.3) - 2023-02-09 - -### Merged - -- [Fix] Fix long option followed by single dash [`#17`](https://github.com/minimistjs/minimist/pull/17) -- [Tests] Remove duplicate test [`#12`](https://github.com/minimistjs/minimist/pull/12) -- [Fix] opt.string works with multiple aliases [`#10`](https://github.com/minimistjs/minimist/pull/10) - -### Fixed - -- [Fix] Fix long option followed by single dash (#17) [`#15`](https://github.com/minimistjs/minimist/issues/15) -- [Tests] Remove duplicate test (#12) [`#8`](https://github.com/minimistjs/minimist/issues/8) -- [Fix] opt.string works with multiple aliases (#10) [`#9`](https://github.com/minimistjs/minimist/issues/9) - -### Commits - -- [eslint] fix indentation and whitespace [`e5f5067`](https://github.com/minimistjs/minimist/commit/e5f5067259ceeaf0b098d14bec910f87e58708c7) -- [eslint] more cleanup [`36ac5d0`](https://github.com/minimistjs/minimist/commit/36ac5d0d95e4947d074e5737d94814034ca335d1) -- [eslint] fix indentation [`34b0f1c`](https://github.com/minimistjs/minimist/commit/34b0f1ccaa45183c3c4f06a91f9b405180a6f982) -- isConstructorOrProto adapted from PR [`ef9153f`](https://github.com/minimistjs/minimist/commit/ef9153fc52b6cea0744b2239921c5dcae4697f11) -- [Dev Deps] update `@ljharb/eslint-config`, `aud` [`098873c`](https://github.com/minimistjs/minimist/commit/098873c213cdb7c92e55ae1ef5aa1af3a8192a79) -- [Dev Deps] add missing `npmignore` dev dep [`3226afa`](https://github.com/minimistjs/minimist/commit/3226afaf09e9d127ca369742437fe6e88f752d6b) - -## [v0.2.2](https://github.com/minimistjs/minimist/compare/v0.2.1...v0.2.2) - 2022-10-10 - -### Commits - -- [meta] add `auto-changelog` [`73923d2`](https://github.com/minimistjs/minimist/commit/73923d223553fca08b1ba77e3fbc2a492862ae4c) -- [actions] add reusable workflows [`d80727d`](https://github.com/minimistjs/minimist/commit/d80727df77bfa9e631044d7f16368d8f09242c91) -- [eslint] add eslint; rules to enable later are warnings [`48bc06a`](https://github.com/minimistjs/minimist/commit/48bc06a1b41f00e9cdf183db34f7a51ba70e98d4) -- [readme] rename and add badges [`5df0fe4`](https://github.com/minimistjs/minimist/commit/5df0fe49211bd09a3636f8686a7cb3012c3e98f0) -- [Dev Deps] switch from `covert` to `nyc` [`a48b128`](https://github.com/minimistjs/minimist/commit/a48b128fdb8d427dfb20a15273f83e38d97bef07) -- [Dev Deps] update `covert`, `tape`; remove unnecessary `tap` [`f0fb958`](https://github.com/minimistjs/minimist/commit/f0fb958e9a1fe980cdffc436a211b0bda58f621b) -- [meta] create FUNDING.yml; add `funding` in package.json [`3639e0c`](https://github.com/minimistjs/minimist/commit/3639e0c819359a366387e425ab6eabf4c78d3caa) -- [meta] use `npmignore` to autogenerate an npmignore file [`be2e038`](https://github.com/minimistjs/minimist/commit/be2e038c342d8333b32f0fde67a0026b79c8150e) -- Only apps should have lockfiles [`282b570`](https://github.com/minimistjs/minimist/commit/282b570e7489d01b03f2d6d3dabf79cd3e5f84cf) -- [meta] add `safe-publish-latest` [`4b927de`](https://github.com/minimistjs/minimist/commit/4b927de696d561c636b4f43bf49d4597cb36d6d6) -- [Tests] add `aud` in `posttest` [`b32d9bd`](https://github.com/minimistjs/minimist/commit/b32d9bd0ab340f4e9f8c3a97ff2a4424f25fab8c) -- [meta] update repo URLs [`f9fdfc0`](https://github.com/minimistjs/minimist/commit/f9fdfc032c54884d9a9996a390c63cd0719bbe1a) - ## [v0.2.1](https://github.com/minimistjs/minimist/compare/v0.2.0...v0.2.1) - 2020-03-12 ## [v0.2.0](https://github.com/minimistjs/minimist/compare/v0.1.0...v0.2.0) - 2014-06-19 diff --git a/npm-packages/mac-v2.4.x/minimist/README.md b/npm-packages/mac-v2.4.x/minimist/README.md index 74da323..30ff92d 100644 --- a/npm-packages/mac-v2.4.x/minimist/README.md +++ b/npm-packages/mac-v2.4.x/minimist/README.md @@ -26,16 +26,14 @@ $ node example/parse.js -a beep -b boop ``` $ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz -{ - _: ['foo', 'bar', 'baz'], - x: 3, - y: 4, - n: 5, - a: true, - b: true, - c: true, - beep: 'boop' -} +{ _: [ 'foo', 'bar', 'baz' ], + x: 3, + y: 4, + n: 5, + a: true, + b: true, + c: true, + beep: 'boop' } ``` # security @@ -83,10 +81,8 @@ and `argv['--']` with everything after the `--`. Here's an example: ``` > require('./')('one two three -- four five --six'.split(' '), { '--': true }) - { - _: ['one', 'two', 'three'], - '--': ['four', 'five', '--six'] - } + { _: [ 'one', 'two', 'three' ], + '--': [ 'four', 'five', '--six' ] } ``` Note that with `opts['--']` set, parsing for arguments still stops after the diff --git a/npm-packages/mac-v2.4.x/minimist/example/parse.js b/npm-packages/mac-v2.4.x/minimist/example/parse.js index 9d90ffb..f7c8d49 100644 --- a/npm-packages/mac-v2.4.x/minimist/example/parse.js +++ b/npm-packages/mac-v2.4.x/minimist/example/parse.js @@ -1,4 +1,2 @@ -'use strict'; - var argv = require('../')(process.argv.slice(2)); console.log(argv); diff --git a/npm-packages/mac-v2.4.x/minimist/index.js b/npm-packages/mac-v2.4.x/minimist/index.js index f020f39..d9c3eb7 100644 --- a/npm-packages/mac-v2.4.x/minimist/index.js +++ b/npm-packages/mac-v2.4.x/minimist/index.js @@ -1,263 +1,249 @@ -'use strict'; - -function hasKey(obj, keys) { - var o = obj; - keys.slice(0, -1).forEach(function (key) { - o = o[key] || {}; - }); - - var key = keys[keys.length - 1]; - return key in o; -} - -function isNumber(x) { - if (typeof x === 'number') { return true; } - if ((/^0x[0-9a-f]+$/i).test(x)) { return true; } - return (/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/).test(x); -} - -function isConstructorOrProto(obj, key) { - return (key === 'constructor' && typeof obj[key] === 'function') || key === '__proto__'; -} - module.exports = function (args, opts) { - if (!opts) { opts = {}; } + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {}, unknownFn: null }; - var flags = { - bools: {}, - strings: {}, - unknownFn: null, - }; + if (typeof opts['unknown'] === 'function') { + flags.unknownFn = opts['unknown']; + } - if (typeof opts.unknown === 'function') { - flags.unknownFn = opts.unknown; - } + if (typeof opts['boolean'] === 'boolean' && opts['boolean']) { + flags.allBools = true; + } else { + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + } + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); - if (typeof opts.boolean === 'boolean' && opts.boolean) { - flags.allBools = true; - } else { - [].concat(opts.boolean).filter(Boolean).forEach(function (key) { - flags.bools[key] = true; - }); - } + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + if (aliases[key]) { + flags.strings[aliases[key]] = true; + } + }); - var aliases = {}; + var defaults = opts['default'] || {}; + + var argv = { _ : [] }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; - function aliasIsBoolean(key) { - return aliases[key].some(function (x) { - return flags.bools[x]; - }); - } + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--')+1); + args = args.slice(0, args.indexOf('--')); + } - Object.keys(opts.alias || {}).forEach(function (key) { - aliases[key] = [].concat(opts.alias[key]); - aliases[key].forEach(function (x) { - aliases[x] = [key].concat(aliases[key].filter(function (y) { - return x !== y; - })); - }); - }); + function argDefined(key, arg) { + return (flags.allBools && /^--[^=]+$/.test(arg)) || + flags.strings[key] || flags.bools[key] || aliases[key]; + } - [].concat(opts.string).filter(Boolean).forEach(function (key) { - flags.strings[key] = true; - if (aliases[key]) { - [].concat(aliases[key]).forEach(function (k) { - flags.strings[k] = true; - }); - } - }); + function setArg (key, val, arg) { + if (arg && flags.unknownFn && !argDefined(key, arg)) { + if (flags.unknownFn(arg) === false) return; + } - var defaults = opts.default || {}; + var value = !flags.strings[key] && isNumber(val) + ? Number(val) : val + ; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } - var argv = { _: [] }; + function setKey (obj, keys, value) { + var o = obj; + for (var i = 0; i < keys.length-1; i++) { + var key = keys[i]; + if (isConstructorOrProto(o, key)) return; + if (o[key] === undefined) o[key] = {}; + if (o[key] === Object.prototype || o[key] === Number.prototype + || o[key] === String.prototype) o[key] = {}; + if (o[key] === Array.prototype) o[key] = []; + o = o[key]; + } - function argDefined(key, arg) { - return (flags.allBools && (/^--[^=]+$/).test(arg)) - || flags.strings[key] - || flags.bools[key] - || aliases[key]; - } + var key = keys[keys.length - 1]; + if (isConstructorOrProto(o, key)) return; + if (o === Object.prototype || o === Number.prototype + || o === String.prototype) o = {}; + if (o === Array.prototype) o = []; + if (o[key] === undefined || flags.bools[key] || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } + } + + function aliasIsBoolean(key) { + return aliases[key].some(function (x) { + return flags.bools[x]; + }); + } - function setKey(obj, keys, value) { - var o = obj; - for (var i = 0; i < keys.length - 1; i++) { - var key = keys[i]; - if (isConstructorOrProto(o, key)) { return; } - if (o[key] === undefined) { o[key] = {}; } - if ( - o[key] === Object.prototype - || o[key] === Number.prototype - || o[key] === String.prototype - ) { - o[key] = {}; - } - if (o[key] === Array.prototype) { o[key] = []; } - o = o[key]; - } + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (/^--.+=/.test(arg)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + var key = m[1]; + var value = m[2]; + if (flags.bools[key]) { + value = value !== 'false'; + } + setArg(key, value, arg); + } + else if (/^--no-.+/.test(arg)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false, arg); + } + else if (/^--.+/.test(arg)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !/^-/.test(next) + && !flags.bools[key] + && !flags.allBools + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, next, arg); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + else if (/^-[^-]+/.test(arg)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j+2); + + if (next === '-') { + setArg(letters[j], next, arg) + continue; + } + + if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { + setArg(letters[j], next.split('=')[1], arg); + broken = true; + break; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next, arg); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2), arg); + broken = true; + break; + } + else { + setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); + } + } + + var key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) + && !flags.bools[key] + && (aliases[key] ? !aliasIsBoolean(key) : true)) { + setArg(key, args[i+1], arg); + i++; + } + else if (args[i+1] && /^(true|false)$/.test(args[i+1])) { + setArg(key, args[i+1] === 'true', arg); + i++; + } + else { + setArg(key, flags.strings[key] ? '' : true, arg); + } + } + } + else { + if (!flags.unknownFn || flags.unknownFn(arg) !== false) { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + if (opts.stopEarly) { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + if (opts['--']) { + argv['--'] = new Array(); + notFlags.forEach(function(key) { + argv['--'].push(key); + }); + } + else { + notFlags.forEach(function(key) { + argv._.push(key); + }); + } - var lastKey = keys[keys.length - 1]; - if (isConstructorOrProto(o, lastKey)) { return; } - if ( - o === Object.prototype - || o === Number.prototype - || o === String.prototype - ) { - o = {}; - } - if (o === Array.prototype) { o = []; } - if (o[lastKey] === undefined || flags.bools[lastKey] || typeof o[lastKey] === 'boolean') { - o[lastKey] = value; - } else if (Array.isArray(o[lastKey])) { - o[lastKey].push(value); - } else { - o[lastKey] = [o[lastKey], value]; - } - } - - function setArg(key, val, arg) { - if (arg && flags.unknownFn && !argDefined(key, arg)) { - if (flags.unknownFn(arg) === false) { return; } - } - - var value = !flags.strings[key] && isNumber(val) - ? Number(val) - : val; - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - setKey(argv, x.split('.'), value); - }); - } - - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] === undefined ? false : defaults[key]); - }); - - var notFlags = []; - - if (args.indexOf('--') !== -1) { - notFlags = args.slice(args.indexOf('--') + 1); - args = args.slice(0, args.indexOf('--')); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - var key; - var next; - - if ((/^--.+=/).test(arg)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - key = m[1]; - var value = m[2]; - if (flags.bools[key]) { - value = value !== 'false'; - } - setArg(key, value, arg); - } else if ((/^--no-.+/).test(arg)) { - key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false, arg); - } else if ((/^--.+/).test(arg)) { - key = arg.match(/^--(.+)/)[1]; - next = args[i + 1]; - if ( - next !== undefined - && !(/^(-|--)[^-]/).test(next) - && !flags.bools[key] - && !flags.allBools - && (aliases[key] ? !aliasIsBoolean(key) : true) - ) { - setArg(key, next, arg); - i += 1; - } else if ((/^(true|false)$/).test(next)) { - setArg(key, next === 'true', arg); - i += 1; - } else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } else if ((/^-[^-]+/).test(arg)) { - var letters = arg.slice(1, -1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - next = arg.slice(j + 2); - - if (next === '-') { - setArg(letters[j], next, arg); - continue; - } - - if ((/[A-Za-z]/).test(letters[j]) && next[0] === '=') { - setArg(letters[j], next.slice(1), arg); - broken = true; - break; - } - - if ( - (/[A-Za-z]/).test(letters[j]) - && (/-?\d+(\.\d*)?(e-?\d+)?$/).test(next) - ) { - setArg(letters[j], next, arg); - broken = true; - break; - } - - if (letters[j + 1] && letters[j + 1].match(/\W/)) { - setArg(letters[j], arg.slice(j + 2), arg); - broken = true; - break; - } else { - setArg(letters[j], flags.strings[letters[j]] ? '' : true, arg); - } - } - - key = arg.slice(-1)[0]; - if (!broken && key !== '-') { - if ( - args[i + 1] - && !(/^(-|--)[^-]/).test(args[i + 1]) - && !flags.bools[key] - && (aliases[key] ? !aliasIsBoolean(key) : true) - ) { - setArg(key, args[i + 1], arg); - i += 1; - } else if (args[i + 1] && (/^(true|false)$/).test(args[i + 1])) { - setArg(key, args[i + 1] === 'true', arg); - i += 1; - } else { - setArg(key, flags.strings[key] ? '' : true, arg); - } - } - } else { - if (!flags.unknownFn || flags.unknownFn(arg) !== false) { - argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg)); - } - if (opts.stopEarly) { - argv._.push.apply(argv._, args.slice(i + 1)); - break; - } - } - } - - Object.keys(defaults).forEach(function (k) { - if (!hasKey(argv, k.split('.'))) { - setKey(argv, k.split('.'), defaults[k]); - - (aliases[k] || []).forEach(function (x) { - setKey(argv, x.split('.'), defaults[k]); - }); - } - }); - - if (opts['--']) { - argv['--'] = notFlags.slice(); - } else { - notFlags.forEach(function (k) { - argv._.push(k); - }); - } - - return argv; + return argv; }; + +function hasKey (obj, keys) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + o = (o[key] || {}); + }); + + var key = keys[keys.length - 1]; + return key in o; +} + +function isNumber (x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + + +function isConstructorOrProto (obj, key) { + return key === 'constructor' && typeof obj[key] === 'function' || key === '__proto__'; +} diff --git a/npm-packages/mac-v2.4.x/minimist/package.json b/npm-packages/mac-v2.4.x/minimist/package.json index c10a334..89a639e 100644 --- a/npm-packages/mac-v2.4.x/minimist/package.json +++ b/npm-packages/mac-v2.4.x/minimist/package.json @@ -1,75 +1,75 @@ { - "name": "minimist", - "version": "1.2.8", - "description": "parse argument options", - "main": "index.js", - "devDependencies": { - "@ljharb/eslint-config": "^21.0.1", - "aud": "^2.0.2", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "in-publish": "^2.0.1", - "npmignore": "^0.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.6.3" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=auto", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "lint": "eslint --ext=js,mjs .", - "pretest": "npm run lint", - "tests-only": "nyc tape 'test/**/*.js'", - "test": "npm run tests-only", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/6..latest", - "ff/5", - "firefox/latest", - "chrome/10", - "chrome/latest", - "safari/5.1", - "safari/latest", - "opera/12" - ] - }, - "repository": { - "type": "git", - "url": "git://github.com/minimistjs/minimist.git" - }, - "homepage": "https://github.com/minimistjs/minimist", - "keywords": [ - "argv", - "getopt", - "parser", - "optimist" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - }, - "license": "MIT", - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } + "name": "minimist", + "version": "1.2.7", + "description": "parse argument options", + "main": "index.js", + "devDependencies": { + "@ljharb/eslint-config": "^21.0.0", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=auto", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "lint": "eslint --ext=js,mjs .", + "pretest": "npm run lint", + "tests-only": "nyc tape test/*.js", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "ff/5", + "firefox/latest", + "chrome/10", + "chrome/latest", + "safari/5.1", + "safari/latest", + "opera/12" + ] + }, + "repository": { + "type": "git", + "url": "git://github.com/minimistjs/minimist.git" + }, + "homepage": "https://github.com/minimistjs/minimist", + "keywords": [ + "argv", + "getopt", + "parser", + "optimist" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, + "license": "MIT", + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } } diff --git a/npm-packages/mac-v2.4.x/minimist/test/all_bool.js b/npm-packages/mac-v2.4.x/minimist/test/all_bool.js index befa0c9..ac83548 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/all_bool.js +++ b/npm-packages/mac-v2.4.x/minimist/test/all_bool.js @@ -1,34 +1,32 @@ -'use strict'; - var parse = require('../'); var test = require('tape'); test('flag boolean true (default all --args to boolean)', function (t) { - var argv = parse(['moo', '--honk', 'cow'], { - boolean: true, - }); - - t.deepEqual(argv, { - honk: true, - _: ['moo', 'cow'], - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); + var argv = parse(['moo', '--honk', 'cow'], { + boolean: true + }); + + t.deepEqual(argv, { + honk: true, + _: ['moo', 'cow'] + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); }); test('flag boolean true only affects double hyphen arguments without equals signs', function (t) { - var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { - boolean: true, - }); - - t.deepEqual(argv, { - honk: true, - tacos: 'good', - p: 55, - _: ['moo', 'cow'], - }); - - t.deepEqual(typeof argv.honk, 'boolean'); - t.end(); + var argv = parse(['moo', '--honk', 'cow', '-p', '55', '--tacos=good'], { + boolean: true + }); + + t.deepEqual(argv, { + honk: true, + tacos: 'good', + p: 55, + _: ['moo', 'cow'] + }); + + t.deepEqual(typeof argv.honk, 'boolean'); + t.end(); }); diff --git a/npm-packages/mac-v2.4.x/minimist/test/bool.js b/npm-packages/mac-v2.4.x/minimist/test/bool.js index e58d47e..5f7dbde 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/bool.js +++ b/npm-packages/mac-v2.4.x/minimist/test/bool.js @@ -1,177 +1,178 @@ -'use strict'; - var parse = require('../'); var test = require('tape'); test('flag boolean default false', function (t) { - var argv = parse(['moo'], { - boolean: ['t', 'verbose'], - default: { verbose: false, t: false }, - }); - - t.deepEqual(argv, { - verbose: false, - t: false, - _: ['moo'], - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); + var argv = parse(['moo'], { + boolean: ['t', 'verbose'], + default: { verbose: false, t: false } + }); + + t.deepEqual(argv, { + verbose: false, + t: false, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); }); test('boolean groups', function (t) { - var argv = parse(['-x', '-z', 'one', 'two', 'three'], { - boolean: ['x', 'y', 'z'], - }); - - t.deepEqual(argv, { - x: true, - y: false, - z: true, - _: ['one', 'two', 'three'], - }); - - t.deepEqual(typeof argv.x, 'boolean'); - t.deepEqual(typeof argv.y, 'boolean'); - t.deepEqual(typeof argv.z, 'boolean'); - t.end(); + var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { + boolean: ['x','y','z'] + }); + + t.deepEqual(argv, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ] + }); + + t.deepEqual(typeof argv.x, 'boolean'); + t.deepEqual(typeof argv.y, 'boolean'); + t.deepEqual(typeof argv.z, 'boolean'); + t.end(); }); test('boolean and alias with chainable api', function (t) { - var aliased = ['-h', 'derp']; - var regular = ['--herp', 'derp']; - var aliasedArgv = parse(aliased, { - boolean: 'herp', - alias: { h: 'herp' }, - }); - var propertyArgv = parse(regular, { - boolean: 'herp', - alias: { h: 'herp' }, - }); - var expected = { - herp: true, - h: true, - _: ['derp'], - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = parse(aliased, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var propertyArgv = parse(regular, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); }); test('boolean and alias with options hash', function (t) { - var aliased = ['-h', 'derp']; - var regular = ['--herp', 'derp']; - var opts = { - alias: { h: 'herp' }, - boolean: 'herp', - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - _: ['derp'], - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + alias: { 'h': 'herp' }, + boolean: 'herp' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); }); test('boolean and alias array with options hash', function (t) { - var aliased = ['-h', 'derp']; - var regular = ['--herp', 'derp']; - var alt = ['--harp', 'derp']; - var opts = { - alias: { h: ['herp', 'harp'] }, - boolean: 'h', - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var altPropertyArgv = parse(alt, opts); - var expected = { - harp: true, - herp: true, - h: true, - _: ['derp'], - }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.same(altPropertyArgv, expected); - t.end(); + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var alt = [ '--harp', 'derp' ]; + var opts = { + alias: { 'h': ['herp', 'harp'] }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var altPropertyArgv = parse(alt, opts); + var expected = { + harp: true, + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.same(altPropertyArgv, expected); + t.end(); }); test('boolean and alias using explicit true', function (t) { - var aliased = ['-h', 'true']; - var regular = ['--herp', 'true']; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - }; - var aliasedArgv = parse(aliased, opts); - var propertyArgv = parse(regular, opts); - var expected = { - herp: true, - h: true, - _: [], - }; + var aliased = [ '-h', 'true' ]; + var regular = [ '--herp', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ ] + }; - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); }); // regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function (t) { - var parsed = parse(['--boool', '--other=true'], { - boolean: 'boool', - }); +test('boolean and --x=true', function(t) { + var parsed = parse(['--boool', '--other=true'], { + boolean: 'boool' + }); - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); + t.same(parsed.boool, true); + t.same(parsed.other, 'true'); - parsed = parse(['--boool', '--other=false'], { - boolean: 'boool', - }); - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); + parsed = parse(['--boool', '--other=false'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'false'); + t.end(); }); test('boolean --boool=true', function (t) { - var parsed = parse(['--boool=true'], { - default: { - boool: false, - }, - boolean: ['boool'], - }); + var parsed = parse(['--boool=true'], { + default: { + boool: false + }, + boolean: ['boool'] + }); - t.same(parsed.boool, true); - t.end(); + t.same(parsed.boool, true); + t.end(); }); test('boolean --boool=false', function (t) { - var parsed = parse(['--boool=false'], { - default: { - boool: true, - }, - boolean: ['boool'], - }); + var parsed = parse(['--boool=false'], { + default: { + boool: true + }, + boolean: ['boool'] + }); - t.same(parsed.boool, false); - t.end(); + t.same(parsed.boool, false); + t.end(); }); test('boolean using something similar to true', function (t) { - var opts = { boolean: 'h' }; - var result = parse(['-h', 'true.txt'], opts); - var expected = { - h: true, - _: ['true.txt'], - }; + var opts = { boolean: 'h' }; + var result = parse(['-h', 'true.txt'], opts); + var expected = { + h: true, + '_': ['true.txt'] + }; - t.same(result, expected); - t.end(); -}); + t.same(result, expected); + t.end(); +}); \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/minimist/test/dash.js b/npm-packages/mac-v2.4.x/minimist/test/dash.js index 7078817..5a4fa5b 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/dash.js +++ b/npm-packages/mac-v2.4.x/minimist/test/dash.js @@ -1,43 +1,31 @@ -'use strict'; - var parse = require('../'); var test = require('tape'); test('-', function (t) { - t.plan(6); - t.deepEqual(parse(['-n', '-']), { n: '-', _: [] }); - t.deepEqual(parse(['--nnn', '-']), { nnn: '-', _: [] }); - t.deepEqual(parse(['-']), { _: ['-'] }); - t.deepEqual(parse(['-f-']), { f: '-', _: [] }); - t.deepEqual( - parse(['-b', '-'], { boolean: 'b' }), - { b: true, _: ['-'] } - ); - t.deepEqual( - parse(['-s', '-'], { string: 's' }), - { s: '-', _: [] } - ); + t.plan(5); + t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); + t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); + t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); + t.deepEqual( + parse([ '-b', '-' ], { boolean: 'b' }), + { b: true, _: [ '-' ] } + ); + t.deepEqual( + parse([ '-s', '-' ], { string: 's' }), + { s: '-', _: [] } + ); }); test('-a -- b', function (t) { - t.plan(2); - t.deepEqual(parse(['-a', '--', 'b']), { a: true, _: ['b'] }); - t.deepEqual(parse(['--a', '--', 'b']), { a: true, _: ['b'] }); + t.plan(3); + t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); }); -test('move arguments after the -- into their own `--` array', function (t) { - t.plan(1); - t.deepEqual( - parse(['--name', 'John', 'before', '--', 'after'], { '--': true }), - { name: 'John', _: ['before'], '--': ['after'] } - ); +test('move arguments after the -- into their own `--` array', function(t) { + t.plan(1); + t.deepEqual( + parse([ '--name', 'John', 'before', '--', 'after' ], { '--': true }), + { name: 'John', _: [ 'before' ], '--': [ 'after' ] }); }); - -test('--- option value', function (t) { - // A multi-dash value is largely an edge case, but check the behaviour is as expected, - // and in particular the same for short option and long option (as made consistent in Jan 2023). - t.plan(2); - t.deepEqual(parse(['-n', '---']), { n: '---', _: [] }); - t.deepEqual(parse(['--nnn', '---']), { nnn: '---', _: [] }); -}); - diff --git a/npm-packages/mac-v2.4.x/minimist/test/default_bool.js b/npm-packages/mac-v2.4.x/minimist/test/default_bool.js index 4e9f625..780a311 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/default_bool.js +++ b/npm-packages/mac-v2.4.x/minimist/test/default_bool.js @@ -1,37 +1,35 @@ -'use strict'; - var test = require('tape'); var parse = require('../'); test('boolean default true', function (t) { - var argv = parse([], { - boolean: 'sometrue', - default: { sometrue: true }, - }); - t.equal(argv.sometrue, true); - t.end(); + var argv = parse([], { + boolean: 'sometrue', + default: { sometrue: true } + }); + t.equal(argv.sometrue, true); + t.end(); }); test('boolean default false', function (t) { - var argv = parse([], { - boolean: 'somefalse', - default: { somefalse: false }, - }); - t.equal(argv.somefalse, false); - t.end(); + var argv = parse([], { + boolean: 'somefalse', + default: { somefalse: false } + }); + t.equal(argv.somefalse, false); + t.end(); }); test('boolean default to null', function (t) { - var argv = parse([], { - boolean: 'maybe', - default: { maybe: null }, - }); - t.equal(argv.maybe, null); + var argv = parse([], { + boolean: 'maybe', + default: { maybe: null } + }); + t.equal(argv.maybe, null); + var argv = parse(['--maybe'], { + boolean: 'maybe', + default: { maybe: null } + }); + t.equal(argv.maybe, true); + t.end(); - var argvLong = parse(['--maybe'], { - boolean: 'maybe', - default: { maybe: null }, - }); - t.equal(argvLong.maybe, true); - t.end(); -}); +}) diff --git a/npm-packages/mac-v2.4.x/minimist/test/dotted.js b/npm-packages/mac-v2.4.x/minimist/test/dotted.js index 126ff03..d8b3e85 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/dotted.js +++ b/npm-packages/mac-v2.4.x/minimist/test/dotted.js @@ -1,24 +1,22 @@ -'use strict'; - var parse = require('../'); var test = require('tape'); test('dotted alias', function (t) { - var argv = parse(['--a.b', '22'], { default: { 'a.b': 11 }, alias: { 'a.b': 'aa.bb' } }); - t.equal(argv.a.b, 22); - t.equal(argv.aa.bb, 22); - t.end(); + var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 22); + t.equal(argv.aa.bb, 22); + t.end(); }); test('dotted default', function (t) { - var argv = parse('', { default: { 'a.b': 11 }, alias: { 'a.b': 'aa.bb' } }); - t.equal(argv.a.b, 11); - t.equal(argv.aa.bb, 11); - t.end(); + var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 11); + t.equal(argv.aa.bb, 11); + t.end(); }); test('dotted default with no alias', function (t) { - var argv = parse('', { default: { 'a.b': 11 } }); - t.equal(argv.a.b, 11); - t.end(); + var argv = parse('', {default: {'a.b': 11}}); + t.equal(argv.a.b, 11); + t.end(); }); diff --git a/npm-packages/mac-v2.4.x/minimist/test/kv_short.js b/npm-packages/mac-v2.4.x/minimist/test/kv_short.js index 6d1b53a..f813b30 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/kv_short.js +++ b/npm-packages/mac-v2.4.x/minimist/test/kv_short.js @@ -1,32 +1,16 @@ -'use strict'; - var parse = require('../'); var test = require('tape'); -test('short -k=v', function (t) { - t.plan(1); - - var argv = parse(['-b=123']); - t.deepEqual(argv, { b: 123, _: [] }); +test('short -k=v' , function (t) { + t.plan(1); + + var argv = parse([ '-b=123' ]); + t.deepEqual(argv, { b: 123, _: [] }); }); -test('multi short -k=v', function (t) { - t.plan(1); - - var argv = parse(['-a=whatever', '-b=robots']); - t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); -}); - -test('short with embedded equals -k=a=b', function (t) { - t.plan(1); - - var argv = parse(['-k=a=b']); - t.deepEqual(argv, { k: 'a=b', _: [] }); -}); - -test('short with later equals like -ab=c', function (t) { - t.plan(1); - - var argv = parse(['-ab=c']); - t.deepEqual(argv, { a: true, b: 'c', _: [] }); +test('multi short -k=v' , function (t) { + t.plan(1); + + var argv = parse([ '-a=whatever', '-b=robots' ]); + t.deepEqual(argv, { a: 'whatever', b: 'robots', _: [] }); }); diff --git a/npm-packages/mac-v2.4.x/minimist/test/long.js b/npm-packages/mac-v2.4.x/minimist/test/long.js index 9fef51f..5d3a1e0 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/long.js +++ b/npm-packages/mac-v2.4.x/minimist/test/long.js @@ -1,33 +1,31 @@ -'use strict'; - var test = require('tape'); var parse = require('../'); test('long opts', function (t) { - t.deepEqual( - parse(['--bool']), - { bool: true, _: [] }, - 'long boolean' - ); - t.deepEqual( - parse(['--pow', 'xixxle']), - { pow: 'xixxle', _: [] }, - 'long capture sp' - ); - t.deepEqual( - parse(['--pow=xixxle']), - { pow: 'xixxle', _: [] }, - 'long capture eq' - ); - t.deepEqual( - parse(['--host', 'localhost', '--port', '555']), - { host: 'localhost', port: 555, _: [] }, - 'long captures sp' - ); - t.deepEqual( - parse(['--host=localhost', '--port=555']), - { host: 'localhost', port: 555, _: [] }, - 'long captures eq' - ); - t.end(); + t.deepEqual( + parse([ '--bool' ]), + { bool : true, _ : [] }, + 'long boolean' + ); + t.deepEqual( + parse([ '--pow', 'xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture sp' + ); + t.deepEqual( + parse([ '--pow=xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture eq' + ); + t.deepEqual( + parse([ '--host', 'localhost', '--port', '555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures sp' + ); + t.deepEqual( + parse([ '--host=localhost', '--port=555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures eq' + ); + t.end(); }); diff --git a/npm-packages/mac-v2.4.x/minimist/test/num.js b/npm-packages/mac-v2.4.x/minimist/test/num.js index 074393e..2cc77f4 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/num.js +++ b/npm-packages/mac-v2.4.x/minimist/test/num.js @@ -1,38 +1,36 @@ -'use strict'; - var parse = require('../'); var test = require('tape'); test('nums', function (t) { - var argv = parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789', - ]); - t.deepEqual(argv, { - x: 1234, - y: 5.67, - z: 1e7, - w: '10f', - hex: 0xdeadbeef, - _: [789], - }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv.y, 'number'); - t.deepEqual(typeof argv.z, 'number'); - t.deepEqual(typeof argv.w, 'string'); - t.deepEqual(typeof argv.hex, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); + var argv = parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789' + ]); + t.deepEqual(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ] + }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv.y, 'number'); + t.deepEqual(typeof argv.z, 'number'); + t.deepEqual(typeof argv.w, 'string'); + t.deepEqual(typeof argv.hex, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); }); test('already a number', function (t) { - var argv = parse(['-x', 1234, 789]); - t.deepEqual(argv, { x: 1234, _: [789] }); - t.deepEqual(typeof argv.x, 'number'); - t.deepEqual(typeof argv._[0], 'number'); - t.end(); + var argv = parse([ '-x', 1234, 789 ]); + t.deepEqual(argv, { x : 1234, _ : [ 789 ] }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); }); diff --git a/npm-packages/mac-v2.4.x/minimist/test/parse.js b/npm-packages/mac-v2.4.x/minimist/test/parse.js index 65d9d90..7b4a2a1 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/parse.js +++ b/npm-packages/mac-v2.4.x/minimist/test/parse.js @@ -1,209 +1,197 @@ -'use strict'; - var parse = require('../'); var test = require('tape'); test('parse args', function (t) { - t.deepEqual( - parse(['--no-moo']), - { moo: false, _: [] }, - 'no' - ); - t.deepEqual( - parse(['-v', 'a', '-v', 'b', '-v', 'c']), - { v: ['a', 'b', 'c'], _: [] }, - 'multi' - ); - t.end(); + t.deepEqual( + parse([ '--no-moo' ]), + { moo : false, _ : [] }, + 'no' + ); + t.deepEqual( + parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), + { v : ['a','b','c'], _ : [] }, + 'multi' + ); + t.end(); }); - + test('comprehensive', function (t) { - t.deepEqual( - parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek', - ]), - { - c: true, - a: true, - t: true, - s: 'woo', - h: 'awesome', - b: true, - bool: true, - key: 'value', - multi: ['quux', 'baz'], - meep: false, - name: 'meowmers', - _: ['bare', '--not-a-flag', 'eek'], - } - ); - t.end(); + t.deepEqual( + parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek' + ]), + { + c : true, + a : true, + t : true, + s : 'woo', + h : 'awesome', + b : true, + bool : true, + key : 'value', + multi : [ 'quux', 'baz' ], + meep : false, + name : 'meowmers', + _ : [ 'bare', '--not-a-flag', 'eek' ] + } + ); + t.end(); }); test('flag boolean', function (t) { - var argv = parse(['-t', 'moo'], { boolean: 't' }); - t.deepEqual(argv, { t: true, _: ['moo'] }); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); + var argv = parse([ '-t', 'moo' ], { boolean: 't' }); + t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); }); test('flag boolean value', function (t) { - var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { - boolean: ['t', 'verbose'], - default: { verbose: true }, - }); - - t.deepEqual(argv, { - verbose: false, - t: true, - _: ['moo'], - }); - - t.deepEqual(typeof argv.verbose, 'boolean'); - t.deepEqual(typeof argv.t, 'boolean'); - t.end(); + var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { + boolean: [ 't', 'verbose' ], + default: { verbose: true } + }); + + t.deepEqual(argv, { + verbose: false, + t: true, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); }); -test('newlines in params', function (t) { - var args = parse(['-s', 'X\nX']); - t.deepEqual(args, { _: [], s: 'X\nX' }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = parse(['--s=X\nX']); - t.deepEqual(args, { _: [], s: 'X\nX' }); - t.end(); +test('newlines in params' , function (t) { + var args = parse([ '-s', "X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + + // reproduce in bash: + // VALUE="new + // line" + // node program.js --s="$VALUE" + args = parse([ "--s=X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + t.end(); }); -test('strings', function (t) { - var s = parse(['-s', '0001234'], { string: 's' }).s; - t.equal(s, '0001234'); - t.equal(typeof s, 'string'); - - var x = parse(['-x', '56'], { string: 'x' }).x; - t.equal(x, '56'); - t.equal(typeof x, 'string'); - t.end(); +test('strings' , function (t) { + var s = parse([ '-s', '0001234' ], { string: 's' }).s; + t.equal(s, '0001234'); + t.equal(typeof s, 'string'); + + var x = parse([ '-x', '56' ], { string: 'x' }).x; + t.equal(x, '56'); + t.equal(typeof x, 'string'); + t.end(); }); test('stringArgs', function (t) { - var s = parse([' ', ' '], { string: '_' })._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); + var s = parse([ ' ', ' ' ], { string: '_' })._; + t.same(s.length, 2); + t.same(typeof s[0], 'string'); + t.same(s[0], ' '); + t.same(typeof s[1], 'string'); + t.same(s[1], ' '); + t.end(); }); -test('empty strings', function (t) { - var s = parse(['-s'], { string: 's' }).s; - t.equal(s, ''); - t.equal(typeof s, 'string'); +test('empty strings', function(t) { + var s = parse([ '-s' ], { string: 's' }).s; + t.equal(s, ''); + t.equal(typeof s, 'string'); - var str = parse(['--str'], { string: 'str' }).str; - t.equal(str, ''); - t.equal(typeof str, 'string'); + var str = parse([ '--str' ], { string: 'str' }).str; + t.equal(str, ''); + t.equal(typeof str, 'string'); - var letters = parse(['-art'], { - string: ['a', 't'], - }); + var letters = parse([ '-art' ], { + string: [ 'a', 't' ] + }); - t.equal(letters.a, ''); - t.equal(letters.r, true); - t.equal(letters.t, ''); + t.equal(letters.a, ''); + t.equal(letters.r, true); + t.equal(letters.t, ''); - t.end(); + t.end(); }); -test('string and alias', function (t) { - var x = parse(['--str', '000123'], { - string: 's', - alias: { s: 'str' }, - }); - t.equal(x.str, '000123'); - t.equal(typeof x.str, 'string'); - t.equal(x.s, '000123'); - t.equal(typeof x.s, 'string'); +test('string and alias', function(t) { + var x = parse([ '--str', '000123' ], { + string: 's', + alias: { s: 'str' } + }); - var y = parse(['-s', '000123'], { - string: 'str', - alias: { str: 's' }, - }); + t.equal(x.str, '000123'); + t.equal(typeof x.str, 'string'); + t.equal(x.s, '000123'); + t.equal(typeof x.s, 'string'); - t.equal(y.str, '000123'); - t.equal(typeof y.str, 'string'); - t.equal(y.s, '000123'); - t.equal(typeof y.s, 'string'); + var y = parse([ '-s', '000123' ], { + string: 'str', + alias: { str: 's' } + }); - var z = parse(['-s123'], { - alias: { str: ['s', 'S'] }, - string: ['str'], - }); - - t.deepEqual( - z, - { _: [], s: '123', S: '123', str: '123' }, - 'opt.string works with multiple aliases' - ); - t.end(); + t.equal(y.str, '000123'); + t.equal(typeof y.str, 'string'); + t.equal(y.s, '000123'); + t.equal(typeof y.s, 'string'); + t.end(); }); test('slashBreak', function (t) { - t.same( - parse(['-I/foo/bar/baz']), - { I: '/foo/bar/baz', _: [] } - ); - t.same( - parse(['-xyz/foo/bar/baz']), - { x: true, y: true, z: '/foo/bar/baz', _: [] } - ); - t.end(); + t.same( + parse([ '-I/foo/bar/baz' ]), + { I : '/foo/bar/baz', _ : [] } + ); + t.same( + parse([ '-xyz/foo/bar/baz' ]), + { x : true, y : true, z : '/foo/bar/baz', _ : [] } + ); + t.end(); }); test('alias', function (t) { - var argv = parse(['-f', '11', '--zoom', '55'], { - alias: { z: 'zoom' }, - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: 'zoom' } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.f, 11); + t.end(); }); test('multiAlias', function (t) { - var argv = parse(['-f', '11', '--zoom', '55'], { - alias: { z: ['zm', 'zoom'] }, - }); - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: [ 'zm', 'zoom' ] } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.z, argv.zm); + t.equal(argv.f, 11); + t.end(); }); test('nested dotted objects', function (t) { - var argv = parse([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop', - ]); - - t.same(argv.foo, { - bar: 3, - baz: 4, - quux: { - quibble: 5, - o_O: true, - }, - }); - t.same(argv.beep, { boop: true }); - t.end(); + var argv = parse([ + '--foo.bar', '3', '--foo.baz', '4', + '--foo.quux.quibble', '5', '--foo.quux.o_O', + '--beep.boop' + ]); + + t.same(argv.foo, { + bar : 3, + baz : 4, + quux : { + quibble : 5, + o_O : true + } + }); + t.same(argv.beep, { boop : true }); + t.end(); }); diff --git a/npm-packages/mac-v2.4.x/minimist/test/parse_modified.js b/npm-packages/mac-v2.4.x/minimist/test/parse_modified.js index 32965d1..ab620dc 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/parse_modified.js +++ b/npm-packages/mac-v2.4.x/minimist/test/parse_modified.js @@ -1,11 +1,9 @@ -'use strict'; - var parse = require('../'); var test = require('tape'); -test('parse with modifier functions', function (t) { - t.plan(1); - - var argv = parse(['-b', '123'], { boolean: 'b' }); - t.deepEqual(argv, { b: true, _: [123] }); +test('parse with modifier functions' , function (t) { + t.plan(1); + + var argv = parse([ '-b', '123' ], { boolean: 'b' }); + t.deepEqual(argv, { b: true, _: [123] }); }); diff --git a/npm-packages/mac-v2.4.x/minimist/test/proto.js b/npm-packages/mac-v2.4.x/minimist/test/proto.js index 6e629dd..4ac62df 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/proto.js +++ b/npm-packages/mac-v2.4.x/minimist/test/proto.js @@ -1,64 +1,60 @@ -'use strict'; - -/* eslint no-proto: 0 */ - var parse = require('../'); var test = require('tape'); test('proto pollution', function (t) { - var argv = parse(['--__proto__.x', '123']); - t.equal({}.x, undefined); - t.equal(argv.__proto__.x, undefined); - t.equal(argv.x, undefined); - t.end(); + var argv = parse(['--__proto__.x','123']); + t.equal({}.x, undefined); + t.equal(argv.__proto__.x, undefined); + t.equal(argv.x, undefined); + t.end(); }); test('proto pollution (array)', function (t) { - var argv = parse(['--x', '4', '--x', '5', '--x.__proto__.z', '789']); - t.equal({}.z, undefined); - t.deepEqual(argv.x, [4, 5]); - t.equal(argv.x.z, undefined); - t.equal(argv.x.__proto__.z, undefined); - t.end(); + var argv = parse(['--x','4','--x','5','--x.__proto__.z','789']); + t.equal({}.z, undefined); + t.deepEqual(argv.x, [4,5]); + t.equal(argv.x.z, undefined); + t.equal(argv.x.__proto__.z, undefined); + t.end(); }); test('proto pollution (number)', function (t) { - var argv = parse(['--x', '5', '--x.__proto__.z', '100']); - t.equal({}.z, undefined); - t.equal((4).z, undefined); - t.equal(argv.x, 5); - t.equal(argv.x.z, undefined); - t.end(); + var argv = parse(['--x','5','--x.__proto__.z','100']); + t.equal({}.z, undefined); + t.equal((4).z, undefined); + t.equal(argv.x, 5); + t.equal(argv.x.z, undefined); + t.end(); }); test('proto pollution (string)', function (t) { - var argv = parse(['--x', 'abc', '--x.__proto__.z', 'def']); - t.equal({}.z, undefined); - t.equal('...'.z, undefined); - t.equal(argv.x, 'abc'); - t.equal(argv.x.z, undefined); - t.end(); + var argv = parse(['--x','abc','--x.__proto__.z','def']); + t.equal({}.z, undefined); + t.equal('...'.z, undefined); + t.equal(argv.x, 'abc'); + t.equal(argv.x.z, undefined); + t.end(); }); test('proto pollution (constructor)', function (t) { - var argv = parse(['--constructor.prototype.y', '123']); - t.equal({}.y, undefined); - t.equal(argv.y, undefined); - t.end(); + var argv = parse(['--constructor.prototype.y','123']); + t.equal({}.y, undefined); + t.equal(argv.y, undefined); + t.end(); }); test('proto pollution (constructor function)', function (t) { - var argv = parse(['--_.concat.constructor.prototype.y', '123']); - function fnToBeTested() {} - t.equal(fnToBeTested.y, undefined); - t.equal(argv.y, undefined); - t.end(); + var argv = parse(['--_.concat.constructor.prototype.y', '123']); + function fnToBeTested() {} + t.equal(fnToBeTested.y, undefined); + t.equal(argv.y, undefined); + t.end(); }); // powered by snyk - https://github.com/backstage/backstage/issues/10343 test('proto pollution (constructor function) snyk', function (t) { - var argv = parse('--_.constructor.constructor.prototype.foo bar'.split(' ')); - t.equal(function () {}.foo, undefined); - t.equal(argv.y, undefined); - t.end(); -}); + var argv = parse('--_.constructor.constructor.prototype.foo bar'.split(' ')); + t.equal((function(){}).foo, undefined); + t.equal(argv.y, undefined); + t.end(); +}) diff --git a/npm-packages/mac-v2.4.x/minimist/test/short.js b/npm-packages/mac-v2.4.x/minimist/test/short.js index 4a7b843..d513a1c 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/short.js +++ b/npm-packages/mac-v2.4.x/minimist/test/short.js @@ -1,69 +1,67 @@ -'use strict'; - var parse = require('../'); var test = require('tape'); test('numeric short args', function (t) { - t.plan(2); - t.deepEqual(parse(['-n123']), { n: 123, _: [] }); - t.deepEqual( - parse(['-123', '456']), - { 1: true, 2: true, 3: 456, _: [] } - ); + t.plan(2); + t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); + t.deepEqual( + parse([ '-123', '456' ]), + { 1: true, 2: true, 3: 456, _: [] } + ); }); test('short', function (t) { - t.deepEqual( - parse(['-b']), - { b: true, _: [] }, - 'short boolean' - ); - t.deepEqual( - parse(['foo', 'bar', 'baz']), - { _: ['foo', 'bar', 'baz'] }, - 'bare' - ); - t.deepEqual( - parse(['-cats']), - { c: true, a: true, t: true, s: true, _: [] }, - 'group' - ); - t.deepEqual( - parse(['-cats', 'meow']), - { c: true, a: true, t: true, s: 'meow', _: [] }, - 'short group next' - ); - t.deepEqual( - parse(['-h', 'localhost']), - { h: 'localhost', _: [] }, - 'short capture' - ); - t.deepEqual( - parse(['-h', 'localhost', '-p', '555']), - { h: 'localhost', p: 555, _: [] }, - 'short captures' - ); - t.end(); + t.deepEqual( + parse([ '-b' ]), + { b : true, _ : [] }, + 'short boolean' + ); + t.deepEqual( + parse([ 'foo', 'bar', 'baz' ]), + { _ : [ 'foo', 'bar', 'baz' ] }, + 'bare' + ); + t.deepEqual( + parse([ '-cats' ]), + { c : true, a : true, t : true, s : true, _ : [] }, + 'group' + ); + t.deepEqual( + parse([ '-cats', 'meow' ]), + { c : true, a : true, t : true, s : 'meow', _ : [] }, + 'short group next' + ); + t.deepEqual( + parse([ '-h', 'localhost' ]), + { h : 'localhost', _ : [] }, + 'short capture' + ); + t.deepEqual( + parse([ '-h', 'localhost', '-p', '555' ]), + { h : 'localhost', p : 555, _ : [] }, + 'short captures' + ); + t.end(); }); - + test('mixed short bool and capture', function (t) { - t.same( - parse(['-h', 'localhost', '-fp', '555', 'script.js']), - { - f: true, p: 555, h: 'localhost', - _: ['script.js'], - } - ); - t.end(); + t.same( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); }); - + test('short and long', function (t) { - t.deepEqual( - parse(['-h', 'localhost', '-fp', '555', 'script.js']), - { - f: true, p: 555, h: 'localhost', - _: ['script.js'], - } - ); - t.end(); + t.deepEqual( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); }); diff --git a/npm-packages/mac-v2.4.x/minimist/test/stop_early.js b/npm-packages/mac-v2.4.x/minimist/test/stop_early.js index 52a6a91..bdf9fbc 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/stop_early.js +++ b/npm-packages/mac-v2.4.x/minimist/test/stop_early.js @@ -1,17 +1,15 @@ -'use strict'; - var parse = require('../'); var test = require('tape'); test('stops parsing on the first non-option when stopEarly is set', function (t) { - var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { - stopEarly: true, - }); + var argv = parse(['--aaa', 'bbb', 'ccc', '--ddd'], { + stopEarly: true + }); - t.deepEqual(argv, { - aaa: 'bbb', - _: ['ccc', '--ddd'], - }); + t.deepEqual(argv, { + aaa: 'bbb', + _: ['ccc', '--ddd'] + }); - t.end(); + t.end(); }); diff --git a/npm-packages/mac-v2.4.x/minimist/test/unknown.js b/npm-packages/mac-v2.4.x/minimist/test/unknown.js index 4f2e0ca..462a36b 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/unknown.js +++ b/npm-packages/mac-v2.4.x/minimist/test/unknown.js @@ -1,104 +1,102 @@ -'use strict'; - var parse = require('../'); var test = require('tape'); test('boolean and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['-h', 'true', '--derp', 'true']; - var regular = ['--herp', 'true', '-d', 'true']; - var opts = { - alias: { h: 'herp' }, - boolean: 'h', - unknown: unknownFn, - }; - parse(aliased, opts); - parse(regular, opts); + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'true', '--derp', 'true' ]; + var regular = [ '--herp', 'true', '-d', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); - t.same(unknown, ['--derp', '-d']); - t.end(); + t.same(unknown, ['--derp', '-d']); + t.end(); }); test('flag boolean true any double hyphen argument is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { - boolean: true, - unknown: unknownFn, - }); - t.same(unknown, ['--tacos=good', 'cow', '-p']); - t.same(argv, { - honk: true, - _: [], - }); - t.end(); + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var argv = parse(['--honk', '--tacos=good', 'cow', '-p', '55'], { + boolean: true, + unknown: unknownFn + }); + t.same(unknown, ['--tacos=good', 'cow', '-p']); + t.same(argv, { + honk: true, + _: [] + }); + t.end(); }); test('string and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['-h', 'hello', '--derp', 'goodbye']; - var regular = ['--herp', 'hello', '-d', 'moon']; - var opts = { - alias: { h: 'herp' }, - string: 'h', - unknown: unknownFn, - }; - parse(aliased, opts); - parse(regular, opts); + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello', '--derp', 'goodbye' ]; + var regular = [ '--herp', 'hello', '-d', 'moon' ]; + var opts = { + alias: { h: 'herp' }, + string: 'h', + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); - t.same(unknown, ['--derp', '-d']); - t.end(); + t.same(unknown, ['--derp', '-d']); + t.end(); }); test('default and alias is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['-h', 'hello']; - var regular = ['--herp', 'hello']; - var opts = { - default: { h: 'bar' }, - alias: { h: 'herp' }, - unknown: unknownFn, - }; - parse(aliased, opts); - parse(regular, opts); + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '-h', 'hello' ]; + var regular = [ '--herp', 'hello' ]; + var opts = { + default: { 'h': 'bar' }, + alias: { 'h': 'herp' }, + unknown: unknownFn + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); - t.same(unknown, []); - t.end(); - unknownFn(); // exercise fn for 100% coverage + t.same(unknown, []); + t.end(); + unknownFn(); // exercise fn for 100% coverage }); test('value following -- is not unknown', function (t) { - var unknown = []; - function unknownFn(arg) { - unknown.push(arg); - return false; - } - var aliased = ['--bad', '--', 'good', 'arg']; - var opts = { - '--': true, - unknown: unknownFn, - }; - var argv = parse(aliased, opts); + var unknown = []; + function unknownFn(arg) { + unknown.push(arg); + return false; + } + var aliased = [ '--bad', '--', 'good', 'arg' ]; + var opts = { + '--': true, + unknown: unknownFn + }; + var argv = parse(aliased, opts); - t.same(unknown, ['--bad']); - t.same(argv, { - '--': ['good', 'arg'], - _: [], - }); - t.end(); + t.same(unknown, ['--bad']); + t.same(argv, { + '--': ['good', 'arg'], + '_': [] + }) + t.end(); }); diff --git a/npm-packages/mac-v2.4.x/minimist/test/whitespace.js b/npm-packages/mac-v2.4.x/minimist/test/whitespace.js index 4fdaf1d..8a52a58 100644 --- a/npm-packages/mac-v2.4.x/minimist/test/whitespace.js +++ b/npm-packages/mac-v2.4.x/minimist/test/whitespace.js @@ -1,10 +1,8 @@ -'use strict'; - var parse = require('../'); var test = require('tape'); -test('whitespace should be whitespace', function (t) { - t.plan(1); - var x = parse(['-x', '\t']).x; - t.equal(x, '\t'); +test('whitespace should be whitespace' , function (t) { + t.plan(1); + var x = parse([ '-x', '\t' ]).x; + t.equal(x, '\t'); }); diff --git a/npm-packages/mac-v2.4.x/minipass/LICENSE b/npm-packages/mac-v2.4.x/minipass/LICENSE index 97f8e32..bf1dece 100644 --- a/npm-packages/mac-v2.4.x/minipass/LICENSE +++ b/npm-packages/mac-v2.4.x/minipass/LICENSE @@ -1,6 +1,6 @@ The ISC License -Copyright (c) 2017-2023 npm, Inc., Isaac Z. Schlueter, and Contributors +Copyright (c) 2017-2022 npm, Inc., Isaac Z. Schlueter, and Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/npm-packages/mac-v2.4.x/minipass/README.md b/npm-packages/mac-v2.4.x/minipass/README.md index 6108809..2cde46c 100644 --- a/npm-packages/mac-v2.4.x/minipass/README.md +++ b/npm-packages/mac-v2.4.x/minipass/README.md @@ -4,37 +4,35 @@ A _very_ minimal implementation of a [PassThrough stream](https://nodejs.org/api/stream.html#stream_class_stream_passthrough) [It's very -fast](https://docs.google.com/spreadsheets/d/1K_HR5oh3r80b8WVMWCPPjfuWXUgfkmhlX7FGI6JJ8tY/edit?usp=sharing) +fast](https://docs.google.com/spreadsheets/d/1oObKSrVwLX_7Ut4Z6g3fZW-AX1j1-k6w-cDsrkaSbHM/edit#gid=0) for objects, strings, and buffers. -Supports `pipe()`ing (including multi-`pipe()` and backpressure -transmission), buffering data until either a `data` event handler -or `pipe()` is added (so you don't lose the first chunk), and -most other cases where PassThrough is a good idea. +Supports `pipe()`ing (including multi-`pipe()` and backpressure transmission), +buffering data until either a `data` event handler or `pipe()` is added (so +you don't lose the first chunk), and most other cases where PassThrough is +a good idea. -There is a `read()` method, but it's much more efficient to -consume data from this stream via `'data'` events or by calling -`pipe()` into some other stream. Calling `read()` requires the -buffer to be flattened in some cases, which requires copying -memory. +There is a `read()` method, but it's much more efficient to consume data +from this stream via `'data'` events or by calling `pipe()` into some other +stream. Calling `read()` requires the buffer to be flattened in some +cases, which requires copying memory. -If you set `objectMode: true` in the options, then whatever is -written will be emitted. Otherwise, it'll do a minimal amount of -Buffer copying to ensure proper Streams semantics when `read(n)` -is called. +If you set `objectMode: true` in the options, then whatever is written will +be emitted. Otherwise, it'll do a minimal amount of Buffer copying to +ensure proper Streams semantics when `read(n)` is called. -`objectMode` can also be set by doing `stream.objectMode = true`, -or by writing any non-string/non-buffer data. `objectMode` cannot -be set to false once it is set. +`objectMode` can also be set by doing `stream.objectMode = true`, or by +writing any non-string/non-buffer data. `objectMode` cannot be set to +false once it is set. -This is not a `through` or `through2` stream. It doesn't -transform the data, it just passes it right through. If you want -to transform the data, extend the class, and override the -`write()` method. Once you're done transforming the data however -you want, call `super.write()` with the transform output. +This is not a `through` or `through2` stream. It doesn't transform the +data, it just passes it right through. If you want to transform the data, +extend the class, and override the `write()` method. Once you're done +transforming the data however you want, call `super.write()` with the +transform output. -For some examples of streams that extend Minipass in various -ways, check out: +For some examples of streams that extend Minipass in various ways, check +out: - [minizlib](http://npm.im/minizlib) - [fs-minipass](http://npm.im/fs-minipass) @@ -56,11 +54,11 @@ ways, check out: ## Differences from Node.js Streams -There are several things that make Minipass streams different -from (and in some ways superior to) Node.js core streams. +There are several things that make Minipass streams different from (and in +some ways superior to) Node.js core streams. -Please read these caveats if you are familiar with node-core -streams and intend to use Minipass streams in your programs. +Please read these caveats if you are familiar with node-core streams and +intend to use Minipass streams in your programs. You can avoid most of these differences entirely (for a very small performance penalty) by setting `{async: true}` in the @@ -68,35 +66,28 @@ constructor options. ### Timing -Minipass streams are designed to support synchronous use-cases. -Thus, data is emitted as soon as it is available, always. It is -buffered until read, but no longer. Another way to look at it is -that Minipass streams are exactly as synchronous as the logic -that writes into them. +Minipass streams are designed to support synchronous use-cases. Thus, data +is emitted as soon as it is available, always. It is buffered until read, +but no longer. Another way to look at it is that Minipass streams are +exactly as synchronous as the logic that writes into them. -This can be surprising if your code relies on -`PassThrough.write()` always providing data on the next tick -rather than the current one, or being able to call `resume()` and -not have the entire buffer disappear immediately. +This can be surprising if your code relies on `PassThrough.write()` always +providing data on the next tick rather than the current one, or being able +to call `resume()` and not have the entire buffer disappear immediately. -However, without this synchronicity guarantee, there would be no -way for Minipass to achieve the speeds it does, or support the -synchronous use cases that it does. Simply put, waiting takes -time. +However, without this synchronicity guarantee, there would be no way for +Minipass to achieve the speeds it does, or support the synchronous use +cases that it does. Simply put, waiting takes time. -This non-deferring approach makes Minipass streams much easier to -reason about, especially in the context of Promises and other -flow-control mechanisms. +This non-deferring approach makes Minipass streams much easier to reason +about, especially in the context of Promises and other flow-control +mechanisms. Example: ```js -// hybrid module, either works -import { Minipass } from 'minipass' -// or: -const { Minipass } = require('minipass') - -const stream = new Minipass() +const Minipass = require('minipass') +const stream = new Minipass({ async: true }) stream.on('data', () => console.log('data event')) console.log('before write') stream.write('hello') @@ -115,11 +106,7 @@ async mode either by setting `async: true` in the constructor options, or by setting `stream.async = true` later on. ```js -// hybrid module, either works -import { Minipass } from 'minipass' -// or: -const { Minipass } = require('minipass') - +const Minipass = require('minipass') const asyncStream = new Minipass({ async: true }) asyncStream.on('data', () => console.log('data event')) console.log('before write') @@ -132,10 +119,10 @@ console.log('after write') ``` Switching _out_ of async mode is unsafe, as it could cause data -corruption, and so is not enabled. Example: +corruption, and so is not enabled. Example: ```js -import { Minipass } from 'minipass' +const Minipass = require('minipass') const stream = new Minipass({ encoding: 'utf8' }) stream.on('data', chunk => console.log(chunk)) stream.async = true @@ -156,7 +143,7 @@ To avoid this problem, once set into async mode, any attempt to make the stream sync again will be ignored. ```js -const { Minipass } = require('minipass') +const Minipass = require('minipass') const stream = new Minipass({ encoding: 'utf8' }) stream.on('data', chunk => console.log(chunk)) stream.async = true @@ -174,35 +161,33 @@ console.log('after writes') ### No High/Low Water Marks -Node.js core streams will optimistically fill up a buffer, -returning `true` on all writes until the limit is hit, even if -the data has nowhere to go. Then, they will not attempt to draw -more data in until the buffer size dips below a minimum value. +Node.js core streams will optimistically fill up a buffer, returning `true` +on all writes until the limit is hit, even if the data has nowhere to go. +Then, they will not attempt to draw more data in until the buffer size dips +below a minimum value. -Minipass streams are much simpler. The `write()` method will -return `true` if the data has somewhere to go (which is to say, -given the timing guarantees, that the data is already there by -the time `write()` returns). +Minipass streams are much simpler. The `write()` method will return `true` +if the data has somewhere to go (which is to say, given the timing +guarantees, that the data is already there by the time `write()` returns). -If the data has nowhere to go, then `write()` returns false, and -the data sits in a buffer, to be drained out immediately as soon -as anyone consumes it. +If the data has nowhere to go, then `write()` returns false, and the data +sits in a buffer, to be drained out immediately as soon as anyone consumes +it. Since nothing is ever buffered unnecessarily, there is much less copying data, and less bookkeeping about buffer capacity levels. ### Hazards of Buffering (or: Why Minipass Is So Fast) -Since data written to a Minipass stream is immediately written -all the way through the pipeline, and `write()` always returns -true/false based on whether the data was fully flushed, -backpressure is communicated immediately to the upstream caller. -This minimizes buffering. +Since data written to a Minipass stream is immediately written all the way +through the pipeline, and `write()` always returns true/false based on +whether the data was fully flushed, backpressure is communicated +immediately to the upstream caller. This minimizes buffering. Consider this case: ```js -const { PassThrough } = require('stream') +const {PassThrough} = require('stream') const p1 = new PassThrough({ highWaterMark: 1024 }) const p2 = new PassThrough({ highWaterMark: 1024 }) const p3 = new PassThrough({ highWaterMark: 1024 }) @@ -225,15 +210,14 @@ p4.on('data', () => console.log('made it through')) p1.write(Buffer.alloc(2048)) // returns false ``` -Along the way, the data was buffered and deferred at each stage, -and multiple event deferrals happened, for an unblocked pipeline -where it was perfectly safe to write all the way through! +Along the way, the data was buffered and deferred at each stage, and +multiple event deferrals happened, for an unblocked pipeline where it was +perfectly safe to write all the way through! -Furthermore, setting a `highWaterMark` of `1024` might lead -someone reading the code to think an advisory maximum of 1KiB is -being set for the pipeline. However, the actual advisory -buffering level is the _sum_ of `highWaterMark` values, since -each one has its own bucket. +Furthermore, setting a `highWaterMark` of `1024` might lead someone reading +the code to think an advisory maximum of 1KiB is being set for the +pipeline. However, the actual advisory buffering level is the _sum_ of +`highWaterMark` values, since each one has its own bucket. Consider the Minipass case: @@ -258,49 +242,47 @@ m4.on('data', () => console.log('made it through')) m1.write(Buffer.alloc(2048)) // returns true ``` -It is extremely unlikely that you _don't_ want to buffer any data -written, or _ever_ buffer data that can be flushed all the way -through. Neither node-core streams nor Minipass ever fail to -buffer written data, but node-core streams do a lot of -unnecessary buffering and pausing. +It is extremely unlikely that you _don't_ want to buffer any data written, +or _ever_ buffer data that can be flushed all the way through. Neither +node-core streams nor Minipass ever fail to buffer written data, but +node-core streams do a lot of unnecessary buffering and pausing. -As always, the faster implementation is the one that does less -stuff and waits less time to do it. +As always, the faster implementation is the one that does less stuff and +waits less time to do it. ### Immediately emit `end` for empty streams (when not paused) -If a stream is not paused, and `end()` is called before writing -any data into it, then it will emit `end` immediately. +If a stream is not paused, and `end()` is called before writing any data +into it, then it will emit `end` immediately. -If you have logic that occurs on the `end` event which you don't -want to potentially happen immediately (for example, closing file -descriptors, moving on to the next entry in an archive parse -stream, etc.) then be sure to call `stream.pause()` on creation, -and then `stream.resume()` once you are ready to respond to the -`end` event. +If you have logic that occurs on the `end` event which you don't want to +potentially happen immediately (for example, closing file descriptors, +moving on to the next entry in an archive parse stream, etc.) then be sure +to call `stream.pause()` on creation, and then `stream.resume()` once you +are ready to respond to the `end` event. However, this is _usually_ not a problem because: ### Emit `end` When Asked -One hazard of immediately emitting `'end'` is that you may not -yet have had a chance to add a listener. In order to avoid this -hazard, Minipass streams safely re-emit the `'end'` event if a -new listener is added after `'end'` has been emitted. +One hazard of immediately emitting `'end'` is that you may not yet have had +a chance to add a listener. In order to avoid this hazard, Minipass +streams safely re-emit the `'end'` event if a new listener is added after +`'end'` has been emitted. -Ie, if you do `stream.on('end', someFunction)`, and the stream -has already emitted `end`, then it will call the handler right -away. (You can think of this somewhat like attaching a new -`.then(fn)` to a previously-resolved Promise.) +Ie, if you do `stream.on('end', someFunction)`, and the stream has already +emitted `end`, then it will call the handler right away. (You can think of +this somewhat like attaching a new `.then(fn)` to a previously-resolved +Promise.) -To prevent calling handlers multiple times who would not expect -multiple ends to occur, all listeners are removed from the -`'end'` event whenever it is emitted. +To prevent calling handlers multiple times who would not expect multiple +ends to occur, all listeners are removed from the `'end'` event whenever it +is emitted. ### Emit `error` When Asked The most recent error object passed to the `'error'` event is -stored on the stream. If a new `'error'` event handler is added, +stored on the stream. If a new `'error'` event handler is added, and an error was previously emitted, then the event handler will be called immediately (or on `process.nextTick` in the case of async streams). @@ -320,11 +302,10 @@ t.pipe(dest2) t.write('foo') // goes to both destinations ``` -Since Minipass streams _immediately_ process any pending data -through the pipeline when a new pipe destination is added, this -can have surprising effects, especially when a stream comes in -from some other function and may or may not have data in its -buffer. +Since Minipass streams _immediately_ process any pending data through the +pipeline when a new pipe destination is added, this can have surprising +effects, especially when a stream comes in from some other function and may +or may not have data in its buffer. ```js // WARNING! WILL LOSE DATA! @@ -334,8 +315,8 @@ src.pipe(dest1) // 'foo' chunk flows to dest1 immediately, and is gone src.pipe(dest2) // gets nothing! ``` -One solution is to create a dedicated tee-stream junction that -pipes to both locations, and then pipe to _that_ instead. +One solution is to create a dedicated tee-stream junction that pipes to +both locations, and then pipe to _that_ instead. ```js // Safe example: tee to both places @@ -347,9 +328,9 @@ tee.pipe(dest2) src.pipe(tee) // tee gets 'foo', pipes to both locations ``` -The same caveat applies to `on('data')` event listeners. The -first one added will _immediately_ receive all of the data, -leaving nothing for the second: +The same caveat applies to `on('data')` event listeners. The first one +added will _immediately_ receive all of the data, leaving nothing for the +second: ```js // WARNING! WILL LOSE DATA! @@ -373,18 +354,18 @@ src.pipe(tee) All of the hazards in this section are avoided by setting `{ async: true }` in the Minipass constructor, or by setting -`stream.async = true` afterwards. Note that this does add some +`stream.async = true` afterwards. Note that this does add some overhead, so should only be done in cases where you are willing to lose a bit of performance in order to avoid having to refactor program logic. ## USAGE -It's a stream! Use it like a stream and it'll most likely do what -you want. +It's a stream! Use it like a stream and it'll most likely do what you +want. ```js -import { Minipass } from 'minipass' +const Minipass = require('minipass') const mp = new Minipass(options) // optional: { encoding, objectMode } mp.write('foo') mp.pipe(someOtherStream) @@ -393,165 +374,145 @@ mp.end('bar') ### OPTIONS -- `encoding` How would you like the data coming _out_ of the - stream to be encoded? Accepts any values that can be passed to - `Buffer.toString()`. -- `objectMode` Emit data exactly as it comes in. This will be - flipped on by default if you write() something other than a - string or Buffer at any point. Setting `objectMode: true` will - prevent setting any encoding value. -- `async` Defaults to `false`. Set to `true` to defer data - emission until next tick. This reduces performance slightly, +* `encoding` How would you like the data coming _out_ of the stream to be + encoded? Accepts any values that can be passed to `Buffer.toString()`. +* `objectMode` Emit data exactly as it comes in. This will be flipped on + by default if you write() something other than a string or Buffer at any + point. Setting `objectMode: true` will prevent setting any encoding + value. +* `async` Defaults to `false`. Set to `true` to defer data + emission until next tick. This reduces performance slightly, but makes Minipass streams use timing behavior closer to Node - core streams. See [Timing](#timing) for more details. -- `signal` An `AbortSignal` that will cause the stream to unhook - itself from everything and become as inert as possible. Note - that providing a `signal` parameter will make `'error'` events - no longer throw if they are unhandled, but they will still be - emitted to handlers if any are attached. + core streams. See [Timing](#timing) for more details. ### API -Implements the user-facing portions of Node.js's `Readable` and -`Writable` streams. +Implements the user-facing portions of Node.js's `Readable` and `Writable` +streams. ### Methods -- `write(chunk, [encoding], [callback])` - Put data in. (Note - that, in the base Minipass class, the same data will come out.) - Returns `false` if the stream will buffer the next write, or - true if it's still in "flowing" mode. -- `end([chunk, [encoding]], [callback])` - Signal that you have - no more data to write. This will queue an `end` event to be - fired when all the data has been consumed. -- `setEncoding(encoding)` - Set the encoding for data coming of - the stream. This can only be done once. -- `pause()` - No more data for a while, please. This also - prevents `end` from being emitted for empty streams until the - stream is resumed. -- `resume()` - Resume the stream. If there's data in the buffer, - it is all discarded. Any buffered events are immediately - emitted. -- `pipe(dest)` - Send all output to the stream provided. When +* `write(chunk, [encoding], [callback])` - Put data in. (Note that, in the + base Minipass class, the same data will come out.) Returns `false` if + the stream will buffer the next write, or true if it's still in "flowing" + mode. +* `end([chunk, [encoding]], [callback])` - Signal that you have no more + data to write. This will queue an `end` event to be fired when all the + data has been consumed. +* `setEncoding(encoding)` - Set the encoding for data coming of the stream. + This can only be done once. +* `pause()` - No more data for a while, please. This also prevents `end` + from being emitted for empty streams until the stream is resumed. +* `resume()` - Resume the stream. If there's data in the buffer, it is all + discarded. Any buffered events are immediately emitted. +* `pipe(dest)` - Send all output to the stream provided. When data is emitted, it is immediately written to any and all pipe - destinations. (Or written on next tick in `async` mode.) -- `unpipe(dest)` - Stop piping to the destination stream. This is - immediate, meaning that any asynchronously queued data will + destinations. (Or written on next tick in `async` mode.) +* `unpipe(dest)` - Stop piping to the destination stream. This + is immediate, meaning that any asynchronously queued data will _not_ make it to the destination when running in `async` mode. - - `options.end` - Boolean, end the destination stream when the - source stream ends. Default `true`. - - `options.proxyErrors` - Boolean, proxy `error` events from - the source stream to the destination stream. Note that errors - are _not_ proxied after the pipeline terminates, either due - to the source emitting `'end'` or manually unpiping with - `src.unpipe(dest)`. Default `false`. -- `on(ev, fn)`, `emit(ev, fn)` - Minipass streams are - EventEmitters. Some events are given special treatment, - however. (See below under "events".) -- `promise()` - Returns a Promise that resolves when the stream - emits `end`, or rejects if the stream emits `error`. -- `collect()` - Return a Promise that resolves on `end` with an - array containing each chunk of data that was emitted, or - rejects if the stream emits `error`. Note that this consumes - the stream data. -- `concat()` - Same as `collect()`, but concatenates the data - into a single Buffer object. Will reject the returned promise - if the stream is in objectMode, or if it goes into objectMode - by the end of the data. -- `read(n)` - Consume `n` bytes of data out of the buffer. If `n` - is not provided, then consume all of it. If `n` bytes are not - available, then it returns null. **Note** consuming streams in - this way is less efficient, and can lead to unnecessary Buffer - copying. -- `destroy([er])` - Destroy the stream. If an error is provided, - then an `'error'` event is emitted. If the stream has a - `close()` method, and has not emitted a `'close'` event yet, - then `stream.close()` will be called. Any Promises returned by - `.promise()`, `.collect()` or `.concat()` will be rejected. - After being destroyed, writing to the stream will emit an - error. No more data will be emitted if the stream is destroyed, - even if it was previously buffered. + * `options.end` - Boolean, end the destination stream when + the source stream ends. Default `true`. + * `options.proxyErrors` - Boolean, proxy `error` events from + the source stream to the destination stream. Note that + errors are _not_ proxied after the pipeline terminates, + either due to the source emitting `'end'` or manually + unpiping with `src.unpipe(dest)`. Default `false`. +* `on(ev, fn)`, `emit(ev, fn)` - Minipass streams are EventEmitters. Some + events are given special treatment, however. (See below under "events".) +* `promise()` - Returns a Promise that resolves when the stream emits + `end`, or rejects if the stream emits `error`. +* `collect()` - Return a Promise that resolves on `end` with an array + containing each chunk of data that was emitted, or rejects if the stream + emits `error`. Note that this consumes the stream data. +* `concat()` - Same as `collect()`, but concatenates the data into a single + Buffer object. Will reject the returned promise if the stream is in + objectMode, or if it goes into objectMode by the end of the data. +* `read(n)` - Consume `n` bytes of data out of the buffer. If `n` is not + provided, then consume all of it. If `n` bytes are not available, then + it returns null. **Note** consuming streams in this way is less + efficient, and can lead to unnecessary Buffer copying. +* `destroy([er])` - Destroy the stream. If an error is provided, then an + `'error'` event is emitted. If the stream has a `close()` method, and + has not emitted a `'close'` event yet, then `stream.close()` will be + called. Any Promises returned by `.promise()`, `.collect()` or + `.concat()` will be rejected. After being destroyed, writing to the + stream will emit an error. No more data will be emitted if the stream is + destroyed, even if it was previously buffered. ### Properties -- `bufferLength` Read-only. Total number of bytes buffered, or in - the case of objectMode, the total number of objects. -- `encoding` The encoding that has been set. (Setting this is - equivalent to calling `setEncoding(enc)` and has the same - prohibition against setting multiple times.) -- `flowing` Read-only. Boolean indicating whether a chunk written - to the stream will be immediately emitted. -- `emittedEnd` Read-only. Boolean indicating whether the end-ish - events (ie, `end`, `prefinish`, `finish`) have been emitted. - Note that listening on any end-ish event will immediateyl - re-emit it if it has already been emitted. -- `writable` Whether the stream is writable. Default `true`. Set - to `false` when `end()` -- `readable` Whether the stream is readable. Default `true`. -- `pipes` An array of Pipe objects referencing streams that this - stream is piping into. -- `destroyed` A getter that indicates whether the stream was - destroyed. -- `paused` True if the stream has been explicitly paused, - otherwise false. -- `objectMode` Indicates whether the stream is in `objectMode`. - Once set to `true`, it cannot be set to `false`. -- `aborted` Readonly property set when the `AbortSignal` - dispatches an `abort` event. +* `bufferLength` Read-only. Total number of bytes buffered, or in the case + of objectMode, the total number of objects. +* `encoding` The encoding that has been set. (Setting this is equivalent + to calling `setEncoding(enc)` and has the same prohibition against + setting multiple times.) +* `flowing` Read-only. Boolean indicating whether a chunk written to the + stream will be immediately emitted. +* `emittedEnd` Read-only. Boolean indicating whether the end-ish events + (ie, `end`, `prefinish`, `finish`) have been emitted. Note that + listening on any end-ish event will immediateyl re-emit it if it has + already been emitted. +* `writable` Whether the stream is writable. Default `true`. Set to + `false` when `end()` +* `readable` Whether the stream is readable. Default `true`. +* `buffer` A [yallist](http://npm.im/yallist) linked list of chunks written + to the stream that have not yet been emitted. (It's probably a bad idea + to mess with this.) +* `pipes` A [yallist](http://npm.im/yallist) linked list of streams that + this stream is piping into. (It's probably a bad idea to mess with + this.) +* `destroyed` A getter that indicates whether the stream was destroyed. +* `paused` True if the stream has been explicitly paused, otherwise false. +* `objectMode` Indicates whether the stream is in `objectMode`. Once set + to `true`, it cannot be set to `false`. ### Events -- `data` Emitted when there's data to read. Argument is the data - to read. This is never emitted while not flowing. If a listener - is attached, that will resume the stream. -- `end` Emitted when there's no more data to read. This will be - emitted immediately for empty streams when `end()` is called. - If a listener is attached, and `end` was already emitted, then - it will be emitted again. All listeners are removed when `end` - is emitted. -- `prefinish` An end-ish event that follows the same logic as - `end` and is emitted in the same conditions where `end` is - emitted. Emitted after `'end'`. -- `finish` An end-ish event that follows the same logic as `end` - and is emitted in the same conditions where `end` is emitted. - Emitted after `'prefinish'`. -- `close` An indication that an underlying resource has been - released. Minipass does not emit this event, but will defer it - until after `end` has been emitted, since it throws off some - stream libraries otherwise. -- `drain` Emitted when the internal buffer empties, and it is - again suitable to `write()` into the stream. -- `readable` Emitted when data is buffered and ready to be read - by a consumer. -- `resume` Emitted when stream changes state from buffering to - flowing mode. (Ie, when `resume` is called, `pipe` is called, - or a `data` event listener is added.) +* `data` Emitted when there's data to read. Argument is the data to read. + This is never emitted while not flowing. If a listener is attached, that + will resume the stream. +* `end` Emitted when there's no more data to read. This will be emitted + immediately for empty streams when `end()` is called. If a listener is + attached, and `end` was already emitted, then it will be emitted again. + All listeners are removed when `end` is emitted. +* `prefinish` An end-ish event that follows the same logic as `end` and is + emitted in the same conditions where `end` is emitted. Emitted after + `'end'`. +* `finish` An end-ish event that follows the same logic as `end` and is + emitted in the same conditions where `end` is emitted. Emitted after + `'prefinish'`. +* `close` An indication that an underlying resource has been released. + Minipass does not emit this event, but will defer it until after `end` + has been emitted, since it throws off some stream libraries otherwise. +* `drain` Emitted when the internal buffer empties, and it is again + suitable to `write()` into the stream. +* `readable` Emitted when data is buffered and ready to be read by a + consumer. +* `resume` Emitted when stream changes state from buffering to flowing + mode. (Ie, when `resume` is called, `pipe` is called, or a `data` event + listener is added.) ### Static Methods -- `Minipass.isStream(stream)` Returns `true` if the argument is a - stream, and false otherwise. To be considered a stream, the - object must be either an instance of Minipass, or an - EventEmitter that has either a `pipe()` method, or both - `write()` and `end()` methods. (Pretty much any stream in - node-land will return `true` for this.) +* `Minipass.isStream(stream)` Returns `true` if the argument is a stream, + and false otherwise. To be considered a stream, the object must be + either an instance of Minipass, or an EventEmitter that has either a + `pipe()` method, or both `write()` and `end()` methods. (Pretty much any + stream in node-land will return `true` for this.) ## EXAMPLES -Here are some examples of things you can do with Minipass -streams. +Here are some examples of things you can do with Minipass streams. ### simple "are you done yet" promise ```js -mp.promise().then( - () => { - // stream is finished - }, - er => { - // stream emitted an error - } -) +mp.promise().then(() => { + // stream is finished +}, er => { + // stream emitted an error +}) ``` ### collecting @@ -570,9 +531,9 @@ mp.collect().then(all => { ### collecting into a single blob -This is a bit slower because it concatenates the data into one -chunk for you, but if you're going to do it yourself anyway, it's -convenient this way: +This is a bit slower because it concatenates the data into one chunk for +you, but if you're going to do it yourself anyway, it's convenient this +way: ```js mp.concat().then(onebigchunk => { @@ -583,18 +544,17 @@ mp.concat().then(onebigchunk => { ### iteration -You can iterate over streams synchronously or asynchronously in -platforms that support it. +You can iterate over streams synchronously or asynchronously in platforms +that support it. -Synchronous iteration will end when the currently available data -is consumed, even if the `end` event has not been reached. In -string and buffer mode, the data is concatenated, so unless -multiple writes are occurring in the same tick as the `read()`, -sync iteration loops will generally only have a single iteration. +Synchronous iteration will end when the currently available data is +consumed, even if the `end` event has not been reached. In string and +buffer mode, the data is concatenated, so unless multiple writes are +occurring in the same tick as the `read()`, sync iteration loops will +generally only have a single iteration. -To consume chunks in this way exactly as they have been written, -with no flattening, create the stream with the `{ objectMode: -true }` option. +To consume chunks in this way exactly as they have been written, with no +flattening, create the stream with the `{ objectMode: true }` option. ```js const mp = new Minipass({ objectMode: true }) @@ -627,7 +587,8 @@ const mp = new Minipass({ encoding: 'utf8' }) // some source of some data let i = 5 const inter = setInterval(() => { - if (i-- > 0) mp.write(Buffer.from('foo\n', 'utf8')) + if (i-- > 0) + mp.write(Buffer.from('foo\n', 'utf8')) else { mp.end() clearInterval(inter) @@ -635,7 +596,7 @@ const inter = setInterval(() => { }, 100) // consume the data with asynchronous iteration -async function consume() { +async function consume () { for await (let chunk of mp) { console.log(chunk) } @@ -650,11 +611,11 @@ consume().then(res => console.log(res)) ```js class Logger extends Minipass { - write(chunk, encoding, callback) { + write (chunk, encoding, callback) { console.log('WRITE', chunk, encoding) return super.write(chunk, encoding, callback) } - end(chunk, encoding, callback) { + end (chunk, encoding, callback) { console.log('END', chunk, encoding) return super.end(chunk, encoding, callback) } @@ -668,23 +629,21 @@ someSource.pipe(new Logger()).pipe(someDest) ```js // js classes are fun someSource - .pipe( - new (class extends Minipass { - emit(ev, ...data) { - // let's also log events, because debugging some weird thing - console.log('EMIT', ev) - return super.emit(ev, ...data) - } - write(chunk, encoding, callback) { - console.log('WRITE', chunk, encoding) - return super.write(chunk, encoding, callback) - } - end(chunk, encoding, callback) { - console.log('END', chunk, encoding) - return super.end(chunk, encoding, callback) - } - })() - ) + .pipe(new (class extends Minipass { + emit (ev, ...data) { + // let's also log events, because debugging some weird thing + console.log('EMIT', ev) + return super.emit(ev, ...data) + } + write (chunk, encoding, callback) { + console.log('WRITE', chunk, encoding) + return super.write(chunk, encoding, callback) + } + end (chunk, encoding, callback) { + console.log('END', chunk, encoding) + return super.end(chunk, encoding, callback) + } + })) .pipe(someDest) ``` @@ -692,7 +651,7 @@ someSource ```js class SlowEnd extends Minipass { - emit(ev, ...args) { + emit (ev, ...args) { if (ev === 'end') { console.log('going to end, hold on a sec') setTimeout(() => { @@ -710,7 +669,7 @@ class SlowEnd extends Minipass { ```js class NDJSONEncode extends Minipass { - write(obj, cb) { + write (obj, cb) { try { // JSON.stringify can throw, emit an error on that return super.write(JSON.stringify(obj) + '\n', 'utf8', cb) @@ -718,7 +677,7 @@ class NDJSONEncode extends Minipass { this.emit('error', er) } } - end(obj, cb) { + end (obj, cb) { if (typeof obj === 'function') { cb = obj obj = undefined @@ -745,7 +704,7 @@ class NDJSONDecode extends Minipass { typeof encoding === 'string' && encoding !== 'utf8') { chunk = Buffer.from(chunk, encoding).toString() - } else if (Buffer.isBuffer(chunk)) { + } else if (Buffer.isBuffer(chunk)) chunk = chunk.toString() } if (typeof encoding === 'function') { diff --git a/npm-packages/mac-v2.4.x/minipass/index.d.ts b/npm-packages/mac-v2.4.x/minipass/index.d.ts index 86851f9..edbef54 100644 --- a/npm-packages/mac-v2.4.x/minipass/index.d.ts +++ b/npm-packages/mac-v2.4.x/minipass/index.d.ts @@ -1,86 +1,55 @@ /// - -// Note: marking anything protected or private in the exported -// class will limit Minipass's ability to be used as the base -// for mixin classes. import { EventEmitter } from 'events' import { Stream } from 'stream' -export namespace Minipass { - export type Encoding = BufferEncoding | 'buffer' | null +export type Encoding = BufferEncoding | 'buffer' | null - export interface Writable extends EventEmitter { - end(): any - write(chunk: any, ...args: any[]): any - } - - export interface Readable extends EventEmitter { - pause(): any - resume(): any - pipe(): any - } - - export type DualIterable = Iterable & AsyncIterable - - export type ContiguousData = - | Buffer - | ArrayBufferLike - | ArrayBufferView - | string - - export type BufferOrString = Buffer | string - - export interface SharedOptions { - async?: boolean - signal?: AbortSignal - } - - export interface StringOptions extends SharedOptions { - encoding: BufferEncoding - objectMode?: boolean - } - - export interface BufferOptions extends SharedOptions { - encoding?: null | 'buffer' - objectMode?: boolean - } - - export interface ObjectModeOptions extends SharedOptions { - objectMode: true - } - - export interface PipeOptions { - end?: boolean - proxyErrors?: boolean - } - - export type Options = T extends string - ? StringOptions - : T extends Buffer - ? BufferOptions - : ObjectModeOptions +interface Writable extends EventEmitter { + end(): any + write(chunk: any, ...args: any[]): any } -export class Minipass< +interface Readable extends EventEmitter { + pause(): any + resume(): any + pipe(): any +} + +interface Pipe { + src: Minipass + dest: Writable + opts: PipeOptions +} + +type DualIterable = Iterable & AsyncIterable + +type ContiguousData = Buffer | ArrayBufferLike | ArrayBufferView | string + +type BufferOrString = Buffer | string + +export default class Minipass< RType extends any = Buffer, - WType extends any = RType extends Minipass.BufferOrString - ? Minipass.ContiguousData - : RType + WType extends any = RType extends BufferOrString ? ContiguousData : RType > extends Stream - implements Minipass.DualIterable + implements DualIterable { - static isStream(stream: any): stream is Minipass.Readable | Minipass.Writable + static isStream(stream: any): stream is Readable | Writable readonly bufferLength: number readonly flowing: boolean readonly writable: boolean readonly readable: boolean - readonly aborted: boolean readonly paused: boolean readonly emittedEnd: boolean readonly destroyed: boolean + /** + * Not technically private or readonly, but not safe to mutate. + */ + private readonly buffer: RType[] + private readonly pipes: Pipe[] + /** * Technically writable, but mutating it can change the type, * so is not safe to do in TypeScript. @@ -101,31 +70,31 @@ export class Minipass< * TypeScript does not provide many options for changing the type of * an object at run-time, which is what changing the encoding does. */ - readonly encoding: Minipass.Encoding + readonly encoding: Encoding // setEncoding(encoding: Encoding): void // Options required if not reading buffers constructor( ...args: RType extends Buffer - ? [] | [Minipass.Options] - : [Minipass.Options] + ? [] | [Options] + : [Options] ) write(chunk: WType, cb?: () => void): boolean - write(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): boolean + write(chunk: WType, encoding?: Encoding, cb?: () => void): boolean read(size?: number): RType end(cb?: () => void): this end(chunk: any, cb?: () => void): this - end(chunk: any, encoding?: Minipass.Encoding, cb?: () => void): this + end(chunk: any, encoding?: Encoding, cb?: () => void): this pause(): void resume(): void promise(): Promise collect(): Promise - concat(): RType extends Minipass.BufferOrString ? Promise : never + concat(): RType extends BufferOrString ? Promise : never destroy(er?: any): void - pipe(dest: W, opts?: Minipass.PipeOptions): W - unpipe(dest: W): void + pipe(dest: W, opts?: PipeOptions): W + unpipe(dest: W): void /** * alias for on() @@ -147,6 +116,34 @@ export class Minipass< listener: () => any ): this - [Symbol.iterator](): Generator - [Symbol.asyncIterator](): AsyncGenerator + [Symbol.iterator](): Iterator + [Symbol.asyncIterator](): AsyncIterator } + +interface StringOptions { + encoding: BufferEncoding + objectMode?: boolean + async?: boolean +} + +interface BufferOptions { + encoding?: null | 'buffer' + objectMode?: boolean + async?: boolean +} + +interface ObjectModeOptions { + objectMode: true + async?: boolean +} + +export declare interface PipeOptions { + end?: boolean + proxyErrors?: boolean +} + +export declare type Options = T extends string + ? StringOptions + : T extends Buffer + ? BufferOptions + : ObjectModeOptions diff --git a/npm-packages/mac-v2.4.x/minipass/index.js b/npm-packages/mac-v2.4.x/minipass/index.js index ed07c17..e8797aa 100644 --- a/npm-packages/mac-v2.4.x/minipass/index.js +++ b/npm-packages/mac-v2.4.x/minipass/index.js @@ -1,15 +1,11 @@ 'use strict' -const proc = - typeof process === 'object' && process - ? process - : { - stdout: null, - stderr: null, - } +const proc = typeof process === 'object' && process ? process : { + stdout: null, + stderr: null, +} const EE = require('events') const Stream = require('stream') -const stringdecoder = require('string_decoder') -const SD = stringdecoder.StringDecoder +const SD = require('string_decoder').StringDecoder const EOF = Symbol('EOF') const MAYBE_EMIT_END = Symbol('maybeEmitEnd') @@ -25,91 +21,89 @@ const DECODER = Symbol('decoder') const FLOWING = Symbol('flowing') const PAUSED = Symbol('paused') const RESUME = Symbol('resume') -const BUFFER = Symbol('buffer') -const PIPES = Symbol('pipes') const BUFFERLENGTH = Symbol('bufferLength') const BUFFERPUSH = Symbol('bufferPush') const BUFFERSHIFT = Symbol('bufferShift') const OBJECTMODE = Symbol('objectMode') -// internal event when stream is destroyed const DESTROYED = Symbol('destroyed') -// internal event when stream has an error -const ERROR = Symbol('error') const EMITDATA = Symbol('emitData') const EMITEND = Symbol('emitEnd') const EMITEND2 = Symbol('emitEnd2') const ASYNC = Symbol('async') -const ABORT = Symbol('abort') -const ABORTED = Symbol('aborted') -const SIGNAL = Symbol('signal') const defer = fn => Promise.resolve().then(fn) // TODO remove when Node v8 support drops -const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' -const ASYNCITERATOR = - (doIter && Symbol.asyncIterator) || Symbol('asyncIterator not implemented') -const ITERATOR = - (doIter && Symbol.iterator) || Symbol('iterator not implemented') +const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' +const ASYNCITERATOR = doIter && Symbol.asyncIterator + || Symbol('asyncIterator not implemented') +const ITERATOR = doIter && Symbol.iterator + || Symbol('iterator not implemented') // events that mean 'the stream is over' // these are treated specially, and re-emitted // if they are listened for after emitting. -const isEndish = ev => ev === 'end' || ev === 'finish' || ev === 'prefinish' +const isEndish = ev => + ev === 'end' || + ev === 'finish' || + ev === 'prefinish' -const isArrayBuffer = b => - b instanceof ArrayBuffer || - (typeof b === 'object' && - b.constructor && - b.constructor.name === 'ArrayBuffer' && - b.byteLength >= 0) +const isArrayBuffer = b => b instanceof ArrayBuffer || + typeof b === 'object' && + b.constructor && + b.constructor.name === 'ArrayBuffer' && + b.byteLength >= 0 const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b) class Pipe { - constructor(src, dest, opts) { + constructor (src, dest, opts) { this.src = src this.dest = dest this.opts = opts this.ondrain = () => src[RESUME]() dest.on('drain', this.ondrain) } - unpipe() { + unpipe () { this.dest.removeListener('drain', this.ondrain) } // istanbul ignore next - only here for the prototype - proxyErrors() {} - end() { + proxyErrors () {} + end () { this.unpipe() - if (this.opts.end) this.dest.end() + if (this.opts.end) + this.dest.end() } } class PipeProxyErrors extends Pipe { - unpipe() { + unpipe () { this.src.removeListener('error', this.proxyErrors) super.unpipe() } - constructor(src, dest, opts) { + constructor (src, dest, opts) { super(src, dest, opts) this.proxyErrors = er => dest.emit('error', er) src.on('error', this.proxyErrors) } } -class Minipass extends Stream { - constructor(options) { +module.exports = class Minipass extends Stream { + constructor (options) { super() this[FLOWING] = false // whether we're explicitly paused this[PAUSED] = false - this[PIPES] = [] - this[BUFFER] = [] - this[OBJECTMODE] = (options && options.objectMode) || false - if (this[OBJECTMODE]) this[ENCODING] = null - else this[ENCODING] = (options && options.encoding) || null - if (this[ENCODING] === 'buffer') this[ENCODING] = null - this[ASYNC] = (options && !!options.async) || false + this.pipes = [] + this.buffer = [] + this[OBJECTMODE] = options && options.objectMode || false + if (this[OBJECTMODE]) + this[ENCODING] = null + else + this[ENCODING] = options && options.encoding || null + if (this[ENCODING] === 'buffer') + this[ENCODING] = null + this[ASYNC] = options && !!options.async || false this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null this[EOF] = false this[EMITTED_END] = false @@ -120,96 +114,55 @@ class Minipass extends Stream { this.readable = true this[BUFFERLENGTH] = 0 this[DESTROYED] = false - if (options && options.debugExposeBuffer === true) { - Object.defineProperty(this, 'buffer', { get: () => this[BUFFER] }) - } - if (options && options.debugExposePipes === true) { - Object.defineProperty(this, 'pipes', { get: () => this[PIPES] }) - } - this[SIGNAL] = options && options.signal - this[ABORTED] = false - if (this[SIGNAL]) { - this[SIGNAL].addEventListener('abort', () => this[ABORT]()) - if (this[SIGNAL].aborted) { - this[ABORT]() - } - } } - get bufferLength() { - return this[BUFFERLENGTH] - } + get bufferLength () { return this[BUFFERLENGTH] } - get encoding() { - return this[ENCODING] - } - set encoding(enc) { - if (this[OBJECTMODE]) throw new Error('cannot set encoding in objectMode') + get encoding () { return this[ENCODING] } + set encoding (enc) { + if (this[OBJECTMODE]) + throw new Error('cannot set encoding in objectMode') - if ( - this[ENCODING] && - enc !== this[ENCODING] && - ((this[DECODER] && this[DECODER].lastNeed) || this[BUFFERLENGTH]) - ) + if (this[ENCODING] && enc !== this[ENCODING] && + (this[DECODER] && this[DECODER].lastNeed || this[BUFFERLENGTH])) throw new Error('cannot change encoding') if (this[ENCODING] !== enc) { this[DECODER] = enc ? new SD(enc) : null - if (this[BUFFER].length) - this[BUFFER] = this[BUFFER].map(chunk => this[DECODER].write(chunk)) + if (this.buffer.length) + this.buffer = this.buffer.map(chunk => this[DECODER].write(chunk)) } this[ENCODING] = enc } - setEncoding(enc) { + setEncoding (enc) { this.encoding = enc } - get objectMode() { - return this[OBJECTMODE] - } - set objectMode(om) { - this[OBJECTMODE] = this[OBJECTMODE] || !!om - } + get objectMode () { return this[OBJECTMODE] } + set objectMode (om) { this[OBJECTMODE] = this[OBJECTMODE] || !!om } - get ['async']() { - return this[ASYNC] - } - set ['async'](a) { - this[ASYNC] = this[ASYNC] || !!a - } + get ['async'] () { return this[ASYNC] } + set ['async'] (a) { this[ASYNC] = this[ASYNC] || !!a } - // drop everything and get out of the flow completely - [ABORT]() { - this[ABORTED] = true - this.emit('abort', this[SIGNAL].reason) - this.destroy(this[SIGNAL].reason) - } - - get aborted() { - return this[ABORTED] - } - set aborted(_) {} - - write(chunk, encoding, cb) { - if (this[ABORTED]) return false - if (this[EOF]) throw new Error('write after end') + write (chunk, encoding, cb) { + if (this[EOF]) + throw new Error('write after end') if (this[DESTROYED]) { - this.emit( - 'error', - Object.assign( - new Error('Cannot call write after a stream was destroyed'), - { code: 'ERR_STREAM_DESTROYED' } - ) - ) + this.emit('error', Object.assign( + new Error('Cannot call write after a stream was destroyed'), + { code: 'ERR_STREAM_DESTROYED' } + )) return true } - if (typeof encoding === 'function') (cb = encoding), (encoding = 'utf8') + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' - if (!encoding) encoding = 'utf8' + if (!encoding) + encoding = 'utf8' const fn = this[ASYNC] ? defer : f => f() @@ -220,7 +173,8 @@ class Minipass extends Stream { if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { if (isArrayBufferView(chunk)) chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) - else if (isArrayBuffer(chunk)) chunk = Buffer.from(chunk) + else if (isArrayBuffer(chunk)) + chunk = Buffer.from(chunk) else if (typeof chunk !== 'string') // use the setter so we throw if we have encoding set this.objectMode = true @@ -230,14 +184,19 @@ class Minipass extends Stream { // this yields better performance, fewer checks later. if (this[OBJECTMODE]) { /* istanbul ignore if - maybe impossible? */ - if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true) + if (this.flowing && this[BUFFERLENGTH] !== 0) + this[FLUSH](true) - if (this.flowing) this.emit('data', chunk) - else this[BUFFERPUSH](chunk) + if (this.flowing) + this.emit('data', chunk) + else + this[BUFFERPUSH](chunk) - if (this[BUFFERLENGTH] !== 0) this.emit('readable') + if (this[BUFFERLENGTH] !== 0) + this.emit('readable') - if (cb) fn(cb) + if (cb) + fn(cb) return this.flowing } @@ -245,18 +204,18 @@ class Minipass extends Stream { // at this point the chunk is a buffer or string // don't buffer it up or send it to the decoder if (!chunk.length) { - if (this[BUFFERLENGTH] !== 0) this.emit('readable') - if (cb) fn(cb) + if (this[BUFFERLENGTH] !== 0) + this.emit('readable') + if (cb) + fn(cb) return this.flowing } // fast-path writing strings of same encoding to a stream with // an empty buffer, skipping the buffer/decoder dance - if ( - typeof chunk === 'string' && - // unless it is a string already ready for us to use - !(encoding === this[ENCODING] && !this[DECODER].lastNeed) - ) { + if (typeof chunk === 'string' && + // unless it is a string already ready for us to use + !(encoding === this[ENCODING] && !this[DECODER].lastNeed)) { chunk = Buffer.from(chunk, encoding) } @@ -264,58 +223,73 @@ class Minipass extends Stream { chunk = this[DECODER].write(chunk) // Note: flushing CAN potentially switch us into not-flowing mode - if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true) + if (this.flowing && this[BUFFERLENGTH] !== 0) + this[FLUSH](true) - if (this.flowing) this.emit('data', chunk) - else this[BUFFERPUSH](chunk) + if (this.flowing) + this.emit('data', chunk) + else + this[BUFFERPUSH](chunk) - if (this[BUFFERLENGTH] !== 0) this.emit('readable') + if (this[BUFFERLENGTH] !== 0) + this.emit('readable') - if (cb) fn(cb) + if (cb) + fn(cb) return this.flowing } - read(n) { - if (this[DESTROYED]) return null + read (n) { + if (this[DESTROYED]) + return null if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) { this[MAYBE_EMIT_END]() return null } - if (this[OBJECTMODE]) n = null + if (this[OBJECTMODE]) + n = null - if (this[BUFFER].length > 1 && !this[OBJECTMODE]) { - if (this.encoding) this[BUFFER] = [this[BUFFER].join('')] - else this[BUFFER] = [Buffer.concat(this[BUFFER], this[BUFFERLENGTH])] + if (this.buffer.length > 1 && !this[OBJECTMODE]) { + if (this.encoding) + this.buffer = [this.buffer.join('')] + else + this.buffer = [Buffer.concat(this.buffer, this[BUFFERLENGTH])] } - const ret = this[READ](n || null, this[BUFFER][0]) + const ret = this[READ](n || null, this.buffer[0]) this[MAYBE_EMIT_END]() return ret } - [READ](n, chunk) { - if (n === chunk.length || n === null) this[BUFFERSHIFT]() + [READ] (n, chunk) { + if (n === chunk.length || n === null) + this[BUFFERSHIFT]() else { - this[BUFFER][0] = chunk.slice(n) + this.buffer[0] = chunk.slice(n) chunk = chunk.slice(0, n) this[BUFFERLENGTH] -= n } this.emit('data', chunk) - if (!this[BUFFER].length && !this[EOF]) this.emit('drain') + if (!this.buffer.length && !this[EOF]) + this.emit('drain') return chunk } - end(chunk, encoding, cb) { - if (typeof chunk === 'function') (cb = chunk), (chunk = null) - if (typeof encoding === 'function') (cb = encoding), (encoding = 'utf8') - if (chunk) this.write(chunk, encoding) - if (cb) this.once('end', cb) + end (chunk, encoding, cb) { + if (typeof chunk === 'function') + cb = chunk, chunk = null + if (typeof encoding === 'function') + cb = encoding, encoding = 'utf8' + if (chunk) + this.write(chunk, encoding) + if (cb) + this.once('end', cb) this[EOF] = true this.writable = false @@ -323,165 +297,176 @@ class Minipass extends Stream { // even if we're not reading. // we'll re-emit if a new 'end' listener is added anyway. // This makes MP more suitable to write-only use cases. - if (this.flowing || !this[PAUSED]) this[MAYBE_EMIT_END]() + if (this.flowing || !this[PAUSED]) + this[MAYBE_EMIT_END]() return this } // don't let the internal resume be overwritten - [RESUME]() { - if (this[DESTROYED]) return + [RESUME] () { + if (this[DESTROYED]) + return this[PAUSED] = false this[FLOWING] = true this.emit('resume') - if (this[BUFFER].length) this[FLUSH]() - else if (this[EOF]) this[MAYBE_EMIT_END]() - else this.emit('drain') + if (this.buffer.length) + this[FLUSH]() + else if (this[EOF]) + this[MAYBE_EMIT_END]() + else + this.emit('drain') } - resume() { + resume () { return this[RESUME]() } - pause() { + pause () { this[FLOWING] = false this[PAUSED] = true } - get destroyed() { + get destroyed () { return this[DESTROYED] } - get flowing() { + get flowing () { return this[FLOWING] } - get paused() { + get paused () { return this[PAUSED] } - [BUFFERPUSH](chunk) { - if (this[OBJECTMODE]) this[BUFFERLENGTH] += 1 - else this[BUFFERLENGTH] += chunk.length - this[BUFFER].push(chunk) + [BUFFERPUSH] (chunk) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] += 1 + else + this[BUFFERLENGTH] += chunk.length + this.buffer.push(chunk) } - [BUFFERSHIFT]() { - if (this[OBJECTMODE]) this[BUFFERLENGTH] -= 1 - else this[BUFFERLENGTH] -= this[BUFFER][0].length - return this[BUFFER].shift() + [BUFFERSHIFT] () { + if (this.buffer.length) { + if (this[OBJECTMODE]) + this[BUFFERLENGTH] -= 1 + else + this[BUFFERLENGTH] -= this.buffer[0].length + } + return this.buffer.shift() } - [FLUSH](noDrain) { - do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length) + [FLUSH] (noDrain) { + do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]())) - if (!noDrain && !this[BUFFER].length && !this[EOF]) this.emit('drain') + if (!noDrain && !this.buffer.length && !this[EOF]) + this.emit('drain') } - [FLUSHCHUNK](chunk) { - this.emit('data', chunk) - return this.flowing + [FLUSHCHUNK] (chunk) { + return chunk ? (this.emit('data', chunk), this.flowing) : false } - pipe(dest, opts) { - if (this[DESTROYED]) return + pipe (dest, opts) { + if (this[DESTROYED]) + return const ended = this[EMITTED_END] opts = opts || {} - if (dest === proc.stdout || dest === proc.stderr) opts.end = false - else opts.end = opts.end !== false + if (dest === proc.stdout || dest === proc.stderr) + opts.end = false + else + opts.end = opts.end !== false opts.proxyErrors = !!opts.proxyErrors // piping an ended stream ends immediately if (ended) { - if (opts.end) dest.end() + if (opts.end) + dest.end() } else { - this[PIPES].push( - !opts.proxyErrors - ? new Pipe(this, dest, opts) - : new PipeProxyErrors(this, dest, opts) - ) - if (this[ASYNC]) defer(() => this[RESUME]()) - else this[RESUME]() + this.pipes.push(!opts.proxyErrors ? new Pipe(this, dest, opts) + : new PipeProxyErrors(this, dest, opts)) + if (this[ASYNC]) + defer(() => this[RESUME]()) + else + this[RESUME]() } return dest } - unpipe(dest) { - const p = this[PIPES].find(p => p.dest === dest) + unpipe (dest) { + const p = this.pipes.find(p => p.dest === dest) if (p) { - this[PIPES].splice(this[PIPES].indexOf(p), 1) + this.pipes.splice(this.pipes.indexOf(p), 1) p.unpipe() } } - addListener(ev, fn) { + addListener (ev, fn) { return this.on(ev, fn) } - on(ev, fn) { + on (ev, fn) { const ret = super.on(ev, fn) - if (ev === 'data' && !this[PIPES].length && !this.flowing) this[RESUME]() + if (ev === 'data' && !this.pipes.length && !this.flowing) + this[RESUME]() else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) super.emit('readable') else if (isEndish(ev) && this[EMITTED_END]) { super.emit(ev) this.removeAllListeners(ev) } else if (ev === 'error' && this[EMITTED_ERROR]) { - if (this[ASYNC]) defer(() => fn.call(this, this[EMITTED_ERROR])) - else fn.call(this, this[EMITTED_ERROR]) + if (this[ASYNC]) + defer(() => fn.call(this, this[EMITTED_ERROR])) + else + fn.call(this, this[EMITTED_ERROR]) } return ret } - get emittedEnd() { + get emittedEnd () { return this[EMITTED_END] } - [MAYBE_EMIT_END]() { - if ( - !this[EMITTING_END] && - !this[EMITTED_END] && - !this[DESTROYED] && - this[BUFFER].length === 0 && - this[EOF] - ) { + [MAYBE_EMIT_END] () { + if (!this[EMITTING_END] && + !this[EMITTED_END] && + !this[DESTROYED] && + this.buffer.length === 0 && + this[EOF]) { this[EMITTING_END] = true this.emit('end') this.emit('prefinish') this.emit('finish') - if (this[CLOSED]) this.emit('close') + if (this[CLOSED]) + this.emit('close') this[EMITTING_END] = false } } - emit(ev, data, ...extra) { + emit (ev, data, ...extra) { // error and close are only events allowed after calling destroy() if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED]) return else if (ev === 'data') { - return !this[OBJECTMODE] && !data - ? false - : this[ASYNC] - ? defer(() => this[EMITDATA](data)) + return !data ? false + : this[ASYNC] ? defer(() => this[EMITDATA](data)) : this[EMITDATA](data) } else if (ev === 'end') { return this[EMITEND]() } else if (ev === 'close') { this[CLOSED] = true // don't emit close before 'end' and 'finish' - if (!this[EMITTED_END] && !this[DESTROYED]) return + if (!this[EMITTED_END] && !this[DESTROYED]) + return const ret = super.emit('close') this.removeAllListeners('close') return ret } else if (ev === 'error') { this[EMITTED_ERROR] = data - super.emit(ERROR, data) - const ret = - !this[SIGNAL] || this.listeners('error').length - ? super.emit('error', data) - : false + const ret = super.emit('error', data) this[MAYBE_EMIT_END]() return ret } else if (ev === 'resume') { @@ -500,36 +485,40 @@ class Minipass extends Stream { return ret } - [EMITDATA](data) { - for (const p of this[PIPES]) { - if (p.dest.write(data) === false) this.pause() + [EMITDATA] (data) { + for (const p of this.pipes) { + if (p.dest.write(data) === false) + this.pause() } const ret = super.emit('data', data) this[MAYBE_EMIT_END]() return ret } - [EMITEND]() { - if (this[EMITTED_END]) return + [EMITEND] () { + if (this[EMITTED_END]) + return this[EMITTED_END] = true this.readable = false - if (this[ASYNC]) defer(() => this[EMITEND2]()) - else this[EMITEND2]() + if (this[ASYNC]) + defer(() => this[EMITEND2]()) + else + this[EMITEND2]() } - [EMITEND2]() { + [EMITEND2] () { if (this[DECODER]) { const data = this[DECODER].end() if (data) { - for (const p of this[PIPES]) { + for (const p of this.pipes) { p.dest.write(data) } super.emit('data', data) } } - for (const p of this[PIPES]) { + for (const p of this.pipes) { p.end() } const ret = super.emit('end') @@ -538,34 +527,33 @@ class Minipass extends Stream { } // const all = await stream.collect() - collect() { + collect () { const buf = [] - if (!this[OBJECTMODE]) buf.dataLength = 0 + if (!this[OBJECTMODE]) + buf.dataLength = 0 // set the promise first, in case an error is raised // by triggering the flow here. const p = this.promise() this.on('data', c => { buf.push(c) - if (!this[OBJECTMODE]) buf.dataLength += c.length + if (!this[OBJECTMODE]) + buf.dataLength += c.length }) return p.then(() => buf) } // const data = await stream.concat() - concat() { + concat () { return this[OBJECTMODE] ? Promise.reject(new Error('cannot concat in objectMode')) : this.collect().then(buf => this[OBJECTMODE] ? Promise.reject(new Error('cannot concat in objectMode')) - : this[ENCODING] - ? buf.join('') - : Buffer.concat(buf, buf.dataLength) - ) + : this[ENCODING] ? buf.join('') : Buffer.concat(buf, buf.dataLength)) } // stream.promise().then(() => done, er => emitted error) - promise() { + promise () { return new Promise((resolve, reject) => { this.on(DESTROYED, () => reject(new Error('stream destroyed'))) this.on('error', er => reject(er)) @@ -574,41 +562,31 @@ class Minipass extends Stream { } // for await (let chunk of stream) - [ASYNCITERATOR]() { - let stopped = false - const stop = () => { - this.pause() - stopped = true - return Promise.resolve({ done: true }) - } + [ASYNCITERATOR] () { const next = () => { - if (stopped) return stop() const res = this.read() - if (res !== null) return Promise.resolve({ done: false, value: res }) + if (res !== null) + return Promise.resolve({ done: false, value: res }) - if (this[EOF]) return stop() + if (this[EOF]) + return Promise.resolve({ done: true }) let resolve = null let reject = null const onerr = er => { this.removeListener('data', ondata) this.removeListener('end', onend) - this.removeListener(DESTROYED, ondestroy) - stop() reject(er) } const ondata = value => { this.removeListener('error', onerr) this.removeListener('end', onend) - this.removeListener(DESTROYED, ondestroy) this.pause() resolve({ value: value, done: !!this[EOF] }) } const onend = () => { this.removeListener('error', onerr) this.removeListener('data', ondata) - this.removeListener(DESTROYED, ondestroy) - stop() resolve({ done: true }) } const ondestroy = () => onerr(new Error('stream destroyed')) @@ -622,81 +600,50 @@ class Minipass extends Stream { }) } - return { - next, - throw: stop, - return: stop, - [ASYNCITERATOR]() { - return this - }, - } + return { next } } // for (let chunk of stream) - [ITERATOR]() { - let stopped = false - const stop = () => { - this.pause() - this.removeListener(ERROR, stop) - this.removeListener(DESTROYED, stop) - this.removeListener('end', stop) - stopped = true - return { done: true } - } - + [ITERATOR] () { const next = () => { - if (stopped) return stop() const value = this.read() - return value === null ? stop() : { value } - } - this.once('end', stop) - this.once(ERROR, stop) - this.once(DESTROYED, stop) - - return { - next, - throw: stop, - return: stop, - [ITERATOR]() { - return this - }, + const done = value === null + return { value, done } } + return { next } } - destroy(er) { + destroy (er) { if (this[DESTROYED]) { - if (er) this.emit('error', er) - else this.emit(DESTROYED) + if (er) + this.emit('error', er) + else + this.emit(DESTROYED) return this } this[DESTROYED] = true // throw away all buffered data, it's never coming out - this[BUFFER].length = 0 + this.buffer.length = 0 this[BUFFERLENGTH] = 0 - if (typeof this.close === 'function' && !this[CLOSED]) this.close() + if (typeof this.close === 'function' && !this[CLOSED]) + this.close() - if (er) this.emit('error', er) - // if no error to emit, still reject pending promises - else this.emit(DESTROYED) + if (er) + this.emit('error', er) + else // if no error to emit, still reject pending promises + this.emit(DESTROYED) return this } - static isStream(s) { - return ( - !!s && - (s instanceof Minipass || - s instanceof Stream || - (s instanceof EE && - // readable - (typeof s.pipe === 'function' || - // writable - (typeof s.write === 'function' && typeof s.end === 'function')))) - ) + static isStream (s) { + return !!s && (s instanceof Minipass || s instanceof Stream || + s instanceof EE && ( + typeof s.pipe === 'function' || // readable + (typeof s.write === 'function' && typeof s.end === 'function') // writable + )) } } - -exports.Minipass = Minipass diff --git a/npm-packages/mac-v2.4.x/minipass/index.mjs b/npm-packages/mac-v2.4.x/minipass/index.mjs deleted file mode 100644 index 6ef6cd8..0000000 --- a/npm-packages/mac-v2.4.x/minipass/index.mjs +++ /dev/null @@ -1,702 +0,0 @@ -'use strict' -const proc = - typeof process === 'object' && process - ? process - : { - stdout: null, - stderr: null, - } -import EE from 'events' -import Stream from 'stream' -import stringdecoder from 'string_decoder' -const SD = stringdecoder.StringDecoder - -const EOF = Symbol('EOF') -const MAYBE_EMIT_END = Symbol('maybeEmitEnd') -const EMITTED_END = Symbol('emittedEnd') -const EMITTING_END = Symbol('emittingEnd') -const EMITTED_ERROR = Symbol('emittedError') -const CLOSED = Symbol('closed') -const READ = Symbol('read') -const FLUSH = Symbol('flush') -const FLUSHCHUNK = Symbol('flushChunk') -const ENCODING = Symbol('encoding') -const DECODER = Symbol('decoder') -const FLOWING = Symbol('flowing') -const PAUSED = Symbol('paused') -const RESUME = Symbol('resume') -const BUFFER = Symbol('buffer') -const PIPES = Symbol('pipes') -const BUFFERLENGTH = Symbol('bufferLength') -const BUFFERPUSH = Symbol('bufferPush') -const BUFFERSHIFT = Symbol('bufferShift') -const OBJECTMODE = Symbol('objectMode') -// internal event when stream is destroyed -const DESTROYED = Symbol('destroyed') -// internal event when stream has an error -const ERROR = Symbol('error') -const EMITDATA = Symbol('emitData') -const EMITEND = Symbol('emitEnd') -const EMITEND2 = Symbol('emitEnd2') -const ASYNC = Symbol('async') -const ABORT = Symbol('abort') -const ABORTED = Symbol('aborted') -const SIGNAL = Symbol('signal') - -const defer = fn => Promise.resolve().then(fn) - -// TODO remove when Node v8 support drops -const doIter = global._MP_NO_ITERATOR_SYMBOLS_ !== '1' -const ASYNCITERATOR = - (doIter && Symbol.asyncIterator) || Symbol('asyncIterator not implemented') -const ITERATOR = - (doIter && Symbol.iterator) || Symbol('iterator not implemented') - -// events that mean 'the stream is over' -// these are treated specially, and re-emitted -// if they are listened for after emitting. -const isEndish = ev => ev === 'end' || ev === 'finish' || ev === 'prefinish' - -const isArrayBuffer = b => - b instanceof ArrayBuffer || - (typeof b === 'object' && - b.constructor && - b.constructor.name === 'ArrayBuffer' && - b.byteLength >= 0) - -const isArrayBufferView = b => !Buffer.isBuffer(b) && ArrayBuffer.isView(b) - -class Pipe { - constructor(src, dest, opts) { - this.src = src - this.dest = dest - this.opts = opts - this.ondrain = () => src[RESUME]() - dest.on('drain', this.ondrain) - } - unpipe() { - this.dest.removeListener('drain', this.ondrain) - } - // istanbul ignore next - only here for the prototype - proxyErrors() {} - end() { - this.unpipe() - if (this.opts.end) this.dest.end() - } -} - -class PipeProxyErrors extends Pipe { - unpipe() { - this.src.removeListener('error', this.proxyErrors) - super.unpipe() - } - constructor(src, dest, opts) { - super(src, dest, opts) - this.proxyErrors = er => dest.emit('error', er) - src.on('error', this.proxyErrors) - } -} - -export class Minipass extends Stream { - constructor(options) { - super() - this[FLOWING] = false - // whether we're explicitly paused - this[PAUSED] = false - this[PIPES] = [] - this[BUFFER] = [] - this[OBJECTMODE] = (options && options.objectMode) || false - if (this[OBJECTMODE]) this[ENCODING] = null - else this[ENCODING] = (options && options.encoding) || null - if (this[ENCODING] === 'buffer') this[ENCODING] = null - this[ASYNC] = (options && !!options.async) || false - this[DECODER] = this[ENCODING] ? new SD(this[ENCODING]) : null - this[EOF] = false - this[EMITTED_END] = false - this[EMITTING_END] = false - this[CLOSED] = false - this[EMITTED_ERROR] = null - this.writable = true - this.readable = true - this[BUFFERLENGTH] = 0 - this[DESTROYED] = false - if (options && options.debugExposeBuffer === true) { - Object.defineProperty(this, 'buffer', { get: () => this[BUFFER] }) - } - if (options && options.debugExposePipes === true) { - Object.defineProperty(this, 'pipes', { get: () => this[PIPES] }) - } - this[SIGNAL] = options && options.signal - this[ABORTED] = false - if (this[SIGNAL]) { - this[SIGNAL].addEventListener('abort', () => this[ABORT]()) - if (this[SIGNAL].aborted) { - this[ABORT]() - } - } - } - - get bufferLength() { - return this[BUFFERLENGTH] - } - - get encoding() { - return this[ENCODING] - } - set encoding(enc) { - if (this[OBJECTMODE]) throw new Error('cannot set encoding in objectMode') - - if ( - this[ENCODING] && - enc !== this[ENCODING] && - ((this[DECODER] && this[DECODER].lastNeed) || this[BUFFERLENGTH]) - ) - throw new Error('cannot change encoding') - - if (this[ENCODING] !== enc) { - this[DECODER] = enc ? new SD(enc) : null - if (this[BUFFER].length) - this[BUFFER] = this[BUFFER].map(chunk => this[DECODER].write(chunk)) - } - - this[ENCODING] = enc - } - - setEncoding(enc) { - this.encoding = enc - } - - get objectMode() { - return this[OBJECTMODE] - } - set objectMode(om) { - this[OBJECTMODE] = this[OBJECTMODE] || !!om - } - - get ['async']() { - return this[ASYNC] - } - set ['async'](a) { - this[ASYNC] = this[ASYNC] || !!a - } - - // drop everything and get out of the flow completely - [ABORT]() { - this[ABORTED] = true - this.emit('abort', this[SIGNAL].reason) - this.destroy(this[SIGNAL].reason) - } - - get aborted() { - return this[ABORTED] - } - set aborted(_) {} - - write(chunk, encoding, cb) { - if (this[ABORTED]) return false - if (this[EOF]) throw new Error('write after end') - - if (this[DESTROYED]) { - this.emit( - 'error', - Object.assign( - new Error('Cannot call write after a stream was destroyed'), - { code: 'ERR_STREAM_DESTROYED' } - ) - ) - return true - } - - if (typeof encoding === 'function') (cb = encoding), (encoding = 'utf8') - - if (!encoding) encoding = 'utf8' - - const fn = this[ASYNC] ? defer : f => f() - - // convert array buffers and typed array views into buffers - // at some point in the future, we may want to do the opposite! - // leave strings and buffers as-is - // anything else switches us into object mode - if (!this[OBJECTMODE] && !Buffer.isBuffer(chunk)) { - if (isArrayBufferView(chunk)) - chunk = Buffer.from(chunk.buffer, chunk.byteOffset, chunk.byteLength) - else if (isArrayBuffer(chunk)) chunk = Buffer.from(chunk) - else if (typeof chunk !== 'string') - // use the setter so we throw if we have encoding set - this.objectMode = true - } - - // handle object mode up front, since it's simpler - // this yields better performance, fewer checks later. - if (this[OBJECTMODE]) { - /* istanbul ignore if - maybe impossible? */ - if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true) - - if (this.flowing) this.emit('data', chunk) - else this[BUFFERPUSH](chunk) - - if (this[BUFFERLENGTH] !== 0) this.emit('readable') - - if (cb) fn(cb) - - return this.flowing - } - - // at this point the chunk is a buffer or string - // don't buffer it up or send it to the decoder - if (!chunk.length) { - if (this[BUFFERLENGTH] !== 0) this.emit('readable') - if (cb) fn(cb) - return this.flowing - } - - // fast-path writing strings of same encoding to a stream with - // an empty buffer, skipping the buffer/decoder dance - if ( - typeof chunk === 'string' && - // unless it is a string already ready for us to use - !(encoding === this[ENCODING] && !this[DECODER].lastNeed) - ) { - chunk = Buffer.from(chunk, encoding) - } - - if (Buffer.isBuffer(chunk) && this[ENCODING]) - chunk = this[DECODER].write(chunk) - - // Note: flushing CAN potentially switch us into not-flowing mode - if (this.flowing && this[BUFFERLENGTH] !== 0) this[FLUSH](true) - - if (this.flowing) this.emit('data', chunk) - else this[BUFFERPUSH](chunk) - - if (this[BUFFERLENGTH] !== 0) this.emit('readable') - - if (cb) fn(cb) - - return this.flowing - } - - read(n) { - if (this[DESTROYED]) return null - - if (this[BUFFERLENGTH] === 0 || n === 0 || n > this[BUFFERLENGTH]) { - this[MAYBE_EMIT_END]() - return null - } - - if (this[OBJECTMODE]) n = null - - if (this[BUFFER].length > 1 && !this[OBJECTMODE]) { - if (this.encoding) this[BUFFER] = [this[BUFFER].join('')] - else this[BUFFER] = [Buffer.concat(this[BUFFER], this[BUFFERLENGTH])] - } - - const ret = this[READ](n || null, this[BUFFER][0]) - this[MAYBE_EMIT_END]() - return ret - } - - [READ](n, chunk) { - if (n === chunk.length || n === null) this[BUFFERSHIFT]() - else { - this[BUFFER][0] = chunk.slice(n) - chunk = chunk.slice(0, n) - this[BUFFERLENGTH] -= n - } - - this.emit('data', chunk) - - if (!this[BUFFER].length && !this[EOF]) this.emit('drain') - - return chunk - } - - end(chunk, encoding, cb) { - if (typeof chunk === 'function') (cb = chunk), (chunk = null) - if (typeof encoding === 'function') (cb = encoding), (encoding = 'utf8') - if (chunk) this.write(chunk, encoding) - if (cb) this.once('end', cb) - this[EOF] = true - this.writable = false - - // if we haven't written anything, then go ahead and emit, - // even if we're not reading. - // we'll re-emit if a new 'end' listener is added anyway. - // This makes MP more suitable to write-only use cases. - if (this.flowing || !this[PAUSED]) this[MAYBE_EMIT_END]() - return this - } - - // don't let the internal resume be overwritten - [RESUME]() { - if (this[DESTROYED]) return - - this[PAUSED] = false - this[FLOWING] = true - this.emit('resume') - if (this[BUFFER].length) this[FLUSH]() - else if (this[EOF]) this[MAYBE_EMIT_END]() - else this.emit('drain') - } - - resume() { - return this[RESUME]() - } - - pause() { - this[FLOWING] = false - this[PAUSED] = true - } - - get destroyed() { - return this[DESTROYED] - } - - get flowing() { - return this[FLOWING] - } - - get paused() { - return this[PAUSED] - } - - [BUFFERPUSH](chunk) { - if (this[OBJECTMODE]) this[BUFFERLENGTH] += 1 - else this[BUFFERLENGTH] += chunk.length - this[BUFFER].push(chunk) - } - - [BUFFERSHIFT]() { - if (this[OBJECTMODE]) this[BUFFERLENGTH] -= 1 - else this[BUFFERLENGTH] -= this[BUFFER][0].length - return this[BUFFER].shift() - } - - [FLUSH](noDrain) { - do {} while (this[FLUSHCHUNK](this[BUFFERSHIFT]()) && this[BUFFER].length) - - if (!noDrain && !this[BUFFER].length && !this[EOF]) this.emit('drain') - } - - [FLUSHCHUNK](chunk) { - this.emit('data', chunk) - return this.flowing - } - - pipe(dest, opts) { - if (this[DESTROYED]) return - - const ended = this[EMITTED_END] - opts = opts || {} - if (dest === proc.stdout || dest === proc.stderr) opts.end = false - else opts.end = opts.end !== false - opts.proxyErrors = !!opts.proxyErrors - - // piping an ended stream ends immediately - if (ended) { - if (opts.end) dest.end() - } else { - this[PIPES].push( - !opts.proxyErrors - ? new Pipe(this, dest, opts) - : new PipeProxyErrors(this, dest, opts) - ) - if (this[ASYNC]) defer(() => this[RESUME]()) - else this[RESUME]() - } - - return dest - } - - unpipe(dest) { - const p = this[PIPES].find(p => p.dest === dest) - if (p) { - this[PIPES].splice(this[PIPES].indexOf(p), 1) - p.unpipe() - } - } - - addListener(ev, fn) { - return this.on(ev, fn) - } - - on(ev, fn) { - const ret = super.on(ev, fn) - if (ev === 'data' && !this[PIPES].length && !this.flowing) this[RESUME]() - else if (ev === 'readable' && this[BUFFERLENGTH] !== 0) - super.emit('readable') - else if (isEndish(ev) && this[EMITTED_END]) { - super.emit(ev) - this.removeAllListeners(ev) - } else if (ev === 'error' && this[EMITTED_ERROR]) { - if (this[ASYNC]) defer(() => fn.call(this, this[EMITTED_ERROR])) - else fn.call(this, this[EMITTED_ERROR]) - } - return ret - } - - get emittedEnd() { - return this[EMITTED_END] - } - - [MAYBE_EMIT_END]() { - if ( - !this[EMITTING_END] && - !this[EMITTED_END] && - !this[DESTROYED] && - this[BUFFER].length === 0 && - this[EOF] - ) { - this[EMITTING_END] = true - this.emit('end') - this.emit('prefinish') - this.emit('finish') - if (this[CLOSED]) this.emit('close') - this[EMITTING_END] = false - } - } - - emit(ev, data, ...extra) { - // error and close are only events allowed after calling destroy() - if (ev !== 'error' && ev !== 'close' && ev !== DESTROYED && this[DESTROYED]) - return - else if (ev === 'data') { - return !this[OBJECTMODE] && !data - ? false - : this[ASYNC] - ? defer(() => this[EMITDATA](data)) - : this[EMITDATA](data) - } else if (ev === 'end') { - return this[EMITEND]() - } else if (ev === 'close') { - this[CLOSED] = true - // don't emit close before 'end' and 'finish' - if (!this[EMITTED_END] && !this[DESTROYED]) return - const ret = super.emit('close') - this.removeAllListeners('close') - return ret - } else if (ev === 'error') { - this[EMITTED_ERROR] = data - super.emit(ERROR, data) - const ret = - !this[SIGNAL] || this.listeners('error').length - ? super.emit('error', data) - : false - this[MAYBE_EMIT_END]() - return ret - } else if (ev === 'resume') { - const ret = super.emit('resume') - this[MAYBE_EMIT_END]() - return ret - } else if (ev === 'finish' || ev === 'prefinish') { - const ret = super.emit(ev) - this.removeAllListeners(ev) - return ret - } - - // Some other unknown event - const ret = super.emit(ev, data, ...extra) - this[MAYBE_EMIT_END]() - return ret - } - - [EMITDATA](data) { - for (const p of this[PIPES]) { - if (p.dest.write(data) === false) this.pause() - } - const ret = super.emit('data', data) - this[MAYBE_EMIT_END]() - return ret - } - - [EMITEND]() { - if (this[EMITTED_END]) return - - this[EMITTED_END] = true - this.readable = false - if (this[ASYNC]) defer(() => this[EMITEND2]()) - else this[EMITEND2]() - } - - [EMITEND2]() { - if (this[DECODER]) { - const data = this[DECODER].end() - if (data) { - for (const p of this[PIPES]) { - p.dest.write(data) - } - super.emit('data', data) - } - } - - for (const p of this[PIPES]) { - p.end() - } - const ret = super.emit('end') - this.removeAllListeners('end') - return ret - } - - // const all = await stream.collect() - collect() { - const buf = [] - if (!this[OBJECTMODE]) buf.dataLength = 0 - // set the promise first, in case an error is raised - // by triggering the flow here. - const p = this.promise() - this.on('data', c => { - buf.push(c) - if (!this[OBJECTMODE]) buf.dataLength += c.length - }) - return p.then(() => buf) - } - - // const data = await stream.concat() - concat() { - return this[OBJECTMODE] - ? Promise.reject(new Error('cannot concat in objectMode')) - : this.collect().then(buf => - this[OBJECTMODE] - ? Promise.reject(new Error('cannot concat in objectMode')) - : this[ENCODING] - ? buf.join('') - : Buffer.concat(buf, buf.dataLength) - ) - } - - // stream.promise().then(() => done, er => emitted error) - promise() { - return new Promise((resolve, reject) => { - this.on(DESTROYED, () => reject(new Error('stream destroyed'))) - this.on('error', er => reject(er)) - this.on('end', () => resolve()) - }) - } - - // for await (let chunk of stream) - [ASYNCITERATOR]() { - let stopped = false - const stop = () => { - this.pause() - stopped = true - return Promise.resolve({ done: true }) - } - const next = () => { - if (stopped) return stop() - const res = this.read() - if (res !== null) return Promise.resolve({ done: false, value: res }) - - if (this[EOF]) return stop() - - let resolve = null - let reject = null - const onerr = er => { - this.removeListener('data', ondata) - this.removeListener('end', onend) - this.removeListener(DESTROYED, ondestroy) - stop() - reject(er) - } - const ondata = value => { - this.removeListener('error', onerr) - this.removeListener('end', onend) - this.removeListener(DESTROYED, ondestroy) - this.pause() - resolve({ value: value, done: !!this[EOF] }) - } - const onend = () => { - this.removeListener('error', onerr) - this.removeListener('data', ondata) - this.removeListener(DESTROYED, ondestroy) - stop() - resolve({ done: true }) - } - const ondestroy = () => onerr(new Error('stream destroyed')) - return new Promise((res, rej) => { - reject = rej - resolve = res - this.once(DESTROYED, ondestroy) - this.once('error', onerr) - this.once('end', onend) - this.once('data', ondata) - }) - } - - return { - next, - throw: stop, - return: stop, - [ASYNCITERATOR]() { - return this - }, - } - } - - // for (let chunk of stream) - [ITERATOR]() { - let stopped = false - const stop = () => { - this.pause() - this.removeListener(ERROR, stop) - this.removeListener(DESTROYED, stop) - this.removeListener('end', stop) - stopped = true - return { done: true } - } - - const next = () => { - if (stopped) return stop() - const value = this.read() - return value === null ? stop() : { value } - } - this.once('end', stop) - this.once(ERROR, stop) - this.once(DESTROYED, stop) - - return { - next, - throw: stop, - return: stop, - [ITERATOR]() { - return this - }, - } - } - - destroy(er) { - if (this[DESTROYED]) { - if (er) this.emit('error', er) - else this.emit(DESTROYED) - return this - } - - this[DESTROYED] = true - - // throw away all buffered data, it's never coming out - this[BUFFER].length = 0 - this[BUFFERLENGTH] = 0 - - if (typeof this.close === 'function' && !this[CLOSED]) this.close() - - if (er) this.emit('error', er) - // if no error to emit, still reject pending promises - else this.emit(DESTROYED) - - return this - } - - static isStream(s) { - return ( - !!s && - (s instanceof Minipass || - s instanceof Stream || - (s instanceof EE && - // readable - (typeof s.pipe === 'function' || - // writable - (typeof s.write === 'function' && typeof s.end === 'function')))) - ) - } -} - - diff --git a/npm-packages/mac-v2.4.x/minipass/package.json b/npm-packages/mac-v2.4.x/minipass/package.json index 0e20e98..47c90a4 100644 --- a/npm-packages/mac-v2.4.x/minipass/package.json +++ b/npm-packages/mac-v2.4.x/minipass/package.json @@ -1,45 +1,25 @@ { "name": "minipass", - "version": "5.0.0", + "version": "3.3.4", "description": "minimal implementation of a PassThrough stream", - "main": "./index.js", - "module": "./index.mjs", - "types": "./index.d.ts", - "exports": { - ".": { - "import": { - "types": "./index.d.ts", - "default": "./index.mjs" - }, - "require": { - "types": "./index.d.ts", - "default": "./index.js" - } - }, - "./package.json": "./package.json" + "main": "index.js", + "dependencies": { + "yallist": "^4.0.0" }, "devDependencies": { "@types/node": "^17.0.41", "end-of-stream": "^1.4.0", - "node-abort-controller": "^3.1.1", "prettier": "^2.6.2", "tap": "^16.2.0", "through2": "^2.0.3", "ts-node": "^10.8.1", - "typedoc": "^0.23.24", "typescript": "^4.7.3" }, "scripts": { - "pretest": "npm run prepare", - "presnap": "npm run prepare", - "prepare": "node ./scripts/transpile-to-esm.js", - "snap": "tap", "test": "tap", "preversion": "npm test", - "postversion": "npm publish", - "postpublish": "git push origin --follow-tags", - "typedoc": "typedoc ./index.d.ts", - "format": "prettier --write . --loglevel warn" + "postversion": "npm publish --tag=next", + "postpublish": "git push origin --follow-tags" }, "repository": { "type": "git", @@ -53,8 +33,7 @@ "license": "ISC", "files": [ "index.d.ts", - "index.js", - "index.mjs" + "index.js" ], "tap": { "check-coverage": true diff --git a/npm-packages/mac-v2.4.x/node-fetch/README.md b/npm-packages/mac-v2.4.x/node-fetch/README.md index 4f87a59..2dde742 100644 --- a/npm-packages/mac-v2.4.x/node-fetch/README.md +++ b/npm-packages/mac-v2.4.x/node-fetch/README.md @@ -188,49 +188,6 @@ fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png') }); ``` -In Node.js 14 you can also use async iterators to read `body`; however, be careful to catch -errors -- the longer a response runs, the more likely it is to encounter an error. - -```js -const fetch = require('node-fetch'); -const response = await fetch('https://httpbin.org/stream/3'); -try { - for await (const chunk of response.body) { - console.dir(JSON.parse(chunk.toString())); - } -} catch (err) { - console.error(err.stack); -} -``` - -In Node.js 12 you can also use async iterators to read `body`; however, async iterators with streams -did not mature until Node.js 14, so you need to do some extra work to ensure you handle errors -directly from the stream and wait on it response to fully close. - -```js -const fetch = require('node-fetch'); -const read = async body => { - let error; - body.on('error', err => { - error = err; - }); - for await (const chunk of body) { - console.dir(JSON.parse(chunk.toString())); - } - return new Promise((resolve, reject) => { - body.on('close', () => { - error ? reject(error) : resolve(); - }); - }); -}; -try { - const response = await fetch('https://httpbin.org/stream/3'); - await read(response.body); -} catch (err) { - console.error(err.stack); -} -``` - #### Buffer If you prefer to cache binary data in full, use buffer(). (NOTE: `buffer()` is a `node-fetch`-only API) diff --git a/npm-packages/mac-v2.4.x/node-fetch/browser.js b/npm-packages/mac-v2.4.x/node-fetch/browser.js index ee86265..83c54c5 100644 --- a/npm-packages/mac-v2.4.x/node-fetch/browser.js +++ b/npm-packages/mac-v2.4.x/node-fetch/browser.js @@ -11,15 +11,15 @@ var getGlobal = function () { throw new Error('unable to locate global object'); } -var globalObject = getGlobal(); +var global = getGlobal(); -module.exports = exports = globalObject.fetch; +module.exports = exports = global.fetch; // Needed for TypeScript and Webpack. -if (globalObject.fetch) { - exports.default = globalObject.fetch.bind(globalObject); +if (global.fetch) { + exports.default = global.fetch.bind(global); } -exports.Headers = globalObject.Headers; -exports.Request = globalObject.Request; -exports.Response = globalObject.Response; +exports.Headers = global.Headers; +exports.Request = global.Request; +exports.Response = global.Response; \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/node-fetch/lib/index.es.js b/npm-packages/mac-v2.4.x/node-fetch/lib/index.es.js index ed27a46..4852f7c 100644 --- a/npm-packages/mac-v2.4.x/node-fetch/lib/index.es.js +++ b/npm-packages/mac-v2.4.x/node-fetch/lib/index.es.js @@ -1413,20 +1413,6 @@ const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); }; -/** - * isSameProtocol reports whether the two provided URLs use the same protocol. - * - * Both domains must already be in canonical form. - * @param {string|URL} original - * @param {string|URL} destination - */ -const isSameProtocol = function isSameProtocol(destination, original) { - const orig = new URL$1(original).protocol; - const dest = new URL$1(destination).protocol; - - return orig === dest; -}; - /** * Fetch function * @@ -1458,7 +1444,7 @@ function fetch(url, opts) { let error = new AbortError('The user aborted a request.'); reject(error); if (request.body && request.body instanceof Stream.Readable) { - destroyStream(request.body, error); + request.body.destroy(error); } if (!response || !response.body) return; response.body.emit('error', error); @@ -1499,43 +1485,9 @@ function fetch(url, opts) { req.on('error', function (err) { reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - - if (response && response.body) { - destroyStream(response.body, err); - } - finalize(); }); - fixResponseChunkedTransferBadEnding(req, function (err) { - if (signal && signal.aborted) { - return; - } - - if (response && response.body) { - destroyStream(response.body, err); - } - }); - - /* c8 ignore next 18 */ - if (parseInt(process.version.substring(1)) < 14) { - // Before Node.js 14, pipeline() does not fully support async iterators and does not always - // properly handle when the socket close/end events are out of order. - req.on('socket', function (s) { - s.addListener('close', function (hadError) { - // if a data listener is still present we didn't end cleanly - const hasDataListener = s.listenerCount('data') > 0; - - // if end happened before close but the socket didn't emit an error, do it now - if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - response.body.emit('error', err); - } - }); - }); - } - req.on('response', function (res) { clearTimeout(reqTimeout); @@ -1607,7 +1559,7 @@ function fetch(url, opts) { size: request.size }; - if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { + if (!isDomainOrSubdomain(request.url, locationURL)) { for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { requestOpts.headers.delete(name); } @@ -1700,13 +1652,6 @@ function fetch(url, opts) { response = new Response(body, response_options); resolve(response); }); - raw.on('end', function () { - // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. - if (!response) { - response = new Response(body, response_options); - resolve(response); - } - }); return; } @@ -1726,44 +1671,6 @@ function fetch(url, opts) { writeToStream(req, request); }); } -function fixResponseChunkedTransferBadEnding(request, errorCallback) { - let socket; - - request.on('socket', function (s) { - socket = s; - }); - - request.on('response', function (response) { - const headers = response.headers; - - if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { - response.once('close', function (hadError) { - // tests for socket presence, as in some situations the - // the 'socket' event is not triggered for the request - // (happens in deno), avoids `TypeError` - // if a data listener is still present we didn't end cleanly - const hasDataListener = socket && socket.listenerCount('data') > 0; - - if (hasDataListener && !hadError) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - errorCallback(err); - } - }); - } - }); -} - -function destroyStream(stream, err) { - if (stream.destroy) { - stream.destroy(err); - } else { - // node < 8 - stream.emit('error', err); - stream.end(); - } -} - /** * Redirect code matching * diff --git a/npm-packages/mac-v2.4.x/node-fetch/lib/index.js b/npm-packages/mac-v2.4.x/node-fetch/lib/index.js index 087f2a0..e5b04f1 100644 --- a/npm-packages/mac-v2.4.x/node-fetch/lib/index.js +++ b/npm-packages/mac-v2.4.x/node-fetch/lib/index.js @@ -1417,20 +1417,6 @@ const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); }; -/** - * isSameProtocol reports whether the two provided URLs use the same protocol. - * - * Both domains must already be in canonical form. - * @param {string|URL} original - * @param {string|URL} destination - */ -const isSameProtocol = function isSameProtocol(destination, original) { - const orig = new URL$1(original).protocol; - const dest = new URL$1(destination).protocol; - - return orig === dest; -}; - /** * Fetch function * @@ -1462,7 +1448,7 @@ function fetch(url, opts) { let error = new AbortError('The user aborted a request.'); reject(error); if (request.body && request.body instanceof Stream.Readable) { - destroyStream(request.body, error); + request.body.destroy(error); } if (!response || !response.body) return; response.body.emit('error', error); @@ -1503,43 +1489,9 @@ function fetch(url, opts) { req.on('error', function (err) { reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - - if (response && response.body) { - destroyStream(response.body, err); - } - finalize(); }); - fixResponseChunkedTransferBadEnding(req, function (err) { - if (signal && signal.aborted) { - return; - } - - if (response && response.body) { - destroyStream(response.body, err); - } - }); - - /* c8 ignore next 18 */ - if (parseInt(process.version.substring(1)) < 14) { - // Before Node.js 14, pipeline() does not fully support async iterators and does not always - // properly handle when the socket close/end events are out of order. - req.on('socket', function (s) { - s.addListener('close', function (hadError) { - // if a data listener is still present we didn't end cleanly - const hasDataListener = s.listenerCount('data') > 0; - - // if end happened before close but the socket didn't emit an error, do it now - if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - response.body.emit('error', err); - } - }); - }); - } - req.on('response', function (res) { clearTimeout(reqTimeout); @@ -1611,7 +1563,7 @@ function fetch(url, opts) { size: request.size }; - if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { + if (!isDomainOrSubdomain(request.url, locationURL)) { for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { requestOpts.headers.delete(name); } @@ -1704,13 +1656,6 @@ function fetch(url, opts) { response = new Response(body, response_options); resolve(response); }); - raw.on('end', function () { - // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. - if (!response) { - response = new Response(body, response_options); - resolve(response); - } - }); return; } @@ -1730,44 +1675,6 @@ function fetch(url, opts) { writeToStream(req, request); }); } -function fixResponseChunkedTransferBadEnding(request, errorCallback) { - let socket; - - request.on('socket', function (s) { - socket = s; - }); - - request.on('response', function (response) { - const headers = response.headers; - - if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { - response.once('close', function (hadError) { - // tests for socket presence, as in some situations the - // the 'socket' event is not triggered for the request - // (happens in deno), avoids `TypeError` - // if a data listener is still present we didn't end cleanly - const hasDataListener = socket && socket.listenerCount('data') > 0; - - if (hasDataListener && !hadError) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - errorCallback(err); - } - }); - } - }); -} - -function destroyStream(stream, err) { - if (stream.destroy) { - stream.destroy(err); - } else { - // node < 8 - stream.emit('error', err); - stream.end(); - } -} - /** * Redirect code matching * diff --git a/npm-packages/mac-v2.4.x/node-fetch/lib/index.mjs b/npm-packages/mac-v2.4.x/node-fetch/lib/index.mjs index 4ed7fa5..49ee05e 100644 --- a/npm-packages/mac-v2.4.x/node-fetch/lib/index.mjs +++ b/npm-packages/mac-v2.4.x/node-fetch/lib/index.mjs @@ -1411,20 +1411,6 @@ const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); }; -/** - * isSameProtocol reports whether the two provided URLs use the same protocol. - * - * Both domains must already be in canonical form. - * @param {string|URL} original - * @param {string|URL} destination - */ -const isSameProtocol = function isSameProtocol(destination, original) { - const orig = new URL$1(original).protocol; - const dest = new URL$1(destination).protocol; - - return orig === dest; -}; - /** * Fetch function * @@ -1456,7 +1442,7 @@ function fetch(url, opts) { let error = new AbortError('The user aborted a request.'); reject(error); if (request.body && request.body instanceof Stream.Readable) { - destroyStream(request.body, error); + request.body.destroy(error); } if (!response || !response.body) return; response.body.emit('error', error); @@ -1497,43 +1483,9 @@ function fetch(url, opts) { req.on('error', function (err) { reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - - if (response && response.body) { - destroyStream(response.body, err); - } - finalize(); }); - fixResponseChunkedTransferBadEnding(req, function (err) { - if (signal && signal.aborted) { - return; - } - - if (response && response.body) { - destroyStream(response.body, err); - } - }); - - /* c8 ignore next 18 */ - if (parseInt(process.version.substring(1)) < 14) { - // Before Node.js 14, pipeline() does not fully support async iterators and does not always - // properly handle when the socket close/end events are out of order. - req.on('socket', function (s) { - s.addListener('close', function (hadError) { - // if a data listener is still present we didn't end cleanly - const hasDataListener = s.listenerCount('data') > 0; - - // if end happened before close but the socket didn't emit an error, do it now - if (response && hasDataListener && !hadError && !(signal && signal.aborted)) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - response.body.emit('error', err); - } - }); - }); - } - req.on('response', function (res) { clearTimeout(reqTimeout); @@ -1605,7 +1557,7 @@ function fetch(url, opts) { size: request.size }; - if (!isDomainOrSubdomain(request.url, locationURL) || !isSameProtocol(request.url, locationURL)) { + if (!isDomainOrSubdomain(request.url, locationURL)) { for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { requestOpts.headers.delete(name); } @@ -1698,13 +1650,6 @@ function fetch(url, opts) { response = new Response(body, response_options); resolve(response); }); - raw.on('end', function () { - // some old IIS servers return zero-length OK deflate responses, so 'data' is never emitted. - if (!response) { - response = new Response(body, response_options); - resolve(response); - } - }); return; } @@ -1724,44 +1669,6 @@ function fetch(url, opts) { writeToStream(req, request); }); } -function fixResponseChunkedTransferBadEnding(request, errorCallback) { - let socket; - - request.on('socket', function (s) { - socket = s; - }); - - request.on('response', function (response) { - const headers = response.headers; - - if (headers['transfer-encoding'] === 'chunked' && !headers['content-length']) { - response.once('close', function (hadError) { - // tests for socket presence, as in some situations the - // the 'socket' event is not triggered for the request - // (happens in deno), avoids `TypeError` - // if a data listener is still present we didn't end cleanly - const hasDataListener = socket && socket.listenerCount('data') > 0; - - if (hasDataListener && !hadError) { - const err = new Error('Premature close'); - err.code = 'ERR_STREAM_PREMATURE_CLOSE'; - errorCallback(err); - } - }); - } - }); -} - -function destroyStream(stream, err) { - if (stream.destroy) { - stream.destroy(err); - } else { - // node < 8 - stream.emit('error', err); - stream.end(); - } -} - /** * Redirect code matching * diff --git a/npm-packages/mac-v2.4.x/node-fetch/package.json b/npm-packages/mac-v2.4.x/node-fetch/package.json index 0ba36fd..3c1bd8d 100644 --- a/npm-packages/mac-v2.4.x/node-fetch/package.json +++ b/npm-packages/mac-v2.4.x/node-fetch/package.json @@ -1,6 +1,6 @@ { "name": "node-fetch", - "version": "2.6.12", + "version": "2.6.7", "description": "A light-weight module that brings window.fetch to node.js", "main": "lib/index.js", "browser": "./browser.js", @@ -39,7 +39,7 @@ "dependencies": { "whatwg-url": "^5.0.0" }, - "peerDependencies": { + "peerDependencies": { "encoding": "^0.1.0" }, "peerDependenciesMeta": { @@ -53,9 +53,7 @@ "abortcontroller-polyfill": "^1.3.0", "babel-core": "^6.26.3", "babel-plugin-istanbul": "^4.1.6", - "babel-plugin-transform-async-generator-functions": "^6.24.1", - "babel-polyfill": "^6.26.0", - "babel-preset-env": "1.4.0", + "babel-preset-env": "^1.6.1", "babel-register": "^6.16.3", "chai": "^3.5.0", "chai-as-promised": "^7.1.1", @@ -74,16 +72,5 @@ "rollup-plugin-babel": "^3.0.7", "string-to-arraybuffer": "^1.0.2", "teeny-request": "3.7.0" - }, - "release": { - "branches": [ - "+([0-9]).x", - "main", - "next", - { - "name": "beta", - "prerelease": true - } - ] } } diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/LICENSE b/npm-packages/mac-v2.4.x/pinyin-pro/LICENSE new file mode 100644 index 0000000..0f073f5 --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022-present zh-lx + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/README.md b/npm-packages/mac-v2.4.x/pinyin-pro/README.md new file mode 100644 index 0000000..4811192 --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/README.md @@ -0,0 +1,194 @@ +[![pinyin-pro Logo](https://t1.wodetu.cn/2022/11/15/168e8a29acc856c48fdef4060c0ba5ad.png)](https://github.com/zh-lx/pinyin-pro) + +[![NPM version](https://img.shields.io/npm/v/pinyin-pro.svg)](https://www.npmjs.com/package/pinyin-pro) +[![GITHUB star](https://img.shields.io/github/stars/zh-lx/pinyin-pro.svg)](https://github.com/zh-lx/pinyin-pro) +[![travis-build](https://travis-ci.com/zh-lx/pinyin-pro.svg?branch=main)](https://travis-ci.com/github/zh-lx/pinyin-pro) +[![NPM Downloads](https://img.shields.io/npm/dm/pinyin-pro.svg)](https://npmcharts.com/compare/pinyin-pro?minimal=true) +[![Coverage Status](https://coveralls.io/repos/github/zh-lx/pinyin-pro/badge.svg?branch=main)](https://coveralls.io/github/zh-lx/pinyin-pro?branch=main) +[![MIT-license](https://img.shields.io/npm/l/pinyin-pro.svg)](https://opensource.org/licenses/MIT) +[![GITHUB-language](https://img.shields.io/github/languages/top/zh-lx/pinyin-pro.svg)](https://github.com/zh-lx/pinyin-pro) + +### 📖 介绍 + +`pinyin-pro` 是一个专业的 js 汉字拼音转换库,功能丰富、准确率高、性能优异。 + +[中文文档](https://pinyin-pro.cn) | [English Docs](https://pinyin-pro.cn/en) | [在线运行](https://pinyin-pro.cn/run/run) + +### 🎨 特色功能 + +- 支持拼音/声母/韵母/首字母/音调/全部信息 +- 支持人名姓氏模式 +- 支持文本和拼音匹配 +- 支持自定义拼音 +- 支持获取带拼音汉字的 HTML 字符串 +- 支持获取汉字的所有拼音 +- 极致的性能和极高的拼音识别准确率 + +### 🔨 安装 + +npm 安装 + +```html +npm install pinyin-pro +``` + +浏览器引入 + +```html + +``` + +### 💡 使用示例 + +全部功能的使用说明文档请查看[在线文档](https://pinyin-pro.cn/use/pinyin) + +- 获取拼音,更多功能请查看[pinyin API](https://pinyin-pro.cn/use/pinyin) + + ```js + import { pinyin } from 'pinyin-pro'; + + // 获取字符串格式拼音 + pinyin('汉语拼音'); // 'hàn yǔ pīn yīn' + + // 获取数组格式拼音 + pinyin('汉语拼音', { type: 'array' }); // ["hàn", "yǔ", "pīn", "yīn"] + + // 获取不带音调数组格式拼音 + pinyin('汉语拼音', { toneType: 'none' }); // "han yu pin yin" + + // 获取不带音调数组格式拼音 + pinyin('汉语拼音', { toneType: 'none', type: 'array' }); // ["han", "yu", "pin", "yin"] + + // 音调以数组形式显示 + pinyin('汉语拼音', { toneType: 'num' }); // "han4 yu3 pin1 yin1" + + // 自动识别多音字 + pinyin('睡着了'); // "shuì zháo le" + ``` + +- 文本和拼音匹配,更多匹配规则请查看[match API](https://pinyin-pro.cn/use/match) + + ```js + import { match } from 'pinyin-pro'; + + // 支持首字母匹配 + match('中文拼音', 'zwp'); // [0, 1, 2] + + // 支持全拼匹配 + match('中文拼音', 'zhongwenpin'); // [0, 1, 2] + + // 支持混合匹配 + match('中文拼音', 'zhongwp'); // [0, 1, 2] + ``` + +- 获取带汉字拼音的 HTML 字符串,更多配置请查看[html API](https://pinyin-pro.cn/use/html) + + ```js + import { html } from 'pinyin-pro'; + + // 带拼音汉字的 HTML 字符串 + html('汉语拼音'); + /* + + + + ( + hàn + ) + + + + + + ( + + ) + + + */ + ``` + + 上述结果浏览器中预览效果如下: + + + + ( + hàn + ) + + + + + + ( + + ) + + + +### 🏆 竞品对比 + +以下是 `pinyin-pro`、`pinyin` 及 `@napi-rs/pinyin` 包对于汉字转换的速度及准确率对比,可以看到 `pinyin-pro` 在各方面都全面领先。 + +- 准确率测试数据: [accuracy](https://github.com/zh-lx/pinyin-pro/blob/main/benchmark/accuracy.js) +- 性能测试数据:[speed](https://github.com/zh-lx/pinyin-pro/blob/main/benchmark/speed.js) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
对比项pinyin@napi-rs/pinyinpinyin-pro
准确率😕 Node 版: 97.844%😕 97.433%🤩 99.744%
😕 Web 版: 94.507%
性能5k字转换耗时🐢 749.111ms🚲 200.877ms🚀 5.958ms
1w字转换耗时🐢 795.904ms🚲 206.5ms🚀 15.260ms
100w字转换耗时⛔ 内存溢出转换失败🚀 638.888ms🚀 607.131ms
兼容性Web 环境✔️ 支持❌ 不支持✔️ 支持
Node 环境✔️ 支持✔️ 支持✔️ 支持
+ +### 📠 反馈 + +使用遇到问题或者需要功能支持欢迎提 issue。 + +技术交流欢迎加 pinyin-pro 用户群 或者微信: + +
+ + +
diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/dist/index.js b/npm-packages/mac-v2.4.x/pinyin-pro/dist/index.js new file mode 100644 index 0000000..fd61377 --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/dist/index.js @@ -0,0 +1 @@ +!function(n,h){"object"==typeof exports&&"undefined"!=typeof module?h(exports):"function"==typeof define&&define.amd?define(["exports"],h):h((n="undefined"!=typeof globalThis?globalThis:n||self).pinyinPro={})}(this,(function(n){"use strict";const h=["zh","ch","sh","z","c","s","b","p","m","f","d","t","n","l","g","k","h","j","q","x","r","y","w",""],i=["j","q","x"],g=["uān","uán","uǎn","uàn","uan","uē","ué","uě","uè","ue","ūn","ún","ǔn","ùn","un","ū","ú","ǔ","ù","u"],u={"uān":"üān","uán":"üán","uǎn":"üǎn","uàn":"üàn",uan:"üan","uē":"üē","ué":"üé","uě":"üě","uè":"üè",ue:"üe","ūn":"ǖn","ún":"ǘn","ǔn":"ǚn","ùn":"ǜn",un:"ün","ū":"ǖ","ú":"ǘ","ǔ":"ǚ","ù":"ǜ",u:"ü"},s=["ia","ian","iang","iao","ie","iu","iong","ua","uai","uan","uang","ue","ui","uo","üan","üe","van","ve"],z={"南宫":"nán gōng","第五":"dì wǔ","万俟":"mò qí","司马":"sī mǎ","上官":"shàng guān","欧阳":"ōu yáng","夏侯":"xià hóu","诸葛":"zhū gě","闻人":"wén rén","东方":"dōng fāng","赫连":"hè lián","皇甫":"huáng fǔ","尉迟":"yù chí","公羊":"gōng yáng","澹台":"tán tái","公冶":"gōng yě","宗政":"zōng zhèng","濮阳":"pú yáng","淳于":"chún yú","单于":"chán yú","太叔":"tài shū","申屠":"shēn tú","公孙":"gōng sūn","仲孙":"zhòng sūn","轩辕":"xuān yuán","令狐":"líng hú","钟离":"zhōng lí","宇文":"yǔ wén","长孙":"zhǎng sūn","慕容":"mù róng","鲜于":"xiān yú","闾丘":"lǘ qiū","司徒":"sī tú","司空":"sī kōng","亓官":"qí guān","司寇":"sī kòu","仉督":"zhǎng dū","子车":"zǐ jū","颛孙":"zhuān sūn","端木":"duān mù","巫马":"wū mǎ","公西":"gōng xī","漆雕":"qī diāo","乐正":"yuè zhèng","壤驷":"rǎng sì","公良":"gōng liáng","拓跋":"tuò bá","夹谷":"jiá gǔ","宰父":"zǎi fǔ","榖梁":"gǔ liáng","段干":"duàn gān","百里":"bǎi lǐ","东郭":"dōng guō","南门":"nán mén","呼延":"hū yán","羊舌":"yáng shé","梁丘":"liáng qiū","左丘":"zuǒ qiū","东门":"dōng mén","西门":"xī mén","赵":"zhào","钱":"qián","孙":"sūn","李":"lǐ","周":"zhōu","吴":"wú","郑":"zhèng","王":"wáng","冯":"féng","陈":"chén","褚":"chǔ","卫":"wèi","蒋":"jiǎng","沈":"shěn","韩":"hán","杨":"yáng","朱":"zhū","秦":"qín","尤":"yóu","许":"xǔ","何":"hé","吕":"lǚ","施":"shī","张":"zhāng","孔":"kǒng","曹":"cáo","严":"yán","华":"huà","金":"jīn","魏":"wèi","陶":"táo","姜":"jiāng","戚":"qī","谢":"xiè","邹":"zōu","喻":"yù","柏":"bǎi","水":"shuǐ","窦":"dòu","章":"zhāng","云":"yún","苏":"sū","潘":"pān","葛":"gě","奚":"xī","范":"fàn","彭":"péng","郎":"láng","鲁":"lǔ","韦":"wéi","昌":"chāng","马":"mǎ","苗":"miáo","凤":"fèng","花":"huā","方":"fāng","俞":"yú","任":"rèn","袁":"yuán","柳":"liǔ","酆":"fēng","鲍":"bào","史":"shǐ","唐":"táng","费":"fèi","廉":"lián","岑":"cén","薛":"xuē","雷":"léi","贺":"hè","倪":"ní","汤":"tāng","滕":"téng","殷":"yīn","罗":"luó","毕":"bì","郝":"hǎo","邬":"wū","安":"ān","常":"cháng","乐":"yuè","于":"yú","时":"shí","傅":"fù","皮":"pí","卞":"biàn","齐":"qí","康":"kāng","伍":"wǔ","余":"yú","元":"yuán","卜":"bǔ","顾":"gù","孟":"mèng","平":"píng","黄":"huáng","和":"hé","穆":"mù","萧":"xiāo","尹":"yǐn","姚":"yáo","邵":"shào","湛":"zhàn","汪":"wāng","祁":"qí","毛":"máo","禹":"yǔ","狄":"dí","米":"mǐ","贝":"bèi","明":"míng","臧":"zāng","计":"jì","伏":"fú","成":"chéng","戴":"dài","谈":"tán","宋":"sòng","茅":"máo","庞":"páng","熊":"xióng","纪":"jì","舒":"shū","屈":"qū","项":"xiàng","祝":"zhù","董":"dǒng","梁":"liáng","杜":"dù","阮":"ruǎn","蓝":"lán","闵":"mǐn","席":"xí","季":"jì","麻":"má","强":"qiáng","贾":"jiǎ","路":"lù","娄":"lóu","危":"wēi","江":"jiāng","童":"tóng","颜":"yán","郭":"guō","梅":"méi","盛":"shèng","林":"lín","刁":"diāo","钟":"zhōng","徐":"xú","邱":"qiū","骆":"luò","高":"gāo","夏":"xià","蔡":"cài","田":"tián","樊":"fán","胡":"hú","凌":"líng","霍":"huò","虞":"yú","万":"wàn","支":"zhī","柯":"kē","昝":"zǎn","管":"guǎn","卢":"lú","莫":"mò","经":"jīng","房":"fáng","裘":"qiú","缪":"miào","干":"gān","解":"xiè","应":"yīng","宗":"zōng","丁":"dīng","宣":"xuān","贲":"bēn","邓":"dèng","郁":"yù","单":"shàn","杭":"háng","洪":"hóng","包":"bāo","诸":"zhū","左":"zuǒ","石":"shí","崔":"cuī","吉":"jí","钮":"niǔ","龚":"gōng","程":"chéng","嵇":"jī","邢":"xíng","滑":"huá","裴":"péi","陆":"lù","荣":"róng","翁":"wēng","荀":"xún","羊":"yáng","於":"yū","惠":"huì","甄":"zhēn","曲":"qū","家":"jiā","封":"fēng","芮":"ruì","羿":"yì","储":"chǔ","靳":"jìn","汲":"jí","邴":"bǐng","糜":"mí","松":"sōng","井":"jǐng","段":"duàn","富":"fù","巫":"wū","乌":"wū","焦":"jiāo","巴":"bā","弓":"gōng","牧":"mù","隗":"kuí","山":"shān","谷":"gǔ","车":"chē","侯":"hóu","宓":"mì","蓬":"péng","全":"quán","郗":"xī","班":"bān","仰":"yǎng","秋":"qiū","仲":"zhòng","伊":"yī","宫":"gōng","宁":"nìng","仇":"qiú","栾":"luán","暴":"bào","甘":"gān","钭":"tǒu","厉":"lì","戎":"róng","祖":"zǔ","武":"wǔ","符":"fú","刘":"liú","景":"jǐng","詹":"zhān","束":"shù","龙":"lóng","叶":"yè","幸":"xìng","司":"sī","韶":"sháo","郜":"gào","黎":"lí","蓟":"jì","薄":"bó","印":"yìn","宿":"sù","白":"bái","怀":"huái","蒲":"pú","邰":"tái","从":"cóng","鄂":"è","索":"suǒ","咸":"xián","籍":"jí","赖":"lài","卓":"zhuó","蔺":"lìn","屠":"tú","蒙":"méng","池":"chí","乔":"qiáo","阴":"yīn","鬱":"yù","胥":"xū","能":"nài","苍":"cāng","双":"shuāng","闻":"wén","莘":"shēn","党":"dǎng","翟":"zhái","谭":"tán","贡":"gòng","劳":"láo","逄":"páng","姬":"jī","申":"shēn","扶":"fú","堵":"dǔ","冉":"rǎn","宰":"zǎi","郦":"lì","雍":"yōng","郤":"xì","璩":"qú","桑":"sāng","桂":"guì","濮":"pú","牛":"niú","寿":"shòu","通":"tōng","边":"biān","扈":"hù","燕":"yān","冀":"jì","郏":"jiá","浦":"pǔ","尚":"shàng","农":"nóng","温":"wēn","别":"bié","庄":"zhuāng","晏":"yàn","柴":"chái","瞿":"qú","阎":"yán","充":"chōng","慕":"mù","连":"lián","茹":"rú","习":"xí","宦":"huàn","艾":"ài","鱼":"yú","容":"róng","向":"xiàng","古":"gǔ","易":"yì","慎":"shèn","戈":"gē","廖":"liào","庾":"yǔ","终":"zhōng","暨":"jì","居":"jū","衡":"héng","步":"bù","都":"dū","耿":"gěng","满":"mǎn","弘":"hóng","匡":"kuāng","国":"guó","文":"wén","寇":"kòu","广":"guǎng","禄":"lù","阙":"quē","东":"dōng","欧":"ōu","殳":"shū","沃":"wò","利":"lì","蔚":"wèi","越":"yuè","夔":"kuí","隆":"lóng","师":"shī","巩":"gǒng","厍":"shè","聂":"niè","晁":"cháo","勾":"gōu","敖":"áo","融":"róng","冷":"lěng","訾":"zǐ","辛":"xīn","阚":"kàn","那":"nā","简":"jiǎn","饶":"ráo","空":"kōng","曾":"zēng","母":"mǔ","沙":"shā","乜":"niè","养":"yǎng","鞠":"jū","须":"xū","丰":"fēng","巢":"cháo","关":"guān","蒯":"kuǎi","相":"xiàng","查":"zhā","后":"hòu","荆":"jīng","红":"hóng","游":"yóu","竺":"zhú","权":"quán","逯":"lù","盖":"gài","益":"yì","桓":"huán","公":"gōng","牟":"móu","哈":"hǎ","言":"yán","福":"fú"},o=Object.keys(z).map((n=>({zh:n,pinyin:z[n],priority:99+n.length,length:n.length}))),y={"líng":[12295,20278,20940,21026,22265,22397,22796,22984,23112,23361,23738,24446,25493,26148,26382,26563,26818,27386,27422,27872,28137,28586,28789,29167,29223,29393,29618,29708,29940,30346,30769,31102,31202,31451,31533,32055,32190,32491,32656,32666,32718,32838,33330,33491,33777,34020,34054,34166,34505,34897,35052,35397,36297,36584,36632,37187,37309,37428,37634,38083,38301,38517,38646,38666,38679,38683,38685,38728,39382,39807,39914,40110,40210,40496,40567,40610,40801,40802,40836,40855],"yī":[19968,20042,20234,20381,21307,21530,21695,22123,22769,22777,22785,23259,23300,24332,25558,25742,27321,27593,27938,28175,28458,29823,30057,31054,31125,31270,32324,34524,34916,35689,36791,37116,37291,37541,38129,40406,40549,40671,40691],"dīng zhēng":[19969],"kǎo qiǎo yú":[19970],"qī":[19971,20507,20699,20932,22017,22660,23096,24765,24956,24957,25114,25471,26578,26724,26748,26866,27071,27450,27791,28114,28422,32042,32192,33803,35076,35526,36809,37098,37850,38667,39756,40328],"shàng":[19972,23577,23578,24678,32212,32497],"xià":[19973,19979,20068,22327,22799,22803,25047,26810,30108,30577,32581,37820,37868],"hǎn":[19974,21898,28011,32597,35907],"wàn mò":[19975],"zhàng":[19976,20183,22663,23938,24080,24115,24155,25177,26454,28081,30190,30252,30260,30613,31872,32960,33081,36076,36134,38556],"sān":[19977,21377,21441,24334,27637,27638,27647,29337,39702],"shàng shǎng shang":[19978],"qí jī":[19980,20854,22855],"bù fǒu":[19981],"yǔ yù yú":[19982],"miǎn":[19983,20589,20813,20885,21193,21204,21909,23081,24848,27717,27796,28238,30540,32236,32517,33148,33858,38758,39864],"gài":[19984,20066,21251,21252,25124,27010,27113,27114,28297,28433,29890,33890,37411,38041],"chǒu":[19985,19986,20404,21532,26493,30597,30657,37276,39767],"zhuān":[19987,21440,23269,23554,23560,29820,29966,30742,30935,30938,34788,35567,37151,38995,39067,40004],"qiě jū":[19988],"pī":[19989,20243,20286,22140,22383,23727,25013,25209,25259,28811,29385,29395,30738,30919,30996,30997,31195,31200,32794,35966,37043,37402,37471,37524,37635,37645,38713,39379,39660,39806],"shì":[19990,19991,20106,20107,20181,20365,20895,21183,21218,21323,21609,21980,22124,22763,22893,23317,23460,24066,24335,24337,24338,24640,24643,25146,25325,25555,26159,26160,26558,26623,26683,28584,28882,29046,30466,30478,30497,30551,31034,31035,31598,31789,33296,33299,35179,35222,35270,35298,35430,35475,35553,35610,35797,35877,36016,36147,36606,36732,36893,36990,37320,37322,37323,37424,37443,37501,38088,39166,39193,39197,39280,39960],"qiū":[19992,2e4,22389,23197,24664,24695,27e3,31179,31180,31312,31693,32231,33833,34322,34479,34677,34775,34852,36261,37041,38822,38823,39948,39949,40133,40342,40537,40861],"bǐng":[19993,23643,24626,25254,26142,26170,26564,26821,28851,31104,31177,31263,33514,34499,37044,37429,38467,38790,39173,39200,39292],"yè":[19994,20145,20727,22711,22812,23978,23979,25268,25433,25819,25834,25835,26196,26308,26309,26327,26355,26357,26556,26557,26989,27906,28082,28594,28904,29121,29207,29837,30371,30641,30648,30991,33099,33865,35585,35858,37050,37172,37745,37943,38757,38760,38913,39029,39203,39233,39308,39516,40314,40456],"cóng":[19995,20174,21474,23107,23406,24467,24468,24470,24752,27191,27401,28121,28743,29212,29742,34242,35508,36072,36073,37661],"dōng":[19996,20530,20908,21658,22508,23741,23852,24474,26168,26481,27681,27693,28087,31511,33523,33732,34624,39831,39903,40327,40363,40491,40725],"sī":[19997,20460,20952,21422,21496,21661,22070,22109,23204,24285,24662,25749,26031,26962,27840,28556,29133,31127,31136,31169,31993,32114,32230,32415,32524,32627,34156,34386,34547,34596,34692,34774,34804,37488,37551,37750,37889,38198,39096,39124,39462,40421,40502,40758],"chéng":[19998,21576,22478,22485,22552,22605,22614,23468,23800,24809,25074,25104,25215,25392,25473,25576,26536,26838,27225,27289,27910,28311,28546,29685,29689,30075,31243,31386,31596,32126,33069,33663,35488,35802,37077,37234,37614,38102,39468,39886],"diū":[19999,20002,37545,38117],"liǎng":[20001,20004,20841,21793,21858,25498,32201,33084,34621,35058,39753,39758],"yǒu":[20003,21347,21451,26756,28277,29270,31113,32657,32840,33475,33696,34575,37193,37546,38101,40669],"yán":[20005,21427,21873,21926,22196,22633,22747,22759,22925,23032,23083,23086,23721,23890,23891,24012,24022,24023,24310,25541,26134,26956,27280,27369,27413,27839,28814,28815,29439,29698,30416,30878,31605,31799,33690,34053,34404,34578,35328,35329,35374,35453,35744,37076,38278,38331,38379,38414,38991,38996,39068,40573,40611],"bìng":[20006,20341,20482,20641,22442,25682,26660,30149,31369,31453,35457,38736,39849],"sàng sāng":[20007],"gǔn":[20008,24771,28378,28414,30937,32196,32498,34008,34057,34926,34974,36645,36746,39820,39872,40103],"jiū":[20009,21244,21886,25578,25579,26427,31350,31998,32416,33819,36211,38404,39695,39726,40169,40480],"gè gě":[20010,20491,21508],"yā":[20011,22311,23410,24216,25276,26514,26720,26895,37647,37914,40201,40232,40310,40486,40493],"pán":[20012,23227,24139,27075,27904,28682,29247,30424,30436,30928,32271,33968,34784,36434,36451,37788,38838],"zhōng zhòng":[20013],"jǐ":[20014,22912,24049,25119,25380,25486,25760,25824,27254,27890,29361,33034,34414,34787,39778,40062,40578],"jiè":[20015,20171,20511,21814,22586,23622,23626,23701,24206,24483,25106,26960,29335,29600,29758,30028,30029,30117,30734,34471,34550,34936,35119,35489,35819,37765,39601,39786],"fēng":[20016,20217,20561,20732,20968,20972,20974,22950,23543,23553,23791,23792,23862,26539,26963,27282,27811,27816,28194,28739,28925,29326,29478,29714,30127,30219,30461,30748,30904,31688,34356,34562,34861,35920,37175,37190,37586,37821,37856,38155,38715,38730,39116,40631],"guàn kuàng":[20017],"chuàn":[20018,27724,29588,36055,37351,38031],"chǎn":[20019,20135,20865,21111,22213,23932,26101,27984,28411,28763,29986,29987,31749,33927,34118,35522,35650,35719,35844,37855,38130,38323,38369,38416,39587],"lín":[20020,20903,22755,23818,23961,26036,26237,26301,26519,28542,28726,29136,29747,29848,30645,30852,30967,31910,31932,32343,32759,33256,36692,36762,36980,37051,37168,37883,38462,38563,38678,39502,40023,40158,40592,40607],"zhuó":[20021,21125,21331,21828,22324,22960,23098,25775,25798,25826,26027,26030,26033,26034,26037,26219,26899,27978,27998,28609,28796,28917,29752,30842,31130,31393,31831,31857,32620,33537,34839,34879,35521,35537,35638,35836,37196,37938,38255,40299,40415],"zhǔ":[20022,20027,21167,22065,22225,23444,24126,25284,28186,28624,29009,29038,29149,30633,30682,32604,35421,38524,40448,40584],"bā":[20023,20168,20843,21485,21749,22847,23708,24052,25420,26419,29584,30116,31494,31889,32659,33453,34438,35933,37343],"wán":[20024,21011,23436,23695,25231,25430,27725,28919,29609,29715,31490,32008,32424,32747,33412,36006,38929,39037],"dān":[20025,21231,21296,21336,22921,23173,27546,27563,29972,30472,30723,31658,31774,32828,32829,32835,32888,35101,35148,36525,37112,37170,37206,38933],"wèi wéi":[20026],"jǐng dǎn":[20028],"lì lí":[20029],"jǔ":[20030,24326,25369,25831,26887,27017,27032,27384,27397,30697,31589,32869,33289,33682,33951,35191,36413,40799,40835],"piě":[20031,33508,37893],"fú":[20032,20239,20440,20971,21020,21264,21640,21753,22424,23386,23722,24063,24087,24133,24158,24343,24447,24619,25206,26603,26687,26740,27679,27885,28014,28074,28563,28837,29624,30006,30025,30273,31059,31119,31274,31526,31641,32049,32060,32101,32141,32450,32459,32600,32614,32711,33344,33433,33443,33531,33536,33583,33748,33869,34393,34472,34569,34656,34970,34993,35142,35173,35560,35943,36414,36667,36752,37083,37464,37468,38861,38888,39083,39668,39812,39858,40167,40172,40212,40297,40699],"yí jí":[20033],"yì":[20034,20041,20100,20134,20159,20231,20287,20350,20427,20740,20863,21e3,21139,21166,21210,21225,21255,21587,21613,21625,21768,22216,22299,22340,22460,22520,22869,23253,23313,23537,23673,23748,23975,24095,24096,24134,24281,24322,24328,24331,24441,24518,24584,24639,24722,24847,25014,25036,25087,25233,25401,25953,26131,26233,26304,26318,26457,26509,26861,27023,27128,27277,27485,27540,27562,27577,27589,27970,28005,28019,28249,28322,28521,28602,28727,28808,28978,29088,29092,29116,29146,29153,29169,29512,29620,30064,30123,30188,30231,30238,30257,30292,30410,30614,31315,31465,31698,32266,32374,32377,32462,32546,32681,32703,32714,32716,32755,32764,32820,32900,32906,33161,33222,33367,33402,33413,33477,33823,34042,34191,34265,34269,34329,34377,34612,34720,34922,34979,35028,35035,35129,35196,35378,35379,35405,35427,35516,35695,35696,35739,35758,35793,35811,35850,35929,35931,35959,35990,36096,36295,36726,36920,37009,37139,37303,37364,37408,37808,37951,38226,38257,38435,38591,38700,39248,39365,39515,39551,39598,39848,40322,40323,40333,40385,40394,40423,40446,40451,40541,40546,40659,40824],"nǎi":[20035,20535,22902,23341,24316,27670,30099,33407,36858,37346],"wǔ":[20036,20116,20213,20237,20398,20533,20763,21320,21838,22953,23084,23285,24209,24289,24548,24579,25006,25664,27494,28501,29075,29310,29597,29687,29798,29970,30868,33310,36492,36821,36892,38490,40289,40521],"jiǔ":[20037,20038,20061,20067,22906,26470,27747,28792,29590,32036,33295,37202,38265,38893,38894],"tuō zhé":[20039,26452,39346],"me mó ma yāo":[20040],"zhī":[20043,20481,21358,24053,25624,25903,26624,26772,26917,27056,27713,27868,30135,31063,31084,31187,31257,32149,32930,32977,32989,33026,33437,34357,34584,34940,38587,40183,40242,40709],"wū wù":[20044],"zhà":[20045,21668,23473,25662,27048,28320,30148,34481,35408,35784,37281,38661],"hū":[20046,20079,21282,21291,21628,21823,22033,22400,23523,24160,24573,24794,26130,27473,27864,28148,28409,28864,33528,34381,34390,35644,36580,36727,38608],"fá":[20047,20240,20640,22394,22433,22690,22978,26672,27980,30594,31529,31567,32602,32624,32632,34245,38309,38400],"lè yuè yào lào":[20048,27138],"yín":[20049,21535,22102,22170,22273,22432,22820,23148,23493,23806,23839,23855,27309,27557,27903,28139,28379,28878,29374,29434,29836,30797,30866,33654,34089,35348,35354,35361,35518,37150,37405,37504,38134,38698,40419,40806],"pīng":[20050,20444,23049,28036,30009,30767,32864,33397,38953],"pāng":[20051,28354,33006,33174,38641,38710],"qiáo":[20052,20392,20689,23286,24980,26725,27095,27189,27211,27381,29342,30631,30810,30980,33613,33630,34126,34286,35673,36267,37896,38802,38845,39014],"hǔ":[20053,29733,33792,34382,34397,37695,39921],"guāi":[20054],"chéng shèng":[20055,20056,23053],"yǐ":[20057,20059,20197,20506,20591,23327,23866,24050,24225,25158,25914,25980,26065,26070,27301,30691,30994,31510,33315,33380,33505,33506,34433,34712,34811,35071,36390,36642,36697,36888,37199,37332,37400,37487,38023,38999,40166,40814],"háo yǐ":[20058],"niè miē":[20060],"qǐ":[20062,20225,21551,21784,21843,21844,21855,23117,23674,26462,26856,29592,30400,32186,32494,33425,35564,36215,37012,38361],"yě":[20063,20918,22050,22492,22724,28444,37326],"xí":[20064,21946,23219,23949,24109,26938,27268,28445,32722,33990,34989,35186,35233,35275,35637,36248,37067,37812,38576,38699,39105,39473,39485,39528,39996,40155],"xiāng":[20065,21410,24258,24512,27007,27392,28248,29910,31269,31665,32215,32515,33207,33431,33835,33881,34188,35140,37111,37129,37130,37141,38002,38262,39321,39524,39591,40028,40600],"shū":[20070,20495,20496,20789,21460,23005,23575,25234,25491,25669,25860,26360,26530,26803,27166,27530,27571,27641,27642,28113,28717,28930,30094,30095,32019,32128,32446,33298,33789,34092,36360,36567,36664,36755,37123,38478,39835,40296],"dǒu":[20071,25238,26515,34474,37380,38439,38497],"shǐ":[20072,20351,20824,21490,22987,23465,23630,27009,30690,31542,35925,37442,39387,39542],"jī":[20073,20703,20987,21001,21007,21086,21501,21799,21918,21976,22064,22334,22522,22716,23020,23632,23878,23879,25731,25802,26398,26426,26501,27181,27231,27588,28608,29316,29585,29859,30072,30079,30314,30710,30959,31215,31309,31492,31571,31637,31754,32193,32641,32647,32648,32813,32908,33448,34368,35209,35210,35663,35684,35749,36075,36087,36173,36347,36369,36491,36536,37512,37668,37910,37959,37977,38574,38622,38847,38898,39138,39249,39269,39765,40174,40335,40378,40388,40452,40481,40782,40783,40785],"náng":[20074,22178,27420,34864,39266],"jiā":[20075,20339,20642,21152,22025,25272,26551,26780,27616,27847,27971,28025,29324,29491,29640,30146,31539,31960,32798,33141,33901,34952,35949,35985,36303,36838,37483,37813,38227,40208,40602],"jù":[20076,20520,20534,20855,21095,21127,21230,22503,22526,22729,22998,23654,23656,23712,24040,24042,24583,24807,24883,25029,25084,25298,25312,26139,27499,27952,28605,28844,28901,29323,31212,31405,31414,31796,31892,32799,32858,34401,34487,35406,35765,35942,36317,36382,36486,36989,37037,37301,37445,37947,38044,39094,39123,39375,39828],"shí":[20077,21313,22488,22610,23036,23454,23455,23508,23526,23765,23925,26102,26105,26178,27055,28252,28321,28859,31055,31437,34432,34645,36795,36936,37456,39136,39267,39830,39971,40101,40747,40749],"mǎo":[20078,20871,21359,23745,25148,26164,27862,31543,34025,37466,38086],"mǎi":[20080,22058,33644,34130,36023,40438],"luàn":[20081,20098,37344],"rǔ":[20083,25833,27741,32919,36785,37135],"xué":[20084,23398,23416,23747,23976,25992,27894,28585,29154,31348,33555,34965,36357,40445,40500],"yǎn":[20085,20456,20547,20796,20822,20823,21411,21428,22110,23373,23875,24024,24026,24327,24861,25133,25162,25217,25513,25564,26350,26940,27327,27783,28215,28436,29744,29975,30524,32616,33810,34648,34893,35095,36541,36931,37118,38546,39017,39751,39768,39947,40352,40673,40676,40684,40685,40694,40756,40761,40820,40849],"fǔ":[20086,20428,20443,20463,24220,24355,25242,25290,25771,26023,26920,28367,28964,29995,30425,31776,33104,33105,34565,36628,36741,37081,37340,37345,38429,38955,39732,40700],"shā":[20087,21798,26432,26732,27578,27630,29440,30183,30722,30832,32023,32378,32433,34097,35039,37801,38121,38327,39679,39782,39882,39883,40104],"nǎ":[20088,38635],"qián":[20089,20097,20209,20546,21069,22680,23178,23698,25297,25518,27049,27244,27500,28507,28508,28659,28746,31645,33893,34388,36577,37392,37463,37549,37666,37766,38052,38065,38067,38764,39450,39453,39980,40660,40666],"suǒ":[20090,21794,21993,25152,26267,28305,28345,29712,29713,29795,32034,35112,37782,37819,37825,38145],"yú":[20091,20110,20112,20227,20313,22563,22572,22948,23067,23087,23089,23337,23859,23886,23899,24858,25205,25540,26079,26977,26992,27014,27428,27464,27487,27510,28180,28189,28257,28417,28574,29263,29427,29591,29593,29788,29877,30402,30574,31404,31485,31813,32685,33140,33278,33281,33286,33349,33584,33838,33848,34125,34331,34398,34422,34643,34744,34919,35093,35238,35278,35547,35619,35840,36400,36671,36701,36926,37016,37201,37725,38533,38611,38633,39192,39296,39455,39596,39619,39770,39779,39869,39922,39941,40060,40416,40454,40821],"zhù":[20092,20267,20295,20303,22398,22712,22772,23872,25280,26492,26609,27174,27574,27880,28855,30128,30493,31069,31081,31450,31599,31672,31723,31767,32053,32056,32443,32668,32741,33486,33671,34496,35387,36015,36142,36307,36596,37458,37619,37956,38136,39349,39376,39547],"zhě":[20093,32773,35126,35189,36205,36407,37754,38167],"qián gān":[20094],"zhì luàn":[20095],"guī":[20096,22317,22955,23215,23266,23296,24112,24402,25707,26909,27131,27132,27383,27512,29674,29808,29853,29900,30344,30625,30789,33573,34348,35215,35268,37053,37068,38312,38394,39465,39734,39737],"lǐn lìn":[20099],"jué":[20101,20915,21012,21122,21303,21413,22090,23378,23379,23835,23851,23973,24399,24992,25008,25092,25225,25367,25496,25899,26743,27227,27228,27438,27666,27770,28749,28979,29094,29201,29236,29237,29527,29571,29606,29608,29647,29812,30234,30669,30689,30724,32085,32118,32477,33220,33461,34141,34152,34419,34792,34793,35286,35310,35324,35363,35662,35776,35890,35996,36221,36233,36471,36521,37388,37901,37917,38017,38242,40194,40195,40418],"le liǎo":[20102],"gè mā":[20103],"yǔ yú":[20104,25049],"zhēng":[20105,20290,20967,22979,23196,23781,23837,23842,24449,24496,28833,28893,29229,29424,29465,30309,30480,30529,30556,31581,31631,31708,32839,33024,33976,36397,37478,37658,37875,39687],"èr":[20108,21045,21665,24333,24336,27186,35456,36014,36019,36144,39670],"chù":[20109,20631,20746,24629,25015,25616,26038,27484,29695,29729,30679,31436,32064,32460,33221,35302,35320,35926,37136,38310,40668],"kuī":[20111,21042,23743,24011,30420,31397,31418,32871,34407,38362,39005],"yún":[20113,20253,21243,21248,22249,22936,24874,25251,26112,27218,27780,28066,28339,28560,29065,30023,31184,31612,31700,32028,32284,32429,32792,33464,33975,34131,37095,37142,37574,38642],"hù":[20114,20913,21952,22171,23135,23277,23278,23733,24077,24342,24601,25142,25143,25144,25149,25160,25252,26120,27124,27789,27818,28396,29097,29920,31068,31503,31748,31888,32148,34096,35703,35952,37152,37721,38912,40047,40160,40184,40460,40561],"qí":[20115,21080,22524,23696,23699,23822,23900,24877,25489,25993,25994,26050,26071,26826,26827,27313,27328,27495,28103,28637,29449,29570,29734,29738,29826,30054,30119,30849,30869,31041,31048,31098,31141,31442,31791,31793,31823,31928,32165,32166,32949,33040,33229,33385,33450,33793,33813,34162,34244,34308,34449,34458,34548,34589,34590,34727,34832,35072,36573,37183,37358,37665,38172,38509,38926,39040,39438,39439,39481,39568,39569,39696,39743,39893,39981,40111,40141,40312,40320,40594,40609],"jǐng":[20117,20742,21037,21060,22355,23441,24156,25004,26299,27532,27755,27756,28555,29828,29855,29861,31357,32956,34812,35686,38449,38938,38968],"sì":[20118,20288,20385,20777,20821,21987,22235,22994,23088,23392,23546,24051,26614,27065,27740,27863,27876,27917,27936,28056,28675,29293,31040,31145,31458,31525,32796,32898,32902,34172,35223,35972,37362,37430,37435,39140,39164,39282,39391,39427,39543],"suì":[20119,23320,23681,23895,26078,27286,27506,27507,28603,29035,29159,29874,30741,30862,31071,31149,31298,31319,31327,32320,32336,32376,35162,35510,35682,35847,36069,36995,37894,37929,38567,38882],"gèn":[20120,20121,25583,25604,33563],"yà":[20122,20124,20473,20916,21148,22292,22304,22497,23045,23149,25568,27689,27692,29373,30737,31247,32848,35198,35200,35357,35766,36711,36819,40830],"xiē suò":[20123],"qí zhāi":[20125,40778],"yā yà":[20126,21387,22445,22739,38100],"jí qì":[20127,28943],"tóu":[20128,25237,38957,39600],"wáng wú":[20129],"kàng háng gāng":[20130],"dà":[20131,30484],"jiāo":[20132,20716,23047,23308,23783,23957,23971,24973,26898,27975,28550,28966,30977,31322,31781,33014,33184,33202,33581,33582,34121,34400,34527,34797,36324,36679,37066,37902,39509,39556,39851,40091,40257,40422,40430,40554],"hài":[20133,21968,23475,27686,39168,39258,39405,39412,39559],"hēng pēng":[20136],"mǔ":[20137,22982,23764,25287,27597,29281,29299,30018,30022,30034,30045,30046,30062,30762,32991,36359,37479],ye:[20138],"xiǎng":[20139,20143,21709,24819,26193,34435,34817,38911,39144,39177,39255,39287,39837,39895,40054,40094],"jīng":[20140,20144,20834,22357,22361,23131,24778,26060,26061,26230,27256,27902,28039,29444,30555,31188,31241,31923,31934,32076,32147,32161,32857,33096,33550,33606,33610,33729,33871,39514,39912,40120,40321,40324,40598,40608,40753],"tíng":[20141,20572,23159,23881,24237,24311,26975,27059,31603,32868,33691,33910,34579,34639,35562,37010,38662,40750],"liàng":[20142,21928,24738,26238,28280,35538,35845,36620,36635,36742,37700],"qīn qìng":[20146,35242],"bó":[20147,20194,20412,20720,21338,24091,24893,25066,25388,25615,27394,28001,28159,28196,29055,29268,29403,29917,31028,31201,31636,31769,31978,32969,33046,33162,33334,33354,33825,33895,34991,35151,35182,35592,36387,37091,37432,37457,37581,37787,37998,38073,38082,38216,39226,39310,39323,39326,39361,39406,39539,39622,40275,40513],"yòu":[20148,20305,20326,20369,21448,21491,21706,21760,22271,23031,23461,23775,24188,29398,31056,34484,35480,35825,35969,36854,37229,37321,40748],"xiè":[20149,20275,20574,20592,20673,21352,21368,22119,22638,22801,23199,23633,23655,24296,24482,25032,26284,26800,27021,27053,27899,27945,28203,28581,28681,28707,28794,28839,28840,29166,29205,29548,31044,31164,31951,32050,32079,32108,32370,32392,32449,32567,34210,34212,34809,34831,35081,35131,35613,35874,36510,36994,38782,38896,40770,40792,40795,40805],"dǎn dàn":[20150,39358],"lián":[20151,21126,21298,21299,22009,22098,22849,22889,23294,24088,24265,24604,24976,28063,28451,28610,28627,28718,29073,29163,31806,31842,31848,32314,32756,32852,32872,32875,32878,32879,33217,33714,34030,34197,34698,34826,35042,35123,35229,35632,36453,36830,36899,37772,37934,38256,39697,39985,40098],"duǒ":[20152,21722,22194,22517,23836,26421,26422,32158,32525,36243,36529,36530,36547],"wěi mén":[20153,26006],"rén":[20154,20155,20161,22764,24520,24526,26418,31170,33442,39772,40256],"jí":[20156,20157,20235,20342,20590,21337,21363,21373,21450,21469,21513,22578,22601,23006,23241,23692,23924,23983,24438,24547,24613,24881,25122,25572,26497,26840,26987,26997,27081,27293,27547,27762,28242,28503,30142,30240,30349,31496,31679,31821,32026,32423,33164,33381,33978,34112,34170,34637,34703,35147,35289,35899,36374,36432,36516,36655,36698,36753,37062,37537,37715,37878,38598,38631,38709,40545],"wáng":[20158,20220,20838,33699,34463],"shén shí":[20160],"lè":[20162,21499,24519,27707,27856,29583,30771,31765,33403,38430,38903,39182,39987,40051,40147],"dīng":[20163,21486,24068,29582,30100,30447,32821,34416,38762],"zè":[20164,23857,24194,25425,26115,26135,27716],"jǐn jìn":[20165,20677,23268],"pú pū":[20166],"chóu qiú":[20167],"zhǎng":[20169,24165,25484,30979],"jīn":[20170,22587,24062,24781,26020,27941,29650,29755,29857,30747,31563,33621,34943,35167,35284,37329,37330,37375,38021,40566,40645],"bīng":[20172,20178,20853,20907,20912,25508,27703,37618],"réng":[20173,31037,33471,36792,38526],"fó":[20175,22386,26811],"jīn sǎn":[20176],"lún":[20177,20262,20374,20523,22261,22279,23144,23832,23833,26822,27814,28138,30958,33088,33749,34598,36378,36650,36718,37632,38511,39913],"cāng":[20179,20218,20489,20948,23906,27815,28356,28664,29514,33329,33369,33485,33980,34725,40487],"zǎi zǐ zī":[20180],"tā":[20182,22604,23427,27033,28347,29280,31042,35103,36287,36962,38375],"fù":[20184,20585,20613,20904,21103,21648,22399,22797,22919,23142,23181,23316,23500,24489,26929,31060,31139,31438,32238,32283,32538,33145,33839,34151,34489,34519,34652,34670,34973,35079,35204,35206,35331,35394,35747,36e3,36070,36091,36127,36171,36185,36212,36665,37713,37730,38428,38468,39333,39385,39544,39826,39954,40075,40134],"xiān":[20185,20186,20321,20682,20722,20808,22037,22910,23667,24303,24570,25016,25472,26297,26484,27673,29655,31046,31176,31868,32330,32398,32406,33518,35132,35187,36345,36462,36506,37232,37697,38184,38895,38897,39334,40059,40369],"tuō chà duó":[20187],"hóng":[20188,21552,22444,22917,23042,23439,23446,24344,24395,27759,27859,27946,28004,28209,28482,29586,29596,30804,31441,31460,31690,31904,32024,32045,32139,32430,32707,32733,32830,33520,33645,33874,33875,35897,35900,37404,37495,37584,38286,38387,38672,38687,38787,39775,40251,40511,40649,40652],"tóng":[20189,20319,21699,23746,23773,24221,24420,26189,26312,26704,27651,28021,28540,29341,29534,30510,30643,30780,31217,31461,31905,33191,33596,34450,35447,36200,37230,37462,37493,37509,38108,39175,39846,40086],"rèn":[20190,20205,20995,20996,22922,23001,23675,23683,25192,29283,31053,32009,32029,32077,32427,32436,32917,33101,34941,34997,35346,35469,35748,35761,36564,36715,37395,38765,38769,38860,38887,39146,39169,39274],"qiān":[20191,20325,20681,21315,22322,22903,23407,23693,24749,24838,24947,25190,25322,25652,25729,25872,25873,25875,26436,27343,27736,27751,29301,29309,31439,31614,31805,31830,31844,31873,33418,33598,34440,35120,35536,35609,35878,35896,36801,36983,37370,37382,37467,37874,38030,38433,38854,38981,39467,39582,39708,39709,40302,40528],"gǎn hàn":[20192],"yì gē":[20193],"dài":[20195,20386,21447,22408,22509,23729,24082,24102,24111,24118,24279,24608,25140,26307,26571,27526,28731,29619,29767,29977,31780,32063,32255,32464,33372,34675,34955,35190,36003,36151,36443,36561,36570,36585,36714,36840,38708,38726,40207,40667,40689],"lìng líng lǐng":[20196],"chào":[20198,32790,35288],"cháng zhǎng":[20199,20815,38263,38271],"sā":[20200],"cháng":[20201,20607,20767,22039,22160,23270,23581,24120,24476,29818,29946,29982,32928,33144,33171,33484,33799,38264,40040,40127],"yí":[20202,20359,20736,20893,21276,21670,22319,22839,23016,23440,23452,23463,23538,23763,23980,23991,24056,24411,24412,24413,24414,24609,24670,25157,26246,26648,26924,26936,27778,27935,29098,29941,30157,31227,31747,31822,32672,33008,33811,34534,34708,35322,35643,36029,36155,36320,36859,36986,37844,38921,38948,38949,38986,39056,39284,39847,40250],"mù":[20203,20969,21215,22675,24149,24153,24916,24917,26286,26287,26408,26968,27619,27792,28817,29287,29383,30446,30566,31302,33362,33500,33711,34462,37484,38076,38638,38658],"men mén":[20204],"fǎn":[20206,21453,27214,36820],"chào miǎo":[20207],"yǎng áng":[20208],"zhòng":[20210,20247,22585,22933,23185,29382,30526,31052,31575,33597,34459,34886,34934,35557],"pǐ pí":[20211],"wò":[20212,20563,21351,23177,24132,25569,26947,27779,28197,28643,29889,30595,30826,32927,33115,33253,40823,40844],"jiàn":[20214,20468,20581,20717,21073,21091,21105,21133,21134,21138,21140,22713,23499,24314,24484,25846,26068,26967,27645,27914,28071,28567,29294,29652,30647,30965,30976,31661,31947,32349,33137,33270,33328,33382,33616,34214,35256,35539,35563,35675,35855,36046,36068,36145,36253,36341,36368,36410,36702,37492,37747,37749,37937,37969,37970,37996,38003,38190,38291,39198,39279],"jià jiè jie":[20215],"yǎo fó":[20216],"rèn rén":[20219],"fèn bīn":[20221],"dī":[20222,20302,21874,22494,22564,23739,24445,27136,28404,30974,31210,32669,34971,36230,38532,38830],"fǎng":[20223,20515,26058,26121,26136,29932,30470,32033,32442,33323,35370,35775,39651,40365],"zhōng":[20224,21027,22928,24146,24440,24544,26570,27767,27848,28802,30405,31846,32066,32456,33327,34080,34585,34724,34749,34931,34935,36465,37409,37758,37912,38047,38202,40228,40744],"pèi":[20226,20329,23029,24084,26046,26054,27803,28031,29678,34012,36705,36756,37197,38664,39351],"diào":[20228,21514,24340,25481,30265,30404,31374,31413,31464,35339,37347,37407,37553,37629,37955,38035,38110,38655,39777],"dùn":[20229,28513,28822,29129,30462,30744,30903,36402,36871,36929,36975,37389,38045],"wěn":[20230,21006,21563,21573,25222,26749,31283,31311,31337,32010,32947,33047],"xǐn":[20232],"kàng":[20233,21279,22245,25239,28821,37415,38058],"ài":[20236,20734,22631,22738,23250,23329,24859,25043,26279,26326,29233,29815,29862,30375,30649,30777,30795,30861,31001,34182,35706,36089,37952,38552,38729,39218,39332,40043,40241],"jì qí":[20238,34234],"xiū xǔ":[20241],"jìn yín":[20242],"dǎn":[20244,21008,25762,29612,29933,32030,32966,33213,34932,36071,36181,40661],"fū":[20245,21579,23056,23413,23555,24612,25071,25975,26057,29598,30726,31235,31583,31952,32146,32932,33178,33602,33652,34925,36282,36311,37022,37148,37212,37383,40617,40620,40625,40632],"tǎng":[20246,20645,20795,22507,25091,26349,29219,30680,36538,37810,38018,38219],"yōu":[20248,20778,21606,22168,23795,24189,24551,24736,24962,25912,27340,28410,28672,32395,32682,32816,36876,37182,40576],"huǒ":[20249,22821,28779,29047,37033,37413,38060],"huì kuài":[20250,26371,27981,29871],"yǔ":[20251,20417,20451,20554,20660,21292,22131,22276,22281,23431,23513,23679,23996,24254,25383,25940,26014,26944,29760,30224,31076,31161,31333,31411,32701,33287,33837,35984,37125,38952,40588,40812,40841],"cuì":[20252,21851,24560,24756,27635,28140,28960,30121,30209,31425,31883,31929,32035,32183,32710,32736,33027,33030,33082,33196,33205,33230,33795,35146,38983],"sǎn":[20254,20632,31972,32342,39242,39315],"wěi":[20255,20266,20553,20605,20702,20784,23059,23530,23639,23843,23945,24491,24839,25444,26256,26806,27943,27992,28200,28828,29010,29477,29614,29771,30207,32239,32428,33138,33353,33435,33479,33649,33806,33894,33933,34111,34620,35529,35839,36371,37729,38865,38873,38881,38890,38944,39097,39593,39594,39595,39850,40084],"chuán zhuàn":[20256,20659],"chē jū":[20257,20453,36554,36710],"yá":[20258,21393,21395,22544,23688,23829,23830,28079,28420,29273,29601,29706,30554,31500,33469,34460,34905,40790],"qiàn":[20259,20436,20521,20761,21003,22733,23345,24723,26824,26912,27111,27424,27465,30360,31695,31711,32308,33441,33960,34099,36644],"shāng":[20260,20663,21830,22674,24943,27527,27556,28403,28449,29109,34063,34730,35294,35316,35626,39738],"chāng":[20261,20480,23100,26124,26905,28112,29462,29737,33750,35054,37673,38176,38326,38410,39911,40115,40730],"chen cāng":[20263],"xùn":[20264,20378,21314,22080,24058,24061,24455,24891,27529,27582,27739,28512,29413,34120,35338,35347,35353,35757,35759,36805,36863,36874,36956,37954,39016,39348,39535],"xìn":[20265,22239,23390,33066,33291,34885,35371,37313,38432,38998],"chǐ":[20268,20360,21366,21498,21582,22417,24677,27503,32827,32916,32995,34439,35053,35115,35913,37497,40786,40831],"xián xuán":[20269],"nú nǔ":[20270],"bǎi bó":[20271],"gū gù":[20272],"nǐ":[20273,20320,20766,23412,25311,25836,26062,26226,29396,33512,34239,38572],"nì ní":[20274],"bàn":[20276,21150,21322,22981,24593,25198,29923,31194,32070,32458,36774,37473,38781],"xù":[20277,20368,21206,21207,21369,21465,22463,22779,23167,24207,24676,25933,25944,26093,26155,26370,27090,27440,27528,27775,27776,27947,28294,28469,28490,28869,28924,29030,29533,29676,30434,30593,31288,32110,32154,32210,32214,32396,32490,32493,32851,32863,33988,34266,35385,36041,37207,38922,40046],"zhòu":[20279,20733,20881,21610,21650,21678,23449,26172,26205,29955,30385,30394,31808,31826,31829,31897,32002,32272,32419,32457,32964,33646,33892,35403,37198,39374,39519,39588],"shēn":[20280,20353,20831,21627,22548,22973,23072,23678,23799,25183,25938,26321,26587,27680,28145,29130,29637,29985,29991,30003,30482,30775,31356,31862,31864,31938,32051,32453,32601,32615,33888,34017,34072,34195,35025,35383,35445,35804,36523,39402,39891,39925,39994,40121,40290],"qū":[20281,20297,21284,21631,22373,23624,23702,23732,23943,24968,25278,25978,27968,28992,31067,31553,31916,32992,34502,34512,34986,35259,35416,35790,36237,36527,36544,38457,39366,39368,39493,39537,39671,39804,39992,40011,40332,40623,40628,40633,40674],"sì cì":[20282],"bēng":[20283,22051,22879,23849,23917,38285],"sì shì":[20284],"jiā qié gā":[20285],"yǐ chì":[20289],"diàn tián":[20291,38079],"hān gàn":[20292],"mài":[20293,21154,21233,21334,21787,22770,33032,34887,36067,36808,36993,38689,38690,40613,40614],"dàn":[20294,20708,21846,21847,21887,22089,22186,24078,25018,26086,26598,27694,27786,27897,28129,29402,30093,30298,31147,31390,33093,33807,34014,34507,34577,35291,35345,35477,35806,36105,38702,39204,39247,39411,39655,40224],"bù":[20296,21199,21541,21656,22487,22496,24067,24269,24598,24721,27493,27496,27497,29951,31728,33657,34048,36356,37096,37110,37384,38042,39202],"bǐ":[20298,20478,21269,22838,22947,24444,26428,26560,27604,27614,27800,30101,31189,31508,31558,31875,32859,33325,35983,37145],"zhāo shào":[20299],"cǐ":[20300,27492,27866,30345],"wèi":[20301,21355,21619,21890,22683,23206,24944,25024,26410,28205,29023,29101,29338,29484,30031,32237,32635,32963,33535,33739,34287,34358,34655,34737,34907,34910,35133,35586,35718,35727,35859,36503,36507,36558,36682,37839,38696,39207,39221,39254,39759,39815,40154],"zuǒ":[20304,24038,32339],"yǎng":[20306,20639,20859,22385,23711,24899,25065,25857,27687,27697,28852,30162,30306,31010,32059,34630,36590,39178,39386],"tǐ tī":[20307,39636],"zhàn":[20308,20577,23960,25112,25126,25136,26632,26719,26855,28251,31449,32187,32509,33754,34360,34405,34406,35687,36687,39503],"hé hē hè":[20309],"bì":[20310,21639,21716,22006,22354,22555,22721,22896,22972,23138,23318,24065,24163,24164,24199,24243,24294,24330,24379,24380,24387,24517,24621,24842,24846,25949,25987,26768,27605,27606,27609,28258,28375,28397,28535,29007,29082,29428,29528,29529,29644,29863,30016,30050,30122,30201,30202,30357,30564,30887,31578,31621,31622,31718,31731,31882,32188,32298,32372,32636,33143,33534,33628,33798,33822,34006,34045,34109,34204,34572,34960,35141,35166,35171,35313,35414,35792,36017,36116,36177,36344,36437,36483,36484,36991,37042,37160,37162,37453,37838,37940,38091,38279,38281,38303,38381,38491,38880,39158,39238,39325,39388,39494,39616,39763,39813,40413,40425,40714],"tuó":[20311,22376,22582,23726,27094,27216,27825,30755,30756,30882,32061,35409,36302,37217,38436,38464,38465,39389,39390,39464,39506,39517,39548,39808,40213,40501,40713,40717,40743],"shé":[20312,33292,34421,34533],"yì dié":[20314,26163,27846,36604],"fó fú bì bó":[20315],"zuò zuō":[20316],"gōu":[20317,27807,28317,30144,31709,31804,32241,32529,34983,35104,37390,37476,38057,38834,38877],"nìng":[20318,20395,20543,23509,27870,28573,28632],"qú":[20322,21164,25141,26026,27403,27412,27661,28141,28744,29216,29846,29865,30319,30962,31847,32071,32970,33246,33731,33867,34134,34343,34781,34871,34876,34896,34914,36515,36581,38010,40221,40476,40498,40745],"yōng yòng":[20323],"wǎ":[20324,21651,30745,37047],"kǎ":[20327,22448,33001,35011,37490],"bāo":[20328,21241,21253,23394,29042,31523,32990,33502,34132,35046,35090,35139,38337,40793,40837],"huái huí":[20330],"gé hè":[20331],"lǎo":[20332,21694,24645,26675,29419,29679,30803,32769,32770,33622,34543,36689,37536,38097,39857],"xiáng":[20333,24224,26649,31077,32116,32724,35443,36333],"gé":[20334,21260,21572,21981,22629,24837,25356,25663,27077,27338,28358,33160,33269,33558,35297,35581,36661,36693,38307,38401,38548,38839,38864,38874,39444,39612,39855],"yáng":[20335,21175,22431,23864,24457,25196,25562,25965,26104,26140,26264,26472,26954,27915,28800,29660,30113,30221,30523,34520,35577,36656,37722,38038,38438,38451,38525,38711,39098,39119,39953,40249,40457],"bǎi":[20336,25453,25670,25850,26658,30334,31457,31912,35180],"fǎ":[20337,23772,27861,28747,30749,37701],"mǐng":[20338,20949,23027,24911,37225],"èr nài":[20340],"hěn":[20343,24456,29408,35434],"huó":[20344,27963],"guǐ":[20345,21286,21293,21420,22429,23037,23428,24203,24234,24657,26231,28224,30328,31082,31755,34539,34785,35300,35437,35809,36556,36712,38482,39740],"quán":[20346,20840,21875,22498,23038,23761,24015,25331,25660,26435,27006,27177,27402,27849,27940,28278,29303,29320,29780,30154,30786,31564,32275,33603,33906,34615,34872,35296,35438,35808,36327,36385,36615,36737,37275,37523,38120,38350,39028,39079,39401,39457,39688,39937,40136,40804],"tiāo":[20347,24227,26091,31079,32846],"jiǎo":[20348,20748,23362,25378,25605,25759,25785,25898,25963,25981,25983,26184,26270,26322,28762,29150,29409,29868,30350,30374,32094,32400,32478,33139,33259,34780,35665,36043,36363,37496,38128,39171,39290,40014,40867],"cì":[20349,21054,24219,26431,26664,27425,32088,33574,33727,34515,34694,36060,36176],"xíng":[20352,21009,21720,22411,23065,24418,27920,30798,34549,37026,37065,37379,37494,37522,38040,38095,38473,38488,39219],"tuō":[20354,21635,21660,22315,25176,25301,25302,27729,33067,33073,33676,34981,35351,35756,39141,39270,39776,39861],"kǎn":[20355,20568,20890,22350,24770,30733,33712,36641,36695,38993],"zhí":[20356,20516,20540,22516,22519,23018,23298,25120,25191,25709,26893,27188,28116,28432,30452,31107,32119,32310,32832,32844,32887,33201,34777,36310,36399,36448,36497,36548,37342,39357],"gāi":[20357,22419,23007,23760,26192,30049,31092,33604,35442,35813,35941,36037,36044,36165,38484],"lái":[20358,20459,20488,23811,23821,24242,26469,26814,26870,28062,28150,29453,29724,31577,31618,33713,33802,36904,37106,37688,38140,39435,39904,40326,40627],"kuǎ":[20361,21685,22446,37529],"gōng":[20362,20844,21151,21265,21268,22632,23467,23470,24037,24138,24339,24685,25915,26459,30909,31996,31999,32945,35301,35317,36524,36531,39672,40852,40858],"lì":[20363,20432,20458,20616,20782,20791,20947,21033,21147,21169,21237,21382,21385,21412,21423,21426,21459,21519,21590,21774,21811,22182,22215,22364,22619,22754,23091,23151,23668,23718,24743,24759,24900,25150,25646,26278,26310,26334,26424,26533,26627,26647,26651,27306,27348,27370,27408,27508,27511,27813,27828,28054,28327,28671,28701,29199,29345,29441,29653,29806,29893,29905,29925,30124,30178,30311,30445,30553,30725,30778,30782,30975,31018,31019,31024,31154,31197,31435,31520,31717,31890,31901,31986,33079,33480,33560,33620,33669,33673,33946,33950,34294,34488,34510,34528,34599,34679,34823,34851,35400,35720,36210,36706,36707,36729,37192,37469,38582,38583,38643,38722,38731,39681,40168,40215,40389,40604],"yīn":[20364,20944,21905,22142,22233,22240,22420,22553,23035,23139,24852,24903,26678,27684,27911,28341,28646,30230,31115,31221,31555,32106,32248,33589,33937,34093,35008,35570,37542,38111,38345,38437,38452,38512,38523,38530,38674,38688,38791,38899,38910,39408,39555,40791],"mǐ":[20366,23370,24365,25929,27939,28211,28758,31859,31886,32651,33042,33416,33886,34077,37540],"zhū":[20367,26666,27104,27237,27367,27371,27929,28532,28710,29482,29664,30787,31228,32081,33585,34127,34523,34667,34857,35006,35461,35576,35803,35832,35948,36326,37054,37526,38114,39407,39842,39930,40248,40708],"ān":[20370,20579,23189,23433,23766,24245,26697,27688,30438,30443,33124,33780,33851,33866,34029,35485,35571,35865,38796,38797,38909,39331,39839,40298,40341,40524],"lù":[20371,20679,21198,21216,22309,22388,22646,23101,23757,24280,24404,24405,25134,25693,26882,27162,28117,28133,28172,28425,28510,29741,29840,29994,30429,30569,30793,31103,31108,31249,31307,31635,31759,31788,31797,31798,31833,31926,34061,34135,34370,34736,36034,36162,36258,36335,36379,36439,36613,36678,36738,36760,36911,37249,37636,37682,37684,37876,38520,39428,39484,39909,40252,40294,40305,40442,40557,40575,40595],"móu":[20372,21178,24648,30520,34513,35584,35851,36366,37738,40254,40624],"ér":[20373,20799,20816,20818,23759,26669,27919,31915,32780,33017,33611,35003,36608,36700,38481,38573,39669,39838,40085,40239,40504],"dòng tǒng tóng":[20375],"chà":[20376,22908,23033,23700,27722,35435,35815],"chì":[20377,20666,21189,21201,21489,21883,24435,24668,24919,24975,25048,25270,25941,26021,26456,28225,28795,28861,28926,29118,30163,30200,30235,32708,32709,32740,32744,33119,36196,36265,36971,37459,38644,39149,39276,40338,40408],"gòng gōng":[20379,20849],"zhōu":[20380,21608,21900,24030,24479,27954,28109,28863,28880,29656,30698,33311,35589,35704,35788,36057,36178,36616,36630,36736,36913,37102,37506,38668,39410,39430,40259,40508],"rú":[20382,20754,22149,22914,23340,23418,24100,26328,26695,28202,28641,31566,33593,34144,34231,34657,34837,35005,35174,37018,37305,37539,38135,39020,39077,40044,40209,40253],"jiàn cún":[20383],"xiá":[20384,20448,21283,23777,23805,25966,26247,26585,28832,28890,29390,29421,29433,29672,29781,30806,30820,30892,31083,31594,32278,32712,33309,33338,34168,36206,36676,36758,36944,37724,37771,38492,38527,38686,39458,39803,40375,40672],"lǚ":[20387,20406,20770,21525,21570,23649,23650,23653,25364,25435,26053,26784,28946,31075,31238,31341,32125,32311,32533,33154,33168,35099,35128,37080,37569,38109],ta:[20388],"jiǎo yáo":[20389,20709,24506],"zhēn":[20390,20597,23498,24103,24106,24128,25656,26015,26722,26984,27035,27196,27549,27976,28254,28519,28597,29513,29645,29646,29799,29956,30494,30495,30759,30890,31087,31118,31131,31668,32983,33275,33908,33942,33985,34237,35998,36126,36675,36937,37209,37341,37441,37681,37756,38024,40053],"cè zè zhāi":[20391,20596],"kuài":[20393,20744,20983,21721,22130,22310,22359,22602,24028,24293,24555,26077,27443,29423,29546,31607,31977,33037,33214,37072,37174,40032,40089],"chái":[20394,20757,21901,26612,29362,31073,35962],"nóng":[20396,20738,20892,21725,22117,27266,27393,27987,28611,29174,31151,31230,31328,33043,33215,34173,35163,35688,36786,36787,37298,39710],"jǐn":[20397,20760,21370,21418,24057,27135,28428,29822,32039,32202,33771,34035,35641,35880,37670,38182,39241,39313],"hóu hòu":[20399,30694],"jiǒng":[20400,20690,20879,22247,27842,28547,28847,28913,29018,29019,29106,29147,31384,32151,35111,36837,36872,38984,39054],"chěng tǐng":[20401],"zhèn zhēn":[20402,25557],"zuò":[20403,20570,21777,22352,23709,23710,24231,31066,31987,32985,33859,33860,34009,34959,38460],"qīn":[20405,20819,23175,23898,23956,27453,34942,35483,38054,38985,39416,39566,39868],"jú":[20407,21881,23109,23616,24008,26888,27224,27878,28119,28264,28951,29329,29386,31927,33738,34332,36252,36348,36459,36610,37113,38320,39414,39527,40281,40308,40362,40752,40755],"shù dōu":[20408],"tǐng":[20409,22306,23063,25402,28047,28918,29693,33057,33351,35476,38962,39051],"shèn":[20410,24892,24910,26138,28033,28183,28402,30214,30254,30488,31091,32958,32962,33060,33102,34563,34564,37600],"tuì tuó":[20411],"nán":[20413,21891,23066,25257,26260,26511,26591,26976,30007,30040,33710,33843,36950],"xiāo":[20414,21715,22069,22203,22210,23115,23471,23477,24232,24391,25585,26541,26549,26783,27385,27466,27594,28040,28487,28703,28785,28786,28875,28935,29447,29538,30170,30175,30813,30819,31385,31659,31768,31787,32131,32481,32731,33198,33831,34157,34376,34387,34754,34767,34800,34856,36355,36877,37559,38144,38660,39093,39501,39553,39623,39632,39752,40222,40245,40397,40494],"biàn pián":[20415,32246,32527],"tuǐ":[20416,33151,36422,39613],"xì":[20418,21304,21324,21612,22669,23619,23635,23661,24549,24620,24644,26910,28509,28511,28569,29058,29332,30966,31114,32048,32140,32280,32454,32484,33283,33284,34158,34409,34891,35236,36201,36231,37092,37363,38411,38553,38559,38716,39228,39273,39721,40662],"cù":[20419,23208,25009,29469,30212,30255,31751,32300,33064,34079,35470,36247,36391,36415,36441,36468,36469,37259,39011,40704],"é":[20420,22254,23077,23753,23784,23785,28048,29684,30354,30539,30912,33706,35355,35472,35660,35769,36823,37387,37608,38151,38943,38989,39069,39780,40285,40286,40517],"qiú":[20421,21492,21778,22234,23863,24047,24048,25167,26754,27535,27628,27714,27731,27845,27991,28269,29034,29360,29580,29699,29830,30387,30426,32012,32127,32909,33409,33677,34412,34415,34551,35032,35283,35305,35332,35333,36053,36167,36878,36881,36946,37195,37338,37371,37558,38916,39810,39876,39997,40765],"xú":[20422,24464,31121],"guàng kuāng":[20423],"kù":[20424,21950,22195,24211,24235,24292,30228,32093,32468,34996,35044,35122,37239],"wù":[20425,21153,21209,21247,21372,22366,22626,22886,23162,23524,23676,23689,23912,24546,24734,24735,24750,25098,25188,26212,26444,28329,28944,29059,29289,30182,30713,31417,31877,34305,35492,35823,37576,38434,38550,38654,38682,38695,38768,39446,39579,40361,40540,40767,40768],"jùn":[20426,20737,21569,22472,23535,23803,25039,25411,25887,26201,26846,29127,29690,30063,31459,31647,34592,36048,37089,38486,39189,39298,39423,39567,40276,40277,40280],"liáng":[20429,22682,26753,26891,27153,31918,31921,31975,33391,36652,36748],"zǔ":[20430,21800,29244,31062,32068,32452,35419,35781,37818,38459,38779],"qiào xiào":[20431],"yǒng":[20433,21191,21192,21647,22471,22606,23921,24430,24634,24703,24704,24805,24849,24889,24898,26593,26640,27704,27891,28263,29996,34553,35424,36362,36404,39890,40108],"hùn":[20434,20529,22274,23585,24897,25485,28343,28957,30580,35304,35554,35816],"jìng":[20435,20665,22659,22924,23129,23143,24362,24371,24452,24465,25964,26324,26737,26807,27972,28702,29517,30153,30169,31454,31455,31467,31478,31480,33003,33051,33686,35497,36353,36851,36885,37857,38236,38742,38745,38748,40283],"sàn":[20437,38288],"pěi":[20438],"sú":[20439],"xī":[20441,20694,20846,20958,21349,21376,21560,21775,21821,22075,22095,22193,22805,22874,23302,23305,23638,23904,24007,24076,24454,24495,24687,24713,24725,24769,24796,26132,26206,26224,26227,26342,26512,26744,27069,27176,27200,27447,27685,27728,28e3,28101,28179,28330,28911,28929,28936,28959,29060,29064,29081,29113,29114,29115,29160,29204,29306,29312,29344,29351,29707,30236,30361,30542,30630,30717,30802,30926,30978,31232,31352,31416,31902,31974,32198,32357,32690,32725,32726,32952,32953,33181,33342,33667,33765,33952,34597,34693,34763,34869,35199,35321,35325,35327,35654,35903,35904,35944,35951,35989,36197,37020,37134,37189,37295,37368,37675,37869,37898,38004,38177,38581,39183,39246,39291,39889,40279,40450,40759],"lǐ":[20442,23052,23778,23794,26446,27418,28012,28583,29702,31036,31150,31924,35023,35041,35914,36902,37008,37300,37616,38146,39881,40039,40049,40100,40162],"bǎo":[20445,22562,23212,23453,23514,23539,23542,29668,32229,33862,34293,35091,36082,38732,39161,39165,39281,39362,40181,40199,40488],"yú shù yù":[20446],"sì qí":[20447],"xìn shēn":[20449],"xiū":[20450,20462,21691,24229,27143,28876,32670,33049,33065,33273,35973,37533,37760,39117,39240,39312,39652,39673,39860,40003,40258,40506],"dì":[20452,20569,20672,22474,22673,22700,23075,24093,24607,26099,26762,28941,29587,29963,30513,30535,30898,31094,31128,31532,32224,32532,33123,33730,33922,34069,34627,34669,34734,35558,35867,36406,36882,36883,36958,36976,37482],"chóu":[20454,20756,23334,24774,24833,25060,26662,29181,30068,30087,30359,31264,31609,31820,32082,32162,32504,33751,35446,35726,35728,36364,36490,37223,37228,37307,38612,38624,38630],"zhì":[20455,20587,20776,21046,21141,22401,23073,23512,24089,24092,24159,24226,24228,24268,24408,24463,24477,24535,24558,25061,25067,25347,25370,25527,25711,25842,26072,26186,26234,26633,26702,26813,27341,27355,27835,27959,28365,28382,28399,28492,28676,28825,29099,29438,29464,29839,29894,30164,30179,31017,31057,31209,31223,31258,31290,31305,31378,32041,32251,32622,32720,33187,33267,33268,33430,34541,34975,34976,35069,35231,35287,35311,35318,35468,35921,35922,36013,36074,36100,36136,36157,36337,36396,36499,36618,36734,37061,37517,37589,37973,38106,38183,38495,38578,38601,39396,39469,39482,39495,39576,39919,40217,40409,40503],"liǎ liǎng":[20457],"jiǎn":[20461,20537,20745,20943,21098,22591,24383,24389,25129,25132,25315,25400,25441,25536,25791,26535,26604,26776,26816,26908,27298,28187,28245,28733,29776,30545,30652,30839,30897,30982,31509,31591,31616,31777,32120,32365,32742,33575,34246,34834,35045,35143,35145,35194,35395,35591,35629,35710,35883,36284,36423,37911,39691,39950,40568,40571,40572],"huò":[20464,21663,22191,22207,22895,24416,24785,25110,25837,26084,26340,27316,27790,28273,28694,29554,30312,30483,30672,31096,31117,31339,31394,32815,33243,33383,33719,33958,34303,34838,35595,36008,36135,37699,37962,38252,38616,38669,38723,38852],"jù jū":[20465,25454,37624,38191],"xiào":[20466,20634,21177,21682,21742,21880,22027,22056,22063,23389,25928,25989,25990,27479,28045,29117,31505,35432,35487],"pái":[20467,24472,29260,29348,29445,31792,31794,36651],"biào":[20469,39998,40148],"chù tì":[20470],"fèi":[20471,21077,21406,21536,23645,24223,24259,24290,26162,26314,27360,27832,28663,29394,30280,32954,33801,36027,36153,37928,38212,38507,38725,40739],"fèng":[20472,20964,22857,28247,28968,29e3,36085,36183,40175,40179,40204],"ǎn":[20474,21813,22511,25566,32623,37544,38133],"bèi":[20475,20493,20573,20601,20633,20675,22791,24726,24811,24834,24970,26113,26774,28953,29292,29333,29384,29437,29692,29746,30874,31129,31954,33501,34003,34557,35097,35997,36125,36592,36649,36744,37046,37093,37121,37575,37950,38049,38785,38836],"yù":[20476,20773,21893,21929,21947,22495,22537,22954,23255,23507,23786,23950,24253,24423,24481,24840,24958,25131,26161,26843,26844,26859,27378,27406,27421,27442,27603,28020,28143,28394,28495,28582,28778,28980,29020,29135,29152,29225,29425,29508,29577,29721,30217,30290,30753,30818,30834,30983,30998,31004,31142,31191,31266,31286,31741,31838,31858,31894,32206,32621,32895,32896,33352,33419,33420,33567,33966,34019,34041,34167,34316,34591,34606,34988,35029,35465,35565,35709,35861,35947,36553,36621,36915,36935,36985,37057,37287,37434,37578,37669,37933,38064,38334,38408,38628,38705,38928,39044,39147,39239,39275,39341,39496,39533,39728,39729,39739,39754,40010,40191,40229,40231,40234,40274,40440,40466,40518,40556],"xīn":[20477,22138,22945,23324,24286,24515,24516,24571,24798,26032,26133,26490,27427,27462,28824,30458,34218,35362,36763,37028,37386,37573,37995,38156,39336,39339],"hǔ chí":[20479],"jiù":[20483,20710,21267,21275,21302,21417,21646,23601,24260,24271,24272,24934,25412,25937,26087,26601,26622,26709,27405,27559,30106,33276,33285,33290,39910,40434,40555,40596,40808],"yáo":[20484,20636,21954,22426,22575,23002,23217,23591,23597,23779,23970,23972,24493,25594,25622,25671,25727,26266,27043,28391,28881,29243,29498,29671,29796,29814,30936,31377,31407,31408,32948,34344,35616,35617,35875,36602,36730,36953,36965,37006,39012,39099,39126,39174,39194,39977,40025,40144],"cuì zú":[20485],"liǎng liǎ":[20486],"wǎn":[20487,21773,23113,24779,25405,26202,26213,26217,26236,26778,26880,29740,30073,30358,30412,30871,32169,32176,32510,33048,33814,36384,36627,37588],"zǒng":[20490,20588,20655,23928,24635,24803,25460,25603,25696,29162,32207,32235,32258,32317,34007],"guān":[20492,20851,23448,26874,30237,30287,31396,33924,38306,38359,38364,39973,40030,40143],"tiǎn":[20494,21818,24541,24767,26218,27524,28127,30547,33094,33300,35237,35277,36063,37674,39170],"mén":[20497,25194,25451,29834,33755,34379,37702,38036,38272,38277,38376],"dǎo dào":[20498],"tán tàn":[20499,22510],"juè jué":[20500],"chuí":[20501,22402,22464,25462,25637,26712,26864,27084,31648,33092,33753,37656,37786,38180,38514,38976],"xìng":[20502,22995,23134,23353,24184,24615,24763,26447,28076,32200,33238,33607,33685,33877],"péng":[20503,20656,22620,22643,24376,24969,25408,26379,26842,26902,27173,30844,31261,31484,31735,32388,33192,33411,34028,34325,34778,34779,34998,36643,37643,37981,38904,38908,39471,39676,39685,39700,40300,40527],"tǎng cháng":[20504],"hòu":[20505,21402,21518,22421,22560,24460,27913,33577,35934,36869,37064,39836,40031,40078,40088],"tì":[20508,21059,22159,22164,23625,23644,24716,24720,24789,24790,25147,25510,26367,26385,27474,27554,28053,29899,31545,31818,34201,35077,36886,36919,39664,39680,39684],"gàn":[20509,20942,24185,27046,27274,28134,28776,30448,32058,32448,35404,36113,36195,39597],"liàng jìng":[20510,38739],"suī":[20512,21752,22794,28374,28617,30509,30562,33429,33661,33662,34429,38614,38806],"chàng chāng":[20513],"jié":[20514,20604,20625,21030,21031,21052,21163,21180,21353,21354,23125,23211,23377,23690,23848,23909,23995,24e3,24175,25130,25463,25526,25838,26117,26466,26480,26688,26717,26988,26998,27044,27905,28368,28500,29412,30571,30989,31469,31680,32687,33709,34037,34531,34576,34840,34846,34877,34929,35002,35344,35440,35505,35750,36373,36860,37475,37755,38268,38945,39834,40082],"kǒng kōng":[20517],"juàn":[20518,21173,22854,24955,26698,28099,29431,29543,30519,30538,30560,32109,32121,32482,32613,32642,33091,34088,37124,39179],"zōng":[20519,22571,23447,23887,23893,24830,26401,26837,26934,29095,29475,30955,32195,32746,33113,33916,34668,35957,36392,36394,36452,37712,37953,39436,39459,39572,39683,39689,39735,39918,39932],"ní":[20522,22381,22527,23612,23636,24617,28131,29450,31870,32867,34477,34618,35308,35982,36316,36631,37107,37422,38092,38675,39324,39906,40117,40593,40815],"zhuō":[20524,25305,25417,26700,26802,26817,26867,27093,28095,31399,37935],"wō wēi":[20525],"luǒ":[20526,21062,26346,30256,30323,33245,33999,34819,35064,36534],"sōng":[20527,20935,23040,23847,23913,24250,25021,26494,26496,26537,26583,26789,27303,28126,28621,30841,33752,39686],"lèng":[20528,22542,24867,30550,36380],"zì":[20531,21082,23383,24675,28173,28460,29304,30501,30502,32980,33022,33258,33569,33634],"bèn":[20532,22348,25465,25770,28160,31528,36905],"cǎi":[20536,21835,23111,24425,25505,26828,27613,30572,32181,36340,36393],"zhài":[20538,20661,23528,30261,30758],"yē":[20539,21524,22094,25832,26253,26928,27467,28529,34862],"shà":[20541,21820,21922,27459,31633,32732,32739,33808,38319,38670],"qīng":[20542,20670,21375,22282,23496,27682,27691,28152,28165,34619,36605,36629,36731,37100,37638,37963,38737,38738,39894],"yīng":[20544,22052,22111,22198,23156,23190,23240,23344,23366,23422,24869,25732,25878,26400,26716,27185,27387,28214,29008,29681,29787,29838,29908,29959,29974,30884,31023,32211,32403,32492,32552,32578,32579,32588,33210,33521,33722,34337,34663,34867,35118,35707,36047,36552,37965,38195,38681,38906,40236,40337,40359,40367,40426,40441,40462,40474,40550,40560],"chēng chèn":[20545,29231],"ruǎn":[20548,26378,29772,29888,30877,31005,33117,36575,36653,36719,38446],"zhòng tóng":[20549],"chǔn":[20550,24823,30582,33846,34850,36080],"jiǎ jià":[20551],"jì jié":[20552],"bǐng bìng":[20555],"ruò":[20556,21458,23926,24369,26953,28971,29191,31660,31707,33979,37120,39961,39983,40376],"tí":[20557,21399,21884,21953,23865,28477,29765,30588,31157,31242,32249,32519,32612,34139,35078,35605,36263,36420,36431,37261,37719,38988,39064,39456,39863,39927,40128,40284,40420,40520],"wēi":[20558,21361,21940,23041,23193,23990,24013,24494,24836,25547,25595,26931,26994,28326,28883,29032,29168,30291,32261,33896,33907,34183,34610,34651,35235,35444,36918,38535,38536,38714,39939,39940,40130],"piān":[20559,22248,23205,26948,29327,31687,32745,37698],"yàn":[20560,21388,21421,21761,21933,22152,22181,22576,22943,23026,23306,23359,23476,24421,24422,25957,26191,26277,26325,26339,28383,28750,28756,28775,28777,28948,28976,28977,29078,29124,29290,29458,30746,30831,33395,33398,33399,35214,35267,35326,35578,35724,35742,35866,35891,35923,35924,36107,36119,36189,36549,37184,37245,37308,37317,38593,39181,39260,39440,39443,39476,39511,39520,39564,39731,40171,40200,40243,40387,40432,40798],"tǎng dàng":[20562],"è":[20564,21262,21374,21380,21597,21666,22121,22441,22538,22574,23691,23871,24261,24746,24853,25145,25212,25636,25657,25820,27374,27486,27514,28226,29735,30728,30736,30790,33133,33482,33852,34138,34437,34625,35240,35556,35725,35860,35935,36571,36598,36717,36940,36943,36987,37122,37418,37716,37993,38199,38440,38456,38942,38990,39066,39187,39209,39295,39952,39978,40055,40132,40346,40535,40771,40822],"xié":[20565,21232,21327,21332,21963,22437,22858,24650,24886,25337,25658,25783,25813,25847,25884,26012,26090,29057,29170,32138,32243,32256,32556,32723,32961,33029,33031,33035,33166,34658,34938,35181,35559,35735,35856,38795,38837,40868],"chě":[20566,25199,25766],"shěng":[20567,28219,30490],"chā":[20571,21967,25184,25407,25554,25591,30080,33279,33366,37535,37732,38200,39223],"huáng":[20575,20976,21924,22573,22708,23187,23858,24488,24822,27003,28255,29004,29530,29789,29852,30272,30343,30970,31316,31681,31783,33358,33887,34647,34789,35579,36266,36945,37728,37892,38205,38541,38905,39213,39452,39945,40017,40135,40428,40643,40644],"yǎo":[20576,21676,23161,23438,23686,26483,26620,27034,28308,29397,31365,31368,33280,33517,38340,39445,40405,40809],"chǒu qiào":[20578],"yóu":[20580,23588,24238,24611,27787,27833,27999,28216,29369,29494,29495,30001,30115,31198,32940,33692,33720,34133,34480,34659,35367,36623,36662,36912,36938,37038,37109,37438,38080,39360,39799,39819,40063,40073],"xū":[20582,22687,23213,23299,26952,27432,27476,29176,30110,30449,32135,32259,32379,32997,34150,34391,34394,34395,34641,35015,35343,35377,35549,35651,35870,37968,38656,38920,39035,39036,39497,39706,39750,39766],"zhā":[20583,21747,25263,25363,25592,25699,27165,28195,30390,35312,35655,40772,40775],"cī":[20584,30133,34816,36224,39604,39626,40825],"bī":[20586,23620,26949,27636,35917,36924,39951,40126,40278],"xún":[20593,22106,23547,23563,23755,24033,24309,24490,24642,25559,25907,26092,26442,26642,26730,27187,27957,27988,28527,29125,29142,29667,29845,30019,32003,33600,34803,35426,35810,37161,40015,40024,40095],"cāi sī":[20594],"duān":[20595,23183,31471,35085,37748],"ǒu":[20598,21528,22036,32806,33122,34117,34261],"tōu":[20599,20600,37742],"zán zá zǎ":[20602],"lǚ lóu":[20603,20674],"fèn":[20606,20712,22859,22894,24325,24575,24868,24996,28725,30611,31182,31914,31966,33209,40029,40124],"kuǐ guī":[20608],"sǒu":[20609,21468,21471,22014,27362,30605,34222,34282],"zhì sī tí":[20610],"sù":[20611,20723,21961,22608,22609,22809,23242,24875,24991,27041,27150,27157,27536,27869,28049,28335,28344,28506,28517,29578,29663,29851,31756,31899,31903,32032,32292,32899,32901,33158,34060,34263,35307,35380,35606,35785,35873,36250,36444,36895,36961,36972,37577,39191,39500,39573,40016,40427,40532],"xiā":[20612,28998,30606,34418,35898,39084,39957],"yuàn yuán":[20614,23195],"rǒng":[20615,20887,23426,27652,36597],"nù":[20617,24594],"yùn":[20618,23381,24701,24818,24864,24909,26527,33130,34164,34176,34292,34314,35102,35999,36816,36939,37075,37126,37213,37270,37278,38871,38878,38901,38907,39211],"gòu jiǎng":[20619],"mà":[20620,22044,27050,30576,31043,31137,32629,38273,39393,39554,39701],"bàng":[20621,22621,26834,29604,31254,33365,33953,34607,35607,35876,37770,38225],"diān":[20622,21415,23918,24005,24019,24020,25474,25895,25921,27079,28359,30315,30322,36430,39002,39003,39072,40827],"táng":[20623,21776,21882,22371,22530,22616,25642,26848,27062,28303,28447,29051,29805,30916,31135,31702,31939,31958,31963,33157,33179,33998,34711,34739,36207,36412,37132,37283,37781,38554,39225,39236,40374],"hào":[20624,21728,24655,26122,26150,26215,26272,26276,26285,26317,28009,28111,28564,28751,28765,30355,30364,30366,30369,30373,32791,32853,34179,34399,37143,39013,39074,39965],"xī xì":[20626],"shān":[20627,21024,21034,21116,22328,23665,25403,25639,26613,27270,28536,28568,29053,29414,29642,31512,32319,32692,32694,33056,33314,33439,34923,36314,36565,37014,38282,39877],"qiàn jiān":[20628],"què jué":[20629,22470],"cāng chen":[20630],"róng":[20635,23222,23238,23339,23481,23797,23896,23992,25102,25608,26343,26628,27029,27054,27061,27623,28342,28700,28927,29076,29416,29794,31297,32104,32466,32674,32924,33561,33592,33635,33993,34686,34701,34702,34833,35107,37780,38229,39397],"tà tàn":[20637],"suō":[20638,21766,21965,21990,23057,25677,26731,26797,30531,31761,31764,32679,33679,34001,36246,39867],"dǎi":[20643,27513],"zài":[20644,20750,20877,22312,25175,27909,36617,37224],"gǔ":[20646,21476,21842,23603,24882,27030,27070,27753,28104,28658,28692,29295,30391,30396,30444,30653,31296,32607,32662,32929,33077,33228,34211,34506,34865,35393,35778,36674,36903,37431,38068,39222,39305,40723,40724],"bīn":[20647,23486,24428,25996,26901,28392,28626,28657,28661,28693,32381,32548,34408,35945,35955,36051,36052,37024,37964,38228,38694,39022],"chǔ":[20648,20786,26485,26904,26970,26990,27290,28619,29876,30784,30990,31111,34389,40813,40828],"nuó":[20649,20794,25386,26779,27232],"cān càn":[20650],"lěi":[20651,20769,21437,22418,22593,22744,22760,27344,28741,30295,30667,30922,31016,32786,34124,34174,34271,34365,34845,35460,35716,35796,38008,40467],"cuī":[20652,20951,22676,23828,23903,24923,25703,27057,29525,30954,37849],"yōng":[20653,21960,22665,22725,23262,24248,24305,24949,25317,25793,28413,28745,29253,30152,30293,30320,33219,37013,37114,37144,37854,38235,38605,38621,39252,40005,40153,40411],"zāo cáo":[20654],"sǒng":[20657,23927,24578,24730,24879,24939,31462,32824,32883,39415],"ào":[20658,22387,22407,22714,22881,23279,23705,23728,23988,25034,25817,28595,37834,39489,39580],"qī còu":[20662],"chuǎng":[20664,30946,38358,38383],"shǎ":[20667,20749],"hàn":[20668,22462,24717,25022,25182,25421,25750,25788,26097,26200,26293,27721,28038,28450,28698,28938,29442,30356,30533,32752,33695,33761,34559,34605,34706,35648,36634,37356,37554,37582,38615,38967,38980,39060,39419,40382],"zhāng":[20669,23260,24352,24373,24432,24926,26290,27167,28467,29520,29835,31456,31931,34049,34769,36967,37155,37873,39206,39487,40006,40606],"yān yàn":[20671,22677,23342],"piào biāo":[20676,39584],"liàn":[20678,22556,23201,24651,25088,26973,27539,27566,28229,28491,28592,28722,28860,29001,29779,32244,32414,32451,33840,37676,37706,37832,38142,39946],"màn":[20680,22657,24148,24930,26364,28459,28599,29107,29516,32309,32550,34052,34352,37156,37853,38232],"tàn tǎn":[20683],"yíng":[20684,21942,22603,23348,25869,27001,27391,28289,28299,28386,28486,28633,28634,28660,28677,28699,28704,28719,28752,28764,29074,29151,29801,30401,30408,31132,31837,31855,32264,33556,33639,33721,33828,33829,33830,33854,34021,34240,34509,34631,34687,34722,34821,35597,36111,36194,36814,37795],"dòng":[20685,20923,20941,21160,21205,23003,25113,25359,26635,26847,28265,30800,33e3,33012,33110,36853,38680,39399],"zhuàn":[20686,21869,22208,22559,25776,28791,29777,31686,33118,33923,35144,35668,39244,39316],"xiàng":[20687,21224,21521,22190,23008,23953,26319,27233,29670,32575,34771,34902,35152,35937,37900,38917,39033,40012],"shàn":[20688,21892,22688,22689,23319,25797,25982,26923,27199,27482,27733,28759,30109,30960,32341,32558,33203,34798,34810,35349,35590,35697,35754,36109,36193,36216,37167,37925,39245,39480,39583,40019,40020,40157],"tuí tuǐ":[20691],"zǔn":[20692,22082,25753,35664],"pú":[20693,21261,22308,22691,28654,29531,29854,30632,31321,33670,33744,33769,33889,33969,33970,36108,37242,37879,38244],"láo":[20695,21171,21172,21214,21744,23810,23959,24997,26405,28022,29282,30184,30278,31362,31785,37290,37906,38137,39007,39645],"chǎng":[20696,21424,24288,25950,26166,27653,37625],"guāng":[20697,20809,21667,22425,23023,27960,28782,28823,28826,28827,28897,29654,33009,33578,36612,37543,40646],"liáo":[20698,22073,23293,23525,23534,23582,23658,23930,23962,23963,24299,24960,25977,26296,27217,29536,29849,30103,30274,31426,31773,32346,32557,32842,33163,33195,34260,34783,35906,36095,36440,36797,36988,39113,39630,40431,40553],"dèng":[20700,20979,22705,23965,27336,30634,30964,35252,37011,37159,38565],"chán zhàn zhuàn":[20701],"bō":[20704,23955,25320,25765,25773,27874,28298,29627,30326,30411,30773,30854,31009,32573,33760,34992,36467,37474,38069,39185,39293,39499,40013],"huì":[20705,21295,21321,21913,22034,22166,22298,23314,23533,23670,23671,24407,24409,24410,24507,24666,24693,24800,24935,24979,25075,26214,26291,27109,27230,27269,27352,27719,27851,28377,28499,28905,29172,29545,29860,30650,30794,31229,31330,31730,32117,32362,32472,32729,32765,33631,34087,34137,34184,34185,34794,35439,35496,35569,35667,35711,35763,35826,36036,36159,37932,38368,38419,38759,38958,39018,39058,39215],"chuǎn":[20706,21912,33307,33608,36403],"tiě jiàn":[20707],"sēng":[20711,39705],"xiàn":[20713,20724,21743,22455,22634,23021,23050,23466,23704,23796,25010,25738,26203,27212,27258,28032,28695,29486,29563,29616,29694,30476,30541,31919,31982,32100,32171,32218,32447,32528,32673,32680,33146,33236,33277,33483,33703,35490,35919,37607,37646,38480,38501,38519,38704,39201,39301,40626,40760],"yù jú":[20714],"è wū":[20715],"tóng zhuàng":[20718],"lǐn":[20719,20955,20956,24297,24298,25037,25044,25755,27265,27305,28575,30299,30301],"gù":[20721,20933,22266,22540,23827,23854,25925,26767,26845,29311,30204,31099,37678,38178,38599,39015,39038,39901,40116],"jiāng":[20725,22723,23004,27263,27565,27743,30037,30085,30995,32366,32560,32734,33587,33857,34193,34688,34751,35911,38849,40002,40137],"mǐn":[20726,20922,21025,21188,24751,24829,24845,24924,25003,25279,25923,25935,25967,27887,28515,30399,31522,31549,31778,34848,38292,38313,38389,38397,39989,40152,40701],"jìn":[20728,20954,22116,22157,22672,22743,22935,23335,25634,26185,26187,26499,27555,27989,28024,28301,28613,28636,28908,29025,29180,29710,29800,29878,30433,31090,32265,32537,33641,34254,35250,35280,36078,36112,36166,36817,36827,36914,38771,40829],"jià jie":[20729],"qiào":[20730,23789,24105,25772,27579,31373,31429,35482,35822,36488,38487,38825,38866,39642],"pì":[20731,23218,23251,23617,28604,29971,30088,35692,38370,40447,40458],"sài":[20735,31802,36093,36187],"chán tǎn shàn":[20739],"dāng dàng":[20741,24403,38371],"xuān":[20743,21927,22599,23191,23459,24835,24843,25550,26125,26244,29002,29014,29764,30587,30670,31140,31662,32743,32766,33841,33842,34002,34175,34300,34320,34646,34825,35552,35580,35678,35862,36562,36713,37753,39421,39962],"dān dàn":[20747,25812,30213],"càn":[20751,28591,28799,29158,29864,31922,34194,35634],"bīn bìn":[20752],"án àn":[20753],"tái":[20755,22382,23343,25260,25825,27311,28849,28850,31817,33274,34233,36294,37040,39089,39824,40080],"lán":[20758,20848,22226,23146,23706,23888,24177,25318,25876,26003,26005,26639,27396,27415,28572,28734,28742,28769,29155,29175,29884,31726,31811,31843,32383,33915,34013,34253,34347,34349,35124,35157,35172,35188,35197,35659,35733,35888,36509,37997,38247,38348,38417,38858],"nǐ yì ài yí":[20759],"méng":[20762,24170,26330,26406,27223,27308,27659,28309,28635,29965,30015,30431,31006,33384,33684,33804,34116,34427,34673,37171,37176,38719,38720,39021,39259,39885,40463,40562],"níng":[20764,20957,21659,22144,23331,26592,27235,27320,29406,29552,32845,32889,34228,37967,39713,40459],"qióng":[20765,21357,23430,24824,24972,26703,27241,28970,28973,29026,29069,29756,29898,30552,31351,31353,31406,31430,31547,31559,33340,33557,34257,34285,34537,34540,36217,36331,37019,37518],"liè":[20768,20925,21015,21155,21181,22482,22483,23028,23771,24036,25362,25449,26677,27916,27990,28872,28910,29037,29347,29454,29471,29557,32855,33055,33570,34522,36244,36496,36862,39090,39707,39715,39844,40050,40247],"kuǎng":[20771,22844,25069],"bào":[20772,21245,22577,24513,25253,25265,26323,29190,29350,33762,34403,34475,35961,37451,37988,38087,39602,39665,39825,40077],"biāo":[20774,22658,24150,24426,26631,27161,28398,28684,29083,29186,29451,30253,30950,33176,33237,35620,36102,37858,37987,38230,38259,39086,39095,39110,39111,39112,39114,39121,39129,39130,39531,39561,39647],"zǎn":[20775,20793,22086,25861,26141,36273,36274],"háo":[20779,21989,22071,22097,22158,22741,26883,27612,27627,28640,29510,29524,31443,31815,34461,34836,35705,35946],"qìng":[20780,20938,24198,24950,27366,28650,30851,30956,32580,38744],"chèn":[20781,22187,27015,27372,30114,34924,35183,35734,35894,36225,36226,40787,40788,40832],"téng":[20783,24144,28373,28443,30140,31824,31832,32290,33150,34276,34373,34723,35466,35588,36998,39398,39472,39523,39975],"lǒng lóng lòng":[20785],"chán chàn":[20787],"ráng xiāng":[20788,21239],"huì xié":[20790],"luó":[20792,25886,26916,27407,29473,29568,31657,31854,32599,32645,33078,33121,33821,34367,34746,35260,36923,37007,37837,38012,38179,38233,39264,39486,39512,39585,40449],"léi":[20797,23256,27281,27417,29891,30078,32306,32397,32413,32551,32589,32696,34050,34354,34374,36704,37939,37976,38253,38647,38721,40041,40762],"nàng nāng":[20798],"wù wū":[20800],"yǔn":[20801,21911,22845,25230,27538,27550,29377,30930,33658,36081,37399,38445,38504,38549,38691,39355,40811,40819],"zān":[20802,27253,31786,31790,31948,37909,37919,40292],"yuán":[20803,20870,21407,21409,21429,22253,22278,22286,22290,22291,22435,22636,23220,23236,25588,27038,27052,27260,27358,27781,28274,28304,28306,29232,29480,29503,31502,32227,32257,32536,32689,33554,34199,34653,34671,34696,34945,35108,35612,36677,36757,37005,37031,37211,37416,37809,39477,39789,40354,40368,40703,40715],"xiōng":[20804,20807,20982,21250,21256,21701,24567,24671,27769,27958,33015,33016,33422,35369,35454,35771],"chōng":[20805,22019,24545,24963,24999,25679,27798,28026,29675,32639,32704,33282,33375,33594,34909,36438],"zhào":[20806,22423,26064,26316,26523,27330,29031,29171,29411,30654,31498,32576,32617,32644,32897,32903,32904,35412,35791,36213,36249,39841],"duì ruì yuè":[20810,20812,20817],"kè":[20811,21051,21184,21194,22529,23060,23458,24682,24857,27690,28312,30886,32217,32514,33360,34889,35506,35838,37633,38174,39437,39570],"tù":[20814,20820,22541,36812,40309],"dǎng":[20826,25897,27411,35681,35740,35872,40680],"dōu":[20828,20832,21783,27255,31740,34104],"huǎng":[20836,22875,24140,24627,24653,26180,28862,29056,32296,35428,35594,35854],"rù":[20837,21973,23223,25174,26433,27955,28349,32287,32539,34e3,35109,40176],"nèi":[20839,27677,27678,37655],"yú shù":[20842],"liù lù":[20845],han:[20847,29235],"tiān":[20850,22825,23126,28155,37215,38740,38749,40647],"xīng xìng":[20852],"diǎn":[20856,22200,22860,23152,25951,26915,28857,30872,33959,34119,36398,40670],"zī cí":[20857],"jiān":[20860,20927,22223,22362,22533,22904,23014,23015,23574,24181,24804,25099,25108,25627,26942,27179,27388,27516,27569,27570,28244,28688,28728,29006,29086,29112,29259,29770,30583,31003,31031,31546,31627,32216,32273,32516,32547,32937,33392,33393,33733,33786,33868,33977,34090,34129,34163,34371,35708,35932,37999,38595,38831,38848,38857,39216,39330,39956,39964,39993,40099,40146,40273,40307,40380,40547,40585],"shòu":[20861,21463,21806,22781,22784,23551,25480,29417,29539,29560,30185,30246,32172,32502,33156],"jì":[20862,20864,21058,21092,21137,21219,22358,22413,22600,22931,23395,23490,23492,24301,24401,24475,24524,24760,24782,25083,25216,26081,26082,26083,26280,26281,26305,26782,27285,27317,27918,28419,28424,28721,30197,30304,31133,31273,31287,31300,31306,31335,32e3,32153,32318,32331,32380,32487,32489,32637,33262,33456,33549,33572,33898,34015,34055,34186,34318,34350,34363,35034,35136,35244,35274,35336,35352,35467,35745,35760,36321,36349,36447,36857,38469,38555,38657,38717,39525,39589,39675,39742,39773,39781,39898,39933,39990,39999,4e4,40045,40090,40107,40267,40401,40780],"jiōng":[20866,20875,22384,22491,25155,34319,34324,39369,39403],"mào":[20867,20880,23202,24125,24855,25035,26259,26581,26969,27639,29761,30339,30474,30592,32772,33538,33850,34640,34980,35218,35980,36031,36152,37146,37166],"rǎn":[20868,20873,22988,23203,26579,29635,33490,33925],"nèi nà":[20869],"gāng":[20872,20910,21018,21083,22536,22589,23713,25478,25667,26849,29288,29317,30104,32177,32434,32568,32577,32609,32923,37357,37792],"cè":[20874,20876,21397,21408,22824,24257,24699,24827,24993,25927,27979,28204,31527,31574,31582,31604,31651,33629,33815,33844,34011],"guǎ":[20878,21072,21102,21479,23521],"mào mò":[20882],"gòu":[20883,21826,22392,22434,22815,22816,23230,24384,25606,25728,26500,27083,29049,35247,35279,35389,35436,35807,36092,36141,36952,38602],"xǔ":[20884,21923,26250,26665,29661,30440,31944,35425,35583,35817,37158,37265],"mì":[20886,20906,22055,22611,23483,23494,23770,24130,24142,24166,24637,27027,27154,27329,27752,28135,28405,28446,28631,29072,32643,34084,34588,35219,35220,35227,35269,35600,35879,40719],"yóu yín":[20888],"xiě":[20889,20905,34267],"jūn":[20891,21531,22343,26750,27758,30386,30392,30393,30853,33689,34448,34944,35232,36557,37406,37505,37534,37717,38055,38965,39862,40106,40591],"mí":[20894,25823,28720,29218,29461,29564,31074,31152,32315,33982,34252,34346,34364,34990,35448,35598,36855,37274,37310,37311,37316,38270,40461,40586,40587,40603],"guān guàn":[20896,35212,35251,35264,35266],"měng":[20897,21200,25077,25529,29467,29556,33355,34594,34835,37683,38192,39917,40710],"zhǒng":[20898,22618,23600,27505,28996,30215,32959,33131,36405],"zuì":[20899,23989,26220,26368,26668,27100,27271,27276,31101,32074,32618,34142,36768,37204,37243,37257,37642],"yuān":[20900,21064,22246,23357,23491,26857,28149,28161,28166,28170,28181,28737,30498,32921,33918,33964,34574,34613,39372,40182,40219,40311,40482,40499,40531,40728,40733],"míng":[20901,21517,26126,26269,26393,27040,27962,28319,29501,30464,30515,30609,33559,34719,35245,35450,37133,37528,38125,40180,40483],"kòu":[20902,21481,23484,23495,25187,25922,28401,31387,31576,31750,34098,34107,37350,40391],"tài":[20909,22826,22835,24562,24577,24907,27760,27761,27888,28313,32957,33318,37214,37414,38043],"féng píng":[20911,39342],"chōng chòng":[20914],"kuàng":[20917,22329,22745,23730,25068,26103,26175,26336,26694,27841,29196,30486,30518,30719,30783,31014,31340,32075,32086,32394,32425,36026,36150,36582,37021,37178,37489,37595,37979,40651],"lěng":[20919],"pàn":[20920,21028,21467,27804,27886,28351,28813,29257,30036,30460,32833,34978,35195,35402,37612,38011,38934,40293],"fā":[20921,24386,27831,30330,30332],"xiǎn":[20924,23583,23584,23812,23982,24176,25863,26174,27382,27624,28774,28877,29177,29405,29443,29547,29550,29569,31122,31557,31666,34259,34330,34476,34566,35683,36219,36323,37708,38505,38522,38570,38853,38997,39023],"qià":[20926,22326,24098,24688,27534,27965,30792,32994,39618],"jìng chēng":[20928,20936,28136],"sōu":[20929,21974,24256,24267,25436,25628,25673,28338,29504,33368,33936,34699,37131,37273,37802,38204,39100,39125,39231,39306,39466],"měi":[20930,23172,23226,23309,23876,25396,27598,27599,28028,28220,29144,32654,36542,37762,38209,40675],"tú":[20931,22259,22270,22294,22295,22615,23648,23801,23902,24233,24284,24466,24711,25580,28034,30223,31585,33135,33660,33956,36351,36884,37236,37423,37710,39327,39420,40268,40351,40395,40437],"zhǔn":[20934,20950,22523,28310],"liáng liàng":[20937,28092,37327],"diāo":[20939,20993,21023,21500,22877,24372,24427,27720,29745,30857,31763,34413,34497,35970,37677,38613,39817,39899,40119,40304,40742],"còu":[20945,28234,33120,36659,36751],"ái":[20946,21824,22026,25457,28336,30284,30353,30362],"duó":[20953,21099,22842,22890,30181,36401,37420,37944,38094],"dú":[20959,21301,23355,26911,27357,27568,28060,29261,29272,29322,29346,29420,29544,29892,30398,35067,35501,35712,35743,35908,36117,37654,37983,38855,38883,38885,39475,39633,40681,40695],"jǐ jī":[20960],"fán":[20961,20962,20963,21285,22694,26443,26569,26853,27146,28735,28902,29033,29140,29856,30718,31020,31538,31861,32208,32691,33316,33319,34208,34345,34844,35150,36463,37353,37895,37922,38034,40429],"jū":[20965,21258,23093,23150,23621,23820,25221,25398,25516,26798,26896,27275,27625,27633,27843,28090,29401,29722,30141,30752,32605,33106,33357,34587,35070,35530,36308,36376,36537,38513,38606,38816,38827,39378,39545,39816,40225,40331],"chù chǔ":[20966,22788],"zhǐ":[20970,21159,21675,22336,22375,24075,24649,25210,25351,26088,26547,27490,27750,27802,27924,28157,30139,30731,31049,31190,32025,32440,33463,33547,34274,34937,35175,35368,36286,36601,36725,37231,38447,40697],"píng":[20973,20980,21615,22378,22592,23740,24097,24114,24136,24179,24959,24977,26544,27956,28969,29622,29942,29953,31470,31667,31752,32574,33619,33805,34033,34482,34530,35413,35780,36607,36647,37105,39811,40070],"kǎi":[20975,20977,21056,21108,22450,22607,24698,24887,24936,26271,33928,36614,37703,37799,38112,38196,38355,38399,39101],"gān":[20978,22377,23602,23604,23606,23607,26577,27860,28455,29589,29976,30131,30712,31487,31608,31891,32925,33527,36800,37200,39760],"kǎn qiǎn":[20981],"tū":[20984,22551,23936,25464,28043,28261,30172,31167,31171,31361,33878,37621,40282,40757],"āo wā":[20985],"chū":[20986,21021,23680,25716,27019,27159,35993,40803],"dàng":[20988,22325,22449,22731,26723,27284,27705,29847,29949,30442,30602,30720,30893,30993,31772,33633,33770,34153,34351,36260,36927,38652],"hán":[20989,20990,21547,22277,23074,23506,23841,26199,26770,27995,28085,28559,28947,29696,29981,31592,34604,37015,37039,37601,38867,38889],"záo":[20991,38015],"dāo":[20992,20994,24521,27672,33312,34729,37334,39771,40061],"chuāng":[20997,25680,29262,29269,30126,30241,31379,31383,31419],"fēn fèn":[20998],"qiè qiē":[20999],"kān":[21002,21208,22570,25121,26654,40853,40859],"cǔn":[21004,24534],"chú":[21005,21416,24174,24282,27249,27337,27365,28353,29331,31720,32801,33467,33954,33965,34573,34805,35936,36238,36464,36487,36501,37455,37604,38148,38500,38607,38619,40373],"huà huá":[21010],"lí":[21013,21075,21114,21145,21400,21937,22175,22212,23264,23415,24306,24737,26792,26808,26819,28435,28757,29313,29314,29432,29709,29827,29896,30432,30557,31163,31346,31472,31587,31729,31852,31950,32301,32545,32633,33347,33650,33758,34016,34110,34268,34362,34570,34765,34808,34859,35125,35623,35981,37288,37611,37637,37867,37975,38626,39530,39562,39887,39916,40058,40097,40313,40477,40514,40654,40679],"yuè":[21014,23347,23684,23731,23997,24689,24709,24742,25097,25224,25459,26376,27198,28729,29210,29605,31039,31156,31703,31814,31845,31856,31908,31925,34341,34446,34447,35500,36234,36288,36291,36493,36559,37381,37470,38e3,38074,38321,38322,38405,40465,40473,40678,40864],"liú":[21016,21129,22176,23225,23911,26056,26066,27060,27210,27969,27983,28687,29705,29792,29804,29858,30020,30041,30065,30081,30244,30277,30827,33957,33989,34761,35031,37775,37840,37890,38240,39104,39109,39127,39392,39413,39470,39505,39581,39969,40377,40544,40589],"zé":[21017,21063,21863,22038,23271,24123,24152,25246,27149,27509,27810,27854,28333,30367,30612,30688,30987,31654,31744,33332,34102,34828,35159,35630,36094,36188,36846,40453,40794,40816],"chuàng chuāng":[21019,21109],"qù":[21022,21434,21435,38324,38339,38418,40622,40705],"bié biè":[21029,21035],"páo bào":[21032],"chǎn chàn":[21036,21079,24157],"guā":[21038,21120,26736,27460,29041,29916,32973,36411,39082,39091,39463,40240,40505],"gēng":[21039,24218,26921,28013,28991,30026,32090,32686,32697,32789,33774,36065,36179,40330,40530],"dào":[21040,22133,24764,26913,27300,29182,29913,30423,30428,31282,31291,32411,32767,33364,33791,34908,34911,36551,36947],"chuàng":[21041,21071,21081,24582,24884],"kū":[21043,21741,22288,22528,26543,26701,30715,31391,36301,37056,39607,39852],"duò":[21044,21057,22703,23598,24816,24988,25349,26711,33333,36325,36346,38474,38479,39167,39283,40317],"shuā shuà":[21047],"quàn xuàn":[21048],"chà shā":[21049,21070],"cì cī":[21050],"guì":[21053,21055,21130,21132,25740,25904,26123,26690,26914,27126,27195,27331,29476,31148,31552,34005,35160,36020,36149,36330,37888,37966,38844,40022,40037],"lóu":[21061,23044,23105,24276,27004,27155,28295,28426,29089,32807,32812,33371,33932,34078,34684,34747,35633,36545,36977,38843,39621,39631],"cuò":[21065,21074,21405,22798,25387,25514,26852,33693,33697,33996,36906,37564,37679,38153,38169],"xiāo xuē":[21066],"kēi kè":[21067,23557],"là lá":[21068],"tī":[21076,26799,36386,37563,38161,40392,40393],"pōu":[21078],"wān":[21084,22598,22762,24117,24367,24398,28286,28523,28771,30549,34623,35916],"bāo bō":[21085,21093],"duō":[21087,21636,21702,22153,22810,22811,25479,27634,30035,35056],"qíng":[21088,21197,22813,24773,25806,26228,26258,26878,27144,27296,27696,29984,30808,33885,40677],"yǎn shàn":[21089],"dū zhuó":[21090],"yān":[21094,23267,23846,23958,24697,25045,25064,27182,28106,28153,28473,28895,28937,28945,29017,29658,31734,33005,33241,33784,37154,37251,38329,38409,40683],"huō":[21096,21136,21529,25865,31220,32800,38186,39454],"shèng":[21097,21104,21213,22307,22701,23882,26208,27066,27251,29726,32854,34114,36025,36088],"duān zhì":[21100],"wū":[21101,21596,21978,22316,23627,24043,24345,26439,27469,27737,27738,27745,27967,28879,31375,31676,34704,35464,35491,35820,37036,37140,37794,38056,39966,40238],"gē":[21106,21733,22314,24385,25096,25107,25128,27468,28370,29365,32912,35004,35596,37814,40218,40255,40509],"dá zhá":[21107],"chuán":[21110,26295,26941,31685,33313,33321,33337,36658,36932],"tuán zhuān":[21112,28441,31743],"lù jiū":[21113],"pēng":[21115,21257,22061,24614,24690,25256,26760,28921,30768,36591,39373],"piāo":[21117,21217,24915,26074,29349,32754,34741,39107,39108,39128,39762],"kōu":[21118,24388,25248,25715,30477,30616,33444],"jiǎo chāo":[21119,21131,21222,25719],"qiāo":[21121,21226,22685,24167,25970,27207,27587,29126,30807,30973,32337,36268,36343,36365,36474,36475,37115,37153,37157,37739,37740,37936,38201,38941],"huá huà":[21123],"zhā zhá":[21124],"pī pǐ":[21128,24706],"tāng":[21135,22049,32688,34202,34666,36442,38842,40734],"chán":[21142,22197,22757,23157,23307,24009,24283,26830,27610,28281,28537,28538,28598,28685,28730,29016,29521,30939,32254,32399,32402,32544,33388,34633,34768,34796,34814,35479,35730,35863,36500,37181,37185,37579,38001,38261,39262,39307],"zuān":[21143,36508,36518,37446,37978],"mó":[21144,23275,23332,23351,23579,25721,25845,27205,31970,33180,34278,34321,35624,35625,35871,39235,39261,39309,39629,39764,39801],"zhú":[21146,26040,26351,27416,28767,28834,28891,29165,29221,30211,31481,31489,31516,33331,33599,34027,34827,34878,36485,36880,36907,38019,40001],"quàn":[21149,21223,21240,29302,38863],"jìn jìng":[21156,21170,21185],"kēng":[21157,22353,29308,30785,30812,35481,37557,37726,37847,38143,38444],"xié liè":[21158],"zhù chú":[21161],"nǔ":[21162,24361,30766,33004],"shào":[21165,21362,21736,28530,32057,32164,32461,34961,37045],"miǎo":[21168,26474,28156,28218,30471,31186,31694,32242,32520,34256,37e3],"kǒu":[21174,21475],"wā":[21176,22380,23090,23207,23666,25366,25896,27964,28315,28453,29950,30038,31349,31370,31402,34521,38856,40707],"kuāng":[21179,21281,21289,21712,24647,27949,31568,31610,35462,35795,36589,37052],"hé":[21182,21642,21853,22976,23750,25926,26359,26567,26945,27644,27827,28088,28206,28565,29062,30380,30407,30409,30413,30418,31166,31701,31866,31917,32750,33743,33794,35208,35384,35429,37059,37339,37452,37961,38305,38356,38402,38422,38824,38940,39172,39288,39802,40534,40615,40789,40833,40866],"gào":[21186,21567,21578,23804,31086,31088,31134,31606,35493,35824,37084,37615,38150],"bó bèi":[21187],"láng":[21190,23247,24266,25999,26745,27028,27139,27444,29436,29701,29807,30816,31234,33350,33992,34571,34690,36532,37074,37086,37571,37807,38162],"xūn":[21195,21211,21234,21235,22161,22339,22489,22628,22734,22758,26331,29179,29551,30660,32385,33232,34219,34224,34317,37306],"juàn juān":[21196,29945],"lè lēi":[21202],"kài":[21203,28812,28887,37774],"wěng yǎng":[21212],"qín":[21220,21994,22105,23964,24200,25027,25028,25446,25810,26035,27278,28607,29665,29748,29753,30269,31165,31206,32825,33449,33465,33766,34707,34820,37401,37419,38594,38770,40185,40301],"jiàng":[21221,21278,21280,23929,24348,24374,25726,27364,27930,28400,29343,31969,31976,32115,32475,35645,37233,37284,37292],"fān":[21227,23311,24070,24161,24539,24995,26073,26075,32345,32763,34281,36691,39103,39132,40021],"juān":[21228,23010,23071,25424,28051,34866,35024,37816,37931,38220,40515],"tóng dòng":[21229,28884,29137,29418],"lǜ":[21236,22415,23874,24459,24942,27695,28388,28670,29192,31675,32160,32322,33183,33870,34385,37986],"chè":[21238,22396,24443,24505,25507,25764,28552,28898,29217,30638,30825,32837,36832,38937],"sháo":[21242,29631,38902],"gōu gòu":[21246],"cōng":[21254,22250,22257,24553,24625,24740,26288,27180,28439,29821,29825,30619,31733,32369,32865,32870,32874,32880,33473,33552,33905,34031,34085,34764,37743,37843,37862,39448,39492,39586],"táo yáo":[21259,38518],"páo":[21263,21638,22409,24214,29230,29389,34957,35100,36595,38788,40581],"dá":[21266,22962,24603,28831,29173,30051,31530,32653,33625,34200,34813,35418,36798,36815,36822,36826,36921,36948,37949,38780,38801,38851,40854,40856],"huà huā":[21270],"běi bèi":[21271],"nǎo":[21272,22452,22550,23248,24700,24745,24817,29785,30895,33041,33075,33126],"chí shi":[21273],"fāng":[21274,22543,26041,28115,29285,33459,37025,37377,37690,38059,40203],"zā":[21277,21634,24064,27806,33244,33250,36810,37460,39795],"qiè":[21287,21394,22974,24623,24719,24812,24860,25352,31317,31363,31434,31521,31655,31691,31841,36389,37733,38194,39900],"zāng cáng":[21288],"fěi":[21290,22876,24753,26832,27047,31706,32737,34140,35513,35837],"kuì guì":[21294,21297],"suǎn":[21300],"pǐ":[21305,22141,22189,22318,24192,30174,30294,33076,33481,37538,40196],"qū ōu":[21306,21312],"kē qià":[21308],"yǎn yàn":[21309,26858],"biǎn":[21310,24828,25561,30885,31272,31366,34250,35082,36022,36140,40216],"nì":[21311,22532,23263,23354,24772,24885,26165,26289,27708,30500,30568,32268,32978,33147,33193,36870],"niàn":[21316,21816,22493,24319,24565,24791,33356],"sà":[21317,27346,33038,33832,34159,34217,37394,38561,39087,39122,39354],"zú":[21318,21739,23850,26063,31652,36275,36388,38238],"shēng":[21319,21583,22768,26008,26119,26363,26529,27525,27881,28262,28986,29298,29636,29983,29989,31444,31513,32882,37454,37727,38441,38494,38521,40319,40746],"wàn":[21325,21328,24552,26468,30627,33045,33109,33836,34755,36110,36624,37693],"huá huà huā":[21326,33775],"bēi":[21329,24754,25593,26479,26734,30403,30865,34275,40303,40526],"zú cù":[21330],"dān shàn chán":[21333,21934],"nán nā":[21335],"shuài lǜ":[21339],"bǔ bo pú":[21340],"kuàng guàn":[21341],"biàn":[21342,21464,22793,23749,24321,24487,24557,25219,26154,27763,27764,29603,33361,33476,35213,35546,35722,36769,36775,36776,36777,36779,36782,36783,36941,37318],"bǔ":[21343,21754,25429,34917,35036,40468],"zhàn zhān":[21344,35249],"kǎ qiǎ":[21345],"lú":[21346,22183,22406,22746,24208,24300,26341,26534,26636,27368,27896,28696,28809,29200,29561,29576,29904,30439,30673,31834,32401,32591,33002,33242,33326,33339,33387,33446,34310,34854,36708,36723,37417,37994,39025,39045,39359,39639,39794,40056,40072,40469,40492,40696],"lǔ":[21348,22647,25523,25796,27152,27257,27347,27660,28407,28571,28674,30837,30944,31326,33379,33386,34046,34383,34396,37824,37930,37989,38245,39791,40065,40565],"guà":[21350,21865,25346,25499,32611,35074,35455,35798],"áng yǎng":[21356],"yìn":[21360,22461,22583,24277,24941,24982,24983,25050,27925,28250,29452,30282,32996,33562,37235,39843],"què":[21364,21371,22617,23813,24747,24872,24932,25609,27063,29161,29751,30389,30830,30906,31021,38347,38421,40306,40522],"luǎn":[21365],"juàn juǎn":[21367,24059],"chǎng ān hàn":[21378],"wěi yán":[21379],"tīng":[21381,21403,21548,24193,24304,24307,27712,28867,28916,32142,32787,32884,32892,32893,38803],"zhé zhái":[21383],"hàn àn":[21384,23677],"yǎ":[21386,21782,24204,30166,30210,34149],"shè":[21389,21401,24381,24913,24948,25086,25666,27399,28041,28091,28169,28384,28740,31038,33294,34062,34818,35373,35774,36198,39431,40605],"dǐ":[21390,21607,22360,24356,25269,25310,25483,29300,30757,33767,35293,35398,35787,36583,37048,38458,39606,39923],"zhǎ zhǎi":[21391],"páng":[21392,23246,24222,24492,33152,33341,34691,36868,39967,40145,40846,40848],"zhì shī":[21396],"máng":[21398,21506,21732,23055,24537,24702,26455,26471,27730,27997,29307,30173,30450,30829,31488,33426,33579,34313,37017,37359,37609,38099,39417],"zuī":[21404,27190,32407,34773],"shà xià":[21414,24264],"áo":[21419,22007,22008,24274,25942,28406,29522,29523,29832,32753,32758,32762,32881,34076,34735,35639,35640,36968,37846,38558,39986,40140,40404,40711],"lán qiān":[21425],"sī mǒu":[21430],"gōng hóng":[21431],"lín miǎo":[21432],"qiú róu":[21433],"dū":[21438,22047,30563,37263],"xiàn xuán":[21439,32291],"cān shēn cēn sān":[21442,21443,21444,21445],"ài yǐ":[21446],"chā chà chǎ chá":[21449],"shuāng":[21452,23360,23367,27398,31029,33389,38617,38684,39483,39526,39590,40414,40472,40564],"shōu":[21454,25910],"guái":[21455],"bá":[21456,22957,25244,25300,28838,30329,32968,33543,33757,35417,36299,36599,39747,40741],"fā fà":[21457],"zhuó yǐ lì jué":[21461],"qǔ":[21462,23094,31468,34682,35411,40818,40843],"jiǎ xiá":[21466,24486],"wèi yù":[21470,23561,34074],"dié":[21472,22436,22558,23756,24137,24654,24821,25116,26337,27548,27662,29251,29266,29918,30067,30082,30089,30090,30879,32112,32470,32778,32779,32965,33363,33525,34600,34678,35083,35396,35548,35853,36334,36416,36845,38267,39944,40125,40233],"ruì":[21473,26520,27757,29790,30591,33454,34443,34617,37555,37613,38160],"jù gōu":[21477],"lìng":[21478,21604,28841,34342],"dāo dáo tāo":[21480],"zhī zhǐ":[21482],"jiào":[21483,21580,22018,22054,22093,23315,25997,26016,28376,28438,29541,29651,30381,31382,34272,35334,35685,36269,36611,36686,36735,36739,37237,37294,37314],"zhào shào":[21484],"kě kè":[21487],"tái tāi":[21488,33492],"pǒ":[21493,23552,31544,31653,37461,38071,39370],"yè xié":[21494],"hào háo":[21495],"tàn":[21497,22022,25506,27470,28256,28845,30899,33301],"hōng hóng":[21503],"miē":[21504,21673,21750,23405],"xū yū yù":[21505],"chī":[21507,21735,21931,21988,22084,22939,23224,24424,24434,25691,25889,27558,29947,30196,30305,30517,30621,31518,31898,33013,34473,34733,35381,39761,40223,40260,40497,40656,40797],"xuān sòng":[21509],"yāo":[21510,21907,22829,22934,24186,26950,27520,31045,33136,33917,35358,36992,40193,40226],"zǐ":[21511,22985,22986,23376,26445,26771,27039,27252,28371,30711,31213,31531,31869,32043,32788,34424,35391,37352],"hé gě":[21512,40068],"cùn dòu":[21515],"tóng tòng":[21516],"tǔ tù":[21520,21771],"zhà zhā":[21522,22867],"xià hè":[21523],"ā yā":[21526],"ma má mǎ":[21527],"lìn":[21533,24673,24715,27209,28955,29968,33190,34106,34298,36035,36161,36472,36495,36505,36522,36709,38325],"tūn":[21534,26302,26396,28958],"bǐ pǐ":[21537],"qìn":[21538,21539,21786,25227,25599,25607,25779,27777,28697,33763,34301],"jiè gè":[21540],"fǒu pǐ":[21542],"ba bā":[21543],"dūn":[21544,22136,22697,22698,24775,25737,25780,29340,29540,30981,34611,36478,39504],"fēn":[21545,24073,26128,26374,26788,26875,27675,31445,32027,32439,32706,33452,34927,35356,36526,37210,37398,38640,39220,39257,39322],"é huā":[21546],"kēng háng":[21549,22932],"shǔn":[21550],"zhī zī":[21553],"yǐn shěn":[21554],"wú":[21555,21556,21577,22706,23807,26791,27206,27595,27926,28015,28961,29688,29841,31078,33436,33571,33665,34154,34568,34801,35669,37082,37593,38139,39875,40272,40417,40512,40751],"chǎo chāo":[21557],"nà nè":[21558],"xuè chuò jué":[21559],"chuī":[21561,28810,40865],"dōu rú":[21562],"hǒu":[21564,29372],"hōng hǒu ōu":[21565],"wú yù":[21566],"ya yā":[21568],"è e":[21571],"dāi":[21574,25051,29507],"mèn qǐ":[21575],"hōng":[21581,22173,25544,28788,28888,28962,30817,34216,35335,35902,36579,36663,36703,36720,37735],"nà":[21584,25466,31517,32013,32435,32941,33971,34930,35965,35968,36572,37069,37385,38048,38777,39798],"tūn tiān":[21585],"fǔ ḿ":[21586,22072],"dāi tǎi":[21588],"ǒu ōu òu":[21589],"bài bei":[21591],"yuán yún yùn":[21592,21729],"guō":[21593,21871,22035,22490,22557,22670,23838,24393,24397,25046,29459,30225,32850,34632,34760,37101,37403,37707,38149],"huá qì":[21594],"qiàng qiāng":[21595,36292],"shī":[21598,22833,23608,23629,24072,24107,26045,27977,28260,28287,28334,28348,28629,29422,29509,29793,32065,33913,33938,33997,34417,34664,35127,35193,35433,35799,37055,37315,37447,37734,39924,39972,40122,40178,40190,40371,40484],"juǎn":[21599,22477,33223,33764,37640,38185],"pěn":[21600,32760],"wěn mǐn":[21601],"ne ní":[21602],"ḿ m̀ móu":[21603],"rán":[21605,22059,28982,29123,32334,32944,34470,34490,34939,34951,34977,39653,39663],"tiè chè":[21611],"qì zhī":[21614],"zǐ cī":[21616],"guā gū guǎ":[21617],"cī zī":[21618],"hǒu xǔ gòu":[21620],"hē ā á ǎ à a":[21621],"náo":[21622,22802,23793,23977,24014,25376,25747,29489,30791,34546,34799,35401,35658,37891,38105],"xiā gā":[21623],"pēi":[21624,24588,32935,32986,34883,37253],"háo xiāo":[21626],"mìng":[21629,25525],"dá dàn":[21630],"zuǐ jǔ":[21632],"xián gān":[21633],"pǒu":[21637,21731,29315],"yǎng yāng":[21641],"zǎ zé zhā":[21643],"hé hè huó huò hú":[21644],"hāi":[21645],"dā":[21649,21714,22112,22710,25645,25752,32823,35105,37789],"kǎ kā":[21652],"gū":[21653,21762,21763,22993,23284,23396,24044,24045,26599,27245,27837,27858,31250,31519,31629,31643,31696,32603,33533,33735,33776,33991,35290,36593,36594,36721,36764,37220,37426,39829,40227,40490],"kā gā":[21654],zuo:[21655],"lóng":[21657,22184,23952,24003,24004,26173,26344,26407,26634,27102,27379,28272,28381,28427,29206,29649,29903,30275,30508,30675,30779,31025,31026,31423,31452,32843,32894,32999,33551,34338,34858,34860,35185,35909,37863,37992,38707,38727,39521,40471,40845,40850,40857],"xiàn xián":[21662],"qì":[21664,21805,22096,22120,22817,24323,24967,25001,26275,26820,27435,27668,27671,27683,27732,27773,27875,28230,28231,28801,29960,30453,30709,30875,30902,30940,30951,32586,33438,33914,34258,34815,35350,35755,36804,37905],"xì dié":[21669],"liē liě lié lie":[21671],"zī":[21672,21982,22997,23039,23388,23411,23414,23856,23915,26661,26900,28100,28285,28363,28588,29574,31116,31222,31906,32014,32199,32213,32387,32513,33546,33586,33880,35566,35864,36018,36039,36160,36164,36220,36241,36262,36636,36666,36750,37137,37421,37657,37759,37793,38193,38211,38974,38975,39661,39892,39974,40123,40325,40722,40781,40796,40839],"mī":[21674],"jī xī qià":[21677],"gē luò kǎ lo":[21679],"shù xún":[21680],"zán zá zǎ zan":[21681],"hāi ké":[21683],"huī":[21684,22085,22101,23118,23176,24145,24509,24674,25339,25381,25582,26198,26249,26958,27907,28680,28784,28787,28899,30579,31112,32730,32748,34355,34950,35096,35452,35801,35927,36637,36745,39988,40638],"huài shì":[21686],"táo":[21687,21845,26691,27310,27950,28120,31097,32175,32505,33796,34602,35050,36847,36867,37252,37630,38784,38793,39232,39395,39434,40727],"xián":[21688,21859,23092,23097,23153,23244,23290,23291,24358,25382,25743,28046,28282,28566,29961,30187,30279,30286,32067,32984,33335,34262,34495,34525,34900,34904,35512,35572,36066,36114,36132,36657,37262,37532,37990,38289,38386,40435,40436,40444,40519,40569,40601],"è àn":[21689],"xuān xuǎn":[21690,28892],"wāi hé wǒ guǎ guō":[21692],"yàn yè yān":[21693],"āi":[21696,21710,22467,28350,37552,37764,38207],"pǐn":[21697,27008],"shěn":[21698,23158,23352,23457,23479,23529,24350,26315,28182,28683,30635,30692,30695,35262,35360,35543,35717,35842,35849,37029,38947,39787],"hǒng hōng hòng":[21700],"wā wa":[21703],"hā hǎ hà":[21704],"zāi":[21705,26685,28221,28328,28797,28798,28886,30581,36083],"dì diè":[21707],"pài":[21708,27808,27966,28178,28227,33934,37763],"gén hěn":[21711],"yǎ yā":[21713,38597],"yuě huì":[21717,22118],"nián":[21718,24180,31178,31205,39822,39920,40071,40118,40263,40655],"huá huā":[21719,22057],"jì jiē zhāi":[21724,22156],"mōu":[21726],"yō yo":[21727,21938],"lòng":[21730,26759,36122],"ò ó é":[21734],"lī lǐ li":[21737],"nǎ na nǎi né něi":[21738],"hè":[21740,22414,22737,23497,24786,28931,28994,29178,29184,30283,30859,32751,35088,35614,36032,36154,36203,38733,38734,38735,40372,40470,40548],"bō pò bā":[21745],"zhé":[21746,21856,21894,22174,22481,24714,25722,26210,26211,27517,30714,30739,30932,31863,31885,34420,34544,34756,34985,35423,35627,35642,35713,35723,35882,36626,36633,36685,36740,36761,39871],"liàng láng":[21748],"liè lǜ":[21751],"hān":[21755,25e3,34486,35901,37219,38919,39032,39328,39805,40766],"hēng hng":[21756],"gěng":[21757,22466,23802,25389,26775,32134,32480,32831,33668,37088,39614,39873,40096],"chuò yuè":[21758],"gě jiā":[21759],"bei bài":[21764],"hán hàn":[21765],"chún":[21767,28017,28283,28387,28440,29321,32020,32431,33059,33724,33939,34036,37255,37269,37662,38489,39897,40329,40529],"ài āi":[21769],"jiá qiǎn":[21770],"yán dàn xián":[21772],"chē":[21779,30743,30824,33687,34556],"wú ńg ń":[21780],"zào":[21781,21795,22122,24933,26765,28790,29040,29157,30337,30338,31427,31432,31753,33345,35679,36270,36481,36896],"dí":[21785,21831,22016,22145,23265,24312,25932,25973,26769,28068,28364,29380,31515,31860,31988,33494,33659,34059,34064,34273,35263,35276,35956,36842,38766,38932,39344,39650,40464],"gòng hǒng gǒng":[21789,21962],"dóu":[21790],"lào láo":[21792,22062,24998],"huàn":[21796,21914,22850,22864,23462,23880,24187,24739,24844,25442,25563,25808,25868,26777,27125,28003,28067,28185,28470,28579,28873,28949,29029,29773,30186,30227,30534,32914,34279,35938,36696,36909,39879,39926,39936,40105],"léng":[21797,22596,26974,30864,34192],"wō wěi":[21801],"fěng":[21802,35202,35575,35773],"yín jìn":[21803],"hǔ xià":[21804],"wéi":[21807,22260,22285,22749,23767,23774,23916,24079,24119,24131,24799,26693,27817,27912,28064,28235,28296,28493,28505,28543,28656,29353,30656,32173,32500,34038,35257,36829,36949,37164,37248,37711,38344,38385,38859,38886,39840],"shuā":[21808],"chàng":[21809,24581,24757,26274,28987,30021,30076,35503,38868,39727],"ér wā":[21810],"qiàng":[21812,28829,29079,32699],"yō":[21815],"yū":[21817,28132,30208,30419,31626,32006,32417,36796,36802,36803,38483],"lài":[21819,28625,28712,28716,30302,30313,30544,30558,31809,31839,34302,36058,36084,36169,36182,38972,38978,40291],"tuò":[21822,23966,26589,27620,27643,31656,31836,33818,34304,36293],"zhōu zhāo tiào":[21825],"kěn":[21827,22438,22718,24691,25031,32910,32943,32955,35940,37689],"zhuó zhào":[21829,28655],"hēng hèng":[21832,24729],"lín lán":[21833],"a ā á ǎ à":[21834],"qiāng":[21836,22004,23944,25109,25700,26024,26538,27085,28332,29252,29456,29511,32652,32663,33108,34595,35602,37848,38166,38197],"tūn zhūn xiāng duǐ":[21837],"wèn":[21839,22927,25598,25653,29882,38382,38992],"cuì qi":[21840],"dié shà jié tì":[21841],"yuē wā":[21848],"zǐ cǐ":[21849],"bǐ tú":[21850],"chuò chuài":[21852],"yǎ yā è":[21854],"fēi":[21857,23123,23124,25161,26243,28164,29446,32203,32495,35062,38671,38750,38751,39131,39133,39134,39205,39329,39441,39451,39905,40113],"pí":[21860,22720,26503,27607,27608,28983,29749,30130,30382,31738,32628,32646,33086,33111,33165,34445,34493,34609,34743,34863,35964,35988,37099,37433,38448,38516,38566,39790,39821,40079,40295,40729],"shá":[21861],"lā la":[21862],"yīng qíng":[21864],"pā":[21866,22929,33317,33897,36276],"zhě shì":[21867],"sè":[21868,21959,25038,25804,26652,27502,28073,28171,28544,28545,28615,28623,28690,29791,29873,30263,31313,31329,31343,32364,35653,36694,37547,37884,38127,39115],"niè":[21870,21995,22107,22169,22209,22227,22332,23420,23421,23922,23981,24021,24071,25948,26559,27127,27377,28037,28284,30150,31710,31819,31985,31989,32834,32886,33260,33266,34326,34853,35736,36354,36375,36377,36433,36513,37660,37811,37960,38007,38016,38218,38221,38353,38503,38537,39027,39070,40807],"luō luó luo":[21872,22217],"tān chǎn tuō":[21876],bo:[21877,34068],"dìng":[21878,23450,26903,30708,30855,30880,30968,32866,33114,33827,34634,35330,35746,37664,38189,38977,39139,39268],"lāng":[21879],"án ān":[21885],"kā":[21888,25814],"yóng yú":[21889],"lā lá lǎ":[21895],"jiē":[21896,21948,21983,22566,23192,25509,25522,25809,28253,29039,30102,30158,30308,30342,31224,31277,33083,34644,34903,35631,38454,38542,38786,40347],"hóu":[21897,24127,29492,30218,30586,31692,31943,32749,33876,37127,37741,39217,39610,39928],"dié zhá":[21899],"wāi":[21902,27498,31477],"nuò rě":[21903],"xù huò guó":[21904],"zán":[21906],"wō ō":[21908],"hú":[21910,22045,22251,22774,22775,22778,23209,24359,25648,26011,26972,27122,28246,28715,28928,29043,29392,29474,29786,29939,31670,32087,32288,32993,33899,34075,34676,34716,34906,35315,37264,37752,38966,39212,39693,39793,39959,40288,40344,40358,40533],"huàn yuán xuǎn hé":[21915],"xǐ":[21916,22221,22736,23651,24473,24985,26546,27250,27478,28423,29626,29885,30678,31143,32304,33864,33912,34032,34786,35601,36445,36519,37410,37480,37481,40026],"hē hè yè":[21917],"kuì":[21919,22067,23231,23303,24870,24871,24978,31697,31779,31812,32873,32877,32885,33197,34146,35593,39229,39243,39304],"zhǒng chuáng":[21920],"wéi wèi":[21921,28858,29234],"duó zhà":[21925],"sāng sàng":[21930],"qiáo jiāo":[21932],"pèn bēn":[21935],"cān sūn qī":[21936],"zhā chā":[21939],"miāo":[21941],"pēn pèn":[21943],"kuí":[21945,22804,22862,24025,25123,25542,26182,26252,26959,26961,27334,29354,30589,33909,34248,34359,34369,34672,36520,36917,37128,37736,37751,38959,39319,39460,39577,39745],"lou lóu":[21949],"zào qiāo":[21951],"hè xiāo xiào hù":[21955],"á shà":[21956],"xiù":[21957,23723,23744,28340,29659,29703,29843,31168,32137,32333,32353,32483,34705,34966,35086,35087,37561,37861,37885,38152,40773],"qiāng qiàng":[21958,25111,25127,36428,36449],"ài yì":[21964,33406],"má mǎ ma":[21966],"kè kē":[21969],"dā tà":[21970,37769],"sǎng":[21971,25633,30921,35116,37791,39001,39073],"chēn":[21972,25275,29723,30603,35523,35603,36061,37108],"wā gǔ":[21975],"pǎng bēng":[21977],"xián qiǎn qiān":[21979],"lào":[21984,23274,27247,28061,28551,32802,32814,36540,36546,37226],"wēng":[21985,32705,32876,34697,37779,40370,40543],"wà":[21986,33149,33155,34972,35178,38884],"hēi hāi":[21992],"hē":[21996,27441,34842,35382,35779],zi:[21997],"sǎi":[21998],"ǹg ńg ňg":[21999],"gě":[22e3,33336],"ná":[22001,25295,25343,37823,38222],"diǎ":[22002],"ài ǎi āi":[22003],"tōng":[22005,27147,28853,34026],"zuī suī":[22010],"zhē zhè zhù zhe":[22011],"mò":[22012,22333,22651,22696,22970,23292,23518,24094,26153,26411,26554,27519,27521,27819,28448,29189,29519,30268,30348,30525,30527,30608,30617,30750,31027,31203,32072,32390,32817,33545,33672,34022,34536,34772,35971,35978,35992,37510,37836,38214,38476,38778,39488,39785,40664,40665],"sòu":[22013,30262],"tǎn":[22015,22374,24528,25011,25019,26298,27631,29870,33788,34962,35170,37267,37485,38077],"jiào dǎo":[22020],"kǎi gě":[22021],"shān càn":[22023],"cáo":[22024,23942,26361,26362,27133,28437,33370,34040,34732,35135,37866],"piào":[22028,24497,34056,39491],"lóu lou":[22029],"gǎ":[22030,23573,29581],"gǔ jiǎ":[22031],"jiāo xiāo":[22032],"xū shī":[22040,22099],"pó":[22041,22185,23110,27335,30372,37169],"dē dēi":[22042],"ma má":[22043],"lē lei":[22046],"gā gá gǎ":[22048],"sāi":[22053,22139,27618,33134,38987,39955],"zuō chuài":[22060],"cháo zhāo":[22066,26397,40706],"zuǐ":[22068,22143,23946,29883],"qiáo qiào":[22074,32761,35887],"chù xù shòu":[22076],"tān chǎn":[22077],"dàn tán":[22078,24382,24392,24788,28601],"hēi mò":[22079],"ě":[22081,30760,38923,39424,40264],"fān bo":[22083],"chuáng":[22087,24202,29248],"cù zā hé":[22088],"tūn kuò":[22091],"cēng chēng":[22092],"dēng":[22100,23297,28783,29128,29842,30331,31475,31782,33376,35915],"pū":[22103,25169,25778,25908,25909,28541,28807,38496],"juē":[22104,23657,23659,25767],"lū":[22108,22165,25784,25852,35618],"zhān":[22113,23742,24777,26051,26076,26540,26676,27617,27656,27658,27838,30651,34205,34501,35392,35449,35691,35893,36232,36997,38298,38673,39142,39256,39513,39769,40035,40455,40559],"ō":[22114],"zhòu zhuó":[22115],"jiào qiào chī":[22125],"yuàn":[22126,22964,24616,24895,25534,29783,31120,33489,34895,35051,35089,38498,39e3],"ǎi ài āi":[22127],"yōng yǒng":[22128,28589],"jué xué":[22129],"pēn pèn fèn":[22132],"gá":[22134,23580,37331,37687,38022],"xīn hěn hèn":[22135],"dāng":[22137,28578,29680,29867,31580,31801,33377,34807,35014,35168],"làn":[22146,28389,28651,28866,29143,29185,29211,29220,29907,31991,38020],"tà":[22147,22202,23817,25374,25640,25787,27067,27261,27646,28094,28606,28620,31138,31887,35515,35702,36427,36473,36482,36514,36957,37652,38354,38373,38396,38424,38812,38835],"huō huò ǒ":[22148],"hāo":[22150,33568,33983,34181],"hè xià":[22151],"xiù pì":[22154],"zhōu chóu":[22155,30441,35818],"mē":[22162],"chā cā":[22163],"bó pào bào":[22167],"me mèi mò":[22172],"xié hái":[22177],"áo xiāo":[22179],"mō":[22180,25720],"pín":[22188,23078,23252,23338,29613,30665,34226,34841,36007,36139,39024,39078],"mè":[22192,28665],"rǎng rāng":[22199],"lá":[22201,26095],"jiáo jué jiào":[22204],"chuò":[22205,23062,25801,27488,28080,30957,36352,36639,36749,36789,36790,37227,37985,39199,40810,40842],"huān huàn":[22206],"zá cà":[22211],"chài":[22214,34431,34822,34947,35341],"náng nāng":[22218],"zá zàn cān":[22219],"sū":[22220,27375,29990,31267,31308,31395,34311,34323,37221,39874],"zèng":[22222,29111,29969,36104,36192,37605,38147],"zá niè yàn":[22224],"nāng":[22228],"luó luō luo":[22230],"wéi guó":[22231],"huí":[22232,22238,22252,24315,24317,24667,27908,30160,33588,34456,34516,34517,34582,36852,36901,39856],"nín":[22236,24744,33036],"jiǎn nān":[22237],"nān":[22241],"tuán":[22242,22243,22296,24945,25247,25718,27314,31984,37828,40402,40443],"tún dùn":[22244,22345],"guó":[22255,22262,22267,22269,22272,22283,24124,24151,24918,25681,28429,32861,33112,33173,34094,34402,39320],"kùn":[22256,28035,30543],"wéi tōng":[22258],"qūn":[22263,22795,36897],"rì":[22264,26085,34933,37412,39353,39538],"tāi":[22268,23393,32974],"pǔ":[22275,22289,25800,26222,26268,27192,27279,27654,28006,28325,28915,35561,35676,35889,36476,37920,38248],"quān juàn juān":[22280,22287],"chuí chuán":[22284],"tuǎn":[22293,30077,30083],"lüè":[22297,25504,30053,30055,31268,37597,37602,38154],"huán yuán":[22300],"luán":[22301,22302,22897,23048,23372,23402,23423,23782,24018,25371,25891,26347,26686,27410,28390,28772,30324,30325,32649,33044,33248,34378,37550,38014,40265,40478,40510],"tǔ":[22303,22305,37367,38029],"xū wéi":[22313],"dì de":[22320,23987],"qiān sú":[22321],"zhèn":[22323,22630,25355,25391,26389,26650,30013,30521,32022,32124,32444,35499,36049,36168,37620,37805,37806,38215,38453,38499,38663,40198,40489],"chǎng cháng":[22330,22580,22642],"qí yín":[22331],"jiá":[22335,24550,24669,25118,25204,33061,33626,33698,34545,34554,35020,36338,37071,37087,37583,38103,38956,38960,39050,40246,40266],"zhǐ zhì":[22337],"bǎn":[22338,23685,26116,26495,29256,29930,31876,33320,34626,37393,38051,38442,39788],"qǐn":[22341,23505,23517,23522,26129,26795,31497,34748,36222,37599,38163],"méi fén":[22342],"rǒng kēng":[22344],"fāng fáng":[22346],"fèn bèn":[22347],"tān":[22349,24633,25674,25849,25892,28393,28760,30251,30321,33297,36010,36138],"huài pēi pī péi":[22351],"dì làn":[22356],"tán":[22363,22704,22709,22727,22748,23122,24987,26137,26311,27011,27264,28525,29122,30192,30969,32584,32590,34283,35527,35674,35680,35848,35885,35994,37103,37296,37663,38979],"bà":[22365,22459,22761,24349,27419,28766,29240,30706,35207,38712,39809,40069],"fén":[22367,22707,22946,23694,24169,26508,26876,27774,28954,29132,29139,32658,32693,33974,34145,34464,34465,35950,35958,36690,37948,38571,39337,39797,40642,40726,40738],"zhuì":[22368,22684,24820,29952,30071,30984,32180,32267,32512,32530,33103,33159,35528,36101,36184,37258,37667,37958],"pō":[22369,23717,27900,28300,28497,37337,37882,38027,38935,39047],"pǎn bàn":[22370],"kūn":[22372,22531,22546,23824,23825,26118,26204,28489,28956,29108,29457,29736,29819,33742,34603,35016,35049,35084,37260,37653,38175,39433,39648,39649,39656,39908,40114,40318,40356,40525],"diàn":[22379,22443,22666,22722,22880,23133,24215,24806,25154,27202,27583,28096,28593,29623,29716,30005,30300,31775,34580,37439,38651,38747,39508],"mù mǔ":[22390],"kē kě":[22391,36603],"xuè":[22393,23716,26710,28709,29400,30642,35604,35857,36240],"dǐ chí":[22395,26594],"lā":[22403,26566,33736,37003],"lǒng":[22404,22405,22751,22752,25314,25871,31433,38471,38580],"mín":[22410,22980,23735,23823,25450,26107,26108,27665,29641,29720,29725,29769,30203,30463,30727,32205,32225,32535,32608,33504,37425,37641,37746,40214],"dòng tóng":[22412,23762,27934],"cí":[22416,23336,24904,26572,28648,29633,29943,29958,30913,31008,31072,31949,33576,35422,35789,36765,36766,36772,36781,38604,39162,39176,40220,40383,40384,40538],"duī":[22422,22534,22624,30205,30931,37907,37916,40237],"duò duǒ":[22427],"duǒ duò":[22428,25350],"chá":[22430,23519,23894,25661,27086,27307,29497,33580,33590,35431,38763],"shǎng":[22439,26188,27145,36062,36120,36175,37631,37851,37980],"shǒu":[22440,23432,25163,25164,33359,39318],da:[22447,32360,36342],"háng":[22451,26043,26477,31573,32078,32471,33322,33472,34466,35012,36005,36818,38927,39043,39783],"ān ǎn":[22453],"xīng":[22454,24826,26143,26320,29003,29481,29766,30376,31682,33125,33288,35306,35314,35587,39426,39565,39823,39929],"yuàn huán":[22456],"bāng":[22457,24110,24135,24154,24171,25440,26758,27996,37030,37035,38820],"póu fú":[22458],"cén":[22465,23697,28052],"běng fēng":[22468],"dì fáng":[22469],"xiá jiā":[22473],"mái mán":[22475],"làng":[22476,23808,28010,33943,38316],"shān yán":[22479],"qín jīn":[22480],"pǔ bù":[22484],"huā":[22486,23154,26907,30836,31936,33457,33930,34340,35502,37685],"suì sù":[22499],"pí pì":[22500],"qīng zhēng":[22501,40109],"wǎn wān":[22502],"lǔn":[22504,31248],"zhēng chéng":[22505],"kōng":[22506,23814,31644,36539,37651,40316],"cǎi cài":[22512,23488,37319],"chù tòu":[22513],"běng":[22514,29739,33782,38811],"kǎn xiàn":[22515],"yì shì":[22518,37299],"péi":[22521,27632,35060,35061,36064,36180,37639,38187,38443,38506],"sào sǎo":[22525],"jǐn qīn jìn":[22535],"péng bèng":[22539],"qiàn zàn jiàn":[22545],"àn":[22547,23669,23736,25353,26263,26696,33018,33612,35963,35979,37644,38343,38540,40687],"duò huī":[22549,22702],"huán":[22554,23503,23536,23768,26707,27961,28596,29506,29615,29872,31979,32367,32563,32678,33601,33800,33809,35954,37744,37942,38206,38254,38372,38427,38600,39711,40558],"bǎo bǔ pù":[22561],"máo móu wǔ":[22565],"ruán":[22567,22742,25739],"ài è yè":[22568],"gèng":[22569,26245],"méi":[22579,22650,23186,23883,24510,25879,26522,26626,26757,26979,26995,27089,28228,28232,29028,29496,29611,29691,29762,30473,30530,31126,33028,33058,33116,33530,33683,33919,37119,37238,37767,38213,38665,40357,40539,40692],"dǔ":[22581,29757,30585,31491,31716,35241,36077,36172],"féng":[22584,32152,33346,36898],"hèng":[22588],"chūn":[22590,23179,26110,26149,26265,26486,26943,27078,27201,27332,29763,31674,33797,34685,36660,39942,40350],"jiǎng":[22594,22870,22888,22892,26728,27123,29518,32809,33177,33931,34083,35611,35762,39004],"huāng":[22595,24031,24908,32915,33618,34881],"duàn":[22597,26029,26039,26932,27573,27592,28997,29782,30891,31766,31850,32222,32526,33142,33902,36502,37723,38203],"tǎ":[22612,22678,29549,29562,39833,39976,40142],"wěng":[22613,22883,23905,25882,26273,30600,33994],"sāi sài sè":[22622],"zàng":[22623,24329,33235,33247,33900,34101,37562],"tián":[22625,23623,24684,27834,28233,29875,29979,29980,3e4,30027,30033,30901,30924,32971,38352,38423,40235,40390,40399],"zhèng":[22627,24129,25919,35388,35533,35657,35777,35812,37073,37165,38741,40202],"tián zhèn":[22635],"wēn":[22637,26167,27058,27551,28201,28331,29797,30239,34160,35953,36668,36672,36754,37822,39234,39963,39982,40129],"liù":[22639,24263,30943,32719,38625,38692,39230,39736,40410,40552],"hǎi":[22640,28023,28920,37244,37282],"lǎng":[22641,26390,26391,26404,28922,34018],"bèng":[22644,25596,27893,29967,32179,36454,36856,36908,37872,38234],"chén":[22645,23480,23576,24561,25936,25974,26216,26335,26645,27140,27785,28993,30222,33251,33566,33664,33680,34095,34236,34740,35366,35574,36569,36784,36839,37378,38472,38515,38659,40400,40590],"ōu qiū":[22648],"qiàn jiàn":[22649],"zhuān tuán":[22652],"shuǎng":[22653,24929,28474,29245,32276,37871],"shú":[22654,23116,23408,29881,31211,36118,36174],"lǒu":[22655,23901,23937,29962,31699,31757],"chí":[22656,24347,25345,27744,28454,31486,31554,31630,31722,33548,33614,34483,35608,36030,36223,36383,36831,36833,36933,36959,36978,37705,39347,39536],"shù":[22661,24246,24251,24631,24661,25101,26463,26641,27193,27821,28465,28484,28630,31446,31466,32073,33127,33623,33921,34410,34899,35019,35918,36848,37477,37680,37859,38676,40336],"dì zhì":[22662,30096],"kàn":[22664,23809,30640,30681,30945,34894,39723],"chěn":[22667,22822,30838,30876,30947,36098,36283,36408,37718],"zhǐ zhuó":[22668],"qiǎng":[22671,32328,32358,32677,35137],"zēng":[22679,22686,24974,29844,30704,30963,32638,35652,37163,40027],"qiáng":[22681,22715,23281,23321,27183,27299,28434,29254,33378,34051,34103,34336],"kuài tuí":[22692],"tuǎn dǒng":[22693],"qiáo què":[22695],"zūn dūn":[22699],"qiāo áo":[22717],"yì tú":[22719],"xué bó jué":[22726],"lǎn":[22728,23358,23364,23375,25042,25078,25597,25829,25900,27012,27414,28008,28452,28768,32412,32518,32625,35239,35261,35272,37250,39026],"huài":[22730,22750,34366],"rǎng":[22732,22756,25880,29209],"làn xiàn":[22735],"dǎo":[22740,23548,23566,23707,23798,23947,23948,23993,25443,25623,25827,27101,31095,31106,31153,36424,38502,38557,38575],"ruǐ":[22753,26741,27236,32352,34122,34123,34306,34307],san:[22765],"zhuàng":[22766,22767,22773,25758,28939,29366,29376],"ké qiào":[22771,27580],"kǔn":[22776,22780,24707,25414,26801,30833,31093,31239,31259,32145,35021,38315,38328,38403],"mǎng":[22782,28461,33595,33725,33726,34830],"cún":[22783,23384],"zhǐ zhōng":[22786],"gǔ yíng":[22787],"jiàng xiáng":[22789,38477],"páng féng fēng":[22790],"zhāi":[22792,25434,25688,25995,25998,27064,31874,40779],"xuàn xiòng":[22800],"wài":[22806,39009],"wǎn yuàn wān yuān":[22807],"mǎo wǎn":[22808],"mèng":[22818,22819,23391,26790,30310,38693],"dà dài":[22823],"fū fú":[22827,22983,26510,31920],"guài":[22828,24618,24672],"yāng":[22830,22990,25264,27523,27889,31207,32998,37472,37704,38645,40230,40495],"hāng bèn":[22831],"gǎo":[22832,25630,26482,27072,27073,27322,31233,31294,31295,32286,32543,33746,34241,34291],"tāo běn":[22834],"tóu tou":[22836],"yǎn tāo":[22837],"kuā kuà":[22840,35463],"jiá jiā gā xiá":[22841],"huà":[22843,23155,23295,23301,23819,25702,26489,26528,26726,27116,27194,28549,30011,30059,30069,32355,33305,35441,35545,35694,35805,40650],"jiā jiá gā xiá":[22846],"ēn":[22848,24681,33981],"dī tì":[22851],"yǎn yān":[22852,28208],"pào":[22853,30129,30384,30770,31007,31022,38756,40621],"nài":[22856,26608,28223,32784,33816,35110,37692,40720],"quān juàn":[22861,24366,26860],"zòu":[22863,25549],"qì qiè xiè":[22865],"kāi":[22866,24320,25577,37926,38158,38283],"bēn bèn":[22868,27853],"tào":[22871],"zàng zhuǎng":[22872],"běn":[22873,26412,26957,30042,32713,33519],"xùn zhuì":[22878],"shē":[22882,27304,29470,30061,30066,36050,36054,36170,36619],"hǎ pò tǎi":[22884],"ào yù":[22885,22887,28570],"yūn":[22891,27698,27699,33920,33941,34681,36103,36191],"duǒ chě":[22898],"nǚ rǔ":[22899],"nú":[22900,23397,31535,39377,39549],"dīng dǐng tiǎn":[22901],"tā jiě":[22905],"nuán":[22907],"hǎo hào":[22909],"fàn":[22911,23310,26805,27726,27867,28412,28714,29359,30024,30421,31541,31684,33539,35337,36009,36137,36588,36669,39151,39152,39277],"shuò":[22913,25632,26388,27082,28865,29197,30687,33972,37785,37984,38084],"fēi pèi":[22915],"wàng":[22916,24536,26106,26395,26402],"zhuāng":[22918,22941,23076,24196,24210,26729,26761,27137,31911,31962,33624,33674,35013,35037],"mā":[22920,23229],"fū yōu":[22923],"hài jiè":[22926],"dù":[22930,22956,26460,27564,28193,31226,33423,33648,34713,34855,34873,37709,38208,38767],"miào":[22937,24217,24255,24287,29573,31447],"fǒu pēi pī":[22938],"yuè jué":[22940],"niū":[22942],"nà nàn":[22944],"tuǒ":[22949,23287,24249,26925,26965,27234,39692,39958,40270],"wàn yuán":[22951],"fáng":[22952,25151,32938,38450,39796,40066],"nī":[22958],"zhóu":[22959,30881],"zhāo":[22961,24054,25307,26157,37335,37450,37731,38026,39371],"nǎi nǐ":[22963],"tǒu":[22965,25960,32015,34339,40648],"xián xuán xù":[22966],"zhí yì":[22967,31175],"ē":[22968,22975,23104,23641],"mèi":[22969,23194,23504,25274,26048,26151,27820,29021,30167,30491,30584,31065,31683,34654,34946,36298,39741,39749],"qī qì":[22971],"xū xǔ":[22977,31280],"shān shàn":[22989,22999,33515,37348,38032],"mán":[22991,24946,27168,34542,34875,35646,39237,39314,39703,39704,39995,40151],"jiě":[22992,23182,27294,27601,39159],"wěi wēi":[22996],"pīn":[23e3,25340,30999,31334,39338,39518],"huá huó":[23009],"jiāo xiáo":[23011],"gòu dù":[23012],"lǎo mǔ":[23013],"nián niàn":[23017],"zhěn":[23019,23634,24363,25262,26147,26517,30043,30137,30485,31289,32285,32293,32540,32836,33817,34967,35030,35225,35386,35786,36587,36728,36788,39383,39698],"héng":[23022,24646,24658,28870,29673,33019,34309,34913,37957,40244,40262,40507],"jūn xún":[23024],"kuā hù":[23025],"è yà":[23030],"xiān shēn":[23034],"wá":[23043],"ráo rǎo":[23046,23304],"shào shāo":[23051],"xiē":[23054,25587,26964,27463,34638,34829],"wǔ méi mǔ":[23058],"chuò lài":[23061],"niáng":[23064,23330,23363],"nà nuó":[23068],"pōu bǐ":[23069],"něi suī":[23070],"tuì":[23079,29050,34555,34581,36864,39422],"mǎn":[23080,23640,28288,28385,28415,34728,34766,35156,37835],"wú wù yú":[23082],"xī āi":[23085],"zhuì shuì":[23095],"dōng dòng":[23099],"ǎi ái è":[23102],"ē ě":[23103],"mián":[23106,23349,23424,26467,26825,27312,27339,30496,30664,30666,30671,32191,32220,32501,33415,34642],"pǒu péi bù":[23108],"biǎo":[23114,33087,34920,35057,35134,35544,37686],"fù fàn":[23119],"wǒ":[23120,23121,25105],"ní nǐ":[23127,26879],"quán juàn":[23128,24787],"hūn":[23130,26127,26156,26836,28093,30567,30575,30856,33636,33911,34066,36683,38333,38413],"qiān jǐn":[23132],"wān wà":[23136],"lái lài":[23137,24469,24480],"zhōu chōu":[23140],"chuò nào":[23141],"nüè àn":[23145],"hùn kūn":[23147],"dàng yáng":[23160],"nàn":[23163],"ruò chuò":[23164],"jiǎ":[23165,23724,26010,26013,27022,27098,27295,29630,30002,32987,37440,38078],"tōu yú":[23166,23214],"yù yú":[23168],"wéi wěi":[23169],"dì tí":[23170,29686,33488],"róu":[23171,25545,26580,28184,29027,29768,29895,31160,31880,31941,33052,33132,33863,34650,36418,36654,37714,38819,39461,39943,40340],"ruǎn nèn":[23174],"miáo":[23180,23289,25551,30596,33495,40339,40523],"yí pèi":[23184],"mián miǎn":[23188],"tí shì":[23198,24831],"duò tuó":[23200,27826],"ǎo":[23210,23228,33401,33466,34948,35158,38266],"chú zòu":[23216],"yìng":[23221,26144,26254,30828,33185,40038],"qín shēn":[23232],"jià":[23233,24143,26550,27042,31292,39381,39550],"sǎo":[23234],"zhēn zhěn":[23235],"jiē suǒ":[23237],"míng mǐng":[23239],"niǎo":[23243,23325,23346,33553,34086,34949,35018,35117,40479],"tāo":[23245,24141,24354,24902,25487,25647,27076,28059,28372,28644,29803,32091,32282,32295,32486,35420,35615,36673,38833,38876,38892,39160,39253],"biáo":[23249],"piáo piāo":[23254,34232],"xuán":[23257,24748,25080,26294,27272,28457,29572,29831,29887,30147,34561],"màn mān":[23258],"kāng":[23261,23931,24247,24951,27130,28462,30730,31301,31968,36543,37870,40007],"hān nǎn":[23272],"nèn":[23273,23280],"zhē":[23276,36974],"mā má":[23282],"piè":[23283],"zhǎn":[23288,23637,25612,26025,26028,29718,30415,30430,36670,37254,39085,39120],"xiān yǎn jìn":[23312],"liǎn":[23322,25947,25986,29711,29833,32695,33080,33225,34105,34333,34334,35043,35165,37179],"qióng huán xuān":[23323],"dǒng":[23326,25026,31677,33891,34155,35532],"cān":[23328,28236,29208,39137,39184,39490,39574],"tiǎo":[23333,23464,26176,26387,31409,33025],"bí":[23350,33656,40763],"liǔ":[23356,26611,26625,26718,26746,27246,29102,29643,32185,32506,32630,32640,37622,38157],"qiān xiān":[23365,27430],"xié huī":[23368],"huān quán":[23369],"lí lì":[23371,40599],"zhú chuò":[23374],"kǒng":[23380,24656],"mā zī":[23382],"sūn xùn":[23385,23403],"bèi bó":[23387,35478],"yòu niū":[23399],"zhuǎn":[23400,31473,36681],"hái":[23401,39608],"nāo":[23404],"chán càn":[23409],"bò":[23417,27287,34327,35666],"nái":[23419,33097],"níng nìng":[23425,23501,23511,23516,23527,29999],"zhái":[23429],"tū jiā":[23434],"sòng":[23435,35359,35494,35772,35829,36865,37817,38924,39042,39224],"ròu":[23437,32905,35699],"zhūn":[23442,31360,34912,35524,35846,36813],"mì fú":[23443],"dàng tàn":[23445],"wǎn yuān":[23451],"chǒng":[23456,23541],"qún":[23469,23790,24108,32675,32676,35033,35040],"zǎi":[23472,23869],"bǎo shí":[23474],"jiā jia jie":[23478],"huāng huǎng":[23482],"kuān":[23485,23515,23532,33239,37991,39627,39638],"sù xiǔ xiù":[23487],"jié zǎn":[23489],"bìng bǐng":[23502],"jìn qǐn":[23510],"lóu jù":[23520],"xiě xiè":[23531],"qīn qìn":[23540],"cùn":[23544,31871],"duì":[23545,23550,23565,24636,24989,25055,28647,28713,30867,31051,32144,34225,35656,35701,36699,38431,38510],"lüè luó":[23549],"shè yè yì":[23556],"jiāng jiàng qiāng":[23558],"jiāng jiàng":[23559,27974,28479,30074],"zūn":[23562,23967,27197,32583,36981,37903,40018,40159,40334,40439],"shù zhù":[23564,28557],"xiǎo":[23567,26195,26241,26313,30363,30370,31601,31615,31712,35599],"jié jí":[23568,35800,38794],"shǎo shào":[23569],"ěr":[23570,23571,23572,26670,27622,27953,29246,29669,32819,34238,34888,36272,36841,36999,37498,38098,39180,39285,39404],"wāng yóu":[23586],"wāng":[23587,23593,23594,23595,27754],"liào":[23589,23590,24278,25730,26009,28819,31415,37904,38243],"méng máng lóng páng":[23592],"gà":[23596,39744],"kuì kuǐ":[23599],"tuí":[23605,24346,31336,34312,36458,38564,38969,38970,38973,39059,39755],"yǐn":[23609,23998,24341,26372,27267,27324,27389,28158,28645,30270,30318,31884,34335,34451,34750,35732,36218,36251,36625,37391,38775],"chǐ chě":[23610],"kāo":[23611,39643],"jìn jǐn":[23613],"wěi yǐ":[23614],"niào suī":[23615],"céng":[23618,23652,23954,39507],"diǎo":[23628],"píng bǐng bīng":[23631],"lòu":[23642,28431,30232,30266,30267,37860,38210,38475],"shǔ zhǔ":[23646,23660],"xiè tì":[23647],"chè cǎo":[23662],"tún zhūn":[23663],"nì jǐ":[23664],"hóng lóng":[23672],"qǐ kǎi":[23682,35912],"áng":[23687,26114,26171],"gǎng gāng":[23703,23831],"kě":[23714,25956,28167,28212,28835],"gǒu":[23715,29399,29629,31537,32775,32776,32777,33503,35967],"tiáo":[23719,23737,27172,31058,31524,33408,33812,34010,34024,34601,36834,37594,37797,38807,39659,39880,39991,40102,40800,40838],"qū jū":[23720],"lǐng":[23725,23994,38936,39046],"pò":[23734,25920,27942,28240,28894,29632,30772,30774,31893,33962,39748],"bā kè":[23751],"luò":[23752,25694,27931,27932,29334,29662,31551,32409,33638,35451,38610,39409,39558,40261],"fù niè":[23754],"ěn":[23758],"zhì shì":[23769,23867],"qiǎ":[23776,36306,37216,38800],"qiáo jiào":[23780,30276],"xié yé":[23787],"bū":[23788,24239,26209,35495,36875,37437,37691,38072,39188,40271],"chóng":[23815,23816,29214,34411,34665,34802,35080,38528],"zú cuì":[23826,26890],"líng léng":[23834],"dòng dōng":[23840],"xiáo":[23844,27944,28102,35364,35509],"pí bǐ":[23845,33432],"zhǎn chán":[23853,23939,23940],"wǎi wēi":[23860],"yáng dàng":[23861],"shì dié":[23868],"yào":[23870,26332,29070,29183,30661,31358,31380,31556,32768,33374,33647,33903,34220,34277,34958,35230,35407,35729,38783,40386,40542,40764],"kān zhàn":[23873],"hán dǎng":[23877],"qiàn kàn":[23884],"wù máo":[23885],"kě jié":[23889,23985],"wēi wěi":[23892],"kē":[23897,26607,26869,27068,27158,29249,29297,29328,29634,30132,30604,30933,31002,31185,31262,31392,33834,34198,34485,34636,36279,36722,37272,37427,38070,38950,38982,39063,39617],"dàng táng":[23907],"róng yíng":[23908,29187],"ái kǎi":[23910],"kāo qiāo":[23914],"cuó":[23919,23923,30180,30700,33963,34070,34392,40570,40574],"qiǎn qīn":[23920],"dì dié":[23933],"cēn":[23934],"dǐng":[23935,33404,34209,37924,38914,39030,40718,40721],"áo ào":[23941],"pǐ pèi":[23951],"jiào qiáo":[23968,28496],"jué guì":[23969,40156],"zhān shàn":[23974,40163],"xiè jiè":[23984],"guī xī juàn":[23986],"rū":[23999],"lì liè":[24001,26841,29188,32159],"xī guī juàn":[24002],"yíng hōng":[24006],"yǐng":[24010,24302,24433,25708,26796,28481,30271,30317,30696,31310,37090,37915,38964,39053,39061,39062],"chǎo":[24016,28818,29052,30503,40616],"cuán":[24017,27349,27409],"chuān":[24027,24029,27674,29775,31359],"jīng xíng":[24032],"cháo":[24034,24035,26177,28421,28526,29258,31410,32634,35647,36680,37147,40716],"qiǎo":[24039,24832,39644],"gǒng":[24041,24318,25329,25330,26673,27742,29657,36609,38799],"chà chā chāi cī":[24046],"xiàng hàng":[24055],"shuài":[24069,24101,34752],"pà":[24074,24085,24597,34969],"tǎng nú":[24081],"mò wà":[24083],"tiē tiě tiè":[24086],"zhǒu":[24090,26221,30107,30573,31634,32920,33783,39902],"juǎn juàn":[24099],"shuì":[24104,28055,28058,30561,31237,31246,35038],"chóu dào":[24113,24172],"jiǎn jiān sàn":[24116],"shà qiè":[24121],"qí jì":[24122,33632],"shān qiāo shēn":[24147],"zhuàng chuáng":[24162],"chān chàn":[24168],"miè":[24173,25073,25635,28357,28781,28885,31011,31742,34065,34190,34843,34890,37974,40052,40211],"gān gàn":[24178],"bìng bīng":[24182,24183],"jī jǐ":[24190],"guǎng ān":[24191],"guǎng":[24195,24291,29367,29559],me:[24197],"dùn tún":[24201],"bài tīng":[24205],"yìng yīng":[24212],"dǐ de":[24213],"dù duó":[24230],"máng méng páng":[24236],"bìng píng":[24240],"chěng":[24241,24732,30536,36894,39425,39563],"jī cuò":[24244],"qǐng":[24252,24270,27326,28416,33496,35531,35622,35831,38915,39031],"guī wěi huì":[24262],"jǐn qín":[24273],"kuò":[24275,25193,25313,25844,28662,31560,33855,33856,34526,38346,38420,38697,38815,38841,38869,38946,39712],"qiáng sè":[24295,34196],"yǐn yìn":[24308,38544,38560,38577,39150,39154,39278],"pò pǎi":[24313,36843],"nòng lòng":[24324],"dì tì tuí":[24351],"jué zhāng":[24353],"mí mǐ":[24357,24396,38753],"chāo":[24360,24586,25220,27433,35372,36229,37396,38046],yi:[24364],"shāo":[24368,26067,28903,28988,29138,31602,33348,33847,34161,36622,39678,39865],"xuān yuān":[24370],"qiáng qiǎng jiàng":[24375,24378],"tán dàn":[24377,37256],"biè":[24390],"qiáng jiàng qiǎng":[24394],"jì xuě":[24400],"tuàn":[24406,35094],"yuē":[24415,26352,26353,30705],"shān xiǎn":[24417],"wén":[24419,25991,28806,29683,30226,32359,32862,33440,34441,34442,34721,34753,38330,38335,38341,38374,38395,38412,38639,39356,39367,39792,40188,40205,40740],"péng bāng":[24429],"piāo piào":[24431],"zhuó bó":[24436],"tuǒ yí":[24437],"páng fǎng":[24439],"wǎng":[24442,24448,24451,24792,26505,26850,32178,32593,32594,32595,32596,32598,33781,34535,34628,35511,36638,36747,39757],"cú":[24450,27522],"dài dāi":[24453],"huái":[24458,24576,25040,25079,27088,28142,32818,34361,35106,35121,36381],"wā wàng jiā":[24461],"chěng zhèng":[24462],"dé děi de":[24471],"cóng zòng":[24478],"shì tǐ":[24485],"tí chí":[24498,40343,40345],"dé":[24499,24503,24692,24755,24810,28098,37696,38173],"zhǐ zhēng":[24500,24501],"bié":[24502,30335,33666,34498,35154,36457],"chōng zhǒng":[24504],"jiǎo jiào":[24508,31493,31562],"lòng lǒng":[24511],"qú jù":[24514,28192,30655,34742],"dìng tìng":[24522],"gǎi":[24523,25913],"rěn":[24525,26656,26659,31225,31252,32155,33615,33653,36533],"chàn":[24527,25076,25082,30815,32700,38850,39019],"tè":[24529,24925,29305,34776,37617,38141],"tè tēi tuī":[24530],"gān hàn":[24531,25916],"yì qì":[24532],"tài shì":[24533],"xī liě":[24538],"yīng yìng":[24540,25033,35661],"mǐn wěn mín":[24542,24543],"sōng zhōng":[24554],"yù shū":[24556,24710],"qí shì":[24559,32774],"tún zhūn dùn":[24563],"qián qín":[24564,25202],"hún":[24566,27985,28222,39195,39300,39746,40754],"niǔ":[24568,25197,28804,29379,32016,32445,33701,37397,38062,38773],"kuáng wǎng":[24569],"kāng hàng":[24572],"kài xì":[24574,24894],"òu":[24580,24938],"bǎo bào":[24585],"mín mén":[24587],"zuò zhà":[24589],"zěn":[24590],"yàng":[24591,24665,26679,27096,27171,28478,32661,35399],"kòu jù":[24592],"náo niú":[24595],"zhēng zhèng":[24596,25497,38066,38126],"tiē zhān":[24599],"hù gù":[24600],"cū jù zū":[24602],"sī sāi":[24605],"yóu chóu":[24606],"tū dié":[24610],"yōu yào":[24622],"xuàn":[24624,26145,26982,27883,28210,28843,29700,30505,30905,32098,32316,32335,32474,34073,34898,34984,36121,37449,37831,38089,38239,39092],"xù xuè":[24628],"bì pī":[24630],"xī shù":[24632],"nèn nín":[24641],"tiāo yáo":[24652],"xī qī xù":[24659],"xiào jiǎo":[24660],"hū kuā":[24663],"nǜ":[24679,26386,34882,34884],"hèn":[24680],"dòng tōng":[24683],"quán zhuān":[24686],"è wù ě wū":[24694,24801],"tòng":[24696,24927,24965,30171,34901],"yuān juàn":[24705],"qiāo qiǎo":[24708],"jiè kè":[24712],"hào jiào":[24718],"huǐ":[24724,27283,27584,27585,27591,29164,35693],"mán mèn":[24727,38804],"yī yì":[24728,34915],"quān":[24731,31646,37897],"kuī lǐ":[24733],"yì niàn":[24741],"mèn mēn":[24758],"guàn":[24761,24762,24815,24931,25532,25692,27148,27423,27892,28075,28485,28748,29215,29912,30437,31030,31100,32582,32592,36011,36143,36480,36966,37830,38005,40057,40475,40563],"kōng kǒng":[24766],"lǔn lùn":[24768],"guǒ":[24776,26524,26881,27112,31935,32182,33747,34622,35065,35073,36640,39196,39299],"yuān wǎn":[24780,31650],"lán lín":[24783],"yù xù":[24784,28130],"chuò chuì":[24793],"hūn mèn":[24795],"chǎng tǎng":[24797],"suǒ ruǐ":[24802],"cǎn":[24808,24920,25007,40682,40690],"cán":[24813,24921,24922,27531,27544,34453,34629,34870,34874],"dàn dá":[24814,24986],"rě":[24825],"yú tōu":[24841],"kài qì":[24850],"dàng táng shāng yáng":[24851],"chén xìn dān":[24854],"kè qià":[24856],"nuò":[24862,25062,25063,25535,25638,27026,31276,31332,31953,31973,31983,35582,35834,36419,36925,37737,38168],"gǎn":[24863,25792,25954,26751,27204,28553,28600,30383,31174,31240,31540,33417,34918,36214,36245,40036,40161],"còng sōng":[24865],"sāi sī sǐ":[24866],"gōng gòng hǒng":[24873,24912],"shuò sù":[24876,27948],"yáo yào":[24878],"huàng":[24880,26306,27045,28361,30365,30377,37796],"zhěng":[24888,25229,25327,25972,26232],"cǎo":[24890,33400,33609,39474],"xì xié":[24896],"cǎo sāo":[24901],"xù chù":[24905],"qiè qiàn":[24906],"cáo cóng":[24914],"ào áo":[24928],"lián liǎn":[24937,26815,27108,27363],"jìn qín jǐn":[24940],"dì chì":[24952],"zhí zhé":[24953],"lóu lǚ":[24954,40412],"còng":[24961,35621],"zhī zhì":[24964,30693,32340,32455],"chēng":[24966,25690,25744,25745,26239,26621,26854,27221,27273,27871,28030,29732,30624,30848,32253,32585,34511,34806,36202,36204,37887,37923,38455,38743,38963,39251],"biē":[24971,34380,40009,40150,40712,40862],"chéng dèng zhèng":[24981],"xǐ xī":[24984],"duì dùn tūn":[24990],"xiāo jiāo":[24994],"xián xiàn":[25002],"liáo liǎo":[25005,29134,29198,29202],"shéng":[25012,32260,32329,32361,32499,35677],"náo nǎo náng":[25017],"jǐng jìng":[25020],"jǐ jiǎo":[25023],"xuān huān":[25025],"cǎo sāo sào":[25030],"mèn":[25041,25059,26282,28950,29148],"mèng méng měng":[25052],"ài yì nǐ":[25053],"méng měng":[25054,30626,30674],"qí jī jì":[25056],"mǒ":[25057],"lán xiàn":[25058],"yōu yǒu":[25070],"liú liǔ":[25072,34288],"ràng":[25081,35698,35731,35753],"huān":[25085,27426,27475,27489,29566,35737,35995,37188,39529,40197,40269],"nǎn":[25089,25543,28275,29045,33129,34683,36199],"mí mó":[25090],"gàng zhuàng":[25093,25094],"zhuàng gàng":[25095],"qu xū":[25100],"xì hū":[25103,25135,25138],"jiá gā":[25115],"zéi":[25117,34824,36042,36156,39938,40033,40087],"děng":[25125,31561],"hū xì":[25137],"chuō":[25139,36372,36916],"biǎn piān":[25153],"shǎng jiōng":[25156],"shàn shān":[25159],"cái":[25165,26448,32404,35009,36001,36130],"zhā zā zhá":[25166],"lè lì cái":[25168],"bā pá":[25170],"dǎ dá":[25171],"rēng":[25172],"fǎn fú":[25173],"diǎo dí yuē lì":[25178],"káng gāng":[25179],"yū wū":[25180],"yū wū kū":[25181],"tuō chǐ yǐ":[25185],"gǔ jié xì gē":[25186],"dèn":[25189,25213],"sǎo sào":[25195,25475],"rǎo":[25200,25854,38562],"xī chā qì":[25201],"bān pān":[25203],"bā ào":[25207],"xī zhé":[25208],"zhì sǔn kǎn":[25211],"zhǎo":[25214,27836,29813],"kuáng wǎng zài":[25218],"hú gǔ":[25223,40516,40536],"bǎ bà":[25226],"dǎn shěn":[25228],"nè nì ruì nà":[25232],"zhuā":[25235,27291,31803,33212,39677],"póu":[25236,35026],"zhé shé zhē":[25240],"póu pōu fū":[25241,25418],"pāo":[25243,25291,33068,33826],"ǎo ào niù":[25245],"lūn lún":[25249,25476],"qiǎng qiāng chēng":[25250],"zhǐ zhǎi":[25255],"bù pū":[25258,26600],"yǎo tāo":[25261],"hē hè qiā":[25266],"nǐ ní":[25267],"pī pēi":[25271],"mǒ mò mā":[25273],"chōu":[25277,29352,29355,30259,31704],"jiā yá":[25281],"fú bì":[25282,30032,40349],"zhǎ":[25283,30504,30751,39866,40093],"dān dàn dǎn":[25285],"chāi cā":[25286],"niān":[25288,34091],"lā lá lǎ là":[25289],"bàn pàn":[25292],"pāi":[25293],"līn":[25294],"guǎi":[25296,26548,26618],"tuò tà zhí":[25299],"ào ǎo niù":[25303],"jū gōu":[25304],"pīn pàn fān":[25306],"bài bái":[25308],"bài":[25309,25943,31255,31930,34221,36097,36133,38875],"qiá":[25316],"nǐng níng nìng":[25319],"zé zhái":[25321,25799],"hén":[25323,30165,38798],"kuò guā":[25324],"jié jiá":[25326],"nǐn":[25328],"shuān":[25332,26643,38274,38377],"cún zùn":[25333],"zā zǎn":[25334,26714],"kǎo":[25335,25911,26674,28900,32771],"yí chǐ hài":[25336],"cè sè chuò":[25338],"zhuài zhuāi yè":[25341],"shí shè":[25342],"bāi":[25344,25520],"kuò guāng":[25348],"nòng":[25354,25397,40776],"jiào jiāo":[25357,25934,25945],"kuà kū":[25358],"ná rú":[25360],"tiāo tiǎo":[25361],"dié shè":[25365],"liě":[25368,27615],"yà yǎ":[25372,25495],"wō zhuā":[25373],"xié jiā":[25375,25406],"dǎng dàng":[25377,25803],"zhèng zhēng":[25379,27491,30151],"āi ái":[25384],"tuō shuì":[25385,25437],"tǐ tì":[25390],"suō shā":[25393],"sā shā suō":[25394],"kēng qiān":[25395,25724],"bàng péng":[25399],"ruó ruá":[25404],"jiǎo kù":[25409],"wǔ wú":[25410],"tǒng":[25413,26742,31570,31593,32113,32130,32479],"huò chì":[25415],"tú shū chá":[25416],"lǚ luō":[25419],"shāo shào":[25422,31245],"niē":[25423,25553],"shù sǒng sōu":[25426],"yé yú":[25427],"jué zhuó":[25428],"bù pú zhì":[25431],"zùn":[25432,37516],"lāo":[25438,25736,31913],"sǔn":[25439,25613,27051,31499,31565,31664,37800,38588],"wàn wǎn wān yù":[25445],"pěng":[25447,28110,30351],"shě":[25448],"fǔ fù bǔ":[25452],"dáo":[25455],"luò luǒ wǒ":[25456],"juǎn quán":[25458],"chēn tiǎn":[25461],"niǎn niē":[25467],"ruó wěi ré":[25468],"zuó":[25469,26152,31208,31251,31600,33675,37436],"wò xiá":[25470],"qìng qiàn":[25477],"póu pǒu":[25482],"qiā":[25488,33884],"pái pǎi":[25490],"qiān wàn":[25492],"yè yē":[25494],"niè nǐ yì":[25500],"huò xù":[25501],"yàn shàn yǎn":[25502],"zhěng dìng":[25503],"kòng":[25511,38810],"tuī":[25512,34039,34284],"zōu zhōu chōu":[25515],"tiàn":[25517,33306],"kèn":[25519,35017,35075],"pá":[25521,26487,28502,29228,29750,31586],"guó guāi":[25524],"dǎn shàn":[25528,25763],"chān xiān càn shǎn":[25530],"sāo":[25531,25620,28318,32325,32555,34726,39442,39479,39968,40034,40139],"pèng":[25533,26922,27120,30896,36395],"zhēng kēng":[25537],"jiū yóu":[25538],"jiān jiǎn":[25539,31835],"pì chè":[25546],"sāi zǒng cāi":[25548],"tí dī dǐ":[25552],"zǒng sōng":[25556],"huáng yóng":[25560],"zǎn zuàn":[25565],"xū jū":[25567],"ké qiā":[25570],"chuāi chuǎi chuài tuán zhuī":[25571],"dì tì":[25573],"lá là":[25574],"là":[25575,26955,28290,29902,30220,32715,33240,34635,34674,34847,36770,36771,37982,38260,39694,39931],"jiē qì":[25581],"chòng dǒng":[25584],"dié shé yè":[25586],"jiàn qián jiǎn":[25589],"yé":[25590,29239,29242,29784,37603,37761,38104],"chān":[25600,25723,25881,35047,35164,35224,35271,36799,37587],"gē gé":[25601,25841],"lǒu lōu":[25602,25695],"chōu zǒu":[25610],"chuāi":[25611],"sūn":[25614,27074,29426,29499,33642,33984,34165,34206,39143,39153],"róng náng nǎng":[25617],"péng bàng":[25618],"cuō":[25619,29811,30923,36425,36979,37277],"kē è":[25621],"nù nuò nòu":[25625],"lā xié xiàn":[25626],"qiǔ":[25629,31959],"xiǎn xiān":[25631],"jié zhé":[25641],"pán bān pó":[25643],"bān":[25644,25917,26001,26002,29677,30242,30285,32934,34689,34700,35113,36780,38930,39041],"zhì nái":[25649],"wā wǎ wà":[25650],"huá":[25651,25782,28369,29502,34128,34710,35649,37877,38119,39498,39557,40424],"qiāng qiǎng chēng":[25654],"tián shēn":[25655],"ná nuò":[25659],"èn":[25665],"shè niè":[25668,25885],"bìn":[25672,25839,27553,27567,33169,33231,39628,39637,39657,39682,39699,39714],"shā sà shǎi":[25675],"chǎn sùn":[25676],"jiū liú liáo jiǎo náo":[25678],"féng pěng":[25683],"shuāi":[25684],"dì tú zhí":[25685],"qì jì chá":[25686],"sōu sǒng":[25687],"liǎn liàn":[25689],"gài xì":[25697],"hù chū":[25698],"tàng":[25701,28907,29145,37899],"nái zhì":[25704],"mó mā":[25705],"jiāng qiàng":[25706],"áo qiáo":[25710],"niè chè":[25712],"mán màn":[25713],"chàn cán":[25714],"sè mí sù":[25717],"biāo biào":[25725],"juē jué":[25733],"piē":[25734,26300,27669,30629],"piě piē":[25735],"zǎn zān zēn qián":[25741],"sā sǎ":[25746],"hòng":[25748,35340,35751,38336,39720],"héng guàng":[25751],"niǎn":[25754,25781,25862,28042,28990,30910,31760,36429,36456,36494,36646,36743],"chéng zhěng":[25756],"huī wéi":[25757],"cāo":[25761,25805,31961],"xiāo sōu":[25768],"liáo liāo":[25769],"cuō zuǒ":[25774],"wěi tuǒ":[25777],"cuān":[25786,25883,27718,36479,36517,38009,38249],"qiào yāo jī":[25789],"zhuā wō":[25790],"lèi léi":[25794],"nǎng":[25795,25902,26345,28770],"qíng jǐng":[25807],"kuǎi":[25811,33967],"pǐ bò":[25815],"bò bāi":[25816],"jù jǐ":[25818],"mēng":[25821],"sǒu sòu":[25822],"xǐng":[25828,31669,37266],"cā":[25830],"níng nǐng nìng":[25840],"zhì jié":[25843],"là liè":[25848,29193],"sòu sǒu":[25851],"lì luò yuè":[25853],"tī zhāi zhì":[25855],"pān":[25856,28504,30469,33824],"lèi":[25858,27882,28057,28122,31159,31867,32391,34353,37241,37511,37649,38939,38954,39006,39075],"cā sǎ":[25859],"jùn pèi":[25864],"lì luò":[25866,36498],"là lài":[25867,27380],"lú luó":[25870],"zǎn cuán":[25874],"xiān jiān":[25877],"mí mǐ mó":[25888],"zǎn cuán zàn zuān":[25890],"zuàn":[25893],"lì shài":[25894],"lì luǒ":[25901],"guǐ guì":[25905],"jī qī yǐ":[25906],"fàng":[25918],"wù móu":[25924],"chù shōu":[25930],"gé guó è":[25931],"duó duì":[25939,25946],"duō què":[25952,25962],"sàn sǎn":[25955],"dūn duì":[25958,38246],"qī yǐ jī":[25959],"xiào xué":[25961],"shù shǔ shuò":[25968,25976],"ái zhú":[25969,25971],"xiòng xuàn":[25979],"zhuó zhú":[25984],"yì dù":[25985],"lí tái":[25988],"fěi fēi":[26e3],"yǔ zhōng":[26004],"dòu dǒu":[26007],"wò guǎn":[26017],"tǒu tiǎo":[26018],"dòu":[26019,26794,28002,30168,31398,31431,33072,33651,35910,36887,37078,37208,38295,38360,39190,39294,39717,39718,39722,39724,39725],"yín zhì":[26022],"chǎn jiè":[26042],"wū yū yú":[26044],"yóu liú":[26047],"páng bàng":[26049],"máo mào":[26052],"pī bì":[26055],"xuán xuàn":[26059],"wú mó":[26080],"zǎo":[26089,26531,26630,26839,28577,29866,34235,34299,34468],"gā":[26094],"gàn hàn":[26096],"tái yīng":[26098],"xū xù":[26100],"tūn zhùn":[26109],"wù wǔ":[26111],"pò pèi":[26146],"zòng":[26158,29460,30125,30258,31933,31945,31981,32294],"ǎi":[26169,27600,30702,34108,34297,35690,36535,38701,38724],"huàng huǎng":[26179],"xuǎn":[26181,30307,30316,36873,36984],"xù kuā":[26183],"hǒng":[26190],"shài":[26194,26348],"yūn yùn":[26197,29044],"shèng chéng":[26207,26889,30427],"jǐng yǐng":[26223],"shǎn":[26225,29068,30546,35234,38275,38378,38485,38493],"qǐ dù":[26229],"ǎn àn yǎn":[26235],"wǎng wàng":[26240],"zàn":[26242,26283,29897,29906,29914,31158,35192,35715,35738,36059,36106,36190,36436,37180,37694,37864,39265],"yùn yūn":[26248],"mín mǐn":[26251],"dǔ shǔ":[26255],"shǔ":[26257,26329,28539,30297,31980,32626,34213,34223,34295,34560,34868,35169,35177,40042,40048,40653,40736,40737],"jiǎn lán":[26261],"nuǎn":[26262,29015,39210],"bào pù":[26292],"xī xǐ":[26303],"pù bào":[26333,28689],"qū qǔ":[26354,32054],"gèng gēng":[26356],"hū hù":[26358,38653],"zēng céng":[26365,27239],"céng zēng":[26366,31474],"cǎn qián jiàn":[26369],"qiè hé":[26373],"bì pí":[26375,31110,31507,35048],"yǒu yòu":[26377],"bān fén":[26380,40187],"fú fù":[26381,27921],"fěi kū":[26383,32976],"qú xù chǔn":[26384],"juān zuī":[26392],"huāng máng wáng":[26394],"qī jī":[26399],"tóng chuáng":[26403,27238],"zhá":[26413,29264,31642,34491,35671,37720,38113,38296,38392],"zhú shù shú":[26414],"shù shú zhú":[26415],"zhū shú":[26417],"pǔ pò pō piáo":[26420],"dāo tiáo mù":[26423],"guǐ qiú":[26425],"xiǔ":[26429,28395,28483,31956],"chéng chēng":[26430],"zá":[26434,27823,30776,35149,38609,38620,38629,38900],"yú wū":[26437],"gān gǎn":[26438],"chā chà":[26440],"shān shā":[26441],"cūn":[26449,30388,31476,33189,36358,37032],"rèn ér":[26450,26773],"sháo biāo":[26451],"dì duò":[26453,26532],"gū gài":[26458],"yí zhì lí duò":[26461],"gàng gāng":[26464],"tiáo tiāo":[26465,26781],"mà mǎ":[26473],"sì zhǐ xǐ":[26475],"yuán wán":[26476,34454],"bèi fèi":[26478],"shū duì":[26488],"niǔ chǒu":[26491],"wò yuè":[26498,33234],"máo":[26502,27611,27650,28213,29286,30683,32606,33541,33542,34661,34762,36574,37205,37502,37672,38170,39654,40348],"pī mì":[26504],"àng":[26506,30414,37280],"fāng bìng":[26507],"hù dǐ":[26513],"xín":[26516,35153,37908,39733],"yāo yǎo":[26518],"ě è":[26521],"zhī qí":[26525],"cōng zōng":[26526,27141],"xiān zhēn":[26542],"tái sì":[26545],"gǒu jǔ gōu":[26552],"bāo fú":[26553],"yì xiè":[26555,26663],"tuó duò":[26561,39345,39364,39534],"yí duò lí":[26562],"nǐ chì":[26565],"pán bàn":[26568,36312],"yǎng yàng yāng yīng":[26573],"fù fū fǔ":[26574],"bǎi bó bò":[26575],"mǒu":[26576],"sháo shào":[26582],"zhè":[26584,27164,27993,28123,34071,34757,36889,40403,40551],"yòu yóu":[26586,27390],"guì jǔ":[26588],"zhà zuò":[26590],"dié zhì":[26595,30512],"zhā zǔ zū":[26596],"chá zhā":[26597,26619],"āo ào":[26602,36586],"bā fú pèi bó biē":[26605],"duò zuó wù":[26606],"bì bié":[26610],"zhù chù":[26615],"bēi pēi":[26616],"shì fèi":[26617],"shān zhà shi cè":[26629],"lì yuè":[26638,27359],"qì qiè":[26644,30732],"qī xī":[26646,36426],"guā kuò":[26653],"bīng bēn":[26655],"xiào jiào":[26657],"jiàn zùn":[26667,35e3],"yǒu yù":[26671],"hé hú":[26680],"gēn":[26681,36319],"zhī yì":[26682],"gé gē":[26684],"héng háng":[26689],"guàng guāng":[26692],"yí tí":[26699,33617],"sāng":[26705,26706,27105],"jú jié":[26708],"yú móu":[26713],"ráo náo":[26721,27208],"guì huì":[26727,27292],"chén zhèn":[26733],"tīng yíng":[26735],po:[26738],"bèn fàn":[26739],"fēng fèng":[26747,33873],"sù yìn":[26752],"tǐng tìng":[26755],"xuān juān xié":[26763],"tú chá":[26764],"āo yòu":[26766],"kuǎn":[26785,27445,27454,27456],"shāo sào":[26786],"qín chén cén":[26787],"lí sì qǐ":[26793],"chān yán":[26804],"bīn bīng":[26809,27103,27315],"táo chóu dào":[26812],"cōng sōng":[26823],"gùn hùn":[26829],"dé zhé":[26831],"pái bèi pèi":[26833],"bàng pǒu bèi bēi":[26835],"dì dài tì":[26851],"sēn":[26862,26926,27118,35138],"rěn shěn":[26863],"léng lēng líng":[26865],"fú sù":[26868],"zōu sǒu":[26871],"zōu":[26872,31619,32197,35535,35833,37049,37104,37138,37177,38508,39478,39546,39915,40112,40640,40817,40826],"zhào zhuō":[26873],"chēn shēn":[26877],"jiē qiè":[26884],"yǐ yī":[26885],"chóu zhòu diāo":[26886],"qiāng kōng":[26892],"zhuī chuí":[26894],"bēi pí":[26897],"mēn":[26906],"quān juàn quán":[26918],"duǒ chuán":[26927],"wěi huī":[26930],"jiǎ jiā":[26933],"hán jiān":[26935],"shèn zhēn":[26937],"yàn yà":[26939],"zhā chá":[26946],"guō kuǎ":[26951],"jí zhì":[26966],"kǔ hù":[26971],"yóu yǒu":[26978],"sǒng cōng":[26980],"yuán xuàn":[26981],"yǎng yàng yīng":[26983],"pián":[26985,33020,33089,36038,36417,39394,39432,39560,39615],"dié yè":[26986],"dùn shǔn":[26991],"còu zòu":[26993],"dì dǐ shì":[26996],"kǎi jiē":[26999],"róu ròu":[27002],"lè yuè":[27005],"wēn yùn":[27013,38832],"lǘ":[27016,27354,27648,33186,34264,38317,38398,39522,39540],"shén":[27018,31070,37486,39984],"bī pi":[27020],"zhǎn niǎn zhèn":[27024],"fú fù bó":[27025],"jiàn jìn":[27031],"bǎng bàng":[27036],"shā xiè":[27037,27175],"nòu":[27080,32808,37778,37918],"qiǎn lián xiàn":[27087],"gàng":[27091,28981,28985,31611],"gāo":[27092,27129,27248,27356,30590,31705,31957,32660,33263,38879,39227,39640,39641,40398,40433,40731],"diān zhěn zhēn":[27097],"kǎn jiàn":[27099],"xí dié":[27106],"jī guī":[27107],"róng yōng":[27110],"tuán shuàn quán":[27115],"qì sè":[27117],"cuī zhǐ":[27119],"yǒu chǎo":[27121],"màn wàn":[27134],"lí chī":[27142],"léi lěi":[27151,27345,30988],"cháo jiǎo chāo":[27156],"chēng táng":[27160],"jiū liáo":[27163],"mó mú":[27169],"niǎo mù":[27170],"héng hèng":[27178,27243],"xuě":[27184,33188,33373,36684,38634,40008,40149],"fá fèi":[27203],"rùn":[27213,28070,28516,33206,38287,38304,38384],"zhǎn jiǎn":[27215],"shùn":[27219,30618,30636,33308,34147,38918,39034,39690],"tuí dūn":[27220],"táng chēng":[27222],"sù qiū":[27226],"tán diàn":[27229],"fén fèn fèi":[27240],"rǎn yān":[27242],"cū chu":[27259],"shū qiāo":[27262],"píng bò":[27288],"zhái shì tú":[27297],"biǎo biāo":[27302],"qiān lián":[27318],"nǐ mí":[27319],"jiàn kǎn":[27323],"nòu ruǎn rú":[27325],"jī jì":[27333,31144],"huǎng guǒ gǔ":[27342],"lǜ chū":[27350],"miè mèi":[27351],"ōu":[27353,27431,27472,27572,27590,29935,29964,33170,34290,35635,35764,37826,40206,40407,40485],"zhù zhuó":[27361],"jué jì":[27373],"huái guī":[27376],"chán zhàn":[27395],"wéi zuì":[27400],"cáng":[27404,38006],"yù yì":[27429],"chù qù xì":[27434],"kài ài":[27436],"yì yīn":[27437],"xì kài":[27439],"shuò sòu":[27446],"ǎi ēi éi ěi èi":[27448],"qī yī":[27449],"chuā xū":[27451],"chǐ chuài":[27452],"kǎn qiàn":[27455],"kǎn kè":[27457],"chuǎn chuán":[27458],"yīn yān":[27461],"jìn qūn":[27471],"pēn":[27477],"xū chuā":[27480],"xī shè":[27481],"liǎn hān":[27483],"zhì chí":[27501],"sè shà":[27504],"sǐ":[27515],"wěn mò":[27518],"piǎo":[27533,30379,30623,37285,39008],"qíng jìng":[27537],"fǒu bó":[27541],"zhí shi":[27542],"yè yān yàn":[27543],"hūn mèi":[27545],"chòu":[27552,33264,36954],"kuì huì":[27560,28291,28528],"cuàn":[27561,29110,29224,31388,31428,31713,31762],"yīn yān yǐn":[27575],"qìng kēng shēng":[27576],"yáo xiáo xiào":[27581],"gū gǔ":[27586,34500],"guàn wān":[27596],"dú dài":[27602],"xún xùn":[27621],"mú":[27626,27649],"dòu nuò":[27629],"sāi suī":[27640],lu:[27655],"sào":[27657,30233,30658,39646],"shì zhī":[27663],"dī dǐ":[27664],"máng méng":[27667],"yáng rì":[27676],"shuǐ":[27700,27701,27706,38294],"zhěng chéng zhèng":[27702],"tǔn":[27709],"fán fàn":[27710],"guǐ jiǔ":[27711],"bīn pà pā":[27715],"zhuó què":[27723],"dà tài":[27727],"pìn":[27734,29277,32856],"hàn hán":[27735,39343],tu:[27746],"tāng shāng":[27748,28271],"zhī jì":[27749],"gàn hán cén":[27765],"wèn mén":[27766],"fāng pāng":[27768],"hǔ huǎng":[27771],"niú yóu":[27772],"hàng":[27782],"shěn chén":[27784],"dùn zhuàn":[27788],"nǜ niǔ":[27793],"méi mò":[27794,27809],"tà dá":[27795],"mì wù":[27797],"hóng pāng":[27799],"shā shà":[27801],"zhuǐ zǐ":[27805],"ōu òu":[27812,28442],"jǔ jù":[27822],"tuō duó":[27824],"mǐ lì":[27829],"yí chí":[27830],"xiè yì":[27844],"bó pō":[27850],"mì bì":[27852,31192],"chù shè":[27855],"yōu yòu āo":[27857],"pēng píng":[27865,30801],"pào pāo":[27873],"ní nì":[27877,31196],"yuè sà":[27879],"jué xuè":[27884,30118],"lóng shuāng":[27895,28711],"luò pō":[27898,28668],"zé shì":[27901,28580],"sǎ xǐ":[27922],"sè qì zì":[27923],"xǐ xiǎn":[27927],"kǎo kào":[27928],"àn yàn è":[27933],"lěi lèi":[27937],"qiè jié":[27951],"qiǎn jiān":[27973],"jì jǐ":[27982,28168,28639,32426],"hǔ xǔ":[27986,28408],"jùn xùn":[27994,28652],"yǐng chéng yíng":[28007],"liàn lì":[28016],"féng hóng":[28018,28292],"jiǒng jiōng":[28027],"suī něi":[28029],"yǒng chōng":[28044],"tūn yūn":[28050],"wō guō":[28065,28198],"hēng":[28069,33053],"zhǎng zhàng":[28072,28466],"shòu tāo":[28077],"shuàn":[28078,33128],"kōng náng":[28083],"wò wǎn yuān":[28084],"tuō tuò":[28086],"wō":[28089,29479,31389,31401,33716,33845,34583,34680,36370],"qiè jí":[28097],"guǒ guàn":[28105],"lín lìn":[28107,29532,30084],"tǎng chǎng":[28108],"nào chuò zhuō":[28118],"péng píng":[28124],"féi":[28125,32933,33107,34608],"pì pèi":[28128],"niǎn shěn":[28144],"biāo hǔ":[28146],"chún zhūn":[28147],"hùn hún":[28151],"qiǎn":[28154,32382,32561,32951,33153,34616,35700,35892,36963,37971],"wèn mín":[28162],"rè ruò luò":[28163],"dú dòu":[28174,28678,35835],"jiàn jiān":[28176,28293,28472,28666],"miǎn shéng":[28177,28576],"nuǎn nuán":[28188],"qiú wù":[28190],"tíng tīng":[28191],"dì tí dī":[28199],"gǎng jiǎng":[28207],"hōng qìng":[28217],"tuān":[28237,29011],"huì mǐn xū":[28239],"xǔ xù":[28241],"pén":[28243,29931,30406,33872],"mǐn hūn":[28259],"tuàn nuǎn":[28266],"qiū jiǎo":[28267,28268],"yān yīn":[28270],"bàn pán":[28276],"zhuāng hún":[28279],"yàn guì":[28302],"lián liǎn nián xián xiàn":[28307],"dá tǎ":[28314],"liū liù":[28316,28561,36435],"lùn":[28323],"mǎ":[28324,29368,29505,29595,29802,30721,30908,36964,37815,39340,39532,39970,40396],"zhēn qín":[28337],"nì niào":[28346],"chù xù":[28352,30044],"wěng wēng":[28355],"hào xuè":[28360],"qì xì xiē":[28362],"xíng yíng":[28366],"zé hào":[28380],"piāo piào piǎo":[28418],"cóng sǒng":[28430],"féng péng":[28456],"luò tà":[28463],"pēng bēn":[28464],"chóng shuāng":[28468],"huǒ kuò huò":[28471],"liáo liú":[28475],"cuǐ cuī":[28476],"cóng zǒng":[28480],"cóng zōng":[28488],"pì piē":[28494],"dàng xiàng":[28498],"huáng guāng":[28514],"liáo lào lǎo":[28518],"cōng zòng":[28520],"zhí zhì":[28522],"tān shàn":[28524],"tú zhā":[28531],"sàn sǎ":[28533],"hēi":[28534,40657,40658],"chéng dèng":[28548,28691],"cūn cún":[28554],"péng pēng":[28558],"hòng gǒng":[28562,37566],"wàn màn":[28587],"kuài huì":[28590],"guō wō":[28612],"pēn fén":[28614],"jí shà":[28616],"huì huò":[28618],"dǐng tìng":[28622],"mǐ nǐ":[28628],"bì pì":[28638],"cuì zuǐ":[28642],"hù huò":[28649],"ǎi kài kè":[28653],"wěi duì":[28667,28706],"zàn cuán":[28669,28754],"yǎng yàng":[28673],"wǎng wāng":[28679],"mò miè":[28686,30492],"suǐ":[28705,33208,39635],"huái wāi":[28708],"zùn jiàn":[28723],"yīng yǐng yìng":[28724],"ráng ràng":[28732],"shuàng":[28736],"zhuó jiào zé":[28738],"sǎ":[28753,35375,38776],"luán luàn":[28755],"dǎng tǎng":[28761],"xún quán quàn":[28773],"huǒ biāo":[28780],"zhà yù":[28793],"fén bèn":[28803],"jiǒng guì":[28805],"pàng fēng":[28816],"quē":[28820,32570,32572,33947],"biān":[28830,29048,29954,30765,31550,31663,31849,32232,32534,34649,37001,37002,37757,38829,39934,39935,40138],"zhāo zhào":[28836],"zhuō chù":[28842],"pào páo bāo":[28846],"páo fǒu":[28848],"shǎn qián shān":[28854],"zhà zhá":[28856],"jiǎo yào":[28868],"quǎn":[28871,29356,29357,30030,32163,32507,34375],"yàng yáng":[28874],"lào luò":[28889],"huí huǐ":[28896],"rè":[28909,29105],"fú páo":[28912],"xiè chè":[28914,28942],"yàn shān":[28923],"hūn xūn":[28932],"kào":[28933,29330,37548,38096,38752,39859,39884,40083],"juān yè":[28934],"jùn qū":[28940],"tāo dào":[28952],"chǎo jù":[28963],"wò ài":[28965],"zǒng cōng":[28967],"xī yì":[28972],"xìn xīn":[28974],"chāo zhuō":[28975],"xiǒng yīng":[28984,28989],"kuǐ":[28995,36332,36446,38925],"huī yùn xūn":[28999],"jiǎo qiāo":[29005],"qián shǎn shān":[29012],"xī yí":[29013],"shà shā":[29022],"yè zhá":[29024],"yáng yàng":[29036],"ēn yūn":[29054],"yūn yǔn":[29061],"hè xiāo":[29063],"xióng":[29066,29067,38596],"xūn xùn":[29071,29195],"gòng":[29077,36002,36129],"liū":[29080],"cōng zǒng":[29084],"lù āo":[29085],"shú shóu":[29087],"fēng péng":[29090],"cuǐ suī":[29091],"tēng":[29093,33199,40735],"yùn yù":[29096],"áo āo":[29100],"hàn rǎn":[29103],"ōu ǒu":[29104],"huáng huǎng":[29119],"chǎn dǎn chàn":[29120],"jiāo zhuó qiáo jué":[29131],"yàn yān":[29141],"tài liè":[29156],"āo":[29194],"yàn xún":[29203],"jué jiào":[29213,35216,35226,35258,35273],"lǎn làn":[29222],"zhuǎ zhǎo":[29226],"zhǎo zhuǎ":[29227],"fù fǔ":[29238],"diē":[29241,35130,36300],"zāng":[29250,32664,33255,36045,36056,36115,36124,36163,39634],"piàn piān":[29255],"biān miàn":[29265],"bǎng":[29267,32129,32465],"yǒu yōng":[29271],"chēng chèng":[29274,31424],"niú":[29275,29276],"jiū lè":[29278],"mù móu":[29279],"māng":[29284],"gē qiú":[29291],"yòu chōu":[29296],"tè zhí":[29318],"bēn":[29319,37659,38171],"jiān qián":[29325,29610],"má":[29336,30194,34100,34759,40635],"máo lí":[29339],"bá quǎn":[29358],"zhuó bào":[29363],"àn hān":[29364],"kàng gǎng":[29370],"pèi fèi":[29371],"fān huān":[29375],"kuáng":[29378,29381,35473,35827,36566,36576,40287],"yí quán chí":[29387],"xīng shēng":[29388],"tuó yí":[29391],"kǔ":[29404,33510],"huán huān":[29407],"hé mò":[29410],"tà shì":[29415],"máng dòu":[29429],"xī shǐ":[29430],"suān":[29435,30176,37240],"bài pí":[29448],"jiān yàn":[29455,35939],"yī yǐ":[29463],"yá wèi":[29466],"cāi":[29468],"māo máo":[29483,35987],"chuàn chuān":[29485],"tuān tuàn":[29487,35986],"yà jiá qiè":[29488],"hè xiē gé hài":[29490],"biān piàn":[29493,29553],"bó pò":[29500],"háo gāo":[29515],"fén fèn":[29526],"yào xiāo":[29535],"shuò xī":[29537],"gé liè xiē":[29542],"nòu rú":[29555],"náo nǎo yōu":[29558],"ráng":[29565,29924,31155,31331,31344,34328,36511,39716],"náo yōu":[29567],"lǜ shuài":[29575],"wáng wàng":[29579],"yáng chàng":[29594],"mín wén":[29599],"bīn fēn":[29602],"mén yǔn":[29607],"qiāng cāng":[29617,29810,31724],"án gān":[29621],"xuán xián":[29625],"cī cǐ":[29628,36304],"yí tāi":[29638],"zǔ jù":[29639],"fà":[29648,29754,34143,39658,39662],"yín kèn":[29666],"huī hún":[29682],"xuán qióng":[29697],"fú fū":[29704],"bǐng pín":[29717],"cuì sè":[29719],"yù wéi":[29727],"tiǎn tiàn":[29728],"zhuó zuó":[29730],"běng pěi":[29731],"guǎn":[29743,29869,30191,31590,31649,33304,36648,37671,39208,39302,40164],"hún huī":[29759],"xié jiē":[29774],"chàng dàng yáng":[29778],"tiàn zhèn":[29809],"bīn pián":[29816,29880],"tú shū":[29817],"cuǐ":[29824,30368,36257],"zǎo suǒ":[29829],"jué qióng":[29850],"lú fū":[29879],"jì zī":[29886],"suí":[29901,32143,32485,36928,38543,38568,39620],"mí xǐ":[29909],"qióng wěi wèi":[29911],"huán yè yà":[29915],"bó páo":[29919],"zhí hú":[29921],"piáo":[29922,38365],"wǎ wà":[29926],"xiáng hóng":[29928],"wèng":[29934,29973,32587,34169,40774],"shèn shén":[29978],"ruí":[29988,32204,34148],"yòng":[29992,30781,33498,33935,37279],"shuǎi":[29993],"béng":[29997,29998],"yóu zhá":[30004],"diàn tián shèng":[30008],"tǐng dīng":[30010,30012],"zāi zī":[30014],"bì qí":[30017],"dá fú":[30039],"cè jì":[30047],"zāi zī tián":[30048],"zhì chóu shì":[30052],"fān pān":[30056,30058],"shē yú":[30060],"dāng dàng dǎng":[30070],"jiāng qiáng":[30086],"pǐ yǎ shū":[30091],"jié qiè":[30092],"yí nǐ":[30097],"nè":[30098,30514,35365,35767],"gē yì":[30105],"nüè yào":[30111,30247],"lì lài":[30112,30296],"yǎ xiā":[30120],"xuē":[30134,33926,34203,36773,36778,38772,38846],"dǎn da":[30136],"fá biǎn":[30138],"fèi féi":[30143,30193],"shān diàn":[30145],"téng chóng":[30155],"tōng tóng":[30156],"wěi yòu yù":[30159],"tān shǐ":[30161],"pū pù":[30177,37610],"bēng péng":[30189],"má lìn":[30195],"tiǎn diàn":[30198],"ān yè è":[30199],"kē ē":[30206],"zhì chì":[30216],"jiǎ xiá xiā":[30229],"lěi huì":[30243],"chài cuó":[30245],"diān chēn":[30248],"da dá":[30249],"biě biē":[30250],"qué":[30264],"dàn dān":[30281],"guì wēi":[30288],"nòng nóng":[30289],"biē biě":[30303],"bō bǒ":[30327],"bái":[30333],"jí bī":[30336],"de dì dí dī":[30340],"pā bà":[30341],"gāo háo":[30347],"gāo yáo":[30352],"lì luò bō":[30378],"zhā cǔ":[30395],"zhāo zhǎn dǎn":[30397],"jiān jiàn":[30417,30435,37627,38388,38828],"gài gě hé":[30422],"máng wàng":[30451],"yuǎn":[30454,36922,36960],"tián xián":[30455],"xiāng xiàng":[30456],"dǔn":[30457,36280,36489],"xì pǎn":[30459],"shěng xǐng":[30465],"yún hùn":[30467],"miǎn miàn":[30468],"kàn kān":[30475],"yìng yāng yǎng":[30479],"yǎo āo ǎo":[30481],"jū xū kōu":[30487],"yí chì":[30489],"dié tì":[30499],"bǐng fǎng":[30506],"pàng pán":[30507],"mī mí":[30511,30599],"xuàn shùn xún":[30516],"tiào":[30522,31900,31990,35228,36242],"zhe zhuó zháo zhāo":[30528],"qiáo shào xiāo":[30532],"cuó zhuài":[30537],"gùn":[30548,35636],"suì zuì":[30559],"pì bì":[30565,31275,36767],"yì zé gāo":[30570],"xǐng xìng":[30578],"guì wèi kuì":[30598],"kòu jì":[30601],"qióng huán":[30607],"mán mén":[30610,30622],"diāo dōu":[30615],"lou lóu lǘ":[30620],"shùn rún":[30628],"liào liǎo":[30637,38028],"jiàn xián":[30639],"wǔ mí":[30644],"guì kuì":[30646],"nǐng chēng":[30659],"huò yuè":[30662],"mēng méng":[30663],"kuàng guō":[30668],"guàn quán":[30676],"mǎn mán":[30677],"jīn guān qín":[30684],"jīn qín guān":[30685],"yù xù jué":[30686],"jiǎo jiáo":[30699,30703],"duǎn":[30701],"shí dàn":[30707],"gāng qiāng kòng":[30716],"huā xū":[30729],"pīn bīn fēn":[30735],"yán yàn":[30740,30799],"luǒ kē":[30754],"fú fèi":[30761,31536],"zhǔ zhù":[30763],"lá lì lā":[30764],"kuāng guāng":[30788],"gè luò":[30796],"shuò shí":[30805,30889],"wèi wéi ái":[30809],"què kè kù":[30814],"mǎng bàng":[30821],"luò lòng":[30822],"yǒng tóng":[30823],"nüè":[30840,34384],"kēng kěng":[30843],"yān yǎn":[30845],"zhuì chuí duǒ":[30846],"kōng kòng":[30847],"zòng cóng":[30850],"jiān zhàn":[30858],"lù liù":[30860,38470],"què xī":[30863],"lún lǔn lùn":[30870],"náo gāng":[30873],"jié yà":[30883],"wèi wěi":[30888],"tí dī":[30894],"chá chā":[30900],"qiāo què":[30907],"sù xiè":[30911],"liú liù":[30914,36955,37798,39311],"sī tí":[30915],"bàng páng":[30917],"huá kě gū":[30918],"wěi kuǐ":[30920],"xiá qià yà":[30925],"lián qiān":[30927],"wèi ái gài":[30929],"lá lā":[30934],"áo qiāo":[30941],"pēng pèng":[30942,38299],"yīn yǐn":[30948],"lěi léi":[30949],"mó mò":[30952],"qì zhú":[30953],"láo luò":[30961],"pán bō":[30971],"jí shé":[30972],"hé qiāo qiào":[30985],"kè huò":[30986],"què hú":[30992],"è qì":[31e3],"cǎ":[31012,31032],"xián xín":[31013],"léi lěi lèi":[31015],"yán yǎn":[31033],"qí zhǐ":[31047,34452],"bēng fāng":[31050],"bì mì":[31061],"suàn":[31064,31495,31597,31639,33948],"piào piāo":[31080],"jì zhài":[31085],"shuì lèi":[31089],"jìn jīn":[31105],"chán shàn":[31109],"yáng shāng":[31123],"zhī zhǐ tí":[31124],"shàn chán":[31146],"yú yù ǒu":[31162],"zǐ zì":[31172],"chá ná":[31173],"zhǒng zhòng chóng":[31181],"hào mào":[31183],"kù kū":[31193],"zū":[31199,33861],"chèng":[31204,31338],"huó kuò":[31214,31219],"chēng chèn chèng":[31216,31281],"shì zhì":[31218,37556],"fù pū":[31231],"xùn zè":[31236],"tú shǔ":[31244],"zhùn zhǔn":[31253],"jī qí":[31256,32168,35309],"léng líng":[31260],"zuì zú sū":[31265],"xì qiè":[31271,37060],"zhǒng zhòng":[31278],"zōng zǒng":[31279],"xián jiān liàn":[31284],"zī jiū":[31285],"jī qǐ":[31293],"ròng":[31299],"shān cǎn cēn":[31303],"mén méi":[31304],"jǐ jì":[31318],"xiāo rào":[31320],"zhuō bó":[31323],"tóng zhǒng zhòng":[31324],"zuō":[31325],"biāo pāo":[31342,34280],"zhuō jué":[31345],"cuán zàn":[31347],"kōng kòng kǒng":[31354],"yū yǔ":[31355],"zhǎi":[31364,37465],"báo":[31367,38649],"kū zhú":[31371],"jiào liáo liù":[31372],"wā guī":[31376],"tiǎo yáo":[31381],"xūn yìn":[31400],"yà yē":[31403],"tián diān yǎn":[31412],"chāo kē":[31420],"kuǎn cuàn":[31421,31422],"chù qì":[31440],"qǔ kǒu":[31448],"jìng zhěn":[31463],"kǎn kàn":[31479],"zhú dǔ":[31482],"lè jīn":[31483],"zhuì ruì":[31501],"háng hàng":[31504],"cén jìn hán":[31506],"dā xiá nà":[31514],"zé zuó":[31534],"lóng lǒng":[31548,31725,31840,36504,40851],"zhù zhú":[31569,31689],"dá dā":[31572,33605],"shāi":[31579,31721,31745,31853],"yún jūn":[31584],"láng làng":[31588,37070,38406],"zhì zhǐ":[31595],o:[31613],"póu bù fú pú":[31617],"pái bēi":[31620],"gè":[31623,34428,37499,38124],"tái chí":[31624],"guǎi dài":[31625],"zhào dào":[31628],"jīng qìng":[31632],"lín lǐn":[31638],"jùn qūn":[31640],"shī yí":[31671,37366],"yuē yào chuò":[31673],"xiāo shuò qiào":[31678],"gōng gǎn lǒng":[31714],"páng péng":[31715],"zhuó huò":[31719],"jiǎn jiān":[31727],"dí zhú":[31732],"zān cēn cǎn":[31736],"zhuàn suǎn zuàn":[31737],"piǎo biāo":[31739],"guó guì":[31746],"cè jí":[31758],"mì miè":[31770],"shāi sī":[31771],"sǔn zhuàn":[31784],"gàn gǎn":[31795],"bò bǒ":[31800],"bó bù":[31807],shi:[31810],"zhēn jiān":[31816],"zhuàn zuǎn":[31825],"fān pān biān":[31827],"sǒu shǔ":[31828],"zuǎn":[31851,32356,32386,32393,32408,32565],"nǚ":[31865,37369,38037],"shā chǎo":[31878],"kāng jīng":[31879],"fěn":[31881,40698],"cū":[31895,35285,40577,40580,40612],"nián zhān":[31896],"cè sè":[31907],"zhōu yù":[31909],"shēn sǎn":[31937],"biān biǎn":[31940,33849],"miàn":[31942,38754,38755,40618,40619,40629,40634],"hú hū hù":[31946],"gǔ gòu":[31955],"mí méi":[31964],"sǎn shēn":[31965,31971],"zāo":[31967,36455,36973,37289],"mì sī":[31992],"jiū jiǔ":[31994],"xì jì":[31995,32363],"zhēng zhěng":[31997],"chà chǎ":[32001,34921],"yuē yāo":[32004,32422],"hóng gōng":[32005,32418],"hé gē":[32007,32421],"wén wèn":[32011,32441],"fóu":[32017],"jì jié jiè":[32018],"pī pí bǐ":[32021,32432],"jīn jìn":[32031],"zhā zā":[32037,32046],"hā":[32038],"fū fù":[32040],"chōu chóu":[32044],"lèi léi lěi":[32047],"bō bì":[32052],"tiǎn zhěn":[32062],"jiōng jiǒng":[32069],"jié jiē":[32080,32467,33410],"guà kuā":[32083],"bǎi mò":[32084],"gēng huán":[32089],"jié xié":[32092],"quán shuān":[32095],"gǎi ǎi":[32096],"luò lào":[32097,32476],"bīng bēng pēng":[32099],"gěi jǐ":[32102,32473],"tóng tōng dòng":[32103],"tiào diào dào":[32105],"lěi lèi léi":[32107],"gāi hài":[32111],"chī zhǐ":[32122],"wèn miǎn mán wàn":[32123],"huán huàn wàn":[32132],"qīn xiān":[32133],"tì tí":[32136],"yán xiàn":[32150],"zōng zèng zòng":[32156],"chēn lín":[32157],"zhǔn zhùn":[32167],"qiàn qīng zhēng":[32170],"qìng qǐ":[32174],"lún guān":[32184,32438],"chuò chāo":[32189,32496],"tián tǎn chān":[32194],"lǜ lù":[32209,32511],"ruǎn ruàn":[32219],"jí qī":[32221],"zhòng chóng":[32223,37325],"miáo máo":[32226],"xiè yè":[32228],"huǎn":[32233,32531],"gēng gèng":[32234,32262],"tōu xū shū":[32240],"zōng zòng":[32245,32332],"yùn gǔn":[32247],"guā wō":[32250],"yùn yūn wēn":[32252,32277],"bāng bàng":[32269],"gǔ hú":[32270,40379],"cī cuò suǒ":[32274],"cuī shuāi":[32279],"róng rǒng ròng":[32281],"zài zēng":[32289],"cài":[32297,33756,34081],"féng fèng":[32299],"suō sù":[32302,32553],"yǎn yǐn":[32303,37203],"zòng zǒng":[32305,32437],"zhuàn juàn":[32307],"mò mù":[32312,33707],"piǎo piāo":[32313,32549],"fán pó":[32321],"bēng bèng":[32323],"móu miù miào liǎo":[32326],"yáo yóu zhòu":[32327],"zēng zèng":[32338,32559],"jú jué":[32344],"chuō chuò":[32347],"zūn zǔn":[32348],"rào":[32350,32469,36982],"chǎn chán":[32351],"huì huí":[32354,32523,34289],"qiāo sāo zǎo":[32368],"jiǎo zhuó":[32371,32564],"dàn tán chán":[32373],"nǒng":[32375],"pú fú":[32384],"yào lì":[32389],"rǎng xiāng":[32405],"lí sǎ xǐ lǐ":[32410],"xiān qiàn":[32420],"jīng jìng":[32463],"tí tì":[32488],"bēng běng bèng":[32503],"zōng zèng":[32508],"jī qī":[32521],"wēn yùn yūn":[32522],"fèng féng":[32541],"shuāi cuī suī":[32542],"miù móu liáo miào mù":[32554],"qiāo sāo":[32562],"fǒu":[32566,32569,32571,38636,40192],"bà ba pí":[32610,32631],"guà guǎi":[32619],"yáng xiáng":[32650,32655],"měi gāo":[32665],"yì xī":[32667],"qiǎng qiān":[32671],"qiāng kòng":[32683],"qián xián yán":[32684],"nóu":[32698],"hóng gòng":[32702],"pī bì pō":[32717],"qú yù":[32721],"ké":[32727],"qiào qiáo":[32728],"zhái dí":[32735],"dào zhōu":[32738],"hóu qú":[32757],"shuǎ":[32781],"ruǎn nuò":[32782],"ér nài":[32783],"zhuān duān":[32785],"pá bà":[32793],"chí sì":[32795],"qù chú":[32797],"lún lǔn":[32803],"jí jiè":[32804],"tāng tǎng":[32805],"pǎng":[32810,35243],"zhá zé":[32811],"yē yé":[32822],"yún yíng":[32826],"wà tuǐ zhuó":[32841],"ér nǜ":[32847],"tiē zhé":[32849],"dǐ zhì":[32860],"qié":[32890],"nǐ jiàn":[32891],"lèi lē":[32907],"cào":[32911,35161,37173,40732],"bó dí":[32913],"xiào xiāo":[32918],"dù dǔ":[32922],"chāi":[32926,37365,38039],"hán qín hàn":[32931],"pàng pán pàn":[32936,32982],"zhūn chún":[32939],"āng":[32942,39599],"yù yō":[32946],"pí bǐ bì":[32950],"fèi bì":[32967],"bèi bēi":[32972],"fèi zǐ":[32975],"píng pēng":[32979,33529],"fū fú zhǒu":[32981],"shèng shēng":[32988],"kuà":[33007,36328,39611],"gǎi hǎi":[33010],"gē gé gā":[33011],"néng nài":[33021],"guī kuì":[33023],"mài mò":[33033],"zāng zàng":[33039],"jiǎo jué":[33050,35282],"cuǒ":[33054],"de te":[33062],"zuī juān":[33063],"něi":[33070,33095,39186,39297,39870,39896],"pú fǔ":[33071],"niào":[33074],"shuí":[33085],"guò":[33090,36942,37945],"là xī":[33098],"yān ā":[33100],"gāo gào":[33167],"lù biāo":[33172],"chuái":[33175],"zhuān chuán chún zhuǎn":[33182],"chuài":[33194,36409],"fán pán":[33200],"wǔ hū":[33204],"shān dàn":[33211],"tún":[33216,33227,34508,35928,35930,36568,38677,39145,39272,39784,40064,40663],"bì bei":[33218],"là gé":[33224],"sào sāo":[33226],"nào":[33233,38297,38393,39719],"ní luán":[33249],"qiān xián":[33252],"guàng jiǒng":[33254],"guǎng jiǒng":[33257],"chòu xiù":[33261],"mián biān":[33265],"dié zhí":[33271],"zhī jìn":[33272],"shè shě":[33293],"pù":[33302,33303],"bān bō pán":[33324],"kuā":[33343],"gèn gěn":[33390],"sè shǎi":[33394],"fú bó":[33396],"jiāo qiú":[33405],"chāi chā":[33414],"sháo què":[33421],"hù xià":[33424],"zì zǐ":[33427],"huì hū":[33428],"tún chūn":[33434],"jiè gài":[33445],"xù zhù":[33447],"yuán yán":[33451],"xīn xìn":[33455],"lún huā":[33458],"wù hū":[33460],"gōu gǒu":[33462],"mào máo":[33468],"fèi fú":[33470],"chán yín":[33474],"qiē":[33478],"sū sù":[33487],"tiáo sháo":[33493],"lì jī":[33497],"kē hē":[33499],"jù qǔ":[33507],"ruò rě":[33509],"zhù níng":[33511],"pā bó":[33513],"xiú":[33516],"zhǎ zuó":[33522],"jū chá":[33524],"nié":[33526],"shēng ruí":[33532],"qié jiā":[33540],"zǐ cí":[33544],"qiàn xī":[33564],"chǎi":[33565],"fá pèi":[33591],"ráo":[33627,34136,35155,39250,39286],"yíng xíng":[33637],"qián xún":[33640,34113],"yìn yīn":[33643],"hé hè":[33655],"shā suō":[33678],"péng fēng":[33681],"shēn xīn":[33688],"wǎn guān guǎn":[33694],"yóu sù":[33700],"shāo xiāo":[33702,34552],"làng liáng":[33704],"piǎo fú":[33705],"wèn wǎn miǎn":[33708],"shì shí":[33715,33940],"tù tú":[33717],"xiān liǎn":[33718,34207],"wǎn yù":[33728],"zōu chù":[33734],"lù lǜ":[33737],"jūn jùn":[33740],"niè rěn":[33741],"zī zì zāi":[33745],"tú tù":[33759],"jiē shà":[33768],"qiáo zhǎo":[33772],"tái zhī chí":[33773],"fēi fěi":[33778,34586],"qín qīn jīn":[33779],"zū jù":[33785,33961],"lǐn má":[33787],"tián tiàn":[33790],"tiē":[33820,36028,36148],"luò là lào luō":[33853],"zhù zhuó zhe":[33879],"shèn rèn":[33882],"gě gé":[33883],"jùn suǒ":[33904],"kuì kuài":[33929],"rú ná":[33944],"méng mēng měng":[33945],"yuán huán":[33949],"xú shú":[33955],"xí xì":[33973],"mì míng":[33986],"sōu sǒu":[33987],"gài gě hé hài":[33995],"yǎo zhuó":[34004],"diào tiáo dí":[34023],"xū qiū fū":[34034],"zí jú":[34043],"liǎo lù":[34044],xu:[34047],"hàn hǎn":[34058],"màn wàn mán":[34067],"pó bò":[34082],"fān fán bō":[34115],"hóng hòng":[34171],"yù ào":[34177,38569],"xí xiào":[34178],"báo bó bò":[34180],"cí zī":[34187],"wàn luàn":[34189],"kǎo hāo":[34215],"yuǎn wěi":[34227],"zhòu chóu":[34229],"wō mái":[34230],"xiāo hào":[34243],"yù xù xū":[34247],"jiè jí":[34249],"diào zhuó":[34251],"cáng zàng":[34255],"lǎ":[34270],"chú zhū":[34296],"pín píng":[34315],"gān hán":[34423],"hóng jiàng":[34425],"huī huǐ":[34426],"xiā há":[34430],"mǎ mà mā":[34434],"fāng bàng":[34436],"bàng bèng":[34444],"jué quē":[34455],"qín qián":[34457],"gōng zhōng":[34467],"fǔ fù":[34469],"dài dé":[34478],"gǒu qú xù":[34492],"bǒ pí":[34494],"shé yí":[34503],"tiě":[34504,37444,37525,37921,37941,38081,39510],"gé luò":[34514],"máng bàng":[34518],"yì xǔ":[34529],"há gé":[34532],"qiè ní":[34538],"é yǐ":[34558],"zhē zhé":[34567],"là zhà":[34593],"suò":[34614,36900],"yóu qiú":[34660],"xiā hā":[34662],"xī qī":[34695],"bī pí":[34709],"nài něng":[34714],"hé xiá":[34715],"guì huǐ":[34717],"mǎ mā mà":[34718],"shì zhē":[34731],"zhì dié":[34738],"jiàn chán":[34745],"ma má mò":[34758],"mǎng měng":[34770],"biē bié":[34782],"bēn fèi":[34790],"láo liáo":[34791],"yín xún":[34795],"lí lǐ":[34849],"xuè xiě":[34880],"xíng háng hàng héng":[34892],"shuāi cuī":[34928],"tuó tuō":[34953],"lǐng líng":[34954],"bào páo pào":[34956],"jù jiē":[34963],"hè kè":[34964],"yí yì":[34968,36004],"nà jué":[34982],"bèi pī":[34987],"chǐ nuǒ":[34994],"chǐ qǐ duǒ nuǒ":[34995],"jiá qiā jié":[34999],"bó mò":[35001],"guī guà":[35007],"liè liě":[35010],"chéng chěng":[35022],"jiē gé":[35027],"dāo chóu":[35055],"shang cháng":[35059],"yuān gǔn":[35063],"yǎn ān":[35066],"tì xī":[35068],"fù fú":[35092],"chǔ zhǔ":[35098],"tuì tùn":[35114],"lǎi":[35184],"yào yāo":[35201],"qín tán":[35203],"jiàn xiàn":[35211,35265],"piǎn":[35217,35550,35869,36021],"piē miè":[35221],"yíng yǐng":[35246],"qù qū":[35248,35255,35281],"jiàn biǎn":[35253],"luó luǎn":[35254],"zī zuǐ":[35292],"huà xiè":[35295],"jiě jiè xiè":[35299,35303],"xué hù":[35319],"lì lù":[35323],"tǎo":[35342,35752],"zhùn":[35376],"zī zǐ":[35390],"yí dài":[35410,35794],"xiòng":[35415,35783],"diào tiǎo":[35458],"yí chǐ chì":[35459],"lǎng làng":[35471],"ēi éi ěi èi xī":[35474,35830],"shuà":[35484],"yǔ yù":[35486,35821,38632],"shuō shuì yuè":[35498,35828],"shuí shéi":[35504,35841],"qū juè":[35507],"chī lài":[35514],"nì ná":[35517],"diào tiáo":[35519],"pǐ bēi":[35520],"jì jī":[35525],"zé zuò zhǎ cuò":[35534],"chù jí":[35540],"háo xià":[35541],"lùn lún":[35542,35770],"shì dì":[35551],"huà guā":[35555],"xǐ shāi āi":[35568],"nán nàn":[35573,38627],"miù":[35628,35884],"zèn":[35670,35886],"shí zhì":[35672,35782],"juàn xuān":[35714],"yí tuī":[35721],"zhán":[35741],"xǔ hǔ":[35768],"xiáng yáng":[35814],"tiáo diào zhōu":[35843],"chén shèn":[35852],"mí mèi":[35868],"màn mán":[35881],"gǔ yù":[35895],"huō huò huá":[35905],"zhì zhài":[35960],"huān huán":[35974],"kěn kūn":[35975],"mò hé":[35976],"mò hé háo":[35977],"jù lóu":[35991],"zé zhài":[36012,36131],"dài tè":[36024],"bì bēn":[36033],"jiǎ gǔ jià":[36040],"xiōng mín":[36079],"càng":[36086],"zhuàn zuàn":[36090,36186],"wàn zhuàn":[36099],"gàn gòng zhuàng":[36123],"yuán yùn":[36128],"bēn bì":[36146],"jiǎ gǔ":[36158],"zǒu":[36208,36209,39888],"dié tú":[36227],"jū qiè":[36228],"qū cù":[36235,36264],"jí jié":[36236],"guā huó":[36239],"què qì jí":[36254],"tàng tāng":[36255],"chuō zhuó":[36256],"qù cù":[36259],"yuè tì":[36271],"bō bào":[36277],"kuà wù":[36278],"guì jué":[36281],"fāng fàng páng":[36285],"páo bà":[36289],"qí qǐ":[36290],"jiàn chén":[36296],"pǎo páo":[36305],"diǎn diē tiē":[36309],"jū jù qiè":[36313],"bǒ":[36315],"luò lì":[36318],"dài duò duō chí":[36322],"zhuǎi":[36329],"bèng pián":[36336],"tiào táo":[36339],"shū chōu":[36350],"liàng liáng":[36361],"tà tā":[36367],"chǎ":[36421,37972,38258],"dí zhí":[36450],"dēng dèng":[36460,37913,38251],"cèng":[36461],"dūn cún":[36466],"juě jué":[36470],"liāo":[36477],"xiè sǎ":[36512],"tǐ":[36528,36550,39605],"yà zhá gá":[36555],"xìn xiàn":[36560],"fàn guǐ":[36563],"zhuàn zhuǎn":[36578],"zhóu zhòu":[36600,36724],"bú":[36688,37293,40170],"zhuǎn zhuàn zhuǎi":[36716],"zǎi zài":[36733],"niǎn zhǎn":[36759],"biān bian":[36793],"dào biān":[36794],"yǐ yí":[36806,36836,36849],"guò guo guō":[36807],"wàng kuāng":[36811],"hái huán":[36824],"zhè zhèi":[36825],"yuǎn yuàn":[36828],"zhì lì":[36835],"zhù wǎng":[36844],"zhuī duī":[36861],"shì kuò":[36866],"tòu":[36879],"tōng tòng":[36890],"guàng":[36891],"dǎi dài":[36910],"suì suí":[36930],"tí dì":[36934],"yí wèi":[36951],"shì dí zhé":[36969],"cà":[36970],"huán hái":[36996],"lí chí":[37004],"kàng háng":[37023],"nà nèi nā":[37027],"xié yá yé yú xú":[37034],"gāi hái":[37058],"huán xún":[37063],"chī xī":[37079],"hǎo":[37085],"lì zhí":[37094],"xiáo ǎo":[37097],"dōu dū":[37117],"liǎo":[26338,37149,38269],"zàn cuán cuó":[37186,37191],"dīng dǐng":[37194],"cù zuò":[37218],"fā pō":[37222],"shāi shī":[37246],"niàng":[37247,37304],"qiú chōu":[37268],"pō fā":[37271,37297],"chǎn chěn":[37286],"yàn liǎn xiān":[37302],"niàng niáng":[37312],"lǐ li":[37324],"lí xǐ xī":[37328],"liǎo liào":[37333],"dīng dìng":[37336,38025],"qiǎo jiǎo":[37349],"yú huá":[37354],"huá wū":[37355],"rì rèn jiàn":[37360,37372],"dì dài":[37361],"pī zhāo":[37373],"yá yé":[37374],"bǎ pá":[37376,38063],"tā tuó":[37448,38090],"běi":[37491],"bǐng píng":[37500],"hā kē":[37503,38122],"chòng":[37507,38131],"xiǎng jiōng":[37508],"yù sì":[37513],"xù huì":[37514],"rén rěn":[37515],"shàn shuò":[37519],"chì lì":[37520],"xiǎn xǐ":[37521,38115],"hóu xiàng":[37527],"diào tiáo yáo":[37530],"xiān kuò tiǎn guā":[37531,37565,38118],"zhé niè":[37560],"zhōng yōng":[37567],"tōu tù dòu":[37568],"méi méng":[37570],"wàn jiǎn":[37572,37803],"tǐng dìng":[37580,38116],"juān jiān cuān":[37585],"sī tuó":[37590],"juān xuān juàn":[37591],"wú huá wū":[37592],"zhuó chuò":[37596],"xíng xìng jīng":[37598],"jū jú":[37606,38164],"zuì niè":[37623],"yuān yuǎn wǎn wān":[37626],"gāng gàng":[37628,38050],"zhuī":[37648,38181,39429,39571,40315],"ā":[37650,38165],"cuō chā":[37768],"suǒ sè":[37773],"yáo zú":[37776],"yè tà gé":[37777],"qiāng chēng":[37783],"gé lì":[37784,38217,39730],"bī pī bì":[37790],"gǎo hào":[37804],"zú chuò":[37827],"xiū xiù":[37829],"shòu sōu":[37833],"dí dī":[37841,38237],"qiāo sǎn càn":[37842],"lù áo":[37845],"tāng táng":[37852],"jiàn zàn":[37865],"huì suì ruì":[37880],"qiǎng qiāng":[37881,38250],"sǎn xiàn sà":[37886],"jiǎn jiàn":[37927,38159],"dāng chēng":[37946,38107],"zuān zuàn":[38013],"sà xì":[38033],"yào yuè":[38053],"tǒu dǒu":[38061],"zuàn zuān":[38075],"qiān yán":[38085],"pí pī":[38093],"yáo diào tiáo":[38123],"tāng tàng":[38132],"pù pū":[38138],"tán xiān":[38188],"liù liú":[38223],"hào gǎo":[38224],"táng tāng":[38231],"tán chán xín":[38241],"huò shǎn":[38276],"hàn bì":[38280,38380],"kāng kàng":[38284,38390],"xián jiàn jiān jiǎn":[38290],"xiā xiǎ":[38293],"xiǎ kě":[38300],"biàn guān":[38302],"hé gé":[38308,39052],"hòng xiàng":[38311],"sē xī":[38314],"tíng tǐng":[38318],"è yān":[38332,38415],"hòng juǎn xiàng":[38338],"bǎn pàn":[38342],"dū shé":[38349,38407],"què quē":[38357],"tāng táng chāng":[38363],"kàn hǎn":[38366,38426],"xì sè tà":[38367],"mēn mèn":[38391],"quē què":[38425],"yán diàn":[38461],"ā ē":[38463],"bēi pō pí":[38466],"yàn yǎn":[38529],"yú yáo shù":[38531],"lóng lōng":[38534],"duì zhuì":[38538],"suí duò":[38539],"gāi qí ái":[38545],"huī duò":[38547,38579],"wěi kuí":[38551],"lì dài":[38584],"zhuī cuī wéi":[38585],"hè hú":[38586,40366],"jùn juàn":[38589,38603],"nán nàn nuó":[38590],"què qiāo qiǎo":[38592],"guàn huán":[38618],"guī xī":[38623],"sè xí":[38637],"án":[38648],"wù méng":[38650],"tèng":[38703],"lù lòu":[38706],"mái":[38718],"jìng liàng":[38746],"gé jí":[38761],"bǎ":[38774],"yāng yàng":[38789],"gé tà sǎ":[38792],"biān yìng":[38805],"qiào shāo":[38808],"juān xuān":[38809],"shàng zhǎng":[38813],"pí bǐng bì bēi":[38814],la:[38817],"xiè dié":[38818],"ēng":[38821],"móu mù":[38826],"bì bǐng":[38840],"mèi wà":[38862],"rǒu":[38870],"shè xiè":[38872],"yùn wēn":[38891],"dùn dú":[38931,39039],"duǐ":[38951],"luō":[38961],"bīn pín":[38971],"yóng":[38994,39065,39979],"mān":[39010,39071],"jǐng gěng":[39048],"jié xié jiá":[39049],"kē ké":[39055],"pín bīn":[39057],"chàn zhàn":[39076],"fēng fěng":[39080,39118],"biāo diū":[39081],"bá fú":[39088],"sāo sōu":[39102],"liù liáo":[39106],"shí sì yì":[39135],"yǎng juàn":[39148],"zhù tǒu":[39155],"yí sì":[39156],"zuò zé zhā":[39157],"tiè":[39163,39214],"xiǎng náng":[39263],"táng xíng":[39271],"gē le":[39289],"chā zha":[39303],"náng nǎng":[39317],"yūn wò":[39335],"zhī shì":[39350],"xìn jìn":[39352],"kuài jué":[39363],"zǎng":[39380,39541],"tái dài":[39384],"xún xuān":[39400],"liáng láng":[39418],"piàn":[39447,39449,39575,39800],"dài tái":[39552],"sāo sǎo":[39578],"gǔ gū":[39592],"bèi mó":[39603],"xiāo qiāo":[39609],"bǎng pǎng":[39624],"bó jué":[39625],"bì pǒ":[39666],"máo méng":[39667],"kuò yuè":[39674],"bā bà":[39774,40067],"jì cǐ":[39814],"bó bà":[39818],"zhǎ zhà":[39827,40074],"chóu dài":[39832],"luò gé":[39845],"guī xié wā kuí":[39853],"xiān xiǎn":[39854,40092],"pū bū":[39878],"yì sī":[39907],"bà bó":[40076],"guī xié":[40081],"sāi xǐ":[40131],"niǎo diǎo":[40165],"diāo zhāo":[40173],"gān hàn yàn":[40177],"fū guī":[40186],"jiān qiān zhān":[40189],"hé jiè":[40353],"piān biǎn":[40355],"chuàn zhì":[40360],"cāng qiāng":[40364],"sǔn xùn":[40381],"biāo páo":[40579],"zhù cū":[40582],"jūn qún":[40583,40597],chi:[40630],"mó me":[40636],"mó me ma":[40637],"mí mǒ":[40639],"dàn shèn":[40686],"zhěn yān":[40688],"dǎn zhǎn":[40693],"miǎn mǐn měng":[40702],"hōu":[40769],"nàng":[40777],"qí jì zī zhāi":[40784],"yín kěn yǎn":[40834],"yín kěn":[40840],"gōng wò":[40847],"guī jūn qiū":[40860,40863]},l=[];Object.keys(y).forEach((n=>{const h=y[n];for(let i of h)l[i]=n}));const c={"一个":"yí gè","这个":"zhè ge","不是":"bú shì","成为":"chéng wéi","认为":"rèn wéi","作为":"zuò wéi","部分":"bù fèn","要求":"yāo qiú","应该":"yīng gāi","增长":"zēng zhǎng","不会":"bú huì","提供":"tí gōng","那些":"nèi xiē","觉得":"jué de","任务":"rèn wu","那个":"nà ge","称为":"chēng wéi","为主":"wéi zhǔ","了解":"liǎo jiě","处理":"chǔ lǐ","皇上":"huáng shang","只要":"zhǐ yào","大量":"dà liàng","力量":"lì liàng","几乎":"jī hū","干部":"gàn bù","目的":"mù dì","行为":"xíng wéi","只见":"zhǐ jiàn","认识":"rèn shi","市长":"shì zhǎng","师父":"shī fu","调查":"diào chá","重新":"chóng xīn","分为":"fēn wéi","知识":"zhī shi","导弹":"dǎo dàn","行业":"háng yè","质量":"zhì liàng","银行":"yín háng","参与":"cān yù","充分":"chōng fèn","尽管":"jǐn guǎn","生长":"shēng zhǎng","数量":"shù liàng","应当":"yīng dāng","院长":"yuàn zhǎng","强调":"qiáng diào","只能":"zhǐ néng","音乐":"yīn yuè","以为":"yǐ wéi","处于":"chǔ yú","分子":"fèn zǐ","晚上":"wǎn shang","部长":"bù zhǎng","蒙古":"měng gǔ","只有":"zhǐ yǒu","适当":"shì dàng","只好":"zhǐ hǎo","成长":"chéng zhǎng","高兴":"gāo xìng","不了":"bù liǎo","产量":"chǎn liàng","胖子":"pàng zi","显得":"xiǎn de","只是":"zhǐ shì","似的":"shì de","率领":"shuài lǐng","改为":"gǎi wéi","不禁":"bù jīn","成分":"chéng fèn","答应":"dā yìng","少年":"shào nián","兴趣":"xìng qù","太监":"tài jiàn","休息":"xiū xi","校长":"xiào zhǎng","更新":"gēng xīn","合同":"hé tong","喝道":"hè dào","重庆":"chóng qìng","重建":"chóng jiàn","使得":"shǐ de","审查":"shěn zhā","累计":"lěi jì","给予":"jǐ yǔ","上去":"shǎng qù","行情":"háng qíng","极为":"jí wéi","冠军":"guàn jūn","仿佛":"fǎng fú","头发":"tóu fa","投降":"tóu xiáng","家长":"jiā zhǎng","仔细":"zǐ xì","要是":"yào shi","将领":"jiàng lǐng","含量":"hán liàng","更为":"gèng wéi","只得":"zhǐ de","哪些":"něi xiē","积累":"jī lěi","地处":"dì chǔ","县长":"xiàn zhǎng","少女":"shào nǚ","路上":"lù shang","只怕":"zhǐ pà","能量":"néng liàng","一度":"yí dù","储量":"chǔ liàng","供应":"gōng yìng","挑战":"tiǎo zhàn","西藏":"xī zàng","记得":"jì de","影片":"yǐng piān","总量":"zǒng liàng","当真":"dàng zhēn","将士":"jiàng shì","差别":"chā bié","较为":"jiào wéi","一处":"yī chǔ","照片":"zhào piān","长老":"zhǎng lǎo","大夫":"dài fū","差异":"chā yì","懂得":"dǒng de","尽量":"jǐn liàng","模样":"mú yàng","的确":"dí què","鱼肚":"yú dǔ","为首":"wéi shǒu","便宜":"pián yí","更名":"gēng míng","石头":"shí tou","州长":"zhōu zhǎng","为止":"wéi zhǐ","漂亮":"piào liàng","炮弹":"pào dàn","藏族":"zàng zú","哪个":"něi gè","角色":"jué sè","当作":"dàng zuò","尽快":"jǐn kuài","人为":"rén wéi","重复":"chóng fù","胡同":"hú tòng","差距":"chā jù","弟兄":"dì xiong","大将":"dà jiàng","肚子":"dǔ zi","睡觉":"shuì jiào","团长":"tuán zhǎng","队长":"duì zhǎng","区长":"qū zhǎng","难得":"nán de","丫头":"yā tou","打听":"dǎ ting","会长":"huì zhǎng","弟弟":"dì di","王爷":"wáng ye","当天":"dàng tiān","重量":"zhòng liàng","誉为":"yù wéi","家伙":"jiā huo","华山":"huà shān","椅子":"yǐ zi","流量":"liú liàng","长大":"zhǎng dà","勉强":"miǎn qiǎng","会计":"kuài jì","分散":"fēn sǎn","过分":"guò fèn","济南":"jǐ nán","调动":"diào dòng","燕京":"yān jīng","少将":"shào jiàng","中毒":"zhòng dú","晓得":"xiǎo de","变更":"biàn gēng","认得":"rèn de","苹果":"pín guǒ","念头":"niàn tou","挣扎":"zhēng zhá","三藏":"sān zàng","剥削":"bō xuē","丞相":"chéng xiàng","少量":"shǎo liàng","寻思":"xín sī","夺得":"duó de","干线":"gàn xiàn","呼吁":"hū yù","戏曲":"xì qǔ","处罚":"chǔ fá","长官":"zhǎng guān","见长":"jiàn zhǎng","柏林":"bó lín","亲戚":"qīn qi","身分":"shēn fèn","胳膊":"gē bo","着手":"zhuó shǒu","炸弹":"zhà dàn","咳嗽":"ké sou","西边":"xī bian","赢得":"yíng de","叶子":"yè zi","外长":"wài zhǎng","供给":"gōng jǐ","师长":"shī zhǎng","变量":"biàn liàng","应有":"yīng yǒu","下载":"xià zài","乐器":"yuè qì","间接":"jiàn jiē","底下":"dǐ xia","打扮":"dǎ ban","子弹":"zǐ dàn","弹药":"dàn yào","热量":"rè liàng","削弱":"xuē ruò","骨干":"gǔ gàn","容量":"róng liàng","模糊":"mó hu","转动":"zhuàn dòng","落下":"là xià","称呼":"chēng hu","科长":"kē zhǎng","处置":"chǔ zhì","歌曲":"gē qǔ","着重":"zhuó zhòng","着急":"zháo jí","强迫":"qiǎng pò","庭长":"tíng zhǎng","首相":"shǒu xiàng","喇嘛":"lǎ ma","镇长":"zhèn zhǎng","只管":"zhǐ guǎn","重重":"chóng chóng","免得":"miǎn de","灾难":"zāi nàn","着实":"zhuó shí","所得":"suǒ de","度假":"dù jià","真相":"zhēn xiàng","相貌":"xiàng mào","处分":"chǔ fèn","干预":"gàn yù","委屈":"wěi qu","为期":"wéi qī","伯伯":"bó bo","圈子":"quān zi","见识":"jiàn shi","笼罩":"lǒng zhào","外边":"wài bian","与会":"yù huì","都督":"dū du","宰相":"zǎi xiàng","较量":"jiào liàng","对称":"duì chèn","总长":"zǒng zhǎng","相公":"xiàng gong","空白":"kòng bái","大王":"dài wáng","打量":"dǎ liang","水分":"shuǐ fèn","舌头":"shé tou","没收":"mò shōu","行李":"xíng li","判处":"pàn chǔ","散文":"sǎn wén","处境":"chǔ jìng","孙子":"sūn zi","拳头":"quán tou","打发":"dǎ fa","组长":"zǔ zhǎng","骨头":"gú tou","宁可":"nìng kě","更换":"gēng huàn","薄弱":"bó ruò","还原":"huán yuán","重修":"chóng xiū","东边":"dōng bian","同行":"tóng háng","只顾":"zhǐ gù","爱好":"ài hào","馒头":"mán tou","军长":"jūn zhǎng","散发":"sàn fà","首长":"shǒu zhǎng","厂长":"chǎng zhǎng","司长":"sī zhǎng","长子":"zhǎng zǐ","强劲":"qiáng jìng","恰当":"qià dàng","头儿":"tou er","站长":"zhàn zhǎng","折腾":"zhē teng","相处":"xiāng chǔ","统率":"tǒng shuài","中将":"zhōng jiàng","命中":"mìng zhòng","名将":"míng jiàng","左边":"zuǒ bian","木头":"mù tou","动弹":"dòng dàn","地壳":"dì qiào","干活":"gàn huó","少爷":"shào ye","难民":"nàn mín","水量":"shuǐ liàng","补给":"bǔ jǐ","尾巴":"wěi ba","来得":"lái de","好奇":"hào qí","钥匙":"yào shi","当做":"dàng zuò","沉着":"chén zhuó","哑巴":"yǎ ba","车子":"chē zi","上将":"shàng jiàng","恶心":"ě xin","不对":"bú duì","担子":"dàn zi","应届":"yīng jiè","行列":"háng liè","主角":"zhǔ jué","运转":"yùn zhuàn","兄长":"xiōng zhǎng","格式":"gé shi","正月":"zhēng yuè","营长":"yíng zhǎng","当成":"dàng chéng","右边":"yòu bian","女婿":"nǚ xu","咽喉":"yān hóu","当晚":"dàng wǎn","重阳":"chóng yáng","化为":"huà wéi","双重":"shuāng chóng","吐蕃":"tǔ bō","钻进":"zuān jìn","乐队":"yuè duì","不当":"bù dàng","亮相":"liàng xiàng","被子":"bèi zi","舍得":"shě de","杉木":"shā mù","击中":"jī zhòng","里边":"lǐ bian","排长":"pái zhǎng","假期":"jià qī","分量":"fèn liàng","数次":"shuò cì","提防":"dī fáng","吆喝":"yāo he","查处":"chá chǔ","量子":"liàng zǐ","里头":"lǐ tou","两行":"liǎng háng","调研":"diào yán","伺候":"cì hou","重申":"chóng shēn","枕头":"zhěn tou","拚命":"pàn mìng","社长":"shè zhǎng","苦难":"kǔ nàn","归还":"guī huán","危难":"wēi nàn","批量":"pī liàng","畜牧":"xù mù","点着":"diǎn zháo","甚为":"shèn wéi","小将":"xiǎo jiàng","着眼":"zhuó yǎn","处死":"chǔ sǐ","厌恶":"yàn wù","鼓乐":"gǔ yuè","树干":"shù gàn","秘鲁":"bì lǔ","大方":"dà fang","外头":"wài tou","班长":"bān zhǎng","星宿":"xīng xiù","宁愿":"nìng yuàn","钦差":"qīn chāi","为数":"wéi shù","勾当":"gòu dàng","削减":"xuē jiǎn","一发":"yī fà","间谍":"jiàn dié","埋怨":"mán yuàn","结实":"jiē shi","计量":"jì liàng","淹没":"yān mò","村长":"cūn zhǎng","连长":"lián zhǎng","自给":"zì jǐ","下边":"xià bian","武将":"wǔ jiàng","温差":"wēn chā","直奔":"zhí bèn","供求":"gōng qiú","剂量":"jì liàng","道长":"dào zhǎng","泄露":"xiè lòu","王八":"wáng ba","切割":"qiē gē","间隔":"jiàn gé","一晃":"yī huǎng","长假":"cháng jià","令狐":"líng hú","为害":"wéi hài","句子":"jù zi","偿还":"cháng huán","疙瘩":"gē dā","燕山":"yān shān","堵塞":"dǔ sè","夺冠":"duó guàn","下调":"xià diào","扎实":"zhā shi","电荷":"diàn hè","看守":"kān shǒu","复辟":"fù bì","郁闷":"yù mèn","尽早":"jǐn zǎo","切断":"qiē duàn","指头":"zhǐ tou","为生":"wéi shēng","畜生":"chù sheng","切除":"qiē chú","着力":"zhuó lì","着想":"zhuó xiǎng","级差":"jí chā","投奔":"tóu bèn","棍子":"gùn zi","含糊":"hán hu","少妇":"shào fù","兴致":"xìng zhì","纳闷":"nà mèn","干流":"gàn liú","卷起":"juǎn qǐ","扇子":"shàn zi","更改":"gēng gǎi","笼络":"lǒng luò","喇叭":"lǎ ba","载荷":"zài hè","妥当":"tuǒ dàng","为难":"wéi nán","着陆":"zhuó lù","燕子":"yàn zi","干吗":"gàn má","白发":"bái fà","总得":"zǒng děi","夹击":"jiā jī","曝光":"bào guāng","曲调":"qǔ diào","相机":"xiàng jī","叫化":"jiào huā","角逐":"jué zhú","啊哟":"ā yō","载重":"zài zhòng","长辈":"zhǎng bèi","出差":"chū chāi","垛口":"duǒ kǒu","撇开":"piē kāi","厅长":"tīng zhǎng","组分":"zǔ fèn","误差":"wù chā","家当":"jiā dàng","传记":"zhuàn jì","个子":"gè zi","铺设":"pū shè","干事":"gàn shì","杆菌":"gǎn jūn","五更":"wǔ gēng","定量":"dìng liàng","运载":"yùn zài","会儿":"huì er","酋长":"qiú zhǎng","重返":"chóng fǎn","差额":"chā é","露面":"lòu miàn","钻研":"zuān yán","大城":"dài chéng","上当":"shàng dàng","销量":"xiāo liàng","洋行":"yáng háng","作坊":"zuō fang","照相":"zhào xiàng","哎呀":"āi yā","调集":"diào jí","看中":"kàn zhòng","议长":"yì zhǎng","风筝":"fēng zheng","一应":"yī yīng","辟邪":"bì xié","空隙":"kòng xì","更迭":"gēng dié","偏差":"piān chā","声调":"shēng diào","农行":"nóng háng","适量":"shì liàng","屯子":"tún zi","搜查":"sōu zhā","无量":"wú liàng","空地":"kòng dì","调度":"diào dù","一曲":"yī qǔ","散射":"sǎn shè","太行":"tài háng","创伤":"chuāng shāng","海参":"hǎi shēn","满载":"mǎn zài","重叠":"chóng dié","落差":"luò chā","单调":"dān diào","老将":"lǎo jiàng","人参":"rén shēn","间断":"jiàn duàn","重现":"chóng xiàn","夹杂":"jiā zá","调用":"diào yòng","萝卜":"luó bo","附着":"fù zhuó","应声":"yīng shēng","主将":"zhǔ jiàng","罪过":"zuì guo","咀嚼":"jǔ jué","为政":"wéi zhèng","过量":"guò liàng","乐曲":"yuè qǔ","负荷":"fù hè","枪弹":"qiāng dàn","悄然":"qiǎo rán","处方":"chǔ fāng","悄声":"qiǎo shēng","曲子":"qǔ zi","情调":"qíng diào","一着":"yī zhāo","挑衅":"tiǎo xìn","代为":"dài wéi","了结":"liǎo jié","打中":"dǎ zhòng","酒吧":"jiǔ bā","作曲":"zuò qǔ","懒得":"lǎn de","增量":"zēng liàng","衣着":"yī zhuó","部将":"bù jiàng","要塞":"yào sài","茶几":"chá jī","杠杆":"gàng gǎn","出没":"chū mò","鲜有":"xiǎn yǒu","间隙":"jiàn xì","重担":"zhòng dàn","重演":"chóng yǎn","应酬":"yìng chou","只当":"zhǐ dāng","毋宁":"wú nìng","包扎":"bāo zā","前头":"qián tou","卷烟":"juǎn yān","非得":"fēi děi","弹道":"dàn dào","上调":"shàng diào","杆子":"gān zi","门将":"mén jiàng","后头":"hòu tou","标识":"biāo zhì","喝彩":"hè cǎi","暖和":"nuǎn huo","更深":"gēng shēn","累积":"lěi jī","引得":"yǐn de","调遣":"diào qiǎn","倔强":"jué jiàng","宝藏":"bǎo zàng","丧事":"sāng shì","约莫":"yuē mo","纤夫":"qiàn fū","更替":"gēng tì","装载":"zhuāng zài","背包":"bēi bāo","帖子":"tiě zi","松散":"sōng sǎn","支行":"zhī háng","呼喝":"hū hè","可恶":"kě wù","自转":"zì zhuàn","供电":"gōng diàn","反省":"fǎn xǐng","坦率":"tǎn shuài","苏打":"sū dá","本分":"běn fèn","落得":"luò de","鄙薄":"bǐ bó","相间":"xiāng jiàn","单薄":"dān bó","混蛋":"hún dàn","发难":"fā nàn","贞观":"zhēn guàn","附和":"fù hè","能耐":"néng nai","吓唬":"xià hu","未了":"wèi liǎo","引着":"yǐn zháo","抽调":"chōu diào","沙子":"shā zi","席卷":"xí juǎn","标的":"biāo dì","别扭":"biè niu","思量":"sī liang","喝采":"hè cǎi","论语":"lún yǔ","盖子":"gài zi","曲艺":"qǔ yì","分外":"fèn wài","弄堂":"lòng táng","乐舞":"yuè wǔ","雨量":"yǔ liàng","毛发":"máo fà","差遣":"chāi qiǎn","曲目":"qǔ mù","背负":"bēi fù","转速":"zhuàn sù","声乐":"shēng yuè","夹攻":"jiā gōng","供水":"gōng shuǐ","主干":"zhǔ gàn","逃难":"táo nàn","惩处":"chéng chǔ","长相":"zhǎng xiàng","公差":"gōng chāi","行当":"háng dang","榴弹":"liú dàn","省得":"shěng de","条子":"tiáo zi","重围":"chóng wéi","阻塞":"zǔ sè","劲风":"jìng fēng","纠葛":"jiū gé","颠簸":"diān bǒ","点中":"diǎn zhòng","避难":"bì nàn","重创":"zhòng chuāng","姥姥":"lǎo lao","迷糊":"mí hu","公家":"gōng jia","几率":"jī lǜ","苦闷":"kǔ mèn","度量":"dù liàng","差错":"chā cuò","暑假":"shǔ jià","参差":"cēn cī","搭载":"dā zài","助长":"zhù zhǎng","相称":"xiāng chèn","红晕":"hóng yùn","舍命":"shě mìng","喜好":"xǐ hào","列传":"liè zhuàn","劲敌":"jìng dí","蛤蟆":"há má","三重":"sān chóng","请假":"qǐng jià","钉子":"dīng zi","沉没":"chén mò","高丽":"gāo lí","休假":"xiū jià","无为":"wú wéi","巴结":"bā jì","了得":"liǎo de","变相":"biàn xiàng","核弹":"hé dàn","亲家":"qìng jia","承载":"chéng zài","行家":"háng jia","喝问":"hè wèn","还击":"huán jī","交还":"jiāo huán","当夜":"dàng yè","将令":"jiàng lìng","单于":"chán yú","空缺":"kòng quē","绿林":"lù lín","胆量":"dǎn liàng","执着":"zhí zhuó","低调":"dī diào","责难":"zé nàn","闭塞":"bì sè","轻薄":"qīng bó","得当":"dé dàng","占卜":"zhān bǔ","排行":"pái háng","扫帚":"sào zhou","龟兹":"qiū cí","年长":"nián zhǎng","外传":"wài zhuàn","头子":"tóu zi","裁缝":"cái féng","礼乐":"lǐ yuè","血泊":"xuè pō","散乱":"sǎn luàn","动量":"dòng liàng","倒腾":"dǎo teng","取舍":"qǔ shě","咱家":"zá jiā","长发":"cháng fà","爪哇":"zhǎo wā","弹壳":"dàn ké","省悟":"xǐng wù","嚷嚷":"rāng rang","连累":"lián lěi","应得":"yīng dé","族长":"zú zhǎng","患难":"huàn nàn","抽查":"chōu zhā","柜子":"guì zi","擂鼓":"léi gǔ","眩晕":"xuàn yùn","调配":"diào pèi","躯干":"qū gàn","差役":"chāi yì","坎坷":"kǎn kě","少儿":"shào ér","乐团":"yuè tuán","养分":"yǎng fèn","退还":"tuì huán","格调":"gé diào","语调":"yǔ diào","音调":"yīn diào","乐府":"yuè fǔ","古朴":"gǔ piáo","打点":"dǎ dian","差使":"chāi shǐ","磨难":"mó nàn","匀称":"yún chèn","瘦削":"shòu xuē","膏药":"gāo yao","吞没":"tūn mò","调任":"diào rèn","散居":"sǎn jū","上头":"shàng tou","大难":"dà nàn","风靡":"fēng mǐ","放假":"fàng jià","估量":"gū liang","失当":"shī dàng","中弹":"zhòng dàn","妄为":"wàng wéi","长者":"zhǎng zhě","起哄":"qǐ hòng","末了":"mò liǎo","相声":"xiàng sheng","校正":"jiào zhèng","劝降":"quàn xiáng","矢量":"shǐ liàng","沉闷":"chén mèn","给与":"jǐ yǔ","解法":"xiè fǎ","塞外":"sài wài","将校":"jiàng xiào","嗜好":"shì hào","没落":"mò luò","朴刀":"pō dāo","片子":"piān zi","切削":"qiē xiāo","弹丸":"dàn wán","昆曲":"kūn qǔ","雅致":"yǎ zhi","稀薄":"xī bó","亏得":"kuī de","死难":"sǐ nàn","间歇":"jiàn xiē","翘首":"qiáo shǒu","色调":"sè diào","处决":"chǔ jué","表率":"biǎo shuài","尺子":"chǐ zi","招降":"zhāo xiáng","称职":"chèn zhí","斗篷":"dǒu peng","铺子":"pù zi","底子":"dǐ zi","负载":"fù zài","干警":"gàn jǐng","倒数":"dào shǔ","将官":"jiàng guān","锄头":"chú tou","归降":"guī xiáng","疟疾":"nüè ji","唠叨":"láo dao","限量":"xiàn liàng","一打":"yī dá","屏息":"bǐng xī","重逢":"chóng féng","器乐":"qì yuè","氢弹":"qīng dàn","脖颈":"bó gěng","妃子":"fēi zi","追查":"zhuī zhā","处事":"chǔ shì","参量":"cān liàng","轻率":"qīng shuài","缥缈":"piāo miǎo","幸得":"xìng de","中奖":"zhòng jiǎng","才干":"cái gàn","施舍":"shī shě","卷子":"juǎn zi","游说":"yóu shuì","巷子":"xiàng zi","臂膀":"bì bǎng","切勿":"qiē wù","看管":"kān guǎn","风头":"fēng tou","精干":"jīng gàn","高差":"gāo chā","恐吓":"kǒng hè","扁担":"biǎn dàn","给养":"jǐ yǎng","格子":"gé zi","供需":"gōng xū","反差":"fǎn chā","飞弹":"fēi dàn","微薄":"wēi bó","发型":"fà xíng","勘查":"kān zhā","即兴":"jí xìng","攒动":"cuán dòng","间或":"jiàn huò","浅薄":"qiǎn bó","乐章":"yuè zhāng","顺差":"shùn chā","调子":"diào zi","相位":"xiàng wèi","转子":"zhuàn zǐ","劲旅":"jìng lǚ","咔嚓":"kā chā","了事":"liǎo shì","转悠":"zhuàn you","芍药":"sháo yao","当铺":"dàng pù","爪子":"zhuǎ zi","单子":"dān zi","好战":"hào zhàn","燕麦":"yān mài","只许":"zhǐ xǔ","干练":"gàn liàn","女将":"nǚ jiàng","酒量":"jiǔ liàng","划船":"huá chuán","伎俩":"jì liǎng","挑拨":"tiǎo bō","少校":"shào xiào","着落":"zhuó luò","憎恶":"zēng wù","刻薄":"kè bó","口角":"kǒu jué","马尾":"mǎ yǐ","要挟":"yāo xié","用处":"yòng chǔ","还手":"huán shǒu","模具":"mú jù","执著":"zhí zhuó","喝令":"hè lìng","争得":"zhēng de","保长":"bǎo zhǎng","吸着":"xī zhuó","症结":"zhēng jié","公转":"gōng zhuàn","校勘":"jiào kān","重提":"chóng tí","扫兴":"sǎo xìng","舞曲":"wǔ qǔ","铺盖":"pū gài","长史":"zhǎng shǐ","差价":"chā jià","压根":"yà gēn","怔住":"zhèng zhù","强人":"qiǎng rén","应允":"yīng yǔn","切入":"qiē rù","战将":"zhàn jiàng","年少":"nián shào","舍身":"shě shēn","执拗":"zhí niù","处世":"chǔ shì","中风":"zhòng fēng","等量":"děng liàng","不菲":"bù fěi","放量":"fàng liàng","腔调":"qiāng diào","老少":"lǎo shào","没入":"mò rù","瓜葛":"guā gé","将帅":"jiàng shuài","车载":"chē zài","窝囊":"wō nāng","长进":"zhǎng jìn","可汗":"kè hán","并州":"bīng zhōu","供销":"gōng xiāo","切片":"qiē piàn","差事":"chāi shì","知会":"zhī hui","鹰爪":"yīng zhǎo","处女":"chǔ nǚ","切磋":"qiē cuō","日头":"rì tou","押解":"yā jiè","滋长":"zī zhǎng","道观":"dào guàn","脚色":"jué sè","当量":"dāng liàng","婆家":"pó jia","缘分":"yuán fèn","空闲":"kòng xián","曲牌":"qǔ pái","好色":"hào sè","行会":"háng huì","怒喝":"nù hè","笼统":"lǒng tǒng","边塞":"biān sài","何曾":"hé zēng","重合":"chóng hé","插曲":"chā qǔ","零散":"líng sǎn","轰隆":"hōng lōng","化子":"huā zi","内蒙":"nèi měng","数落":"shǔ luo","逆差":"nì chā","牟利":"móu lì","栅栏":"zhà lan","中标":"zhòng biāo","调档":"diào dàng","佝偻":"gōu lóu","场子":"chǎng zi","甲壳":"jiǎ qiào","重温":"chóng wēn","炮制":"páo zhì","返还":"fǎn huán","自传":"zì zhuàn","高调":"gāo diào","词曲":"cí qǔ","受难":"shòu nàn","殷红":"yān hóng","要约":"yāo yuē","固着":"gù zhuó","强求":"qiǎng qiú","本相":"běn xiàng","骄横":"jiāo hèng","草率":"cǎo shuài","气闷":"qì mèn","着色":"zhuó sè","宁肯":"nìng kěn","兴头":"xìng tou","拘泥":"jū nì","夹角":"jiā jiǎo","发髻":"fà jì","猛将":"měng jiàng","劫难":"jié nàn","约摸":"yuē mo","拖累":"tuō lěi","呢绒":"ní róng","钻探":"zuān tàn","夹层":"jiā céng","把子":"bà zi","落魄":"luò tuò","巷道":"hàng dào","运量":"yùn liàng","头里":"tóu li","解闷":"jiě mèn","空儿":"kòng ér","估摸":"gū mo","好客":"hào kè","小曲":"xiǎo qǔ","折衷":"shé zhōng","钻孔":"zuān kǒng","序曲":"xù qǔ","糊弄":"hù nong","荥阳":"xíng yáng","道行":"dào héng","烦闷":"fán mèn","仓卒":"cāng cù","分叉":"fēn chà","曲率":"qǔ lǜ","相片":"xiàng piān","内行":"nèi háng","厂子":"chǎng zi","小调":"xiǎo diào","少阳":"shào yáng","受降":"shòu xiáng","染坊":"rǎn fáng","胳臂":"gē bei","将门":"jiàng mén","模板":"mú bǎn","配给":"pèi jǐ","为伍":"wéi wǔ","跟头":"gēn tou","划算":"huá suàn","累赘":"léi zhui","哄笑":"hōng xiào","晕眩":"yùn xuàn","干掉":"gàn diào","缝制":"féng zhì","难处":"nán chǔ","着意":"zhuó yì","蛮横":"mán hèng","干将":"gàn jiàng","奇数":"jī shù","短发":"duǎn fà","生还":"shēng huán","还清":"huán qīng","看护":"kān hù","直率":"zhí shuài","奏乐":"zòu yuè","载客":"zài kè","专横":"zhuān hèng","湮没":"yān mò","空格":"kòng gé","铺垫":"pū diàn","良将":"liáng jiàng","哗啦":"huā lā","散漫":"sǎn màn","脱发":"tuō fà","两重":"liǎng chóng","送还":"sòng huán","埋没":"mái mò","累及":"lěi jí","薄雾":"bó wù","调离":"diào lí","舌苔":"shé tāi","机长":"jī zhǎng","栓塞":"shuān sè","配角":"pèi jué","切口":"qiē kǒu","创口":"chuāng kǒu","哈欠":"hā qian","实弹":"shí dàn","铺平":"pū píng","哈达":"hǎ dá","懒散":"lǎn sǎn","实干":"shí gàn","填空":"tián kòng","刁钻":"diāo zuān","乐师":"yuè shī","量变":"liàng biàn","诱降":"yòu xiáng","搪塞":"táng sè","购得":"gòu de","征调":"zhēng diào","夹道":"jiā dào","干咳":"gān ké","乐工":"yuè gōng","商行":"shāng háng","划过":"huá guò","着火":"zháo huǒ","更正":"gēng zhèng","给付":"jǐ fù","空子":"kòng zi","哪吒":"né zhā","散曲":"sǎn qǔ","行规":"háng guī","正着":"zhèng zháo","刁难":"diāo nàn","刷子":"shuā zi","丧葬":"sāng zàng","夹带":"jiā dài","安分":"ān fèn","中意":"zhòng yì","长孙":"zhǎng sūn","校订":"jiào dìng","卷曲":"juǎn qū","载运":"zài yùn","投弹":"tóu dàn","柞蚕":"zuò cán","份量":"fèn liàng","外行":"wài háng","调换":"diào huàn","了然":"liǎo rán","咧嘴":"liě zuǐ","典当":"diǎn dàng","寒假":"hán jià","长兄":"zhǎng xiōng","给水":"jǐ shuǐ","须发":"xū fà","枝干":"zhī gàn","属相":"shǔ xiang","哄抢":"hōng qiǎng","刻划":"kè huá","手把":"shǒu bà","塞子":"sāi zi","单干":"dān gàn","还乡":"huán xiāng","兆头":"zhào tou","寺观":"sì guàn","督率":"dū shuài","受累":"shòu lěi","天台":"tiān tāi","啊哈":"ā hā","割舍":"gē shě","抹布":"mā bù","好恶":"hào wù","下处":"xià chǔ","消长":"xiāo zhǎng","离间":"lí jiàn","准头":"zhǔn tou","校对":"jiào duì","什物":"shí wù","番禺":"pān yú","佛爷":"fó ye","备查":"bèi zhā","吗啡":"mǎ fēi","盐分":"yán fèn","当月":"dàng yuè","虎将":"hǔ jiàng","薄荷":"bò he","独处":"dú chǔ","空位":"kòng wèi","铺路":"pū lù","乌拉":"wù la","调回":"diào huí","来头":"lái tou","闲散":"xián sǎn","胶卷":"jiāo juǎn","冒失":"mào shi","干劲":"gàn jìn","弦乐":"xián yuè","行伍":"háng wǔ","相国":"xiàng guó","查查":"zhā zhā","丹参":"dān shēn","助兴":"zhù xìng","铺开":"pū kāi","次长":"cì zhǎng","发卡":"fà qiǎ","拮据":"jié jū","刹车":"shā chē","生发":"shēng fà","重播":"chóng bō","缝合":"féng hé","音量":"yīn liàng","少尉":"shào wèi","殉难":"xùn nàn","冲压":"chòng yā","苍劲":"cāng jìng","厚薄":"hòu bó","威吓":"wēi hè","外相":"wài xiàng","曲谱":"qǔ pǔ","呼号":"hū háo","着迷":"zháo mí","挑担":"tiāo dàn","纹路":"wén lu","一沓":"yī dá","还俗":"huán sú","强横":"qiáng hèng","四行":"sì háng","着数":"zhāo shù","国难":"guó nàn","降顺":"xiáng shùn","挑明":"tiǎo míng","眯缝":"mī feng","分内":"fèn nèi","更衣":"gēng yī","软和":"ruǎn huo","尽兴":"jìn xìng","号子":"hào zi","爪牙":"zhǎo yá","败将":"bài jiàng","猜中":"cāi zhòng","结扎":"jié zā","没空":"méi kòng","夹缝":"jiā fèng","拾掇":"shí duo","掺和":"chān huo","簸箕":"bò ji","电量":"diàn liàng","荷载":"hè zǎi","漯河":"luò tà hé","调式":"diào shì","处身":"chǔ shēn","打手":"dǎ shou","弹弓":"dàn gōng","横蛮":"hèng mán","能干":"néng gàn","校点":"jiào diǎn","加载":"jiā zài","干校":"gàn xiào","哄传":"hōng chuán","校注":"jiào zhù","淤塞":"yū sè","马扎":"mǎ zhá","月氏":"yuè zhī","高干":"gāo gàn","经传":"jīng zhuàn","曾孙":"zēng sūn","好斗":"hào dòu","关卡":"guān qiǎ","逃奔":"táo bèn","磨蹭":"mó ceng","牟取":"móu qǔ","颤栗":"zhàn lì","蚂蚱":"mà zha","撮合":"cuō he","趔趄":"liè qie","摔打":"shuāi dá","台子":"tái zi","分得":"fēn de","粘着":"nián zhuó","采邑":"cài yì","散装":"sǎn zhuāng","婀娜":"ē nuó","兴味":"xìng wèi","行头":"xíng tou","气量":"qì liàng","调运":"diào yùn","处治":"chǔ zhì","乐音":"yuè yīn","组曲":"zǔ qǔ","充塞":"chōng sè","恫吓":"dòng hè","论调":"lùn diào","相中":"xiāng zhòng","民乐":"mín yuè","炮仗":"pào zhang","丧服":"sāng fú","骁将":"xiāo jiàng","量刑":"liàng xíng","缝补":"féng bǔ","财会":"cái kuài","大干":"dà gàn","呱呱":"gū gū","历数":"lì shǔ","校场":"jiào chǎng","塞北":"sài běi","识相":"shí xiàng","辱没":"rǔ mò","鲜亮":"xiān liang","语塞":"yǔ sè","露脸":"lòu liǎn","凉快":"liáng kuai","腰杆":"yāo gǎn","溜达":"liū da","嘎嘎":"gā gā","公干":"gōng gàn","桔梗":"jié gěng","挑逗":"tiǎo dòu","看门":"kān mén","海难":"hǎi nàn","乐歌":"yuè gē","拓片":"tà piàn","挑动":"tiǎo dòng","准将":"zhǔn jiàng","落难":"luò nàn","遒劲":"qiú jìng","磨坊":"mò fáng","逶迤":"wēi yí","搅和":"jiǎo huo","摩挲":"mā sā","作弄":"zuō nòng","苗头":"miáo tou","打颤":"dǎ zhàn","大藏":"dà zàng","畜牲":"chù sheng","勾搭":"gōu da","树荫":"shù yīn","树杈":"shù chà","铁杆":"tiě gǎn","将相":"jiàng xiàng","份子":"fèn zi","视差":"shì chā","绿荫":"lǜ yīn","枪杆":"qiāng gǎn","缝纫":"féng rèn","愁闷":"chóu mèn","点将":"diǎn jiàng","华佗":"huà tuó","劲射":"jìng shè","箱笼":"xiāng lǒng","终了":"zhōng liǎo","鬓发":"bìn fà","结巴":"jiē ba","苦干":"kǔ gàn","看家":"kān jiā","正旦":"zhēng dàn","中肯":"zhòng kěn","厦门":"xià mén","东莞":"dōng guǎn","食量":"shí liàng","宫调":"gōng diào","间作":"jiàn zuò","弹片":"dàn piàn","差池":"chā chí","漂白":"piǎo bái","杠子":"gàng zi","调处":"tiáo chǔ","好动":"hào dòng","转炉":"zhuàn lú","屏气":"bǐng qì","夹板":"jiā bǎn","哀乐":"āi yuè","干道":"gàn dào","苦处":"kǔ chǔ","劈柴":"pǐ chái","长势":"zhǎng shì","天华":"tiān huā","共处":"gòng chǔ","严查":"yán zhā","校验":"jiào yàn","出塞":"chū sài","弹子":"dàn zǐ","磨盘":"mò pán","萎靡":"wěi mǐ","奔丧":"bēn sāng","唱和":"chàng hè","大调":"dà diào","非分":"fēi fèn","钻营":"zuān yíng","夹子":"jiā zi","超载":"chāo zài","更始":"gēng shǐ","铃铛":"líng dang","披散":"pī sǎn","遭难":"zāo nàn","发还":"fā huán","转轮":"zhuàn lún","横财":"hèng cái","泡桐":"pāo tóng","抛撒":"pāo sǎ","天呀":"tiān yā","糊糊":"hū hū","躯壳":"qū qiào","通量":"tōng liàng","奉还":"fèng huán","午觉":"wǔ jiào","闷棍":"mèn gùn","浪头":"làng tou","砚台":"yàn tāi","油坊":"yóu fáng","学长":"xué zhǎng","过载":"guò zài","笔调":"bǐ diào","衣被":"yì bèi","畜产":"xù chǎn","打更":"dǎ gēng","调阅":"diào yuè","蛮干":"mán gàn","曾祖":"zēng zǔ","本行":"běn háng","提干":"tí gàn","变调":"biàn diào","覆没":"fù mò","模子":"mú zi","乐律":"yuè lǜ","称心":"chèn xīn","木杆":"mù gǎn","套曲":"tào qǔ","重印":"chóng yìn","自省":"zì xǐng","提调":"tí diào","看相":"kàn xiàng","芋头":"yù tou","下切":"xià qiē","塞上":"sài shàng","铺张":"pū zhāng","藤蔓":"téng wàn","薄幸":"bó xìng","非难":"fēi nàn","解数":"xiè shù","褪去":"tùn qù","霰弹":"xiàn dàn","柚木":"yóu mù","重载":"zhòng zài","二重":"èr chóng","痕量":"hén liàng","雅乐":"yǎ yuè","号哭":"háo kū","诈降":"zhà xiáng","猪圈":"zhū juàn","咋舌":"zé shé","铣床":"xǐ chuáng","防弹":"fáng dàn","健将":"jiàn jiàng","丽水":"lí shuǐ","削发":"xuē fà","空当":"kòng dāng","多相":"duō xiàng","鲜见":"xiǎn jiàn","划桨":"huá jiǎng","载波":"zài bō","跳蚤":"tiào zao","俏皮":"qiào pi","吧嗒":"bā dā","结发":"jié fà","了断":"liǎo duàn","同调":"tóng diào","石磨":"shí mò","时差":"shí chā","鼻塞":"bí sè","挑子":"tiāo zi","推磨":"tuī mò","武侯":"wǔ hòu","抹煞":"mǒ shā","调转":"diào zhuǎn","籍没":"jí mò","测度":"cè duó","还债":"huán zhài","调演":"diào yǎn","分划":"fēn huá","奇偶":"jī ǒu","断喝":"duàn hè","闷雷":"mèn léi","狼藉":"láng jí","饭量":"fàn liàng","还礼":"huán lǐ","转调":"zhuǎn diào","星相":"xīng xiàng","手相":"shǒu xiàng","配乐":"pèi yuè","盖头":"gài tou","连杆":"lián gǎn","簿记":"bù jì","刀把":"dāo bà","量词":"liàng cí","名角":"míng jué","步调":"bù diào","校本":"jiào běn","曲江":"qǔ jiāng","账簿":"zhàng bù","隽永":"juàn yǒng","哈罗":"hā luo","稍为":"shāo wéi","易传":"yì zhuàn","乐谱":"yuè pǔ","牵累":"qiān lěi","答理":"dā li","喝斥":"hè chì","吟哦":"yín é","干渠":"gàn qú","海量":"hǎi liàng","精当":"jīng dàng","着床":"zhuó chuáng","月相":"yuè xiàng","庶几":"shù jī","宫观":"gōng guàn","论处":"lùn chǔ","征辟":"zhēng bì","厚朴":"hòu pò","介壳":"jiè qiào","吭哧":"kēng chi","咯血":"kǎ xiě","铺陈":"pū chén","重生":"chóng shēng","乐理":"yuè lǐ","哀号":"āi háo","藏历":"zàng lì","琴曲":"qín qǔ","神曲":"shén qǔ","刚劲":"gāng jìng","削平":"xuē píng","浓荫":"nóng yīn","城垛":"chéng duǒ","识记":"zhì jì","当差":"dāng chāi","正传":"zhèng zhuàn","并处":"bìng chǔ","空难":"kōng nàn","创面":"chuāng miàn","旦角":"dàn jué","薄礼":"bó lǐ","晃荡":"huàng dang","臊子":"sào zi","家什":"jiā shí","闷头":"mèn tóu","美发":"měi fà","度数":"dù shu","着凉":"zháo liáng","闯将":"chuǎng jiàng","几案":"jī àn","姘头":"pīn tou","急难":"jí nàn","差数":"chā shù","散碎":"sǎn suì","壅塞":"yōng sè","寒颤":"hán zhàn","牵强":"qiān qiǎng","无间":"wú jiàn","轮转":"lún zhuàn","号叫":"háo jiào","铺排":"pū pái","降伏":"xiáng fú","轧钢":"zhá gāng","东阿":"dōng ē","病假":"bìng jià","累加":"lěi jiā","梗塞":"gěng sè","弹夹":"dàn jiā","钻心":"zuān xīn","晃眼":"huǎng yǎn","魔爪":"mó zhǎo","标量":"biāo liàng","憋闷":"biē mèn","猜度":"cāi duó","处士":"chǔ shì","官差":"guān chāi","讨还":"tǎo huán","长门":"zhǎng mén","馏分":"liú fèn","里弄":"lǐ lòng","色相":"sè xiàng","雅兴":"yǎ xìng","角力":"jué lì","弹坑":"dàn kēng","枝杈":"zhī chà","夹具":"jiā jù","处刑":"chǔ xíng","悍将":"hàn jiàng","好学":"hào xué","好好":"hǎo hǎo","银发":"yín fà","扫把":"sào bǎ","法相":"fǎ xiàng","贵干":"guì gàn","供气":"gōng qì","空余":"kòng yú","捆扎":"kǔn zā","瘠薄":"jí bó","浆糊":"jiàng hu","嘎吱":"gā zhī","不遂":"bù suí","调令":"diào lìng","法帖":"fǎ tiè","淋病":"lìn bìng","调派":"diào pài","转盘":"zhuàn pán","供稿":"gōng gǎo","差官":"chāi guān","忧闷":"yōu mèn","重犯":"chóng fàn","教长":"jiào zhǎng","重唱":"chóng chàng","酒兴":"jiǔ xìng","乐坛":"yuè tán","花呢":"huā ní","叱喝":"chì hè","膀臂":"bǎng bì","重头":"chóng tóu","得空":"dé kòng","转圈":"zhuàn quān","横暴":"hèng bào","哄抬":"hōng tái","引吭":"yǐn háng","载货":"zài huò","中计":"zhòng jì","官长":"guān zhǎng","相面":"xiàng miàn","看头":"kàn tou","盼头":"pàn tou","意兴":"yì xìng","军乐":"jūn yuè","累次":"lěi cì","骨嘟":"gū dū","燕赵":"yān zhào","报丧":"bào sāng","弥撒":"mí sa","挨斗":"ái dòu","扁舟":"piān zhōu","丑角":"chǒu jué","吊丧":"diào sāng","强将":"qiáng jiàng","行号":"háng háo","重奏":"chóng zòu","发辫":"fà biàn","着魔":"zháo mó","着法":"zhāo fǎ","盛放":"chéng fàng","填塞":"tián sè","凶横":"xiōng hèng","稽首":"qǐ shǒu","碑帖":"bēi tiè","冲量":"chōng liàng","发菜":"fà cài","假发":"jiǎ fà","翻卷":"fān juǎn","小量":"xiǎo liàng","胶着":"jiāo zhuó","里子":"lǐ zi","调调":"diào diao","散兵":"sǎn bīng","高挑":"gāo tiǎo","播撒":"bō sǎ","夹心":"jiā xīn","扇动":"shān dòng","叨扰":"tāo rǎo","霓裳":"ní cháng","捻子":"niǎn zi","弥缝":"mí féng","撒布":"sǎ bù","元曲":"yuán qǔ","场院":"cháng yuàn","省亲":"xǐng qīn","提拉":"dī le","惯量":"guàn liàng","强逼":"qiǎng bī","强征":"qiǎng zhēng","晕车":"yùn chē","数道":"shǔ dào","带累":"dài lěi","拓本":"tà běn","嫌恶":"xián wù","宿将":"sù jiàng","龟裂":"jūn liè","缠夹":"chán jiā","发式":"fà shì","隔扇":"gé shān","行货":"háng huò","天分":"tiān fèn","癖好":"pǐ hào","四通":"sì tòng","白术":"bái zhú","划伤":"huá shāng","角斗":"jué dòu","听差":"tīng chāi","岁差":"suì chā","丧礼":"sāng lǐ","脉脉":"mò mò","削瘦":"xuē shòu","撒播":"sǎ bō","莎草":"suō cǎo","犍为":"qián wéi","调头":"diào tóu","龙卷":"lóng juǎn","外调":"wài diào","字帖":"zì tiè","卷发":"juǎn fà","揣度":"chuǎi duó","洋相":"yáng xiàng","散光":"sǎn guāng","骨碌":"gū lu","薄命":"bó mìng","笼头":"lóng tou","咽炎":"yān yán","碌碡":"liù zhou","片儿":"piān er","纤手":"qiàn shǒu","散体":"sǎn tǐ","内省":"nèi xǐng","强留":"qiǎng liú","解送":"jiè sòng","反间":"fǎn jiàn","少壮":"shào zhuàng","一服":"yī fù","留空":"liú kòng","告假":"gào jià","咳血":"ké xiě","薄暮":"bó mù","铺轨":"pū guǐ","磨削":"mó xuē","治丧":"zhì sāng","叉子":"chā zi","哄动":"hōng dòng","蛾子":"é zi","糜子":"méi zi","出落":"chū là","股长":"gǔ zhǎng","贵处":"guì chǔ","还魂":"huán hún","例假":"lì jià","曲池":"qǔ chí","刹住":"shā zhù","身量":"shēn liàng","懂行":"dǒng háng","同好":"tóng hào","模量":"mó liàng","更生":"gēng shēng","服丧":"fú sāng","率直":"shuài zhí","字模":"zì mú","散架":"sǎn jià","答腔":"dā qiāng","交恶":"jiāo wù","薄情":"bó qíng","眼泡":"yǎn pāo","袅娜":"niǎo nuó","草垛":"cǎo duǒ","冲劲":"chòng jìn","呢喃":"ní nán","切中":"qiè zhòng","挑灯":"tiǎo dēng","还愿":"huán yuàn","激将":"jī jiàng","更鼓":"gēng gǔ","没药":"mò yào","难友":"nàn yǒu","败兴":"bài xìng","切面":"qiē miàn","散户":"sǎn hù","累进":"lěi jìn","背带":"bēi dài","秤杆":"chèng gǎn","碾坊":"niǎn fáng","簿子":"bù zi","扳手":"bān shou","铅山":"yán shān","儒将":"rú jiàng","重光":"chóng guāng","剪发":"jiǎn fà","行话":"háng huà","长上":"zhǎng shàng","小传":"xiǎo zhuàn","压轴":"yā zhòu","谱曲":"pǔ qǔ","弱冠":"ruò guàn","花卷":"huā juǎn","横祸":"hèng huò","夹克":"jiā kè","光晕":"guāng yùn","披靡":"pī mǐ","对调":"duì diào","夹持":"jiā chí","空额":"kòng é","平调":"píng diào","铺床":"pū chuáng","丧钟":"sāng zhōng","作乐":"zuò yuè","少府":"shào fǔ","数数":"shuò shuò","奔头":"bèn tou","进给":"jìn jǐ","率性":"shuài xìng","乐子":"lè zi","绑扎":"bǎng zā","挑唆":"tiǎo suō","漂洗":"piǎo xǐ","夹墙":"jiā qiáng","咳喘":"ké chuǎn","乜斜":"miē xie","错处":"cuò chǔ","闷酒":"mèn jiǔ","时调":"shí diào","重孙":"chóng sūn","经幢":"jīng chuáng","圩场":"xū cháng","调门":"diào mén","花头":"huā tou","划拉":"huá la","套色":"tào shǎi","粗率":"cū shuài","相率":"xiāng shuài","款识":"kuǎn zhì","吁请":"yù qǐng","荫蔽":"yīn bì","文蛤":"wén gé","嘀嗒":"dī dā","调取":"diào qǔ","交差":"jiāo chāi","落子":"lào zǐ","相册":"xiàng cè","絮叨":"xù dáo","落发":"luò fà","异相":"yì xiàng","浸没":"jìn mò","角抵":"jué dǐ","卸载":"xiè zài","春卷":"chūn juǎn","扎挣":"zhá zheng","畜养":"xù yǎng","吡咯":"bǐ luò","垛子":"duǒ zi","恶少":"è shào","发际":"fà jì","红苕":"hóng sháo","糨糊":"jiàng hù","哭丧":"kū sang","泡子":"pāo zǐ","稍息":"shào xī","晕船":"yùn chuán","校样":"jiào yàng","外差":"wài chāi","红曲":"hóng qǔ","脚爪":"jiǎo zhǎo","铺展":"pū zhǎn","驮子":"duò zi","芫荽":"yán sui","夹紧":"jiā jǐn","尿泡":"suī pào","丧乱":"sāng luàn","凶相":"xiōng xiàng","华发":"huá fà","打场":"dǎ cháng","云量":"yún liàng","正切":"zhèng qiē","处子":"chǔ zǐ","留难":"liú nàn","划拳":"huá quán","划艇":"huá tǐng","评传":"píng zhuàn","拉纤":"lā qiàn","句读":"jù dòu","散剂":"sǎn jì","骨殖":"gǔ shi","塞音":"sè yīn","铺叙":"pū xù","阏氏":"yān zhī","冷颤":"lěng zhàn","煞住":"shā zhù","夜曲":"yè qǔ","少男":"shào nán","格登":"gē dēng","管乐":"guǎn yuè","号啕":"háo táo","纳降":"nà xiáng","拥塞":"yōng sè","万乘":"wàn shèng","杆儿":"gǎn ér","葛藤":"gé téng","芯子":"xìn zi","簿籍":"bù jí","垫圈":"diàn juàn","皮夹":"pí jiā","校准":"jiào zhǔn","行款":"háng kuǎn","允当":"yǔn dàng","器量":"qì liàng","选调":"xuǎn diào","扮相":"bàn xiàng","干才":"gàn cái","基干":"jī gàn","三校":"sān jiào","割切":"gē qiē","国乐":"guó yuè","卡壳":"qiǎ ké","呢子":"ní zi","辟谷":"bì gǔ","磨房":"mò fáng","咿呀":"yī yā","芥末":"jiè mo","薄技":"bó jì","产假":"chǎn jià","诗兴":"shī xìng","重出":"chóng chū","转椅":"zhuàn yǐ","酌量":"zhuó liàng","簿册":"bù cè","藏青":"zàng qīng","的士":"dí shì","调人":"diào rén","解元":"jiè yuán","茎干":"jīng gàn","巨量":"jù liàng","榔头":"láng tou","率真":"shuài zhēn","喷香":"pèn xiāng","锁钥":"suǒ yuè","虾蟆":"há má","相图":"xiàng tú","兴会":"xìng huì","灶头":"zào tou","重婚":"chóng hūn","钻洞":"zuān dòng","忖度":"cǔn duó","党参":"dǎng shēn","调温":"diào wēn","杆塔":"gǎn tǎ","葛布":"gé bù","拱券":"gǒng xuàn","冠子":"guàn zi","划子":"huá zǐ","夹生":"jiā shēng","露馅":"lòu xiàn","恰切":"qià qiē","散见":"sǎn jiàn","哨卡":"shào qiǎ","烫发":"tàng fà","体量":"tǐ liàng","挺括":"tǐng guā","系带":"jì dài","相士":"xiàng shì","羊圈":"yáng juàn","转矩":"zhuàn jǔ","吧台":"bā tái","苍术":"cāng zhú","菲薄":"fěi bó","蛤蚧":"gé jiè","蛤蜊":"gé lí","瓜蔓":"guā wàn","怪相":"guài xiàng","罹难":"lí nàn","临帖":"lín tiè","女红":"nǚ gōng","刨床":"bào chuáng","翘楚":"qiáo chǔ","数九":"shǔ jiǔ","谈兴":"tán xìng","心曲":"xīn qǔ","雄劲":"xióng jìng","扎染":"zā rǎn","遮荫":"zhē yīn","周正":"zhōu zhēng","赚头":"zhuàn tou","扒手":"pá shǒu","搀和":"chān huo","诚朴":"chéng piáo","肚量":"dù liàng","干结":"gàn jié","工尺":"gōng chě","家累":"jiā lěi","曲水":"qǔ shuǐ","沙参":"shā shēn","挑花":"tiǎo huā","行距":"háng jù","阿门":"ā mēn","背篓":"bēi lǒu","瘪三":"biē sān","裁处":"cái chǔ","创痛":"chuāng tòng","福相":"fú xiàng","更动":"gēng dòng","豪兴":"háo xìng","还阳":"huán yáng","还嘴":"huán zuǐ","借调":"jiè diào","卷云":"juǎn yún","卡子":"qiǎ zi","流弹":"liú dàn","络子":"lào zi","磨子":"mò zǐ","想头":"xiǎng tou","削价":"xuē jià","校阅":"jiào yuè","八行":"bā háng","雅量":"yǎ liàng","别传":"bié zhuàn","薄酒":"bó jiǔ","春假":"chūn jià","发妻":"fà qī","哗哗":"huā huā","宽绰":"kuān chuo","了悟":"liǎo wù","切花":"qiē huā","审度":"shěn duó","应许":"yīng xǔ","转台":"zhuàn tái","仔猪":"zǐ zhū","奔命":"bèn mìng","裁量":"cái liàng","藏戏":"zàng xì","乘兴":"chéng xìng","绸缪":"chóu móu","摧折":"cuī shé","调经":"diào jīng","调职":"diào zhí","缝缀":"féng zhuì","骨朵":"gū duǒ","核儿":"hú ér","恒量":"héng liàng","还价":"huán jià","浑朴":"hún piáo","苦差":"kǔ chāi","面糊":"miàn hù","曲张":"qǔ zhāng","煞车":"shā chē","省视":"xǐng shì","什锦":"shí jǐn","信差":"xìn chāi","余切":"yú qiē","攒眉":"cuán méi","炸糕":"zhá gāo","钻杆":"zuàn gǎn","扒灰":"pá huī","拌和":"bàn huò","长调":"cháng diào","大溜":"dà liù","抖搂":"dǒu lōu","飞转":"fēi zhuàn","赴难":"fù nàn","干仗":"gàn zhàng","好胜":"hào shèng","画片":"huà piān","搅混":"jiǎo gǔn","螺杆":"luó gǎn","木模":"mù mú","怒号":"nù háo","频数":"pín shuò","无宁":"wú nìng","选曲":"xuǎn qǔ","遗少":"yí shào","邮差":"yóu chāi","占卦":"zhān guà","占星":"zhān xīng","重审":"chóng shěn","自量":"zì liàng","待查":"dài zhā","调防":"diào fáng","发廊":"fà láng","翻查":"fān zhā","反调":"fǎn diào","缝子":"fèng zi","更夫":"gēng fū","骨子":"gǔ zi","光杆":"guāng gǎn","夹棍":"jiā gùn","居丧":"jū sāng","巨贾":"jù gǔ","看押":"kān yā","空转":"kōng zhuàn","量力":"liàng lì","蒙尘":"meng chen","蒙难":"méng nàn","炮烙":"páo luò","赔还":"péi huán","扑扇":"pū shān","散记":"sǎn jì","散件":"sǎn jiàn","删削":"shān xuē","射干":"yè gàn","条几":"tiáo jī","偷空":"tōu kòng","削壁":"xuē bì","校核":"jiào hé","阴干":"yīn gàn","择菜":"zhái cài","重九":"chóng jiǔ","主调":"zhǔ diào","自禁":"zì jīn","吧唧":"bā jī","堡子":"bǔ zi","便溺":"biàn niào","词调":"cí diào","叨咕":"dáo gu","干粉":"gàn fěn","俚曲":"lǐ qǔ","落枕":"lào zhěn","铺砌":"pū qì","刷白":"shuà bái","委靡":"wěi mǐ","系泊":"jì bó","相马":"xiàng mǎ","行辈":"háng bèi","熨帖":"yù tiē","转筋":"zhuàn jīn","棒喝":"bàng hè","傧相":"bīn xiàng","镐头":"gǎo tóu","间苗":"jiàn miáo","乐池":"yuè chí","卖相":"mài xiàng","难为":"nán wéi","屏弃":"bǐng qì","铅弹":"qiān dàn","切变":"qiē biàn","请调":"qǐng diào","曲度":"qǔ dù","群氓":"qún méng","散板":"sǎn bǎn","省察":"xǐng chá","事假":"shì jià","纤绳":"qiàn shéng","重影":"chóng yǐng","耕种":"gēng zhòng","种地":"zhòng dì","种菜":"zhòng cài","栽种":"zāi zhòng","接种":"jiē zhòng","垦种":"kěn zhòng","种殖":"zhòng zhí","种瓜":"zhòng guā","种豆":"zhòng dòu","种树":"zhòng shù","睡着":"shuì zháo","笼子":"lóng zi"},j=Object.keys(c).map((n=>({zh:n,pinyin:c[n],priority:2,length:2}))),d={"为什么":"wèi shén me","实际上":"shí jì shang","检察长":"jiǎn chá zhǎng","不由得":"bù yóu de","差不多":"chà bu duō","只不过":"zhǐ bu guò","国内外":"guó nèi wai","老人家":"lǎo ren jia","干什么":"gàn shén me","可不是":"kě bù shì","这会儿":"zhè huì er","尽可能":"jǐn kě néng","董事长":"dǒng shì zhǎng","了不起":"liǎo bù qǐ","参谋长":"cān móu zhǎng","舍不得":"shě bu de","朝鲜族":"cháo xiǎn zú","恨不得":"hèn bu de","海内外":"hǎi nèi wai","禁不住":"jīn bú zhù","柏拉图":"bó lā tú","怪不得":"guài bu de","不在乎":"bù zài hu","洛杉矶":"luò shān ji","有点儿":"yǒu diǎn er","迫击炮":"pǎi jī pào","大丈夫":"dà zhàng fu","进行曲":"jìn xíng qǔ","免不了":"miǎn bu liǎo","不得了":"bù dé liǎo","过日子":"guò rì zi","马尾松":"mǎ wěi sōng","运输量":"yùn shū liàng","发脾气":"fā pí qi","过不去":"guò bu qù","臭豆腐":"chòu dòu fu","士大夫":"shì dà fū","三部曲":"sān bù qǔ","少不了":"shǎo bu liǎo","仡佬族":"gē lǎo zú","交响曲":"jiāo xiǎng qǔ","分子式":"fēn zǐ shì","好日子":"hǎo rì zi","看样子":"kàn yàng zi","鸭绿江":"yā lù jiāng","巴不得":"bā bu de","协奏曲":"xié zòu qǔ","没关系":"méi guān xi","不见得":"bú jiàn de","压根儿":"yà gēn er","对得起":"duì de qǐ","那会儿":"nà huì er","自个儿":"zì gě er","物理量":"wù lǐ liàng","怎么着":"zěn me zhāo","明晃晃":"míng huǎng huǎng","节假日":"jié jià rì","心里话":"xīn lǐ huà","发行量":"fā xíng liàng","兴冲冲":"xìng chōng chōng","分子量":"fēn zǐ liàng","大不了":"dà bu liǎo","国子监":"guó zǐ jiàn","老大难":"lǎo dà nán","了不得":"liǎo bu dé","石狮子":"shí shī zi","莫不是":"mò bù shì","少不得":"shǎo bu dé","党内外":"dǎng nèi wai","这么着":"zhè me zhāo","少奶奶":"shào nǎi nai","暗地里":"àn dì li","看不起":"kàn bu qǐ","更年期":"gēng nián qī","工作量":"gōng zuò liàng","背地里":"bèi dì li","山里红":"shān li hóng","好好儿":"hǎo hāo er","交响乐":"jiāo xiǎng yuè","好意思":"hǎo yì si","吐谷浑":"tǔ yù hún","没意思":"méi yì si","理发师":"lǐ fà shī","奏鸣曲":"zòu míng qǔ","塔什干":"tǎ shí gàn","充其量":"chōng qí liàng","靠得住":"kào de zhù","车行道":"chē háng dào","中郎将":"zhōng láng jiàng","犯不着":"fàn bu zháo","照明弹":"zhào míng dàn","一溜烟":"yī liù yān","烟幕弹":"yān mù dàn","没奈何":"mò nài hé","乱哄哄":"luàn hōng hōng","惠更斯":"huì gēng sī","载重量":"zài zhòng liàng","瞧得起":"qiáo de qǐ","纪传体":"jì zhuàn tǐ","蚌埠市":"bèng bù shì","冷不丁":"lěng bu dīng","阿房宫":"ē páng gōng","怨不得":"yuàn bu de","卷心菜":"juǎn xīn cài","戏班子":"xì bān zi","过得去":"guò děi qù","大肚子":"dà dù zi","花岗石":"huā gāng shí","外甥女":"wài sheng nǚ","团团转":"tuán tuán zhuàn","大堡礁":"dà pù jiāo","燃烧弹":"rán shāo dàn","劳什子":"láo shí zi","摇滚乐":"yáo gǔn yuè","身子骨":"shēn zi gǔ","夹竹桃":"jiā zhú táo","一刀切":"yī dāo qiē","闹哄哄":"nào hōng hōng","三连冠":"sān lián guàn","重头戏":"zhòng tóu xì","二人转":"èr rén zhuàn","节骨眼":"jiē gu yǎn","知识面":"zhī shī miàn","护士长":"hù shì zhǎng","架子车":"jià zi chē","信号弹":"xìn hào dàn","干电池":"gàn diàn chí","枪杆子":"qiāng gǎn zi","哭丧棒":"kū sāng bàng","鼻咽癌":"bí yān ái","瓦岗军":"wǎ gāng jūn","买得起":"mǎi de qǐ","拗不过":"niù bu guò","癞蛤蟆":"lài há ma","脊梁骨":"jǐ liang gǔ","子母弹":"zǐ mǔ dàn","开小差":"kāi xiǎo chāi","女强人":"nǚ qiáng rén","英雄传":"yīng xióng zhuàn","大嫂子":"dà sǎo zi","爵士乐":"jué shì yuè","说笑话":"shuō xiào hua","混日子":"hùn rì zi","大鼻子":"dà bí zi","碰头会":"pèng tóu kuài","玻璃钢":"bō li gāng","曳光弹":"yè guāng dàn","少林拳":"shào lín quán","咏叹调":"yǒng tàn diào","豆腐干":"dòu fǔ gàn","一个劲":"yī gè jìn","少先队":"shào xiān duì","灵长目":"líng zhǎng mù","对着干":"duì zhe gàn","蒙蒙亮":"mēng mēng liàng","软骨头":"ruǎn gǔ tou","不省得":"bù xǐng de","铺盖卷":"pū gài juǎn","和稀泥":"huò xī ní","亭子间":"tíng zi jiān","背黑锅":"bēi hēi guō","红彤彤":"hóng tōng tōng","武侯祠":"wǔ hóu cí","打哆嗦":"dǎ duō suo","地窨子":"dì yìn zi","狂想曲":"kuáng xiǎng qǔ","幻想曲":"huàn xiǎng qǔ","户口簿":"hù kǒu bù","腿肚子":"tuǐ dù zi","马尾藻":"mǎ wěi zǎo","练习曲":"liàn xí qǔ","夜猫子":"yè māo zi","折子戏":"zhé zi xì","打手势":"dǎ shǒu shì","龙王爷":"lóng wáng yé","要面子":"yào miàn zi","气头上":"qì tóu shang","糊涂虫":"hú tu chóng","笔杆子":"bǐ gǎn zi","占便宜":"zhàn pián yi","打主意":"dǎ zhǔ yi","多弹头":"duō dàn tóu","露一手":"lòu yī shǒu","堰塞湖":"yàn sè hú","保得住":"bǎo de zhù","趵突泉":"bào tū quán","钻空子":"zuān kòng zi","奥得河":"ào de hé","司务长":"sī wù zhǎng","禁不起":"jīn bu qǐ","什刹海":"shí chà hǎi","莲花落":"lián huā lào","一场空":"yī cháng kōng","前奏曲":"qián zòu qǔ","见世面":"xiàn shì miàn","分子筛":"fēn zǐ shāi","豁出去":"huō chu qu","电位差":"diàn wèi chā","挨个儿":"āi gè er","那阵儿":"nà zhèn er","给面子":"gěi miàn zi","肺活量":"fèi huó liàng","大师傅":"dà shī fū","掷弹筒":"zhì dàn tǒng","打呼噜":"dǎ hū lu","广渠门":"ān qú mén","未见得":"wèi jiàn de","大婶儿":"dà shěn er","谈得来":"tán de lái","狮子头":"shī zi tóu","脚丫子":"jiǎo yā zi","变奏曲":"biàn zòu qǔ","空包弹":"kōng bāo dàn","窝里斗":"wō li dòu","弹着点":"dàn zhuó diǎn","免不得":"miǎn bu de","个头儿":"gè tóu er","看得起":"kàn de qǐ","来不得":"lái bu de","糊涂账":"hú tu zhàng","大猩猩":"dà xīng xing","一溜儿":"yī liù ér","禁得起":"jīn de qǐ","法相宗":"fǎ xiāng zōng","可怜相":"kě lián xiàng","吃得下":"chī de xià","汉堡包":"hàn pù bāo","闹嚷嚷":"nào rāng rāng","数来宝":"shǔ lái bǎo","抹脖子":"mǒ bó zi","合得来":"hé de lái","干性油":"gàn xìng yóu","上辈子":"shàng bèi zi","闷葫芦":"mèn hú lú","呱呱叫":"guā guā jiào","西洋参":"xī yáng shēn","碰钉子":"pèng dìng zǐ","林荫道":"lín yīn dào","拉家常":"lá jiā cháng","卷铺盖":"juǎn pū gài","过得硬":"guò de yìng","飞将军":"fēi jiàng jūn","挑大梁":"tiǎo dà liáng","哈巴狗":"hǎ bā gǒu","过家家":"guō jiā jiā","催泪弹":"cuī lèi dàn","雨夹雪":"yǔ jiā xuě","敲竹杠":"qiāo zhū gàng","列车长":"liè chē zhǎng","回旋曲":"huí xuán qǔ","华达呢":"huá dá ní","犯得着":"fàn de zháo","土疙瘩":"tǔ gē da","煞风景":"shā fēng jǐng","轻量级":"qīng liàng jí","羞答答":"xiū dā dā","石子儿":"shí zǐ er","大帽子":"dà mào zi","达姆弹":"dá mǔ dàn","摇篮曲":"yáo lán qǔ","科教片":"kē jiào piān","侃大山":"kǎn tài shān","丁点儿":"dīng diǎn er","吃得消":"chī de xiāo","捋虎须":"luō hǔ xū","间奏曲":"jiàn zòu qǔ","高丽参":"gāo lí shēn","安魂曲":"ān hún qǔ","众生相":"zhòng shēng xiàng","咽峡炎":"yān xiá yán","禁得住":"jīn de zhù","打拍子":"dǎ pāi zi","催眠曲":"cuī mián qǔ","臭架子":"chòu jià zi","吃得开":"chī de kāi","柞丝绸":"zuò sī chóu","应声虫":"yìng shēng chóng","数得着":"shǔ de zháo","傻劲儿":"shǎ jìn er","铅玻璃":"qiān bō li","抹不开":"mò bù kāi","可的松":"kě dì sōng","划得来":"huá de lái","红帽子":"hóng mào zi","孩子王":"hái zi wáng","晕乎乎":"yùn hū hū","台柱子":"tái zhù zi","屎壳郎":"shǐ ke làng","尥蹶子":"liào jué zǐ","空架子":"kōng jià zi","藏红花":"zàng hóng huā","说不着":"shuō bù zháo","闷罐车":"mèn guàn chē","卡脖子":"qiǎ bó zi","红澄澄":"hóng deng deng","赶得及":"gǎn de jí","当间儿":"dāng jiàn ér","露马脚":"lòu mǎ jiǎo","鸡内金":"jī nà jīn","犯得上":"fàn děi shàng","钉齿耙":"dīng chǐ bà","饱和点":"bǎo huó diǎn","文曲星":"wén qǔ xīng","翘辫子":"qiào biàn zi","龙爪槐":"lóng zhǎo huái","喝倒彩":"hè dào cǎi","鸽子笼":"gē zi lóng","定冠词":"dìng guàn cí","担担面":"dàn dan miàn","吃得住":"chī de zhù","爪尖儿":"zhuǎ jiān er","支着儿":"zhī zhāo ér","折跟头":"zhē gēn tou","炸丸子":"zhá wán zǐ","阴着儿":"yīn zhāo ér","烟卷儿":"yān juǎn ér","宣传弹":"xuān chuán dàn","信皮儿":"xìn pí er","弦切角":"xián qiē jiǎo","跳房子":"tiào fáng zi","缩砂密":"sù shā mì","说得来":"shuō de lái","水漂儿":"shuǐ piǎo ér","耍笔杆":"shuǎ bǐ gǎn","数得上":"shǔ děi shàng","数不着":"shǔ bù zháo","数不清":"shǔ bù qīng","什件儿":"shí jiàn ér","狮子会":"shī zi huì","生死簿":"shēng sǐ bù","扇风机":"shān fēng jī","散摊子":"sàn tān zi","撒呓挣":"sā yì zhēng","日记簿":"rì jì bù","热得快":"rè de kuài","曲别针":"qǔ bié zhēn","亲家公":"qìng jiā gōng","奇函数":"jī hán shù","炮子儿":"pào zǐ er","拍纸簿":"pāi zhǐ bù","努劲儿":"nǔ jìn er","泥娃娃":"ní wá wa","内切圆":"nèi qiē yuán","哪会儿":"něi huì er","摸不着":"mō bù zháo","闷头儿":"mèn tou er","没谱儿":"méi pǔ er","铆劲儿":"mǎo jìn er","溜肩膀":"liū jiān bǎng","了望台":"liào wàng tái","老来少":"lǎo lái shào","坤角儿":"kūn jué ér","考勤簿":"kǎo qín bù","卷笔刀":"juǎn bǐ dāo","九重霄":"jiǔ chóng xiāo","进给量":"jìn jǐ liàng","划不来":"huá bù lái","汗褂儿":"hàn guà er","鼓囊囊":"gǔ nāng nang","够劲儿":"gòu jìn er","公切线":"gōng qiē xiàn","搁得住":"gé de zhù","搁不住":"gé bú zhù","赶浪头":"gǎn làng tóu","赶得上":"gǎn děi shàng","干酵母":"gàn jiào mǔ","嘎渣儿":"gā zhā er","嘎嘣脆":"gā bēng cuì","对得住":"duì de zhù","逗闷子":"dòu mèn zǐ","顶呱呱":"dǐng guā guā","滴溜儿":"dī liù ér","大轴子":"dà zhòu zǐ","打板子":"dǎ bǎn zi","寸劲儿":"cùn jìn er","醋劲儿":"cù jìn er","创牌子":"chuàng pái zi","揣手儿":"chuāi shǒu er","冲劲儿":"chòng jìn er","吃得来":"chī de lái","不更事":"bù gēng shì","奔头儿":"bèn tou er","百夫长":"bǎi fū zhǎng","娃娃亲":"wá wa qīn","死劲儿":"sǐ jìng er","骨朵儿":"gū duǒ er","功劳簿":"gōng láo bù"},t=Object.keys(d).map((n=>({zh:n,pinyin:d[n],priority:3,length:3}))),b={"成吉思汗":"chéng jí sī hán","四通八达":"sì tōng bā dá","一模一样":"yī mú yī yàng","青藏高原":"qīng zàng gāo yuán","阿弥陀佛":"ē mí tuó fó","解放思想":"jiè fàng sī xiǎng","所作所为":"suǒ zuò suǒ wéi","迷迷糊糊":"mí mí hu hū","荷枪实弹":"hè qiāng shí dàn","兴高采烈":"xìng gāo cǎi liè","无能为力":"wú néng wéi lì","融为一体":"róng wéi yī tǐ","布鲁塞尔":"bù lǔ sài ěr","为所欲为":"wéi suǒ yù wéi","审时度势":"shěn shí duó shì","克什米尔":"kè shí mǐ ěr","没完没了":"méi wán méi liǎo","不为人知":"bù wéi rén zhī","结结巴巴":"jiē jiē bā bā","前仆后继":"qián pū hòu jì","一年一度":"yì nián yí dù","各行各业":"gè háng gè yè","合二为一":"hé èr wéi yī","被子植物":"bèi zǐ zhí wù","铺天盖地":"pū tiān gài dì","直截了当":"zhí jié liǎo dàng","供不应求":"gōng bù yìng qiú","御史大夫":"yù shǐ dà fū","不为瓦全":"bù wéi wǎ quán","不可收拾":"bù kě shōu shi","胡作非为":"hú zuò fēi wéi","分毫不差":"fēn háo bù chā","模模糊糊":"mó mó hu hū","不足为奇":"bù zú wéi qí","如之奈何":"rú zhī nai hé","悄无声息":"qiǎo wú shēng xī","卷土重来":"juǎn tǔ chóng lái","了如指掌":"liǎo rú zhǐ zhǎng","深恶痛绝":"shēn wù tòng jué","高高兴兴":"gāo gāo xìng xìng","唉声叹气":"āi shēng tàn qì","混为一谈":"hùn wéi yī tán","不了了之":"bù liǎo liǎo zhī","汉藏语系":"hàn zàng yǔ xì","处心积虑":"chǔ xīn jī lǜ","泣不成声":"qǐ bù chéng shēng","半夜三更":"bàn yè sān gēng","失魂落魄":"shī hún luò pò","二十八宿":"èr shí bā xiù","转来转去":"zhuàn lái zhuàn qù","数以万计":"shǔ yǐ wàn jì","相依为命":"xiāng yī wéi mìng","恋恋不舍":"liàn liàn bù shě","屈指可数":"qū zhǐ kě shǔ","神出鬼没":"shén chū guǐ mò","结结实实":"jiē jiē shí shí","有的放矢":"yǒu dì fàng shǐ","叽哩咕噜":"jī lǐ gū lū","合而为一":"hé ér wéi yī","调兵遣将":"diào bīng qiǎn jiàng","载歌载舞":"zài gē zài wǔ","转危为安":"zhuǎn wēi wéi ān","踏踏实实":"tā tā shi shí","桑给巴尔":"sāng jǐ bā ěr","装模作样":"zhuāng mú zuò yàng","见义勇为":"jiàn yì yǒng wéi","相差无几":"xiāng chā wú jǐ","叹为观止":"tàn wéi guān zhǐ","闷闷不乐":"mèn mèn bù lè","喜怒哀乐":"xǐ nù āi lè","鲜为人知":"xiǎn wéi rén zhī","张牙舞爪":"zhāng yá wǔ zhǎo","为非作歹":"wéi fēi zuò dǎi","一蹶不振":"yī jué bù zhèn","含糊其辞":"hán hú qí cí","疲于奔命":"pí yú bēn mìng","勉为其难":"miǎn wéi qí nán","依依不舍":"yī yī bù shě","顶头上司":"dǐng tóu shàng si","不着边际":"bù zhuó biān jì","大模大样":"dà mú dà yàng","寻欢作乐":"xún huān zuò lè","一走了之":"yī zǒu liǎo zhī","一年到头":"yì nián dào tóu","字里行间":"zì lǐ háng jiān","含含糊糊":"hán hán hu hū","数一数二":"shǔ yī shǔ èr","恰如其分":"qià rú qí fèn","破涕为笑":"pò tì wéi xiào","深更半夜":"shēn gēng bàn yè","千差万别":"qiān chā wàn bié","数不胜数":"shǔ bù shèng shǔ","据为己有":"jù wéi jǐ yǒu","天旋地转":"tiān xuán dì zhuàn","养尊处优":"yǎng zūn chǔ yōu","玻璃纤维":"bō li xiān wéi","吵吵闹闹":"chāo chao nào nào","晕头转向":"yūn tóu zhuàn xiàng","土生土长":"tǔ shēng tǔ zhǎng","宁死不屈":"nìng sǐ bù qū","不省人事":"bù xǐng rén shì","尽力而为":"jìn lì ér wéi","精明强干":"jīng míng qiáng gàn","唠唠叨叨":"láo lao dāo dāo","叽叽喳喳":"jī ji zhā zhā","功不可没":"gōng bù kě mò","锲而不舍":"qiè ér bù shě","排忧解难":"pái yōu jiě nàn","稀里糊涂":"xī li hú tú","异曲同工":"yì qǔ tóng gōng","各有所长":"gè yǒu suǒ chéng","的的确确":"dí dí què què","一言为定":"yī yán wéi dìng","哄堂大笑":"hōng táng dà xiào","听而不闻":"tīng ér bú wén","刀耕火种":"dāo gēng huǒ zhòng","说不过去":"shuō bu guò qù","内分泌腺":"nèi fèn mì xiàn","化险为夷":"huà xiǎn wéi yí","百发百中":"bǎi fā bǎi zhòng","重见天日":"chóng jiàn tiān rì","反败为胜":"fǎn bài wéi shèng","一了百了":"yī liǎo bǎi liǎo","大大咧咧":"dà da liē liē","心急火燎":"xīn jí huǒ liǎo","粗心大意":"cū xīn dà yi","鸡皮疙瘩":"jī pí gē da","夷为平地":"yí wéi píng dì","日积月累":"rì jī yuè lěi","设身处地":"shè shēn chǔ dì","投其所好":"tóu qí suǒ hào","间不容发":"jiān bù róng fà","人满为患":"rén mǎn wéi huàn","穷追不舍":"qióng zhuī bù shě","为时已晚":"wéi shí yǐ wǎn","如数家珍":"rú shǔ jiā zhēn","心里有数":"xīn lǐ yǒu shù","一盘散沙":"yī pán sǎn shā","以牙还牙":"yǐ yá huán yá","神不守舍":"shén bù shǒu shě","孟什维克":"mèng shí wéi kè","各自为战":"gè zì wéi zhàn","怨声载道":"yuàn shēng zài dào","一哄而散":"yī hòng ér sàn","救苦救难":"jiù kǔ jiù nàn","好好先生":"hǎo hǎo xiān sheng","怪模怪样":"guài mú guài yàng","抛头露面":"pāo tóu lù miàn","游手好闲":"yóu shǒu hào xián","无所不为":"wú suǒ bù wéi","调虎离山":"diào hǔ lí shān","步步为营":"bù bù wéi yíng","好大喜功":"hào dà xǐ gōng","众矢之的":"zhòng shǐ zhī dì","长生不死":"cháng shēng bū sǐ","蔚为壮观":"wèi wéi zhuàng guān","不可胜数":"bù kě shèng shǔ","鬼使神差":"guǐ shǐ shén chāi","洁身自好":"jié shēn zì hào","敢作敢为":"gǎn zuò gǎn wéi","茅塞顿开":"máo sè dùn kāi","走马换将":"zǒu mǎ huàn jiàng","为时过早":"wéi shí guò zǎo","为人师表":"wéi rén shī biǎo","阴差阳错":"yīn chā yáng cuò","油腔滑调":"yóu qiāng huá diào","重蹈覆辙":"chóng dǎo fù zhé","骂骂咧咧":"mà ma liē liē","絮絮叨叨":"xù xù dāo dāo","如履薄冰":"rú lǚ bó bīng","损兵折将":"sǔn bīng zhé jiàng","无可比拟":"wú kě bǐ nì","拐弯抹角":"guǎi wān mò jiǎo","像模像样":"xiàng mú xiàng yàng","供过于求":"gōng guò yú qiú","开花结果":"kāi huā jiē guǒ","仔仔细细":"zǐ zǐ xì xì","川藏公路":"chuān zàng gōng lù","河北梆子":"hé běi bāng zi","长年累月":"cháng nián lěi yuè","正儿八经":"zhèng er bā jīng","不识抬举":"bù shí tái ju","重振旗鼓":"chóng zhèn qí gǔ","气息奄奄":"qì xī yān yān","紧追不舍":"jǐn zhuī bù shě","服服帖帖":"fú fu tiē tiē","强词夺理":"qiǎng cí duó lǐ","噼里啪啦":"pī li pā lā","人才济济":"rén cái jǐ jǐ","发人深省":"fā rén shēn xǐng","不足为凭":"bù zú wéi píng","为富不仁":"wéi fù bù rén","连篇累牍":"lián piān lěi dú","呼天抢地":"hū tiān qiāng dì","落落大方":"luò luò dà fāng","自吹自擂":"zì chuī zì léi","乐善好施":"lè shàn hào shī","以攻为守":"yǐ gōng wéi shǒu","磨磨蹭蹭":"mó mó cèng cèng","削铁如泥":"xuē tiě rú ní","助纣为虐":"zhù zhòu wéi nüè","以退为进":"yǐ tuì wéi jìn","重整旗鼓":"chóng zhěng qí gǔ","嘁嘁喳喳":"qī qī chā chā","枪林弹雨":"qiāng lín dàn yǔ","令人发指":"lìng rén fà zhǐ","转败为胜":"zhuǎn bài wéi shèng","转弯抹角":"zhuǎn wān mò jiǎo","在劫难逃":"zài jié nán táo","正当防卫":"zhèng dàng fáng wèi","不足为怪":"bù zú wéi guài","难兄难弟":"nàn xiōng nàn dì","咿咿呀呀":"yī yī yā yā","弹尽粮绝":"dàn jìn liáng jué","八旗子弟":"bā qí zi dì","阿谀奉承":"ē yú fèng chéng","稀里哗啦":"xī li huā lā","返老还童":"fǎn lǎo huán tóng","好高骛远":"hào gāo wù yuǎn","灾难深重":"zāi nán shēn zhòng","鹿死谁手":"lù sǐ shéi shǒu","差强人意":"chā qiáng rén yì","大吹大擂":"dà chuī dà léi","成家立业":"chéng jiā lì yiè","自怨自艾":"zì yuàn zì yì","负债累累":"fù zhai lěi lěi","古为今用":"gǔ wéi jīn yòng","入土为安":"rù tǔ wéi ān","下不为例":"xià bù wéi lì","一哄而上":"yì hōng ér shàng","一股劲儿":"yī gǔ jìn er","没头苍蝇":"méi tóu cāng ying","天差地远":"tiān chā dì yuǎn","风卷残云":"fēng juǎn cán yún","多灾多难":"duō zāi duō nàn","乳臭未干":"rǔ xiù wèi gān","行家里手":"háng jiā lǐ shǒu","狼狈为奸":"láng bèi wéi jiān","处变不惊":"chǔ biàn bù jīng","一唱一和":"yī chàng yī hè","一念之差":"yī niàn zhī chā","金蝉脱壳":"jīn chán tuō qiào","滴滴答答":"dī dī dā dā","硕果累累":"shuò guǒ léi léi","只知其一":"zhǐ zhī qí yī","好整以暇":"hào zhěng yǐ xiá","红得发紫":"hóng de fā zǐ","传为美谈":"chuán wéi měi tán","富商大贾":"fù shāng dà gǔ","四海为家":"sì hǎi wéi jiā","失而复得":"shī ér fù de","了若指掌":"liǎo ruò zhǐ zhǎng","大有可为":"dà yǒu kě wéi","出头露面":"chū tóu lù miàn","鼓鼓囊囊":"gǔ gu nāng nāng","窗明几净":"chuāng míng jī jìng","泰然处之":"tài rán chǔ zhī","怒发冲冠":"nù fà chōng guān","不甚了了":"bù shèn liǎo liǎo","有机玻璃":"yǒu jī bō li","骨头架子":"gú tou jià zi","义薄云天":"yì bó yún tiān","一丁点儿":"yī dīng diǎn er","时来运转":"shí lái yùn zhuǎn","陈词滥调":"chén cí làn diào","七十二行":"qī shí èr háng","化整为零":"huà zhěng wéi líng","火烧火燎":"huǒ shāo huǒ liǎo","干脆利索":"gàn cuì lì suǒ","吊儿郎当":"diào er láng dāng","广种薄收":"guǎng zhòng bó shōu","种瓜得瓜":"zhòng guā dé guā","种豆得豆":"zhòng dòu dé dòu","难舍难分":"nán shě nán fēn","歃血为盟":"shà xuè wéi méng","奋发有为":"fèn fā yǒu wéi","阴错阳差":"yīn cuò yáng chā","东躲西藏":"dōng duǒ xī cáng","烟熏火燎":"yān xūn huǒ liǎo","钻牛角尖":"zuān niú jiǎo jiān","乔装打扮":"qiáo zhuāng dǎ bàn","改弦更张":"gǎi xián gēng zhāng","河南梆子":"hé nán bāng zi","好吃懒做":"hào chī lǎn zuò","何乐不为":"hé lè bù wéi","大出风头":"dà chū fēng tóu","攻城掠地":"gōng chéng lüě dì","漂漂亮亮":"piào piào liang liang","折衷主义":"zhé zhōng zhǔ yì","大马哈鱼":"dà mǎ hǎ yú","绿树成荫":"lǜ shù chéng yīn","率先垂范":"shuài xiān chuí fàn","家长里短":"jiā cháng lǐ duǎn","宽大为怀":"kuān dà wéi huái","左膀右臂":"zuǒ bǎng yòu bì","影子内阁":"yǐng zi nèi gé","一笑了之":"yī xiào liǎo zhī","天下为公":"tiān xià wéi gōng","还我河山":"huán wǒ hé shān","何足为奇":"hé zú wéi qí","好自为之":"hào zì wéi zhī","风姿绰约":"fēng zī chuō yué","大雨滂沱":"dà yǔ páng tuó","传为佳话":"chuán wéi jiā huà","吃里扒外":"chī lǐ pá wài","重操旧业":"chóng cāo jiù yè","小家子气":"xiǎo jiā zi qì","少不更事":"shào bù gēng shì","难分难舍":"nán fēn nán shě","只争朝夕":"zhǐ zhēng zhāo xī","添砖加瓦":"tiān zhuān jiē wǎ","是非分明":"shì fēi fēn míng","舍我其谁":"shě wǒ qí shuí","偏听偏信":"piān tīng piāng xìn","量入为出":"liàng rù wéi chū","降龙伏虎":"xiáng lóng fú hǔ","故伎重演":"gù jì zhòng yǎn","钢化玻璃":"gāng huà bō li","正中下怀":"zhèng zhòng xià huái","以身许国":"yǐ shēng xǔ guó","一语中的":"yī yǔ zhōng dì","丧魂落魄":"sàng hún luò pò","三座大山":"sān zuò tài shān","济济一堂":"jǐ jǐ yī táng","好事之徒":"hào shì zhī tú","干净利索":"gàn jìng lì suǒ","出将入相":"chū jiàng rù xiàng","袅袅娜娜":"niǎo niǎo nuó nuó","狐狸尾巴":"hú li wěi ba","好逸恶劳":"hào yì wù láo","大而无当":"dà ér wú dàng","打马虎眼":"dǎ mǎ hu yǎn","板上钉钉":"bǎn shàng dìng dīng","吆五喝六":"yāo wǔ hè liù","虾兵蟹将":"xiā bīng xiè jiàng","水调歌头":"shuǐ diào gē tóu","数典忘祖":"shǔ diǎn wàng zǔ","人事不省":"rén shì bù xǐng","曲高和寡":"qǔ gāo hè guǎ","偶一为之":"ǒu yī wéi zhī","屡教不改":"lǚ jiàn bù gǎi","互为因果":"hù wéi yīn guò","互为表里":"hù wéi biǎo lǐ","厚此薄彼":"hòu cǐ bó bǐ","过关斩将":"guò guān zhǎn jiàng","疙疙瘩瘩":"gē gē dā dá","否极泰来":"pǐ jí tài lái","大腹便便":"dà fù pián pián","走为上策":"zǒu wéi shàng cè","冤家对头":"yuān jia duì tóu","有隙可乘":"yǒu xì kě chèng","一无所得":"yī wú suǒ dé","一鳞半爪":"yī lín bàn zhǎo","一哄而起":"yī hōng ér qǐ","片言只语":"piàn yán zhǐ yǔ","开花结实":"kāi huā jié shí","旧地重游":"jiù dì chóng yóu","经年累月":"jīng nián lěi yuè","含糊其词":"hán hú qí cí","寡廉鲜耻":"guǎ lián xiǎn chǐ","成年累月":"chéng nián lěi yuè","不徇私情":"bù xún sī qíng","不当人子":"bù dāng rén zǐ","膀大腰圆":"bǎng dà yāo yuán","指腹为婚":"zhǐ fù wéi hūn","这么点儿":"zhè me diǎn er","意兴索然":"yì xīng suǒ rán","绣花枕头":"xiù huā zhěn tóu","无的放矢":"wú dì fàng shǐ","望闻问切":"wàng wén wèn qiē","舍己为人":"shě jǐ wèi rén","穷年累月":"qióng nián lěi yuè","排难解纷":"pái nàn jiě fēn","处之泰然":"chǔ zhī tài rán","指鹿为马":"zhǐ lù wéi mǎ","一吐为快":"yī tǔ wéi kuài","一丘之貉":"yī qiū zhī hé","危如累卵":"wēi rú lěi luǎn","天兵天将":"tiān bīng tiān jiàng","舍近求远":"shě jìn qiú yuǎn","南腔北调":"nán qiāng běi diào","苦中作乐":"kǔ zhōng zuò lè","厚积薄发":"hòu jī bó fā","戴绿帽子":"dài lǜ mào zi","臭味相投":"xiù wèi xiāng tóu","长幼有序":"zhǎng yòu yǒu xù","逼良为娼":"bī liáng wéi chāng","悲悲切切":"bēi bēi qiè qiē","败军之将":"bài jūn zhī jiàng","欺行霸市":"qī háng bà shì","削足适履":"xuē zú shì lǚ","先睹为快":"xiān dǔ wéi kuài","啼饥号寒":"tí jī háo hán","疏不间亲":"shū bù jiàn qīn","神差鬼使":"shén chāi guǐ shǐ","敲敲打打":"qiāo qiāo dā dā","平铺直叙":"píng pū zhí xù","没头没尾":"méi tóu mò wěi","寥寥可数":"liáo liáo kě shǔ","哼哈二将":"hēng hā èr jiàng","鹤发童颜":"hè fà tóng yán","各奔前程":"gè bèn qián chéng","弹无虚发":"dàn wú xū fā","大人先生":"dà rén xiān sheng","与民更始":"yǔ rén gēng shǐ","叶落归根":"yè luò huī gēn","一目十行":"yī mù shí háng","虚晃一枪":"xiù huàng yī qiāng","树碑立传":"shù bēi lì zhuàn","是非得失":"shì fēi dé shī","实逼处此":"shí bī chǔ cǐ","塞翁失马":"sài wēng shī mǎ","日薄西山":"rì bó xī shān","切身体会":"qiē shēn tǐ huì","片言只字":"piàn yán zhǐ zì","跑马卖解":"pǎo mǎ mài xiè","宁折不弯":"nìng zhé bù wān","零零散散":"líng líng sǎn sǎn","量体裁衣":"liàng tǐ cái yī","连中三元":"lián zhòng sān yuán","礼崩乐坏":"lǐ bēng yuè huài","胡子拉碴":"hú zǐ lā chā","不为已甚":"bù wéi yǐ shèn","转悲为喜":"zhuǎn bēi wéi xǐ","以眼还眼":"yǐ yǎn huán yǎn","蔚为大观":"wèi wéi dà guān","未为不可":"wèi wéi bù kě","童颜鹤发":"tóng yán hè fà","朋比为奸":"péng bǐ wéi jiān","莫此为甚":"mò cǐ wéi shèn","老调重弹":"lǎo diào zhòng dàn","夹枪带棒":"jiā qiāng dài bàng","富商巨贾":"fù shāng jù jiǎ","多劳多得":"duō láo duō de","淡然处之":"dàn rán chǔ zhī","箪食壶浆":"dān sì hú jiāng","创巨痛深":"chuāng jù tòng shēn","草长莺飞":"cǎo zhǎng yīng fēi","坐视不救":"zuò shī bù jiù","重起炉灶":"chóng qǐ lú zào","以己度人":"yǐ jǐ duó rén","随行就市":"suí háng jiù shì","文以载道":"wén yǐ zài dào","文不对题":"wén bù duì tí","铁板钉钉":"tiě bǎn dìng dīng","身体发肤":"shēn tǐ fà fū","缺吃少穿":"quē chī xhǎo chuān","目无尊长":"mù wú zūn zhǎng","吉人天相":"jí rén tiān xiàng","毁家纾难":"huǐ jiā shū nàn","钢筋铁骨":"gāng jīng tiě gǔ","丢卒保车":"diū zú bǎo jū","丢三落四":"diū sān là sì","闭目塞听":"bì mù sè tīng","削尖脑袋":"xuē jiān nǎo dài","为非作恶":"wéi fēi zuò è","人才难得":"rén cái cái dé","情非得已":"qíng fēi dé yǐ","切中要害":"qiē zhōng yào hài","火急火燎":"huǒ jí huǒ liǎo","画地为牢":"huà dì wéi láo","好酒贪杯":"hào jiǔ tān bēi","长歌当哭":"cháng gē dàng kū","载沉载浮":"zài chén zài fú","遇难呈祥":"yù nàn chéng xiáng","榆木疙瘩":"yú mù gē da","以邻为壑":"yǐ lín wéi hè","洋为中用":"yáng wéi zhōng yòng","言为心声":"yán wéi xīn shēng","言必有中":"yán bì yǒu zhòng","图穷匕见":"tú qióng bǐ xiàn","滂沱大雨":"páng tuó dà yǔ","目不暇给":"mù bù xiá jǐ","量才录用":"liàng cái lù yòng","教学相长":"jiào xué xiāng zhǎng","悔不当初":"huǐ bù dāng chū","呼幺喝六":"hū yāo hè liù","不足为训":"bù zú wéi xùn","不拘形迹":"bù jū xíng jī","傍若无人":"páng ruò wú rén","八大山人":"bā tài shān rén","罪责难逃":"zuì zé nán táo","自我吹嘘":"zì wǒ chuí xū","转祸为福":"zhuǎn huò wéi fú","重峦叠嶂":"chóng luán dié zhàng","勇冠三军":"yǒng guàn sān jūn","易地而处":"yì dì ér chǔ","一语破的":"yī yǔ pò dì","卸磨杀驴":"xiè mò shā lǘ","玩儿不转":"wán ér bù zhuàn","天道好还":"tiān dào hǎo huán","身单力薄":"shēn dān lì bó","撒豆成兵":"sǎ dòu chéng bīng","曲里拐弯":"qū lǐ guǎn wān","片纸只字":"piàn zhǐ yán zì","宁缺毋滥":"nìng quē wù làn","没没无闻":"mò mò wú wén","量力而为":"liàng lì ér wéi","历历可数":"lì lì kě shǔ","口碑载道":"kǒu bēi zài dào","君子好逑":"jūn zǐ hào qiú","好为人师":"hào wéi rén shī","豪商巨贾":"háo shāng jù jiǎ","各有所好":"gè yǒu suǒ hào","度德量力":"duó dé liàng lì","便宜从事":"biàn yí cóng shì","指天为誓":"zhǐ tiān wéi shì","逸兴遄飞":"yì xìng chuán fēi","心宽体胖":"xīn kuān tǐ pán","为德不卒":"wéi dé bù zú","纨袴子弟":"wán kǔ zǐ dì","天下为家":"tiān xià wéi jiā","视为畏途":"shì wéi wèi tú","舍己从人":"shě jǐ cóng rén","三灾八难":"sān zāi bā nàn","人自为战":"rén zì wéi zhàn","群雌粥粥":"qún cí yù yù","那么点儿":"nà me diǎn er","沐猴而冠":"mù hóu ér guàn","谋为不轨":"móu wéi bù guǐ","明窗净几":"míng chuāng jìng jī","哩哩啦啦":"li li lā lā","见缝就钻":"jiàn fèng jiù zuān","夹层玻璃":"jiā céng bō li","急公好义":"jí gōng hào yì","积年累月":"jī nián lěi yuè","划地为牢":"huá dì wéi láo","更名改姓":"gèng míng gǎi xìng","奉为圭臬":"fèng wéi guī niè","多难兴邦":"duō nàn xīng bāng","顿开茅塞":"dùn kāi máo sè","弹尽援绝":"dàn jìn yuán jué","大脖子病":"dà bó zi bìng","不破不立":"bù può bù lì","坐地自划":"zuò dì zì huá","坐不重席":"zuò bù chóng xí","坐不窥堂":"zùo bù kuī táng","作舍道旁":"zuò shě dào páng","作嫁衣裳":"zuò jià yī shāng","左支右吾":"zuǒ zhī yòu wū","左枝右梧":"zuǒ zhī yòu wū","左宜右有":"zuǒ yí yòu fú","罪应万死":"zuì yīng wàn sǐ","钻心刺骨":"zuàn xīn cì gǔ","钻穴逾墙":"zuān xué yú qiáng","钻穴逾隙":"zuān xué yú xì","钻隙逾墙":"zuān xì yú qiáng","钻头觅缝":"zuān tóu mì fèng","钻天觅缝":"zuàn tiān mì féng","钻天打洞":"zuān tiān dǎ dòng","钻皮出羽":"zuān pí chū yǔ","钻懒帮闲":"zuān lǎn bāng xián","钻火得冰":"zuān huǒ dé bīng","钻洞觅缝":"zuàn dòng mì féng","钻冰求火":"zuān bīng qiú huǒ","钻冰求酥":"zuān bīng qiú sū","走为上着":"zǒu wèi shàng zhaō","走花溜水":"zǒu huā liū bīng","纵曲枉直":"zòng qǔ wǎng zhí","自相惊忧":"zì xiāng jīng rǎo","子为父隐":"zǐ wéi fù yǐn","资深望重":"zī shēng wàng zhòng","擢发难数":"zhuó fà nán shǔ","擢发莫数":"zhuó fà mò shǔ","着书立说":"zhù shū lì shuō","着人先鞭":"zhuó rén xiān biān","斫琱为朴":"zhuó diāo wéi pǔ","斫雕为朴":"zhuó diāo wéi pǔ","锥处囊中":"zhuī chǔ náng zhōng","椎膺顿足":"chuí yīng dùn zú","椎胸跌足":"chuí xiōng diē zú","椎胸顿足":"chuí xiōng dùn zú","椎心饮泣":"chuí xīn yǐn qì","椎心泣血":"chuí xīn qì xuè","椎心呕血":"chuí xīn ǒu xuè","椎心顿足":"chuí xīn dùn zú","椎天抢地":"chuí tiān qiǎng dì","椎牛飨士":"chuí niú xiǎng shì","椎牛歃血":"chuí niú shà xuè","椎牛发冢":"chuí niú fā zhǒng","椎埋屠狗":"chuí mái tú gǒu","椎埋狗窃":"chuí mái gǒu qiè","椎肤剥体":"chuí fū bō tǐ","椎肤剥髓":"chuí fū bō suǐ","椎锋陷阵":"chuí fēng xiàn zhèn","椎锋陷陈":"chuī fēng xiàn chén","追欢作乐":"zhuī huān zuò lè","追风摄景":"zhuī fēng niè jǐng","壮发冲冠":"zhuàng fā chōng guàn","庄严宝相":"zhuāng yán bǎo xiàng","转灾为福":"zhuǎn zāi wéi fú","转湾抹角":"zhuǎn wān mò jiǎo","转愁为喜":"zhuǎn chóu wéi xǐ","转嗔为喜":"zhuǎn chēn wéi xǐ","转败为成":"zhuǎn bài wéi chéng","转败为功":"zhuǎn bài wéi gōng","拽巷攞街":"zhuài xiàng luǒ jiē","拽巷啰街":"zhuài xiàng luó jiē","拽耙扶犁":"zhuāi pá fú lí","拽布拖麻":"zhuāi bù tuō má","箸长碗短":"zhù chàng wǎn duǎn","铸剑为犁":"zhù jiàn wéi lí","杼柚之空":"zhù zhóu zhī kōng","杼柚其空":"zhù zhóu qí kōng","杼柚空虚":"zhù zhóu kōng xū","助天为虐":"zhù tiān wéi nüè","助桀为虐":"zhù jié wéi nüè","属垣有耳":"zhǔ yuán yǒu ěr","属毛离里":"zhǔ máo lí lǐ","属辞比事":"zhǔ cí bǐ shì","属词比事":"zhǔ cí bǐ shì","逐物不还":"zhú wù bù huán","铢铢校量":"zhū zhū xiào liàng","铢量寸度":"zhū liáng cùn duó","铢两悉称":"zhū liǎng xī chèn","铢积寸累":"zhū jī cùn lěi","侏儒一节":"zhū rǔ yī jié","侏儒观戏":"zhū rǔ guān xì","朱槃玉敦":"zhū pán yù duì","朱盘玉敦":"zhū pán yù duì","朱轓皁盖":"zhū fān hǎi gài","昼干夕惕":"zhòu gàn xī tì","昼度夜思":"zhòu duó yè sī","诪张为幻":"zhōu zhāng wéi huàn","周郎顾曲":"zhōu láng gù qǔ","侜张为幻":"zhōu zhāng wéi huàn","重足一迹":"chóng zú yī jì","重足屏息":"chóng zú bǐng xī","重足屏气":"chóng zú bǐng qì","重足累息":"chóng zú lèi xī","重足而立":"chóng zú ér lì","重纸累札":"chóng zhǐ lèi zhá","重垣叠锁":"chóng yuán dié suǒ","重垣迭锁":"chóng yuán dié suǒ","重裀列鼎":"chóng yīn liè dǐng","重岩叠嶂":"chóng yán dié zhàng","重兴旗鼓":"chóng xīng qí gǔ","重熙累叶":"chóng xī lěi yè","重熙累盛":"chóng xī lěi shèng","重手累足":"chóng shǒu lěi zú","重山峻岭":"chóng shān jùn lǐng","重山复水":"chóng shān fù shuǐ","重山复岭":"chóng shān fù lǐng","重三叠四":"chóng sān dié sì","重三迭四":"chóng sān dié sì","重气徇命":"zhòng qì xùn míng","重纰貤缪":"chóng pī yí miù","重葩累藻":"chóng pā lèi zǎo","重明继焰":"chóng míng jì yàn","重峦复嶂":"chóng luán fù zhàng","重峦叠巘":"chóng luán dié yǎn","重峦迭巘":"chóng luán dié yǎn","重理旧业":"chóng lǐ jiù yè","重金袭汤":"chóng jīn xí tāng","重金兼紫":"chóng jīn jiān zǐ","重迹屏气":"chóng jì bǐng qì","重珪叠组":"chóng guī dié zǔ","重规袭矩":"chóng guī xí jǔ","重规叠矩":"chóng guī dié jǔ","重规累矩":"chóng guī lèi jǔ","重规迭矩":"chóng guī dié jǔ","重规沓矩":"chóng guī tà jǔ","重圭叠组":"chóng guī dié zǔ","重睹天日":"chóng dǔ tiān rì","重床叠屋":"chóng chuáng dié wū","重床叠架":"chóng chuáng dié jià","重床迭屋":"chóng chuáng dié wū","重床迭架":"chóng chuáng dié jià","众啄同音":"zhòng zhòu tóng yīn","众星攒月":"zhòng xīng cuán yuè","众毛攒裘":"zhòng máo cuán qiú","众好众恶":"zhòng hào zhòng wù","钟鼎人家":"zhōng dǐng rén jia","擿植索涂":"zhāi zhí suǒ tú","擿埴索涂":"zhāi zhí suǒ tú","擿埴索途":"zhāi zhí suǒ tú","稚齿婑媠":"zhì chǐ wǒ tuǒ","致远任重":"zhì yuǎn rèn zhàng","栉比鳞差":"zhì bǐ lín cǐ","至当不易":"zhì dàng bù yì","指皁为白":"zhǐ zào wéi bái","指皂为白":"zhǐ zào wéi bái","指雁为羹":"zhǐ yàn wéi gēng","指树为姓":"zhǐ shù wéi xìng","指山说磨":"zhǐ shān shuō mò","指山卖磨":"zhǐ shān mài mò","只争旦夕":"zhǐ zhēng dàn xī","止戈为武":"zhǐ gē wéi wǔ","植发穿冠":"zhí fà chuān guàn","植发冲冠":"zhí fà chōng guàn","直言切谏":"zhí yán qiē jiàn","直扑无华":"zhí pǔ wú huá","知疼着痒":"zhī téng zháo yǎng","枝叶相持":"zhī yè xīng chí","枝干相持":"zhī gàn xiāng xhí","枝附叶着":"zhī fù yiè zhuó","枝附叶著":"zhī fù yiè zhuó","枝大于本":"zhī dà yù běn","支吾其词":"zhī wū qí cí","支分族解":"zhī fē zú jiě","正中己怀":"zhèng zhòng jǐ huái","正身率下":"zhèng shēn shuài xià","正冠纳履":"zhèng guàn nà lǚ","正冠李下":"zhèng guàn lǐ xià","整冠纳履":"zhěng guàn nà lǚ","整躬率物":"zhěng gōng shuài wù","整顿干坤":"zhěng dùn gàn kūn","蒸沙为饭":"zhēng shā wéi fàn","振兵泽旅":"zhèn bīng shì lǚ","枕席还师":"zhěn xí huán shī","枕石漱流":"zhěn shí sòu liú","枕石嗽流":"zhěn shí shù liú","真相毕露":"zhēn xiāng bì lù","针头削铁":"zhēn tóu xuē tiě","贞松劲柏":"zhēn sōng jìng bǎi","赭衣塞路":"zhě yī sài lù","折腰五斗":"shé yāo wǔ dòu","折箭为誓":"shé jiàn wéi shì","折而族之":"zhe er zu zi","昭德塞违":"zhāo dé sè wéi","彰明较着":"zhāng míng jiào zhù","章句小儒":"zhāng jù xiāo rú","湛恩汪濊":"zhàn ēn wāng hún","占风望气":"zhān fēng wàng qì","占风使帆":"zhān fēng shǐ fān","斩将刈旗":"zhǎn jiàng yì qí","斩将搴旗":"zhǎn jiàng qiān qí","斩钉切铁":"zhǎn dīng qiē tiě","詹言曲说":"zhān yán qǔ shuō","沾沾自好":"zhān zhān zì hào","曾母投杼":"zēng mǔ tóu zhù","曾参杀人":"zēng shēn shā rén","曾不惨然":"zeng bu chan ran","造谣中伤":"zào yáo zhòng shāng","早占勿药":"zǎo zhān wù yào","凿龟数策":"záo guī shǔ cè","攒三集五":"cuán sān jí wǔ","攒三聚五":"cuán sān jù wǔ","攒眉苦脸":"zǎn méi kǔ liǎn","攒眉蹙额":"cuán mei cù é","攒零合整":"cuán líng hé zhěng","攒锋聚镝":"cuán fēng jù dí","载舟覆舟":"zài zhōu fù zhōu","载一抱素":"zài yī bào sù","载笑载言":"zài xiào zài yán","载驱载驰":"zài qū zài chí","载酒问字":"zài jiǔ wèn zì","载歌且舞":"zài gē qiě wǔ","运转时来":"yùn zhuǎn shí lái","殒身不恤":"yǔn shēn bú xù","云舒霞卷":"yún shū xiá juǎn","云泥之差":"yún ní zhī chā","岳镇渊渟":"yuè zhèn yuān tīng","月中折桂":"yuè zhōng shé guì","月没参横":"yuè mò shēn héng","月落参横":"yuè luò shēn héng","远不间亲":"yuǎn bù jiàn qīn","鬻驽窃价":"yù nǔ qiè jià","鬻鸡为凤":"yù jī wéi fèng","遇难成祥":"yù nàn chéng xiáng","郁郁累累":"yù yù lěi lěi","吁天呼地":"yù tiān hū dì","吁咈都俞":"yù fú dōu yú","玉卮无当":"yù zhī wú dàng","语笑喧阗":"yǔ xiào xuān tiān","与世沉浮":"yú shì chén fú","与时消息":"yǔ shí xiāo xi","与民除害":"yǔ hǔ chú hài","逾墙钻隙":"yú qiáng zuān xì","渔阳鞞鼓":"yǔ yáng pí gǔ","渔夺侵牟":"yú duó qīn móu","鱼目混珎":"yú mù hùn zhū","杅穿皮蠹":"yú chuān shuǐ dù","余勇可贾":"yú yǒng kě gǔ","予智予雄":"yú zhì yú xióng","予取予携":"yú qǔ yú xié","予取予求":"yú qǔ yú qiú","予取予夺":"yú qǔ yú duó","于家为国":"yú jiā wéi guó","又弱一个":"yòu ruò yī gè","有借无还":"yǒu jiè wú huán","有加无已":"yǒu jiā wǔ yǐ","有国难投":"yǒu guó nán tóu","有蠙可乘":"yǒu bīn kě chéng","游必有方":"yōu bì yǒu fāng","油干灯尽":"yóu gàn dēng jìn","尤云殢雨":"yóu yún zhì yǔ","饔飧不给":"yōng sūn bù jǐ","庸中皦皦":"yōng zhōng bì tóng","蝇攒蚁聚":"yíng cuán yǐ jù","郢书燕说":"yǐng shū yān shuō","蝇攒蚁附":"yíng cuán yǐ fù","营蝇斐锦":"yíng yíng fēi jǐn","盈千累万":"yíng qiān lěi wàn","盈篇累牍":"yíng piān lěi dú","鹰心雁爪":"yīng xīn yàn zhǎo","莺吟燕儛":"yīng yín yàn sāi","应天顺时":"yīng tiān shùn shí","印累绶若":"yìn léi shòu ruò","隐占身体":"yin zhan shen qi","饮犊上流":"yìn dú shàng liú","饮冰食蘖":"yǐn bīng shí bò","引绳切墨":"yǐn shéng qiē mò","龈齿弹舌":"yín chǐ dàn shé","淫言媟语":"yín yán liǎng yǔ","淫词艳曲":"yín cí yàn qǔ","因缘为市":"yīn yuán wéi shì","因树为屋":"yīn shù wéi wū","因祸为福":"yīn huò wéi fú","因敌为资":"yīn dí wéi zī","溢美溢恶":"yì měi yì lè","逸兴云飞":"yì xìng yún fēi","逸兴横飞":"yì xìng héng fēi","抑塞磊落":"yì sè lěi luò","倚闾望切":"yǐ lǘ wàng qiē","蚁拥蜂攒":"yǐ yōng fēng cuán","以紫为朱":"yǐ zǐ wéi zhū","以意为之":"yǐ yì wéi zhī","以言为讳":"yǐ yán wéi huì","以微知着":"yǐ wēi zhī zhù","以疏间亲":"yǐ shū jiàn qīn","以水济水":"yǐ shuǐ jǐ shuǐ","以书为御":"yǐ shū wéi yù","以守为攻":"yǐ shǒu wéi gōng","以升量石":"yǐ shēng liáng dàn","以慎为键":"yǐ shèn wéi jiàn","以日为年":"yǐ rì wéi nián","以筌为鱼":"yǐ quán wéi yú","以鹿为马":"yǐ lù wéi mǎ","以利累形":"yǐ lì lěi xíng","以毁为罚":"yǐ huǐ wéi fá","以黑为白":"yǐ hēi wéi bái","以规为瑱":"yǐ guī wéi tiàn","以古为鉴":"yǐ gǔ wéi jiàn","以宫笑角":"yǐ gōng xiào jué","以法为教":"yǐ fǎ wéi jiào","以耳为目":"yǐ ěr wéi mù","以大恶细":"yǐ dà wù xì","以不济可":"yǐ fǒu jì kě","以白为黑":"yǐ bái wéi hēi","遗世忘累":"yí shì wàng lěi","遗寝载怀":"yí qǐn zài huái","移孝为忠":"yí xiào wéi zhōng","移的就箭":"yí dì jiù jiàn","依头缕当":"yī tóu lǚ dàng","衣租食税":"yì zū shí shuì","衣轻乘肥":"yì qīng chéng féi","衣裳之会":"yī shāng zhī huì","衣锦食肉":"yì jǐn shí ròu","衣锦过乡":"yì jǐn guò xiāng","衣单食薄":"yī dān shí bó","一重一掩":"yī chóng yī yǎn","一之为甚":"yī zhī wéi shèn","一笑了事":"yī xiào le shì","一现昙华":"yī xiàn tán huā","一岁载赦":"yī suì zài shè","一切万物":"yī qiē wàn wù","一目五行":"yī mù wǔ háng","一鳞一爪":"yī lín yī zhǎo","一鳞片爪":"yī lín piàn zhǎo","一了百当":"yī liǎo bǎi dàng","一见了然":"yī jiàn le rán","一还一报":"yī huán yī bào","一毫不差":"yī háo bù chā","一倡百和":"yī chàng bǎi hè","一鞭先著":"yī biān xiān zhuó","一笔抹摋":"yī bǐ mò sà","一暴十寒":"yī pù shí hán","夜静更阑":"yè jìng gēng lán","叶公好龙":"yè gōng hào lóng","野调无腔":"yě diào wú qiāng","咬血为盟":"yǎo xuè wéi méng","瑶池女使":"yáo shi nǚ shǐ","幺麽小丑":"yāo mǒ xiǎo chǒu","养精畜锐":"yǎng jīng xù ruì","仰屋着书":"yǎng wū zhù shū","卬首信眉":"áng shǒu shēn méi","洋洋纚纚":"yáng yáng sǎ sǎ","羊羔美酒":"yán gāo měi jiǔ","羊肠九曲":"yáng cháng jiǔ qǔ","扬眉眴目":"yáng méi shùn mù","扬厉铺张":"yáng lì pù zhāng","扬风扢雅":"yáng fēng bào yǎ","燕子衔食":"yàn zǐ xián shí","燕昭市骏":"yān zhāo shì jùn","燕昭好马":"yān zhāo hǎo mǎ","燕石妄珍":"yān shí wàng zhēn","燕雀处屋":"yàn què chǔ wū","燕骏千金":"yān jùn qiān jīn","燕金募秀":"yān jīn mù xiù","燕驾越毂":"yān jià yuè gū","燕歌赵舞":"yān gē zhào wǔ","燕岱之石":"yān dài zhī shí","燕处焚巢":"yàn chǔ fén cháo","燕处危巢":"yàn chǔ wēi cháo","燕巢幙上":"yàn cháo yú shàng","掞藻飞声":"shǎn zǎo fēi shēng","偃革为轩":"yǎn gé wéi xuān","岩栖穴处":"yán qī xué chǔ","岩居穴处":"yán jū xué chǔ","妍蚩好恶":"yán chī hǎo è","压良为贱":"yā liáng wéi jiàn","搀行夺市":"chān háng duó shì","三十六行":"sān shí liù háng","泣数行下":"qì shù háng xià","当行出色":"dāng háng chū sè","目下十行":"mù xià shí háng","秀出班行":"xiù chū bān háng","儿女成行":"ér nǚ chéng háng","大行大市":"dà háng dà shì","十行俱下":"shí háng jù xià","寻行数墨":"xún háng shǔ mò","熏莸同器":"xún yóu tóng qì","埙篪相和":"xūn chí xiāng hè","血债累累":"xuè zhài lěi lěi","雪鸿指爪":"xuě hóng zhǐ zhǎo","衒玉贾石":"zuì yù jiǎ shí","炫玉贾石":"xuàn yù gǔ shí","炫石为玉":"xuàn shí wéi yù","旋干转坤":"xuán qián zhuǎn kūn","悬石程书":"xuán dàn chéng shū","悬狟素飡":"xuán huán sù kòu","悬龟系鱼":"xuán guī jì yú","揎拳捰袖":"xuān quán lǒng xiù","揎拳捋袖":"xuān quán luō xiù","轩鹤冠猴":"xuān hè guàn hóu","畜妻养子":"xù qī yǎng zǐ","魆风骤雨":"zhuō fēng zhòu yǔ","褎然冠首":"yòu rán guàn shǒu","羞人答答":"xiū rén dā dā","修鳞养爪":"xiū lín yǎng zhǎo","熊据虎跱":"xióng jù hǔ shēn","汹涌淜湃":"xiōng yǒng péng pai","兄死弟及":"xiōng féi dì jí","腥闻在上":"xíng wén zài shàng","兴文匽武":"xīng wén diào wǔ","兴如嚼蜡":"xìng rú jiáo là","兴观群怨":"xìng guān qún yuàn","兴高彩烈":"xìng gāo cǎi liè","心瞻魏阙":"xīn zhān wèi què","心在魏阙":"xīn zài wèi què","心同止水":"xīn rú zhǐ shuǐ","心手相应":"xīn shǒu xiāng yìng","心手相忘":"xīn shǒu xiāng wàng","心口相应":"xīn kǒu xiāng yīng","心广体胖":"xīn guǎng tǐ pán","心驰魏阙":"xīn chí wèi què","心不应口":"xīn bù yīng kǒu","挟势弄权":"jiā shì nòng quán","胁肩累足":"xié jiān lěi zú","邪魔外祟":"xié mó wai suì","敩学相长":"zuàn xué xiāng cháng","校短量长":"jiào duǎn liáng cháng","小眼薄皮":"xiǎo yǎn bó pí","小廉曲谨":"xiǎo lián qǔ jǐn","硝云弹雨":"xiāo yún dàn yǔ","鸮鸣鼠暴":"zhāng míng shǔ bào","削株掘根":"xuē zhū jué gēn","削铁无声":"xuē tiě wú shēng","削职为民":"xuē zhí wéi mín","削木为吏":"xuē mù wéi lì","削草除根":"xuē cǎo chú gēn","橡皮钉子":"xiàng pí dìng zǐ","想望风褱":"xiǎng wàng fēng shèng","香培玉琢":"xiang pei yu zuo","相与为一":"xiāng yǔ wéi yī","相鼠有皮":"xiàng shǔ yǒu pí","相时而动":"xiàng shí ér dòng","相切相磋":"xiāng qiē xiāng cuō","相女配夫":"xiàng nǚ pèi fū","相门有相":"xiàng mén yǒu xiàng","挦章撦句":"lóng zhāng zōng jù","先我着鞭":"xiān wǒ zhuó biān","习焉不察":"xī yān bù chá","歙漆阿胶":"shè qī ē jiāo","晰毛辨发":"xī máo biàn fà","悉索薄赋":"xī suǒ bó fù","雾鳞云爪":"wù lín yún zhǎo","误作非为":"wù zuò fēi wéi","物稀为贵":"wù xī wéi guì","舞爪张牙":"wǔ zhǎo zhāng yá","碔砆混玉":"zhì fū hùn yù","武断专横":"wǔ duàn zhuān héng","五石六鹢":"wǔ shí liù yī","五色相宣":"wǔ sè xiāng xuān","五侯七贵":"wǔ hòu qī guì","五侯蜡烛":"wǔ hòu là zhú","五羖大夫":"wǔ gǔ dà fū","吾自有处":"wu zi you chu","无与为比":"wú yǔ wéi bǐ","无下箸处":"wú xià zhù chǔ","无適无莫":"wú dí wú mò","无伤无臭":"wú shēng wú xiù","无能为役":"wú néng wéi yì","无寇暴死":"wu kou bào shi","无孔不钻":"wú kǒng bù zuān","无间可伺":"wú jiān kě sì","无间可乘":"wú jiān kě chéng","无间冬夏":"wú jiān dōng xià","无缝天衣":"wú féng tiān yī","无恶不为":"wú è bù wéi","无动为大":"wú dòng wéi dà","无地自处":"wú dì zì chǔ","诬良为盗":"wū liáng wéi dào","握粟出卜":"wò sù chū bo","握拳透爪":"wò quán tòu zhǎo","稳操左券":"wén cāo zuǒ quàn","闻风响应":"wén fēng xiǎng yīng","文武差事":"wén wǔ chà shì","文身剪发":"wén shēn jiǎn fā","文房四侯":"wén fáng sì hòu","温枕扇席":"wēn zhěn shān xí","温席扇枕":"wēn xí shān zhěn","温凊定省":"wēn qǐng dìng shěng","温衾扇枕":"wēn qīn shān zhěn","亹亹不倦":"tān wěi bù juàn","委委佗佗":"wēi wēi tuó tuó","委曲成全":"wěi qǔ chéng quán","尾大难掉":"wěi dà nán diào","惟所欲为":"wéi suǒ yù wéi","惟日为岁":"wéi rì wéi suì","惟利是趋":"wéi lì shì qú","帷薄不修":"wéi bó bù xiū","唯唯否否":"wěi wěi fǒu fǒu","唯所欲为":"wéi suǒ yù wéi","为蛇添足":"wéi shé tiān zú","为善最乐":"wéi shàn zuì lè","为蛇画足":"wéi shé huà zú","为山止篑":"wéi shān zhǐ kuì","为仁不富":"wéi rén bù fù","为裘为箕":"wéi qiú wéi jī","为民父母":"wéi mín fù mǔ","为虺弗摧":"wéi huǐ fú cuī","为好成歉":"wéi hǎo chéng qiàn","为鬼为蜮":"wéi guǐ wéi yù","为法自弊":"wéi fǎ zì bì","为恶不悛":"wéi è bù quān","为德不终":"wéi dé bù zhōng","煨干就湿":"wēi gàn jiù shī","煨干避湿":"wēi gàn bì shī","危于累卵":"wēi yú lěi luǎn","望风响应":"wàng fēng xiǎng yīng","望尘僄声":"wàng chén bù shēng","枉曲直凑":"wǎng qǔ zhí còu","往渚还汀":"wǎng zhǔ huán tīng","王贡弹冠":"wáng gòng dàn guàn","亡魂失魄":"wáng hún shī hún","亡国大夫":"wáng guó dà fū","万载千秋":"wàn zài qiān qiū","万贯家私":"wàn guàn ji sī","万夫不当":"wàn fū bù dāng","万别千差":"wàn bié qiān chā","晚食当肉":"wǎn shí dàng ròu","晚节不保":"wǎn jíe bù bǎo","玩岁愒月":"wán suì yī yuè","玩岁愒时":"wán suì yī shí","玩时愒日":"wán shí ài rì","蛙蟆胜负":"wā má shèng fù","吞言咽理":"tūn yán yān lǐ","颓垣断堑":"tuí yuán duàn piàn","推枯折腐":"tuī kū shé fǔ","推干就湿":"tuī gàn jiù shī","剸繁治剧":"shí fán zhì jù","剸繁决剧":"shí fán jué jù","团头聚面":"tuàn tóu jù miàn","兔走鹘落":"tù zǒu gǔ luò","兔丝燕麦":"tù sī yàn mài","兔头麞脑":"tù tóu suō nǎo","兔葵燕麦":"tù kuí yàn mài","兔角龟毛":"tu jiao gui mao","吐哺握发":"tǔ bǔ wò fà","徒讬空言":"tú tún kōng yán","投传而去":"tóu zhuàn ér qù","头足异处":"tóu zú yì chǔ","头上著头":"tóu shàng zhuó tóu","头没杯案":"tóu mò bēi àn","头昏脑闷":"tóu hūn nǎo mèn","头会箕敛":"tóu kuàn jī liǎn","头会箕赋":"tóu kuài jī fù","头出头没":"tóu chū tóu mò","痛自创艾":"tòng zì chuāng yì","痛深恶绝":"tòng shēn wù jué","同源异派":"tóng yuán yì pai","同心僇力":"tóng xīn jié lì","同工异曲":"tóng gōng yì qǔ","同恶相助":"tóng wù xiāng zhù","同恶相恤":"tóng wù xiāng xù","痌瘝在抱":"tōng guān zào bào","通文调武":"tōng wén diào wǔ","通同一气":"tōng tóng yī yì","铤鹿走险":"dìng lù zǒu xiǎn","停留长智":"tíng liú zhǎng zhì","铁树开华":"tiě shù kāi huā","条贯部分":"tiáo guàn bù fēn","挑牙料唇":"tiǎo yá liào chún","挑么挑六":"tiāo yāo tiāo liù","挑唇料嘴":"tiǎo chún liào zuǐ","靦颜事仇":"tiǎn yán shì chóu","恬不为意":"tián bù wéi yì","恬不为怪":"tián bù wéi guài","天下为笼":"tiān xià wéi lóng","天台路迷":"tiān tái lù mí","天年不遂":"tiān nián bù suì","天宝当年":"tian bao dang nian","桃蹊柳曲":"táo qī liǔ qǔ","堂皇冠冕":"táng huáng guàn miǎn","探囊胠箧":"tàn náng wú qiè","谭言微中":"tán yán wēi zhòng","谈言微中":"tán yán wēi zhòng","贪夫狥财":"tān fū huái cái","泰山盘石":"tai shān pán shí","泰来否往":"tài lái pǐ wǎng","泰来否极":"tai lái fǒu jí","泰极而否":"tài jí ér pǐ","狧穅及米":"shì kǎn jí mǐ","损军折将":"sǔn jūn zhé jiàng","遂心应手":"suì xīn yīng shǒu","遂迷不窹":"suí méi bù wù","岁月不居":"suì yuè bù jú","岁聿其莫":"suì yù qí mù","随物应机":"suí wù yīng jī","随风而靡":"suí fēng ér mǐ","宿雨餐风":"xiǔ yǔ cān fēng","宿水飡风":"xiǔ shuǐ cān fēng","宿水餐风":"xiǔ shuǐ cān fēng","夙兴夜处":"sù xīng yè chǔ","搜岩采干":"sōu yán cǎi gàn","薮中荆曲":"sǒu zhōng jí qǔ","宋斤鲁削":"sòng jīn lǔ xuē","松筠之节":"sōng jūn zhī jié","騃童钝夫":"ái tóng dùn fū","騃女痴男":"ái nǚ chī nán","四亭八当":"sì tíng bā dàng","四马攒蹄":"sì mǎ cuán tí","四不拗六":"sì bù niù liù","斯事体大":"ī shì tǐ dà","思所逐之":"si shuo zhu zi","丝恩发怨":"sī ēn fà yuàn","硕望宿德":"shuò wàng xiǔ dé","铄古切今":"shuò gǔ qiē jīn","顺天应时":"shùn tiān yīng shí","顺风转舵":"shǔn fēng zhuǎn duò","顺风驶船":"shǔn fēng shǐ chuán","顺风使船":"shǔn fēng shǐ chuán","顺风而呼":"shǔn fēng ér hū","顺风吹火":"shǔn fēng chuī huǒ","水中捉月":"shui zhong zhuo yue","水中著盐":"shuǐ zhōng zhuó yán","水宿风餐":"shuǐ xiǔ fēng cān","水米无干":"shuǐ mǐ wú gàn","水长船高":"shuǐ zhǎng chuán gāo","双足重茧":"shuāng zú chóng jiǎn","双柑斗酒":"shuài gān dǒu jiǔ","数米而炊":"shǔ mǐ ér chuī","数往知来":"shǔ wǎng zhī lái","数米量柴":"shǔ mǐ ér chái","数理逻辑":"shù lǐ luó ji","数见不鲜":"shuò jiàn bù xiān","数黄道黑":"shu huang dao hei","数黑论黄":"shǔ hēi lùn huáng","数短论长":"shǔ duǎn lùn cháng","数白论黄":"shǔ bái lùn huáng","束缊还妇":"shù yūn huán fù","束缊举火":"shù yūn jǔ huǒ","束身自好":"shù shēn zì hào","束蒲为脯":"shù pú wéi pú","束带结发":"shù dài jié fā","束椽为柱":"shù chuán wéi zhù","书缺有间":"shū quē yǒu jiàn","瘦骨梭棱":"shòu gǔ léng léng","首足异处":"shǒu zú yì chǔ","手足重茧":"shǒu zú chóng jiǎn","手足异处":"shǒu zú yì chǔ","手脚干净":"shǒu jiǎo gàn jìng","手不应心":"shǒu bù yīng xīn","螫手解腕":"shì shǒu jǐe wǎn","释知遗形":"shì shì yí xíng","适时应务":"shì shí yīng wù","适如其分":"shì rú qí fèn","适情率意":"shì qíng shuài yì","适居其反":"shì jú qí fǎn","适当其时":"shì dāng qí shí","适当其冲":"shì dāng qí chōng","饰非遂过":"shì fēi suí guò","视为知己":"shì wéi zhī jǐ","视为儿戏":"shì wéi ér xì","视微知著":"shì wēi zhī zhuó","事与心违":"shì yù xīn wéi","使羊将狼":"shǐ yáng jiàng láng","食为民天":"shí wéi mín tiān","食不重味":"shí bù chóng wèi","食不重肉":"shí bù zhóng ròu","拾掇无遗":"shi duo wu yi","拾带重还":"shí dài zhòng huán","实与有力":"shí yù yǒu lì","实偪处此":"shí bèng chǔ cǐ","识微知著":"shí wēi zhī zhuó","时运不齐":"shí yùn bù jì","时亨运泰":"shí hēng yùn tai","石英玻璃":"shí yīng bō li","石室金匮":"shí shì jīn guì","什袭珍藏":"shí xí zhēn cáng","什袭以藏":"shí xí yǐ cáng","什伍东西":"shí wǔ dōng xī","什袭而藏":"shí xī ér cáng","什围伍攻":"shí wéi wǔ gōng","十魔九难":"shí mó jiǔ nàn","十夫楺椎":"shí fū zhī zhuī","十不当一":"shí bù huò yī","诗书发冢":"shī shū fà zhǒng","虱处裈中":"shī chǔ kūn zhōng","师直为壮":"shī zhí wéi zhuàng","失马塞翁":"shī mǎ sài wēng","尸居龙见":"shī jū lóng xiàn","盛水不漏":"chéng shuǐ bù lòu","圣经贤传":"shèng jīng xián zhuàn","圣君贤相":"shèng jīng xián xiàng","生拖死拽":"shēng tuō sǐ zhuāi","审曲面埶":"shěn qǔ miàn xīn","审己度人":"shěn jǐ duó rén","沈博绝丽":"chén bó jué lì","神武挂冠":"shén wǔ guà guàn","神龙失埶":"shén lóng shī zhì","神号鬼哭":"shén háo guǐ kū","神不收舍":"shén bù shōu shě","深文周内":"shēn wén zhōu nà","深文曲折":"shēn wén qǔ shé","深切着明":"shēn qiē zhe míng","深切着白":"shēn qiē zhe bái","深厉浅揭":"shēn lì qiǎn qì","深谷为陵":"shēn gǔ wéi líng","深恶痛疾":"shēn wù tòng jí","深恶痛嫉":"shēn wù tòng jí","深仇宿怨":"shēn chóu xiǔ yuàn","设心处虑":"shè xīn chǔ lǜ","舍近务远":"shě jìn wù yuǎn","舍己为公":"shě jǐ wèi gōng","舍近即远":"shě jìn jí yuǎn","舍短取长":"shě duǎn qǔ cháng","舍策追羊":"shě cè zhuī yáng","蛇蝎为心":"shé xiē wéi xīn","少年老诚":"shǎo nián lǎo chéng","少成若性":"shào chéng ruò xìng","少不经事":"shào bù jīng shì","上当学乖":"shàng dāng xué guāi","赏不当功":"shǎng bù dāng gōng","善自为谋":"shàn zì wéi móu","善为说辞":"shàn wéi shuō cí","善善恶恶":"shàn shàn wù è","善贾而沽":"shàn jià ér gū","善财难舍":"shàn cái nán shě","扇枕温席":"shān zhěn wēn xí","扇枕温被":"shān zhěn wēn chuáng","苫眼铺眉":"shān yǎn pū méi","讪牙闲嗑":"shàn yá xián kē","山峙渊渟":"shān zhì yuān zī","山阴乘兴":"shān yīn chéng xīng","山殽野湋":"shān yāo yě fù","山溜穿石":"shān liù chuān shí","山节藻棁":"shān jié zǎo lì","沙鸥翔集":"sha ou xiang ji","杀衣缩食":"shài yī suō shí","杀鸡为黍":"shā jī wéi shǔ","色厉胆薄":"sè lì dǎn bó","丧胆销魂":"sàng hún xiāo hún","桑荫未移":"sāng yīn wèi yí","桑荫不徙":"sāng yīn bù xǐ","桑土绸缪":"sāng tǔ chóu miù","桑户棬枢":"sāng hù juàn shū","三战三北":"sān zhān sān běi","三占从二":"sān zhān cóng èr","三瓦两舍":"sān wǎ liǎng shě","三人为众":"sān rén wèi zhòng","三差五错":"sān chā wǔ cuò","三差两错":"sān chā liǎng cuò","三不拗六":"sān bù niù liù","塞翁之马":"sài wēng zhī mǎ","塞翁得马":"sài wēng dé mǎ","塞井焚舍":"sāi jǐng fén shě","洒心更始":"sǎ xīn gèng shǐ","洒扫应对":"sǎ sào yìng duì","软红香土":"ruǎn hóng xiāng yù","入孝出弟":"rù xiào chū tì","入吾彀中":"rù wǔ gòu zhōng","入铁主簿":"rù tiě zhǔ bù","入理切情":"rù lǐ qiē qíng","汝成人耶":"nu cheng ren ye","如水投石":"rú shǔ tóu shí","如切如磋":"rú qiē rú cuō","如登春台":"rú dé chūn tái","肉薄骨并":"ròu bó gǔ bìng","柔情绰态":"róu qíng chuō tai","戎马劻勷":"róng mǎ dān xiào","日朘月削":"rì juān yuè xuē","日中为市":"rì zhōng wéi shì","日中必湲":"rì zhōng bì tóng","日月参辰":"rì yuè shēn chén","日省月修":"rì xǐng yuè xiū","日削月割":"rì xuē yuè gē","日削月朘":"rì xuē yuè juān","日省月试":"rì xǐng yuè shì","日省月课":"rì xǐng yuè kè","日不暇给":"rì bù xiá jǐ","认贼为父":"rèn zéi wéi fù","任达不拘":"rèn láo bù jū","认影为头":"rèn yǐng wéi tóu","认贼为子":"rèn zéi wéi zǐ","人足家给":"rén zú jiā jǐ","人言藉藉":"rén yán jí jí","人模狗样":"rén mú gǒu yàng","人莫予毒":"rén mò yú dú","人给家足":"rén jǐ jiā zú","热熬翻饼":"rě áo fān bǐng","群居穴处":"qún jū xué chǔ","却老还童":"què lǎo huán tóng","权倾中外":"quán qīng zhōng wai","圈牢养物":"juàn láo yǎng wù","去太去甚":"qù tai qù shèn","取予有节":"qǔ yù yǒu jié","诎要桡腘":"qū yào ráo yù","曲终奏雅":"qǔ zhōng zòu yǎ","曲意迎合":"qǔ yì yíng hé","曲意奉迎":"qǔ yì fèng yíng","曲意承迎":"qǔ yì chéng yíng","曲学阿世":"qǔ xué ā shì","曲突移薪":"qǔ tū yí xīn","曲眉丰颊":"qǔ méi fēng jiá","曲肱而枕":"qǔ gōng ér zhěn","秋实春华":"qiū shí chūn huā","穷形尽相":"qióng xíng jìn xiàng","穷年累世":"qióng nián lěi shì","情凄意切":"qíng qī yì qiē","情见埶竭":"qíng jiàn zhōu jié","情见势屈":"qíng xiàn shì qū","情见力屈":"qíng xiàn lì qū","情见乎辞":"qíng xiàn hū cí","清风劲节":"qīng fēng jìng jié","清都绛阙":"qīng dōu jiàng què","清辞丽曲":"qīng cí lì qǔ","倾肠倒肚":"qīng cháng dào dǔ","轻嘴薄舌":"qīng zuǐ bó shé","轻傜薄赋":"qīng yāo báo fù","轻骑简从":"qīng jì jiǎn cóng","轻财好义":"qīng cái hào yì","轻薄无知":"qīng báo wú zhī","轻才好施":"qīng cái hào shī","轻薄无礼":"qīng báo wú lǐ","青紫被体":"qīng zǐ pī tǐ","青林黑塞":"qīng lín hēi sài","青红皁白":"qīng hóng tóu bái","寝苫枕干":"qǐn shān zhěn gàn","螓首蛾眉":"qín shǒu ér méi","擒奸擿伏":"qín jiān fā fú","琴瑟之好":"qí sè zhī hǎo","挈瓶之知":"qiè píng zhī zhì","且住为佳":"qiě zhù wéi jiā","切树倒根":"qiē shù dǎo gēn","切理餍心":"qiē lǐ yàn xīn","切理厌心":"qiē lǐ yàn xīn","切理会心":"qiē lǐ huì xīn","切近的当":"qiē jìn de dāng","切瑳琢磨":"qiē cùn zhuó mó","翘足引领":"qiáo zú yǐn lǐng","翘足而待":"qiáo zú ér dài","巧发奇中":"qiǎo fā qí zhòng","抢地呼天":"qiāng dì hū tiān","强嘴拗舌":"jiàng zuǐ niù shé","强自取折":"qiáng zì qǔ shé","强直自遂":"qiáng zhí zì suí","强文浉醋":"qiǎng wén jiǎ cù","强文假醋":"qiǎng wén jiǎ cù","强死强活":"qiǎng sǐ qiǎng huó","强死赖活":"qiǎng sǐ lài huó","强食自爱":"qiǎng shí zì ài","强食靡角":"qiǎng shí mí jiǎo","强识博闻":"qiǎng shí bó wén","强弓劲弩":"qiáng gōng jìng nǔ","强聒不舍":"qiǎng guō bù shě","强凫变鹤":"qiǎng fú biàn hè","强而后可":"qiǎng ér hòu kě","强词夺正":"qiǎng cí duó zhèng","强得易贫":"qiǎng dé yì pín","遣兴陶情":"qiǎn xìng táo qíng","遣将调兵":"qiǎn jiāng diào bīng","遣兵调将":"qiǎn bīng diào jiàng","前跋后疐":"qián bá hòu máo","搴旗斩将":"qiān qí zhǎn jiàng","搴旗取将":"qiān qí qǔ jiàng","牵羊担酒":"qiān yáng dàn jiǔ","牵强附合":"qiān qiáng fù hé","千姿万态":"qiān zī wàn tai","千状万态":"qiān zhuàng wàn tai","千载一合":"qiān zài yī hé","千载一弹":"qiān zǎi yī dàn","千态万状":"qiān tai wàn zhuàng","千磨百折":"qiān mó bǎi shé","千了万当":"qiān le wàn dàng","千了百当":"qiān liǎo bǎi dàng","千古绝调":"qiān gǔ jué diào","泣下如雨":"qǐ xià rú yǔ","弃之度外":"qì zhī dù wai","气克斗牛":"qì kè dǒu niú","起偃为竖":"qǐ yǎn wéi shù","岂弟君子":"kǎi tì jūn zǐ","綦溪利跂":"qí xī lì guì","棋输先着":"qí shū xiān zhāo","棋输先著":"qí shū xiān zhuó","奇葩异卉":"qí pā yì hùi","齐王舍牛":"qí wáng shě niú","齐量等观":"qí liàng děng guān","欺天诳地":"qī tiān kuāng dì","栖风宿雨":"qī fēng xiǔ yǔ","妻梅子鹤":"qī mén zǐ hè","妻儿老少":"qī ér lǎo shǎo","普天率土":"pǔ tiān shuài tǔ","铺胸纳地":"pū xiōng nà dì","铺眉苫眼":"pū méi shàn yǎn","铺眉蒙眼":"pū méi méng yǎn","铺锦列绣":"pū jǐn liè xiù","破矩为圆":"pò jǔ wéi yuán","破镜重合":"pò jìng zhòng hé","破家为国":"pò jiā wéi guó","破觚为圜":"pò gū wéi yuán","破愁为笑":"pò chóu wéi xiào","瓶坠簪折":"píng zhùi zān zhé","萍飘蓬转":"píng piāo péng zhuàn","帡天极地":"jú tiān jí dì","屏声息气":"bǐng shēng xī qì","屏气吞声":"bǐng qì tūn shēng","凭几据杖":"píng jī jù zhàng","娉婷婀娜":"pīng tíng ē nà","品竹调弦":"pǐn zhú diào xián","贫嘴薄舌":"pín zuǐ bó shé","骈肩累足":"pián jiān lěi zú","骈肩累迹":"pián jiān lěi jì","翩翩年少":"piān piān nián shǎo","片语只辞":"piàn yán zhǐ cí","片鳞半爪":"piàn lín bàn zhǎo","片甲不还":"piàn jiǎ bù huán","披发缨冠":"pī fā yīng guàn","披发文身":"pī fà wén shēn","批砉导窾":"pī huā dǎo táo","批隙导窾":"pī xì dǎo yín","批吭捣虚":"pī háng dǎo xū","批风抹月":"pī fēng mò yuè","烹龙炮凤":"pēng lóng páo fèng","炰鳖脍鲤":"fèng biē kuài lǐ","炮凤烹龙":"páo fèng pēng lóng","旁指曲谕":"páng zhǐ qǔ yù","旁引曲证":"páng yǐn qǔ zhèng","旁通曲畅":"páng tōng qǔ chàng","庞眉皓发":"páng méi hào fà","攀花折柳":"pān huā shé liǔ","攀蟾折桂":"pān chán shé guì","女大难留":"nǚ dà nán liú","女长须嫁":"nǚ zhǎng xū jià","女长当嫁":"nǚ zhǎng dāng jià","弄竹弹丝":"nòng zhú dàn sī","弄玉吹箫":"nòng yù chuí xiāo","弄管调弦":"nòng guǎn diào xián","弄粉调朱":"nòng fěn diào zhū","弄兵潢池":"nòng bīng huáng shi","浓装艳抹":"nóng zhuāng yàn mò","浓抹淡妆":"nóng mò dàn zhuāng","扭转干坤":"niǔ zhuǎn gàn kūn","扭直作曲":"niǔ zhí zuò qū","牛骥同皁":"niú jì tóng wěn","宁缺勿滥":"nìng quē wù làn","啮血为盟":"niè xuè wéi méng","捻土为香":"niǎn tǔ wéi xiāng","年谊世好":"nián yì shì hào","年华垂暮":"nián huá thuí mù","儗不于伦":"lǐ bù yú lún","泥名失实":"nì míng shī shí","泥而不滓":"niè ér bù zǐ","能者为师":"néng zhě wéi shī","能不称官":"néng bù chèn guān","挠直为曲":"náo zhí wéi qū","囊萤照读":"náng yíng zhào shū","难进易退":"nan jin yi tui","难乎为继":"nán hū wéi jì","难乎为情":"nán hū wéi qíng","难更仆数":"nán gēng pú shǔ","难得糊涂":"nán dé hú tú","南蛮鴂舌":"nán mán xiāng shé","南贩北贾":"nán fàn běi gǔ","内修外攘":"nèi xiū wai rǎng","内柔外刚":"nèi róu wai gāng","内峻外和":"nèi jùn wai hé","拿腔作调":"ná qiāng zuò diào","拿粗夹细":"ná cū jiā xì","慕古薄今":"mù gǔ bó jīn","牧猪奴戏":"mù zhòu nú xì","沐猴衣冠":"mù hóu yī guàn","目眢心忳":"mù yuān xīn wǎng","目挑心招":"mù tiǎo xīn zhāo","目空余子":"mù kōng yú zǐ","目量意营":"mù liàng yì yíng","目瞪舌彊":"mù dèng shé jiàng","木头木脑":"mù tóu mù nǎo","木干鸟栖":"mù gàn niǎo qī","侔色揣称":"móu sè chuǎi chèn","莫知所为":"mò zhī suǒ wéi","莫予毒也":"mò yù dú yě","莫为已甚":"mò wéi yǐ shèn","抹月秕风":"mǒ yuè pī fēng","抹粉施脂":"mò fěn shī zhī","磨砻镌切":"mó lóng juān qiē","磨棱刓角":"mó léng liǎng jiǎo","摸头不着":"mō tóu bù zháo","摸门不着":"mō mén bù zháo","摸不着边":"mō bù zhuó biān","命中注定":"mìng zhōng zhù dìng","鸣鹤之应":"míng hè zhī yīng","鸣凤朝阳":"míng fèng zhāo yáng","明效大验":"míng xiào dà yà","名我固当":"ming wo gu dang","灭景追风":"miè yǐng zhuī fēng","邈处欿视":"miǎo chǔ jī shì","面折庭争":"miàn shé tíng zhēng","俛拾地芥":"bì shí dì jiè","俛首帖耳":"mǎ shǒu tiē ěr","黾穴鸲巢":"měng xué qú cháo","绵力薄材":"mián lì bó cái","绵里薄材":"mián lǐ bó cái","靡有孑遗":"mǐ yǒu jié yí","靡衣媮食":"mǐ yī tōu shí","靡衣偷食":"mǐ yī tōu shí","靡然从风":"mǐ rán cóng fēng","靡靡之乐":"mǐ mǐ zhī yuè","迷恋骸骨":"mí liàn hài gǔ","蒙头转向":"mēng tóu zhuàn xiàng","闷海愁山":"mèn hǎi chóu shān","扪参历井":"mén shēn lì jǐng","门单户薄":"mén dān hù bó","昧旦晨兴":"mèi dàn chún xīng","没衷一是":"mò zhōng yī shì","没金饮羽":"mò jīn yǐn yǔ","冒名接脚":"mào míng jiě jiǎo","毛头小子":"máo tóu xiǎo zi","毛遂堕井":"máo suí duò jǐng","毛发耸然":"máo fā sǒng rán","毛发倒竖":"máo fā dǎo shù","毛发不爽":"máo fā bù shuǎng","猫鼠同处":"māo shǔ tóng chǔ","尨眉皓发":"máng méi hào fà","漫天遍地":"màn shān biàn dì","脉脉相通":"mài mài xiāng tōng","卖文为生":"mài wén wéi shēn","卖李钻核":"mài lǐ zuān hé","买椟还珠":"mǎi dú huán zhū","埋天怨地":"mán tiān yuàn dì","埋三怨四":"mán sān yuàn sì","马上房子":"mǎ shàng fáng zi","马入华山":"mǎ rù huá shān","落魄江湖":"luò pò jīng hú","落魄不偶":"luo tuo bu ou","落魄不羁":"luò pò bù jī","落落难合":"luò luò nán hé","落草为寇":"luò cǎo wéi kòu","裸裎袒裼":"luǒ chéng tǎn xī","罗织构陷":"luò zhī gòu xiàn","捋袖揎拳":"luō xiù xuān quán","论黄数黑":"lùn huáng shǔ hēi","乱作胡为":"luàn zuò hú wéi","乱箭攒心":"luàn jiàn cuán xīn","鸾凤和鸣":"luán fèng hè míng","绿叶成荫":"lǜ yè chéng yīn","绿女红男":"lǜ nǚ hóng nán","率由旧章":"shuài yóu jiù zhāng","率由旧则":"shuài yóu jiù zé","率以为常":"shuài yǐ wéi cháng","率土宅心":"shuài tǔ zhái xīn","率土同庆":"shuài tǔ tóng qìng","率兽食人":"shuài shòu shí rén","率土归心":"shuài tǔ guī xīn","率马以骥":"shuài mǎ yǐ jì","率尔成章":"shuài ěr chéng zhāng","履薄临深":"lǚ bó lín shēn","鲁斤燕削":"lǔ jīn yàn xuē","露面抛头":"lù miàn pāo tóu","漏尽更阑":"lòu jìn gēng lán","笼鸟槛猿":"lóng niǎo jiàn yuán","笼鸟池鱼":"lóng niǎo shi yú","龙游曲沼":"long you qu zhao","龙血玄黄":"lóng xuě xuán huáng","龙雕凤咀":"lóng diāo fèng jǔ","六神不安":"liù shén bǔ ān","六尺之讬":"liù chǐ zhī quàn","柳巷花街":"liǔ xiòng huā jiē","柳街花巷":"liǔ jiē huā xiòng","柳骨颜筋":"jiǔ gǔ yán jīn","流离颠疐":"liú lí diān shǔ","令原之戚":"líng yuán zhī qī","令人捧腹":"lìng rén pěng fǔ","陵劲淬砺":"líng jìng cuì lì","临难不惧":"lín nàn bù jǔ","临敌易将":"lín dí yì jiàng","裂裳衣疮":"liè sháng yī chuāng","裂裳裹足":"liè cháng guǒ zú","裂冠毁冕":"liè guàn huǐ miǎn","埒才角妙":"liè cái jué miào","了无惧色":"liǎo wū jǔ sè","了身达命":"liǎo shēn dá mìng","了然无闻":"le rán wú wén","了不可见":"liǎo bù kě jiàn","了不长进":"liǎo bù zhǎng jǐn","燎如观火":"liǎo rú guān huǒ","燎发摧枯":"liǎo fà cuī kū","量小力微":"liàng xiǎo lì wēi","量时度力":"liàng shí dù lì","量枘制凿":"liàng ruì zhì záo","量入计出":"liàng rù jì chū","量如江海":"liàng rú jiāng hǎi","量力度德":"liàng lì duó dé","量金买赋":"liàng jīn mǎi fù","量己审分":"liàng jǐ shěn fēn","量材录用":"liàng cái lù yòng","量才器使":"liàng cái qì shǐ","量才而为":"liàng cái ér wéi","梁孟相敬":"liáng mèng xiāng jìn","恋恋难舍":"liàn liàn nán shě","敛声屏息":"liǎn shēng bǐng xī","敛骨吹魂":"liǎn gǔ chuí hún","联篇累牍":"lián piān lěi dú","连编累牍":"lián biān lěi dú","詈夷为跖":"lì yí wéi zhí","利令志惛":"lì lìng zhì zào","历精为治":"lì jīng wéi zhì","历精更始":"lì jīng gèng shǐ","哩哩罗罗":"li li luō luō","李广不侯":"lǐ guǎng bù hòu","礼为情貌":"lǐ wéi qíng mào","礼让为国":"lǐ ràng wéi guó","礼坏乐崩":"lǐ huài yuè bēng","犁庭扫闾":"lí tíng sǎo lǚ","犁生骍角":"lí shēng yuè jiǎo","犁牛骍角":"lí niú mài jiǎo","离山调虎":"lí shān diào hǔ","离本趣末":"lí běn qū mò","离本徼末":"lí běn yāo mò","楞眉横眼":"lèng méi héng yǎn","擂天倒地":"léi tiān dǎo dì","累足成步":"lěi zú chéng bù","累月经年":"lěi yuè jīng nián","累屋重架":"lěi wū chóng jià","累瓦结绳":"lěi wǎ jié shéng","累土至山":"lěi tǔ zhì shān","累土聚沙":"lěi tǔ jù shā","累苏积块":"lěi sū jī kuài","累卵之危":"lěi luǎn zhī wēi","累累如珠":"lěi lěi rú zhū","累块积苏":"lěi kuài jī sū","累教不改":"lěi jiào bù gǎi","累牍连篇":"lěi dú lián piān","乐山乐水":"yào shān yào shuǐ","潦原浸天":"lǎo yuán jìn tiān","老师宿儒":"lǎo shī xiǔ rú","牢什古子":"láo shí gǔ zi","琅嬛福地":"láng huán fú dì","狼号鬼哭":"láng háo guǐ kū","狼飡虎咽":"láng cān hǔ yān","阑风长雨":"lán fēng zhàng yǔ","拉枯折朽":"lā kū shé xiǔ","揆情度理":"kuí qíng duó lǐ","揆理度情":"kuí lǐ duó qíng","窥间伺隙":"kuī jiàn sì xì","旷日累时":"kuàng rì lěi shí","匡救弥缝":"kuāng jiù mí fèng","枯树生华":"kū shù shēng huā","口轻舌薄":"kǒu qīng shé bó","口角生风":"kǒu jiǎo shēng fēng","口角春风":"kǒu jiǎo chūn fēng","口角风情":"kǒu jiǎo fēng qíng","口干舌焦":"kǒu gàn shé jiāo","口腹之累":"kǒu fù zhī lěi","口出大言":"kǒu chū dā yán","空腹便便":"kōng fù pián pián","嗑牙料嘴":"kē yá liào zuǐ","刻木为吏":"kè mù wéi lì","刻木为鹄":"kè mù wéi hú","咳珠唾玉":"ké zhū tuò yù","咳唾成珠":"ké tuò chéng zhū","抗颜为师":"kàng yán wéi shī","糠豆不赡":"kang dou bu shan","开华结果":"kāi huā jié guǒ","峻阪盐车":"jùn bǎn yún chē","攫为己有":"jué wéi jǐ yǒu","嚼铁咀金":"jiáo tiě jǔ jīn","嚼墨喷纸":"jué mò pēn zhǐ","倔头强脑":"juè tóu jiàng nǎo","倔头倔脑":"juè tou juè nǎo","倦鸟知还":"juàn niǎo zhī huán","卷席而葬":"juǎn xí ér zàng","卷旗息鼓":"juǎn qí xī gǔ","卷甲倍道":"juǎn jiǎ bèi dào","聚米为山":"jù mǐ wéi shān","聚米为谷":"jù mǐ wéi gǔ","锯牙钩爪":"jù yá gōu zhǎo","举手相庆":"jǔ shǒu xiāng qìng","举世混浊":"jǔ shì hún zhuó","鞫为茂草":"jū wéi mào cǎo","鞠为茂草":"jū wéi mào cǎo","拘神遣将":"jū shén qiǎn jiàng","居轴处中":"jū zhóu chǔ zhōng","居下讪上":"jú xià shàn shàng","居不重茵":"jū bù chóng yīn","居不重席":"jū bù chóng xí","旧事重提":"jiù shì zhòng tí","旧调重弹":"jiù diào chóng tán","灸艾分痛":"jiù ài fēn tòng","久要不忘":"jiǔ yāo bù wàng","九转功成":"jiǔ zhuàn gōng chéng","九蒸三熯":"jiǔ zhēng sān shēng","敬业乐群":"jìng yè yào qún","井底虾蟆":"jǐng dǐ xiā má","旌旗卷舒":"jīng qí juǎn shū","惊魂落魄":"jīng hún luò pò","荆棘载途":"jīng jí zài tú","荆棘塞途":"jīng jí sè tú","经纶济世":"jing lun ji shi","禁舍开塞":"jìn shě kāi sāi","祲威盛容":"lóng wēi shèng róng","进退中度":"jìn tuì zhòng dù","进退消长":"jìn tuì xiāo cháng","进退应矩":"jìn tuì yīng jǔ","进退触籓":"jìn tuì chù zǔ","进退出处":"jìn tuì chū chǔ","进退跋疐":"jìn tuì bá zǔ","进寸退尺":"jǐn cùn tuì chǐ","尽多尽少":"jǐn duō jǐn shǎo","锦囊还矢":"jǐn náng huán shǐ","矜名嫉能":"jīn míng jì néng","矜己自饰":"jīn jǐ zhì shì","矜功负气":"jīn gōng fǔ qì","津关险塞":"jīn guān xiǎn sài","金吾不禁":"jīn wú bù jìn","金匮石室":"jīn guì shí shì","金翅擘海":"jīn chì bāi hǎi","戒奢宁俭":"jiè shē nìng jiān","解衣衣人":"jiè yī yī rén","解人难得":"jiě rén nán dé","解铃系铃":"jiě líng jì líng","解发佯狂":"jiě fà yáng kuáng","截铁斩钉":"jié tiě zhǎn dìng","诘屈謷牙":"jié qū dà yá","诘屈磝碻":"jié qū bìng zhòu","诘曲聱牙":"jié qǔ áo yá","教一识百":"jiāo yī shí bǎi","教猱升木":"jiāo náo shēng mù","较瘦量肥":"jiào shòu liàng féi","矫矫不群":"jiǎo jiǎo bù qùn","矫国更俗":"jiǎo guó gēng sú","皎阳似火":"jiǎo yáng shì huǒ","挢抂过正":"jiǎo kuāng guò zhèng","角立杰出":"jiao li jie chu","焦沙烂石":"jiāo shā shí làn","焦唇干舌":"jiāo chún gàn shé","骄泰淫泆":"jiāo tai yín zhuàng","骄奢淫泆":"jiāo shē yín yí","骄儿騃女":"jiāo ér bā nǚ","浇风薄俗":"jiāo fēng bó sú","降妖捉怪":"xiáng yāo zhuō guài","将遇良材":"jiàng yù liáng cái","将取固予":"jiāng qǔ gū yǔ","将门有将":"jiàng mén yǒu jiàng","将功折过":"jiāng gōng shé guò","将夺固与":"jiāng duó gū yǔ","将伯之助":"qiāng bó zhī zhù","将伯之呼":"qiāng bó zhī hū","槛花笼鹤":"jiàn huā lóng hè","鉴影度形":"jiàn yǐng duó xíng","渐不可长":"jiàn bù kě zhǎng","剑首一吷":"jiàn shǒu yī guī","见义敢为":"jiàn yì gǎn wéi","见义当为":"jiàn yì dāng wéi","见义必为":"jiàn yì bì wéi","见素抱朴":"xiàn sù bào pǔ","见弃于人":"jiàn qì yǔ rén","见几而作":"jiàn jī ér zuò","见弹求鸮":"jiàn dàn qiú háo","简丝数米":"jiǎn sī shǔ mǐ","俭不中礼":"jiǎn bù zhòng lǐ","间见层出":"jiàn xiàn céng chū","间不容息":"jiàn bù róng xī","间不容瞚":"jiān bù róng xǐ","尖嘴薄舌":"jiān zuǐ bó shé","假洋鬼子":"jiǎ yáng guǐ zi","甲冠天下":"jiǎ guàn tiān xià","葭莩之亲":"jiā fú zhī qīn","家无担石":"jiā wú dàn shí","家累千金":"jiā lèi qiān jīn","家给人足":"jiā jǐ rén zú","家给民足":"jiā jǐ mín zú","家道从容":"jiā dào cōng róng","家长礼短":"jiā cháng lǐ duǎn","夹枪带棍":"jiā qiāng dài gùn","夹袋人物":"jiā dài rén wù","霁风朗月":"jī fēng lǎng yuè","寄兴寓情":"jì xìng yù qíng","纪纲人论":"jì gāng rén lún","计深虑远":"jì shēng lǜ yuǎn","计功量罪":"jì gōng liàng zuì","掎裳连襼":"jǐ shang lián zhēng","虮虱相吊":"jǐ shī xiēng diào","几不欲生":"jī bù yù shēng","集腋为裘":"jí yè wéi qiú","疾不可为":"jí bù kě wéi","急脉缓灸":"jí mài huǎn jiù","急景凋年":"jí yǐng diāo nián","急公好施":"jí gōng hào shī","极深研几":"jí shēn yán jī","及宾有鱼":"jí bīn yoǔ yú","激薄停浇":"jī bó tíng jiāo","稽古揆今":"jī gǔ zhèn jīn","赍志而没":"jī zhì ér mò","积铢累寸":"jī zhū lěi cùn","积岁累月":"jī suì lěi yuè","积素累旧":"jī sù lěi jiù","积时累日":"jī shí lěi rì","积日累岁":"jī rì lěi suì","积日累月":"jī rì lěi yuè","积日累久":"jī rì lěi jiǔ","积年累岁":"jī nián lěi suì","积露为波":"jī lù wéi bō","积德累仁":"jī dé lěi rén","积德累善":"jī dé lěi shàn","积德累功":"jī dé lěi gōng","积谗糜骨":"jī chán méi gǔ","鸡皮鹤发":"jī pí hè fà","饥寒交切":"jī hán jiāo qiē","饥冻交切":"jī dòng jiāo qiē","击排冒没":"jī pái mào mò","祸为福先":"huò wéi fú xiān","祸福相依":"huò fú xiāng yī","祸福相生":"huò fú xiāng shēng","获隽公车":"huò jūn gōng chē","货而不售":"huo er bu shou","混应滥应":"hùn yīng làn yīng","魂飞魄丧":"hún fēi pò sāng","魂不着体":"hún bù zhuó tǐ","魂不著体":"hún bù zhuó tǐ","浑抡吞枣":"hún lún tūn zǎo","昏迷不省":"hūn mí bù xǐng","昏镜重磨":"hūn jìng chóng mó","昏镜重明":"hūn jìng chóng míng","昏定晨省":"hūn dìng chén xǐng","毁舟为杕":"huǐ zhōu wéi duò","毁钟为铎":"huǐ zhōng wéi duó","毁冠裂裳":"huǐ guān liè cháng","晦盲否塞":"huì máng pǐ sè","诲人不惓":"huì rén bù tiě","悔过自责":"huǐ guò zì zè","回船转舵":"huí chuán zhǎn duò","潢池盗弄":"huáng shi dào nòng","黄冠野服":"huáng guàn yě fú","黄冠草履":"huáng guàn cǎo lǚ","黄冠草服":"huáng guàn cǎo fú","黄发儿齿":"huáng fà ér chǐ","黄发垂髫":"huáng fà chuí tiáo","还珠合浦":"huán zhū hé pǔ","还珠返璧":"huán zhū fǎn bì","还元返本":"huán yuán fǎn běn","还朴反古":"huán pǔ fǎn gǔ","还年驻色":"huán nián zhù sè","还年却老":"huán nián què lǎo","还年卻老":"huán nián què lǎo","还醇返朴":"huán chún fǎn pǔ","还淳返朴":"huán chún fǎn pǔ","还淳反素":"huán chún fǎn sù","还淳反朴":"huán chún fǎn pǔ","还淳反古":"huán chún fǎn gǔ","坏裳为裤":"huài shang wéi kù","槐南一梦":"huái nán yī mēng","画蛇著足":"huà shé zhuó zú","画地为狱":"huà dì wéi yù","画荻和丸":"huà dí huò wán","化枭为鸠":"huà xiāo wéi jiū","化零为整":"huà líng wéi zhěng","化腐为奇":"huà fǔ wéi qí","化鸱为凤":"huà chī wéi fèng","华亭鹤唳":"huà tíng hè lì","花攒锦聚":"huā cuán jǐn jù","花攒锦簇":"huā cuán jǐn cù","花簇锦攒":"huā cù jǐn cuán","花不棱登":"huā bù lēng dēng","户限为穿":"hù xiàn wéi chuān","胡作乱为":"hú zuò luàn wéi","胡作胡为":"hú zuò hú wéi","胡思乱量":"hú sī luàn liàng","呼天吁地":"hū tiān yù dì","呼卢喝雉":"hū lú hè zhì","呼来喝去":"hū lái hè qù","呼不给吸":"hū bù jǐ xī","厚味腊毒":"hòu wèi xī dú","厚今薄古":"hòu jīn bó gǔ","厚德载物":"hòu dé zài wù","鸿泥雪爪":"hóng ní xuě zhǎo","鸿渐于干":"hóng jiàn yú gàn","鸿飞雪爪":"hóng fēi xuě zhǎo","洪炉燎发":"hóng lú liáo fà","红绳系足":"hóng shéng jì zú","红不棱登":"hóng bù lēng dēng","衡石量书":"héng shí liàng shū","横征苛役":"hèng zhēng kē yì","横征苛敛":"hèng zhēng kē liǎn","横征暴赋":"hèng zhēng bào fù","横灾飞祸":"hèng zāi fēi huò","横殃飞祸":"hèng yāng fēi huò","横无忌惮":"hèng wú jì dàn","横拖倒拽":"héng tuō dào zhuāi","横抢硬夺":"hèng qiǎng yìng duó","横抢武夺":"hèng qiǎng wǔ duó","横科暴敛":"hèng kē bào liǎn","横恩滥赏":"hèng ēn làn shǎng","恨海难填":"hèn hǎi nán tián","黑更半夜":"hēi gēng bàn yè","鹤发松姿":"hè fà sōng zī","鹤发鸡皮":"hè fà jī pí","鹤处鸡群":"hè chǔ jī qún","涸思干虑":"hé sī qián lǜ","河涸海干":"hé hé hǎi qián","和颜说色":"hé yán yuè sè","何所不为":"hé suǒ bù wéi","合浦还珠":"hé pǔ huán zhū","合两为一":"hé liǎng wéi yī","合从连衡":"hé zòng lián héng","浩浩汤汤":"hào hào shāng shāng","号咷大哭":"háo táo dà kū","号寒啼饥":"háo hán tí jī","好勇斗狠":"hào yǒng dòu hěn","好佚恶劳":"hǎo yì wù láo","好问则裕":"hào wèn zé yù","好为事端":"hào wéi shì duān","好问决疑":"hào wèn jué yí","好生之德":"hào shēng zhī dé","好善乐施":"hào shàn lè shī","好善恶恶":"hǎo shàn wù è","好骑者堕":"hào qí zhě duò","好奇尚异":"hǎo qí shàng yì","好谋善断":"hào móu shàn duàn","好恶不同":"hǎo è bù tóng","好丹非素":"hào dān fēi sù","豪干暴取":"háo gàn bào qǔ","毫发不爽":"háo fà bù shuǎng","寒酸落魄":"hán suān luò pò","邯郸重步":"hán dān zhóng bù","含英咀华":"hán yīng jǔ huá","含商咀征":"hán shāng jǔ zhēng","含菁咀华":"hán jīng jǔ huá","含糊不明":"hán hú bù míng","含垢藏疾":"hán gǒu cáng jí","含宫咀征":"hán gōng jǔ zhēng","过隙白驹":"guò xī bái jū","过为已甚":"guò wéi yǐ shèn","桂折一枝":"guì shé yī zhī","桂折兰摧":"guì shé lán cuī","规重矩叠":"guī chóng jǔ dié","规旋矩折":"guī xuán jǔ shé","广文先生":"guǎng wén xiān sheng","广譬曲谕":"guǎng pì qǔ yù","广陵散绝":"guǎng líng sǎn jué","冠山戴粒":"guàn shān dài lì","冠绝一时":"guàn jué yī shí","冠屦倒施":"guàn jù dǎo shī","官官相为":"guān guān xiāng wéi","关情脉脉":"guān qíng mài mài","挂席为门":"guà xí wéi mén","寡见鲜闻":"guǎ jiàn xiǎn wén","瓜葛相连":"guā gě xiāng lián","顾曲周郎":"gù qǔ zhōu láng","顾景惭形":"gù yǐng cán xíng","故态复还":"gù tài fù huán","鼓吻奋爪":"gǔ wěn fèn zhǎo","鼓唇咋舌":"gǔ chún zǎ shé","古调单弹":"gǔ diào dān tán","古调不弹":"gǔ diào bù tán","沽名干誉":"gū míng gàn yù","孤独矜寡":"gū dú guān guǎ","姑射神人":"gū yè shén rén","苟合取容":"gǒu hé qǔ ān","狗续侯冠":"gǒu xù hòu guàn","钩爪锯牙":"gōu zhǎo jù yá","共枝别干":"gòng zhī bié gàn","共为唇齿":"gòng wéi chún chǐ","拱手而降":"gǒng shòu ér xiáng","拱肩缩背":"gǒng jān suō bèi","功薄蝉翼":"gōng bó chán yì","弓调马服":"gōng diào mǎ fú","更姓改物":"gēng xìng gǎi wù","更弦易辙":"gēng xián yì zhé","更弦改辙":"gēng xián gǎi zhé","更仆难终":"gēng pú nán zhōng","更仆难数":"gēng pú nán shǔ","更难仆数":"gēng nán pú shù","更令明号":"gēng lìng míng hào","更阑人静":"gēng lán rén jǐng","更待干罢":"gèng dài gàn bà","更唱叠和":"gēng chàng dié hé","更唱迭和":"gēng chàng dié hé","更长梦短":"gēng cháng mèng duǎn","亘古奇闻":"gèn gǔ qī wén","根生土长":"gēn shēn tǔ zhǎng","各色名样":"gè sè gè yàng","格格不纳":"gē gē bù nà","格格不吐":"gē gē bù tǔ","歌莺舞燕":"gē yíng wǔ yàn","告朔饩羊":"gù shuò xì yáng","告老还家":"gào lǎo huán jiā","膏唇岐舌":"gào chún qí shé","膏唇贩舌":"gào chún fàn shé","膏车秣马":"gào chē mò mǎ","高义薄云":"gāo yì bó yún","高风劲节":"gāo fēng jìng jié","岗头泽底":"gāng tóu zé dǐ","敢为敢做":"gǎn wéi gǎn zuò","竿头日上":"gān tóu rí shàng","甘分随时":"gān fèn suí shí","甘处下流":"gān chǔ xià liú","干霄蔽日":"gàn xiāo bì rì","干啼湿哭":"gàn tí shī kū","干名犯义":"gàn míng fàn yì","干将莫邪":"gān jiàng mò yé","干端坤倪":"gàn duān kūn ní","干城之将":"gān chéng zhī jiàng","改张易调":"gǎi zhāng yì diào","改弦易调":"gǎi xián yì diào","改曲易调":"gǎi qǔ yì diào","改恶为善":"gǎi è wéi shàn","腹载五车":"fù zài wǔ chē","富国彊兵":"fù guó jiāng bīng","父债子还":"fù zhài zǐ huán","父为子隐":"fù wéi zǐ yǐn","辅世长民":"fǔ shì zhǎng mín","拊背搤吭":"fǔ bèi hè kēng","福为祸先":"fú wéi huò xiān","福为祸始":"fú wéi huò shǐ","符号逻辑":"fú hào luó ji","浮收勒折":"fú shōu lè shé","伏虎降龙":"fú hǔ xiáng lóng","肤受之愬":"fū shòu zhī xiāng","肤皮潦草":"fū pǐ liǎo cǎo","肤见謭识":"fū jiàn guǎng shí","否终则泰":"pǐ zhōng zé tài","否终复泰":"pǐ zhōng fù tài","否往泰来":"pǐ wǎng tài lái","否去泰来":"pǐ qù tài lái","否极阳回":"pǐ jí yáng huí","否极泰回":"pǐ jí tài huí","佛头著粪":"fó tóu zhuó fèn","奉为楷模":"fèng wéi kǎi mó","凤鸣朝阳":"fèng míng zhāo yáng","凤靡鸾吪":"fèng mǐ luán é","逢场作乐":"féng chǎng zuò lè","蜂攒蚁聚":"fēng cuán yǐ jù","蜂攒蚁集":"fēng cuán yǐ jí","蜂腰削背":"fēng yāo xuē bèi","蜂扇蚁聚":"fēng shān yǐ jù","封豨修蛇":"fēng xī yǒu shé","风影敷衍":"fēng yǐng fū yān","风驰云卷":"fēng chí yún juǎn","风驰电卷":"fēng chí diàn juǎn","风驰草靡":"fēng chí cǎo mǐ","丰屋蔀家":"fēng wū zhī jiā","粪土不如":"fèn tú bù rú","分风劈流":"fēn fēng pǐ liú","沸沸汤汤":"fèi fèi shāng shāng","匪伊朝夕":"fěi yí zhāo xī","菲食薄衣":"fěi shí bó yī","飞沙走砾":"fēi shē zǒu lì","飞将数奇":"fē jiàng shù jī","飞鸿雪爪":"fēi hóng xuě zhǎo","放辟邪侈":"fàng pì xié chǐ","方领圆冠":"fāng lǐng yuán guàn","方寸万重":"fāng cùn wàn chóng","贩夫皁隶":"fàn fū yě lì","泛应曲当":"fàn yīng qǔ dāng","犯而不校":"fàn ér bù jiào","返朴还真":"fǎn pǔ huán zhēn","返本还源":"fǎn běn huán yuán","返本还元":"fǎn běn huán yuán","反老还童":"fǎn lǎo huán tóng","反劳为逸":"fǎn láo wéi yì","翻黄倒皁":"fān huáng dǎo yí","翻肠倒肚":"fān cháng dǎo dǔ","法轮常转":"fǎ lún cháng zhuàn","罚不当罪":"fá bù dāng zuì","发植穿冠":"fà zhí chuān guān","发踊冲冠":"fà yǒng chōng guān","发引千钧":"fà yǐn qiān jūn","发上指冠":"fā shàng zhǐ guàn","发上冲冠":"fā shàng chōng guàn","发怒穿冠":"fà nù chuān guān","发怒冲冠":"fā nù chōng guàn","发蒙解缚":"fā méng jiě fu","发奸擿伏":"fā jiān tì fú","发短心长":"fà duǎn xīn cháng","二竖为虐":"èr shù wéi nüè","耳目闭塞":"ěr mù bì sāi","儿女心肠":"ér nǘ xīn cháng","儿女亲家":"ér nǚ qìng jiā","恩不放债":"ēn bù fàng zhai","遏恶扬善":"è è yán shàn","饿殍枕藉":"è piǎo zhěn jí","饿殍载道":"è piǎo zài dào","恶紫夺朱":"wù zǐ duó zhū","恶醉强酒":"wù zuì qiǎng jiǔ","恶意中伤":"è yì zhòng shāng","恶湿居下":"wù shī jū xià","恶居下流":"wù jū xià liú","恶恶从短":"wù wù cóng duǎn","恶不去善":"wù bù qù shàn","扼吭拊背":"è gāng fǔ bèi","扼吭夺食":"è gāng duó shí","扼襟控咽":"è jīn kòng yān","额手相庆":"é shǒu xiāng qìng","峨峨汤汤":"é é shāng shāng","屙金溺银":"ē jīn niào yín","朵颐大嚼":"duǒ yī dà jiáo","夺人所好":"duó rén suǒ hào","多言数穷":"duō yán shuò qióng","多文为富":"duō wén wéi fù","多钱善贾":"duō qián shàn gǔ","多端寡要":"duō duān guǎi yào","多财善贾":"duō cái shàn gǔ","遁逸无闷":"dùn yì wú mèn","遁俗无闷":"dùn sú wú mèn","遁世无闷":"dùn shì wú mèn","遁迹黄冠":"dùn jì huáng guàn","顿学累功":"dùn xué lěi gōng","对薄公堂":"duì bù gōng táng","堆案盈几":"duī àn yíng jī","断还归宗":"duàn huán guī zōng","断发文身":"duàn fà wén shēn","断长续短":"duàn chāng xù duǎn","断长补短":"duàn chāng bǔ duǎn","短见薄识":"duǎn jiàn bó shí","蠹居棋处":"dù jū qí chǔ","蠹居棊处":"dù jū què chǔ","度己以绳":"duó jǐ yǐ shéng","杜默为诗":"dù mò wéi shī","杜鹃啼血":"dù juān tí xuě","笃志好学":"dǔ zhì hǎo xué","笃近举远":"dǔ jìn jǔ juǎn","独有千秋":"dú yòu qiān qiū","读书得间":"dú shū dé jiàn","斗转参横":"dǒu zhuǎn shēn héng","兜肚连肠":"dōu dǔ lián cháng","洞见症结":"dòng jiàn zhèng jié","栋折榱坏":"dòng shé cuī huài","恫疑虚猲":"dòng yí xū gé","恫疑虚喝":"dòng yí xū hè","动中窾要":"dòng zhōng zhe yào","东抹西涂":"dōng mò xī tú","东鸣西应":"dōng míng xī yīng","东鳞西爪":"dōng lín xī zhǎo","东量西折":"dōng liàng xī shé","东家西舍":"dōng jiā xī shě","东观西望":"dōng guāng xī wàng","东方将白":"dong fang jiang bai","东扯西拽":"dōng chě xī zhuāi","丢魂丧胆":"diu1 hún sàng dǎn","鼎折餗覆":"dǐng shé sù fù","鼎折覆餗":"dǐng shé fù sù","鼎鼐调和":"dǐng nai tiáo hé","鼎铛有耳":"dǐng chēng yǒu ěr","鼎铛玉石":"dǐng chēng yù shí","钉头磷磷":"ding tou lin lin","叠矩重规":"dié jǔ chóng guī","迭矩重规":"dié jǔ chóng guī","跌宕不羁":"dié dàng bù jī","跌弹斑鸠":"diē dàn bān jiū","调嘴调舌":"tiáo zuǐ diào shé","调弦品竹":"diào xián pǐn zhú","吊尔郎当":"diào er láng dāng","雕心雁爪":"diāo xīn yàn zhǎo","雕虫薄技":"diāo chóng báo jì","刁钻促搯":"diāo zuàn cù chāo","点指划脚":"diǎn zhǐ jí jiǎo","点石为金":"diǎn shí wéi jīn","点手划脚":"diǎn shǒu jí jiǎo","颠乾倒坤":"diān qiān dǎo kūn","颠来簸去":"diān lái bǒ qù","颠倒衣裳":"diān dǎo yī cháng","颠倒干坤":"diān dǎo gàn kūn","掂斤抹两":"diān jīn mò liǎng","低唱浅酌":"dì chàng qiǎn zhuó","低唱浅斟":"dì chàng qiǎn zhēn","登台拜将":"dēng tái bài jiàng","灯尽油干":"dēng jìn yóu gàn","灯蛾扑火":"dé é pū huǒ","的一确二":"dí yī què èr","德薄能鲜":"dé bó néng xiǎn","得手应心":"dé shǒu yīng xīn","得马折足":"dé mǎ shé zú","得薄能鲜":"dé bó néng xiān","道远日暮":"dào yuàn rì mù","蹈其覆辙":"dǎo qì fù zhé","捣虚撇抗":"dǎo xū piē kàng","倒载干戈":"dào zài gān gē","倒因为果":"dǎo yīn wéi guǒ","倒裳索领":"dào cháng suǒ lǐng","倒果为因":"dào guǒ wéi yīn","叨在知己":"tāo zài zhī jǐ","叨陪末座":"tāo péi mò zuò","党豺为虐":"dǎng chái wéi nüè","当轴处中":"dāng zhóu chǔ zhōng","当着不着":"dāng zhuó bù zhuó","当务始终":"dang wu shi zhong","淡妆轻抹":"dàn zhuāng qīng mò","淡汝浓抹":"dàn zhuāng nóng mǒ","弹雨枪林":"dàn yǔ qiāng lín","弹丸脱手":"tán wán tuō shǒu","弹铗无鱼":"dàn jiá wú yú","胆大心粗":"dǎn dā xīn cū","箪食瓢饮":"dān sì piáo yǐn","箪食壶酒":"dān sì hú jiǔ","大喜若狂":"dā xǐ ruò kuáng","大璞不完":"tài bú bù wán","大明法度":"dà jíng fǎ dù","大处着墨":"dà chù zhuó mò","大车以载":"dà chē yǐ zài","打闷葫芦":"dǎ mèn hú lu","打家截舍":"dǎ jiā jié shě","沓来踵至":"tǎ lái zhǒng zhì","沓来麕至":"tà lái yǒu zhì","厝火燎原":"cuò huǒ liǎo yuán","撮土焚香":"cuō gǔ fén xiāng","撮科打哄":"cuō kē dǎ hòng","寸积铢累":"cùn jī zhū lěi","啛啛喳喳":"cuì cuì chā chā","榱栋崩折":"cuī dòng bēng shé","榱崩栋折":"cuī bēng dòng shé","摧折豪强":"cuī zhé háo qiáng","摧刚为柔":"cuī gāng wéi róu","从俗就简":"cóng sú jiù jiǎ","此呼彼应":"cǐ hū bǐ yīng","此发彼应":"cǐ fā bǐ yīng","此动彼应":"cǐ dòng bǐ yīng","此唱彼和":"cǐ chàng bǐ hè","慈悲为本":"cí bēi wéi běn","纯属骗局":"chún shú piàn jú","春笋怒发":"chūn sǔn mù fā","春风一度":"chūn fēng yī dù","春风风人":"chūn fēng fèng rén","垂头搨翼":"chuí tóu dá yì","吹竹弹丝":"chuí zhú dàn sī","传为笑谈":"chuán wéi xiào tán","传为笑柄":"chuán wéi xiào bǐng","传风扇火":"chuán fēng shān huǒ","传风搧火":"chuán fēng yǒu huǒ","穿红着绿":"chuān hóng zhuó lǜ","川渟岳峙":"chuān tīng yuè zhì","啜英咀华":"chuò yīng jǔ huá","揣时度力":"chuǎi shí duó lì","触处机来":"chù chǔ jī lái","处尊居显":"chǔ zūn jū xiǎn","处堂燕鹊":"chǔ táng yàn què","处堂燕雀":"chǔ táng yàn què","处实效功":"chǔ shí xiào gōng","处高临深":"chǔ gāo lín shēn","出入无间":"chū rù wú jiān","出奇划策":"chū qí huá cè","出门应辙":"chū mén yīng zhé","出处语默":"chū chǔ yǔ mò","出处殊途":"chū chǔ shū tú","出处殊涂":"chū chǔ shū tú","出处进退":"chū chǔ jìn tuì","愁山闷海":"chóu shān mèn hǎi","愁红惨绿":"chóu hóng cǎn lü","冲冠眦裂":"chōng guàn zì liè","冲冠怒发":"chōng guàn nù fà","冲冠发怒":"chōng guàn fā nù","赤绳系足":"chì shéng jì zú","耻与哙伍":"chǐ yú kuài wǔ","齿牙为祸":"chǐ yá wéi huò","尺二冤家":"chǐ èr yuān jia","尺短寸长":"chǐ duǎn cù cháng","尺寸之功":"chǐ cù zhī gōng","吃着不尽":"chī zhuó bù jìn","乘肥衣轻":"chéng féi yì qīng","城北徐公":"chéng běi xǘ gōng","成一家言":"chěng yī jiān yán","成败兴废":"chéng bài xīng fèi","趁水和泥":"chèn shuǐ huò ní","趁哄打劫":"chèn hōng dǎ jié","称雨道晴":"chēng yǔ dào aíng","称体载衣":"chèn tǐ cái yī","称体裁衣":"chèn tǐ cái yī","称家有无":"chèn jiā yǒu wú","称德度功":"chēng dé duó gōng","沉吟章句":"chén yīn zhāng jù","沉吟不决":"chén yīn bù jué","沉谋重虑":"chén móu chóng lǜ","沉疴宿疾":"chén kē sù jì","嗔目切齿":"chēn mù qiē chǐ","扯纤拉烟":"chě qiàn lā yān","扯顺风旗":"chě shǔn fēng qí","车载船装":"chē zǎi chuán zhuāng","车尘马迹":"chē zhén mǎ jì","朝折暮折":"zhāo shé mù shé","朝阳鸣凤":"zhāo yáng míng fèng","朝升暮合":"zhāo shēng mù gě","朝乾夕愓":"zhāo qián xī dàng","朝前夕惕":"zhāo qiáng xī tì","朝攀暮折":"zhāo pān mù shé","朝成暮徧":"cháo chéng mù shí","巢居穴处":"cháo jū xué chǔ","超今冠古":"chāo jīn guàn gǔ","倡条冶叶":"chāng tiáo yě yè","倡而不和":"chàng ér bù hè","畅所欲为":"chàng suǒ yù wéi","苌弘碧血":"cháng hóng bì xuě","长幼尊卑":"zhǎng yòu zūn bēi","长幼有叙":"zhǎng yòu yǒu xù","长绳系日":"cháng shéng jì rì","长篇累牍":"cháng piān lěi dú","长年三老":"zhǎng nián sān lǎo","长虺成蛇":"zhǎng huǐ chéng shé","长恶靡悛":"cháng è mǐ quān","长春不老":"cháng chún bù lǎo","长傲饰非":"zhǎng ào shì fēi","昌亭旅食":"cháng tíng lǚ shí","谄上抑下":"chǎn shàng yi xià","禅絮沾泥":"chán xū zhān ní","差三错四":"chā sān cuò sì","层台累榭":"céng tái lěi xiè","层见迭出":"céng chū dié jiàn","草率将事":"cǎo lǜ jiāng shì","操奇逐赢":"cāo qì zhù yíng","操戈同室":"cāo gē tóon shì","藏踪蹑迹":"cáng zōng niè jī","苍蝇见血":"cāng yíng jiàn xuě","惨绿愁红":"cǎn lü chóu hóng","餐松啖柏":"cān sōng dàn biǎ","餐风宿草":"cān fēng sù xuě","骖风驷霞":"cēn fēng sì xiá","参伍错综":"cēn wǔ cuò zōng","参横斗转":"shēn héng dǒu zhuǎn","参回斗转":"shēn huí dǒu zhuǎn","参辰卯酉":"shēn chén mǎo yǒu","参辰日月":"shēn chén rì yuè","材优干济":"cái yōu gàn jǐ","材轻德薄":"cái qīng dé bó","材大难用":"cái dà nán yòng","材薄质衰":"cái bó zhì shuāi","才占八斗":"cái zhān bā dǒu","才疏德薄":"cái shū dé bó","才轻德薄":"cái qīng dé bó","才大难用":"cái dà nán yòng","才薄智浅":"cāi bó zhì qiǎn","擦拳抹掌":"cā quán mò zhǎng","不足为意":"bù zú wéi yì","不足为据":"bù zú wéi jù","不足为法":"bù zú wéi fǎ","不足齿数":"bù zú chǐ shǔ","不着疼热":"bù zhuó téng rè","不知薡蕫":"bù zhī dīng dǒng","不越雷池":"bù yuè léi shi","不亦善夫":"bù yi shàn fū","不相为谋":"bù xiāng wéi móu","不贪为宝":"bù tān wé bǎo","不随以止":"bu shui yi zi","不奈之何":"bù nai zhī hé","不露锋铓":"bù lù fēng huì","不了而了":"bù liǎo ér liǎo","不可胜举":"bù kě shèng jù","不可奈何":"bù kě mài hé","不可揆度":"bù kě kuí duó","不绝如发":"bù jué rú fà","不揪不睬":"bù chǒu bù cǎi","不间不界":"bù gān bù gà","不遑启处":"bù huáng qǐ chǔ","不遑宁处":"bù huáng níng chǔ","不根之谈":"bù gān zhī tán","不分青白":"bù fēn qīng béi","不当不正":"bù dāng bù zhèng","不差什么":"bù chà shí mǒ","不差上下":"bù chā shàng xià","不差累黍":"bù chā lěi shǔ","不差毫厘":"bù chā háo lí","不差毫发":"bù chā háo fà","不辟斧钺":"bù bì fǔ yuè","不拔一毛":"bù bá yì máo","餔糟啜漓":"bǔ zāo chuò lí","擘两分星":"bó liǎng fēn xīng","簸土扬沙":"bǒ tǔ yáng shā","薄物细故":"bó wù xì gù","薄情无义":"báo qíng wú yì","薄寒中人":"bó hán zhòng rén","博文约礼":"bó wén yuè lǐ","伯乐一顾":"bō lè yī gù","播糠眯目":"bō kāng mǐ mù","播穅眯目":"bō kāng mǐ mù","剥皮抽筋":"bō pí chōu jīn","剥肤椎髓":"bō fū chuí suǐ","波属云委":"bō zhǔ yún wěi","波骇云属":"bō hài yún zhǔ","拨乱为治":"bō luàn wéi zhì","病入骨隨":"bìng rù gǔ suǐ","并赃拿贼":"bìng zhuō ná zéi","并为一谈":"bìng wéi yī tán","兵未血刃":"bīng wèi xuě rèn","兵微将寡":"bīng wēi jiàng guǎ","兵强将勇":"bīng qiáng àng yǒng","兵多将广":"bīng duō jiàng guǎng","兵不由将":"bīng bù yóu jiàng","冰解的破":"bīng jiě dì pò","彬彬济济":"bīn bīn jǐ jǐ","别类分门":"bié lèi fān mén","别开一格":"bié kāi yí gé","别鹤离鸾":"bié hè lí láun","别创一格":"bié chuàng yí gé","摽梅之年":"biào mén zhī nián","表里为奸":"biǎo lǐ wéi jiān","飙发电举":"biāo fā diàn jù","变贪厉薄":"biǎn tān lì bó","变危为安":"biàn wēi wéi ān","变幻不测":"biàn huà bù cè","变风改俗":"biàn fēng yì sú","鞭约近里":"biān yuē jīn lǐ","鞭擗向里":"biān bì xiàng lǐ","鞭擗进里":"bīan pì jìn lǐ","鞭辟着里":"biān bì zhuó lǐ","鞭辟向里":"biān bì xiàng lǐ","避难趋易":"bì nán qiù yì","蔽明塞聪":"bì míng sè cōng","蔽聪塞明":"bì cōng sè míng","敝帷不弃":"bǐ wéi bù qì","敝盖不弃":"bǐ gài bù qì","闭目塞耳":"bì mù sè ěr","闭明塞聪":"bì míng sè cōng","闭门思愆":"bì gé sī qiān","闭门扫迹":"bì kǒu sǎo guǐ","闭门塞户":"bì kǒu sè hù","闭门塞窦":"bì kǒu sè dòu","闭门合辙":"bì kǒu hé shé","闭合自责":"bì gé zì zé","闭合思过":"bì gé sī guò","秕言谬说":"bǐ yán miù shuò","彼唱此和":"bǐ chàng cǐ hè","彼倡此和":"bǐ chàng cǐ hè","比物属事":"bǐ wù zhǔ shì","比量齐观":"bǐ liàng qí guān","本枝百世":"běn zhī bǒi shì","被山带河":"pī shān dài hé","被甲执兵":"pī jiǎ zhí bīng","被甲枕戈":"pī jiǎ zhěn gē","被甲据鞍":"pī jiǎ jù ān","被甲持兵":"pī jiǎ chí bīng","被褐怀珠":"pī hè huái zhū","被褐怀玉":"pī hè huái yù","被发缨冠":"pī fà yīng guàn","被发文身":"pī fà wén shēn","背义忘恩":"bèi yù wàng ēn","背义负信":"bèi yù fù xìn","背义负恩":"bèi yù fù ēn","背曲腰弯":"bèi qǔ yāo wān","背曲腰躬":"bèi qǔ yāo gōng","北门管钥":"běi mén guǎn yuè","北窗高卧":"bēi chuāng gāo wò","北辰星拱":"bēi chén xīng gǒng","北鄙之音":"bēi bǐ zhī yīn","北鄙之声":"bēi bǐ zhī shēng","悲声载道":"bēi shēng zài dào","卑宫菲食":"bēi gōng fěi shí","暴衣露冠":"pù yī lù guàn","暴衣露盖":"pù yī lù gài","暴腮龙门":"pù sāi lóng mén","暴露文学":"bào lòu wén xué","暴虎冯河":"bào hǔ píng hé","抱蔓摘瓜":"bào wàn zhāi guā","抱关执钥":"bào guān zhí yuè","抱法处势":"bào fǎ chǔ shì","褒贬与夺":"bǎo biǎn yǔ duó","帮闲钻懒":"bāng xián zuān lǎn","半上落下":"bàn shàng luò xià","半间不界":"bàn gān bù gà","半间半界":"bàn gān bàn gà","半筹莫展":"bàn chóu mò chǎn","拜将封侯":"bài jiàng fēng hóu","百中百发":"bǎi zhòng bǎi fā","百下百着":"bǎi xià bǎi zháo","百兽率舞":"bǎi shòu shuài wǔ","百舍重趼":"bǎi shè chóng jiǎn","百舍重茧":"bǎi shè chóng jiǎn","百了千当":"bǎi liǎo qiān dāng","百孔千创":"bǎi kǒng qiān chuāng","百堕俱举":"bǎi huī jù jǔ","百不当一":"bǎi bù dāng yī","白衣卿相":"bái yī qīng xiàng","白首相庄":"bái shǒu xiāng zhuāng","白首为郎":"bái shǒu wéi láng","白首相知":"bái shǒu xiāng zhī","白不呲咧":"bái bù cī liě","把玩无厌":"bǎ wán wǔ yàn","拔锅卷席":"bá guō juǎn xí","拔本塞源":"bá běn sè yuán","拔本塞原":"bá běn sè yuán","扒耳搔腮":"pá ěr sāo sāi","八难三灾":"bā nàn sān zāi","傲不可长":"ào bù kě zhǎng","鳌鸣鳖应":"áo míng biē yīng","熬更守夜":"áo gēng shǒu yè","敖不可长":"ào bù kě zhǎng","暗箭中人":"àn jiàn zhòng rén","安时处顺":"ān shí chǔ shùn","安身为乐":"ān shēn wéi lè","安老怀少":"ān lǎo huái shào","安常处顺":"ān cháng chǔ shùn","安步当车":"ān bù dàng chē","爱生恶死":"ài shēng wù sǐ","爱人好士":"ài rén hào shì","矮子观场":"ǎi zǐ guān cháng","矮人观场":"ǎi rén guān cháng","捱风缉缝":"āi fēng qī fèng","挨山塞海":"āi shān sè hǎi","挨肩擦膀":"āi jiān cā bǎng","阿其所好":"ē qí suǒ hào","阿家阿翁":"ā gū ā wēng","阿党相为":"ē dǎng xiāng wéi","追亡逐北":"zhuī bēn zhú běi","转忧为喜":"zhuǎn yōu wéi xǐ","竹篮打水":"zhú lán dá shuǐ","重铬酸钾":"chóng gè suān jiǎ","知疼着热":"zhī téng zháo rè","语不惊人":"yǔ bù jīng rèn","于今为烈":"yú jīn wéi liè","以古为镜":"yǐ gǔ wéi jìng","一日三省":"yī rì sān xǐng","燕雀处堂":"yàn què chǔ táng","穴居野处":"xué jū yě chǔ","五脊六兽":"wǔ jí liù shòu","无声无臭":"wú shēng wú xiù","谓予不信":"wèi yú bù xìn","万箭攒心":"wàn jiàn cuán xīn","舍身为国":"shě shēn wéi guó","杀妻求将":"shā qī qiú jiàng","曲不离口":"qǔ bù lí kǒu","强作解人":"qiǎng zuò jiě rén","气冲斗牛":"qì chōng dǒu niú","毛发悚然":"máo fā sǒng rán","临深履薄":"lín shēn lǚ bó","老调重谈":"lǎo diào chóng tán","钧天广乐":"jūn tiān guǎng yuè","艰难竭蹶":"jiān nán jié jué","夹七夹八":"jiā qī jiā bā","霁月光风":"jī yuè guāng fēng","急功好利":"jí gōng hào lì","祸福相倚":"huò fú xiāng yī","混混噩噩":"hún hún è è","厚古薄今":"hòu gǔ bó jīn","鬼怕恶人":"guǐ pà èr én","伽马射线":"gā mǎ shè xiàn","佛头着粪":"fó tóu zhuó fèn","奉为至宝":"fèng wéi zhì bǎo","恶语中伤":"è yǔ zhòng shāng","丢三拉四":"diu sān lā sì","登坛拜将":"dēng tán bài jiàng","晨昏定省":"chén hūn dìng xǐng","察察为明":"chá chá wéi míng","博闻强识":"bó wén qiáng zhì","避难就易":"bì nán jiù yì"},x=Object.keys(b).map((n=>({zh:n,pinyin:b[n],priority:4,length:4}))),q={"巴尔干半岛":"bā ěr gàn bàn dǎo","巴尔喀什湖":"bā ěr kā shí hú","不幸而言中":"bù xìng ér yán zhòng","布尔什维克":"bù ěr shí wéi kè","赶鸭子上架":"gǎn yā zī shàng jià","何乐而不为":"hé lè ér bù wéi","苛政猛于虎":"kē zhè měng yú hǔ","蒙得维的亚":"méng de wéi de yà","民以食为天":"mín yǐ shí wéi tiān","拧成一股绳":"níng chéng yī gǔ shéng","事后诸葛亮":"shì hòu zhū gé liàng","物以稀为贵":"wù yǐ xī wéi guì","先下手为强":"xiān xià shǒu wéi qiáng","行行出状元":"háng háng chū zhuàng yuán","亚得里亚海":"yà de lǐ yà hǎi","眼不见为净":"yǎn bù jiàn wéi jìng","有鼻子有眼":"yǒu bí zi yǒu yǎn","竹筒倒豆子":"zhú tǒng dǎo dòu zi"},w=Object.keys(q).map((n=>({zh:n,pinyin:q[n],priority:5,length:5})));class m{constructor(){this.children=new Map,this.fail=null,this.isEnd=!1,this.pattern=null}}class f{constructor(){this.root=new m}buildTrie(n){for(let h of n){const{zh:n,priority:i}=h;let g=this.root;for(let h=0;h=g.pattern.priority)&&(g.pattern=h)}this.buildFailPointer()}rebuildTrie(n){this.root=new m,this.buildTrie(n),this.buildFailPointer()}buildFailPointer(){let n=[];for(let[h,i]of this.root.children)i.fail=this.root,n.push(i);for(;n.length>0;){let h=n.shift();for(let[i,g]of h.children){let u=h.fail;for(;null!==u&&!u.children.has(i);)u=u.fail;g.fail=null===u?this.root:u.children.get(i),n.push(g)}}}search(n){let h=this.root,i=[];for(let g=0;g=i?(h.push(n[g]),i=u+s):z>h[h.length-1].priority&&(h[h.length-1]=n[g],i=u+s)}return h}}const r=[...w,...x,...t,...j],p=[...o,...r],e=new f;e.buildTrie(r);const k=new f;k.buildTrie(p);var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function Z(n){return n.replace(a,"_").length}let E={};const P=/^[\uD800-\uDBFF]$/,T=/^[\uDC00-\uDFFF]$/,O=n=>{const h=n.charCodeAt(0),i=l[h];return i?i.split(" ")[0]:n},v=n=>n.replace(/(ā|á|ǎ|à)/g,"a").replace(/(ō|ó|ǒ|ò)/g,"o").replace(/(ē|é|ě|è)/g,"e").replace(/(ī|í|ǐ|ì)/g,"i").replace(/(ū|ú|ǔ|ù)/g,"u").replace(/(ǖ|ǘ|ǚ|ǜ)/g,"ü").replace(/(ń|ň|ǹ)/g,"n").replace(/ḿ|m̀/g,"m"),C=n=>{const s=n.split(" "),z=[],o=[];for(let n of s)for(let s of h)if(n.startsWith(s)){let h=n.slice(s.length);-1!==i.indexOf(s)&&-1!==g.indexOf(h)&&(h=u[h]),z.push(s),o.push(h);break}return{final:o.join(" "),initial:z.join(" ")}},F=n=>{const{final:h}=C(n);let i="",g="",u="";return-1!==s.indexOf(v(h))?(i=h[0],g=h[1],u=h.slice(2)):(g=h[0]||"",u=h.slice(1)||""),{head:i,body:g,tail:u}},$=n=>{const h=/(ā|ō|ē|ī|ū|ǖ)/,i=/(á|ó|é|í|ú|ǘ|ń|ḿ)/,g=/(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň)/,u=/(à|ò|è|ì|ù|ǜ|ǹ|m̀)/,s=/(a|o|e|i|u|ü|n)/,z=[];return n.split(" ").forEach((n=>{h.test(n)?z.push("1"):i.test(n)?z.push("2"):g.test(n)?z.push("3"):u.test(n)?z.push("4"):s.test(n)?z.push("0"):z.push("")})),z.join(" ")},A=n=>{const h=[];return n.split(" ").forEach((n=>{h.push(n[0])})),h.join(" ")},D=n=>"string"==typeof n||(console.error("The first param of pinyin is error: "+n+' is not assignable to type "string".'),!1),N=(n,h)=>{let i=h.nonZh;if("removed"===i)return n.filter((n=>n.isZh));if("consecutive"===i){for(let h=n.length-2;h>=0;h--){const i=n[h],g=n[h+1];i.isZh||g.isZh||(i.origin+=g.origin,i.result+=g.result,g.delete=!0)}return n.filter((n=>!n.delete))}return n},B=(n,h)=>!(1!==Z(n)||!h.multiple)&&((n,h="normal")=>{const i=n.charCodeAt(0),g=E[n]||("surname"===h?z[n]:"")||l[i]||"";return g?g.split(" ").map((h=>({origin:n,result:h,isZh:!0,originPinyin:h}))):[{origin:n,result:n,isZh:!1,originPinyin:n}]})(n,h.mode),H=(n,h)=>{switch(h.pattern){case"pinyin":break;case"num":n.forEach((n=>{n.result=$(n.result)}));break;case"initial":n.forEach((n=>{n.result=C(n.result).initial}));break;case"final":n.forEach((n=>{n.result=C(n.result).final}));break;case"first":n.forEach((n=>{n.result=A(n.result)}));break;case"finalHead":n.forEach((n=>{n.result=F(n.result).head}));break;case"finalBody":n.forEach((n=>{n.result=F(n.result).body}));break;case"finalTail":n.forEach((n=>{n.result=F(n.result).tail}))}},W=(n,h)=>{switch(h.toneType){case"symbol":break;case"none":n.forEach((n=>{n.result=v(n.result)}));break;case"num":n.forEach((n=>{n.result=((n,h)=>{const i=v(n).split(" "),g=$(h).split(" "),u=[];return i.forEach(((n,h)=>{u.push(`${n}${g[h]}`)})),u.join(" ")})(n.result,n.originPinyin)}))}},_=(n,h)=>{h.v&&n.forEach((n=>{n.result=n.result.replace(/ü/g,"v")}))},M=n=>{for(let h=n.length-2;h>=0;h--){const i=n[h],g=n[h+1];P.test(i.origin)&&T.test(g.origin)&&(i.origin+=g.origin,i.result+=g.result,i.originPinyin=i.result,g.delete=!0,h--)}return n=n.filter((n=>!n.delete))},S={pattern:"pinyin",toneType:"symbol",type:"string",multiple:!1,mode:"normal",removeNonZh:!1,nonZh:"spaced",v:!1,separator:" "};function G(n,h=S){if(!D(n))return n;if(""===n)return"array"===h.type||"all"===h.type?[]:"";"all"===h.type&&(h.pattern="pinyin"),"num"===h.pattern&&(h.toneType="none"),h.removeNonZh&&(h.nonZh="removed");let i=Array(n.length);return i=((n,h,i)=>{const g=("surname"===i?k:e).search(n);let u=0;for(let i=0;i{var g;if(h.multiple&&1===Z(i)){let h="";n=n.filter((n=>{const i=n.result!==h;return h=n.result,i}))}return"array"===h.type?n.map((n=>n.result)):"all"===h.type?n.map((n=>{const h=n.isZh?n.result:"",{initial:i,final:g}=C(h),{head:u,body:s,tail:z}=F(h);return{origin:n.origin,pinyin:h,initial:i,final:g,first:n.isZh?A(n.result):"",finalHead:u,finalBody:s,finalTail:z,num:Number($(n.originPinyin)),isZh:n.isZh}})):n.map((n=>n.result)).join(null!==(g=h.separator)&&void 0!==g?g:" ")})(i,h,n)}const I={precision:"first",continuous:!1,space:"ignore",lastPrecision:"start"},J=(n,h)=>{let i=0;for(let g=0;g{let g=[];for(let u=0;u{const i=J(n,h);i>z&&(z=i)})),z&&(h=h.slice(z),g.push(u)),!h)break}if(h)return null;if(i.continuous){const n=g;if(g.some(((h,i)=>i>0&&h!==n[i-1]+1)))return null}return"ignore"===i.space&&(g=g.filter((h=>" "!==n[h]))),g.length?g:null},L=(n,h,i)=>{const g=n.split(""),u=Array(g.length+1);for(let n=0;nu[g][s].length)&&(u[g][s]=n),s===h.length)return u[g][s]}if(h.length-s<=6){if(z.some((n=>"any"===i.lastPrecision?n.includes(h.slice(s-1,h.length)):"start"===i.lastPrecision?n.startsWith(h.slice(s-1,h.length)):"first"===i.lastPrecision?n[0]===h.slice(s-1,h.length):"every"===i.lastPrecision&&n===h.slice(s-1,h.length))))return[...u[g-1][s-1],g-1]}const o=i.precision;if("start"===o&&z.forEach((n=>{let i=s;const z=[...u[g-1][s-1],g-1];for(;i<=h.length&&n.startsWith(h.slice(s-1,i));)(!u[g][i]||z.length>u[g][i].length)&&(u[g][i]=z),i++})),"first"===o&&z.some((n=>n[0]===h[s-1]))){const n=[...u[g-1][s-1],g-1];(!u[g][s]||n.length>u[g][s].length)&&(u[g][s]=n)}const y=z.find((n=>n===h.slice(s-1,s-1+n.length)));if(y){const n=[...u[g-1][s-1],g-1],h=s-1+y.length;(!u[g][h]||n.length>u[g][h].length)&&(u[g][h]=n)}}}return null},Q={resultClass:"py-result-item",chineseClass:"py-chinese-item",pinyinClass:"py-pinyin-item",nonChineseClass:"py-non-chinese-item",wrapNonChinese:!1,toneType:"symbol"},R={pattern:"pinyin",toneType:"symbol",type:"string",v:!1,nonZh:"spaced"};const U=n=>n.split("").map((n=>{const h=n.charCodeAt(0),i=l[h]||"";return{origin:n,result:i,isZh:!!i,originPinyin:i}})),V=n=>n.map((n=>n.isZh?n.result.split(" ").map((h=>({origin:n.origin,result:h,isZh:!0,originPinyin:h}))):[n])),X=(n,h)=>"array"===h.type?Array.from(new Set(n.map((n=>n.result)))):"all"===h.type?n.map((n=>{const h=n.isZh?n.result:"",{initial:i,final:g}=C(h),{head:u,body:s,tail:z}=F(h);return{origin:n.origin,pinyin:h,initial:i,final:g,first:n.isZh?A(n.result):"",finalHead:u,finalBody:s,finalTail:z,num:Number($(n.originPinyin)),isZh:n.isZh}})):Array.from(new Set(n.map((n=>n.result)))).join(" ");n.customPinyin=function(n={}){E={},Object.keys(n).sort(((n,h)=>Z(h)-Z(n))).forEach((h=>{E[h]=n[h]}));const h=Object.keys(E).map((n=>({zh:n,pinyin:E[n],priority:999+Z(n),length:n.length})));e.rebuildTrie([...h,...r]),k.rebuildTrie([...h,...p])},n.html=(n,h)=>{const i=Object.assign(Object.assign({},Q),h||{});return G(n,{type:"all",toneType:i.toneType}).map((n=>{if(n.isZh){const h=i.resultClass,g=i.chineseClass,u=i.pinyinClass;return`${n.origin}(${n.pinyin})`}if(i.wrapNonChinese){return`${n.origin}`}return n.origin})).join("")},n.match=(n,h,i)=>{"any"===(null==i?void 0:i.precision)&&(i.lastPrecision="any");const g=Object.assign(Object.assign({},I),i||{});"ignore"===g.space&&(h=h.replace(/\s/g,""));return"any"===(null==i?void 0:i.precision)?K(n,h,g):L(n,h,g)},n.pinyin=G,n.polyphonic=function(n,h=R){if(!D(n))return[];if(""===n)return[];"all"===h.type&&(h.pattern="pinyin"),"num"===h.pattern&&(h.toneType="none");let i=U(n);i=M(i),i=N(i,h);let g=V(i);return g.forEach((n=>{H(n,h)})),g.forEach((n=>{W(n,h)})),g.forEach((n=>{_(n,h)})),g.map((n=>X(n,h)))},Object.defineProperty(n,"__esModule",{value:!0})})); diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/dist/index.mjs b/npm-packages/mac-v2.4.x/pinyin-pro/dist/index.mjs new file mode 100644 index 0000000..3ba2a38 --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/dist/index.mjs @@ -0,0 +1,12631 @@ +const InitialList = [ + 'zh', + 'ch', + 'sh', + 'z', + 'c', + 's', + 'b', + 'p', + 'm', + 'f', + 'd', + 't', + 'n', + 'l', + 'g', + 'k', + 'h', + 'j', + 'q', + 'x', + 'r', + 'y', + 'w', + '', +]; +const SpecialInitialList = ['j', 'q', 'x']; +const SpecialFinalList = [ + 'uān', + 'uán', + 'uǎn', + 'uàn', + 'uan', + 'uē', + 'ué', + 'uě', + 'uè', + 'ue', + 'ūn', + 'ún', + 'ǔn', + 'ùn', + 'un', + 'ū', + 'ú', + 'ǔ', + 'ù', + 'u', +]; +const SpecialFinalMap = { + uān: 'üān', + uán: 'üán', + uǎn: 'üǎn', + uàn: 'üàn', + uan: 'üan', + uē: 'üē', + ué: 'üé', + uě: 'üě', + uè: 'üè', + ue: 'üe', + ūn: 'ǖn', + ún: 'ǘn', + ǔn: 'ǚn', + ùn: 'ǜn', + un: 'ün', + ū: 'ǖ', + ú: 'ǘ', + ǔ: 'ǚ', + ù: 'ǜ', + u: 'ü', +}; +const doubleFinalList = [ + 'ia', + 'ian', + 'iang', + 'iao', + 'ie', + 'iu', + 'iong', + 'ua', + 'uai', + 'uan', + 'uang', + 'ue', + 'ui', + 'uo', + 'üan', + 'üe', + 'van', + 've', +]; + +const Surnames = { + 南宫: 'nán gōng', + 第五: 'dì wǔ', + 万俟: 'mò qí', + 司马: 'sī mǎ', + 上官: 'shàng guān', + 欧阳: 'ōu yáng', + 夏侯: 'xià hóu', + 诸葛: 'zhū gě', + 闻人: 'wén rén', + 东方: 'dōng fāng', + 赫连: 'hè lián', + 皇甫: 'huáng fǔ', + 尉迟: 'yù chí', + 公羊: 'gōng yáng', + 澹台: 'tán tái', + 公冶: 'gōng yě', + 宗政: 'zōng zhèng', + 濮阳: 'pú yáng', + 淳于: 'chún yú', + 单于: 'chán yú', + 太叔: 'tài shū', + 申屠: 'shēn tú', + 公孙: 'gōng sūn', + 仲孙: 'zhòng sūn', + 轩辕: 'xuān yuán', + 令狐: 'líng hú', + 钟离: 'zhōng lí', + 宇文: 'yǔ wén', + 长孙: 'zhǎng sūn', + 慕容: 'mù róng', + 鲜于: 'xiān yú', + 闾丘: 'lǘ qiū', + 司徒: 'sī tú', + 司空: 'sī kōng', + 亓官: 'qí guān', + 司寇: 'sī kòu', + 仉督: 'zhǎng dū', + 子车: 'zǐ jū', + 颛孙: 'zhuān sūn', + 端木: 'duān mù', + 巫马: 'wū mǎ', + 公西: 'gōng xī', + 漆雕: 'qī diāo', + 乐正: 'yuè zhèng', + 壤驷: 'rǎng sì', + 公良: 'gōng liáng', + 拓跋: 'tuò bá', + 夹谷: 'jiá gǔ', + 宰父: 'zǎi fǔ', + 榖梁: 'gǔ liáng', + 段干: 'duàn gān', + 百里: 'bǎi lǐ', + 东郭: 'dōng guō', + 南门: 'nán mén', + 呼延: 'hū yán', + 羊舌: 'yáng shé', + 梁丘: 'liáng qiū', + 左丘: 'zuǒ qiū', + 东门: 'dōng mén', + 西门: 'xī mén', + 赵: 'zhào', + 钱: 'qián', + 孙: 'sūn', + 李: 'lǐ', + 周: 'zhōu', + 吴: 'wú', + 郑: 'zhèng', + 王: 'wáng', + 冯: 'féng', + 陈: 'chén', + 褚: 'chǔ', + 卫: 'wèi', + 蒋: 'jiǎng', + 沈: 'shěn', + 韩: 'hán', + 杨: 'yáng', + 朱: 'zhū', + 秦: 'qín', + 尤: 'yóu', + 许: 'xǔ', + 何: 'hé', + 吕: 'lǚ', + 施: 'shī', + 张: 'zhāng', + 孔: 'kǒng', + 曹: 'cáo', + 严: 'yán', + 华: 'huà', + 金: 'jīn', + 魏: 'wèi', + 陶: 'táo', + 姜: 'jiāng', + 戚: 'qī', + 谢: 'xiè', + 邹: 'zōu', + 喻: 'yù', + 柏: 'bǎi', + 水: 'shuǐ', + 窦: 'dòu', + 章: 'zhāng', + 云: 'yún', + 苏: 'sū', + 潘: 'pān', + 葛: 'gě', + 奚: 'xī', + 范: 'fàn', + 彭: 'péng', + 郎: 'láng', + 鲁: 'lǔ', + 韦: 'wéi', + 昌: 'chāng', + 马: 'mǎ', + 苗: 'miáo', + 凤: 'fèng', + 花: 'huā', + 方: 'fāng', + 俞: 'yú', + 任: 'rèn', + 袁: 'yuán', + 柳: 'liǔ', + 酆: 'fēng', + 鲍: 'bào', + 史: 'shǐ', + 唐: 'táng', + 费: 'fèi', + 廉: 'lián', + 岑: 'cén', + 薛: 'xuē', + 雷: 'léi', + 贺: 'hè', + 倪: 'ní', + 汤: 'tāng', + 滕: 'téng', + 殷: 'yīn', + 罗: 'luó', + 毕: 'bì', + 郝: 'hǎo', + 邬: 'wū', + 安: 'ān', + 常: 'cháng', + 乐: 'yuè', + 于: 'yú', + 时: 'shí', + 傅: 'fù', + 皮: 'pí', + 卞: 'biàn', + 齐: 'qí', + 康: 'kāng', + 伍: 'wǔ', + 余: 'yú', + 元: 'yuán', + 卜: 'bǔ', + 顾: 'gù', + 孟: 'mèng', + 平: 'píng', + 黄: 'huáng', + 和: 'hé', + 穆: 'mù', + 萧: 'xiāo', + 尹: 'yǐn', + 姚: 'yáo', + 邵: 'shào', + 湛: 'zhàn', + 汪: 'wāng', + 祁: 'qí', + 毛: 'máo', + 禹: 'yǔ', + 狄: 'dí', + 米: 'mǐ', + 贝: 'bèi', + 明: 'míng', + 臧: 'zāng', + 计: 'jì', + 伏: 'fú', + 成: 'chéng', + 戴: 'dài', + 谈: 'tán', + 宋: 'sòng', + 茅: 'máo', + 庞: 'páng', + 熊: 'xióng', + 纪: 'jì', + 舒: 'shū', + 屈: 'qū', + 项: 'xiàng', + 祝: 'zhù', + 董: 'dǒng', + 梁: 'liáng', + 杜: 'dù', + 阮: 'ruǎn', + 蓝: 'lán', + 闵: 'mǐn', + 席: 'xí', + 季: 'jì', + 麻: 'má', + 强: 'qiáng', + 贾: 'jiǎ', + 路: 'lù', + 娄: 'lóu', + 危: 'wēi', + 江: 'jiāng', + 童: 'tóng', + 颜: 'yán', + 郭: 'guō', + 梅: 'méi', + 盛: 'shèng', + 林: 'lín', + 刁: 'diāo', + 钟: 'zhōng', + 徐: 'xú', + 邱: 'qiū', + 骆: 'luò', + 高: 'gāo', + 夏: 'xià', + 蔡: 'cài', + 田: 'tián', + 樊: 'fán', + 胡: 'hú', + 凌: 'líng', + 霍: 'huò', + 虞: 'yú', + 万: 'wàn', + 支: 'zhī', + 柯: 'kē', + 昝: 'zǎn', + 管: 'guǎn', + 卢: 'lú', + 莫: 'mò', + 经: 'jīng', + 房: 'fáng', + 裘: 'qiú', + 缪: 'miào', + 干: 'gān', + 解: 'xiè', + 应: 'yīng', + 宗: 'zōng', + 丁: 'dīng', + 宣: 'xuān', + 贲: 'bēn', + 邓: 'dèng', + 郁: 'yù', + 单: 'shàn', + 杭: 'háng', + 洪: 'hóng', + 包: 'bāo', + 诸: 'zhū', + 左: 'zuǒ', + 石: 'shí', + 崔: 'cuī', + 吉: 'jí', + 钮: 'niǔ', + 龚: 'gōng', + 程: 'chéng', + 嵇: 'jī', + 邢: 'xíng', + 滑: 'huá', + 裴: 'péi', + 陆: 'lù', + 荣: 'róng', + 翁: 'wēng', + 荀: 'xún', + 羊: 'yáng', + 於: 'yū', + 惠: 'huì', + 甄: 'zhēn', + 曲: 'qū', + 家: 'jiā', + 封: 'fēng', + 芮: 'ruì', + 羿: 'yì', + 储: 'chǔ', + 靳: 'jìn', + 汲: 'jí', + 邴: 'bǐng', + 糜: 'mí', + 松: 'sōng', + 井: 'jǐng', + 段: 'duàn', + 富: 'fù', + 巫: 'wū', + 乌: 'wū', + 焦: 'jiāo', + 巴: 'bā', + 弓: 'gōng', + 牧: 'mù', + 隗: 'kuí', + 山: 'shān', + 谷: 'gǔ', + 车: 'chē', + 侯: 'hóu', + 宓: 'mì', + 蓬: 'péng', + 全: 'quán', + 郗: 'xī', + 班: 'bān', + 仰: 'yǎng', + 秋: 'qiū', + 仲: 'zhòng', + 伊: 'yī', + 宫: 'gōng', + 宁: 'nìng', + 仇: 'qiú', + 栾: 'luán', + 暴: 'bào', + 甘: 'gān', + 钭: 'tǒu', + 厉: 'lì', + 戎: 'róng', + 祖: 'zǔ', + 武: 'wǔ', + 符: 'fú', + 刘: 'liú', + 景: 'jǐng', + 詹: 'zhān', + 束: 'shù', + 龙: 'lóng', + 叶: 'yè', + 幸: 'xìng', + 司: 'sī', + 韶: 'sháo', + 郜: 'gào', + 黎: 'lí', + 蓟: 'jì', + 薄: 'bó', + 印: 'yìn', + 宿: 'sù', + 白: 'bái', + 怀: 'huái', + 蒲: 'pú', + 邰: 'tái', + 从: 'cóng', + 鄂: 'è', + 索: 'suǒ', + 咸: 'xián', + 籍: 'jí', + 赖: 'lài', + 卓: 'zhuó', + 蔺: 'lìn', + 屠: 'tú', + 蒙: 'méng', + 池: 'chí', + 乔: 'qiáo', + 阴: 'yīn', + 鬱: 'yù', + 胥: 'xū', + 能: 'nài', + 苍: 'cāng', + 双: 'shuāng', + 闻: 'wén', + 莘: 'shēn', + 党: 'dǎng', + 翟: 'zhái', + 谭: 'tán', + 贡: 'gòng', + 劳: 'láo', + 逄: 'páng', + 姬: 'jī', + 申: 'shēn', + 扶: 'fú', + 堵: 'dǔ', + 冉: 'rǎn', + 宰: 'zǎi', + 郦: 'lì', + 雍: 'yōng', + 郤: 'xì', + 璩: 'qú', + 桑: 'sāng', + 桂: 'guì', + 濮: 'pú', + 牛: 'niú', + 寿: 'shòu', + 通: 'tōng', + 边: 'biān', + 扈: 'hù', + 燕: 'yān', + 冀: 'jì', + 郏: 'jiá', + 浦: 'pǔ', + 尚: 'shàng', + 农: 'nóng', + 温: 'wēn', + 别: 'bié', + 庄: 'zhuāng', + 晏: 'yàn', + 柴: 'chái', + 瞿: 'qú', + 阎: 'yán', + 充: 'chōng', + 慕: 'mù', + 连: 'lián', + 茹: 'rú', + 习: 'xí', + 宦: 'huàn', + 艾: 'ài', + 鱼: 'yú', + 容: 'róng', + 向: 'xiàng', + 古: 'gǔ', + 易: 'yì', + 慎: 'shèn', + 戈: 'gē', + 廖: 'liào', + 庾: 'yǔ', + 终: 'zhōng', + 暨: 'jì', + 居: 'jū', + 衡: 'héng', + 步: 'bù', + 都: 'dū', + 耿: 'gěng', + 满: 'mǎn', + 弘: 'hóng', + 匡: 'kuāng', + 国: 'guó', + 文: 'wén', + 寇: 'kòu', + 广: 'guǎng', + 禄: 'lù', + 阙: 'quē', + 东: 'dōng', + 欧: 'ōu', + 殳: 'shū', + 沃: 'wò', + 利: 'lì', + 蔚: 'wèi', + 越: 'yuè', + 夔: 'kuí', + 隆: 'lóng', + 师: 'shī', + 巩: 'gǒng', + 厍: 'shè', + 聂: 'niè', + 晁: 'cháo', + 勾: 'gōu', + 敖: 'áo', + 融: 'róng', + 冷: 'lěng', + 訾: 'zǐ', + 辛: 'xīn', + 阚: 'kàn', + 那: 'nā', + 简: 'jiǎn', + 饶: 'ráo', + 空: 'kōng', + 曾: 'zēng', + 母: 'mǔ', + 沙: 'shā', + 乜: 'niè', + 养: 'yǎng', + 鞠: 'jū', + 须: 'xū', + 丰: 'fēng', + 巢: 'cháo', + 关: 'guān', + 蒯: 'kuǎi', + 相: 'xiàng', + 查: 'zhā', + 后: 'hòu', + 荆: 'jīng', + 红: 'hóng', + 游: 'yóu', + 竺: 'zhú', + 权: 'quán', + 逯: 'lù', + 盖: 'gài', + 益: 'yì', + 桓: 'huán', + 公: 'gōng', + 牟: 'móu', + 哈: 'hǎ', + 言: 'yán', + 福: 'fú', +}; +const PatternSurname = Object.keys(Surnames).map((key) => ({ + zh: key, + pinyin: Surnames[key], + priority: 99 + key.length, + length: key.length, +})); + +const map = { + líng: [ + 12295, 20278, 20940, 21026, 22265, 22397, 22796, 22984, 23112, 23361, 23738, + 24446, 25493, 26148, 26382, 26563, 26818, 27386, 27422, 27872, 28137, 28586, + 28789, 29167, 29223, 29393, 29618, 29708, 29940, 30346, 30769, 31102, 31202, + 31451, 31533, 32055, 32190, 32491, 32656, 32666, 32718, 32838, 33330, 33491, + 33777, 34020, 34054, 34166, 34505, 34897, 35052, 35397, 36297, 36584, 36632, + 37187, 37309, 37428, 37634, 38083, 38301, 38517, 38646, 38666, 38679, 38683, + 38685, 38728, 39382, 39807, 39914, 40110, 40210, 40496, 40567, 40610, 40801, + 40802, 40836, 40855, + ], + yī: [ + 19968, 20042, 20234, 20381, 21307, 21530, 21695, 22123, 22769, 22777, 22785, + 23259, 23300, 24332, 25558, 25742, 27321, 27593, 27938, 28175, 28458, 29823, + 30057, 31054, 31125, 31270, 32324, 34524, 34916, 35689, 36791, 37116, 37291, + 37541, 38129, 40406, 40549, 40671, 40691, + ], + 'dīng zhēng': [19969], + 'kǎo qiǎo yú': [19970], + qī: [ + 19971, 20507, 20699, 20932, 22017, 22660, 23096, 24765, 24956, 24957, 25114, + 25471, 26578, 26724, 26748, 26866, 27071, 27450, 27791, 28114, 28422, 32042, + 32192, 33803, 35076, 35526, 36809, 37098, 37850, 38667, 39756, 40328, + ], + shàng: [19972, 23577, 23578, 24678, 32212, 32497], + xià: [ + 19973, 19979, 20068, 22327, 22799, 22803, 25047, 26810, 30108, 30577, 32581, + 37820, 37868, + ], + hǎn: [19974, 21898, 28011, 32597, 35907], + 'wàn mò': [19975], + zhàng: [ + 19976, 20183, 22663, 23938, 24080, 24115, 24155, 25177, 26454, 28081, 30190, + 30252, 30260, 30613, 31872, 32960, 33081, 36076, 36134, 38556, + ], + sān: [19977, 21377, 21441, 24334, 27637, 27638, 27647, 29337, 39702], + 'shàng shǎng shang': [19978], + 'qí jī': [19980, 20854, 22855], + 'bù fǒu': [19981], + 'yǔ yù yú': [19982], + miǎn: [ + 19983, 20589, 20813, 20885, 21193, 21204, 21909, 23081, 24848, 27717, 27796, + 28238, 30540, 32236, 32517, 33148, 33858, 38758, 39864, + ], + gài: [ + 19984, 20066, 21251, 21252, 25124, 27010, 27113, 27114, 28297, 28433, 29890, + 33890, 37411, 38041, + ], + chǒu: [19985, 19986, 20404, 21532, 26493, 30597, 30657, 37276, 39767], + zhuān: [ + 19987, 21440, 23269, 23554, 23560, 29820, 29966, 30742, 30935, 30938, 34788, + 35567, 37151, 38995, 39067, 40004, + ], + 'qiě jū': [19988], + pī: [ + 19989, 20243, 20286, 22140, 22383, 23727, 25013, 25209, 25259, 28811, 29385, + 29395, 30738, 30919, 30996, 30997, 31195, 31200, 32794, 35966, 37043, 37402, + 37471, 37524, 37635, 37645, 38713, 39379, 39660, 39806, + ], + shì: [ + 19990, 19991, 20106, 20107, 20181, 20365, 20895, 21183, 21218, 21323, 21609, + 21980, 22124, 22763, 22893, 23317, 23460, 24066, 24335, 24337, 24338, 24640, + 24643, 25146, 25325, 25555, 26159, 26160, 26558, 26623, 26683, 28584, 28882, + 29046, 30466, 30478, 30497, 30551, 31034, 31035, 31598, 31789, 33296, 33299, + 35179, 35222, 35270, 35298, 35430, 35475, 35553, 35610, 35797, 35877, 36016, + 36147, 36606, 36732, 36893, 36990, 37320, 37322, 37323, 37424, 37443, 37501, + 38088, 39166, 39193, 39197, 39280, 39960, + ], + qiū: [ + 19992, 20000, 22389, 23197, 24664, 24695, 27000, 31179, 31180, 31312, 31693, + 32231, 33833, 34322, 34479, 34677, 34775, 34852, 36261, 37041, 38822, 38823, + 39948, 39949, 40133, 40342, 40537, 40861, + ], + bǐng: [ + 19993, 23643, 24626, 25254, 26142, 26170, 26564, 26821, 28851, 31104, 31177, + 31263, 33514, 34499, 37044, 37429, 38467, 38790, 39173, 39200, 39292, + ], + yè: [ + 19994, 20145, 20727, 22711, 22812, 23978, 23979, 25268, 25433, 25819, 25834, + 25835, 26196, 26308, 26309, 26327, 26355, 26357, 26556, 26557, 26989, 27906, + 28082, 28594, 28904, 29121, 29207, 29837, 30371, 30641, 30648, 30991, 33099, + 33865, 35585, 35858, 37050, 37172, 37745, 37943, 38757, 38760, 38913, 39029, + 39203, 39233, 39308, 39516, 40314, 40456, + ], + cóng: [ + 19995, 20174, 21474, 23107, 23406, 24467, 24468, 24470, 24752, 27191, 27401, + 28121, 28743, 29212, 29742, 34242, 35508, 36072, 36073, 37661, + ], + dōng: [ + 19996, 20530, 20908, 21658, 22508, 23741, 23852, 24474, 26168, 26481, 27681, + 27693, 28087, 31511, 33523, 33732, 34624, 39831, 39903, 40327, 40363, 40491, + 40725, + ], + sī: [ + 19997, 20460, 20952, 21422, 21496, 21661, 22070, 22109, 23204, 24285, 24662, + 25749, 26031, 26962, 27840, 28556, 29133, 31127, 31136, 31169, 31993, 32114, + 32230, 32415, 32524, 32627, 34156, 34386, 34547, 34596, 34692, 34774, 34804, + 37488, 37551, 37750, 37889, 38198, 39096, 39124, 39462, 40421, 40502, 40758, + ], + chéng: [ + 19998, 21576, 22478, 22485, 22552, 22605, 22614, 23468, 23800, 24809, 25074, + 25104, 25215, 25392, 25473, 25576, 26536, 26838, 27225, 27289, 27910, 28311, + 28546, 29685, 29689, 30075, 31243, 31386, 31596, 32126, 33069, 33663, 35488, + 35802, 37077, 37234, 37614, 38102, 39468, 39886, + ], + diū: [19999, 20002, 37545, 38117], + liǎng: [ + 20001, 20004, 20841, 21793, 21858, 25498, 32201, 33084, 34621, 35058, 39753, + 39758, + ], + yǒu: [ + 20003, 21347, 21451, 26756, 28277, 29270, 31113, 32657, 32840, 33475, 33696, + 34575, 37193, 37546, 38101, 40669, + ], + yán: [ + 20005, 21427, 21873, 21926, 22196, 22633, 22747, 22759, 22925, 23032, 23083, + 23086, 23721, 23890, 23891, 24012, 24022, 24023, 24310, 25541, 26134, 26956, + 27280, 27369, 27413, 27839, 28814, 28815, 29439, 29698, 30416, 30878, 31605, + 31799, 33690, 34053, 34404, 34578, 35328, 35329, 35374, 35453, 35744, 37076, + 38278, 38331, 38379, 38414, 38991, 38996, 39068, 40573, 40611, + ], + bìng: [ + 20006, 20341, 20482, 20641, 22442, 25682, 26660, 30149, 31369, 31453, 35457, + 38736, 39849, + ], + 'sàng sāng': [20007], + gǔn: [ + 20008, 24771, 28378, 28414, 30937, 32196, 32498, 34008, 34057, 34926, 34974, + 36645, 36746, 39820, 39872, 40103, + ], + jiū: [ + 20009, 21244, 21886, 25578, 25579, 26427, 31350, 31998, 32416, 33819, 36211, + 38404, 39695, 39726, 40169, 40480, + ], + 'gè gě': [20010, 20491, 21508], + yā: [ + 20011, 22311, 23410, 24216, 25276, 26514, 26720, 26895, 37647, 37914, 40201, + 40232, 40310, 40486, 40493, + ], + pán: [ + 20012, 23227, 24139, 27075, 27904, 28682, 29247, 30424, 30436, 30928, 32271, + 33968, 34784, 36434, 36451, 37788, 38838, + ], + 'zhōng zhòng': [20013], + jǐ: [ + 20014, 22912, 24049, 25119, 25380, 25486, 25760, 25824, 27254, 27890, 29361, + 33034, 34414, 34787, 39778, 40062, 40578, + ], + jiè: [ + 20015, 20171, 20511, 21814, 22586, 23622, 23626, 23701, 24206, 24483, 25106, + 26960, 29335, 29600, 29758, 30028, 30029, 30117, 30734, 34471, 34550, 34936, + 35119, 35489, 35819, 37765, 39601, 39786, + ], + fēng: [ + 20016, 20217, 20561, 20732, 20968, 20972, 20974, 22950, 23543, 23553, 23791, + 23792, 23862, 26539, 26963, 27282, 27811, 27816, 28194, 28739, 28925, 29326, + 29478, 29714, 30127, 30219, 30461, 30748, 30904, 31688, 34356, 34562, 34861, + 35920, 37175, 37190, 37586, 37821, 37856, 38155, 38715, 38730, 39116, 40631, + ], + 'guàn kuàng': [20017], + chuàn: [20018, 27724, 29588, 36055, 37351, 38031], + chǎn: [ + 20019, 20135, 20865, 21111, 22213, 23932, 26101, 27984, 28411, 28763, 29986, + 29987, 31749, 33927, 34118, 35522, 35650, 35719, 35844, 37855, 38130, 38323, + 38369, 38416, 39587, + ], + lín: [ + 20020, 20903, 22755, 23818, 23961, 26036, 26237, 26301, 26519, 28542, 28726, + 29136, 29747, 29848, 30645, 30852, 30967, 31910, 31932, 32343, 32759, 33256, + 36692, 36762, 36980, 37051, 37168, 37883, 38462, 38563, 38678, 39502, 40023, + 40158, 40592, 40607, + ], + zhuó: [ + 20021, 21125, 21331, 21828, 22324, 22960, 23098, 25775, 25798, 25826, 26027, + 26030, 26033, 26034, 26037, 26219, 26899, 27978, 27998, 28609, 28796, 28917, + 29752, 30842, 31130, 31393, 31831, 31857, 32620, 33537, 34839, 34879, 35521, + 35537, 35638, 35836, 37196, 37938, 38255, 40299, 40415, + ], + zhǔ: [ + 20022, 20027, 21167, 22065, 22225, 23444, 24126, 25284, 28186, 28624, 29009, + 29038, 29149, 30633, 30682, 32604, 35421, 38524, 40448, 40584, + ], + bā: [ + 20023, 20168, 20843, 21485, 21749, 22847, 23708, 24052, 25420, 26419, 29584, + 30116, 31494, 31889, 32659, 33453, 34438, 35933, 37343, + ], + wán: [ + 20024, 21011, 23436, 23695, 25231, 25430, 27725, 28919, 29609, 29715, 31490, + 32008, 32424, 32747, 33412, 36006, 38929, 39037, + ], + dān: [ + 20025, 21231, 21296, 21336, 22921, 23173, 27546, 27563, 29972, 30472, 30723, + 31658, 31774, 32828, 32829, 32835, 32888, 35101, 35148, 36525, 37112, 37170, + 37206, 38933, + ], + 'wèi wéi': [20026], + 'jǐng dǎn': [20028], + 'lì lí': [20029], + jǔ: [ + 20030, 24326, 25369, 25831, 26887, 27017, 27032, 27384, 27397, 30697, 31589, + 32869, 33289, 33682, 33951, 35191, 36413, 40799, 40835, + ], + piě: [20031, 33508, 37893], + fú: [ + 20032, 20239, 20440, 20971, 21020, 21264, 21640, 21753, 22424, 23386, 23722, + 24063, 24087, 24133, 24158, 24343, 24447, 24619, 25206, 26603, 26687, 26740, + 27679, 27885, 28014, 28074, 28563, 28837, 29624, 30006, 30025, 30273, 31059, + 31119, 31274, 31526, 31641, 32049, 32060, 32101, 32141, 32450, 32459, 32600, + 32614, 32711, 33344, 33433, 33443, 33531, 33536, 33583, 33748, 33869, 34393, + 34472, 34569, 34656, 34970, 34993, 35142, 35173, 35560, 35943, 36414, 36667, + 36752, 37083, 37464, 37468, 38861, 38888, 39083, 39668, 39812, 39858, 40167, + 40172, 40212, 40297, 40699, + ], + 'yí jí': [20033], + yì: [ + 20034, 20041, 20100, 20134, 20159, 20231, 20287, 20350, 20427, 20740, 20863, + 21000, 21139, 21166, 21210, 21225, 21255, 21587, 21613, 21625, 21768, 22216, + 22299, 22340, 22460, 22520, 22869, 23253, 23313, 23537, 23673, 23748, 23975, + 24095, 24096, 24134, 24281, 24322, 24328, 24331, 24441, 24518, 24584, 24639, + 24722, 24847, 25014, 25036, 25087, 25233, 25401, 25953, 26131, 26233, 26304, + 26318, 26457, 26509, 26861, 27023, 27128, 27277, 27485, 27540, 27562, 27577, + 27589, 27970, 28005, 28019, 28249, 28322, 28521, 28602, 28727, 28808, 28978, + 29088, 29092, 29116, 29146, 29153, 29169, 29512, 29620, 30064, 30123, 30188, + 30231, 30238, 30257, 30292, 30410, 30614, 31315, 31465, 31698, 32266, 32374, + 32377, 32462, 32546, 32681, 32703, 32714, 32716, 32755, 32764, 32820, 32900, + 32906, 33161, 33222, 33367, 33402, 33413, 33477, 33823, 34042, 34191, 34265, + 34269, 34329, 34377, 34612, 34720, 34922, 34979, 35028, 35035, 35129, 35196, + 35378, 35379, 35405, 35427, 35516, 35695, 35696, 35739, 35758, 35793, 35811, + 35850, 35929, 35931, 35959, 35990, 36096, 36295, 36726, 36920, 37009, 37139, + 37303, 37364, 37408, 37808, 37951, 38226, 38257, 38435, 38591, 38700, 39248, + 39365, 39515, 39551, 39598, 39848, 40322, 40323, 40333, 40385, 40394, 40423, + 40446, 40451, 40541, 40546, 40659, 40824, + ], + nǎi: [20035, 20535, 22902, 23341, 24316, 27670, 30099, 33407, 36858, 37346], + wǔ: [ + 20036, 20116, 20213, 20237, 20398, 20533, 20763, 21320, 21838, 22953, 23084, + 23285, 24209, 24289, 24548, 24579, 25006, 25664, 27494, 28501, 29075, 29310, + 29597, 29687, 29798, 29970, 30868, 33310, 36492, 36821, 36892, 38490, 40289, + 40521, + ], + jiǔ: [ + 20037, 20038, 20061, 20067, 22906, 26470, 27747, 28792, 29590, 32036, 33295, + 37202, 38265, 38893, 38894, + ], + 'tuō zhé': [20039, 26452, 39346], + 'me mó ma yāo': [20040], + zhī: [ + 20043, 20481, 21358, 24053, 25624, 25903, 26624, 26772, 26917, 27056, 27713, + 27868, 30135, 31063, 31084, 31187, 31257, 32149, 32930, 32977, 32989, 33026, + 33437, 34357, 34584, 34940, 38587, 40183, 40242, 40709, + ], + 'wū wù': [20044], + zhà: [ + 20045, 21668, 23473, 25662, 27048, 28320, 30148, 34481, 35408, 35784, 37281, + 38661, + ], + hū: [ + 20046, 20079, 21282, 21291, 21628, 21823, 22033, 22400, 23523, 24160, 24573, + 24794, 26130, 27473, 27864, 28148, 28409, 28864, 33528, 34381, 34390, 35644, + 36580, 36727, 38608, + ], + fá: [ + 20047, 20240, 20640, 22394, 22433, 22690, 22978, 26672, 27980, 30594, 31529, + 31567, 32602, 32624, 32632, 34245, 38309, 38400, + ], + 'lè yuè yào lào': [20048, 27138], + yín: [ + 20049, 21535, 22102, 22170, 22273, 22432, 22820, 23148, 23493, 23806, 23839, + 23855, 27309, 27557, 27903, 28139, 28379, 28878, 29374, 29434, 29836, 30797, + 30866, 33654, 34089, 35348, 35354, 35361, 35518, 37150, 37405, 37504, 38134, + 38698, 40419, 40806, + ], + pīng: [20050, 20444, 23049, 28036, 30009, 30767, 32864, 33397, 38953], + pāng: [20051, 28354, 33006, 33174, 38641, 38710], + qiáo: [ + 20052, 20392, 20689, 23286, 24980, 26725, 27095, 27189, 27211, 27381, 29342, + 30631, 30810, 30980, 33613, 33630, 34126, 34286, 35673, 36267, 37896, 38802, + 38845, 39014, + ], + hǔ: [20053, 29733, 33792, 34382, 34397, 37695, 39921], + guāi: [20054], + 'chéng shèng': [20055, 20056, 23053], + yǐ: [ + 20057, 20059, 20197, 20506, 20591, 23327, 23866, 24050, 24225, 25158, 25914, + 25980, 26065, 26070, 27301, 30691, 30994, 31510, 33315, 33380, 33505, 33506, + 34433, 34712, 34811, 35071, 36390, 36642, 36697, 36888, 37199, 37332, 37400, + 37487, 38023, 38999, 40166, 40814, + ], + 'háo yǐ': [20058], + 'niè miē': [20060], + qǐ: [ + 20062, 20225, 21551, 21784, 21843, 21844, 21855, 23117, 23674, 26462, 26856, + 29592, 30400, 32186, 32494, 33425, 35564, 36215, 37012, 38361, + ], + yě: [20063, 20918, 22050, 22492, 22724, 28444, 37326], + xí: [ + 20064, 21946, 23219, 23949, 24109, 26938, 27268, 28445, 32722, 33990, 34989, + 35186, 35233, 35275, 35637, 36248, 37067, 37812, 38576, 38699, 39105, 39473, + 39485, 39528, 39996, 40155, + ], + xiāng: [ + 20065, 21410, 24258, 24512, 27007, 27392, 28248, 29910, 31269, 31665, 32215, + 32515, 33207, 33431, 33835, 33881, 34188, 35140, 37111, 37129, 37130, 37141, + 38002, 38262, 39321, 39524, 39591, 40028, 40600, + ], + shū: [ + 20070, 20495, 20496, 20789, 21460, 23005, 23575, 25234, 25491, 25669, 25860, + 26360, 26530, 26803, 27166, 27530, 27571, 27641, 27642, 28113, 28717, 28930, + 30094, 30095, 32019, 32128, 32446, 33298, 33789, 34092, 36360, 36567, 36664, + 36755, 37123, 38478, 39835, 40296, + ], + dǒu: [20071, 25238, 26515, 34474, 37380, 38439, 38497], + shǐ: [ + 20072, 20351, 20824, 21490, 22987, 23465, 23630, 27009, 30690, 31542, 35925, + 37442, 39387, 39542, + ], + jī: [ + 20073, 20703, 20987, 21001, 21007, 21086, 21501, 21799, 21918, 21976, 22064, + 22334, 22522, 22716, 23020, 23632, 23878, 23879, 25731, 25802, 26398, 26426, + 26501, 27181, 27231, 27588, 28608, 29316, 29585, 29859, 30072, 30079, 30314, + 30710, 30959, 31215, 31309, 31492, 31571, 31637, 31754, 32193, 32641, 32647, + 32648, 32813, 32908, 33448, 34368, 35209, 35210, 35663, 35684, 35749, 36075, + 36087, 36173, 36347, 36369, 36491, 36536, 37512, 37668, 37910, 37959, 37977, + 38574, 38622, 38847, 38898, 39138, 39249, 39269, 39765, 40174, 40335, 40378, + 40388, 40452, 40481, 40782, 40783, 40785, + ], + náng: [20074, 22178, 27420, 34864, 39266], + jiā: [ + 20075, 20339, 20642, 21152, 22025, 25272, 26551, 26780, 27616, 27847, 27971, + 28025, 29324, 29491, 29640, 30146, 31539, 31960, 32798, 33141, 33901, 34952, + 35949, 35985, 36303, 36838, 37483, 37813, 38227, 40208, 40602, + ], + jù: [ + 20076, 20520, 20534, 20855, 21095, 21127, 21230, 22503, 22526, 22729, 22998, + 23654, 23656, 23712, 24040, 24042, 24583, 24807, 24883, 25029, 25084, 25298, + 25312, 26139, 27499, 27952, 28605, 28844, 28901, 29323, 31212, 31405, 31414, + 31796, 31892, 32799, 32858, 34401, 34487, 35406, 35765, 35942, 36317, 36382, + 36486, 36989, 37037, 37301, 37445, 37947, 38044, 39094, 39123, 39375, 39828, + ], + shí: [ + 20077, 21313, 22488, 22610, 23036, 23454, 23455, 23508, 23526, 23765, 23925, + 26102, 26105, 26178, 27055, 28252, 28321, 28859, 31055, 31437, 34432, 34645, + 36795, 36936, 37456, 39136, 39267, 39830, 39971, 40101, 40747, 40749, + ], + mǎo: [ + 20078, 20871, 21359, 23745, 25148, 26164, 27862, 31543, 34025, 37466, 38086, + ], + mǎi: [20080, 22058, 33644, 34130, 36023, 40438], + luàn: [20081, 20098, 37344], + rǔ: [20083, 25833, 27741, 32919, 36785, 37135], + xué: [ + 20084, 23398, 23416, 23747, 23976, 25992, 27894, 28585, 29154, 31348, 33555, + 34965, 36357, 40445, 40500, + ], + yǎn: [ + 20085, 20456, 20547, 20796, 20822, 20823, 21411, 21428, 22110, 23373, 23875, + 24024, 24026, 24327, 24861, 25133, 25162, 25217, 25513, 25564, 26350, 26940, + 27327, 27783, 28215, 28436, 29744, 29975, 30524, 32616, 33810, 34648, 34893, + 35095, 36541, 36931, 37118, 38546, 39017, 39751, 39768, 39947, 40352, 40673, + 40676, 40684, 40685, 40694, 40756, 40761, 40820, 40849, + ], + fǔ: [ + 20086, 20428, 20443, 20463, 24220, 24355, 25242, 25290, 25771, 26023, 26920, + 28367, 28964, 29995, 30425, 31776, 33104, 33105, 34565, 36628, 36741, 37081, + 37340, 37345, 38429, 38955, 39732, 40700, + ], + shā: [ + 20087, 21798, 26432, 26732, 27578, 27630, 29440, 30183, 30722, 30832, 32023, + 32378, 32433, 34097, 35039, 37801, 38121, 38327, 39679, 39782, 39882, 39883, + 40104, + ], + nǎ: [20088, 38635], + qián: [ + 20089, 20097, 20209, 20546, 21069, 22680, 23178, 23698, 25297, 25518, 27049, + 27244, 27500, 28507, 28508, 28659, 28746, 31645, 33893, 34388, 36577, 37392, + 37463, 37549, 37666, 37766, 38052, 38065, 38067, 38764, 39450, 39453, 39980, + 40660, 40666, + ], + suǒ: [ + 20090, 21794, 21993, 25152, 26267, 28305, 28345, 29712, 29713, 29795, 32034, + 35112, 37782, 37819, 37825, 38145, + ], + yú: [ + 20091, 20110, 20112, 20227, 20313, 22563, 22572, 22948, 23067, 23087, 23089, + 23337, 23859, 23886, 23899, 24858, 25205, 25540, 26079, 26977, 26992, 27014, + 27428, 27464, 27487, 27510, 28180, 28189, 28257, 28417, 28574, 29263, 29427, + 29591, 29593, 29788, 29877, 30402, 30574, 31404, 31485, 31813, 32685, 33140, + 33278, 33281, 33286, 33349, 33584, 33838, 33848, 34125, 34331, 34398, 34422, + 34643, 34744, 34919, 35093, 35238, 35278, 35547, 35619, 35840, 36400, 36671, + 36701, 36926, 37016, 37201, 37725, 38533, 38611, 38633, 39192, 39296, 39455, + 39596, 39619, 39770, 39779, 39869, 39922, 39941, 40060, 40416, 40454, 40821, + ], + zhù: [ + 20092, 20267, 20295, 20303, 22398, 22712, 22772, 23872, 25280, 26492, 26609, + 27174, 27574, 27880, 28855, 30128, 30493, 31069, 31081, 31450, 31599, 31672, + 31723, 31767, 32053, 32056, 32443, 32668, 32741, 33486, 33671, 34496, 35387, + 36015, 36142, 36307, 36596, 37458, 37619, 37956, 38136, 39349, 39376, 39547, + ], + zhě: [20093, 32773, 35126, 35189, 36205, 36407, 37754, 38167], + 'qián gān': [20094], + 'zhì luàn': [20095], + guī: [ + 20096, 22317, 22955, 23215, 23266, 23296, 24112, 24402, 25707, 26909, 27131, + 27132, 27383, 27512, 29674, 29808, 29853, 29900, 30344, 30625, 30789, 33573, + 34348, 35215, 35268, 37053, 37068, 38312, 38394, 39465, 39734, 39737, + ], + 'lǐn lìn': [20099], + jué: [ + 20101, 20915, 21012, 21122, 21303, 21413, 22090, 23378, 23379, 23835, 23851, + 23973, 24399, 24992, 25008, 25092, 25225, 25367, 25496, 25899, 26743, 27227, + 27228, 27438, 27666, 27770, 28749, 28979, 29094, 29201, 29236, 29237, 29527, + 29571, 29606, 29608, 29647, 29812, 30234, 30669, 30689, 30724, 32085, 32118, + 32477, 33220, 33461, 34141, 34152, 34419, 34792, 34793, 35286, 35310, 35324, + 35363, 35662, 35776, 35890, 35996, 36221, 36233, 36471, 36521, 37388, 37901, + 37917, 38017, 38242, 40194, 40195, 40418, + ], + 'le liǎo': [20102], + 'gè mā': [20103], + 'yǔ yú': [20104, 25049], + zhēng: [ + 20105, 20290, 20967, 22979, 23196, 23781, 23837, 23842, 24449, 24496, 28833, + 28893, 29229, 29424, 29465, 30309, 30480, 30529, 30556, 31581, 31631, 31708, + 32839, 33024, 33976, 36397, 37478, 37658, 37875, 39687, + ], + èr: [ + 20108, 21045, 21665, 24333, 24336, 27186, 35456, 36014, 36019, 36144, 39670, + ], + chù: [ + 20109, 20631, 20746, 24629, 25015, 25616, 26038, 27484, 29695, 29729, 30679, + 31436, 32064, 32460, 33221, 35302, 35320, 35926, 37136, 38310, 40668, + ], + kuī: [ + 20111, 21042, 23743, 24011, 30420, 31397, 31418, 32871, 34407, 38362, 39005, + ], + yún: [ + 20113, 20253, 21243, 21248, 22249, 22936, 24874, 25251, 26112, 27218, 27780, + 28066, 28339, 28560, 29065, 30023, 31184, 31612, 31700, 32028, 32284, 32429, + 32792, 33464, 33975, 34131, 37095, 37142, 37574, 38642, + ], + hù: [ + 20114, 20913, 21952, 22171, 23135, 23277, 23278, 23733, 24077, 24342, 24601, + 25142, 25143, 25144, 25149, 25160, 25252, 26120, 27124, 27789, 27818, 28396, + 29097, 29920, 31068, 31503, 31748, 31888, 32148, 34096, 35703, 35952, 37152, + 37721, 38912, 40047, 40160, 40184, 40460, 40561, + ], + qí: [ + 20115, 21080, 22524, 23696, 23699, 23822, 23900, 24877, 25489, 25993, 25994, + 26050, 26071, 26826, 26827, 27313, 27328, 27495, 28103, 28637, 29449, 29570, + 29734, 29738, 29826, 30054, 30119, 30849, 30869, 31041, 31048, 31098, 31141, + 31442, 31791, 31793, 31823, 31928, 32165, 32166, 32949, 33040, 33229, 33385, + 33450, 33793, 33813, 34162, 34244, 34308, 34449, 34458, 34548, 34589, 34590, + 34727, 34832, 35072, 36573, 37183, 37358, 37665, 38172, 38509, 38926, 39040, + 39438, 39439, 39481, 39568, 39569, 39696, 39743, 39893, 39981, 40111, 40141, + 40312, 40320, 40594, 40609, + ], + jǐng: [ + 20117, 20742, 21037, 21060, 22355, 23441, 24156, 25004, 26299, 27532, 27755, + 27756, 28555, 29828, 29855, 29861, 31357, 32956, 34812, 35686, 38449, 38938, + 38968, + ], + sì: [ + 20118, 20288, 20385, 20777, 20821, 21987, 22235, 22994, 23088, 23392, 23546, + 24051, 26614, 27065, 27740, 27863, 27876, 27917, 27936, 28056, 28675, 29293, + 31040, 31145, 31458, 31525, 32796, 32898, 32902, 34172, 35223, 35972, 37362, + 37430, 37435, 39140, 39164, 39282, 39391, 39427, 39543, + ], + suì: [ + 20119, 23320, 23681, 23895, 26078, 27286, 27506, 27507, 28603, 29035, 29159, + 29874, 30741, 30862, 31071, 31149, 31298, 31319, 31327, 32320, 32336, 32376, + 35162, 35510, 35682, 35847, 36069, 36995, 37894, 37929, 38567, 38882, + ], + gèn: [20120, 20121, 25583, 25604, 33563], + yà: [ + 20122, 20124, 20473, 20916, 21148, 22292, 22304, 22497, 23045, 23149, 25568, + 27689, 27692, 29373, 30737, 31247, 32848, 35198, 35200, 35357, 35766, 36711, + 36819, 40830, + ], + 'xiē suò': [20123], + 'qí zhāi': [20125, 40778], + 'yā yà': [20126, 21387, 22445, 22739, 38100], + 'jí qì': [20127, 28943], + tóu: [20128, 25237, 38957, 39600], + 'wáng wú': [20129], + 'kàng háng gāng': [20130], + dà: [20131, 30484], + jiāo: [ + 20132, 20716, 23047, 23308, 23783, 23957, 23971, 24973, 26898, 27975, 28550, + 28966, 30977, 31322, 31781, 33014, 33184, 33202, 33581, 33582, 34121, 34400, + 34527, 34797, 36324, 36679, 37066, 37902, 39509, 39556, 39851, 40091, 40257, + 40422, 40430, 40554, + ], + hài: [20133, 21968, 23475, 27686, 39168, 39258, 39405, 39412, 39559], + 'hēng pēng': [20136], + mǔ: [ + 20137, 22982, 23764, 25287, 27597, 29281, 29299, 30018, 30022, 30034, 30045, + 30046, 30062, 30762, 32991, 36359, 37479, + ], + ye: [20138], + xiǎng: [ + 20139, 20143, 21709, 24819, 26193, 34435, 34817, 38911, 39144, 39177, 39255, + 39287, 39837, 39895, 40054, 40094, + ], + jīng: [ + 20140, 20144, 20834, 22357, 22361, 23131, 24778, 26060, 26061, 26230, 27256, + 27902, 28039, 29444, 30555, 31188, 31241, 31923, 31934, 32076, 32147, 32161, + 32857, 33096, 33550, 33606, 33610, 33729, 33871, 39514, 39912, 40120, 40321, + 40324, 40598, 40608, 40753, + ], + tíng: [ + 20141, 20572, 23159, 23881, 24237, 24311, 26975, 27059, 31603, 32868, 33691, + 33910, 34579, 34639, 35562, 37010, 38662, 40750, + ], + liàng: [ + 20142, 21928, 24738, 26238, 28280, 35538, 35845, 36620, 36635, 36742, 37700, + ], + 'qīn qìng': [20146, 35242], + bó: [ + 20147, 20194, 20412, 20720, 21338, 24091, 24893, 25066, 25388, 25615, 27394, + 28001, 28159, 28196, 29055, 29268, 29403, 29917, 31028, 31201, 31636, 31769, + 31978, 32969, 33046, 33162, 33334, 33354, 33825, 33895, 34991, 35151, 35182, + 35592, 36387, 37091, 37432, 37457, 37581, 37787, 37998, 38073, 38082, 38216, + 39226, 39310, 39323, 39326, 39361, 39406, 39539, 39622, 40275, 40513, + ], + yòu: [ + 20148, 20305, 20326, 20369, 21448, 21491, 21706, 21760, 22271, 23031, 23461, + 23775, 24188, 29398, 31056, 34484, 35480, 35825, 35969, 36854, 37229, 37321, + 40748, + ], + xiè: [ + 20149, 20275, 20574, 20592, 20673, 21352, 21368, 22119, 22638, 22801, 23199, + 23633, 23655, 24296, 24482, 25032, 26284, 26800, 27021, 27053, 27899, 27945, + 28203, 28581, 28681, 28707, 28794, 28839, 28840, 29166, 29205, 29548, 31044, + 31164, 31951, 32050, 32079, 32108, 32370, 32392, 32449, 32567, 34210, 34212, + 34809, 34831, 35081, 35131, 35613, 35874, 36510, 36994, 38782, 38896, 40770, + 40792, 40795, 40805, + ], + 'dǎn dàn': [20150, 39358], + lián: [ + 20151, 21126, 21298, 21299, 22009, 22098, 22849, 22889, 23294, 24088, 24265, + 24604, 24976, 28063, 28451, 28610, 28627, 28718, 29073, 29163, 31806, 31842, + 31848, 32314, 32756, 32852, 32872, 32875, 32878, 32879, 33217, 33714, 34030, + 34197, 34698, 34826, 35042, 35123, 35229, 35632, 36453, 36830, 36899, 37772, + 37934, 38256, 39697, 39985, 40098, + ], + duǒ: [ + 20152, 21722, 22194, 22517, 23836, 26421, 26422, 32158, 32525, 36243, 36529, + 36530, 36547, + ], + 'wěi mén': [20153, 26006], + rén: [ + 20154, 20155, 20161, 22764, 24520, 24526, 26418, 31170, 33442, 39772, 40256, + ], + jí: [ + 20156, 20157, 20235, 20342, 20590, 21337, 21363, 21373, 21450, 21469, 21513, + 22578, 22601, 23006, 23241, 23692, 23924, 23983, 24438, 24547, 24613, 24881, + 25122, 25572, 26497, 26840, 26987, 26997, 27081, 27293, 27547, 27762, 28242, + 28503, 30142, 30240, 30349, 31496, 31679, 31821, 32026, 32423, 33164, 33381, + 33978, 34112, 34170, 34637, 34703, 35147, 35289, 35899, 36374, 36432, 36516, + 36655, 36698, 36753, 37062, 37537, 37715, 37878, 38598, 38631, 38709, 40545, + ], + wáng: [20158, 20220, 20838, 33699, 34463], + 'shén shí': [20160], + lè: [ + 20162, 21499, 24519, 27707, 27856, 29583, 30771, 31765, 33403, 38430, 38903, + 39182, 39987, 40051, 40147, + ], + dīng: [20163, 21486, 24068, 29582, 30100, 30447, 32821, 34416, 38762], + zè: [20164, 23857, 24194, 25425, 26115, 26135, 27716], + 'jǐn jìn': [20165, 20677, 23268], + 'pú pū': [20166], + 'chóu qiú': [20167], + zhǎng: [20169, 24165, 25484, 30979], + jīn: [ + 20170, 22587, 24062, 24781, 26020, 27941, 29650, 29755, 29857, 30747, 31563, + 33621, 34943, 35167, 35284, 37329, 37330, 37375, 38021, 40566, 40645, + ], + bīng: [20172, 20178, 20853, 20907, 20912, 25508, 27703, 37618], + réng: [20173, 31037, 33471, 36792, 38526], + fó: [20175, 22386, 26811], + 'jīn sǎn': [20176], + lún: [ + 20177, 20262, 20374, 20523, 22261, 22279, 23144, 23832, 23833, 26822, 27814, + 28138, 30958, 33088, 33749, 34598, 36378, 36650, 36718, 37632, 38511, 39913, + ], + cāng: [ + 20179, 20218, 20489, 20948, 23906, 27815, 28356, 28664, 29514, 33329, 33369, + 33485, 33980, 34725, 40487, + ], + 'zǎi zǐ zī': [20180], + tā: [ + 20182, 22604, 23427, 27033, 28347, 29280, 31042, 35103, 36287, 36962, 38375, + ], + fù: [ + 20184, 20585, 20613, 20904, 21103, 21648, 22399, 22797, 22919, 23142, 23181, + 23316, 23500, 24489, 26929, 31060, 31139, 31438, 32238, 32283, 32538, 33145, + 33839, 34151, 34489, 34519, 34652, 34670, 34973, 35079, 35204, 35206, 35331, + 35394, 35747, 36000, 36070, 36091, 36127, 36171, 36185, 36212, 36665, 37713, + 37730, 38428, 38468, 39333, 39385, 39544, 39826, 39954, 40075, 40134, + ], + xiān: [ + 20185, 20186, 20321, 20682, 20722, 20808, 22037, 22910, 23667, 24303, 24570, + 25016, 25472, 26297, 26484, 27673, 29655, 31046, 31176, 31868, 32330, 32398, + 32406, 33518, 35132, 35187, 36345, 36462, 36506, 37232, 37697, 38184, 38895, + 38897, 39334, 40059, 40369, + ], + 'tuō chà duó': [20187], + hóng: [ + 20188, 21552, 22444, 22917, 23042, 23439, 23446, 24344, 24395, 27759, 27859, + 27946, 28004, 28209, 28482, 29586, 29596, 30804, 31441, 31460, 31690, 31904, + 32024, 32045, 32139, 32430, 32707, 32733, 32830, 33520, 33645, 33874, 33875, + 35897, 35900, 37404, 37495, 37584, 38286, 38387, 38672, 38687, 38787, 39775, + 40251, 40511, 40649, 40652, + ], + tóng: [ + 20189, 20319, 21699, 23746, 23773, 24221, 24420, 26189, 26312, 26704, 27651, + 28021, 28540, 29341, 29534, 30510, 30643, 30780, 31217, 31461, 31905, 33191, + 33596, 34450, 35447, 36200, 37230, 37462, 37493, 37509, 38108, 39175, 39846, + 40086, + ], + rèn: [ + 20190, 20205, 20995, 20996, 22922, 23001, 23675, 23683, 25192, 29283, 31053, + 32009, 32029, 32077, 32427, 32436, 32917, 33101, 34941, 34997, 35346, 35469, + 35748, 35761, 36564, 36715, 37395, 38765, 38769, 38860, 38887, 39146, 39169, + 39274, + ], + qiān: [ + 20191, 20325, 20681, 21315, 22322, 22903, 23407, 23693, 24749, 24838, 24947, + 25190, 25322, 25652, 25729, 25872, 25873, 25875, 26436, 27343, 27736, 27751, + 29301, 29309, 31439, 31614, 31805, 31830, 31844, 31873, 33418, 33598, 34440, + 35120, 35536, 35609, 35878, 35896, 36801, 36983, 37370, 37382, 37467, 37874, + 38030, 38433, 38854, 38981, 39467, 39582, 39708, 39709, 40302, 40528, + ], + 'gǎn hàn': [20192], + 'yì gē': [20193], + dài: [ + 20195, 20386, 21447, 22408, 22509, 23729, 24082, 24102, 24111, 24118, 24279, + 24608, 25140, 26307, 26571, 27526, 28731, 29619, 29767, 29977, 31780, 32063, + 32255, 32464, 33372, 34675, 34955, 35190, 36003, 36151, 36443, 36561, 36570, + 36585, 36714, 36840, 38708, 38726, 40207, 40667, 40689, + ], + 'lìng líng lǐng': [20196], + chào: [20198, 32790, 35288], + 'cháng zhǎng': [20199, 20815, 38263, 38271], + sā: [20200], + cháng: [ + 20201, 20607, 20767, 22039, 22160, 23270, 23581, 24120, 24476, 29818, 29946, + 29982, 32928, 33144, 33171, 33484, 33799, 38264, 40040, 40127, + ], + yí: [ + 20202, 20359, 20736, 20893, 21276, 21670, 22319, 22839, 23016, 23440, 23452, + 23463, 23538, 23763, 23980, 23991, 24056, 24411, 24412, 24413, 24414, 24609, + 24670, 25157, 26246, 26648, 26924, 26936, 27778, 27935, 29098, 29941, 30157, + 31227, 31747, 31822, 32672, 33008, 33811, 34534, 34708, 35322, 35643, 36029, + 36155, 36320, 36859, 36986, 37844, 38921, 38948, 38949, 38986, 39056, 39284, + 39847, 40250, + ], + mù: [ + 20203, 20969, 21215, 22675, 24149, 24153, 24916, 24917, 26286, 26287, 26408, + 26968, 27619, 27792, 28817, 29287, 29383, 30446, 30566, 31302, 33362, 33500, + 33711, 34462, 37484, 38076, 38638, 38658, + ], + 'men mén': [20204], + fǎn: [20206, 21453, 27214, 36820], + 'chào miǎo': [20207], + 'yǎng áng': [20208], + zhòng: [ + 20210, 20247, 22585, 22933, 23185, 29382, 30526, 31052, 31575, 33597, 34459, + 34886, 34934, 35557, + ], + 'pǐ pí': [20211], + wò: [ + 20212, 20563, 21351, 23177, 24132, 25569, 26947, 27779, 28197, 28643, 29889, + 30595, 30826, 32927, 33115, 33253, 40823, 40844, + ], + jiàn: [ + 20214, 20468, 20581, 20717, 21073, 21091, 21105, 21133, 21134, 21138, 21140, + 22713, 23499, 24314, 24484, 25846, 26068, 26967, 27645, 27914, 28071, 28567, + 29294, 29652, 30647, 30965, 30976, 31661, 31947, 32349, 33137, 33270, 33328, + 33382, 33616, 34214, 35256, 35539, 35563, 35675, 35855, 36046, 36068, 36145, + 36253, 36341, 36368, 36410, 36702, 37492, 37747, 37749, 37937, 37969, 37970, + 37996, 38003, 38190, 38291, 39198, 39279, + ], + 'jià jiè jie': [20215], + 'yǎo fó': [20216], + 'rèn rén': [20219], + 'fèn bīn': [20221], + dī: [ + 20222, 20302, 21874, 22494, 22564, 23739, 24445, 27136, 28404, 30974, 31210, + 32669, 34971, 36230, 38532, 38830, + ], + fǎng: [ + 20223, 20515, 26058, 26121, 26136, 29932, 30470, 32033, 32442, 33323, 35370, + 35775, 39651, 40365, + ], + zhōng: [ + 20224, 21027, 22928, 24146, 24440, 24544, 26570, 27767, 27848, 28802, 30405, + 31846, 32066, 32456, 33327, 34080, 34585, 34724, 34749, 34931, 34935, 36465, + 37409, 37758, 37912, 38047, 38202, 40228, 40744, + ], + pèi: [ + 20226, 20329, 23029, 24084, 26046, 26054, 27803, 28031, 29678, 34012, 36705, + 36756, 37197, 38664, 39351, + ], + diào: [ + 20228, 21514, 24340, 25481, 30265, 30404, 31374, 31413, 31464, 35339, 37347, + 37407, 37553, 37629, 37955, 38035, 38110, 38655, 39777, + ], + dùn: [ + 20229, 28513, 28822, 29129, 30462, 30744, 30903, 36402, 36871, 36929, 36975, + 37389, 38045, + ], + wěn: [ + 20230, 21006, 21563, 21573, 25222, 26749, 31283, 31311, 31337, 32010, 32947, + 33047, + ], + xǐn: [20232], + kàng: [20233, 21279, 22245, 25239, 28821, 37415, 38058], + ài: [ + 20236, 20734, 22631, 22738, 23250, 23329, 24859, 25043, 26279, 26326, 29233, + 29815, 29862, 30375, 30649, 30777, 30795, 30861, 31001, 34182, 35706, 36089, + 37952, 38552, 38729, 39218, 39332, 40043, 40241, + ], + 'jì qí': [20238, 34234], + 'xiū xǔ': [20241], + 'jìn yín': [20242], + dǎn: [ + 20244, 21008, 25762, 29612, 29933, 32030, 32966, 33213, 34932, 36071, 36181, + 40661, + ], + fū: [ + 20245, 21579, 23056, 23413, 23555, 24612, 25071, 25975, 26057, 29598, 30726, + 31235, 31583, 31952, 32146, 32932, 33178, 33602, 33652, 34925, 36282, 36311, + 37022, 37148, 37212, 37383, 40617, 40620, 40625, 40632, + ], + tǎng: [ + 20246, 20645, 20795, 22507, 25091, 26349, 29219, 30680, 36538, 37810, 38018, + 38219, + ], + yōu: [ + 20248, 20778, 21606, 22168, 23795, 24189, 24551, 24736, 24962, 25912, 27340, + 28410, 28672, 32395, 32682, 32816, 36876, 37182, 40576, + ], + huǒ: [20249, 22821, 28779, 29047, 37033, 37413, 38060], + 'huì kuài': [20250, 26371, 27981, 29871], + yǔ: [ + 20251, 20417, 20451, 20554, 20660, 21292, 22131, 22276, 22281, 23431, 23513, + 23679, 23996, 24254, 25383, 25940, 26014, 26944, 29760, 30224, 31076, 31161, + 31333, 31411, 32701, 33287, 33837, 35984, 37125, 38952, 40588, 40812, 40841, + ], + cuì: [ + 20252, 21851, 24560, 24756, 27635, 28140, 28960, 30121, 30209, 31425, 31883, + 31929, 32035, 32183, 32710, 32736, 33027, 33030, 33082, 33196, 33205, 33230, + 33795, 35146, 38983, + ], + sǎn: [20254, 20632, 31972, 32342, 39242, 39315], + wěi: [ + 20255, 20266, 20553, 20605, 20702, 20784, 23059, 23530, 23639, 23843, 23945, + 24491, 24839, 25444, 26256, 26806, 27943, 27992, 28200, 28828, 29010, 29477, + 29614, 29771, 30207, 32239, 32428, 33138, 33353, 33435, 33479, 33649, 33806, + 33894, 33933, 34111, 34620, 35529, 35839, 36371, 37729, 38865, 38873, 38881, + 38890, 38944, 39097, 39593, 39594, 39595, 39850, 40084, + ], + 'chuán zhuàn': [20256, 20659], + 'chē jū': [20257, 20453, 36554, 36710], + yá: [ + 20258, 21393, 21395, 22544, 23688, 23829, 23830, 28079, 28420, 29273, 29601, + 29706, 30554, 31500, 33469, 34460, 34905, 40790, + ], + qiàn: [ + 20259, 20436, 20521, 20761, 21003, 22733, 23345, 24723, 26824, 26912, 27111, + 27424, 27465, 30360, 31695, 31711, 32308, 33441, 33960, 34099, 36644, + ], + shāng: [ + 20260, 20663, 21830, 22674, 24943, 27527, 27556, 28403, 28449, 29109, 34063, + 34730, 35294, 35316, 35626, 39738, + ], + chāng: [ + 20261, 20480, 23100, 26124, 26905, 28112, 29462, 29737, 33750, 35054, 37673, + 38176, 38326, 38410, 39911, 40115, 40730, + ], + 'chen cāng': [20263], + xùn: [ + 20264, 20378, 21314, 22080, 24058, 24061, 24455, 24891, 27529, 27582, 27739, + 28512, 29413, 34120, 35338, 35347, 35353, 35757, 35759, 36805, 36863, 36874, + 36956, 37954, 39016, 39348, 39535, + ], + xìn: [20265, 22239, 23390, 33066, 33291, 34885, 35371, 37313, 38432, 38998], + chǐ: [ + 20268, 20360, 21366, 21498, 21582, 22417, 24677, 27503, 32827, 32916, 32995, + 34439, 35053, 35115, 35913, 37497, 40786, 40831, + ], + 'xián xuán': [20269], + 'nú nǔ': [20270], + 'bǎi bó': [20271], + 'gū gù': [20272], + nǐ: [ + 20273, 20320, 20766, 23412, 25311, 25836, 26062, 26226, 29396, 33512, 34239, + 38572, + ], + 'nì ní': [20274], + bàn: [ + 20276, 21150, 21322, 22981, 24593, 25198, 29923, 31194, 32070, 32458, 36774, + 37473, 38781, + ], + xù: [ + 20277, 20368, 21206, 21207, 21369, 21465, 22463, 22779, 23167, 24207, 24676, + 25933, 25944, 26093, 26155, 26370, 27090, 27440, 27528, 27775, 27776, 27947, + 28294, 28469, 28490, 28869, 28924, 29030, 29533, 29676, 30434, 30593, 31288, + 32110, 32154, 32210, 32214, 32396, 32490, 32493, 32851, 32863, 33988, 34266, + 35385, 36041, 37207, 38922, 40046, + ], + zhòu: [ + 20279, 20733, 20881, 21610, 21650, 21678, 23449, 26172, 26205, 29955, 30385, + 30394, 31808, 31826, 31829, 31897, 32002, 32272, 32419, 32457, 32964, 33646, + 33892, 35403, 37198, 39374, 39519, 39588, + ], + shēn: [ + 20280, 20353, 20831, 21627, 22548, 22973, 23072, 23678, 23799, 25183, 25938, + 26321, 26587, 27680, 28145, 29130, 29637, 29985, 29991, 30003, 30482, 30775, + 31356, 31862, 31864, 31938, 32051, 32453, 32601, 32615, 33888, 34017, 34072, + 34195, 35025, 35383, 35445, 35804, 36523, 39402, 39891, 39925, 39994, 40121, + 40290, + ], + qū: [ + 20281, 20297, 21284, 21631, 22373, 23624, 23702, 23732, 23943, 24968, 25278, + 25978, 27968, 28992, 31067, 31553, 31916, 32992, 34502, 34512, 34986, 35259, + 35416, 35790, 36237, 36527, 36544, 38457, 39366, 39368, 39493, 39537, 39671, + 39804, 39992, 40011, 40332, 40623, 40628, 40633, 40674, + ], + 'sì cì': [20282], + bēng: [20283, 22051, 22879, 23849, 23917, 38285], + 'sì shì': [20284], + 'jiā qié gā': [20285], + 'yǐ chì': [20289], + 'diàn tián': [20291, 38079], + 'hān gàn': [20292], + mài: [ + 20293, 21154, 21233, 21334, 21787, 22770, 33032, 34887, 36067, 36808, 36993, + 38689, 38690, 40613, 40614, + ], + dàn: [ + 20294, 20708, 21846, 21847, 21887, 22089, 22186, 24078, 25018, 26086, 26598, + 27694, 27786, 27897, 28129, 29402, 30093, 30298, 31147, 31390, 33093, 33807, + 34014, 34507, 34577, 35291, 35345, 35477, 35806, 36105, 38702, 39204, 39247, + 39411, 39655, 40224, + ], + bù: [ + 20296, 21199, 21541, 21656, 22487, 22496, 24067, 24269, 24598, 24721, 27493, + 27496, 27497, 29951, 31728, 33657, 34048, 36356, 37096, 37110, 37384, 38042, + 39202, + ], + bǐ: [ + 20298, 20478, 21269, 22838, 22947, 24444, 26428, 26560, 27604, 27614, 27800, + 30101, 31189, 31508, 31558, 31875, 32859, 33325, 35983, 37145, + ], + 'zhāo shào': [20299], + cǐ: [20300, 27492, 27866, 30345], + wèi: [ + 20301, 21355, 21619, 21890, 22683, 23206, 24944, 25024, 26410, 28205, 29023, + 29101, 29338, 29484, 30031, 32237, 32635, 32963, 33535, 33739, 34287, 34358, + 34655, 34737, 34907, 34910, 35133, 35586, 35718, 35727, 35859, 36503, 36507, + 36558, 36682, 37839, 38696, 39207, 39221, 39254, 39759, 39815, 40154, + ], + zuǒ: [20304, 24038, 32339], + yǎng: [ + 20306, 20639, 20859, 22385, 23711, 24899, 25065, 25857, 27687, 27697, 28852, + 30162, 30306, 31010, 32059, 34630, 36590, 39178, 39386, + ], + 'tǐ tī': [20307, 39636], + zhàn: [ + 20308, 20577, 23960, 25112, 25126, 25136, 26632, 26719, 26855, 28251, 31449, + 32187, 32509, 33754, 34360, 34405, 34406, 35687, 36687, 39503, + ], + 'hé hē hè': [20309], + bì: [ + 20310, 21639, 21716, 22006, 22354, 22555, 22721, 22896, 22972, 23138, 23318, + 24065, 24163, 24164, 24199, 24243, 24294, 24330, 24379, 24380, 24387, 24517, + 24621, 24842, 24846, 25949, 25987, 26768, 27605, 27606, 27609, 28258, 28375, + 28397, 28535, 29007, 29082, 29428, 29528, 29529, 29644, 29863, 30016, 30050, + 30122, 30201, 30202, 30357, 30564, 30887, 31578, 31621, 31622, 31718, 31731, + 31882, 32188, 32298, 32372, 32636, 33143, 33534, 33628, 33798, 33822, 34006, + 34045, 34109, 34204, 34572, 34960, 35141, 35166, 35171, 35313, 35414, 35792, + 36017, 36116, 36177, 36344, 36437, 36483, 36484, 36991, 37042, 37160, 37162, + 37453, 37838, 37940, 38091, 38279, 38281, 38303, 38381, 38491, 38880, 39158, + 39238, 39325, 39388, 39494, 39616, 39763, 39813, 40413, 40425, 40714, + ], + tuó: [ + 20311, 22376, 22582, 23726, 27094, 27216, 27825, 30755, 30756, 30882, 32061, + 35409, 36302, 37217, 38436, 38464, 38465, 39389, 39390, 39464, 39506, 39517, + 39548, 39808, 40213, 40501, 40713, 40717, 40743, + ], + shé: [20312, 33292, 34421, 34533], + 'yì dié': [20314, 26163, 27846, 36604], + 'fó fú bì bó': [20315], + 'zuò zuō': [20316], + gōu: [ + 20317, 27807, 28317, 30144, 31709, 31804, 32241, 32529, 34983, 35104, 37390, + 37476, 38057, 38834, 38877, + ], + nìng: [20318, 20395, 20543, 23509, 27870, 28573, 28632], + qú: [ + 20322, 21164, 25141, 26026, 27403, 27412, 27661, 28141, 28744, 29216, 29846, + 29865, 30319, 30962, 31847, 32071, 32970, 33246, 33731, 33867, 34134, 34343, + 34781, 34871, 34876, 34896, 34914, 36515, 36581, 38010, 40221, 40476, 40498, + 40745, + ], + 'yōng yòng': [20323], + wǎ: [20324, 21651, 30745, 37047], + kǎ: [20327, 22448, 33001, 35011, 37490], + bāo: [ + 20328, 21241, 21253, 23394, 29042, 31523, 32990, 33502, 34132, 35046, 35090, + 35139, 38337, 40793, 40837, + ], + 'huái huí': [20330], + 'gé hè': [20331], + lǎo: [ + 20332, 21694, 24645, 26675, 29419, 29679, 30803, 32769, 32770, 33622, 34543, + 36689, 37536, 38097, 39857, + ], + xiáng: [20333, 24224, 26649, 31077, 32116, 32724, 35443, 36333], + gé: [ + 20334, 21260, 21572, 21981, 22629, 24837, 25356, 25663, 27077, 27338, 28358, + 33160, 33269, 33558, 35297, 35581, 36661, 36693, 38307, 38401, 38548, 38839, + 38864, 38874, 39444, 39612, 39855, + ], + yáng: [ + 20335, 21175, 22431, 23864, 24457, 25196, 25562, 25965, 26104, 26140, 26264, + 26472, 26954, 27915, 28800, 29660, 30113, 30221, 30523, 34520, 35577, 36656, + 37722, 38038, 38438, 38451, 38525, 38711, 39098, 39119, 39953, 40249, 40457, + ], + bǎi: [20336, 25453, 25670, 25850, 26658, 30334, 31457, 31912, 35180], + fǎ: [20337, 23772, 27861, 28747, 30749, 37701], + mǐng: [20338, 20949, 23027, 24911, 37225], + 'èr nài': [20340], + hěn: [20343, 24456, 29408, 35434], + huó: [20344, 27963], + guǐ: [ + 20345, 21286, 21293, 21420, 22429, 23037, 23428, 24203, 24234, 24657, 26231, + 28224, 30328, 31082, 31755, 34539, 34785, 35300, 35437, 35809, 36556, 36712, + 38482, 39740, + ], + quán: [ + 20346, 20840, 21875, 22498, 23038, 23761, 24015, 25331, 25660, 26435, 27006, + 27177, 27402, 27849, 27940, 28278, 29303, 29320, 29780, 30154, 30786, 31564, + 32275, 33603, 33906, 34615, 34872, 35296, 35438, 35808, 36327, 36385, 36615, + 36737, 37275, 37523, 38120, 38350, 39028, 39079, 39401, 39457, 39688, 39937, + 40136, 40804, + ], + tiāo: [20347, 24227, 26091, 31079, 32846], + jiǎo: [ + 20348, 20748, 23362, 25378, 25605, 25759, 25785, 25898, 25963, 25981, 25983, + 26184, 26270, 26322, 28762, 29150, 29409, 29868, 30350, 30374, 32094, 32400, + 32478, 33139, 33259, 34780, 35665, 36043, 36363, 37496, 38128, 39171, 39290, + 40014, 40867, + ], + cì: [ + 20349, 21054, 24219, 26431, 26664, 27425, 32088, 33574, 33727, 34515, 34694, + 36060, 36176, + ], + xíng: [ + 20352, 21009, 21720, 22411, 23065, 24418, 27920, 30798, 34549, 37026, 37065, + 37379, 37494, 37522, 38040, 38095, 38473, 38488, 39219, + ], + tuō: [ + 20354, 21635, 21660, 22315, 25176, 25301, 25302, 27729, 33067, 33073, 33676, + 34981, 35351, 35756, 39141, 39270, 39776, 39861, + ], + kǎn: [20355, 20568, 20890, 22350, 24770, 30733, 33712, 36641, 36695, 38993], + zhí: [ + 20356, 20516, 20540, 22516, 22519, 23018, 23298, 25120, 25191, 25709, 26893, + 27188, 28116, 28432, 30452, 31107, 32119, 32310, 32832, 32844, 32887, 33201, + 34777, 36310, 36399, 36448, 36497, 36548, 37342, 39357, + ], + gāi: [ + 20357, 22419, 23007, 23760, 26192, 30049, 31092, 33604, 35442, 35813, 35941, + 36037, 36044, 36165, 38484, + ], + lái: [ + 20358, 20459, 20488, 23811, 23821, 24242, 26469, 26814, 26870, 28062, 28150, + 29453, 29724, 31577, 31618, 33713, 33802, 36904, 37106, 37688, 38140, 39435, + 39904, 40326, 40627, + ], + kuǎ: [20361, 21685, 22446, 37529], + gōng: [ + 20362, 20844, 21151, 21265, 21268, 22632, 23467, 23470, 24037, 24138, 24339, + 24685, 25915, 26459, 30909, 31996, 31999, 32945, 35301, 35317, 36524, 36531, + 39672, 40852, 40858, + ], + lì: [ + 20363, 20432, 20458, 20616, 20782, 20791, 20947, 21033, 21147, 21169, 21237, + 21382, 21385, 21412, 21423, 21426, 21459, 21519, 21590, 21774, 21811, 22182, + 22215, 22364, 22619, 22754, 23091, 23151, 23668, 23718, 24743, 24759, 24900, + 25150, 25646, 26278, 26310, 26334, 26424, 26533, 26627, 26647, 26651, 27306, + 27348, 27370, 27408, 27508, 27511, 27813, 27828, 28054, 28327, 28671, 28701, + 29199, 29345, 29441, 29653, 29806, 29893, 29905, 29925, 30124, 30178, 30311, + 30445, 30553, 30725, 30778, 30782, 30975, 31018, 31019, 31024, 31154, 31197, + 31435, 31520, 31717, 31890, 31901, 31986, 33079, 33480, 33560, 33620, 33669, + 33673, 33946, 33950, 34294, 34488, 34510, 34528, 34599, 34679, 34823, 34851, + 35400, 35720, 36210, 36706, 36707, 36729, 37192, 37469, 38582, 38583, 38643, + 38722, 38731, 39681, 40168, 40215, 40389, 40604, + ], + yīn: [ + 20364, 20944, 21905, 22142, 22233, 22240, 22420, 22553, 23035, 23139, 24852, + 24903, 26678, 27684, 27911, 28341, 28646, 30230, 31115, 31221, 31555, 32106, + 32248, 33589, 33937, 34093, 35008, 35570, 37542, 38111, 38345, 38437, 38452, + 38512, 38523, 38530, 38674, 38688, 38791, 38899, 38910, 39408, 39555, 40791, + ], + mǐ: [ + 20366, 23370, 24365, 25929, 27939, 28211, 28758, 31859, 31886, 32651, 33042, + 33416, 33886, 34077, 37540, + ], + zhū: [ + 20367, 26666, 27104, 27237, 27367, 27371, 27929, 28532, 28710, 29482, 29664, + 30787, 31228, 32081, 33585, 34127, 34523, 34667, 34857, 35006, 35461, 35576, + 35803, 35832, 35948, 36326, 37054, 37526, 38114, 39407, 39842, 39930, 40248, + 40708, + ], + ān: [ + 20370, 20579, 23189, 23433, 23766, 24245, 26697, 27688, 30438, 30443, 33124, + 33780, 33851, 33866, 34029, 35485, 35571, 35865, 38796, 38797, 38909, 39331, + 39839, 40298, 40341, 40524, + ], + lù: [ + 20371, 20679, 21198, 21216, 22309, 22388, 22646, 23101, 23757, 24280, 24404, + 24405, 25134, 25693, 26882, 27162, 28117, 28133, 28172, 28425, 28510, 29741, + 29840, 29994, 30429, 30569, 30793, 31103, 31108, 31249, 31307, 31635, 31759, + 31788, 31797, 31798, 31833, 31926, 34061, 34135, 34370, 34736, 36034, 36162, + 36258, 36335, 36379, 36439, 36613, 36678, 36738, 36760, 36911, 37249, 37636, + 37682, 37684, 37876, 38520, 39428, 39484, 39909, 40252, 40294, 40305, 40442, + 40557, 40575, 40595, + ], + móu: [ + 20372, 21178, 24648, 30520, 34513, 35584, 35851, 36366, 37738, 40254, 40624, + ], + ér: [ + 20373, 20799, 20816, 20818, 23759, 26669, 27919, 31915, 32780, 33017, 33611, + 35003, 36608, 36700, 38481, 38573, 39669, 39838, 40085, 40239, 40504, + ], + 'dòng tǒng tóng': [20375], + chà: [20376, 22908, 23033, 23700, 27722, 35435, 35815], + chì: [ + 20377, 20666, 21189, 21201, 21489, 21883, 24435, 24668, 24919, 24975, 25048, + 25270, 25941, 26021, 26456, 28225, 28795, 28861, 28926, 29118, 30163, 30200, + 30235, 32708, 32709, 32740, 32744, 33119, 36196, 36265, 36971, 37459, 38644, + 39149, 39276, 40338, 40408, + ], + 'gòng gōng': [20379, 20849], + zhōu: [ + 20380, 21608, 21900, 24030, 24479, 27954, 28109, 28863, 28880, 29656, 30698, + 33311, 35589, 35704, 35788, 36057, 36178, 36616, 36630, 36736, 36913, 37102, + 37506, 38668, 39410, 39430, 40259, 40508, + ], + rú: [ + 20382, 20754, 22149, 22914, 23340, 23418, 24100, 26328, 26695, 28202, 28641, + 31566, 33593, 34144, 34231, 34657, 34837, 35005, 35174, 37018, 37305, 37539, + 38135, 39020, 39077, 40044, 40209, 40253, + ], + 'jiàn cún': [20383], + xiá: [ + 20384, 20448, 21283, 23777, 23805, 25966, 26247, 26585, 28832, 28890, 29390, + 29421, 29433, 29672, 29781, 30806, 30820, 30892, 31083, 31594, 32278, 32712, + 33309, 33338, 34168, 36206, 36676, 36758, 36944, 37724, 37771, 38492, 38527, + 38686, 39458, 39803, 40375, 40672, + ], + lǚ: [ + 20387, 20406, 20770, 21525, 21570, 23649, 23650, 23653, 25364, 25435, 26053, + 26784, 28946, 31075, 31238, 31341, 32125, 32311, 32533, 33154, 33168, 35099, + 35128, 37080, 37569, 38109, + ], + ta: [20388], + 'jiǎo yáo': [20389, 20709, 24506], + zhēn: [ + 20390, 20597, 23498, 24103, 24106, 24128, 25656, 26015, 26722, 26984, 27035, + 27196, 27549, 27976, 28254, 28519, 28597, 29513, 29645, 29646, 29799, 29956, + 30494, 30495, 30759, 30890, 31087, 31118, 31131, 31668, 32983, 33275, 33908, + 33942, 33985, 34237, 35998, 36126, 36675, 36937, 37209, 37341, 37441, 37681, + 37756, 38024, 40053, + ], + 'cè zè zhāi': [20391, 20596], + kuài: [ + 20393, 20744, 20983, 21721, 22130, 22310, 22359, 22602, 24028, 24293, 24555, + 26077, 27443, 29423, 29546, 31607, 31977, 33037, 33214, 37072, 37174, 40032, + 40089, + ], + chái: [20394, 20757, 21901, 26612, 29362, 31073, 35962], + nóng: [ + 20396, 20738, 20892, 21725, 22117, 27266, 27393, 27987, 28611, 29174, 31151, + 31230, 31328, 33043, 33215, 34173, 35163, 35688, 36786, 36787, 37298, 39710, + ], + jǐn: [ + 20397, 20760, 21370, 21418, 24057, 27135, 28428, 29822, 32039, 32202, 33771, + 34035, 35641, 35880, 37670, 38182, 39241, 39313, + ], + 'hóu hòu': [20399, 30694], + jiǒng: [ + 20400, 20690, 20879, 22247, 27842, 28547, 28847, 28913, 29018, 29019, 29106, + 29147, 31384, 32151, 35111, 36837, 36872, 38984, 39054, + ], + 'chěng tǐng': [20401], + 'zhèn zhēn': [20402, 25557], + zuò: [ + 20403, 20570, 21777, 22352, 23709, 23710, 24231, 31066, 31987, 32985, 33859, + 33860, 34009, 34959, 38460, + ], + qīn: [ + 20405, 20819, 23175, 23898, 23956, 27453, 34942, 35483, 38054, 38985, 39416, + 39566, 39868, + ], + jú: [ + 20407, 21881, 23109, 23616, 24008, 26888, 27224, 27878, 28119, 28264, 28951, + 29329, 29386, 31927, 33738, 34332, 36252, 36348, 36459, 36610, 37113, 38320, + 39414, 39527, 40281, 40308, 40362, 40752, 40755, + ], + 'shù dōu': [20408], + tǐng: [ + 20409, 22306, 23063, 25402, 28047, 28918, 29693, 33057, 33351, 35476, 38962, + 39051, + ], + shèn: [ + 20410, 24892, 24910, 26138, 28033, 28183, 28402, 30214, 30254, 30488, 31091, + 32958, 32962, 33060, 33102, 34563, 34564, 37600, + ], + 'tuì tuó': [20411], + nán: [ + 20413, 21891, 23066, 25257, 26260, 26511, 26591, 26976, 30007, 30040, 33710, + 33843, 36950, + ], + xiāo: [ + 20414, 21715, 22069, 22203, 22210, 23115, 23471, 23477, 24232, 24391, 25585, + 26541, 26549, 26783, 27385, 27466, 27594, 28040, 28487, 28703, 28785, 28786, + 28875, 28935, 29447, 29538, 30170, 30175, 30813, 30819, 31385, 31659, 31768, + 31787, 32131, 32481, 32731, 33198, 33831, 34157, 34376, 34387, 34754, 34767, + 34800, 34856, 36355, 36877, 37559, 38144, 38660, 39093, 39501, 39553, 39623, + 39632, 39752, 40222, 40245, 40397, 40494, + ], + 'biàn pián': [20415, 32246, 32527], + tuǐ: [20416, 33151, 36422, 39613], + xì: [ + 20418, 21304, 21324, 21612, 22669, 23619, 23635, 23661, 24549, 24620, 24644, + 26910, 28509, 28511, 28569, 29058, 29332, 30966, 31114, 32048, 32140, 32280, + 32454, 32484, 33283, 33284, 34158, 34409, 34891, 35236, 36201, 36231, 37092, + 37363, 38411, 38553, 38559, 38716, 39228, 39273, 39721, 40662, + ], + cù: [ + 20419, 23208, 25009, 29469, 30212, 30255, 31751, 32300, 33064, 34079, 35470, + 36247, 36391, 36415, 36441, 36468, 36469, 37259, 39011, 40704, + ], + é: [ + 20420, 22254, 23077, 23753, 23784, 23785, 28048, 29684, 30354, 30539, 30912, + 33706, 35355, 35472, 35660, 35769, 36823, 37387, 37608, 38151, 38943, 38989, + 39069, 39780, 40285, 40286, 40517, + ], + qiú: [ + 20421, 21492, 21778, 22234, 23863, 24047, 24048, 25167, 26754, 27535, 27628, + 27714, 27731, 27845, 27991, 28269, 29034, 29360, 29580, 29699, 29830, 30387, + 30426, 32012, 32127, 32909, 33409, 33677, 34412, 34415, 34551, 35032, 35283, + 35305, 35332, 35333, 36053, 36167, 36878, 36881, 36946, 37195, 37338, 37371, + 37558, 38916, 39810, 39876, 39997, 40765, + ], + xú: [20422, 24464, 31121], + 'guàng kuāng': [20423], + kù: [ + 20424, 21950, 22195, 24211, 24235, 24292, 30228, 32093, 32468, 34996, 35044, + 35122, 37239, + ], + wù: [ + 20425, 21153, 21209, 21247, 21372, 22366, 22626, 22886, 23162, 23524, 23676, + 23689, 23912, 24546, 24734, 24735, 24750, 25098, 25188, 26212, 26444, 28329, + 28944, 29059, 29289, 30182, 30713, 31417, 31877, 34305, 35492, 35823, 37576, + 38434, 38550, 38654, 38682, 38695, 38768, 39446, 39579, 40361, 40540, 40767, + 40768, + ], + jùn: [ + 20426, 20737, 21569, 22472, 23535, 23803, 25039, 25411, 25887, 26201, 26846, + 29127, 29690, 30063, 31459, 31647, 34592, 36048, 37089, 38486, 39189, 39298, + 39423, 39567, 40276, 40277, 40280, + ], + liáng: [ + 20429, 22682, 26753, 26891, 27153, 31918, 31921, 31975, 33391, 36652, 36748, + ], + zǔ: [ + 20430, 21800, 29244, 31062, 32068, 32452, 35419, 35781, 37818, 38459, 38779, + ], + 'qiào xiào': [20431], + yǒng: [ + 20433, 21191, 21192, 21647, 22471, 22606, 23921, 24430, 24634, 24703, 24704, + 24805, 24849, 24889, 24898, 26593, 26640, 27704, 27891, 28263, 29996, 34553, + 35424, 36362, 36404, 39890, 40108, + ], + hùn: [ + 20434, 20529, 22274, 23585, 24897, 25485, 28343, 28957, 30580, 35304, 35554, + 35816, + ], + jìng: [ + 20435, 20665, 22659, 22924, 23129, 23143, 24362, 24371, 24452, 24465, 25964, + 26324, 26737, 26807, 27972, 28702, 29517, 30153, 30169, 31454, 31455, 31467, + 31478, 31480, 33003, 33051, 33686, 35497, 36353, 36851, 36885, 37857, 38236, + 38742, 38745, 38748, 40283, + ], + sàn: [20437, 38288], + pěi: [20438], + sú: [20439], + xī: [ + 20441, 20694, 20846, 20958, 21349, 21376, 21560, 21775, 21821, 22075, 22095, + 22193, 22805, 22874, 23302, 23305, 23638, 23904, 24007, 24076, 24454, 24495, + 24687, 24713, 24725, 24769, 24796, 26132, 26206, 26224, 26227, 26342, 26512, + 26744, 27069, 27176, 27200, 27447, 27685, 27728, 28000, 28101, 28179, 28330, + 28911, 28929, 28936, 28959, 29060, 29064, 29081, 29113, 29114, 29115, 29160, + 29204, 29306, 29312, 29344, 29351, 29707, 30236, 30361, 30542, 30630, 30717, + 30802, 30926, 30978, 31232, 31352, 31416, 31902, 31974, 32198, 32357, 32690, + 32725, 32726, 32952, 32953, 33181, 33342, 33667, 33765, 33952, 34597, 34693, + 34763, 34869, 35199, 35321, 35325, 35327, 35654, 35903, 35904, 35944, 35951, + 35989, 36197, 37020, 37134, 37189, 37295, 37368, 37675, 37869, 37898, 38004, + 38177, 38581, 39183, 39246, 39291, 39889, 40279, 40450, 40759, + ], + lǐ: [ + 20442, 23052, 23778, 23794, 26446, 27418, 28012, 28583, 29702, 31036, 31150, + 31924, 35023, 35041, 35914, 36902, 37008, 37300, 37616, 38146, 39881, 40039, + 40049, 40100, 40162, + ], + bǎo: [ + 20445, 22562, 23212, 23453, 23514, 23539, 23542, 29668, 32229, 33862, 34293, + 35091, 36082, 38732, 39161, 39165, 39281, 39362, 40181, 40199, 40488, + ], + 'yú shù yù': [20446], + 'sì qí': [20447], + 'xìn shēn': [20449], + xiū: [ + 20450, 20462, 21691, 24229, 27143, 28876, 32670, 33049, 33065, 33273, 35973, + 37533, 37760, 39117, 39240, 39312, 39652, 39673, 39860, 40003, 40258, 40506, + ], + dì: [ + 20452, 20569, 20672, 22474, 22673, 22700, 23075, 24093, 24607, 26099, 26762, + 28941, 29587, 29963, 30513, 30535, 30898, 31094, 31128, 31532, 32224, 32532, + 33123, 33730, 33922, 34069, 34627, 34669, 34734, 35558, 35867, 36406, 36882, + 36883, 36958, 36976, 37482, + ], + chóu: [ + 20454, 20756, 23334, 24774, 24833, 25060, 26662, 29181, 30068, 30087, 30359, + 31264, 31609, 31820, 32082, 32162, 32504, 33751, 35446, 35726, 35728, 36364, + 36490, 37223, 37228, 37307, 38612, 38624, 38630, + ], + zhì: [ + 20455, 20587, 20776, 21046, 21141, 22401, 23073, 23512, 24089, 24092, 24159, + 24226, 24228, 24268, 24408, 24463, 24477, 24535, 24558, 25061, 25067, 25347, + 25370, 25527, 25711, 25842, 26072, 26186, 26234, 26633, 26702, 26813, 27341, + 27355, 27835, 27959, 28365, 28382, 28399, 28492, 28676, 28825, 29099, 29438, + 29464, 29839, 29894, 30164, 30179, 31017, 31057, 31209, 31223, 31258, 31290, + 31305, 31378, 32041, 32251, 32622, 32720, 33187, 33267, 33268, 33430, 34541, + 34975, 34976, 35069, 35231, 35287, 35311, 35318, 35468, 35921, 35922, 36013, + 36074, 36100, 36136, 36157, 36337, 36396, 36499, 36618, 36734, 37061, 37517, + 37589, 37973, 38106, 38183, 38495, 38578, 38601, 39396, 39469, 39482, 39495, + 39576, 39919, 40217, 40409, 40503, + ], + 'liǎ liǎng': [20457], + jiǎn: [ + 20461, 20537, 20745, 20943, 21098, 22591, 24383, 24389, 25129, 25132, 25315, + 25400, 25441, 25536, 25791, 26535, 26604, 26776, 26816, 26908, 27298, 28187, + 28245, 28733, 29776, 30545, 30652, 30839, 30897, 30982, 31509, 31591, 31616, + 31777, 32120, 32365, 32742, 33575, 34246, 34834, 35045, 35143, 35145, 35194, + 35395, 35591, 35629, 35710, 35883, 36284, 36423, 37911, 39691, 39950, 40568, + 40571, 40572, + ], + huò: [ + 20464, 21663, 22191, 22207, 22895, 24416, 24785, 25110, 25837, 26084, 26340, + 27316, 27790, 28273, 28694, 29554, 30312, 30483, 30672, 31096, 31117, 31339, + 31394, 32815, 33243, 33383, 33719, 33958, 34303, 34838, 35595, 36008, 36135, + 37699, 37962, 38252, 38616, 38669, 38723, 38852, + ], + 'jù jū': [20465, 25454, 37624, 38191], + xiào: [ + 20466, 20634, 21177, 21682, 21742, 21880, 22027, 22056, 22063, 23389, 25928, + 25989, 25990, 27479, 28045, 29117, 31505, 35432, 35487, + ], + pái: [20467, 24472, 29260, 29348, 29445, 31792, 31794, 36651], + biào: [20469, 39998, 40148], + 'chù tì': [20470], + fèi: [ + 20471, 21077, 21406, 21536, 23645, 24223, 24259, 24290, 26162, 26314, 27360, + 27832, 28663, 29394, 30280, 32954, 33801, 36027, 36153, 37928, 38212, 38507, + 38725, 40739, + ], + fèng: [ + 20472, 20964, 22857, 28247, 28968, 29000, 36085, 36183, 40175, 40179, 40204, + ], + ǎn: [20474, 21813, 22511, 25566, 32623, 37544, 38133], + bèi: [ + 20475, 20493, 20573, 20601, 20633, 20675, 22791, 24726, 24811, 24834, 24970, + 26113, 26774, 28953, 29292, 29333, 29384, 29437, 29692, 29746, 30874, 31129, + 31954, 33501, 34003, 34557, 35097, 35997, 36125, 36592, 36649, 36744, 37046, + 37093, 37121, 37575, 37950, 38049, 38785, 38836, + ], + yù: [ + 20476, 20773, 21893, 21929, 21947, 22495, 22537, 22954, 23255, 23507, 23786, + 23950, 24253, 24423, 24481, 24840, 24958, 25131, 26161, 26843, 26844, 26859, + 27378, 27406, 27421, 27442, 27603, 28020, 28143, 28394, 28495, 28582, 28778, + 28980, 29020, 29135, 29152, 29225, 29425, 29508, 29577, 29721, 30217, 30290, + 30753, 30818, 30834, 30983, 30998, 31004, 31142, 31191, 31266, 31286, 31741, + 31838, 31858, 31894, 32206, 32621, 32895, 32896, 33352, 33419, 33420, 33567, + 33966, 34019, 34041, 34167, 34316, 34591, 34606, 34988, 35029, 35465, 35565, + 35709, 35861, 35947, 36553, 36621, 36915, 36935, 36985, 37057, 37287, 37434, + 37578, 37669, 37933, 38064, 38334, 38408, 38628, 38705, 38928, 39044, 39147, + 39239, 39275, 39341, 39496, 39533, 39728, 39729, 39739, 39754, 40010, 40191, + 40229, 40231, 40234, 40274, 40440, 40466, 40518, 40556, + ], + xīn: [ + 20477, 22138, 22945, 23324, 24286, 24515, 24516, 24571, 24798, 26032, 26133, + 26490, 27427, 27462, 28824, 30458, 34218, 35362, 36763, 37028, 37386, 37573, + 37995, 38156, 39336, 39339, + ], + 'hǔ chí': [20479], + jiù: [ + 20483, 20710, 21267, 21275, 21302, 21417, 21646, 23601, 24260, 24271, 24272, + 24934, 25412, 25937, 26087, 26601, 26622, 26709, 27405, 27559, 30106, 33276, + 33285, 33290, 39910, 40434, 40555, 40596, 40808, + ], + yáo: [ + 20484, 20636, 21954, 22426, 22575, 23002, 23217, 23591, 23597, 23779, 23970, + 23972, 24493, 25594, 25622, 25671, 25727, 26266, 27043, 28391, 28881, 29243, + 29498, 29671, 29796, 29814, 30936, 31377, 31407, 31408, 32948, 34344, 35616, + 35617, 35875, 36602, 36730, 36953, 36965, 37006, 39012, 39099, 39126, 39174, + 39194, 39977, 40025, 40144, + ], + 'cuì zú': [20485], + 'liǎng liǎ': [20486], + wǎn: [ + 20487, 21773, 23113, 24779, 25405, 26202, 26213, 26217, 26236, 26778, 26880, + 29740, 30073, 30358, 30412, 30871, 32169, 32176, 32510, 33048, 33814, 36384, + 36627, 37588, + ], + zǒng: [ + 20490, 20588, 20655, 23928, 24635, 24803, 25460, 25603, 25696, 29162, 32207, + 32235, 32258, 32317, 34007, + ], + guān: [ + 20492, 20851, 23448, 26874, 30237, 30287, 31396, 33924, 38306, 38359, 38364, + 39973, 40030, 40143, + ], + tiǎn: [ + 20494, 21818, 24541, 24767, 26218, 27524, 28127, 30547, 33094, 33300, 35237, + 35277, 36063, 37674, 39170, + ], + mén: [ + 20497, 25194, 25451, 29834, 33755, 34379, 37702, 38036, 38272, 38277, 38376, + ], + 'dǎo dào': [20498], + 'tán tàn': [20499, 22510], + 'juè jué': [20500], + chuí: [ + 20501, 22402, 22464, 25462, 25637, 26712, 26864, 27084, 31648, 33092, 33753, + 37656, 37786, 38180, 38514, 38976, + ], + xìng: [ + 20502, 22995, 23134, 23353, 24184, 24615, 24763, 26447, 28076, 32200, 33238, + 33607, 33685, 33877, + ], + péng: [ + 20503, 20656, 22620, 22643, 24376, 24969, 25408, 26379, 26842, 26902, 27173, + 30844, 31261, 31484, 31735, 32388, 33192, 33411, 34028, 34325, 34778, 34779, + 34998, 36643, 37643, 37981, 38904, 38908, 39471, 39676, 39685, 39700, 40300, + 40527, + ], + 'tǎng cháng': [20504], + hòu: [ + 20505, 21402, 21518, 22421, 22560, 24460, 27913, 33577, 35934, 36869, 37064, + 39836, 40031, 40078, 40088, + ], + tì: [ + 20508, 21059, 22159, 22164, 23625, 23644, 24716, 24720, 24789, 24790, 25147, + 25510, 26367, 26385, 27474, 27554, 28053, 29899, 31545, 31818, 34201, 35077, + 36886, 36919, 39664, 39680, 39684, + ], + gàn: [ + 20509, 20942, 24185, 27046, 27274, 28134, 28776, 30448, 32058, 32448, 35404, + 36113, 36195, 39597, + ], + 'liàng jìng': [20510, 38739], + suī: [ + 20512, 21752, 22794, 28374, 28617, 30509, 30562, 33429, 33661, 33662, 34429, + 38614, 38806, + ], + 'chàng chāng': [20513], + jié: [ + 20514, 20604, 20625, 21030, 21031, 21052, 21163, 21180, 21353, 21354, 23125, + 23211, 23377, 23690, 23848, 23909, 23995, 24000, 24175, 25130, 25463, 25526, + 25838, 26117, 26466, 26480, 26688, 26717, 26988, 26998, 27044, 27905, 28368, + 28500, 29412, 30571, 30989, 31469, 31680, 32687, 33709, 34037, 34531, 34576, + 34840, 34846, 34877, 34929, 35002, 35344, 35440, 35505, 35750, 36373, 36860, + 37475, 37755, 38268, 38945, 39834, 40082, + ], + 'kǒng kōng': [20517], + juàn: [ + 20518, 21173, 22854, 24955, 26698, 28099, 29431, 29543, 30519, 30538, 30560, + 32109, 32121, 32482, 32613, 32642, 33091, 34088, 37124, 39179, + ], + zōng: [ + 20519, 22571, 23447, 23887, 23893, 24830, 26401, 26837, 26934, 29095, 29475, + 30955, 32195, 32746, 33113, 33916, 34668, 35957, 36392, 36394, 36452, 37712, + 37953, 39436, 39459, 39572, 39683, 39689, 39735, 39918, 39932, + ], + ní: [ + 20522, 22381, 22527, 23612, 23636, 24617, 28131, 29450, 31870, 32867, 34477, + 34618, 35308, 35982, 36316, 36631, 37107, 37422, 38092, 38675, 39324, 39906, + 40117, 40593, 40815, + ], + zhuō: [ + 20524, 25305, 25417, 26700, 26802, 26817, 26867, 27093, 28095, 31399, 37935, + ], + 'wō wēi': [20525], + luǒ: [20526, 21062, 26346, 30256, 30323, 33245, 33999, 34819, 35064, 36534], + sōng: [ + 20527, 20935, 23040, 23847, 23913, 24250, 25021, 26494, 26496, 26537, 26583, + 26789, 27303, 28126, 28621, 30841, 33752, 39686, + ], + lèng: [20528, 22542, 24867, 30550, 36380], + zì: [ + 20531, 21082, 23383, 24675, 28173, 28460, 29304, 30501, 30502, 32980, 33022, + 33258, 33569, 33634, + ], + bèn: [20532, 22348, 25465, 25770, 28160, 31528, 36905], + cǎi: [ + 20536, 21835, 23111, 24425, 25505, 26828, 27613, 30572, 32181, 36340, 36393, + ], + zhài: [20538, 20661, 23528, 30261, 30758], + yē: [20539, 21524, 22094, 25832, 26253, 26928, 27467, 28529, 34862], + shà: [20541, 21820, 21922, 27459, 31633, 32732, 32739, 33808, 38319, 38670], + qīng: [ + 20542, 20670, 21375, 22282, 23496, 27682, 27691, 28152, 28165, 34619, 36605, + 36629, 36731, 37100, 37638, 37963, 38737, 38738, 39894, + ], + yīng: [ + 20544, 22052, 22111, 22198, 23156, 23190, 23240, 23344, 23366, 23422, 24869, + 25732, 25878, 26400, 26716, 27185, 27387, 28214, 29008, 29681, 29787, 29838, + 29908, 29959, 29974, 30884, 31023, 32211, 32403, 32492, 32552, 32578, 32579, + 32588, 33210, 33521, 33722, 34337, 34663, 34867, 35118, 35707, 36047, 36552, + 37965, 38195, 38681, 38906, 40236, 40337, 40359, 40367, 40426, 40441, 40462, + 40474, 40550, 40560, + ], + 'chēng chèn': [20545, 29231], + ruǎn: [ + 20548, 26378, 29772, 29888, 30877, 31005, 33117, 36575, 36653, 36719, 38446, + ], + 'zhòng tóng': [20549], + chǔn: [20550, 24823, 30582, 33846, 34850, 36080], + 'jiǎ jià': [20551], + 'jì jié': [20552], + 'bǐng bìng': [20555], + ruò: [ + 20556, 21458, 23926, 24369, 26953, 28971, 29191, 31660, 31707, 33979, 37120, + 39961, 39983, 40376, + ], + tí: [ + 20557, 21399, 21884, 21953, 23865, 28477, 29765, 30588, 31157, 31242, 32249, + 32519, 32612, 34139, 35078, 35605, 36263, 36420, 36431, 37261, 37719, 38988, + 39064, 39456, 39863, 39927, 40128, 40284, 40420, 40520, + ], + wēi: [ + 20558, 21361, 21940, 23041, 23193, 23990, 24013, 24494, 24836, 25547, 25595, + 26931, 26994, 28326, 28883, 29032, 29168, 30291, 32261, 33896, 33907, 34183, + 34610, 34651, 35235, 35444, 36918, 38535, 38536, 38714, 39939, 39940, 40130, + ], + piān: [20559, 22248, 23205, 26948, 29327, 31687, 32745, 37698], + yàn: [ + 20560, 21388, 21421, 21761, 21933, 22152, 22181, 22576, 22943, 23026, 23306, + 23359, 23476, 24421, 24422, 25957, 26191, 26277, 26325, 26339, 28383, 28750, + 28756, 28775, 28777, 28948, 28976, 28977, 29078, 29124, 29290, 29458, 30746, + 30831, 33395, 33398, 33399, 35214, 35267, 35326, 35578, 35724, 35742, 35866, + 35891, 35923, 35924, 36107, 36119, 36189, 36549, 37184, 37245, 37308, 37317, + 38593, 39181, 39260, 39440, 39443, 39476, 39511, 39520, 39564, 39731, 40171, + 40200, 40243, 40387, 40432, 40798, + ], + 'tǎng dàng': [20562], + è: [ + 20564, 21262, 21374, 21380, 21597, 21666, 22121, 22441, 22538, 22574, 23691, + 23871, 24261, 24746, 24853, 25145, 25212, 25636, 25657, 25820, 27374, 27486, + 27514, 28226, 29735, 30728, 30736, 30790, 33133, 33482, 33852, 34138, 34437, + 34625, 35240, 35556, 35725, 35860, 35935, 36571, 36598, 36717, 36940, 36943, + 36987, 37122, 37418, 37716, 37993, 38199, 38440, 38456, 38942, 38990, 39066, + 39187, 39209, 39295, 39952, 39978, 40055, 40132, 40346, 40535, 40771, 40822, + ], + xié: [ + 20565, 21232, 21327, 21332, 21963, 22437, 22858, 24650, 24886, 25337, 25658, + 25783, 25813, 25847, 25884, 26012, 26090, 29057, 29170, 32138, 32243, 32256, + 32556, 32723, 32961, 33029, 33031, 33035, 33166, 34658, 34938, 35181, 35559, + 35735, 35856, 38795, 38837, 40868, + ], + chě: [20566, 25199, 25766], + shěng: [20567, 28219, 30490], + chā: [ + 20571, 21967, 25184, 25407, 25554, 25591, 30080, 33279, 33366, 37535, 37732, + 38200, 39223, + ], + huáng: [ + 20575, 20976, 21924, 22573, 22708, 23187, 23858, 24488, 24822, 27003, 28255, + 29004, 29530, 29789, 29852, 30272, 30343, 30970, 31316, 31681, 31783, 33358, + 33887, 34647, 34789, 35579, 36266, 36945, 37728, 37892, 38205, 38541, 38905, + 39213, 39452, 39945, 40017, 40135, 40428, 40643, 40644, + ], + yǎo: [ + 20576, 21676, 23161, 23438, 23686, 26483, 26620, 27034, 28308, 29397, 31365, + 31368, 33280, 33517, 38340, 39445, 40405, 40809, + ], + 'chǒu qiào': [20578], + yóu: [ + 20580, 23588, 24238, 24611, 27787, 27833, 27999, 28216, 29369, 29494, 29495, + 30001, 30115, 31198, 32940, 33692, 33720, 34133, 34480, 34659, 35367, 36623, + 36662, 36912, 36938, 37038, 37109, 37438, 38080, 39360, 39799, 39819, 40063, + 40073, + ], + xū: [ + 20582, 22687, 23213, 23299, 26952, 27432, 27476, 29176, 30110, 30449, 32135, + 32259, 32379, 32997, 34150, 34391, 34394, 34395, 34641, 35015, 35343, 35377, + 35549, 35651, 35870, 37968, 38656, 38920, 39035, 39036, 39497, 39706, 39750, + 39766, + ], + zhā: [ + 20583, 21747, 25263, 25363, 25592, 25699, 27165, 28195, 30390, 35312, 35655, + 40772, 40775, + ], + cī: [20584, 30133, 34816, 36224, 39604, 39626, 40825], + bī: [20586, 23620, 26949, 27636, 35917, 36924, 39951, 40126, 40278], + xún: [ + 20593, 22106, 23547, 23563, 23755, 24033, 24309, 24490, 24642, 25559, 25907, + 26092, 26442, 26642, 26730, 27187, 27957, 27988, 28527, 29125, 29142, 29667, + 29845, 30019, 32003, 33600, 34803, 35426, 35810, 37161, 40015, 40024, 40095, + ], + 'cāi sī': [20594], + duān: [20595, 23183, 31471, 35085, 37748], + ǒu: [20598, 21528, 22036, 32806, 33122, 34117, 34261], + tōu: [20599, 20600, 37742], + 'zán zá zǎ': [20602], + 'lǚ lóu': [20603, 20674], + fèn: [ + 20606, 20712, 22859, 22894, 24325, 24575, 24868, 24996, 28725, 30611, 31182, + 31914, 31966, 33209, 40029, 40124, + ], + 'kuǐ guī': [20608], + sǒu: [20609, 21468, 21471, 22014, 27362, 30605, 34222, 34282], + 'zhì sī tí': [20610], + sù: [ + 20611, 20723, 21961, 22608, 22609, 22809, 23242, 24875, 24991, 27041, 27150, + 27157, 27536, 27869, 28049, 28335, 28344, 28506, 28517, 29578, 29663, 29851, + 31756, 31899, 31903, 32032, 32292, 32899, 32901, 33158, 34060, 34263, 35307, + 35380, 35606, 35785, 35873, 36250, 36444, 36895, 36961, 36972, 37577, 39191, + 39500, 39573, 40016, 40427, 40532, + ], + xiā: [20612, 28998, 30606, 34418, 35898, 39084, 39957], + 'yuàn yuán': [20614, 23195], + rǒng: [20615, 20887, 23426, 27652, 36597], + nù: [20617, 24594], + yùn: [ + 20618, 23381, 24701, 24818, 24864, 24909, 26527, 33130, 34164, 34176, 34292, + 34314, 35102, 35999, 36816, 36939, 37075, 37126, 37213, 37270, 37278, 38871, + 38878, 38901, 38907, 39211, + ], + 'gòu jiǎng': [20619], + mà: [ + 20620, 22044, 27050, 30576, 31043, 31137, 32629, 38273, 39393, 39554, 39701, + ], + bàng: [ + 20621, 22621, 26834, 29604, 31254, 33365, 33953, 34607, 35607, 35876, 37770, + 38225, + ], + diān: [ + 20622, 21415, 23918, 24005, 24019, 24020, 25474, 25895, 25921, 27079, 28359, + 30315, 30322, 36430, 39002, 39003, 39072, 40827, + ], + táng: [ + 20623, 21776, 21882, 22371, 22530, 22616, 25642, 26848, 27062, 28303, 28447, + 29051, 29805, 30916, 31135, 31702, 31939, 31958, 31963, 33157, 33179, 33998, + 34711, 34739, 36207, 36412, 37132, 37283, 37781, 38554, 39225, 39236, 40374, + ], + hào: [ + 20624, 21728, 24655, 26122, 26150, 26215, 26272, 26276, 26285, 26317, 28009, + 28111, 28564, 28751, 28765, 30355, 30364, 30366, 30369, 30373, 32791, 32853, + 34179, 34399, 37143, 39013, 39074, 39965, + ], + 'xī xì': [20626], + shān: [ + 20627, 21024, 21034, 21116, 22328, 23665, 25403, 25639, 26613, 27270, 28536, + 28568, 29053, 29414, 29642, 31512, 32319, 32692, 32694, 33056, 33314, 33439, + 34923, 36314, 36565, 37014, 38282, 39877, + ], + 'qiàn jiān': [20628], + 'què jué': [20629, 22470], + 'cāng chen': [20630], + róng: [ + 20635, 23222, 23238, 23339, 23481, 23797, 23896, 23992, 25102, 25608, 26343, + 26628, 27029, 27054, 27061, 27623, 28342, 28700, 28927, 29076, 29416, 29794, + 31297, 32104, 32466, 32674, 32924, 33561, 33592, 33635, 33993, 34686, 34701, + 34702, 34833, 35107, 37780, 38229, 39397, + ], + 'tà tàn': [20637], + suō: [ + 20638, 21766, 21965, 21990, 23057, 25677, 26731, 26797, 30531, 31761, 31764, + 32679, 33679, 34001, 36246, 39867, + ], + dǎi: [20643, 27513], + zài: [20644, 20750, 20877, 22312, 25175, 27909, 36617, 37224], + gǔ: [ + 20646, 21476, 21842, 23603, 24882, 27030, 27070, 27753, 28104, 28658, 28692, + 29295, 30391, 30396, 30444, 30653, 31296, 32607, 32662, 32929, 33077, 33228, + 34211, 34506, 34865, 35393, 35778, 36674, 36903, 37431, 38068, 39222, 39305, + 40723, 40724, + ], + bīn: [ + 20647, 23486, 24428, 25996, 26901, 28392, 28626, 28657, 28661, 28693, 32381, + 32548, 34408, 35945, 35955, 36051, 36052, 37024, 37964, 38228, 38694, 39022, + ], + chǔ: [ + 20648, 20786, 26485, 26904, 26970, 26990, 27290, 28619, 29876, 30784, 30990, + 31111, 34389, 40813, 40828, + ], + nuó: [20649, 20794, 25386, 26779, 27232], + 'cān càn': [20650], + lěi: [ + 20651, 20769, 21437, 22418, 22593, 22744, 22760, 27344, 28741, 30295, 30667, + 30922, 31016, 32786, 34124, 34174, 34271, 34365, 34845, 35460, 35716, 35796, + 38008, 40467, + ], + cuī: [ + 20652, 20951, 22676, 23828, 23903, 24923, 25703, 27057, 29525, 30954, 37849, + ], + yōng: [ + 20653, 21960, 22665, 22725, 23262, 24248, 24305, 24949, 25317, 25793, 28413, + 28745, 29253, 30152, 30293, 30320, 33219, 37013, 37114, 37144, 37854, 38235, + 38605, 38621, 39252, 40005, 40153, 40411, + ], + 'zāo cáo': [20654], + sǒng: [20657, 23927, 24578, 24730, 24879, 24939, 31462, 32824, 32883, 39415], + ào: [ + 20658, 22387, 22407, 22714, 22881, 23279, 23705, 23728, 23988, 25034, 25817, + 28595, 37834, 39489, 39580, + ], + 'qī còu': [20662], + chuǎng: [20664, 30946, 38358, 38383], + shǎ: [20667, 20749], + hàn: [ + 20668, 22462, 24717, 25022, 25182, 25421, 25750, 25788, 26097, 26200, 26293, + 27721, 28038, 28450, 28698, 28938, 29442, 30356, 30533, 32752, 33695, 33761, + 34559, 34605, 34706, 35648, 36634, 37356, 37554, 37582, 38615, 38967, 38980, + 39060, 39419, 40382, + ], + zhāng: [ + 20669, 23260, 24352, 24373, 24432, 24926, 26290, 27167, 28467, 29520, 29835, + 31456, 31931, 34049, 34769, 36967, 37155, 37873, 39206, 39487, 40006, 40606, + ], + 'yān yàn': [20671, 22677, 23342], + 'piào biāo': [20676, 39584], + liàn: [ + 20678, 22556, 23201, 24651, 25088, 26973, 27539, 27566, 28229, 28491, 28592, + 28722, 28860, 29001, 29779, 32244, 32414, 32451, 33840, 37676, 37706, 37832, + 38142, 39946, + ], + màn: [ + 20680, 22657, 24148, 24930, 26364, 28459, 28599, 29107, 29516, 32309, 32550, + 34052, 34352, 37156, 37853, 38232, + ], + 'tàn tǎn': [20683], + yíng: [ + 20684, 21942, 22603, 23348, 25869, 27001, 27391, 28289, 28299, 28386, 28486, + 28633, 28634, 28660, 28677, 28699, 28704, 28719, 28752, 28764, 29074, 29151, + 29801, 30401, 30408, 31132, 31837, 31855, 32264, 33556, 33639, 33721, 33828, + 33829, 33830, 33854, 34021, 34240, 34509, 34631, 34687, 34722, 34821, 35597, + 36111, 36194, 36814, 37795, + ], + dòng: [ + 20685, 20923, 20941, 21160, 21205, 23003, 25113, 25359, 26635, 26847, 28265, + 30800, 33000, 33012, 33110, 36853, 38680, 39399, + ], + zhuàn: [ + 20686, 21869, 22208, 22559, 25776, 28791, 29777, 31686, 33118, 33923, 35144, + 35668, 39244, 39316, + ], + xiàng: [ + 20687, 21224, 21521, 22190, 23008, 23953, 26319, 27233, 29670, 32575, 34771, + 34902, 35152, 35937, 37900, 38917, 39033, 40012, + ], + shàn: [ + 20688, 21892, 22688, 22689, 23319, 25797, 25982, 26923, 27199, 27482, 27733, + 28759, 30109, 30960, 32341, 32558, 33203, 34798, 34810, 35349, 35590, 35697, + 35754, 36109, 36193, 36216, 37167, 37925, 39245, 39480, 39583, 40019, 40020, + 40157, + ], + 'tuí tuǐ': [20691], + zǔn: [20692, 22082, 25753, 35664], + pú: [ + 20693, 21261, 22308, 22691, 28654, 29531, 29854, 30632, 31321, 33670, 33744, + 33769, 33889, 33969, 33970, 36108, 37242, 37879, 38244, + ], + láo: [ + 20695, 21171, 21172, 21214, 21744, 23810, 23959, 24997, 26405, 28022, 29282, + 30184, 30278, 31362, 31785, 37290, 37906, 38137, 39007, 39645, + ], + chǎng: [20696, 21424, 24288, 25950, 26166, 27653, 37625], + guāng: [ + 20697, 20809, 21667, 22425, 23023, 27960, 28782, 28823, 28826, 28827, 28897, + 29654, 33009, 33578, 36612, 37543, 40646, + ], + liáo: [ + 20698, 22073, 23293, 23525, 23534, 23582, 23658, 23930, 23962, 23963, 24299, + 24960, 25977, 26296, 27217, 29536, 29849, 30103, 30274, 31426, 31773, 32346, + 32557, 32842, 33163, 33195, 34260, 34783, 35906, 36095, 36440, 36797, 36988, + 39113, 39630, 40431, 40553, + ], + dèng: [ + 20700, 20979, 22705, 23965, 27336, 30634, 30964, 35252, 37011, 37159, 38565, + ], + 'chán zhàn zhuàn': [20701], + bō: [ + 20704, 23955, 25320, 25765, 25773, 27874, 28298, 29627, 30326, 30411, 30773, + 30854, 31009, 32573, 33760, 34992, 36467, 37474, 38069, 39185, 39293, 39499, + 40013, + ], + huì: [ + 20705, 21295, 21321, 21913, 22034, 22166, 22298, 23314, 23533, 23670, 23671, + 24407, 24409, 24410, 24507, 24666, 24693, 24800, 24935, 24979, 25075, 26214, + 26291, 27109, 27230, 27269, 27352, 27719, 27851, 28377, 28499, 28905, 29172, + 29545, 29860, 30650, 30794, 31229, 31330, 31730, 32117, 32362, 32472, 32729, + 32765, 33631, 34087, 34137, 34184, 34185, 34794, 35439, 35496, 35569, 35667, + 35711, 35763, 35826, 36036, 36159, 37932, 38368, 38419, 38759, 38958, 39018, + 39058, 39215, + ], + chuǎn: [20706, 21912, 33307, 33608, 36403], + 'tiě jiàn': [20707], + sēng: [20711, 39705], + xiàn: [ + 20713, 20724, 21743, 22455, 22634, 23021, 23050, 23466, 23704, 23796, 25010, + 25738, 26203, 27212, 27258, 28032, 28695, 29486, 29563, 29616, 29694, 30476, + 30541, 31919, 31982, 32100, 32171, 32218, 32447, 32528, 32673, 32680, 33146, + 33236, 33277, 33483, 33703, 35490, 35919, 37607, 37646, 38480, 38501, 38519, + 38704, 39201, 39301, 40626, 40760, + ], + 'yù jú': [20714], + 'è wū': [20715], + 'tóng zhuàng': [20718], + lǐn: [ + 20719, 20955, 20956, 24297, 24298, 25037, 25044, 25755, 27265, 27305, 28575, + 30299, 30301, + ], + gù: [ + 20721, 20933, 22266, 22540, 23827, 23854, 25925, 26767, 26845, 29311, 30204, + 31099, 37678, 38178, 38599, 39015, 39038, 39901, 40116, + ], + jiāng: [ + 20725, 22723, 23004, 27263, 27565, 27743, 30037, 30085, 30995, 32366, 32560, + 32734, 33587, 33857, 34193, 34688, 34751, 35911, 38849, 40002, 40137, + ], + mǐn: [ + 20726, 20922, 21025, 21188, 24751, 24829, 24845, 24924, 25003, 25279, 25923, + 25935, 25967, 27887, 28515, 30399, 31522, 31549, 31778, 34848, 38292, 38313, + 38389, 38397, 39989, 40152, 40701, + ], + jìn: [ + 20728, 20954, 22116, 22157, 22672, 22743, 22935, 23335, 25634, 26185, 26187, + 26499, 27555, 27989, 28024, 28301, 28613, 28636, 28908, 29025, 29180, 29710, + 29800, 29878, 30433, 31090, 32265, 32537, 33641, 34254, 35250, 35280, 36078, + 36112, 36166, 36817, 36827, 36914, 38771, 40829, + ], + 'jià jie': [20729], + qiào: [ + 20730, 23789, 24105, 25772, 27579, 31373, 31429, 35482, 35822, 36488, 38487, + 38825, 38866, 39642, + ], + pì: [ + 20731, 23218, 23251, 23617, 28604, 29971, 30088, 35692, 38370, 40447, 40458, + ], + sài: [20735, 31802, 36093, 36187], + 'chán tǎn shàn': [20739], + 'dāng dàng': [20741, 24403, 38371], + xuān: [ + 20743, 21927, 22599, 23191, 23459, 24835, 24843, 25550, 26125, 26244, 29002, + 29014, 29764, 30587, 30670, 31140, 31662, 32743, 32766, 33841, 33842, 34002, + 34175, 34300, 34320, 34646, 34825, 35552, 35580, 35678, 35862, 36562, 36713, + 37753, 39421, 39962, + ], + 'dān dàn': [20747, 25812, 30213], + càn: [20751, 28591, 28799, 29158, 29864, 31922, 34194, 35634], + 'bīn bìn': [20752], + 'án àn': [20753], + tái: [ + 20755, 22382, 23343, 25260, 25825, 27311, 28849, 28850, 31817, 33274, 34233, + 36294, 37040, 39089, 39824, 40080, + ], + lán: [ + 20758, 20848, 22226, 23146, 23706, 23888, 24177, 25318, 25876, 26003, 26005, + 26639, 27396, 27415, 28572, 28734, 28742, 28769, 29155, 29175, 29884, 31726, + 31811, 31843, 32383, 33915, 34013, 34253, 34347, 34349, 35124, 35157, 35172, + 35188, 35197, 35659, 35733, 35888, 36509, 37997, 38247, 38348, 38417, 38858, + ], + 'nǐ yì ài yí': [20759], + méng: [ + 20762, 24170, 26330, 26406, 27223, 27308, 27659, 28309, 28635, 29965, 30015, + 30431, 31006, 33384, 33684, 33804, 34116, 34427, 34673, 37171, 37176, 38719, + 38720, 39021, 39259, 39885, 40463, 40562, + ], + níng: [ + 20764, 20957, 21659, 22144, 23331, 26592, 27235, 27320, 29406, 29552, 32845, + 32889, 34228, 37967, 39713, 40459, + ], + qióng: [ + 20765, 21357, 23430, 24824, 24972, 26703, 27241, 28970, 28973, 29026, 29069, + 29756, 29898, 30552, 31351, 31353, 31406, 31430, 31547, 31559, 33340, 33557, + 34257, 34285, 34537, 34540, 36217, 36331, 37019, 37518, + ], + liè: [ + 20768, 20925, 21015, 21155, 21181, 22482, 22483, 23028, 23771, 24036, 25362, + 25449, 26677, 27916, 27990, 28872, 28910, 29037, 29347, 29454, 29471, 29557, + 32855, 33055, 33570, 34522, 36244, 36496, 36862, 39090, 39707, 39715, 39844, + 40050, 40247, + ], + kuǎng: [20771, 22844, 25069], + bào: [ + 20772, 21245, 22577, 24513, 25253, 25265, 26323, 29190, 29350, 33762, 34403, + 34475, 35961, 37451, 37988, 38087, 39602, 39665, 39825, 40077, + ], + biāo: [ + 20774, 22658, 24150, 24426, 26631, 27161, 28398, 28684, 29083, 29186, 29451, + 30253, 30950, 33176, 33237, 35620, 36102, 37858, 37987, 38230, 38259, 39086, + 39095, 39110, 39111, 39112, 39114, 39121, 39129, 39130, 39531, 39561, 39647, + ], + zǎn: [20775, 20793, 22086, 25861, 26141, 36273, 36274], + háo: [ + 20779, 21989, 22071, 22097, 22158, 22741, 26883, 27612, 27627, 28640, 29510, + 29524, 31443, 31815, 34461, 34836, 35705, 35946, + ], + qìng: [20780, 20938, 24198, 24950, 27366, 28650, 30851, 30956, 32580, 38744], + chèn: [ + 20781, 22187, 27015, 27372, 30114, 34924, 35183, 35734, 35894, 36225, 36226, + 40787, 40788, 40832, + ], + téng: [ + 20783, 24144, 28373, 28443, 30140, 31824, 31832, 32290, 33150, 34276, 34373, + 34723, 35466, 35588, 36998, 39398, 39472, 39523, 39975, + ], + 'lǒng lóng lòng': [20785], + 'chán chàn': [20787], + 'ráng xiāng': [20788, 21239], + 'huì xié': [20790], + luó: [ + 20792, 25886, 26916, 27407, 29473, 29568, 31657, 31854, 32599, 32645, 33078, + 33121, 33821, 34367, 34746, 35260, 36923, 37007, 37837, 38012, 38179, 38233, + 39264, 39486, 39512, 39585, 40449, + ], + léi: [ + 20797, 23256, 27281, 27417, 29891, 30078, 32306, 32397, 32413, 32551, 32589, + 32696, 34050, 34354, 34374, 36704, 37939, 37976, 38253, 38647, 38721, 40041, + 40762, + ], + 'nàng nāng': [20798], + 'wù wū': [20800], + yǔn: [ + 20801, 21911, 22845, 25230, 27538, 27550, 29377, 30930, 33658, 36081, 37399, + 38445, 38504, 38549, 38691, 39355, 40811, 40819, + ], + zān: [20802, 27253, 31786, 31790, 31948, 37909, 37919, 40292], + yuán: [ + 20803, 20870, 21407, 21409, 21429, 22253, 22278, 22286, 22290, 22291, 22435, + 22636, 23220, 23236, 25588, 27038, 27052, 27260, 27358, 27781, 28274, 28304, + 28306, 29232, 29480, 29503, 31502, 32227, 32257, 32536, 32689, 33554, 34199, + 34653, 34671, 34696, 34945, 35108, 35612, 36677, 36757, 37005, 37031, 37211, + 37416, 37809, 39477, 39789, 40354, 40368, 40703, 40715, + ], + xiōng: [ + 20804, 20807, 20982, 21250, 21256, 21701, 24567, 24671, 27769, 27958, 33015, + 33016, 33422, 35369, 35454, 35771, + ], + chōng: [ + 20805, 22019, 24545, 24963, 24999, 25679, 27798, 28026, 29675, 32639, 32704, + 33282, 33375, 33594, 34909, 36438, + ], + zhào: [ + 20806, 22423, 26064, 26316, 26523, 27330, 29031, 29171, 29411, 30654, 31498, + 32576, 32617, 32644, 32897, 32903, 32904, 35412, 35791, 36213, 36249, 39841, + ], + 'duì ruì yuè': [20810, 20812, 20817], + kè: [ + 20811, 21051, 21184, 21194, 22529, 23060, 23458, 24682, 24857, 27690, 28312, + 30886, 32217, 32514, 33360, 34889, 35506, 35838, 37633, 38174, 39437, 39570, + ], + tù: [20814, 20820, 22541, 36812, 40309], + dǎng: [20826, 25897, 27411, 35681, 35740, 35872, 40680], + dōu: [20828, 20832, 21783, 27255, 31740, 34104], + huǎng: [ + 20836, 22875, 24140, 24627, 24653, 26180, 28862, 29056, 32296, 35428, 35594, + 35854, + ], + rù: [ + 20837, 21973, 23223, 25174, 26433, 27955, 28349, 32287, 32539, 34000, 35109, + 40176, + ], + nèi: [20839, 27677, 27678, 37655], + 'yú shù': [20842], + 'liù lù': [20845], + han: [20847, 29235], + tiān: [20850, 22825, 23126, 28155, 37215, 38740, 38749, 40647], + 'xīng xìng': [20852], + diǎn: [ + 20856, 22200, 22860, 23152, 25951, 26915, 28857, 30872, 33959, 34119, 36398, + 40670, + ], + 'zī cí': [20857], + jiān: [ + 20860, 20927, 22223, 22362, 22533, 22904, 23014, 23015, 23574, 24181, 24804, + 25099, 25108, 25627, 26942, 27179, 27388, 27516, 27569, 27570, 28244, 28688, + 28728, 29006, 29086, 29112, 29259, 29770, 30583, 31003, 31031, 31546, 31627, + 32216, 32273, 32516, 32547, 32937, 33392, 33393, 33733, 33786, 33868, 33977, + 34090, 34129, 34163, 34371, 35708, 35932, 37999, 38595, 38831, 38848, 38857, + 39216, 39330, 39956, 39964, 39993, 40099, 40146, 40273, 40307, 40380, 40547, + 40585, + ], + shòu: [ + 20861, 21463, 21806, 22781, 22784, 23551, 25480, 29417, 29539, 29560, 30185, + 30246, 32172, 32502, 33156, + ], + jì: [ + 20862, 20864, 21058, 21092, 21137, 21219, 22358, 22413, 22600, 22931, 23395, + 23490, 23492, 24301, 24401, 24475, 24524, 24760, 24782, 25083, 25216, 26081, + 26082, 26083, 26280, 26281, 26305, 26782, 27285, 27317, 27918, 28419, 28424, + 28721, 30197, 30304, 31133, 31273, 31287, 31300, 31306, 31335, 32000, 32153, + 32318, 32331, 32380, 32487, 32489, 32637, 33262, 33456, 33549, 33572, 33898, + 34015, 34055, 34186, 34318, 34350, 34363, 35034, 35136, 35244, 35274, 35336, + 35352, 35467, 35745, 35760, 36321, 36349, 36447, 36857, 38469, 38555, 38657, + 38717, 39525, 39589, 39675, 39742, 39773, 39781, 39898, 39933, 39990, 39999, + 40000, 40045, 40090, 40107, 40267, 40401, 40780, + ], + jiōng: [20866, 20875, 22384, 22491, 25155, 34319, 34324, 39369, 39403], + mào: [ + 20867, 20880, 23202, 24125, 24855, 25035, 26259, 26581, 26969, 27639, 29761, + 30339, 30474, 30592, 32772, 33538, 33850, 34640, 34980, 35218, 35980, 36031, + 36152, 37146, 37166, + ], + rǎn: [20868, 20873, 22988, 23203, 26579, 29635, 33490, 33925], + 'nèi nà': [20869], + gāng: [ + 20872, 20910, 21018, 21083, 22536, 22589, 23713, 25478, 25667, 26849, 29288, + 29317, 30104, 32177, 32434, 32568, 32577, 32609, 32923, 37357, 37792, + ], + cè: [ + 20874, 20876, 21397, 21408, 22824, 24257, 24699, 24827, 24993, 25927, 27979, + 28204, 31527, 31574, 31582, 31604, 31651, 33629, 33815, 33844, 34011, + ], + guǎ: [20878, 21072, 21102, 21479, 23521], + 'mào mò': [20882], + gòu: [ + 20883, 21826, 22392, 22434, 22815, 22816, 23230, 24384, 25606, 25728, 26500, + 27083, 29049, 35247, 35279, 35389, 35436, 35807, 36092, 36141, 36952, 38602, + ], + xǔ: [ + 20884, 21923, 26250, 26665, 29661, 30440, 31944, 35425, 35583, 35817, 37158, + 37265, + ], + mì: [ + 20886, 20906, 22055, 22611, 23483, 23494, 23770, 24130, 24142, 24166, 24637, + 27027, 27154, 27329, 27752, 28135, 28405, 28446, 28631, 29072, 32643, 34084, + 34588, 35219, 35220, 35227, 35269, 35600, 35879, 40719, + ], + 'yóu yín': [20888], + xiě: [20889, 20905, 34267], + jūn: [ + 20891, 21531, 22343, 26750, 27758, 30386, 30392, 30393, 30853, 33689, 34448, + 34944, 35232, 36557, 37406, 37505, 37534, 37717, 38055, 38965, 39862, 40106, + 40591, + ], + mí: [ + 20894, 25823, 28720, 29218, 29461, 29564, 31074, 31152, 32315, 33982, 34252, + 34346, 34364, 34990, 35448, 35598, 36855, 37274, 37310, 37311, 37316, 38270, + 40461, 40586, 40587, 40603, + ], + 'guān guàn': [20896, 35212, 35251, 35264, 35266], + měng: [ + 20897, 21200, 25077, 25529, 29467, 29556, 33355, 34594, 34835, 37683, 38192, + 39917, 40710, + ], + zhǒng: [20898, 22618, 23600, 27505, 28996, 30215, 32959, 33131, 36405], + zuì: [ + 20899, 23989, 26220, 26368, 26668, 27100, 27271, 27276, 31101, 32074, 32618, + 34142, 36768, 37204, 37243, 37257, 37642, + ], + yuān: [ + 20900, 21064, 22246, 23357, 23491, 26857, 28149, 28161, 28166, 28170, 28181, + 28737, 30498, 32921, 33918, 33964, 34574, 34613, 39372, 40182, 40219, 40311, + 40482, 40499, 40531, 40728, 40733, + ], + míng: [ + 20901, 21517, 26126, 26269, 26393, 27040, 27962, 28319, 29501, 30464, 30515, + 30609, 33559, 34719, 35245, 35450, 37133, 37528, 38125, 40180, 40483, + ], + kòu: [ + 20902, 21481, 23484, 23495, 25187, 25922, 28401, 31387, 31576, 31750, 34098, + 34107, 37350, 40391, + ], + tài: [ + 20909, 22826, 22835, 24562, 24577, 24907, 27760, 27761, 27888, 28313, 32957, + 33318, 37214, 37414, 38043, + ], + 'féng píng': [20911, 39342], + 'chōng chòng': [20914], + kuàng: [ + 20917, 22329, 22745, 23730, 25068, 26103, 26175, 26336, 26694, 27841, 29196, + 30486, 30518, 30719, 30783, 31014, 31340, 32075, 32086, 32394, 32425, 36026, + 36150, 36582, 37021, 37178, 37489, 37595, 37979, 40651, + ], + lěng: [20919], + pàn: [ + 20920, 21028, 21467, 27804, 27886, 28351, 28813, 29257, 30036, 30460, 32833, + 34978, 35195, 35402, 37612, 38011, 38934, 40293, + ], + fā: [20921, 24386, 27831, 30330, 30332], + xiǎn: [ + 20924, 23583, 23584, 23812, 23982, 24176, 25863, 26174, 27382, 27624, 28774, + 28877, 29177, 29405, 29443, 29547, 29550, 29569, 31122, 31557, 31666, 34259, + 34330, 34476, 34566, 35683, 36219, 36323, 37708, 38505, 38522, 38570, 38853, + 38997, 39023, + ], + qià: [20926, 22326, 24098, 24688, 27534, 27965, 30792, 32994, 39618], + 'jìng chēng': [20928, 20936, 28136], + sōu: [ + 20929, 21974, 24256, 24267, 25436, 25628, 25673, 28338, 29504, 33368, 33936, + 34699, 37131, 37273, 37802, 38204, 39100, 39125, 39231, 39306, 39466, + ], + měi: [ + 20930, 23172, 23226, 23309, 23876, 25396, 27598, 27599, 28028, 28220, 29144, + 32654, 36542, 37762, 38209, 40675, + ], + tú: [ + 20931, 22259, 22270, 22294, 22295, 22615, 23648, 23801, 23902, 24233, 24284, + 24466, 24711, 25580, 28034, 30223, 31585, 33135, 33660, 33956, 36351, 36884, + 37236, 37423, 37710, 39327, 39420, 40268, 40351, 40395, 40437, + ], + zhǔn: [20934, 20950, 22523, 28310], + 'liáng liàng': [20937, 28092, 37327], + diāo: [ + 20939, 20993, 21023, 21500, 22877, 24372, 24427, 27720, 29745, 30857, 31763, + 34413, 34497, 35970, 37677, 38613, 39817, 39899, 40119, 40304, 40742, + ], + còu: [20945, 28234, 33120, 36659, 36751], + ái: [20946, 21824, 22026, 25457, 28336, 30284, 30353, 30362], + duó: [20953, 21099, 22842, 22890, 30181, 36401, 37420, 37944, 38094], + dú: [ + 20959, 21301, 23355, 26911, 27357, 27568, 28060, 29261, 29272, 29322, 29346, + 29420, 29544, 29892, 30398, 35067, 35501, 35712, 35743, 35908, 36117, 37654, + 37983, 38855, 38883, 38885, 39475, 39633, 40681, 40695, + ], + 'jǐ jī': [20960], + fán: [ + 20961, 20962, 20963, 21285, 22694, 26443, 26569, 26853, 27146, 28735, 28902, + 29033, 29140, 29856, 30718, 31020, 31538, 31861, 32208, 32691, 33316, 33319, + 34208, 34345, 34844, 35150, 36463, 37353, 37895, 37922, 38034, 40429, + ], + jū: [ + 20965, 21258, 23093, 23150, 23621, 23820, 25221, 25398, 25516, 26798, 26896, + 27275, 27625, 27633, 27843, 28090, 29401, 29722, 30141, 30752, 32605, 33106, + 33357, 34587, 35070, 35530, 36308, 36376, 36537, 38513, 38606, 38816, 38827, + 39378, 39545, 39816, 40225, 40331, + ], + 'chù chǔ': [20966, 22788], + zhǐ: [ + 20970, 21159, 21675, 22336, 22375, 24075, 24649, 25210, 25351, 26088, 26547, + 27490, 27750, 27802, 27924, 28157, 30139, 30731, 31049, 31190, 32025, 32440, + 33463, 33547, 34274, 34937, 35175, 35368, 36286, 36601, 36725, 37231, 38447, + 40697, + ], + píng: [ + 20973, 20980, 21615, 22378, 22592, 23740, 24097, 24114, 24136, 24179, 24959, + 24977, 26544, 27956, 28969, 29622, 29942, 29953, 31470, 31667, 31752, 32574, + 33619, 33805, 34033, 34482, 34530, 35413, 35780, 36607, 36647, 37105, 39811, + 40070, + ], + kǎi: [ + 20975, 20977, 21056, 21108, 22450, 22607, 24698, 24887, 24936, 26271, 33928, + 36614, 37703, 37799, 38112, 38196, 38355, 38399, 39101, + ], + gān: [ + 20978, 22377, 23602, 23604, 23606, 23607, 26577, 27860, 28455, 29589, 29976, + 30131, 30712, 31487, 31608, 31891, 32925, 33527, 36800, 37200, 39760, + ], + 'kǎn qiǎn': [20981], + tū: [ + 20984, 22551, 23936, 25464, 28043, 28261, 30172, 31167, 31171, 31361, 33878, + 37621, 40282, 40757, + ], + 'āo wā': [20985], + chū: [20986, 21021, 23680, 25716, 27019, 27159, 35993, 40803], + dàng: [ + 20988, 22325, 22449, 22731, 26723, 27284, 27705, 29847, 29949, 30442, 30602, + 30720, 30893, 30993, 31772, 33633, 33770, 34153, 34351, 36260, 36927, 38652, + ], + hán: [ + 20989, 20990, 21547, 22277, 23074, 23506, 23841, 26199, 26770, 27995, 28085, + 28559, 28947, 29696, 29981, 31592, 34604, 37015, 37039, 37601, 38867, 38889, + ], + záo: [20991, 38015], + dāo: [20992, 20994, 24521, 27672, 33312, 34729, 37334, 39771, 40061], + chuāng: [20997, 25680, 29262, 29269, 30126, 30241, 31379, 31383, 31419], + 'fēn fèn': [20998], + 'qiè qiē': [20999], + kān: [21002, 21208, 22570, 25121, 26654, 40853, 40859], + cǔn: [21004, 24534], + chú: [ + 21005, 21416, 24174, 24282, 27249, 27337, 27365, 28353, 29331, 31720, 32801, + 33467, 33954, 33965, 34573, 34805, 35936, 36238, 36464, 36487, 36501, 37455, + 37604, 38148, 38500, 38607, 38619, 40373, + ], + 'huà huá': [21010], + lí: [ + 21013, 21075, 21114, 21145, 21400, 21937, 22175, 22212, 23264, 23415, 24306, + 24737, 26792, 26808, 26819, 28435, 28757, 29313, 29314, 29432, 29709, 29827, + 29896, 30432, 30557, 31163, 31346, 31472, 31587, 31729, 31852, 31950, 32301, + 32545, 32633, 33347, 33650, 33758, 34016, 34110, 34268, 34362, 34570, 34765, + 34808, 34859, 35125, 35623, 35981, 37288, 37611, 37637, 37867, 37975, 38626, + 39530, 39562, 39887, 39916, 40058, 40097, 40313, 40477, 40514, 40654, 40679, + ], + yuè: [ + 21014, 23347, 23684, 23731, 23997, 24689, 24709, 24742, 25097, 25224, 25459, + 26376, 27198, 28729, 29210, 29605, 31039, 31156, 31703, 31814, 31845, 31856, + 31908, 31925, 34341, 34446, 34447, 35500, 36234, 36288, 36291, 36493, 36559, + 37381, 37470, 38000, 38074, 38321, 38322, 38405, 40465, 40473, 40678, 40864, + ], + liú: [ + 21016, 21129, 22176, 23225, 23911, 26056, 26066, 27060, 27210, 27969, 27983, + 28687, 29705, 29792, 29804, 29858, 30020, 30041, 30065, 30081, 30244, 30277, + 30827, 33957, 33989, 34761, 35031, 37775, 37840, 37890, 38240, 39104, 39109, + 39127, 39392, 39413, 39470, 39505, 39581, 39969, 40377, 40544, 40589, + ], + zé: [ + 21017, 21063, 21863, 22038, 23271, 24123, 24152, 25246, 27149, 27509, 27810, + 27854, 28333, 30367, 30612, 30688, 30987, 31654, 31744, 33332, 34102, 34828, + 35159, 35630, 36094, 36188, 36846, 40453, 40794, 40816, + ], + 'chuàng chuāng': [21019, 21109], + qù: [21022, 21434, 21435, 38324, 38339, 38418, 40622, 40705], + 'bié biè': [21029, 21035], + 'páo bào': [21032], + 'chǎn chàn': [21036, 21079, 24157], + guā: [ + 21038, 21120, 26736, 27460, 29041, 29916, 32973, 36411, 39082, 39091, 39463, + 40240, 40505, + ], + gēng: [ + 21039, 24218, 26921, 28013, 28991, 30026, 32090, 32686, 32697, 32789, 33774, + 36065, 36179, 40330, 40530, + ], + dào: [ + 21040, 22133, 24764, 26913, 27300, 29182, 29913, 30423, 30428, 31282, 31291, + 32411, 32767, 33364, 33791, 34908, 34911, 36551, 36947, + ], + chuàng: [21041, 21071, 21081, 24582, 24884], + kū: [ + 21043, 21741, 22288, 22528, 26543, 26701, 30715, 31391, 36301, 37056, 39607, + 39852, + ], + duò: [ + 21044, 21057, 22703, 23598, 24816, 24988, 25349, 26711, 33333, 36325, 36346, + 38474, 38479, 39167, 39283, 40317, + ], + 'shuā shuà': [21047], + 'quàn xuàn': [21048], + 'chà shā': [21049, 21070], + 'cì cī': [21050], + guì: [ + 21053, 21055, 21130, 21132, 25740, 25904, 26123, 26690, 26914, 27126, 27195, + 27331, 29476, 31148, 31552, 34005, 35160, 36020, 36149, 36330, 37888, 37966, + 38844, 40022, 40037, + ], + lóu: [ + 21061, 23044, 23105, 24276, 27004, 27155, 28295, 28426, 29089, 32807, 32812, + 33371, 33932, 34078, 34684, 34747, 35633, 36545, 36977, 38843, 39621, 39631, + ], + cuò: [ + 21065, 21074, 21405, 22798, 25387, 25514, 26852, 33693, 33697, 33996, 36906, + 37564, 37679, 38153, 38169, + ], + 'xiāo xuē': [21066], + 'kēi kè': [21067, 23557], + 'là lá': [21068], + tī: [21076, 26799, 36386, 37563, 38161, 40392, 40393], + pōu: [21078], + wān: [ + 21084, 22598, 22762, 24117, 24367, 24398, 28286, 28523, 28771, 30549, 34623, + 35916, + ], + 'bāo bō': [21085, 21093], + duō: [21087, 21636, 21702, 22153, 22810, 22811, 25479, 27634, 30035, 35056], + qíng: [ + 21088, 21197, 22813, 24773, 25806, 26228, 26258, 26878, 27144, 27296, 27696, + 29984, 30808, 33885, 40677, + ], + 'yǎn shàn': [21089], + 'dū zhuó': [21090], + yān: [ + 21094, 23267, 23846, 23958, 24697, 25045, 25064, 27182, 28106, 28153, 28473, + 28895, 28937, 28945, 29017, 29658, 31734, 33005, 33241, 33784, 37154, 37251, + 38329, 38409, 40683, + ], + huō: [21096, 21136, 21529, 25865, 31220, 32800, 38186, 39454], + shèng: [ + 21097, 21104, 21213, 22307, 22701, 23882, 26208, 27066, 27251, 29726, 32854, + 34114, 36025, 36088, + ], + 'duān zhì': [21100], + wū: [ + 21101, 21596, 21978, 22316, 23627, 24043, 24345, 26439, 27469, 27737, 27738, + 27745, 27967, 28879, 31375, 31676, 34704, 35464, 35491, 35820, 37036, 37140, + 37794, 38056, 39966, 40238, + ], + gē: [ + 21106, 21733, 22314, 24385, 25096, 25107, 25128, 27468, 28370, 29365, 32912, + 35004, 35596, 37814, 40218, 40255, 40509, + ], + 'dá zhá': [21107], + chuán: [21110, 26295, 26941, 31685, 33313, 33321, 33337, 36658, 36932], + 'tuán zhuān': [21112, 28441, 31743], + 'lù jiū': [21113], + pēng: [ + 21115, 21257, 22061, 24614, 24690, 25256, 26760, 28921, 30768, 36591, 39373, + ], + piāo: [ + 21117, 21217, 24915, 26074, 29349, 32754, 34741, 39107, 39108, 39128, 39762, + ], + kōu: [21118, 24388, 25248, 25715, 30477, 30616, 33444], + 'jiǎo chāo': [21119, 21131, 21222, 25719], + qiāo: [ + 21121, 21226, 22685, 24167, 25970, 27207, 27587, 29126, 30807, 30973, 32337, + 36268, 36343, 36365, 36474, 36475, 37115, 37153, 37157, 37739, 37740, 37936, + 38201, 38941, + ], + 'huá huà': [21123], + 'zhā zhá': [21124], + 'pī pǐ': [21128, 24706], + tāng: [21135, 22049, 32688, 34202, 34666, 36442, 38842, 40734], + chán: [ + 21142, 22197, 22757, 23157, 23307, 24009, 24283, 26830, 27610, 28281, 28537, + 28538, 28598, 28685, 28730, 29016, 29521, 30939, 32254, 32399, 32402, 32544, + 33388, 34633, 34768, 34796, 34814, 35479, 35730, 35863, 36500, 37181, 37185, + 37579, 38001, 38261, 39262, 39307, + ], + zuān: [21143, 36508, 36518, 37446, 37978], + mó: [ + 21144, 23275, 23332, 23351, 23579, 25721, 25845, 27205, 31970, 33180, 34278, + 34321, 35624, 35625, 35871, 39235, 39261, 39309, 39629, 39764, 39801, + ], + zhú: [ + 21146, 26040, 26351, 27416, 28767, 28834, 28891, 29165, 29221, 30211, 31481, + 31489, 31516, 33331, 33599, 34027, 34827, 34878, 36485, 36880, 36907, 38019, + 40001, + ], + quàn: [21149, 21223, 21240, 29302, 38863], + 'jìn jìng': [21156, 21170, 21185], + kēng: [ + 21157, 22353, 29308, 30785, 30812, 35481, 37557, 37726, 37847, 38143, 38444, + ], + 'xié liè': [21158], + 'zhù chú': [21161], + nǔ: [21162, 24361, 30766, 33004], + shào: [21165, 21362, 21736, 28530, 32057, 32164, 32461, 34961, 37045], + miǎo: [ + 21168, 26474, 28156, 28218, 30471, 31186, 31694, 32242, 32520, 34256, 37000, + ], + kǒu: [21174, 21475], + wā: [ + 21176, 22380, 23090, 23207, 23666, 25366, 25896, 27964, 28315, 28453, 29950, + 30038, 31349, 31370, 31402, 34521, 38856, 40707, + ], + kuāng: [ + 21179, 21281, 21289, 21712, 24647, 27949, 31568, 31610, 35462, 35795, 36589, + 37052, + ], + hé: [ + 21182, 21642, 21853, 22976, 23750, 25926, 26359, 26567, 26945, 27644, 27827, + 28088, 28206, 28565, 29062, 30380, 30407, 30409, 30413, 30418, 31166, 31701, + 31866, 31917, 32750, 33743, 33794, 35208, 35384, 35429, 37059, 37339, 37452, + 37961, 38305, 38356, 38402, 38422, 38824, 38940, 39172, 39288, 39802, 40534, + 40615, 40789, 40833, 40866, + ], + gào: [ + 21186, 21567, 21578, 23804, 31086, 31088, 31134, 31606, 35493, 35824, 37084, + 37615, 38150, + ], + 'bó bèi': [21187], + láng: [ + 21190, 23247, 24266, 25999, 26745, 27028, 27139, 27444, 29436, 29701, 29807, + 30816, 31234, 33350, 33992, 34571, 34690, 36532, 37074, 37086, 37571, 37807, + 38162, + ], + xūn: [ + 21195, 21211, 21234, 21235, 22161, 22339, 22489, 22628, 22734, 22758, 26331, + 29179, 29551, 30660, 32385, 33232, 34219, 34224, 34317, 37306, + ], + 'juàn juān': [21196, 29945], + 'lè lēi': [21202], + kài: [21203, 28812, 28887, 37774], + 'wěng yǎng': [21212], + qín: [ + 21220, 21994, 22105, 23964, 24200, 25027, 25028, 25446, 25810, 26035, 27278, + 28607, 29665, 29748, 29753, 30269, 31165, 31206, 32825, 33449, 33465, 33766, + 34707, 34820, 37401, 37419, 38594, 38770, 40185, 40301, + ], + jiàng: [ + 21221, 21278, 21280, 23929, 24348, 24374, 25726, 27364, 27930, 28400, 29343, + 31969, 31976, 32115, 32475, 35645, 37233, 37284, 37292, + ], + fān: [ + 21227, 23311, 24070, 24161, 24539, 24995, 26073, 26075, 32345, 32763, 34281, + 36691, 39103, 39132, 40021, + ], + juān: [ + 21228, 23010, 23071, 25424, 28051, 34866, 35024, 37816, 37931, 38220, 40515, + ], + 'tóng dòng': [21229, 28884, 29137, 29418], + lǜ: [ + 21236, 22415, 23874, 24459, 24942, 27695, 28388, 28670, 29192, 31675, 32160, + 32322, 33183, 33870, 34385, 37986, + ], + chè: [ + 21238, 22396, 24443, 24505, 25507, 25764, 28552, 28898, 29217, 30638, 30825, + 32837, 36832, 38937, + ], + sháo: [21242, 29631, 38902], + 'gōu gòu': [21246], + cōng: [ + 21254, 22250, 22257, 24553, 24625, 24740, 26288, 27180, 28439, 29821, 29825, + 30619, 31733, 32369, 32865, 32870, 32874, 32880, 33473, 33552, 33905, 34031, + 34085, 34764, 37743, 37843, 37862, 39448, 39492, 39586, + ], + 'táo yáo': [21259, 38518], + páo: [ + 21263, 21638, 22409, 24214, 29230, 29389, 34957, 35100, 36595, 38788, 40581, + ], + dá: [ + 21266, 22962, 24603, 28831, 29173, 30051, 31530, 32653, 33625, 34200, 34813, + 35418, 36798, 36815, 36822, 36826, 36921, 36948, 37949, 38780, 38801, 38851, + 40854, 40856, + ], + 'huà huā': [21270], + 'běi bèi': [21271], + nǎo: [ + 21272, 22452, 22550, 23248, 24700, 24745, 24817, 29785, 30895, 33041, 33075, + 33126, + ], + 'chí shi': [21273], + fāng: [ + 21274, 22543, 26041, 28115, 29285, 33459, 37025, 37377, 37690, 38059, 40203, + ], + zā: [21277, 21634, 24064, 27806, 33244, 33250, 36810, 37460, 39795], + qiè: [ + 21287, 21394, 22974, 24623, 24719, 24812, 24860, 25352, 31317, 31363, 31434, + 31521, 31655, 31691, 31841, 36389, 37733, 38194, 39900, + ], + 'zāng cáng': [21288], + fěi: [21290, 22876, 24753, 26832, 27047, 31706, 32737, 34140, 35513, 35837], + 'kuì guì': [21294, 21297], + suǎn: [21300], + pǐ: [ + 21305, 22141, 22189, 22318, 24192, 30174, 30294, 33076, 33481, 37538, 40196, + ], + 'qū ōu': [21306, 21312], + 'kē qià': [21308], + 'yǎn yàn': [21309, 26858], + biǎn: [ + 21310, 24828, 25561, 30885, 31272, 31366, 34250, 35082, 36022, 36140, 40216, + ], + nì: [ + 21311, 22532, 23263, 23354, 24772, 24885, 26165, 26289, 27708, 30500, 30568, + 32268, 32978, 33147, 33193, 36870, + ], + niàn: [21316, 21816, 22493, 24319, 24565, 24791, 33356], + sà: [ + 21317, 27346, 33038, 33832, 34159, 34217, 37394, 38561, 39087, 39122, 39354, + ], + zú: [21318, 21739, 23850, 26063, 31652, 36275, 36388, 38238], + shēng: [ + 21319, 21583, 22768, 26008, 26119, 26363, 26529, 27525, 27881, 28262, 28986, + 29298, 29636, 29983, 29989, 31444, 31513, 32882, 37454, 37727, 38441, 38494, + 38521, 40319, 40746, + ], + wàn: [ + 21325, 21328, 24552, 26468, 30627, 33045, 33109, 33836, 34755, 36110, 36624, + 37693, + ], + 'huá huà huā': [21326, 33775], + bēi: [21329, 24754, 25593, 26479, 26734, 30403, 30865, 34275, 40303, 40526], + 'zú cù': [21330], + 'dān shàn chán': [21333, 21934], + 'nán nā': [21335], + 'shuài lǜ': [21339], + 'bǔ bo pú': [21340], + 'kuàng guàn': [21341], + biàn: [ + 21342, 21464, 22793, 23749, 24321, 24487, 24557, 25219, 26154, 27763, 27764, + 29603, 33361, 33476, 35213, 35546, 35722, 36769, 36775, 36776, 36777, 36779, + 36782, 36783, 36941, 37318, + ], + bǔ: [21343, 21754, 25429, 34917, 35036, 40468], + 'zhàn zhān': [21344, 35249], + 'kǎ qiǎ': [21345], + lú: [ + 21346, 22183, 22406, 22746, 24208, 24300, 26341, 26534, 26636, 27368, 27896, + 28696, 28809, 29200, 29561, 29576, 29904, 30439, 30673, 31834, 32401, 32591, + 33002, 33242, 33326, 33339, 33387, 33446, 34310, 34854, 36708, 36723, 37417, + 37994, 39025, 39045, 39359, 39639, 39794, 40056, 40072, 40469, 40492, 40696, + ], + lǔ: [ + 21348, 22647, 25523, 25796, 27152, 27257, 27347, 27660, 28407, 28571, 28674, + 30837, 30944, 31326, 33379, 33386, 34046, 34383, 34396, 37824, 37930, 37989, + 38245, 39791, 40065, 40565, + ], + guà: [21350, 21865, 25346, 25499, 32611, 35074, 35455, 35798], + 'áng yǎng': [21356], + yìn: [ + 21360, 22461, 22583, 24277, 24941, 24982, 24983, 25050, 27925, 28250, 29452, + 30282, 32996, 33562, 37235, 39843, + ], + què: [ + 21364, 21371, 22617, 23813, 24747, 24872, 24932, 25609, 27063, 29161, 29751, + 30389, 30830, 30906, 31021, 38347, 38421, 40306, 40522, + ], + luǎn: [21365], + 'juàn juǎn': [21367, 24059], + 'chǎng ān hàn': [21378], + 'wěi yán': [21379], + tīng: [ + 21381, 21403, 21548, 24193, 24304, 24307, 27712, 28867, 28916, 32142, 32787, + 32884, 32892, 32893, 38803, + ], + 'zhé zhái': [21383], + 'hàn àn': [21384, 23677], + yǎ: [21386, 21782, 24204, 30166, 30210, 34149], + shè: [ + 21389, 21401, 24381, 24913, 24948, 25086, 25666, 27399, 28041, 28091, 28169, + 28384, 28740, 31038, 33294, 34062, 34818, 35373, 35774, 36198, 39431, 40605, + ], + dǐ: [ + 21390, 21607, 22360, 24356, 25269, 25310, 25483, 29300, 30757, 33767, 35293, + 35398, 35787, 36583, 37048, 38458, 39606, 39923, + ], + 'zhǎ zhǎi': [21391], + páng: [ + 21392, 23246, 24222, 24492, 33152, 33341, 34691, 36868, 39967, 40145, 40846, + 40848, + ], + 'zhì shī': [21396], + máng: [ + 21398, 21506, 21732, 23055, 24537, 24702, 26455, 26471, 27730, 27997, 29307, + 30173, 30450, 30829, 31488, 33426, 33579, 34313, 37017, 37359, 37609, 38099, + 39417, + ], + zuī: [21404, 27190, 32407, 34773], + 'shà xià': [21414, 24264], + áo: [ + 21419, 22007, 22008, 24274, 25942, 28406, 29522, 29523, 29832, 32753, 32758, + 32762, 32881, 34076, 34735, 35639, 35640, 36968, 37846, 38558, 39986, 40140, + 40404, 40711, + ], + 'lán qiān': [21425], + 'sī mǒu': [21430], + 'gōng hóng': [21431], + 'lín miǎo': [21432], + 'qiú róu': [21433], + dū: [21438, 22047, 30563, 37263], + 'xiàn xuán': [21439, 32291], + 'cān shēn cēn sān': [21442, 21443, 21444, 21445], + 'ài yǐ': [21446], + 'chā chà chǎ chá': [21449], + shuāng: [ + 21452, 23360, 23367, 27398, 31029, 33389, 38617, 38684, 39483, 39526, 39590, + 40414, 40472, 40564, + ], + shōu: [21454, 25910], + guái: [21455], + bá: [ + 21456, 22957, 25244, 25300, 28838, 30329, 32968, 33543, 33757, 35417, 36299, + 36599, 39747, 40741, + ], + 'fā fà': [21457], + 'zhuó yǐ lì jué': [21461], + qǔ: [21462, 23094, 31468, 34682, 35411, 40818, 40843], + 'jiǎ xiá': [21466, 24486], + 'wèi yù': [21470, 23561, 34074], + dié: [ + 21472, 22436, 22558, 23756, 24137, 24654, 24821, 25116, 26337, 27548, 27662, + 29251, 29266, 29918, 30067, 30082, 30089, 30090, 30879, 32112, 32470, 32778, + 32779, 32965, 33363, 33525, 34600, 34678, 35083, 35396, 35548, 35853, 36334, + 36416, 36845, 38267, 39944, 40125, 40233, + ], + ruì: [ + 21473, 26520, 27757, 29790, 30591, 33454, 34443, 34617, 37555, 37613, 38160, + ], + 'jù gōu': [21477], + lìng: [21478, 21604, 28841, 34342], + 'dāo dáo tāo': [21480], + 'zhī zhǐ': [21482], + jiào: [ + 21483, 21580, 22018, 22054, 22093, 23315, 25997, 26016, 28376, 28438, 29541, + 29651, 30381, 31382, 34272, 35334, 35685, 36269, 36611, 36686, 36735, 36739, + 37237, 37294, 37314, + ], + 'zhào shào': [21484], + 'kě kè': [21487], + 'tái tāi': [21488, 33492], + pǒ: [21493, 23552, 31544, 31653, 37461, 38071, 39370], + 'yè xié': [21494], + 'hào háo': [21495], + tàn: [21497, 22022, 25506, 27470, 28256, 28845, 30899, 33301], + 'hōng hóng': [21503], + miē: [21504, 21673, 21750, 23405], + 'xū yū yù': [21505], + chī: [ + 21507, 21735, 21931, 21988, 22084, 22939, 23224, 24424, 24434, 25691, 25889, + 27558, 29947, 30196, 30305, 30517, 30621, 31518, 31898, 33013, 34473, 34733, + 35381, 39761, 40223, 40260, 40497, 40656, 40797, + ], + 'xuān sòng': [21509], + yāo: [ + 21510, 21907, 22829, 22934, 24186, 26950, 27520, 31045, 33136, 33917, 35358, + 36992, 40193, 40226, + ], + zǐ: [ + 21511, 22985, 22986, 23376, 26445, 26771, 27039, 27252, 28371, 30711, 31213, + 31531, 31869, 32043, 32788, 34424, 35391, 37352, + ], + 'hé gě': [21512, 40068], + 'cùn dòu': [21515], + 'tóng tòng': [21516], + 'tǔ tù': [21520, 21771], + 'zhà zhā': [21522, 22867], + 'xià hè': [21523], + 'ā yā': [21526], + 'ma má mǎ': [21527], + lìn: [ + 21533, 24673, 24715, 27209, 28955, 29968, 33190, 34106, 34298, 36035, 36161, + 36472, 36495, 36505, 36522, 36709, 38325, + ], + tūn: [21534, 26302, 26396, 28958], + 'bǐ pǐ': [21537], + qìn: [ + 21538, 21539, 21786, 25227, 25599, 25607, 25779, 27777, 28697, 33763, 34301, + ], + 'jiè gè': [21540], + 'fǒu pǐ': [21542], + 'ba bā': [21543], + dūn: [ + 21544, 22136, 22697, 22698, 24775, 25737, 25780, 29340, 29540, 30981, 34611, + 36478, 39504, + ], + fēn: [ + 21545, 24073, 26128, 26374, 26788, 26875, 27675, 31445, 32027, 32439, 32706, + 33452, 34927, 35356, 36526, 37210, 37398, 38640, 39220, 39257, 39322, + ], + 'é huā': [21546], + 'kēng háng': [21549, 22932], + shǔn: [21550], + 'zhī zī': [21553], + 'yǐn shěn': [21554], + wú: [ + 21555, 21556, 21577, 22706, 23807, 26791, 27206, 27595, 27926, 28015, 28961, + 29688, 29841, 31078, 33436, 33571, 33665, 34154, 34568, 34801, 35669, 37082, + 37593, 38139, 39875, 40272, 40417, 40512, 40751, + ], + 'chǎo chāo': [21557], + 'nà nè': [21558], + 'xuè chuò jué': [21559], + chuī: [21561, 28810, 40865], + 'dōu rú': [21562], + hǒu: [21564, 29372], + 'hōng hǒu ōu': [21565], + 'wú yù': [21566], + 'ya yā': [21568], + 'è e': [21571], + dāi: [21574, 25051, 29507], + 'mèn qǐ': [21575], + hōng: [ + 21581, 22173, 25544, 28788, 28888, 28962, 30817, 34216, 35335, 35902, 36579, + 36663, 36703, 36720, 37735, + ], + nà: [ + 21584, 25466, 31517, 32013, 32435, 32941, 33971, 34930, 35965, 35968, 36572, + 37069, 37385, 38048, 38777, 39798, + ], + 'tūn tiān': [21585], + 'fǔ ḿ': [21586, 22072], + 'dāi tǎi': [21588], + 'ǒu ōu òu': [21589], + 'bài bei': [21591], + 'yuán yún yùn': [21592, 21729], + guō: [ + 21593, 21871, 22035, 22490, 22557, 22670, 23838, 24393, 24397, 25046, 29459, + 30225, 32850, 34632, 34760, 37101, 37403, 37707, 38149, + ], + 'huá qì': [21594], + 'qiàng qiāng': [21595, 36292], + shī: [ + 21598, 22833, 23608, 23629, 24072, 24107, 26045, 27977, 28260, 28287, 28334, + 28348, 28629, 29422, 29509, 29793, 32065, 33913, 33938, 33997, 34417, 34664, + 35127, 35193, 35433, 35799, 37055, 37315, 37447, 37734, 39924, 39972, 40122, + 40178, 40190, 40371, 40484, + ], + juǎn: [21599, 22477, 33223, 33764, 37640, 38185], + pěn: [21600, 32760], + 'wěn mǐn': [21601], + 'ne ní': [21602], + 'ḿ m̀ móu': [21603], + rán: [ + 21605, 22059, 28982, 29123, 32334, 32944, 34470, 34490, 34939, 34951, 34977, + 39653, 39663, + ], + 'tiè chè': [21611], + 'qì zhī': [21614], + 'zǐ cī': [21616], + 'guā gū guǎ': [21617], + 'cī zī': [21618], + 'hǒu xǔ gòu': [21620], + 'hē ā á ǎ à a': [21621], + náo: [ + 21622, 22802, 23793, 23977, 24014, 25376, 25747, 29489, 30791, 34546, 34799, + 35401, 35658, 37891, 38105, + ], + 'xiā gā': [21623], + pēi: [21624, 24588, 32935, 32986, 34883, 37253], + 'háo xiāo': [21626], + mìng: [21629, 25525], + 'dá dàn': [21630], + 'zuǐ jǔ': [21632], + 'xián gān': [21633], + pǒu: [21637, 21731, 29315], + 'yǎng yāng': [21641], + 'zǎ zé zhā': [21643], + 'hé hè huó huò hú': [21644], + hāi: [21645], + dā: [21649, 21714, 22112, 22710, 25645, 25752, 32823, 35105, 37789], + 'kǎ kā': [21652], + gū: [ + 21653, 21762, 21763, 22993, 23284, 23396, 24044, 24045, 26599, 27245, 27837, + 27858, 31250, 31519, 31629, 31643, 31696, 32603, 33533, 33735, 33776, 33991, + 35290, 36593, 36594, 36721, 36764, 37220, 37426, 39829, 40227, 40490, + ], + 'kā gā': [21654], + zuo: [21655], + lóng: [ + 21657, 22184, 23952, 24003, 24004, 26173, 26344, 26407, 26634, 27102, 27379, + 28272, 28381, 28427, 29206, 29649, 29903, 30275, 30508, 30675, 30779, 31025, + 31026, 31423, 31452, 32843, 32894, 32999, 33551, 34338, 34858, 34860, 35185, + 35909, 37863, 37992, 38707, 38727, 39521, 40471, 40845, 40850, 40857, + ], + 'xiàn xián': [21662], + qì: [ + 21664, 21805, 22096, 22120, 22817, 24323, 24967, 25001, 26275, 26820, 27435, + 27668, 27671, 27683, 27732, 27773, 27875, 28230, 28231, 28801, 29960, 30453, + 30709, 30875, 30902, 30940, 30951, 32586, 33438, 33914, 34258, 34815, 35350, + 35755, 36804, 37905, + ], + 'xì dié': [21669], + 'liē liě lié lie': [21671], + zī: [ + 21672, 21982, 22997, 23039, 23388, 23411, 23414, 23856, 23915, 26661, 26900, + 28100, 28285, 28363, 28588, 29574, 31116, 31222, 31906, 32014, 32199, 32213, + 32387, 32513, 33546, 33586, 33880, 35566, 35864, 36018, 36039, 36160, 36164, + 36220, 36241, 36262, 36636, 36666, 36750, 37137, 37421, 37657, 37759, 37793, + 38193, 38211, 38974, 38975, 39661, 39892, 39974, 40123, 40325, 40722, 40781, + 40796, 40839, + ], + mī: [21674], + 'jī xī qià': [21677], + 'gē luò kǎ lo': [21679], + 'shù xún': [21680], + 'zán zá zǎ zan': [21681], + 'hāi ké': [21683], + huī: [ + 21684, 22085, 22101, 23118, 23176, 24145, 24509, 24674, 25339, 25381, 25582, + 26198, 26249, 26958, 27907, 28680, 28784, 28787, 28899, 30579, 31112, 32730, + 32748, 34355, 34950, 35096, 35452, 35801, 35927, 36637, 36745, 39988, 40638, + ], + 'huài shì': [21686], + táo: [ + 21687, 21845, 26691, 27310, 27950, 28120, 31097, 32175, 32505, 33796, 34602, + 35050, 36847, 36867, 37252, 37630, 38784, 38793, 39232, 39395, 39434, 40727, + ], + xián: [ + 21688, 21859, 23092, 23097, 23153, 23244, 23290, 23291, 24358, 25382, 25743, + 28046, 28282, 28566, 29961, 30187, 30279, 30286, 32067, 32984, 33335, 34262, + 34495, 34525, 34900, 34904, 35512, 35572, 36066, 36114, 36132, 36657, 37262, + 37532, 37990, 38289, 38386, 40435, 40436, 40444, 40519, 40569, 40601, + ], + 'è àn': [21689], + 'xuān xuǎn': [21690, 28892], + 'wāi hé wǒ guǎ guō': [21692], + 'yàn yè yān': [21693], + āi: [21696, 21710, 22467, 28350, 37552, 37764, 38207], + pǐn: [21697, 27008], + shěn: [ + 21698, 23158, 23352, 23457, 23479, 23529, 24350, 26315, 28182, 28683, 30635, + 30692, 30695, 35262, 35360, 35543, 35717, 35842, 35849, 37029, 38947, 39787, + ], + 'hǒng hōng hòng': [21700], + 'wā wa': [21703], + 'hā hǎ hà': [21704], + zāi: [21705, 26685, 28221, 28328, 28797, 28798, 28886, 30581, 36083], + 'dì diè': [21707], + pài: [21708, 27808, 27966, 28178, 28227, 33934, 37763], + 'gén hěn': [21711], + 'yǎ yā': [21713, 38597], + 'yuě huì': [21717, 22118], + nián: [21718, 24180, 31178, 31205, 39822, 39920, 40071, 40118, 40263, 40655], + 'huá huā': [21719, 22057], + 'jì jiē zhāi': [21724, 22156], + mōu: [21726], + 'yō yo': [21727, 21938], + lòng: [21730, 26759, 36122], + 'ò ó é': [21734], + 'lī lǐ li': [21737], + 'nǎ na nǎi né něi': [21738], + hè: [ + 21740, 22414, 22737, 23497, 24786, 28931, 28994, 29178, 29184, 30283, 30859, + 32751, 35088, 35614, 36032, 36154, 36203, 38733, 38734, 38735, 40372, 40470, + 40548, + ], + 'bō pò bā': [21745], + zhé: [ + 21746, 21856, 21894, 22174, 22481, 24714, 25722, 26210, 26211, 27517, 30714, + 30739, 30932, 31863, 31885, 34420, 34544, 34756, 34985, 35423, 35627, 35642, + 35713, 35723, 35882, 36626, 36633, 36685, 36740, 36761, 39871, + ], + 'liàng láng': [21748], + 'liè lǜ': [21751], + hān: [21755, 25000, 34486, 35901, 37219, 38919, 39032, 39328, 39805, 40766], + 'hēng hng': [21756], + gěng: [ + 21757, 22466, 23802, 25389, 26775, 32134, 32480, 32831, 33668, 37088, 39614, + 39873, 40096, + ], + 'chuò yuè': [21758], + 'gě jiā': [21759], + 'bei bài': [21764], + 'hán hàn': [21765], + chún: [ + 21767, 28017, 28283, 28387, 28440, 29321, 32020, 32431, 33059, 33724, 33939, + 34036, 37255, 37269, 37662, 38489, 39897, 40329, 40529, + ], + 'ài āi': [21769], + 'jiá qiǎn': [21770], + 'yán dàn xián': [21772], + chē: [21779, 30743, 30824, 33687, 34556], + 'wú ńg ń': [21780], + zào: [ + 21781, 21795, 22122, 24933, 26765, 28790, 29040, 29157, 30337, 30338, 31427, + 31432, 31753, 33345, 35679, 36270, 36481, 36896, + ], + dí: [ + 21785, 21831, 22016, 22145, 23265, 24312, 25932, 25973, 26769, 28068, 28364, + 29380, 31515, 31860, 31988, 33494, 33659, 34059, 34064, 34273, 35263, 35276, + 35956, 36842, 38766, 38932, 39344, 39650, 40464, + ], + 'gòng hǒng gǒng': [21789, 21962], + dóu: [21790], + 'lào láo': [21792, 22062, 24998], + huàn: [ + 21796, 21914, 22850, 22864, 23462, 23880, 24187, 24739, 24844, 25442, 25563, + 25808, 25868, 26777, 27125, 28003, 28067, 28185, 28470, 28579, 28873, 28949, + 29029, 29773, 30186, 30227, 30534, 32914, 34279, 35938, 36696, 36909, 39879, + 39926, 39936, 40105, + ], + léng: [21797, 22596, 26974, 30864, 34192], + 'wō wěi': [21801], + fěng: [21802, 35202, 35575, 35773], + 'yín jìn': [21803], + 'hǔ xià': [21804], + wéi: [ + 21807, 22260, 22285, 22749, 23767, 23774, 23916, 24079, 24119, 24131, 24799, + 26693, 27817, 27912, 28064, 28235, 28296, 28493, 28505, 28543, 28656, 29353, + 30656, 32173, 32500, 34038, 35257, 36829, 36949, 37164, 37248, 37711, 38344, + 38385, 38859, 38886, 39840, + ], + shuā: [21808], + chàng: [21809, 24581, 24757, 26274, 28987, 30021, 30076, 35503, 38868, 39727], + 'ér wā': [21810], + qiàng: [21812, 28829, 29079, 32699], + yō: [21815], + yū: [ + 21817, 28132, 30208, 30419, 31626, 32006, 32417, 36796, 36802, 36803, 38483, + ], + lài: [ + 21819, 28625, 28712, 28716, 30302, 30313, 30544, 30558, 31809, 31839, 34302, + 36058, 36084, 36169, 36182, 38972, 38978, 40291, + ], + tuò: [21822, 23966, 26589, 27620, 27643, 31656, 31836, 33818, 34304, 36293], + 'zhōu zhāo tiào': [21825], + kěn: [21827, 22438, 22718, 24691, 25031, 32910, 32943, 32955, 35940, 37689], + 'zhuó zhào': [21829, 28655], + 'hēng hèng': [21832, 24729], + 'lín lán': [21833], + 'a ā á ǎ à': [21834], + qiāng: [ + 21836, 22004, 23944, 25109, 25700, 26024, 26538, 27085, 28332, 29252, 29456, + 29511, 32652, 32663, 33108, 34595, 35602, 37848, 38166, 38197, + ], + 'tūn zhūn xiāng duǐ': [21837], + wèn: [21839, 22927, 25598, 25653, 29882, 38382, 38992], + 'cuì qi': [21840], + 'dié shà jié tì': [21841], + 'yuē wā': [21848], + 'zǐ cǐ': [21849], + 'bǐ tú': [21850], + 'chuò chuài': [21852], + 'yǎ yā è': [21854], + fēi: [ + 21857, 23123, 23124, 25161, 26243, 28164, 29446, 32203, 32495, 35062, 38671, + 38750, 38751, 39131, 39133, 39134, 39205, 39329, 39441, 39451, 39905, 40113, + ], + pí: [ + 21860, 22720, 26503, 27607, 27608, 28983, 29749, 30130, 30382, 31738, 32628, + 32646, 33086, 33111, 33165, 34445, 34493, 34609, 34743, 34863, 35964, 35988, + 37099, 37433, 38448, 38516, 38566, 39790, 39821, 40079, 40295, 40729, + ], + shá: [21861], + 'lā la': [21862], + 'yīng qíng': [21864], + pā: [21866, 22929, 33317, 33897, 36276], + 'zhě shì': [21867], + sè: [ + 21868, 21959, 25038, 25804, 26652, 27502, 28073, 28171, 28544, 28545, 28615, + 28623, 28690, 29791, 29873, 30263, 31313, 31329, 31343, 32364, 35653, 36694, + 37547, 37884, 38127, 39115, + ], + niè: [ + 21870, 21995, 22107, 22169, 22209, 22227, 22332, 23420, 23421, 23922, 23981, + 24021, 24071, 25948, 26559, 27127, 27377, 28037, 28284, 30150, 31710, 31819, + 31985, 31989, 32834, 32886, 33260, 33266, 34326, 34853, 35736, 36354, 36375, + 36377, 36433, 36513, 37660, 37811, 37960, 38007, 38016, 38218, 38221, 38353, + 38503, 38537, 39027, 39070, 40807, + ], + 'luō luó luo': [21872, 22217], + 'tān chǎn tuō': [21876], + bo: [21877, 34068], + dìng: [ + 21878, 23450, 26903, 30708, 30855, 30880, 30968, 32866, 33114, 33827, 34634, + 35330, 35746, 37664, 38189, 38977, 39139, 39268, + ], + lāng: [21879], + 'án ān': [21885], + kā: [21888, 25814], + 'yóng yú': [21889], + 'lā lá lǎ': [21895], + jiē: [ + 21896, 21948, 21983, 22566, 23192, 25509, 25522, 25809, 28253, 29039, 30102, + 30158, 30308, 30342, 31224, 31277, 33083, 34644, 34903, 35631, 38454, 38542, + 38786, 40347, + ], + hóu: [ + 21897, 24127, 29492, 30218, 30586, 31692, 31943, 32749, 33876, 37127, 37741, + 39217, 39610, 39928, + ], + 'dié zhá': [21899], + wāi: [21902, 27498, 31477], + 'nuò rě': [21903], + 'xù huò guó': [21904], + zán: [21906], + 'wō ō': [21908], + hú: [ + 21910, 22045, 22251, 22774, 22775, 22778, 23209, 24359, 25648, 26011, 26972, + 27122, 28246, 28715, 28928, 29043, 29392, 29474, 29786, 29939, 31670, 32087, + 32288, 32993, 33899, 34075, 34676, 34716, 34906, 35315, 37264, 37752, 38966, + 39212, 39693, 39793, 39959, 40288, 40344, 40358, 40533, + ], + 'huàn yuán xuǎn hé': [21915], + xǐ: [ + 21916, 22221, 22736, 23651, 24473, 24985, 26546, 27250, 27478, 28423, 29626, + 29885, 30678, 31143, 32304, 33864, 33912, 34032, 34786, 35601, 36445, 36519, + 37410, 37480, 37481, 40026, + ], + 'hē hè yè': [21917], + kuì: [ + 21919, 22067, 23231, 23303, 24870, 24871, 24978, 31697, 31779, 31812, 32873, + 32877, 32885, 33197, 34146, 35593, 39229, 39243, 39304, + ], + 'zhǒng chuáng': [21920], + 'wéi wèi': [21921, 28858, 29234], + 'duó zhà': [21925], + 'sāng sàng': [21930], + 'qiáo jiāo': [21932], + 'pèn bēn': [21935], + 'cān sūn qī': [21936], + 'zhā chā': [21939], + miāo: [21941], + 'pēn pèn': [21943], + kuí: [ + 21945, 22804, 22862, 24025, 25123, 25542, 26182, 26252, 26959, 26961, 27334, + 29354, 30589, 33909, 34248, 34359, 34369, 34672, 36520, 36917, 37128, 37736, + 37751, 38959, 39319, 39460, 39577, 39745, + ], + 'lou lóu': [21949], + 'zào qiāo': [21951], + 'hè xiāo xiào hù': [21955], + 'á shà': [21956], + xiù: [ + 21957, 23723, 23744, 28340, 29659, 29703, 29843, 31168, 32137, 32333, 32353, + 32483, 34705, 34966, 35086, 35087, 37561, 37861, 37885, 38152, 40773, + ], + 'qiāng qiàng': [21958, 25111, 25127, 36428, 36449], + 'ài yì': [21964, 33406], + 'má mǎ ma': [21966], + 'kè kē': [21969], + 'dā tà': [21970, 37769], + sǎng: [21971, 25633, 30921, 35116, 37791, 39001, 39073], + chēn: [21972, 25275, 29723, 30603, 35523, 35603, 36061, 37108], + 'wā gǔ': [21975], + 'pǎng bēng': [21977], + 'xián qiǎn qiān': [21979], + lào: [21984, 23274, 27247, 28061, 28551, 32802, 32814, 36540, 36546, 37226], + wēng: [21985, 32705, 32876, 34697, 37779, 40370, 40543], + wà: [21986, 33149, 33155, 34972, 35178, 38884], + 'hēi hāi': [21992], + hē: [21996, 27441, 34842, 35382, 35779], + zi: [21997], + sǎi: [21998], + 'ǹg ńg ňg': [21999], + gě: [22000, 33336], + ná: [22001, 25295, 25343, 37823, 38222], + diǎ: [22002], + 'ài ǎi āi': [22003], + tōng: [22005, 27147, 28853, 34026], + 'zuī suī': [22010], + 'zhē zhè zhù zhe': [22011], + mò: [ + 22012, 22333, 22651, 22696, 22970, 23292, 23518, 24094, 26153, 26411, 26554, + 27519, 27521, 27819, 28448, 29189, 29519, 30268, 30348, 30525, 30527, 30608, + 30617, 30750, 31027, 31203, 32072, 32390, 32817, 33545, 33672, 34022, 34536, + 34772, 35971, 35978, 35992, 37510, 37836, 38214, 38476, 38778, 39488, 39785, + 40664, 40665, + ], + sòu: [22013, 30262], + tǎn: [ + 22015, 22374, 24528, 25011, 25019, 26298, 27631, 29870, 33788, 34962, 35170, + 37267, 37485, 38077, + ], + 'jiào dǎo': [22020], + 'kǎi gě': [22021], + 'shān càn': [22023], + cáo: [ + 22024, 23942, 26361, 26362, 27133, 28437, 33370, 34040, 34732, 35135, 37866, + ], + piào: [22028, 24497, 34056, 39491], + 'lóu lou': [22029], + gǎ: [22030, 23573, 29581], + 'gǔ jiǎ': [22031], + 'jiāo xiāo': [22032], + 'xū shī': [22040, 22099], + pó: [22041, 22185, 23110, 27335, 30372, 37169], + 'dē dēi': [22042], + 'ma má': [22043], + 'lē lei': [22046], + 'gā gá gǎ': [22048], + sāi: [22053, 22139, 27618, 33134, 38987, 39955], + 'zuō chuài': [22060], + 'cháo zhāo': [22066, 26397, 40706], + zuǐ: [22068, 22143, 23946, 29883], + 'qiáo qiào': [22074, 32761, 35887], + 'chù xù shòu': [22076], + 'tān chǎn': [22077], + 'dàn tán': [22078, 24382, 24392, 24788, 28601], + 'hēi mò': [22079], + ě: [22081, 30760, 38923, 39424, 40264], + 'fān bo': [22083], + chuáng: [22087, 24202, 29248], + 'cù zā hé': [22088], + 'tūn kuò': [22091], + 'cēng chēng': [22092], + dēng: [22100, 23297, 28783, 29128, 29842, 30331, 31475, 31782, 33376, 35915], + pū: [22103, 25169, 25778, 25908, 25909, 28541, 28807, 38496], + juē: [22104, 23657, 23659, 25767], + lū: [22108, 22165, 25784, 25852, 35618], + zhān: [ + 22113, 23742, 24777, 26051, 26076, 26540, 26676, 27617, 27656, 27658, 27838, + 30651, 34205, 34501, 35392, 35449, 35691, 35893, 36232, 36997, 38298, 38673, + 39142, 39256, 39513, 39769, 40035, 40455, 40559, + ], + ō: [22114], + 'zhòu zhuó': [22115], + 'jiào qiào chī': [22125], + yuàn: [ + 22126, 22964, 24616, 24895, 25534, 29783, 31120, 33489, 34895, 35051, 35089, + 38498, 39000, + ], + 'ǎi ài āi': [22127], + 'yōng yǒng': [22128, 28589], + 'jué xué': [22129], + 'pēn pèn fèn': [22132], + gá: [22134, 23580, 37331, 37687, 38022], + 'xīn hěn hèn': [22135], + dāng: [22137, 28578, 29680, 29867, 31580, 31801, 33377, 34807, 35014, 35168], + làn: [ + 22146, 28389, 28651, 28866, 29143, 29185, 29211, 29220, 29907, 31991, 38020, + ], + tà: [ + 22147, 22202, 23817, 25374, 25640, 25787, 27067, 27261, 27646, 28094, 28606, + 28620, 31138, 31887, 35515, 35702, 36427, 36473, 36482, 36514, 36957, 37652, + 38354, 38373, 38396, 38424, 38812, 38835, + ], + 'huō huò ǒ': [22148], + hāo: [22150, 33568, 33983, 34181], + 'hè xià': [22151], + 'xiù pì': [22154], + 'zhōu chóu': [22155, 30441, 35818], + mē: [22162], + 'chā cā': [22163], + 'bó pào bào': [22167], + 'me mèi mò': [22172], + 'xié hái': [22177], + 'áo xiāo': [22179], + mō: [22180, 25720], + pín: [ + 22188, 23078, 23252, 23338, 29613, 30665, 34226, 34841, 36007, 36139, 39024, + 39078, + ], + mè: [22192, 28665], + 'rǎng rāng': [22199], + lá: [22201, 26095], + 'jiáo jué jiào': [22204], + chuò: [ + 22205, 23062, 25801, 27488, 28080, 30957, 36352, 36639, 36749, 36789, 36790, + 37227, 37985, 39199, 40810, 40842, + ], + 'huān huàn': [22206], + 'zá cà': [22211], + chài: [22214, 34431, 34822, 34947, 35341], + 'náng nāng': [22218], + 'zá zàn cān': [22219], + sū: [22220, 27375, 29990, 31267, 31308, 31395, 34311, 34323, 37221, 39874], + zèng: [22222, 29111, 29969, 36104, 36192, 37605, 38147], + 'zá niè yàn': [22224], + nāng: [22228], + 'luó luō luo': [22230], + 'wéi guó': [22231], + huí: [ + 22232, 22238, 22252, 24315, 24317, 24667, 27908, 30160, 33588, 34456, 34516, + 34517, 34582, 36852, 36901, 39856, + ], + nín: [22236, 24744, 33036], + 'jiǎn nān': [22237], + nān: [22241], + tuán: [ + 22242, 22243, 22296, 24945, 25247, 25718, 27314, 31984, 37828, 40402, 40443, + ], + 'tún dùn': [22244, 22345], + guó: [ + 22255, 22262, 22267, 22269, 22272, 22283, 24124, 24151, 24918, 25681, 28429, + 32861, 33112, 33173, 34094, 34402, 39320, + ], + kùn: [22256, 28035, 30543], + 'wéi tōng': [22258], + qūn: [22263, 22795, 36897], + rì: [22264, 26085, 34933, 37412, 39353, 39538], + tāi: [22268, 23393, 32974], + pǔ: [ + 22275, 22289, 25800, 26222, 26268, 27192, 27279, 27654, 28006, 28325, 28915, + 35561, 35676, 35889, 36476, 37920, 38248, + ], + 'quān juàn juān': [22280, 22287], + 'chuí chuán': [22284], + tuǎn: [22293, 30077, 30083], + lüè: [22297, 25504, 30053, 30055, 31268, 37597, 37602, 38154], + 'huán yuán': [22300], + luán: [ + 22301, 22302, 22897, 23048, 23372, 23402, 23423, 23782, 24018, 25371, 25891, + 26347, 26686, 27410, 28390, 28772, 30324, 30325, 32649, 33044, 33248, 34378, + 37550, 38014, 40265, 40478, 40510, + ], + tǔ: [22303, 22305, 37367, 38029], + 'xū wéi': [22313], + 'dì de': [22320, 23987], + 'qiān sú': [22321], + zhèn: [ + 22323, 22630, 25355, 25391, 26389, 26650, 30013, 30521, 32022, 32124, 32444, + 35499, 36049, 36168, 37620, 37805, 37806, 38215, 38453, 38499, 38663, 40198, + 40489, + ], + 'chǎng cháng': [22330, 22580, 22642], + 'qí yín': [22331], + jiá: [ + 22335, 24550, 24669, 25118, 25204, 33061, 33626, 33698, 34545, 34554, 35020, + 36338, 37071, 37087, 37583, 38103, 38956, 38960, 39050, 40246, 40266, + ], + 'zhǐ zhì': [22337], + bǎn: [ + 22338, 23685, 26116, 26495, 29256, 29930, 31876, 33320, 34626, 37393, 38051, + 38442, 39788, + ], + qǐn: [ + 22341, 23505, 23517, 23522, 26129, 26795, 31497, 34748, 36222, 37599, 38163, + ], + 'méi fén': [22342], + 'rǒng kēng': [22344], + 'fāng fáng': [22346], + 'fèn bèn': [22347], + tān: [ + 22349, 24633, 25674, 25849, 25892, 28393, 28760, 30251, 30321, 33297, 36010, + 36138, + ], + 'huài pēi pī péi': [22351], + 'dì làn': [22356], + tán: [ + 22363, 22704, 22709, 22727, 22748, 23122, 24987, 26137, 26311, 27011, 27264, + 28525, 29122, 30192, 30969, 32584, 32590, 34283, 35527, 35674, 35680, 35848, + 35885, 35994, 37103, 37296, 37663, 38979, + ], + bà: [ + 22365, 22459, 22761, 24349, 27419, 28766, 29240, 30706, 35207, 38712, 39809, + 40069, + ], + fén: [ + 22367, 22707, 22946, 23694, 24169, 26508, 26876, 27774, 28954, 29132, 29139, + 32658, 32693, 33974, 34145, 34464, 34465, 35950, 35958, 36690, 37948, 38571, + 39337, 39797, 40642, 40726, 40738, + ], + zhuì: [ + 22368, 22684, 24820, 29952, 30071, 30984, 32180, 32267, 32512, 32530, 33103, + 33159, 35528, 36101, 36184, 37258, 37667, 37958, + ], + pō: [22369, 23717, 27900, 28300, 28497, 37337, 37882, 38027, 38935, 39047], + 'pǎn bàn': [22370], + kūn: [ + 22372, 22531, 22546, 23824, 23825, 26118, 26204, 28489, 28956, 29108, 29457, + 29736, 29819, 33742, 34603, 35016, 35049, 35084, 37260, 37653, 38175, 39433, + 39648, 39649, 39656, 39908, 40114, 40318, 40356, 40525, + ], + diàn: [ + 22379, 22443, 22666, 22722, 22880, 23133, 24215, 24806, 25154, 27202, 27583, + 28096, 28593, 29623, 29716, 30005, 30300, 31775, 34580, 37439, 38651, 38747, + 39508, + ], + 'mù mǔ': [22390], + 'kē kě': [22391, 36603], + xuè: [22393, 23716, 26710, 28709, 29400, 30642, 35604, 35857, 36240], + 'dǐ chí': [22395, 26594], + lā: [22403, 26566, 33736, 37003], + lǒng: [22404, 22405, 22751, 22752, 25314, 25871, 31433, 38471, 38580], + mín: [ + 22410, 22980, 23735, 23823, 25450, 26107, 26108, 27665, 29641, 29720, 29725, + 29769, 30203, 30463, 30727, 32205, 32225, 32535, 32608, 33504, 37425, 37641, + 37746, 40214, + ], + 'dòng tóng': [22412, 23762, 27934], + cí: [ + 22416, 23336, 24904, 26572, 28648, 29633, 29943, 29958, 30913, 31008, 31072, + 31949, 33576, 35422, 35789, 36765, 36766, 36772, 36781, 38604, 39162, 39176, + 40220, 40383, 40384, 40538, + ], + duī: [22422, 22534, 22624, 30205, 30931, 37907, 37916, 40237], + 'duò duǒ': [22427], + 'duǒ duò': [22428, 25350], + chá: [ + 22430, 23519, 23894, 25661, 27086, 27307, 29497, 33580, 33590, 35431, 38763, + ], + shǎng: [22439, 26188, 27145, 36062, 36120, 36175, 37631, 37851, 37980], + shǒu: [22440, 23432, 25163, 25164, 33359, 39318], + da: [22447, 32360, 36342], + háng: [ + 22451, 26043, 26477, 31573, 32078, 32471, 33322, 33472, 34466, 35012, 36005, + 36818, 38927, 39043, 39783, + ], + 'ān ǎn': [22453], + xīng: [ + 22454, 24826, 26143, 26320, 29003, 29481, 29766, 30376, 31682, 33125, 33288, + 35306, 35314, 35587, 39426, 39565, 39823, 39929, + ], + 'yuàn huán': [22456], + bāng: [ + 22457, 24110, 24135, 24154, 24171, 25440, 26758, 27996, 37030, 37035, 38820, + ], + 'póu fú': [22458], + cén: [22465, 23697, 28052], + 'běng fēng': [22468], + 'dì fáng': [22469], + 'xiá jiā': [22473], + 'mái mán': [22475], + làng: [22476, 23808, 28010, 33943, 38316], + 'shān yán': [22479], + 'qín jīn': [22480], + 'pǔ bù': [22484], + huā: [22486, 23154, 26907, 30836, 31936, 33457, 33930, 34340, 35502, 37685], + 'suì sù': [22499], + 'pí pì': [22500], + 'qīng zhēng': [22501, 40109], + 'wǎn wān': [22502], + lǔn: [22504, 31248], + 'zhēng chéng': [22505], + kōng: [22506, 23814, 31644, 36539, 37651, 40316], + 'cǎi cài': [22512, 23488, 37319], + 'chù tòu': [22513], + běng: [22514, 29739, 33782, 38811], + 'kǎn xiàn': [22515], + 'yì shì': [22518, 37299], + péi: [22521, 27632, 35060, 35061, 36064, 36180, 37639, 38187, 38443, 38506], + 'sào sǎo': [22525], + 'jǐn qīn jìn': [22535], + 'péng bèng': [22539], + 'qiàn zàn jiàn': [22545], + àn: [ + 22547, 23669, 23736, 25353, 26263, 26696, 33018, 33612, 35963, 35979, 37644, + 38343, 38540, 40687, + ], + 'duò huī': [22549, 22702], + huán: [ + 22554, 23503, 23536, 23768, 26707, 27961, 28596, 29506, 29615, 29872, 31979, + 32367, 32563, 32678, 33601, 33800, 33809, 35954, 37744, 37942, 38206, 38254, + 38372, 38427, 38600, 39711, 40558, + ], + 'bǎo bǔ pù': [22561], + 'máo móu wǔ': [22565], + ruán: [22567, 22742, 25739], + 'ài è yè': [22568], + gèng: [22569, 26245], + méi: [ + 22579, 22650, 23186, 23883, 24510, 25879, 26522, 26626, 26757, 26979, 26995, + 27089, 28228, 28232, 29028, 29496, 29611, 29691, 29762, 30473, 30530, 31126, + 33028, 33058, 33116, 33530, 33683, 33919, 37119, 37238, 37767, 38213, 38665, + 40357, 40539, 40692, + ], + dǔ: [22581, 29757, 30585, 31491, 31716, 35241, 36077, 36172], + féng: [22584, 32152, 33346, 36898], + hèng: [22588], + chūn: [ + 22590, 23179, 26110, 26149, 26265, 26486, 26943, 27078, 27201, 27332, 29763, + 31674, 33797, 34685, 36660, 39942, 40350, + ], + jiǎng: [ + 22594, 22870, 22888, 22892, 26728, 27123, 29518, 32809, 33177, 33931, 34083, + 35611, 35762, 39004, + ], + huāng: [22595, 24031, 24908, 32915, 33618, 34881], + duàn: [ + 22597, 26029, 26039, 26932, 27573, 27592, 28997, 29782, 30891, 31766, 31850, + 32222, 32526, 33142, 33902, 36502, 37723, 38203, + ], + tǎ: [22612, 22678, 29549, 29562, 39833, 39976, 40142], + wěng: [22613, 22883, 23905, 25882, 26273, 30600, 33994], + 'sāi sài sè': [22622], + zàng: [22623, 24329, 33235, 33247, 33900, 34101, 37562], + tián: [ + 22625, 23623, 24684, 27834, 28233, 29875, 29979, 29980, 30000, 30027, 30033, + 30901, 30924, 32971, 38352, 38423, 40235, 40390, 40399, + ], + zhèng: [ + 22627, 24129, 25919, 35388, 35533, 35657, 35777, 35812, 37073, 37165, 38741, + 40202, + ], + 'tián zhèn': [22635], + wēn: [ + 22637, 26167, 27058, 27551, 28201, 28331, 29797, 30239, 34160, 35953, 36668, + 36672, 36754, 37822, 39234, 39963, 39982, 40129, + ], + liù: [22639, 24263, 30943, 32719, 38625, 38692, 39230, 39736, 40410, 40552], + hǎi: [22640, 28023, 28920, 37244, 37282], + lǎng: [22641, 26390, 26391, 26404, 28922, 34018], + bèng: [22644, 25596, 27893, 29967, 32179, 36454, 36856, 36908, 37872, 38234], + chén: [ + 22645, 23480, 23576, 24561, 25936, 25974, 26216, 26335, 26645, 27140, 27785, + 28993, 30222, 33251, 33566, 33664, 33680, 34095, 34236, 34740, 35366, 35574, + 36569, 36784, 36839, 37378, 38472, 38515, 38659, 40400, 40590, + ], + 'ōu qiū': [22648], + 'qiàn jiàn': [22649], + 'zhuān tuán': [22652], + shuǎng: [22653, 24929, 28474, 29245, 32276, 37871], + shú: [22654, 23116, 23408, 29881, 31211, 36118, 36174], + lǒu: [22655, 23901, 23937, 29962, 31699, 31757], + chí: [ + 22656, 24347, 25345, 27744, 28454, 31486, 31554, 31630, 31722, 33548, 33614, + 34483, 35608, 36030, 36223, 36383, 36831, 36833, 36933, 36959, 36978, 37705, + 39347, 39536, + ], + shù: [ + 22661, 24246, 24251, 24631, 24661, 25101, 26463, 26641, 27193, 27821, 28465, + 28484, 28630, 31446, 31466, 32073, 33127, 33623, 33921, 34410, 34899, 35019, + 35918, 36848, 37477, 37680, 37859, 38676, 40336, + ], + 'dì zhì': [22662, 30096], + kàn: [22664, 23809, 30640, 30681, 30945, 34894, 39723], + chěn: [22667, 22822, 30838, 30876, 30947, 36098, 36283, 36408, 37718], + 'zhǐ zhuó': [22668], + qiǎng: [22671, 32328, 32358, 32677, 35137], + zēng: [22679, 22686, 24974, 29844, 30704, 30963, 32638, 35652, 37163, 40027], + qiáng: [ + 22681, 22715, 23281, 23321, 27183, 27299, 28434, 29254, 33378, 34051, 34103, + 34336, + ], + 'kuài tuí': [22692], + 'tuǎn dǒng': [22693], + 'qiáo què': [22695], + 'zūn dūn': [22699], + 'qiāo áo': [22717], + 'yì tú': [22719], + 'xué bó jué': [22726], + lǎn: [ + 22728, 23358, 23364, 23375, 25042, 25078, 25597, 25829, 25900, 27012, 27414, + 28008, 28452, 28768, 32412, 32518, 32625, 35239, 35261, 35272, 37250, 39026, + ], + huài: [22730, 22750, 34366], + rǎng: [22732, 22756, 25880, 29209], + 'làn xiàn': [22735], + dǎo: [ + 22740, 23548, 23566, 23707, 23798, 23947, 23948, 23993, 25443, 25623, 25827, + 27101, 31095, 31106, 31153, 36424, 38502, 38557, 38575, + ], + ruǐ: [22753, 26741, 27236, 32352, 34122, 34123, 34306, 34307], + san: [22765], + zhuàng: [22766, 22767, 22773, 25758, 28939, 29366, 29376], + 'ké qiào': [22771, 27580], + kǔn: [ + 22776, 22780, 24707, 25414, 26801, 30833, 31093, 31239, 31259, 32145, 35021, + 38315, 38328, 38403, + ], + mǎng: [22782, 28461, 33595, 33725, 33726, 34830], + cún: [22783, 23384], + 'zhǐ zhōng': [22786], + 'gǔ yíng': [22787], + 'jiàng xiáng': [22789, 38477], + 'páng féng fēng': [22790], + zhāi: [22792, 25434, 25688, 25995, 25998, 27064, 31874, 40779], + 'xuàn xiòng': [22800], + wài: [22806, 39009], + 'wǎn yuàn wān yuān': [22807], + 'mǎo wǎn': [22808], + mèng: [22818, 22819, 23391, 26790, 30310, 38693], + 'dà dài': [22823], + 'fū fú': [22827, 22983, 26510, 31920], + guài: [22828, 24618, 24672], + yāng: [ + 22830, 22990, 25264, 27523, 27889, 31207, 32998, 37472, 37704, 38645, 40230, + 40495, + ], + 'hāng bèn': [22831], + gǎo: [ + 22832, 25630, 26482, 27072, 27073, 27322, 31233, 31294, 31295, 32286, 32543, + 33746, 34241, 34291, + ], + 'tāo běn': [22834], + 'tóu tou': [22836], + 'yǎn tāo': [22837], + 'kuā kuà': [22840, 35463], + 'jiá jiā gā xiá': [22841], + huà: [ + 22843, 23155, 23295, 23301, 23819, 25702, 26489, 26528, 26726, 27116, 27194, + 28549, 30011, 30059, 30069, 32355, 33305, 35441, 35545, 35694, 35805, 40650, + ], + 'jiā jiá gā xiá': [22846], + ēn: [22848, 24681, 33981], + 'dī tì': [22851], + 'yǎn yān': [22852, 28208], + pào: [22853, 30129, 30384, 30770, 31007, 31022, 38756, 40621], + nài: [22856, 26608, 28223, 32784, 33816, 35110, 37692, 40720], + 'quān juàn': [22861, 24366, 26860], + zòu: [22863, 25549], + 'qì qiè xiè': [22865], + kāi: [22866, 24320, 25577, 37926, 38158, 38283], + 'bēn bèn': [22868, 27853], + tào: [22871], + 'zàng zhuǎng': [22872], + běn: [22873, 26412, 26957, 30042, 32713, 33519], + 'xùn zhuì': [22878], + shē: [22882, 27304, 29470, 30061, 30066, 36050, 36054, 36170, 36619], + 'hǎ pò tǎi': [22884], + 'ào yù': [22885, 22887, 28570], + yūn: [22891, 27698, 27699, 33920, 33941, 34681, 36103, 36191], + 'duǒ chě': [22898], + 'nǚ rǔ': [22899], + nú: [22900, 23397, 31535, 39377, 39549], + 'dīng dǐng tiǎn': [22901], + 'tā jiě': [22905], + nuán: [22907], + 'hǎo hào': [22909], + fàn: [ + 22911, 23310, 26805, 27726, 27867, 28412, 28714, 29359, 30024, 30421, 31541, + 31684, 33539, 35337, 36009, 36137, 36588, 36669, 39151, 39152, 39277, + ], + shuò: [ + 22913, 25632, 26388, 27082, 28865, 29197, 30687, 33972, 37785, 37984, 38084, + ], + 'fēi pèi': [22915], + wàng: [22916, 24536, 26106, 26395, 26402], + zhuāng: [ + 22918, 22941, 23076, 24196, 24210, 26729, 26761, 27137, 31911, 31962, 33624, + 33674, 35013, 35037, + ], + mā: [22920, 23229], + 'fū yōu': [22923], + 'hài jiè': [22926], + dù: [ + 22930, 22956, 26460, 27564, 28193, 31226, 33423, 33648, 34713, 34855, 34873, + 37709, 38208, 38767, + ], + miào: [22937, 24217, 24255, 24287, 29573, 31447], + 'fǒu pēi pī': [22938], + 'yuè jué': [22940], + niū: [22942], + 'nà nàn': [22944], + tuǒ: [22949, 23287, 24249, 26925, 26965, 27234, 39692, 39958, 40270], + 'wàn yuán': [22951], + fáng: [22952, 25151, 32938, 38450, 39796, 40066], + nī: [22958], + zhóu: [22959, 30881], + zhāo: [22961, 24054, 25307, 26157, 37335, 37450, 37731, 38026, 39371], + 'nǎi nǐ': [22963], + tǒu: [22965, 25960, 32015, 34339, 40648], + 'xián xuán xù': [22966], + 'zhí yì': [22967, 31175], + ē: [22968, 22975, 23104, 23641], + mèi: [ + 22969, 23194, 23504, 25274, 26048, 26151, 27820, 29021, 30167, 30491, 30584, + 31065, 31683, 34654, 34946, 36298, 39741, 39749, + ], + 'qī qì': [22971], + 'xū xǔ': [22977, 31280], + 'shān shàn': [22989, 22999, 33515, 37348, 38032], + mán: [ + 22991, 24946, 27168, 34542, 34875, 35646, 39237, 39314, 39703, 39704, 39995, + 40151, + ], + jiě: [22992, 23182, 27294, 27601, 39159], + 'wěi wēi': [22996], + pīn: [23000, 25340, 30999, 31334, 39338, 39518], + 'huá huó': [23009], + 'jiāo xiáo': [23011], + 'gòu dù': [23012], + 'lǎo mǔ': [23013], + 'nián niàn': [23017], + zhěn: [ + 23019, 23634, 24363, 25262, 26147, 26517, 30043, 30137, 30485, 31289, 32285, + 32293, 32540, 32836, 33817, 34967, 35030, 35225, 35386, 35786, 36587, 36728, + 36788, 39383, 39698, + ], + héng: [ + 23022, 24646, 24658, 28870, 29673, 33019, 34309, 34913, 37957, 40244, 40262, + 40507, + ], + 'jūn xún': [23024], + 'kuā hù': [23025], + 'è yà': [23030], + 'xiān shēn': [23034], + wá: [23043], + 'ráo rǎo': [23046, 23304], + 'shào shāo': [23051], + xiē: [23054, 25587, 26964, 27463, 34638, 34829], + 'wǔ méi mǔ': [23058], + 'chuò lài': [23061], + niáng: [23064, 23330, 23363], + 'nà nuó': [23068], + 'pōu bǐ': [23069], + 'něi suī': [23070], + tuì: [23079, 29050, 34555, 34581, 36864, 39422], + mǎn: [23080, 23640, 28288, 28385, 28415, 34728, 34766, 35156, 37835], + 'wú wù yú': [23082], + 'xī āi': [23085], + 'zhuì shuì': [23095], + 'dōng dòng': [23099], + 'ǎi ái è': [23102], + 'ē ě': [23103], + mián: [ + 23106, 23349, 23424, 26467, 26825, 27312, 27339, 30496, 30664, 30666, 30671, + 32191, 32220, 32501, 33415, 34642, + ], + 'pǒu péi bù': [23108], + biǎo: [23114, 33087, 34920, 35057, 35134, 35544, 37686], + 'fù fàn': [23119], + wǒ: [23120, 23121, 25105], + 'ní nǐ': [23127, 26879], + 'quán juàn': [23128, 24787], + hūn: [ + 23130, 26127, 26156, 26836, 28093, 30567, 30575, 30856, 33636, 33911, 34066, + 36683, 38333, 38413, + ], + 'qiān jǐn': [23132], + 'wān wà': [23136], + 'lái lài': [23137, 24469, 24480], + 'zhōu chōu': [23140], + 'chuò nào': [23141], + 'nüè àn': [23145], + 'hùn kūn': [23147], + 'dàng yáng': [23160], + nàn: [23163], + 'ruò chuò': [23164], + jiǎ: [ + 23165, 23724, 26010, 26013, 27022, 27098, 27295, 29630, 30002, 32987, 37440, + 38078, + ], + 'tōu yú': [23166, 23214], + 'yù yú': [23168], + 'wéi wěi': [23169], + 'dì tí': [23170, 29686, 33488], + róu: [ + 23171, 25545, 26580, 28184, 29027, 29768, 29895, 31160, 31880, 31941, 33052, + 33132, 33863, 34650, 36418, 36654, 37714, 38819, 39461, 39943, 40340, + ], + 'ruǎn nèn': [23174], + miáo: [23180, 23289, 25551, 30596, 33495, 40339, 40523], + 'yí pèi': [23184], + 'mián miǎn': [23188], + 'tí shì': [23198, 24831], + 'duò tuó': [23200, 27826], + ǎo: [23210, 23228, 33401, 33466, 34948, 35158, 38266], + 'chú zòu': [23216], + yìng: [23221, 26144, 26254, 30828, 33185, 40038], + 'qín shēn': [23232], + jià: [23233, 24143, 26550, 27042, 31292, 39381, 39550], + sǎo: [23234], + 'zhēn zhěn': [23235], + 'jiē suǒ': [23237], + 'míng mǐng': [23239], + niǎo: [23243, 23325, 23346, 33553, 34086, 34949, 35018, 35117, 40479], + tāo: [ + 23245, 24141, 24354, 24902, 25487, 25647, 27076, 28059, 28372, 28644, 29803, + 32091, 32282, 32295, 32486, 35420, 35615, 36673, 38833, 38876, 38892, 39160, + 39253, + ], + biáo: [23249], + 'piáo piāo': [23254, 34232], + xuán: [ + 23257, 24748, 25080, 26294, 27272, 28457, 29572, 29831, 29887, 30147, 34561, + ], + 'màn mān': [23258], + kāng: [ + 23261, 23931, 24247, 24951, 27130, 28462, 30730, 31301, 31968, 36543, 37870, + 40007, + ], + 'hān nǎn': [23272], + nèn: [23273, 23280], + zhē: [23276, 36974], + 'mā má': [23282], + piè: [23283], + zhǎn: [ + 23288, 23637, 25612, 26025, 26028, 29718, 30415, 30430, 36670, 37254, 39085, + 39120, + ], + 'xiān yǎn jìn': [23312], + liǎn: [ + 23322, 25947, 25986, 29711, 29833, 32695, 33080, 33225, 34105, 34333, 34334, + 35043, 35165, 37179, + ], + 'qióng huán xuān': [23323], + dǒng: [23326, 25026, 31677, 33891, 34155, 35532], + cān: [23328, 28236, 29208, 39137, 39184, 39490, 39574], + tiǎo: [23333, 23464, 26176, 26387, 31409, 33025], + bí: [23350, 33656, 40763], + liǔ: [ + 23356, 26611, 26625, 26718, 26746, 27246, 29102, 29643, 32185, 32506, 32630, + 32640, 37622, 38157, + ], + 'qiān xiān': [23365, 27430], + 'xié huī': [23368], + 'huān quán': [23369], + 'lí lì': [23371, 40599], + 'zhú chuò': [23374], + kǒng: [23380, 24656], + 'mā zī': [23382], + 'sūn xùn': [23385, 23403], + 'bèi bó': [23387, 35478], + 'yòu niū': [23399], + zhuǎn: [23400, 31473, 36681], + hái: [23401, 39608], + nāo: [23404], + 'chán càn': [23409], + bò: [23417, 27287, 34327, 35666], + nái: [23419, 33097], + 'níng nìng': [23425, 23501, 23511, 23516, 23527, 29999], + zhái: [23429], + 'tū jiā': [23434], + sòng: [23435, 35359, 35494, 35772, 35829, 36865, 37817, 38924, 39042, 39224], + ròu: [23437, 32905, 35699], + zhūn: [23442, 31360, 34912, 35524, 35846, 36813], + 'mì fú': [23443], + 'dàng tàn': [23445], + 'wǎn yuān': [23451], + chǒng: [23456, 23541], + qún: [23469, 23790, 24108, 32675, 32676, 35033, 35040], + zǎi: [23472, 23869], + 'bǎo shí': [23474], + 'jiā jia jie': [23478], + 'huāng huǎng': [23482], + kuān: [23485, 23515, 23532, 33239, 37991, 39627, 39638], + 'sù xiǔ xiù': [23487], + 'jié zǎn': [23489], + 'bìng bǐng': [23502], + 'jìn qǐn': [23510], + 'lóu jù': [23520], + 'xiě xiè': [23531], + 'qīn qìn': [23540], + cùn: [23544, 31871], + duì: [ + 23545, 23550, 23565, 24636, 24989, 25055, 28647, 28713, 30867, 31051, 32144, + 34225, 35656, 35701, 36699, 38431, 38510, + ], + 'lüè luó': [23549], + 'shè yè yì': [23556], + 'jiāng jiàng qiāng': [23558], + 'jiāng jiàng': [23559, 27974, 28479, 30074], + zūn: [23562, 23967, 27197, 32583, 36981, 37903, 40018, 40159, 40334, 40439], + 'shù zhù': [23564, 28557], + xiǎo: [23567, 26195, 26241, 26313, 30363, 30370, 31601, 31615, 31712, 35599], + 'jié jí': [23568, 35800, 38794], + 'shǎo shào': [23569], + ěr: [ + 23570, 23571, 23572, 26670, 27622, 27953, 29246, 29669, 32819, 34238, 34888, + 36272, 36841, 36999, 37498, 38098, 39180, 39285, 39404, + ], + 'wāng yóu': [23586], + wāng: [23587, 23593, 23594, 23595, 27754], + liào: [23589, 23590, 24278, 25730, 26009, 28819, 31415, 37904, 38243], + 'méng máng lóng páng': [23592], + gà: [23596, 39744], + 'kuì kuǐ': [23599], + tuí: [ + 23605, 24346, 31336, 34312, 36458, 38564, 38969, 38970, 38973, 39059, 39755, + ], + yǐn: [ + 23609, 23998, 24341, 26372, 27267, 27324, 27389, 28158, 28645, 30270, 30318, + 31884, 34335, 34451, 34750, 35732, 36218, 36251, 36625, 37391, 38775, + ], + 'chǐ chě': [23610], + kāo: [23611, 39643], + 'jìn jǐn': [23613], + 'wěi yǐ': [23614], + 'niào suī': [23615], + céng: [23618, 23652, 23954, 39507], + diǎo: [23628], + 'píng bǐng bīng': [23631], + lòu: [23642, 28431, 30232, 30266, 30267, 37860, 38210, 38475], + 'shǔ zhǔ': [23646, 23660], + 'xiè tì': [23647], + 'chè cǎo': [23662], + 'tún zhūn': [23663], + 'nì jǐ': [23664], + 'hóng lóng': [23672], + 'qǐ kǎi': [23682, 35912], + áng: [23687, 26114, 26171], + 'gǎng gāng': [23703, 23831], + kě: [23714, 25956, 28167, 28212, 28835], + gǒu: [23715, 29399, 29629, 31537, 32775, 32776, 32777, 33503, 35967], + tiáo: [ + 23719, 23737, 27172, 31058, 31524, 33408, 33812, 34010, 34024, 34601, 36834, + 37594, 37797, 38807, 39659, 39880, 39991, 40102, 40800, 40838, + ], + 'qū jū': [23720], + lǐng: [23725, 23994, 38936, 39046], + pò: [ + 23734, 25920, 27942, 28240, 28894, 29632, 30772, 30774, 31893, 33962, 39748, + ], + 'bā kè': [23751], + luò: [ + 23752, 25694, 27931, 27932, 29334, 29662, 31551, 32409, 33638, 35451, 38610, + 39409, 39558, 40261, + ], + 'fù niè': [23754], + ěn: [23758], + 'zhì shì': [23769, 23867], + qiǎ: [23776, 36306, 37216, 38800], + 'qiáo jiào': [23780, 30276], + 'xié yé': [23787], + bū: [23788, 24239, 26209, 35495, 36875, 37437, 37691, 38072, 39188, 40271], + chóng: [23815, 23816, 29214, 34411, 34665, 34802, 35080, 38528], + 'zú cuì': [23826, 26890], + 'líng léng': [23834], + 'dòng dōng': [23840], + xiáo: [23844, 27944, 28102, 35364, 35509], + 'pí bǐ': [23845, 33432], + 'zhǎn chán': [23853, 23939, 23940], + 'wǎi wēi': [23860], + 'yáng dàng': [23861], + 'shì dié': [23868], + yào: [ + 23870, 26332, 29070, 29183, 30661, 31358, 31380, 31556, 32768, 33374, 33647, + 33903, 34220, 34277, 34958, 35230, 35407, 35729, 38783, 40386, 40542, 40764, + ], + 'kān zhàn': [23873], + 'hán dǎng': [23877], + 'qiàn kàn': [23884], + 'wù máo': [23885], + 'kě jié': [23889, 23985], + 'wēi wěi': [23892], + kē: [ + 23897, 26607, 26869, 27068, 27158, 29249, 29297, 29328, 29634, 30132, 30604, + 30933, 31002, 31185, 31262, 31392, 33834, 34198, 34485, 34636, 36279, 36722, + 37272, 37427, 38070, 38950, 38982, 39063, 39617, + ], + 'dàng táng': [23907], + 'róng yíng': [23908, 29187], + 'ái kǎi': [23910], + 'kāo qiāo': [23914], + cuó: [23919, 23923, 30180, 30700, 33963, 34070, 34392, 40570, 40574], + 'qiǎn qīn': [23920], + 'dì dié': [23933], + cēn: [23934], + dǐng: [23935, 33404, 34209, 37924, 38914, 39030, 40718, 40721], + 'áo ào': [23941], + 'pǐ pèi': [23951], + 'jiào qiáo': [23968, 28496], + 'jué guì': [23969, 40156], + 'zhān shàn': [23974, 40163], + 'xiè jiè': [23984], + 'guī xī juàn': [23986], + rū: [23999], + 'lì liè': [24001, 26841, 29188, 32159], + 'xī guī juàn': [24002], + 'yíng hōng': [24006], + yǐng: [ + 24010, 24302, 24433, 25708, 26796, 28481, 30271, 30317, 30696, 31310, 37090, + 37915, 38964, 39053, 39061, 39062, + ], + chǎo: [24016, 28818, 29052, 30503, 40616], + cuán: [24017, 27349, 27409], + chuān: [24027, 24029, 27674, 29775, 31359], + 'jīng xíng': [24032], + cháo: [ + 24034, 24035, 26177, 28421, 28526, 29258, 31410, 32634, 35647, 36680, 37147, + 40716, + ], + qiǎo: [24039, 24832, 39644], + gǒng: [24041, 24318, 25329, 25330, 26673, 27742, 29657, 36609, 38799], + 'chà chā chāi cī': [24046], + 'xiàng hàng': [24055], + shuài: [24069, 24101, 34752], + pà: [24074, 24085, 24597, 34969], + 'tǎng nú': [24081], + 'mò wà': [24083], + 'tiē tiě tiè': [24086], + zhǒu: [24090, 26221, 30107, 30573, 31634, 32920, 33783, 39902], + 'juǎn juàn': [24099], + shuì: [24104, 28055, 28058, 30561, 31237, 31246, 35038], + 'chóu dào': [24113, 24172], + 'jiǎn jiān sàn': [24116], + 'shà qiè': [24121], + 'qí jì': [24122, 33632], + 'shān qiāo shēn': [24147], + 'zhuàng chuáng': [24162], + 'chān chàn': [24168], + miè: [ + 24173, 25073, 25635, 28357, 28781, 28885, 31011, 31742, 34065, 34190, 34843, + 34890, 37974, 40052, 40211, + ], + 'gān gàn': [24178], + 'bìng bīng': [24182, 24183], + 'jī jǐ': [24190], + 'guǎng ān': [24191], + guǎng: [24195, 24291, 29367, 29559], + me: [24197], + 'dùn tún': [24201], + 'bài tīng': [24205], + 'yìng yīng': [24212], + 'dǐ de': [24213], + 'dù duó': [24230], + 'máng méng páng': [24236], + 'bìng píng': [24240], + chěng: [24241, 24732, 30536, 36894, 39425, 39563], + 'jī cuò': [24244], + qǐng: [24252, 24270, 27326, 28416, 33496, 35531, 35622, 35831, 38915, 39031], + 'guī wěi huì': [24262], + 'jǐn qín': [24273], + kuò: [ + 24275, 25193, 25313, 25844, 28662, 31560, 33855, 33856, 34526, 38346, 38420, + 38697, 38815, 38841, 38869, 38946, 39712, + ], + 'qiáng sè': [24295, 34196], + 'yǐn yìn': [24308, 38544, 38560, 38577, 39150, 39154, 39278], + 'pò pǎi': [24313, 36843], + 'nòng lòng': [24324], + 'dì tì tuí': [24351], + 'jué zhāng': [24353], + 'mí mǐ': [24357, 24396, 38753], + chāo: [24360, 24586, 25220, 27433, 35372, 36229, 37396, 38046], + yi: [24364], + shāo: [ + 24368, 26067, 28903, 28988, 29138, 31602, 33348, 33847, 34161, 36622, 39678, + 39865, + ], + 'xuān yuān': [24370], + 'qiáng qiǎng jiàng': [24375, 24378], + 'tán dàn': [24377, 37256], + biè: [24390], + 'qiáng jiàng qiǎng': [24394], + 'jì xuě': [24400], + tuàn: [24406, 35094], + yuē: [24415, 26352, 26353, 30705], + 'shān xiǎn': [24417], + wén: [ + 24419, 25991, 28806, 29683, 30226, 32359, 32862, 33440, 34441, 34442, 34721, + 34753, 38330, 38335, 38341, 38374, 38395, 38412, 38639, 39356, 39367, 39792, + 40188, 40205, 40740, + ], + 'péng bāng': [24429], + 'piāo piào': [24431], + 'zhuó bó': [24436], + 'tuǒ yí': [24437], + 'páng fǎng': [24439], + wǎng: [ + 24442, 24448, 24451, 24792, 26505, 26850, 32178, 32593, 32594, 32595, 32596, + 32598, 33781, 34535, 34628, 35511, 36638, 36747, 39757, + ], + cú: [24450, 27522], + 'dài dāi': [24453], + huái: [ + 24458, 24576, 25040, 25079, 27088, 28142, 32818, 34361, 35106, 35121, 36381, + ], + 'wā wàng jiā': [24461], + 'chěng zhèng': [24462], + 'dé děi de': [24471], + 'cóng zòng': [24478], + 'shì tǐ': [24485], + 'tí chí': [24498, 40343, 40345], + dé: [24499, 24503, 24692, 24755, 24810, 28098, 37696, 38173], + 'zhǐ zhēng': [24500, 24501], + bié: [24502, 30335, 33666, 34498, 35154, 36457], + 'chōng zhǒng': [24504], + 'jiǎo jiào': [24508, 31493, 31562], + 'lòng lǒng': [24511], + 'qú jù': [24514, 28192, 30655, 34742], + 'dìng tìng': [24522], + gǎi: [24523, 25913], + rěn: [24525, 26656, 26659, 31225, 31252, 32155, 33615, 33653, 36533], + chàn: [24527, 25076, 25082, 30815, 32700, 38850, 39019], + tè: [24529, 24925, 29305, 34776, 37617, 38141], + 'tè tēi tuī': [24530], + 'gān hàn': [24531, 25916], + 'yì qì': [24532], + 'tài shì': [24533], + 'xī liě': [24538], + 'yīng yìng': [24540, 25033, 35661], + 'mǐn wěn mín': [24542, 24543], + 'sōng zhōng': [24554], + 'yù shū': [24556, 24710], + 'qí shì': [24559, 32774], + 'tún zhūn dùn': [24563], + 'qián qín': [24564, 25202], + hún: [24566, 27985, 28222, 39195, 39300, 39746, 40754], + niǔ: [24568, 25197, 28804, 29379, 32016, 32445, 33701, 37397, 38062, 38773], + 'kuáng wǎng': [24569], + 'kāng hàng': [24572], + 'kài xì': [24574, 24894], + òu: [24580, 24938], + 'bǎo bào': [24585], + 'mín mén': [24587], + 'zuò zhà': [24589], + zěn: [24590], + yàng: [24591, 24665, 26679, 27096, 27171, 28478, 32661, 35399], + 'kòu jù': [24592], + 'náo niú': [24595], + 'zhēng zhèng': [24596, 25497, 38066, 38126], + 'tiē zhān': [24599], + 'hù gù': [24600], + 'cū jù zū': [24602], + 'sī sāi': [24605], + 'yóu chóu': [24606], + 'tū dié': [24610], + 'yōu yào': [24622], + xuàn: [ + 24624, 26145, 26982, 27883, 28210, 28843, 29700, 30505, 30905, 32098, 32316, + 32335, 32474, 34073, 34898, 34984, 36121, 37449, 37831, 38089, 38239, 39092, + ], + 'xù xuè': [24628], + 'bì pī': [24630], + 'xī shù': [24632], + 'nèn nín': [24641], + 'tiāo yáo': [24652], + 'xī qī xù': [24659], + 'xiào jiǎo': [24660], + 'hū kuā': [24663], + nǜ: [24679, 26386, 34882, 34884], + hèn: [24680], + 'dòng tōng': [24683], + 'quán zhuān': [24686], + 'è wù ě wū': [24694, 24801], + tòng: [24696, 24927, 24965, 30171, 34901], + 'yuān juàn': [24705], + 'qiāo qiǎo': [24708], + 'jiè kè': [24712], + 'hào jiào': [24718], + huǐ: [24724, 27283, 27584, 27585, 27591, 29164, 35693], + 'mán mèn': [24727, 38804], + 'yī yì': [24728, 34915], + quān: [24731, 31646, 37897], + 'kuī lǐ': [24733], + 'yì niàn': [24741], + 'mèn mēn': [24758], + guàn: [ + 24761, 24762, 24815, 24931, 25532, 25692, 27148, 27423, 27892, 28075, 28485, + 28748, 29215, 29912, 30437, 31030, 31100, 32582, 32592, 36011, 36143, 36480, + 36966, 37830, 38005, 40057, 40475, 40563, + ], + 'kōng kǒng': [24766], + 'lǔn lùn': [24768], + guǒ: [ + 24776, 26524, 26881, 27112, 31935, 32182, 33747, 34622, 35065, 35073, 36640, + 39196, 39299, + ], + 'yuān wǎn': [24780, 31650], + 'lán lín': [24783], + 'yù xù': [24784, 28130], + 'chuò chuì': [24793], + 'hūn mèn': [24795], + 'chǎng tǎng': [24797], + 'suǒ ruǐ': [24802], + cǎn: [24808, 24920, 25007, 40682, 40690], + cán: [24813, 24921, 24922, 27531, 27544, 34453, 34629, 34870, 34874], + 'dàn dá': [24814, 24986], + rě: [24825], + 'yú tōu': [24841], + 'kài qì': [24850], + 'dàng táng shāng yáng': [24851], + 'chén xìn dān': [24854], + 'kè qià': [24856], + nuò: [ + 24862, 25062, 25063, 25535, 25638, 27026, 31276, 31332, 31953, 31973, 31983, + 35582, 35834, 36419, 36925, 37737, 38168, + ], + gǎn: [ + 24863, 25792, 25954, 26751, 27204, 28553, 28600, 30383, 31174, 31240, 31540, + 33417, 34918, 36214, 36245, 40036, 40161, + ], + 'còng sōng': [24865], + 'sāi sī sǐ': [24866], + 'gōng gòng hǒng': [24873, 24912], + 'shuò sù': [24876, 27948], + 'yáo yào': [24878], + huàng: [24880, 26306, 27045, 28361, 30365, 30377, 37796], + zhěng: [24888, 25229, 25327, 25972, 26232], + cǎo: [24890, 33400, 33609, 39474], + 'xì xié': [24896], + 'cǎo sāo': [24901], + 'xù chù': [24905], + 'qiè qiàn': [24906], + 'cáo cóng': [24914], + 'ào áo': [24928], + 'lián liǎn': [24937, 26815, 27108, 27363], + 'jìn qín jǐn': [24940], + 'dì chì': [24952], + 'zhí zhé': [24953], + 'lóu lǚ': [24954, 40412], + còng: [24961, 35621], + 'zhī zhì': [24964, 30693, 32340, 32455], + chēng: [ + 24966, 25690, 25744, 25745, 26239, 26621, 26854, 27221, 27273, 27871, 28030, + 29732, 30624, 30848, 32253, 32585, 34511, 34806, 36202, 36204, 37887, 37923, + 38455, 38743, 38963, 39251, + ], + biē: [24971, 34380, 40009, 40150, 40712, 40862], + 'chéng dèng zhèng': [24981], + 'xǐ xī': [24984], + 'duì dùn tūn': [24990], + 'xiāo jiāo': [24994], + 'xián xiàn': [25002], + 'liáo liǎo': [25005, 29134, 29198, 29202], + shéng: [25012, 32260, 32329, 32361, 32499, 35677], + 'náo nǎo náng': [25017], + 'jǐng jìng': [25020], + 'jǐ jiǎo': [25023], + 'xuān huān': [25025], + 'cǎo sāo sào': [25030], + mèn: [25041, 25059, 26282, 28950, 29148], + 'mèng méng měng': [25052], + 'ài yì nǐ': [25053], + 'méng měng': [25054, 30626, 30674], + 'qí jī jì': [25056], + mǒ: [25057], + 'lán xiàn': [25058], + 'yōu yǒu': [25070], + 'liú liǔ': [25072, 34288], + ràng: [25081, 35698, 35731, 35753], + huān: [ + 25085, 27426, 27475, 27489, 29566, 35737, 35995, 37188, 39529, 40197, 40269, + ], + nǎn: [25089, 25543, 28275, 29045, 33129, 34683, 36199], + 'mí mó': [25090], + 'gàng zhuàng': [25093, 25094], + 'zhuàng gàng': [25095], + 'qu xū': [25100], + 'xì hū': [25103, 25135, 25138], + 'jiá gā': [25115], + zéi: [25117, 34824, 36042, 36156, 39938, 40033, 40087], + děng: [25125, 31561], + 'hū xì': [25137], + chuō: [25139, 36372, 36916], + 'biǎn piān': [25153], + 'shǎng jiōng': [25156], + 'shàn shān': [25159], + cái: [25165, 26448, 32404, 35009, 36001, 36130], + 'zhā zā zhá': [25166], + 'lè lì cái': [25168], + 'bā pá': [25170], + 'dǎ dá': [25171], + rēng: [25172], + 'fǎn fú': [25173], + 'diǎo dí yuē lì': [25178], + 'káng gāng': [25179], + 'yū wū': [25180], + 'yū wū kū': [25181], + 'tuō chǐ yǐ': [25185], + 'gǔ jié xì gē': [25186], + dèn: [25189, 25213], + 'sǎo sào': [25195, 25475], + rǎo: [25200, 25854, 38562], + 'xī chā qì': [25201], + 'bān pān': [25203], + 'bā ào': [25207], + 'xī zhé': [25208], + 'zhì sǔn kǎn': [25211], + zhǎo: [25214, 27836, 29813], + 'kuáng wǎng zài': [25218], + 'hú gǔ': [25223, 40516, 40536], + 'bǎ bà': [25226], + 'dǎn shěn': [25228], + 'nè nì ruì nà': [25232], + zhuā: [25235, 27291, 31803, 33212, 39677], + póu: [25236, 35026], + 'zhé shé zhē': [25240], + 'póu pōu fū': [25241, 25418], + pāo: [25243, 25291, 33068, 33826], + 'ǎo ào niù': [25245], + 'lūn lún': [25249, 25476], + 'qiǎng qiāng chēng': [25250], + 'zhǐ zhǎi': [25255], + 'bù pū': [25258, 26600], + 'yǎo tāo': [25261], + 'hē hè qiā': [25266], + 'nǐ ní': [25267], + 'pī pēi': [25271], + 'mǒ mò mā': [25273], + chōu: [25277, 29352, 29355, 30259, 31704], + 'jiā yá': [25281], + 'fú bì': [25282, 30032, 40349], + zhǎ: [25283, 30504, 30751, 39866, 40093], + 'dān dàn dǎn': [25285], + 'chāi cā': [25286], + niān: [25288, 34091], + 'lā lá lǎ là': [25289], + 'bàn pàn': [25292], + pāi: [25293], + līn: [25294], + guǎi: [25296, 26548, 26618], + 'tuò tà zhí': [25299], + 'ào ǎo niù': [25303], + 'jū gōu': [25304], + 'pīn pàn fān': [25306], + 'bài bái': [25308], + bài: [25309, 25943, 31255, 31930, 34221, 36097, 36133, 38875], + qiá: [25316], + 'nǐng níng nìng': [25319], + 'zé zhái': [25321, 25799], + hén: [25323, 30165, 38798], + 'kuò guā': [25324], + 'jié jiá': [25326], + nǐn: [25328], + shuān: [25332, 26643, 38274, 38377], + 'cún zùn': [25333], + 'zā zǎn': [25334, 26714], + kǎo: [25335, 25911, 26674, 28900, 32771], + 'yí chǐ hài': [25336], + 'cè sè chuò': [25338], + 'zhuài zhuāi yè': [25341], + 'shí shè': [25342], + bāi: [25344, 25520], + 'kuò guāng': [25348], + nòng: [25354, 25397, 40776], + 'jiào jiāo': [25357, 25934, 25945], + 'kuà kū': [25358], + 'ná rú': [25360], + 'tiāo tiǎo': [25361], + 'dié shè': [25365], + liě: [25368, 27615], + 'yà yǎ': [25372, 25495], + 'wō zhuā': [25373], + 'xié jiā': [25375, 25406], + 'dǎng dàng': [25377, 25803], + 'zhèng zhēng': [25379, 27491, 30151], + 'āi ái': [25384], + 'tuō shuì': [25385, 25437], + 'tǐ tì': [25390], + 'suō shā': [25393], + 'sā shā suō': [25394], + 'kēng qiān': [25395, 25724], + 'bàng péng': [25399], + 'ruó ruá': [25404], + 'jiǎo kù': [25409], + 'wǔ wú': [25410], + tǒng: [25413, 26742, 31570, 31593, 32113, 32130, 32479], + 'huò chì': [25415], + 'tú shū chá': [25416], + 'lǚ luō': [25419], + 'shāo shào': [25422, 31245], + niē: [25423, 25553], + 'shù sǒng sōu': [25426], + 'yé yú': [25427], + 'jué zhuó': [25428], + 'bù pú zhì': [25431], + zùn: [25432, 37516], + lāo: [25438, 25736, 31913], + sǔn: [25439, 25613, 27051, 31499, 31565, 31664, 37800, 38588], + 'wàn wǎn wān yù': [25445], + pěng: [25447, 28110, 30351], + shě: [25448], + 'fǔ fù bǔ': [25452], + dáo: [25455], + 'luò luǒ wǒ': [25456], + 'juǎn quán': [25458], + 'chēn tiǎn': [25461], + 'niǎn niē': [25467], + 'ruó wěi ré': [25468], + zuó: [25469, 26152, 31208, 31251, 31600, 33675, 37436], + 'wò xiá': [25470], + 'qìng qiàn': [25477], + 'póu pǒu': [25482], + qiā: [25488, 33884], + 'pái pǎi': [25490], + 'qiān wàn': [25492], + 'yè yē': [25494], + 'niè nǐ yì': [25500], + 'huò xù': [25501], + 'yàn shàn yǎn': [25502], + 'zhěng dìng': [25503], + kòng: [25511, 38810], + tuī: [25512, 34039, 34284], + 'zōu zhōu chōu': [25515], + tiàn: [25517, 33306], + kèn: [25519, 35017, 35075], + pá: [25521, 26487, 28502, 29228, 29750, 31586], + 'guó guāi': [25524], + 'dǎn shàn': [25528, 25763], + 'chān xiān càn shǎn': [25530], + sāo: [ + 25531, 25620, 28318, 32325, 32555, 34726, 39442, 39479, 39968, 40034, 40139, + ], + pèng: [25533, 26922, 27120, 30896, 36395], + 'zhēng kēng': [25537], + 'jiū yóu': [25538], + 'jiān jiǎn': [25539, 31835], + 'pì chè': [25546], + 'sāi zǒng cāi': [25548], + 'tí dī dǐ': [25552], + 'zǒng sōng': [25556], + 'huáng yóng': [25560], + 'zǎn zuàn': [25565], + 'xū jū': [25567], + 'ké qiā': [25570], + 'chuāi chuǎi chuài tuán zhuī': [25571], + 'dì tì': [25573], + 'lá là': [25574], + là: [ + 25575, 26955, 28290, 29902, 30220, 32715, 33240, 34635, 34674, 34847, 36770, + 36771, 37982, 38260, 39694, 39931, + ], + 'jiē qì': [25581], + 'chòng dǒng': [25584], + 'dié shé yè': [25586], + 'jiàn qián jiǎn': [25589], + yé: [25590, 29239, 29242, 29784, 37603, 37761, 38104], + chān: [25600, 25723, 25881, 35047, 35164, 35224, 35271, 36799, 37587], + 'gē gé': [25601, 25841], + 'lǒu lōu': [25602, 25695], + 'chōu zǒu': [25610], + chuāi: [25611], + sūn: [25614, 27074, 29426, 29499, 33642, 33984, 34165, 34206, 39143, 39153], + 'róng náng nǎng': [25617], + 'péng bàng': [25618], + cuō: [25619, 29811, 30923, 36425, 36979, 37277], + 'kē è': [25621], + 'nù nuò nòu': [25625], + 'lā xié xiàn': [25626], + qiǔ: [25629, 31959], + 'xiǎn xiān': [25631], + 'jié zhé': [25641], + 'pán bān pó': [25643], + bān: [ + 25644, 25917, 26001, 26002, 29677, 30242, 30285, 32934, 34689, 34700, 35113, + 36780, 38930, 39041, + ], + 'zhì nái': [25649], + 'wā wǎ wà': [25650], + huá: [ + 25651, 25782, 28369, 29502, 34128, 34710, 35649, 37877, 38119, 39498, 39557, + 40424, + ], + 'qiāng qiǎng chēng': [25654], + 'tián shēn': [25655], + 'ná nuò': [25659], + èn: [25665], + 'shè niè': [25668, 25885], + bìn: [ + 25672, 25839, 27553, 27567, 33169, 33231, 39628, 39637, 39657, 39682, 39699, + 39714, + ], + 'shā sà shǎi': [25675], + 'chǎn sùn': [25676], + 'jiū liú liáo jiǎo náo': [25678], + 'féng pěng': [25683], + shuāi: [25684], + 'dì tú zhí': [25685], + 'qì jì chá': [25686], + 'sōu sǒng': [25687], + 'liǎn liàn': [25689], + 'gài xì': [25697], + 'hù chū': [25698], + tàng: [25701, 28907, 29145, 37899], + 'nái zhì': [25704], + 'mó mā': [25705], + 'jiāng qiàng': [25706], + 'áo qiáo': [25710], + 'niè chè': [25712], + 'mán màn': [25713], + 'chàn cán': [25714], + 'sè mí sù': [25717], + 'biāo biào': [25725], + 'juē jué': [25733], + piē: [25734, 26300, 27669, 30629], + 'piě piē': [25735], + 'zǎn zān zēn qián': [25741], + 'sā sǎ': [25746], + hòng: [25748, 35340, 35751, 38336, 39720], + 'héng guàng': [25751], + niǎn: [ + 25754, 25781, 25862, 28042, 28990, 30910, 31760, 36429, 36456, 36494, 36646, + 36743, + ], + 'chéng zhěng': [25756], + 'huī wéi': [25757], + cāo: [25761, 25805, 31961], + 'xiāo sōu': [25768], + 'liáo liāo': [25769], + 'cuō zuǒ': [25774], + 'wěi tuǒ': [25777], + cuān: [25786, 25883, 27718, 36479, 36517, 38009, 38249], + 'qiào yāo jī': [25789], + 'zhuā wō': [25790], + 'lèi léi': [25794], + nǎng: [25795, 25902, 26345, 28770], + 'qíng jǐng': [25807], + kuǎi: [25811, 33967], + 'pǐ bò': [25815], + 'bò bāi': [25816], + 'jù jǐ': [25818], + mēng: [25821], + 'sǒu sòu': [25822], + xǐng: [25828, 31669, 37266], + cā: [25830], + 'níng nǐng nìng': [25840], + 'zhì jié': [25843], + 'là liè': [25848, 29193], + 'sòu sǒu': [25851], + 'lì luò yuè': [25853], + 'tī zhāi zhì': [25855], + pān: [25856, 28504, 30469, 33824], + lèi: [ + 25858, 27882, 28057, 28122, 31159, 31867, 32391, 34353, 37241, 37511, 37649, + 38939, 38954, 39006, 39075, + ], + 'cā sǎ': [25859], + 'jùn pèi': [25864], + 'lì luò': [25866, 36498], + 'là lài': [25867, 27380], + 'lú luó': [25870], + 'zǎn cuán': [25874], + 'xiān jiān': [25877], + 'mí mǐ mó': [25888], + 'zǎn cuán zàn zuān': [25890], + zuàn: [25893], + 'lì shài': [25894], + 'lì luǒ': [25901], + 'guǐ guì': [25905], + 'jī qī yǐ': [25906], + fàng: [25918], + 'wù móu': [25924], + 'chù shōu': [25930], + 'gé guó è': [25931], + 'duó duì': [25939, 25946], + 'duō què': [25952, 25962], + 'sàn sǎn': [25955], + 'dūn duì': [25958, 38246], + 'qī yǐ jī': [25959], + 'xiào xué': [25961], + 'shù shǔ shuò': [25968, 25976], + 'ái zhú': [25969, 25971], + 'xiòng xuàn': [25979], + 'zhuó zhú': [25984], + 'yì dù': [25985], + 'lí tái': [25988], + 'fěi fēi': [26000], + 'yǔ zhōng': [26004], + 'dòu dǒu': [26007], + 'wò guǎn': [26017], + 'tǒu tiǎo': [26018], + dòu: [ + 26019, 26794, 28002, 30168, 31398, 31431, 33072, 33651, 35910, 36887, 37078, + 37208, 38295, 38360, 39190, 39294, 39717, 39718, 39722, 39724, 39725, + ], + 'yín zhì': [26022], + 'chǎn jiè': [26042], + 'wū yū yú': [26044], + 'yóu liú': [26047], + 'páng bàng': [26049], + 'máo mào': [26052], + 'pī bì': [26055], + 'xuán xuàn': [26059], + 'wú mó': [26080], + zǎo: [26089, 26531, 26630, 26839, 28577, 29866, 34235, 34299, 34468], + gā: [26094], + 'gàn hàn': [26096], + 'tái yīng': [26098], + 'xū xù': [26100], + 'tūn zhùn': [26109], + 'wù wǔ': [26111], + 'pò pèi': [26146], + zòng: [26158, 29460, 30125, 30258, 31933, 31945, 31981, 32294], + ǎi: [26169, 27600, 30702, 34108, 34297, 35690, 36535, 38701, 38724], + 'huàng huǎng': [26179], + xuǎn: [26181, 30307, 30316, 36873, 36984], + 'xù kuā': [26183], + hǒng: [26190], + shài: [26194, 26348], + 'yūn yùn': [26197, 29044], + 'shèng chéng': [26207, 26889, 30427], + 'jǐng yǐng': [26223], + shǎn: [26225, 29068, 30546, 35234, 38275, 38378, 38485, 38493], + 'qǐ dù': [26229], + 'ǎn àn yǎn': [26235], + 'wǎng wàng': [26240], + zàn: [ + 26242, 26283, 29897, 29906, 29914, 31158, 35192, 35715, 35738, 36059, 36106, + 36190, 36436, 37180, 37694, 37864, 39265, + ], + 'yùn yūn': [26248], + 'mín mǐn': [26251], + 'dǔ shǔ': [26255], + shǔ: [ + 26257, 26329, 28539, 30297, 31980, 32626, 34213, 34223, 34295, 34560, 34868, + 35169, 35177, 40042, 40048, 40653, 40736, 40737, + ], + 'jiǎn lán': [26261], + nuǎn: [26262, 29015, 39210], + 'bào pù': [26292], + 'xī xǐ': [26303], + 'pù bào': [26333, 28689], + 'qū qǔ': [26354, 32054], + 'gèng gēng': [26356], + 'hū hù': [26358, 38653], + 'zēng céng': [26365, 27239], + 'céng zēng': [26366, 31474], + 'cǎn qián jiàn': [26369], + 'qiè hé': [26373], + 'bì pí': [26375, 31110, 31507, 35048], + 'yǒu yòu': [26377], + 'bān fén': [26380, 40187], + 'fú fù': [26381, 27921], + 'fěi kū': [26383, 32976], + 'qú xù chǔn': [26384], + 'juān zuī': [26392], + 'huāng máng wáng': [26394], + 'qī jī': [26399], + 'tóng chuáng': [26403, 27238], + zhá: [26413, 29264, 31642, 34491, 35671, 37720, 38113, 38296, 38392], + 'zhú shù shú': [26414], + 'shù shú zhú': [26415], + 'zhū shú': [26417], + 'pǔ pò pō piáo': [26420], + 'dāo tiáo mù': [26423], + 'guǐ qiú': [26425], + xiǔ: [26429, 28395, 28483, 31956], + 'chéng chēng': [26430], + zá: [26434, 27823, 30776, 35149, 38609, 38620, 38629, 38900], + 'yú wū': [26437], + 'gān gǎn': [26438], + 'chā chà': [26440], + 'shān shā': [26441], + cūn: [26449, 30388, 31476, 33189, 36358, 37032], + 'rèn ér': [26450, 26773], + 'sháo biāo': [26451], + 'dì duò': [26453, 26532], + 'gū gài': [26458], + 'yí zhì lí duò': [26461], + 'gàng gāng': [26464], + 'tiáo tiāo': [26465, 26781], + 'mà mǎ': [26473], + 'sì zhǐ xǐ': [26475], + 'yuán wán': [26476, 34454], + 'bèi fèi': [26478], + 'shū duì': [26488], + 'niǔ chǒu': [26491], + 'wò yuè': [26498, 33234], + máo: [ + 26502, 27611, 27650, 28213, 29286, 30683, 32606, 33541, 33542, 34661, 34762, + 36574, 37205, 37502, 37672, 38170, 39654, 40348, + ], + 'pī mì': [26504], + àng: [26506, 30414, 37280], + 'fāng bìng': [26507], + 'hù dǐ': [26513], + xín: [26516, 35153, 37908, 39733], + 'yāo yǎo': [26518], + 'ě è': [26521], + 'zhī qí': [26525], + 'cōng zōng': [26526, 27141], + 'xiān zhēn': [26542], + 'tái sì': [26545], + 'gǒu jǔ gōu': [26552], + 'bāo fú': [26553], + 'yì xiè': [26555, 26663], + 'tuó duò': [26561, 39345, 39364, 39534], + 'yí duò lí': [26562], + 'nǐ chì': [26565], + 'pán bàn': [26568, 36312], + 'yǎng yàng yāng yīng': [26573], + 'fù fū fǔ': [26574], + 'bǎi bó bò': [26575], + mǒu: [26576], + 'sháo shào': [26582], + zhè: [26584, 27164, 27993, 28123, 34071, 34757, 36889, 40403, 40551], + 'yòu yóu': [26586, 27390], + 'guì jǔ': [26588], + 'zhà zuò': [26590], + 'dié zhì': [26595, 30512], + 'zhā zǔ zū': [26596], + 'chá zhā': [26597, 26619], + 'āo ào': [26602, 36586], + 'bā fú pèi bó biē': [26605], + 'duò zuó wù': [26606], + 'bì bié': [26610], + 'zhù chù': [26615], + 'bēi pēi': [26616], + 'shì fèi': [26617], + 'shān zhà shi cè': [26629], + 'lì yuè': [26638, 27359], + 'qì qiè': [26644, 30732], + 'qī xī': [26646, 36426], + 'guā kuò': [26653], + 'bīng bēn': [26655], + 'xiào jiào': [26657], + 'jiàn zùn': [26667, 35000], + 'yǒu yù': [26671], + 'hé hú': [26680], + gēn: [26681, 36319], + 'zhī yì': [26682], + 'gé gē': [26684], + 'héng háng': [26689], + 'guàng guāng': [26692], + 'yí tí': [26699, 33617], + sāng: [26705, 26706, 27105], + 'jú jié': [26708], + 'yú móu': [26713], + 'ráo náo': [26721, 27208], + 'guì huì': [26727, 27292], + 'chén zhèn': [26733], + 'tīng yíng': [26735], + po: [26738], + 'bèn fàn': [26739], + 'fēng fèng': [26747, 33873], + 'sù yìn': [26752], + 'tǐng tìng': [26755], + 'xuān juān xié': [26763], + 'tú chá': [26764], + 'āo yòu': [26766], + kuǎn: [26785, 27445, 27454, 27456], + 'shāo sào': [26786], + 'qín chén cén': [26787], + 'lí sì qǐ': [26793], + 'chān yán': [26804], + 'bīn bīng': [26809, 27103, 27315], + 'táo chóu dào': [26812], + 'cōng sōng': [26823], + 'gùn hùn': [26829], + 'dé zhé': [26831], + 'pái bèi pèi': [26833], + 'bàng pǒu bèi bēi': [26835], + 'dì dài tì': [26851], + sēn: [26862, 26926, 27118, 35138], + 'rěn shěn': [26863], + 'léng lēng líng': [26865], + 'fú sù': [26868], + 'zōu sǒu': [26871], + zōu: [ + 26872, 31619, 32197, 35535, 35833, 37049, 37104, 37138, 37177, 38508, 39478, + 39546, 39915, 40112, 40640, 40817, 40826, + ], + 'zhào zhuō': [26873], + 'chēn shēn': [26877], + 'jiē qiè': [26884], + 'yǐ yī': [26885], + 'chóu zhòu diāo': [26886], + 'qiāng kōng': [26892], + 'zhuī chuí': [26894], + 'bēi pí': [26897], + mēn: [26906], + 'quān juàn quán': [26918], + 'duǒ chuán': [26927], + 'wěi huī': [26930], + 'jiǎ jiā': [26933], + 'hán jiān': [26935], + 'shèn zhēn': [26937], + 'yàn yà': [26939], + 'zhā chá': [26946], + 'guō kuǎ': [26951], + 'jí zhì': [26966], + 'kǔ hù': [26971], + 'yóu yǒu': [26978], + 'sǒng cōng': [26980], + 'yuán xuàn': [26981], + 'yǎng yàng yīng': [26983], + pián: [26985, 33020, 33089, 36038, 36417, 39394, 39432, 39560, 39615], + 'dié yè': [26986], + 'dùn shǔn': [26991], + 'còu zòu': [26993], + 'dì dǐ shì': [26996], + 'kǎi jiē': [26999], + 'róu ròu': [27002], + 'lè yuè': [27005], + 'wēn yùn': [27013, 38832], + lǘ: [27016, 27354, 27648, 33186, 34264, 38317, 38398, 39522, 39540], + shén: [27018, 31070, 37486, 39984], + 'bī pi': [27020], + 'zhǎn niǎn zhèn': [27024], + 'fú fù bó': [27025], + 'jiàn jìn': [27031], + 'bǎng bàng': [27036], + 'shā xiè': [27037, 27175], + nòu: [27080, 32808, 37778, 37918], + 'qiǎn lián xiàn': [27087], + gàng: [27091, 28981, 28985, 31611], + gāo: [ + 27092, 27129, 27248, 27356, 30590, 31705, 31957, 32660, 33263, 38879, 39227, + 39640, 39641, 40398, 40433, 40731, + ], + 'diān zhěn zhēn': [27097], + 'kǎn jiàn': [27099], + 'xí dié': [27106], + 'jī guī': [27107], + 'róng yōng': [27110], + 'tuán shuàn quán': [27115], + 'qì sè': [27117], + 'cuī zhǐ': [27119], + 'yǒu chǎo': [27121], + 'màn wàn': [27134], + 'lí chī': [27142], + 'léi lěi': [27151, 27345, 30988], + 'cháo jiǎo chāo': [27156], + 'chēng táng': [27160], + 'jiū liáo': [27163], + 'mó mú': [27169], + 'niǎo mù': [27170], + 'héng hèng': [27178, 27243], + xuě: [27184, 33188, 33373, 36684, 38634, 40008, 40149], + 'fá fèi': [27203], + rùn: [27213, 28070, 28516, 33206, 38287, 38304, 38384], + 'zhǎn jiǎn': [27215], + shùn: [27219, 30618, 30636, 33308, 34147, 38918, 39034, 39690], + 'tuí dūn': [27220], + 'táng chēng': [27222], + 'sù qiū': [27226], + 'tán diàn': [27229], + 'fén fèn fèi': [27240], + 'rǎn yān': [27242], + 'cū chu': [27259], + 'shū qiāo': [27262], + 'píng bò': [27288], + 'zhái shì tú': [27297], + 'biǎo biāo': [27302], + 'qiān lián': [27318], + 'nǐ mí': [27319], + 'jiàn kǎn': [27323], + 'nòu ruǎn rú': [27325], + 'jī jì': [27333, 31144], + 'huǎng guǒ gǔ': [27342], + 'lǜ chū': [27350], + 'miè mèi': [27351], + ōu: [ + 27353, 27431, 27472, 27572, 27590, 29935, 29964, 33170, 34290, 35635, 35764, + 37826, 40206, 40407, 40485, + ], + 'zhù zhuó': [27361], + 'jué jì': [27373], + 'huái guī': [27376], + 'chán zhàn': [27395], + 'wéi zuì': [27400], + cáng: [27404, 38006], + 'yù yì': [27429], + 'chù qù xì': [27434], + 'kài ài': [27436], + 'yì yīn': [27437], + 'xì kài': [27439], + 'shuò sòu': [27446], + 'ǎi ēi éi ěi èi': [27448], + 'qī yī': [27449], + 'chuā xū': [27451], + 'chǐ chuài': [27452], + 'kǎn qiàn': [27455], + 'kǎn kè': [27457], + 'chuǎn chuán': [27458], + 'yīn yān': [27461], + 'jìn qūn': [27471], + pēn: [27477], + 'xū chuā': [27480], + 'xī shè': [27481], + 'liǎn hān': [27483], + 'zhì chí': [27501], + 'sè shà': [27504], + sǐ: [27515], + 'wěn mò': [27518], + piǎo: [27533, 30379, 30623, 37285, 39008], + 'qíng jìng': [27537], + 'fǒu bó': [27541], + 'zhí shi': [27542], + 'yè yān yàn': [27543], + 'hūn mèi': [27545], + chòu: [27552, 33264, 36954], + 'kuì huì': [27560, 28291, 28528], + cuàn: [27561, 29110, 29224, 31388, 31428, 31713, 31762], + 'yīn yān yǐn': [27575], + 'qìng kēng shēng': [27576], + 'yáo xiáo xiào': [27581], + 'gū gǔ': [27586, 34500], + 'guàn wān': [27596], + 'dú dài': [27602], + 'xún xùn': [27621], + mú: [27626, 27649], + 'dòu nuò': [27629], + 'sāi suī': [27640], + lu: [27655], + sào: [27657, 30233, 30658, 39646], + 'shì zhī': [27663], + 'dī dǐ': [27664], + 'máng méng': [27667], + 'yáng rì': [27676], + shuǐ: [27700, 27701, 27706, 38294], + 'zhěng chéng zhèng': [27702], + tǔn: [27709], + 'fán fàn': [27710], + 'guǐ jiǔ': [27711], + 'bīn pà pā': [27715], + 'zhuó què': [27723], + 'dà tài': [27727], + pìn: [27734, 29277, 32856], + 'hàn hán': [27735, 39343], + tu: [27746], + 'tāng shāng': [27748, 28271], + 'zhī jì': [27749], + 'gàn hán cén': [27765], + 'wèn mén': [27766], + 'fāng pāng': [27768], + 'hǔ huǎng': [27771], + 'niú yóu': [27772], + hàng: [27782], + 'shěn chén': [27784], + 'dùn zhuàn': [27788], + 'nǜ niǔ': [27793], + 'méi mò': [27794, 27809], + 'tà dá': [27795], + 'mì wù': [27797], + 'hóng pāng': [27799], + 'shā shà': [27801], + 'zhuǐ zǐ': [27805], + 'ōu òu': [27812, 28442], + 'jǔ jù': [27822], + 'tuō duó': [27824], + 'mǐ lì': [27829], + 'yí chí': [27830], + 'xiè yì': [27844], + 'bó pō': [27850], + 'mì bì': [27852, 31192], + 'chù shè': [27855], + 'yōu yòu āo': [27857], + 'pēng píng': [27865, 30801], + 'pào pāo': [27873], + 'ní nì': [27877, 31196], + 'yuè sà': [27879], + 'jué xuè': [27884, 30118], + 'lóng shuāng': [27895, 28711], + 'luò pō': [27898, 28668], + 'zé shì': [27901, 28580], + 'sǎ xǐ': [27922], + 'sè qì zì': [27923], + 'xǐ xiǎn': [27927], + 'kǎo kào': [27928], + 'àn yàn è': [27933], + 'lěi lèi': [27937], + 'qiè jié': [27951], + 'qiǎn jiān': [27973], + 'jì jǐ': [27982, 28168, 28639, 32426], + 'hǔ xǔ': [27986, 28408], + 'jùn xùn': [27994, 28652], + 'yǐng chéng yíng': [28007], + 'liàn lì': [28016], + 'féng hóng': [28018, 28292], + 'jiǒng jiōng': [28027], + 'suī něi': [28029], + 'yǒng chōng': [28044], + 'tūn yūn': [28050], + 'wō guō': [28065, 28198], + hēng: [28069, 33053], + 'zhǎng zhàng': [28072, 28466], + 'shòu tāo': [28077], + shuàn: [28078, 33128], + 'kōng náng': [28083], + 'wò wǎn yuān': [28084], + 'tuō tuò': [28086], + wō: [28089, 29479, 31389, 31401, 33716, 33845, 34583, 34680, 36370], + 'qiè jí': [28097], + 'guǒ guàn': [28105], + 'lín lìn': [28107, 29532, 30084], + 'tǎng chǎng': [28108], + 'nào chuò zhuō': [28118], + 'péng píng': [28124], + féi: [28125, 32933, 33107, 34608], + 'pì pèi': [28128], + 'niǎn shěn': [28144], + 'biāo hǔ': [28146], + 'chún zhūn': [28147], + 'hùn hún': [28151], + qiǎn: [28154, 32382, 32561, 32951, 33153, 34616, 35700, 35892, 36963, 37971], + 'wèn mín': [28162], + 'rè ruò luò': [28163], + 'dú dòu': [28174, 28678, 35835], + 'jiàn jiān': [28176, 28293, 28472, 28666], + 'miǎn shéng': [28177, 28576], + 'nuǎn nuán': [28188], + 'qiú wù': [28190], + 'tíng tīng': [28191], + 'dì tí dī': [28199], + 'gǎng jiǎng': [28207], + 'hōng qìng': [28217], + tuān: [28237, 29011], + 'huì mǐn xū': [28239], + 'xǔ xù': [28241], + pén: [28243, 29931, 30406, 33872], + 'mǐn hūn': [28259], + 'tuàn nuǎn': [28266], + 'qiū jiǎo': [28267, 28268], + 'yān yīn': [28270], + 'bàn pán': [28276], + 'zhuāng hún': [28279], + 'yàn guì': [28302], + 'lián liǎn nián xián xiàn': [28307], + 'dá tǎ': [28314], + 'liū liù': [28316, 28561, 36435], + lùn: [28323], + mǎ: [ + 28324, 29368, 29505, 29595, 29802, 30721, 30908, 36964, 37815, 39340, 39532, + 39970, 40396, + ], + 'zhēn qín': [28337], + 'nì niào': [28346], + 'chù xù': [28352, 30044], + 'wěng wēng': [28355], + 'hào xuè': [28360], + 'qì xì xiē': [28362], + 'xíng yíng': [28366], + 'zé hào': [28380], + 'piāo piào piǎo': [28418], + 'cóng sǒng': [28430], + 'féng péng': [28456], + 'luò tà': [28463], + 'pēng bēn': [28464], + 'chóng shuāng': [28468], + 'huǒ kuò huò': [28471], + 'liáo liú': [28475], + 'cuǐ cuī': [28476], + 'cóng zǒng': [28480], + 'cóng zōng': [28488], + 'pì piē': [28494], + 'dàng xiàng': [28498], + 'huáng guāng': [28514], + 'liáo lào lǎo': [28518], + 'cōng zòng': [28520], + 'zhí zhì': [28522], + 'tān shàn': [28524], + 'tú zhā': [28531], + 'sàn sǎ': [28533], + hēi: [28534, 40657, 40658], + 'chéng dèng': [28548, 28691], + 'cūn cún': [28554], + 'péng pēng': [28558], + 'hòng gǒng': [28562, 37566], + 'wàn màn': [28587], + 'kuài huì': [28590], + 'guō wō': [28612], + 'pēn fén': [28614], + 'jí shà': [28616], + 'huì huò': [28618], + 'dǐng tìng': [28622], + 'mǐ nǐ': [28628], + 'bì pì': [28638], + 'cuì zuǐ': [28642], + 'hù huò': [28649], + 'ǎi kài kè': [28653], + 'wěi duì': [28667, 28706], + 'zàn cuán': [28669, 28754], + 'yǎng yàng': [28673], + 'wǎng wāng': [28679], + 'mò miè': [28686, 30492], + suǐ: [28705, 33208, 39635], + 'huái wāi': [28708], + 'zùn jiàn': [28723], + 'yīng yǐng yìng': [28724], + 'ráng ràng': [28732], + shuàng: [28736], + 'zhuó jiào zé': [28738], + sǎ: [28753, 35375, 38776], + 'luán luàn': [28755], + 'dǎng tǎng': [28761], + 'xún quán quàn': [28773], + 'huǒ biāo': [28780], + 'zhà yù': [28793], + 'fén bèn': [28803], + 'jiǒng guì': [28805], + 'pàng fēng': [28816], + quē: [28820, 32570, 32572, 33947], + biān: [ + 28830, 29048, 29954, 30765, 31550, 31663, 31849, 32232, 32534, 34649, 37001, + 37002, 37757, 38829, 39934, 39935, 40138, + ], + 'zhāo zhào': [28836], + 'zhuō chù': [28842], + 'pào páo bāo': [28846], + 'páo fǒu': [28848], + 'shǎn qián shān': [28854], + 'zhà zhá': [28856], + 'jiǎo yào': [28868], + quǎn: [28871, 29356, 29357, 30030, 32163, 32507, 34375], + 'yàng yáng': [28874], + 'lào luò': [28889], + 'huí huǐ': [28896], + rè: [28909, 29105], + 'fú páo': [28912], + 'xiè chè': [28914, 28942], + 'yàn shān': [28923], + 'hūn xūn': [28932], + kào: [28933, 29330, 37548, 38096, 38752, 39859, 39884, 40083], + 'juān yè': [28934], + 'jùn qū': [28940], + 'tāo dào': [28952], + 'chǎo jù': [28963], + 'wò ài': [28965], + 'zǒng cōng': [28967], + 'xī yì': [28972], + 'xìn xīn': [28974], + 'chāo zhuō': [28975], + 'xiǒng yīng': [28984, 28989], + kuǐ: [28995, 36332, 36446, 38925], + 'huī yùn xūn': [28999], + 'jiǎo qiāo': [29005], + 'qián shǎn shān': [29012], + 'xī yí': [29013], + 'shà shā': [29022], + 'yè zhá': [29024], + 'yáng yàng': [29036], + 'ēn yūn': [29054], + 'yūn yǔn': [29061], + 'hè xiāo': [29063], + xióng: [29066, 29067, 38596], + 'xūn xùn': [29071, 29195], + gòng: [29077, 36002, 36129], + liū: [29080], + 'cōng zǒng': [29084], + 'lù āo': [29085], + 'shú shóu': [29087], + 'fēng péng': [29090], + 'cuǐ suī': [29091], + tēng: [29093, 33199, 40735], + 'yùn yù': [29096], + 'áo āo': [29100], + 'hàn rǎn': [29103], + 'ōu ǒu': [29104], + 'huáng huǎng': [29119], + 'chǎn dǎn chàn': [29120], + 'jiāo zhuó qiáo jué': [29131], + 'yàn yān': [29141], + 'tài liè': [29156], + āo: [29194], + 'yàn xún': [29203], + 'jué jiào': [29213, 35216, 35226, 35258, 35273], + 'lǎn làn': [29222], + 'zhuǎ zhǎo': [29226], + 'zhǎo zhuǎ': [29227], + 'fù fǔ': [29238], + diē: [29241, 35130, 36300], + zāng: [29250, 32664, 33255, 36045, 36056, 36115, 36124, 36163, 39634], + 'piàn piān': [29255], + 'biān miàn': [29265], + bǎng: [29267, 32129, 32465], + 'yǒu yōng': [29271], + 'chēng chèng': [29274, 31424], + niú: [29275, 29276], + 'jiū lè': [29278], + 'mù móu': [29279], + māng: [29284], + 'gē qiú': [29291], + 'yòu chōu': [29296], + 'tè zhí': [29318], + bēn: [29319, 37659, 38171], + 'jiān qián': [29325, 29610], + má: [29336, 30194, 34100, 34759, 40635], + 'máo lí': [29339], + 'bá quǎn': [29358], + 'zhuó bào': [29363], + 'àn hān': [29364], + 'kàng gǎng': [29370], + 'pèi fèi': [29371], + 'fān huān': [29375], + kuáng: [29378, 29381, 35473, 35827, 36566, 36576, 40287], + 'yí quán chí': [29387], + 'xīng shēng': [29388], + 'tuó yí': [29391], + kǔ: [29404, 33510], + 'huán huān': [29407], + 'hé mò': [29410], + 'tà shì': [29415], + 'máng dòu': [29429], + 'xī shǐ': [29430], + suān: [29435, 30176, 37240], + 'bài pí': [29448], + 'jiān yàn': [29455, 35939], + 'yī yǐ': [29463], + 'yá wèi': [29466], + cāi: [29468], + 'māo máo': [29483, 35987], + 'chuàn chuān': [29485], + 'tuān tuàn': [29487, 35986], + 'yà jiá qiè': [29488], + 'hè xiē gé hài': [29490], + 'biān piàn': [29493, 29553], + 'bó pò': [29500], + 'háo gāo': [29515], + 'fén fèn': [29526], + 'yào xiāo': [29535], + 'shuò xī': [29537], + 'gé liè xiē': [29542], + 'nòu rú': [29555], + 'náo nǎo yōu': [29558], + ráng: [29565, 29924, 31155, 31331, 31344, 34328, 36511, 39716], + 'náo yōu': [29567], + 'lǜ shuài': [29575], + 'wáng wàng': [29579], + 'yáng chàng': [29594], + 'mín wén': [29599], + 'bīn fēn': [29602], + 'mén yǔn': [29607], + 'qiāng cāng': [29617, 29810, 31724], + 'án gān': [29621], + 'xuán xián': [29625], + 'cī cǐ': [29628, 36304], + 'yí tāi': [29638], + 'zǔ jù': [29639], + fà: [29648, 29754, 34143, 39658, 39662], + 'yín kèn': [29666], + 'huī hún': [29682], + 'xuán qióng': [29697], + 'fú fū': [29704], + 'bǐng pín': [29717], + 'cuì sè': [29719], + 'yù wéi': [29727], + 'tiǎn tiàn': [29728], + 'zhuó zuó': [29730], + 'běng pěi': [29731], + guǎn: [ + 29743, 29869, 30191, 31590, 31649, 33304, 36648, 37671, 39208, 39302, 40164, + ], + 'hún huī': [29759], + 'xié jiē': [29774], + 'chàng dàng yáng': [29778], + 'tiàn zhèn': [29809], + 'bīn pián': [29816, 29880], + 'tú shū': [29817], + cuǐ: [29824, 30368, 36257], + 'zǎo suǒ': [29829], + 'jué qióng': [29850], + 'lú fū': [29879], + 'jì zī': [29886], + suí: [29901, 32143, 32485, 36928, 38543, 38568, 39620], + 'mí xǐ': [29909], + 'qióng wěi wèi': [29911], + 'huán yè yà': [29915], + 'bó páo': [29919], + 'zhí hú': [29921], + piáo: [29922, 38365], + 'wǎ wà': [29926], + 'xiáng hóng': [29928], + wèng: [29934, 29973, 32587, 34169, 40774], + 'shèn shén': [29978], + ruí: [29988, 32204, 34148], + yòng: [29992, 30781, 33498, 33935, 37279], + shuǎi: [29993], + béng: [29997, 29998], + 'yóu zhá': [30004], + 'diàn tián shèng': [30008], + 'tǐng dīng': [30010, 30012], + 'zāi zī': [30014], + 'bì qí': [30017], + 'dá fú': [30039], + 'cè jì': [30047], + 'zāi zī tián': [30048], + 'zhì chóu shì': [30052], + 'fān pān': [30056, 30058], + 'shē yú': [30060], + 'dāng dàng dǎng': [30070], + 'jiāng qiáng': [30086], + 'pǐ yǎ shū': [30091], + 'jié qiè': [30092], + 'yí nǐ': [30097], + nè: [30098, 30514, 35365, 35767], + 'gē yì': [30105], + 'nüè yào': [30111, 30247], + 'lì lài': [30112, 30296], + 'yǎ xiā': [30120], + xuē: [30134, 33926, 34203, 36773, 36778, 38772, 38846], + 'dǎn da': [30136], + 'fá biǎn': [30138], + 'fèi féi': [30143, 30193], + 'shān diàn': [30145], + 'téng chóng': [30155], + 'tōng tóng': [30156], + 'wěi yòu yù': [30159], + 'tān shǐ': [30161], + 'pū pù': [30177, 37610], + 'bēng péng': [30189], + 'má lìn': [30195], + 'tiǎn diàn': [30198], + 'ān yè è': [30199], + 'kē ē': [30206], + 'zhì chì': [30216], + 'jiǎ xiá xiā': [30229], + 'lěi huì': [30243], + 'chài cuó': [30245], + 'diān chēn': [30248], + 'da dá': [30249], + 'biě biē': [30250], + qué: [30264], + 'dàn dān': [30281], + 'guì wēi': [30288], + 'nòng nóng': [30289], + 'biē biě': [30303], + 'bō bǒ': [30327], + bái: [30333], + 'jí bī': [30336], + 'de dì dí dī': [30340], + 'pā bà': [30341], + 'gāo háo': [30347], + 'gāo yáo': [30352], + 'lì luò bō': [30378], + 'zhā cǔ': [30395], + 'zhāo zhǎn dǎn': [30397], + 'jiān jiàn': [30417, 30435, 37627, 38388, 38828], + 'gài gě hé': [30422], + 'máng wàng': [30451], + yuǎn: [30454, 36922, 36960], + 'tián xián': [30455], + 'xiāng xiàng': [30456], + dǔn: [30457, 36280, 36489], + 'xì pǎn': [30459], + 'shěng xǐng': [30465], + 'yún hùn': [30467], + 'miǎn miàn': [30468], + 'kàn kān': [30475], + 'yìng yāng yǎng': [30479], + 'yǎo āo ǎo': [30481], + 'jū xū kōu': [30487], + 'yí chì': [30489], + 'dié tì': [30499], + 'bǐng fǎng': [30506], + 'pàng pán': [30507], + 'mī mí': [30511, 30599], + 'xuàn shùn xún': [30516], + tiào: [30522, 31900, 31990, 35228, 36242], + 'zhe zhuó zháo zhāo': [30528], + 'qiáo shào xiāo': [30532], + 'cuó zhuài': [30537], + gùn: [30548, 35636], + 'suì zuì': [30559], + 'pì bì': [30565, 31275, 36767], + 'yì zé gāo': [30570], + 'xǐng xìng': [30578], + 'guì wèi kuì': [30598], + 'kòu jì': [30601], + 'qióng huán': [30607], + 'mán mén': [30610, 30622], + 'diāo dōu': [30615], + 'lou lóu lǘ': [30620], + 'shùn rún': [30628], + 'liào liǎo': [30637, 38028], + 'jiàn xián': [30639], + 'wǔ mí': [30644], + 'guì kuì': [30646], + 'nǐng chēng': [30659], + 'huò yuè': [30662], + 'mēng méng': [30663], + 'kuàng guō': [30668], + 'guàn quán': [30676], + 'mǎn mán': [30677], + 'jīn guān qín': [30684], + 'jīn qín guān': [30685], + 'yù xù jué': [30686], + 'jiǎo jiáo': [30699, 30703], + duǎn: [30701], + 'shí dàn': [30707], + 'gāng qiāng kòng': [30716], + 'huā xū': [30729], + 'pīn bīn fēn': [30735], + 'yán yàn': [30740, 30799], + 'luǒ kē': [30754], + 'fú fèi': [30761, 31536], + 'zhǔ zhù': [30763], + 'lá lì lā': [30764], + 'kuāng guāng': [30788], + 'gè luò': [30796], + 'shuò shí': [30805, 30889], + 'wèi wéi ái': [30809], + 'què kè kù': [30814], + 'mǎng bàng': [30821], + 'luò lòng': [30822], + 'yǒng tóng': [30823], + nüè: [30840, 34384], + 'kēng kěng': [30843], + 'yān yǎn': [30845], + 'zhuì chuí duǒ': [30846], + 'kōng kòng': [30847], + 'zòng cóng': [30850], + 'jiān zhàn': [30858], + 'lù liù': [30860, 38470], + 'què xī': [30863], + 'lún lǔn lùn': [30870], + 'náo gāng': [30873], + 'jié yà': [30883], + 'wèi wěi': [30888], + 'tí dī': [30894], + 'chá chā': [30900], + 'qiāo què': [30907], + 'sù xiè': [30911], + 'liú liù': [30914, 36955, 37798, 39311], + 'sī tí': [30915], + 'bàng páng': [30917], + 'huá kě gū': [30918], + 'wěi kuǐ': [30920], + 'xiá qià yà': [30925], + 'lián qiān': [30927], + 'wèi ái gài': [30929], + 'lá lā': [30934], + 'áo qiāo': [30941], + 'pēng pèng': [30942, 38299], + 'yīn yǐn': [30948], + 'lěi léi': [30949], + 'mó mò': [30952], + 'qì zhú': [30953], + 'láo luò': [30961], + 'pán bō': [30971], + 'jí shé': [30972], + 'hé qiāo qiào': [30985], + 'kè huò': [30986], + 'què hú': [30992], + 'è qì': [31000], + cǎ: [31012, 31032], + 'xián xín': [31013], + 'léi lěi lèi': [31015], + 'yán yǎn': [31033], + 'qí zhǐ': [31047, 34452], + 'bēng fāng': [31050], + 'bì mì': [31061], + suàn: [31064, 31495, 31597, 31639, 33948], + 'piào piāo': [31080], + 'jì zhài': [31085], + 'shuì lèi': [31089], + 'jìn jīn': [31105], + 'chán shàn': [31109], + 'yáng shāng': [31123], + 'zhī zhǐ tí': [31124], + 'shàn chán': [31146], + 'yú yù ǒu': [31162], + 'zǐ zì': [31172], + 'chá ná': [31173], + 'zhǒng zhòng chóng': [31181], + 'hào mào': [31183], + 'kù kū': [31193], + zū: [31199, 33861], + chèng: [31204, 31338], + 'huó kuò': [31214, 31219], + 'chēng chèn chèng': [31216, 31281], + 'shì zhì': [31218, 37556], + 'fù pū': [31231], + 'xùn zè': [31236], + 'tú shǔ': [31244], + 'zhùn zhǔn': [31253], + 'jī qí': [31256, 32168, 35309], + 'léng líng': [31260], + 'zuì zú sū': [31265], + 'xì qiè': [31271, 37060], + 'zhǒng zhòng': [31278], + 'zōng zǒng': [31279], + 'xián jiān liàn': [31284], + 'zī jiū': [31285], + 'jī qǐ': [31293], + ròng: [31299], + 'shān cǎn cēn': [31303], + 'mén méi': [31304], + 'jǐ jì': [31318], + 'xiāo rào': [31320], + 'zhuō bó': [31323], + 'tóng zhǒng zhòng': [31324], + zuō: [31325], + 'biāo pāo': [31342, 34280], + 'zhuō jué': [31345], + 'cuán zàn': [31347], + 'kōng kòng kǒng': [31354], + 'yū yǔ': [31355], + zhǎi: [31364, 37465], + báo: [31367, 38649], + 'kū zhú': [31371], + 'jiào liáo liù': [31372], + 'wā guī': [31376], + 'tiǎo yáo': [31381], + 'xūn yìn': [31400], + 'yà yē': [31403], + 'tián diān yǎn': [31412], + 'chāo kē': [31420], + 'kuǎn cuàn': [31421, 31422], + 'chù qì': [31440], + 'qǔ kǒu': [31448], + 'jìng zhěn': [31463], + 'kǎn kàn': [31479], + 'zhú dǔ': [31482], + 'lè jīn': [31483], + 'zhuì ruì': [31501], + 'háng hàng': [31504], + 'cén jìn hán': [31506], + 'dā xiá nà': [31514], + 'zé zuó': [31534], + 'lóng lǒng': [31548, 31725, 31840, 36504, 40851], + 'zhù zhú': [31569, 31689], + 'dá dā': [31572, 33605], + shāi: [31579, 31721, 31745, 31853], + 'yún jūn': [31584], + 'láng làng': [31588, 37070, 38406], + 'zhì zhǐ': [31595], + o: [31613], + 'póu bù fú pú': [31617], + 'pái bēi': [31620], + gè: [31623, 34428, 37499, 38124], + 'tái chí': [31624], + 'guǎi dài': [31625], + 'zhào dào': [31628], + 'jīng qìng': [31632], + 'lín lǐn': [31638], + 'jùn qūn': [31640], + 'shī yí': [31671, 37366], + 'yuē yào chuò': [31673], + 'xiāo shuò qiào': [31678], + 'gōng gǎn lǒng': [31714], + 'páng péng': [31715], + 'zhuó huò': [31719], + 'jiǎn jiān': [31727], + 'dí zhú': [31732], + 'zān cēn cǎn': [31736], + 'zhuàn suǎn zuàn': [31737], + 'piǎo biāo': [31739], + 'guó guì': [31746], + 'cè jí': [31758], + 'mì miè': [31770], + 'shāi sī': [31771], + 'sǔn zhuàn': [31784], + 'gàn gǎn': [31795], + 'bò bǒ': [31800], + 'bó bù': [31807], + shi: [31810], + 'zhēn jiān': [31816], + 'zhuàn zuǎn': [31825], + 'fān pān biān': [31827], + 'sǒu shǔ': [31828], + zuǎn: [31851, 32356, 32386, 32393, 32408, 32565], + nǚ: [31865, 37369, 38037], + 'shā chǎo': [31878], + 'kāng jīng': [31879], + fěn: [31881, 40698], + cū: [31895, 35285, 40577, 40580, 40612], + 'nián zhān': [31896], + 'cè sè': [31907], + 'zhōu yù': [31909], + 'shēn sǎn': [31937], + 'biān biǎn': [31940, 33849], + miàn: [31942, 38754, 38755, 40618, 40619, 40629, 40634], + 'hú hū hù': [31946], + 'gǔ gòu': [31955], + 'mí méi': [31964], + 'sǎn shēn': [31965, 31971], + zāo: [31967, 36455, 36973, 37289], + 'mì sī': [31992], + 'jiū jiǔ': [31994], + 'xì jì': [31995, 32363], + 'zhēng zhěng': [31997], + 'chà chǎ': [32001, 34921], + 'yuē yāo': [32004, 32422], + 'hóng gōng': [32005, 32418], + 'hé gē': [32007, 32421], + 'wén wèn': [32011, 32441], + fóu: [32017], + 'jì jié jiè': [32018], + 'pī pí bǐ': [32021, 32432], + 'jīn jìn': [32031], + 'zhā zā': [32037, 32046], + hā: [32038], + 'fū fù': [32040], + 'chōu chóu': [32044], + 'lèi léi lěi': [32047], + 'bō bì': [32052], + 'tiǎn zhěn': [32062], + 'jiōng jiǒng': [32069], + 'jié jiē': [32080, 32467, 33410], + 'guà kuā': [32083], + 'bǎi mò': [32084], + 'gēng huán': [32089], + 'jié xié': [32092], + 'quán shuān': [32095], + 'gǎi ǎi': [32096], + 'luò lào': [32097, 32476], + 'bīng bēng pēng': [32099], + 'gěi jǐ': [32102, 32473], + 'tóng tōng dòng': [32103], + 'tiào diào dào': [32105], + 'lěi lèi léi': [32107], + 'gāi hài': [32111], + 'chī zhǐ': [32122], + 'wèn miǎn mán wàn': [32123], + 'huán huàn wàn': [32132], + 'qīn xiān': [32133], + 'tì tí': [32136], + 'yán xiàn': [32150], + 'zōng zèng zòng': [32156], + 'chēn lín': [32157], + 'zhǔn zhùn': [32167], + 'qiàn qīng zhēng': [32170], + 'qìng qǐ': [32174], + 'lún guān': [32184, 32438], + 'chuò chāo': [32189, 32496], + 'tián tǎn chān': [32194], + 'lǜ lù': [32209, 32511], + 'ruǎn ruàn': [32219], + 'jí qī': [32221], + 'zhòng chóng': [32223, 37325], + 'miáo máo': [32226], + 'xiè yè': [32228], + huǎn: [32233, 32531], + 'gēng gèng': [32234, 32262], + 'tōu xū shū': [32240], + 'zōng zòng': [32245, 32332], + 'yùn gǔn': [32247], + 'guā wō': [32250], + 'yùn yūn wēn': [32252, 32277], + 'bāng bàng': [32269], + 'gǔ hú': [32270, 40379], + 'cī cuò suǒ': [32274], + 'cuī shuāi': [32279], + 'róng rǒng ròng': [32281], + 'zài zēng': [32289], + cài: [32297, 33756, 34081], + 'féng fèng': [32299], + 'suō sù': [32302, 32553], + 'yǎn yǐn': [32303, 37203], + 'zòng zǒng': [32305, 32437], + 'zhuàn juàn': [32307], + 'mò mù': [32312, 33707], + 'piǎo piāo': [32313, 32549], + 'fán pó': [32321], + 'bēng bèng': [32323], + 'móu miù miào liǎo': [32326], + 'yáo yóu zhòu': [32327], + 'zēng zèng': [32338, 32559], + 'jú jué': [32344], + 'chuō chuò': [32347], + 'zūn zǔn': [32348], + rào: [32350, 32469, 36982], + 'chǎn chán': [32351], + 'huì huí': [32354, 32523, 34289], + 'qiāo sāo zǎo': [32368], + 'jiǎo zhuó': [32371, 32564], + 'dàn tán chán': [32373], + nǒng: [32375], + 'pú fú': [32384], + 'yào lì': [32389], + 'rǎng xiāng': [32405], + 'lí sǎ xǐ lǐ': [32410], + 'xiān qiàn': [32420], + 'jīng jìng': [32463], + 'tí tì': [32488], + 'bēng běng bèng': [32503], + 'zōng zèng': [32508], + 'jī qī': [32521], + 'wēn yùn yūn': [32522], + 'fèng féng': [32541], + 'shuāi cuī suī': [32542], + 'miù móu liáo miào mù': [32554], + 'qiāo sāo': [32562], + fǒu: [32566, 32569, 32571, 38636, 40192], + 'bà ba pí': [32610, 32631], + 'guà guǎi': [32619], + 'yáng xiáng': [32650, 32655], + 'měi gāo': [32665], + 'yì xī': [32667], + 'qiǎng qiān': [32671], + 'qiāng kòng': [32683], + 'qián xián yán': [32684], + nóu: [32698], + 'hóng gòng': [32702], + 'pī bì pō': [32717], + 'qú yù': [32721], + ké: [32727], + 'qiào qiáo': [32728], + 'zhái dí': [32735], + 'dào zhōu': [32738], + 'hóu qú': [32757], + shuǎ: [32781], + 'ruǎn nuò': [32782], + 'ér nài': [32783], + 'zhuān duān': [32785], + 'pá bà': [32793], + 'chí sì': [32795], + 'qù chú': [32797], + 'lún lǔn': [32803], + 'jí jiè': [32804], + 'tāng tǎng': [32805], + pǎng: [32810, 35243], + 'zhá zé': [32811], + 'yē yé': [32822], + 'yún yíng': [32826], + 'wà tuǐ zhuó': [32841], + 'ér nǜ': [32847], + 'tiē zhé': [32849], + 'dǐ zhì': [32860], + qié: [32890], + 'nǐ jiàn': [32891], + 'lèi lē': [32907], + cào: [32911, 35161, 37173, 40732], + 'bó dí': [32913], + 'xiào xiāo': [32918], + 'dù dǔ': [32922], + chāi: [32926, 37365, 38039], + 'hán qín hàn': [32931], + 'pàng pán pàn': [32936, 32982], + 'zhūn chún': [32939], + āng: [32942, 39599], + 'yù yō': [32946], + 'pí bǐ bì': [32950], + 'fèi bì': [32967], + 'bèi bēi': [32972], + 'fèi zǐ': [32975], + 'píng pēng': [32979, 33529], + 'fū fú zhǒu': [32981], + 'shèng shēng': [32988], + kuà: [33007, 36328, 39611], + 'gǎi hǎi': [33010], + 'gē gé gā': [33011], + 'néng nài': [33021], + 'guī kuì': [33023], + 'mài mò': [33033], + 'zāng zàng': [33039], + 'jiǎo jué': [33050, 35282], + cuǒ: [33054], + 'de te': [33062], + 'zuī juān': [33063], + něi: [33070, 33095, 39186, 39297, 39870, 39896], + 'pú fǔ': [33071], + niào: [33074], + shuí: [33085], + guò: [33090, 36942, 37945], + 'là xī': [33098], + 'yān ā': [33100], + 'gāo gào': [33167], + 'lù biāo': [33172], + chuái: [33175], + 'zhuān chuán chún zhuǎn': [33182], + chuài: [33194, 36409], + 'fán pán': [33200], + 'wǔ hū': [33204], + 'shān dàn': [33211], + tún: [ + 33216, 33227, 34508, 35928, 35930, 36568, 38677, 39145, 39272, 39784, 40064, + 40663, + ], + 'bì bei': [33218], + 'là gé': [33224], + 'sào sāo': [33226], + nào: [33233, 38297, 38393, 39719], + 'ní luán': [33249], + 'qiān xián': [33252], + 'guàng jiǒng': [33254], + 'guǎng jiǒng': [33257], + 'chòu xiù': [33261], + 'mián biān': [33265], + 'dié zhí': [33271], + 'zhī jìn': [33272], + 'shè shě': [33293], + pù: [33302, 33303], + 'bān bō pán': [33324], + kuā: [33343], + 'gèn gěn': [33390], + 'sè shǎi': [33394], + 'fú bó': [33396], + 'jiāo qiú': [33405], + 'chāi chā': [33414], + 'sháo què': [33421], + 'hù xià': [33424], + 'zì zǐ': [33427], + 'huì hū': [33428], + 'tún chūn': [33434], + 'jiè gài': [33445], + 'xù zhù': [33447], + 'yuán yán': [33451], + 'xīn xìn': [33455], + 'lún huā': [33458], + 'wù hū': [33460], + 'gōu gǒu': [33462], + 'mào máo': [33468], + 'fèi fú': [33470], + 'chán yín': [33474], + qiē: [33478], + 'sū sù': [33487], + 'tiáo sháo': [33493], + 'lì jī': [33497], + 'kē hē': [33499], + 'jù qǔ': [33507], + 'ruò rě': [33509], + 'zhù níng': [33511], + 'pā bó': [33513], + xiú: [33516], + 'zhǎ zuó': [33522], + 'jū chá': [33524], + nié: [33526], + 'shēng ruí': [33532], + 'qié jiā': [33540], + 'zǐ cí': [33544], + 'qiàn xī': [33564], + chǎi: [33565], + 'fá pèi': [33591], + ráo: [33627, 34136, 35155, 39250, 39286], + 'yíng xíng': [33637], + 'qián xún': [33640, 34113], + 'yìn yīn': [33643], + 'hé hè': [33655], + 'shā suō': [33678], + 'péng fēng': [33681], + 'shēn xīn': [33688], + 'wǎn guān guǎn': [33694], + 'yóu sù': [33700], + 'shāo xiāo': [33702, 34552], + 'làng liáng': [33704], + 'piǎo fú': [33705], + 'wèn wǎn miǎn': [33708], + 'shì shí': [33715, 33940], + 'tù tú': [33717], + 'xiān liǎn': [33718, 34207], + 'wǎn yù': [33728], + 'zōu chù': [33734], + 'lù lǜ': [33737], + 'jūn jùn': [33740], + 'niè rěn': [33741], + 'zī zì zāi': [33745], + 'tú tù': [33759], + 'jiē shà': [33768], + 'qiáo zhǎo': [33772], + 'tái zhī chí': [33773], + 'fēi fěi': [33778, 34586], + 'qín qīn jīn': [33779], + 'zū jù': [33785, 33961], + 'lǐn má': [33787], + 'tián tiàn': [33790], + tiē: [33820, 36028, 36148], + 'luò là lào luō': [33853], + 'zhù zhuó zhe': [33879], + 'shèn rèn': [33882], + 'gě gé': [33883], + 'jùn suǒ': [33904], + 'kuì kuài': [33929], + 'rú ná': [33944], + 'méng mēng měng': [33945], + 'yuán huán': [33949], + 'xú shú': [33955], + 'xí xì': [33973], + 'mì míng': [33986], + 'sōu sǒu': [33987], + 'gài gě hé hài': [33995], + 'yǎo zhuó': [34004], + 'diào tiáo dí': [34023], + 'xū qiū fū': [34034], + 'zí jú': [34043], + 'liǎo lù': [34044], + xu: [34047], + 'hàn hǎn': [34058], + 'màn wàn mán': [34067], + 'pó bò': [34082], + 'fān fán bō': [34115], + 'hóng hòng': [34171], + 'yù ào': [34177, 38569], + 'xí xiào': [34178], + 'báo bó bò': [34180], + 'cí zī': [34187], + 'wàn luàn': [34189], + 'kǎo hāo': [34215], + 'yuǎn wěi': [34227], + 'zhòu chóu': [34229], + 'wō mái': [34230], + 'xiāo hào': [34243], + 'yù xù xū': [34247], + 'jiè jí': [34249], + 'diào zhuó': [34251], + 'cáng zàng': [34255], + lǎ: [34270], + 'chú zhū': [34296], + 'pín píng': [34315], + 'gān hán': [34423], + 'hóng jiàng': [34425], + 'huī huǐ': [34426], + 'xiā há': [34430], + 'mǎ mà mā': [34434], + 'fāng bàng': [34436], + 'bàng bèng': [34444], + 'jué quē': [34455], + 'qín qián': [34457], + 'gōng zhōng': [34467], + 'fǔ fù': [34469], + 'dài dé': [34478], + 'gǒu qú xù': [34492], + 'bǒ pí': [34494], + 'shé yí': [34503], + tiě: [34504, 37444, 37525, 37921, 37941, 38081, 39510], + 'gé luò': [34514], + 'máng bàng': [34518], + 'yì xǔ': [34529], + 'há gé': [34532], + 'qiè ní': [34538], + 'é yǐ': [34558], + 'zhē zhé': [34567], + 'là zhà': [34593], + suò: [34614, 36900], + 'yóu qiú': [34660], + 'xiā hā': [34662], + 'xī qī': [34695], + 'bī pí': [34709], + 'nài něng': [34714], + 'hé xiá': [34715], + 'guì huǐ': [34717], + 'mǎ mā mà': [34718], + 'shì zhē': [34731], + 'zhì dié': [34738], + 'jiàn chán': [34745], + 'ma má mò': [34758], + 'mǎng měng': [34770], + 'biē bié': [34782], + 'bēn fèi': [34790], + 'láo liáo': [34791], + 'yín xún': [34795], + 'lí lǐ': [34849], + 'xuè xiě': [34880], + 'xíng háng hàng héng': [34892], + 'shuāi cuī': [34928], + 'tuó tuō': [34953], + 'lǐng líng': [34954], + 'bào páo pào': [34956], + 'jù jiē': [34963], + 'hè kè': [34964], + 'yí yì': [34968, 36004], + 'nà jué': [34982], + 'bèi pī': [34987], + 'chǐ nuǒ': [34994], + 'chǐ qǐ duǒ nuǒ': [34995], + 'jiá qiā jié': [34999], + 'bó mò': [35001], + 'guī guà': [35007], + 'liè liě': [35010], + 'chéng chěng': [35022], + 'jiē gé': [35027], + 'dāo chóu': [35055], + 'shang cháng': [35059], + 'yuān gǔn': [35063], + 'yǎn ān': [35066], + 'tì xī': [35068], + 'fù fú': [35092], + 'chǔ zhǔ': [35098], + 'tuì tùn': [35114], + lǎi: [35184], + 'yào yāo': [35201], + 'qín tán': [35203], + 'jiàn xiàn': [35211, 35265], + piǎn: [35217, 35550, 35869, 36021], + 'piē miè': [35221], + 'yíng yǐng': [35246], + 'qù qū': [35248, 35255, 35281], + 'jiàn biǎn': [35253], + 'luó luǎn': [35254], + 'zī zuǐ': [35292], + 'huà xiè': [35295], + 'jiě jiè xiè': [35299, 35303], + 'xué hù': [35319], + 'lì lù': [35323], + tǎo: [35342, 35752], + zhùn: [35376], + 'zī zǐ': [35390], + 'yí dài': [35410, 35794], + xiòng: [35415, 35783], + 'diào tiǎo': [35458], + 'yí chǐ chì': [35459], + 'lǎng làng': [35471], + 'ēi éi ěi èi xī': [35474, 35830], + shuà: [35484], + 'yǔ yù': [35486, 35821, 38632], + 'shuō shuì yuè': [35498, 35828], + 'shuí shéi': [35504, 35841], + 'qū juè': [35507], + 'chī lài': [35514], + 'nì ná': [35517], + 'diào tiáo': [35519], + 'pǐ bēi': [35520], + 'jì jī': [35525], + 'zé zuò zhǎ cuò': [35534], + 'chù jí': [35540], + 'háo xià': [35541], + 'lùn lún': [35542, 35770], + 'shì dì': [35551], + 'huà guā': [35555], + 'xǐ shāi āi': [35568], + 'nán nàn': [35573, 38627], + miù: [35628, 35884], + zèn: [35670, 35886], + 'shí zhì': [35672, 35782], + 'juàn xuān': [35714], + 'yí tuī': [35721], + zhán: [35741], + 'xǔ hǔ': [35768], + 'xiáng yáng': [35814], + 'tiáo diào zhōu': [35843], + 'chén shèn': [35852], + 'mí mèi': [35868], + 'màn mán': [35881], + 'gǔ yù': [35895], + 'huō huò huá': [35905], + 'zhì zhài': [35960], + 'huān huán': [35974], + 'kěn kūn': [35975], + 'mò hé': [35976], + 'mò hé háo': [35977], + 'jù lóu': [35991], + 'zé zhài': [36012, 36131], + 'dài tè': [36024], + 'bì bēn': [36033], + 'jiǎ gǔ jià': [36040], + 'xiōng mín': [36079], + càng: [36086], + 'zhuàn zuàn': [36090, 36186], + 'wàn zhuàn': [36099], + 'gàn gòng zhuàng': [36123], + 'yuán yùn': [36128], + 'bēn bì': [36146], + 'jiǎ gǔ': [36158], + zǒu: [36208, 36209, 39888], + 'dié tú': [36227], + 'jū qiè': [36228], + 'qū cù': [36235, 36264], + 'jí jié': [36236], + 'guā huó': [36239], + 'què qì jí': [36254], + 'tàng tāng': [36255], + 'chuō zhuó': [36256], + 'qù cù': [36259], + 'yuè tì': [36271], + 'bō bào': [36277], + 'kuà wù': [36278], + 'guì jué': [36281], + 'fāng fàng páng': [36285], + 'páo bà': [36289], + 'qí qǐ': [36290], + 'jiàn chén': [36296], + 'pǎo páo': [36305], + 'diǎn diē tiē': [36309], + 'jū jù qiè': [36313], + bǒ: [36315], + 'luò lì': [36318], + 'dài duò duō chí': [36322], + zhuǎi: [36329], + 'bèng pián': [36336], + 'tiào táo': [36339], + 'shū chōu': [36350], + 'liàng liáng': [36361], + 'tà tā': [36367], + chǎ: [36421, 37972, 38258], + 'dí zhí': [36450], + 'dēng dèng': [36460, 37913, 38251], + cèng: [36461], + 'dūn cún': [36466], + 'juě jué': [36470], + liāo: [36477], + 'xiè sǎ': [36512], + tǐ: [36528, 36550, 39605], + 'yà zhá gá': [36555], + 'xìn xiàn': [36560], + 'fàn guǐ': [36563], + 'zhuàn zhuǎn': [36578], + 'zhóu zhòu': [36600, 36724], + bú: [36688, 37293, 40170], + 'zhuǎn zhuàn zhuǎi': [36716], + 'zǎi zài': [36733], + 'niǎn zhǎn': [36759], + 'biān bian': [36793], + 'dào biān': [36794], + 'yǐ yí': [36806, 36836, 36849], + 'guò guo guō': [36807], + 'wàng kuāng': [36811], + 'hái huán': [36824], + 'zhè zhèi': [36825], + 'yuǎn yuàn': [36828], + 'zhì lì': [36835], + 'zhù wǎng': [36844], + 'zhuī duī': [36861], + 'shì kuò': [36866], + tòu: [36879], + 'tōng tòng': [36890], + guàng: [36891], + 'dǎi dài': [36910], + 'suì suí': [36930], + 'tí dì': [36934], + 'yí wèi': [36951], + 'shì dí zhé': [36969], + cà: [36970], + 'huán hái': [36996], + 'lí chí': [37004], + 'kàng háng': [37023], + 'nà nèi nā': [37027], + 'xié yá yé yú xú': [37034], + 'gāi hái': [37058], + 'huán xún': [37063], + 'chī xī': [37079], + hǎo: [37085], + 'lì zhí': [37094], + 'xiáo ǎo': [37097], + 'dōu dū': [37117], + liǎo: [26338, 37149, 38269], + 'zàn cuán cuó': [37186, 37191], + 'dīng dǐng': [37194], + 'cù zuò': [37218], + 'fā pō': [37222], + 'shāi shī': [37246], + niàng: [37247, 37304], + 'qiú chōu': [37268], + 'pō fā': [37271, 37297], + 'chǎn chěn': [37286], + 'yàn liǎn xiān': [37302], + 'niàng niáng': [37312], + 'lǐ li': [37324], + 'lí xǐ xī': [37328], + 'liǎo liào': [37333], + 'dīng dìng': [37336, 38025], + 'qiǎo jiǎo': [37349], + 'yú huá': [37354], + 'huá wū': [37355], + 'rì rèn jiàn': [37360, 37372], + 'dì dài': [37361], + 'pī zhāo': [37373], + 'yá yé': [37374], + 'bǎ pá': [37376, 38063], + 'tā tuó': [37448, 38090], + běi: [37491], + 'bǐng píng': [37500], + 'hā kē': [37503, 38122], + chòng: [37507, 38131], + 'xiǎng jiōng': [37508], + 'yù sì': [37513], + 'xù huì': [37514], + 'rén rěn': [37515], + 'shàn shuò': [37519], + 'chì lì': [37520], + 'xiǎn xǐ': [37521, 38115], + 'hóu xiàng': [37527], + 'diào tiáo yáo': [37530], + 'xiān kuò tiǎn guā': [37531, 37565, 38118], + 'zhé niè': [37560], + 'zhōng yōng': [37567], + 'tōu tù dòu': [37568], + 'méi méng': [37570], + 'wàn jiǎn': [37572, 37803], + 'tǐng dìng': [37580, 38116], + 'juān jiān cuān': [37585], + 'sī tuó': [37590], + 'juān xuān juàn': [37591], + 'wú huá wū': [37592], + 'zhuó chuò': [37596], + 'xíng xìng jīng': [37598], + 'jū jú': [37606, 38164], + 'zuì niè': [37623], + 'yuān yuǎn wǎn wān': [37626], + 'gāng gàng': [37628, 38050], + zhuī: [37648, 38181, 39429, 39571, 40315], + ā: [37650, 38165], + 'cuō chā': [37768], + 'suǒ sè': [37773], + 'yáo zú': [37776], + 'yè tà gé': [37777], + 'qiāng chēng': [37783], + 'gé lì': [37784, 38217, 39730], + 'bī pī bì': [37790], + 'gǎo hào': [37804], + 'zú chuò': [37827], + 'xiū xiù': [37829], + 'shòu sōu': [37833], + 'dí dī': [37841, 38237], + 'qiāo sǎn càn': [37842], + 'lù áo': [37845], + 'tāng táng': [37852], + 'jiàn zàn': [37865], + 'huì suì ruì': [37880], + 'qiǎng qiāng': [37881, 38250], + 'sǎn xiàn sà': [37886], + 'jiǎn jiàn': [37927, 38159], + 'dāng chēng': [37946, 38107], + 'zuān zuàn': [38013], + 'sà xì': [38033], + 'yào yuè': [38053], + 'tǒu dǒu': [38061], + 'zuàn zuān': [38075], + 'qiān yán': [38085], + 'pí pī': [38093], + 'yáo diào tiáo': [38123], + 'tāng tàng': [38132], + 'pù pū': [38138], + 'tán xiān': [38188], + 'liù liú': [38223], + 'hào gǎo': [38224], + 'táng tāng': [38231], + 'tán chán xín': [38241], + 'huò shǎn': [38276], + 'hàn bì': [38280, 38380], + 'kāng kàng': [38284, 38390], + 'xián jiàn jiān jiǎn': [38290], + 'xiā xiǎ': [38293], + 'xiǎ kě': [38300], + 'biàn guān': [38302], + 'hé gé': [38308, 39052], + 'hòng xiàng': [38311], + 'sē xī': [38314], + 'tíng tǐng': [38318], + 'è yān': [38332, 38415], + 'hòng juǎn xiàng': [38338], + 'bǎn pàn': [38342], + 'dū shé': [38349, 38407], + 'què quē': [38357], + 'tāng táng chāng': [38363], + 'kàn hǎn': [38366, 38426], + 'xì sè tà': [38367], + 'mēn mèn': [38391], + 'quē què': [38425], + 'yán diàn': [38461], + 'ā ē': [38463], + 'bēi pō pí': [38466], + 'yàn yǎn': [38529], + 'yú yáo shù': [38531], + 'lóng lōng': [38534], + 'duì zhuì': [38538], + 'suí duò': [38539], + 'gāi qí ái': [38545], + 'huī duò': [38547, 38579], + 'wěi kuí': [38551], + 'lì dài': [38584], + 'zhuī cuī wéi': [38585], + 'hè hú': [38586, 40366], + 'jùn juàn': [38589, 38603], + 'nán nàn nuó': [38590], + 'què qiāo qiǎo': [38592], + 'guàn huán': [38618], + 'guī xī': [38623], + 'sè xí': [38637], + án: [38648], + 'wù méng': [38650], + tèng: [38703], + 'lù lòu': [38706], + mái: [38718], + 'jìng liàng': [38746], + 'gé jí': [38761], + bǎ: [38774], + 'yāng yàng': [38789], + 'gé tà sǎ': [38792], + 'biān yìng': [38805], + 'qiào shāo': [38808], + 'juān xuān': [38809], + 'shàng zhǎng': [38813], + 'pí bǐng bì bēi': [38814], + la: [38817], + 'xiè dié': [38818], + ēng: [38821], + 'móu mù': [38826], + 'bì bǐng': [38840], + 'mèi wà': [38862], + rǒu: [38870], + 'shè xiè': [38872], + 'yùn wēn': [38891], + 'dùn dú': [38931, 39039], + duǐ: [38951], + luō: [38961], + 'bīn pín': [38971], + yóng: [38994, 39065, 39979], + mān: [39010, 39071], + 'jǐng gěng': [39048], + 'jié xié jiá': [39049], + 'kē ké': [39055], + 'pín bīn': [39057], + 'chàn zhàn': [39076], + 'fēng fěng': [39080, 39118], + 'biāo diū': [39081], + 'bá fú': [39088], + 'sāo sōu': [39102], + 'liù liáo': [39106], + 'shí sì yì': [39135], + 'yǎng juàn': [39148], + 'zhù tǒu': [39155], + 'yí sì': [39156], + 'zuò zé zhā': [39157], + tiè: [39163, 39214], + 'xiǎng náng': [39263], + 'táng xíng': [39271], + 'gē le': [39289], + 'chā zha': [39303], + 'náng nǎng': [39317], + 'yūn wò': [39335], + 'zhī shì': [39350], + 'xìn jìn': [39352], + 'kuài jué': [39363], + zǎng: [39380, 39541], + 'tái dài': [39384], + 'xún xuān': [39400], + 'liáng láng': [39418], + piàn: [39447, 39449, 39575, 39800], + 'dài tái': [39552], + 'sāo sǎo': [39578], + 'gǔ gū': [39592], + 'bèi mó': [39603], + 'xiāo qiāo': [39609], + 'bǎng pǎng': [39624], + 'bó jué': [39625], + 'bì pǒ': [39666], + 'máo méng': [39667], + 'kuò yuè': [39674], + 'bā bà': [39774, 40067], + 'jì cǐ': [39814], + 'bó bà': [39818], + 'zhǎ zhà': [39827, 40074], + 'chóu dài': [39832], + 'luò gé': [39845], + 'guī xié wā kuí': [39853], + 'xiān xiǎn': [39854, 40092], + 'pū bū': [39878], + 'yì sī': [39907], + 'bà bó': [40076], + 'guī xié': [40081], + 'sāi xǐ': [40131], + 'niǎo diǎo': [40165], + 'diāo zhāo': [40173], + 'gān hàn yàn': [40177], + 'fū guī': [40186], + 'jiān qiān zhān': [40189], + 'hé jiè': [40353], + 'piān biǎn': [40355], + 'chuàn zhì': [40360], + 'cāng qiāng': [40364], + 'sǔn xùn': [40381], + 'biāo páo': [40579], + 'zhù cū': [40582], + 'jūn qún': [40583, 40597], + chi: [40630], + 'mó me': [40636], + 'mó me ma': [40637], + 'mí mǒ': [40639], + 'dàn shèn': [40686], + 'zhěn yān': [40688], + 'dǎn zhǎn': [40693], + 'miǎn mǐn měng': [40702], + hōu: [40769], + nàng: [40777], + 'qí jì zī zhāi': [40784], + 'yín kěn yǎn': [40834], + 'yín kěn': [40840], + 'gōng wò': [40847], + 'guī jūn qiū': [40860, 40863], +}; +const DICT1 = []; +Object.keys(map).forEach((key) => { + const codes = map[key]; + for (let code of codes) { + DICT1[code] = key; + } +}); + +const DICT2 = { + 一个: 'yí gè', + 这个: 'zhè ge', + 不是: 'bú shì', + 成为: 'chéng wéi', + 认为: 'rèn wéi', + 作为: 'zuò wéi', + 部分: 'bù fèn', + 要求: 'yāo qiú', + 应该: 'yīng gāi', + 增长: 'zēng zhǎng', + 不会: 'bú huì', + 提供: 'tí gōng', + 那些: 'nèi xiē', + 觉得: 'jué de', + 任务: 'rèn wu', + 那个: 'nà ge', + 称为: 'chēng wéi', + 为主: 'wéi zhǔ', + 了解: 'liǎo jiě', + 处理: 'chǔ lǐ', + 皇上: 'huáng shang', + 只要: 'zhǐ yào', + 大量: 'dà liàng', + 力量: 'lì liàng', + 几乎: 'jī hū', + 干部: 'gàn bù', + 目的: 'mù dì', + 行为: 'xíng wéi', + 只见: 'zhǐ jiàn', + 认识: 'rèn shi', + 市长: 'shì zhǎng', + 师父: 'shī fu', + 调查: 'diào chá', + 重新: 'chóng xīn', + 分为: 'fēn wéi', + 知识: 'zhī shi', + 导弹: 'dǎo dàn', + 行业: 'háng yè', + 质量: 'zhì liàng', + 银行: 'yín háng', + 参与: 'cān yù', + 充分: 'chōng fèn', + 尽管: 'jǐn guǎn', + 生长: 'shēng zhǎng', + 数量: 'shù liàng', + 应当: 'yīng dāng', + 院长: 'yuàn zhǎng', + 强调: 'qiáng diào', + 只能: 'zhǐ néng', + 音乐: 'yīn yuè', + 以为: 'yǐ wéi', + 处于: 'chǔ yú', + 分子: 'fèn zǐ', + 晚上: 'wǎn shang', + 部长: 'bù zhǎng', + 蒙古: 'měng gǔ', + 只有: 'zhǐ yǒu', + 适当: 'shì dàng', + 只好: 'zhǐ hǎo', + 成长: 'chéng zhǎng', + 高兴: 'gāo xìng', + 不了: 'bù liǎo', + 产量: 'chǎn liàng', + 胖子: 'pàng zi', + 显得: 'xiǎn de', + 只是: 'zhǐ shì', + 似的: 'shì de', + 率领: 'shuài lǐng', + 改为: 'gǎi wéi', + 不禁: 'bù jīn', + 成分: 'chéng fèn', + 答应: 'dā yìng', + 少年: 'shào nián', + 兴趣: 'xìng qù', + 太监: 'tài jiàn', + 休息: 'xiū xi', + 校长: 'xiào zhǎng', + 更新: 'gēng xīn', + 合同: 'hé tong', + 喝道: 'hè dào', + 重庆: 'chóng qìng', + 重建: 'chóng jiàn', + 使得: 'shǐ de', + 审查: 'shěn zhā', + 累计: 'lěi jì', + 给予: 'jǐ yǔ', + 上去: 'shǎng qù', + 行情: 'háng qíng', + 极为: 'jí wéi', + 冠军: 'guàn jūn', + 仿佛: 'fǎng fú', + 头发: 'tóu fa', + 投降: 'tóu xiáng', + 家长: 'jiā zhǎng', + 仔细: 'zǐ xì', + 要是: 'yào shi', + 将领: 'jiàng lǐng', + 含量: 'hán liàng', + 更为: 'gèng wéi', + 只得: 'zhǐ de', + 哪些: 'něi xiē', + 积累: 'jī lěi', + 地处: 'dì chǔ', + 县长: 'xiàn zhǎng', + 少女: 'shào nǚ', + 路上: 'lù shang', + 只怕: 'zhǐ pà', + 能量: 'néng liàng', + 一度: 'yí dù', + 储量: 'chǔ liàng', + 供应: 'gōng yìng', + 挑战: 'tiǎo zhàn', + 西藏: 'xī zàng', + 记得: 'jì de', + 影片: 'yǐng piān', + 总量: 'zǒng liàng', + 当真: 'dàng zhēn', + 将士: 'jiàng shì', + 差别: 'chā bié', + 较为: 'jiào wéi', + 一处: 'yī chǔ', + 照片: 'zhào piān', + 长老: 'zhǎng lǎo', + 大夫: 'dài fū', + 差异: 'chā yì', + 懂得: 'dǒng de', + 尽量: 'jǐn liàng', + 模样: 'mú yàng', + 的确: 'dí què', + 鱼肚: 'yú dǔ', + 为首: 'wéi shǒu', + 便宜: 'pián yí', + 更名: 'gēng míng', + 石头: 'shí tou', + 州长: 'zhōu zhǎng', + 为止: 'wéi zhǐ', + 漂亮: 'piào liàng', + 炮弹: 'pào dàn', + 藏族: 'zàng zú', + 哪个: 'něi gè', + 角色: 'jué sè', + 当作: 'dàng zuò', + 尽快: 'jǐn kuài', + 人为: 'rén wéi', + 重复: 'chóng fù', + 胡同: 'hú tòng', + 差距: 'chā jù', + 弟兄: 'dì xiong', + 大将: 'dà jiàng', + 肚子: 'dǔ zi', + 睡觉: 'shuì jiào', + 团长: 'tuán zhǎng', + 队长: 'duì zhǎng', + 区长: 'qū zhǎng', + 难得: 'nán de', + 丫头: 'yā tou', + 打听: 'dǎ ting', + 会长: 'huì zhǎng', + 弟弟: 'dì di', + 王爷: 'wáng ye', + 当天: 'dàng tiān', + 重量: 'zhòng liàng', + 誉为: 'yù wéi', + 家伙: 'jiā huo', + 华山: 'huà shān', + 椅子: 'yǐ zi', + 流量: 'liú liàng', + 长大: 'zhǎng dà', + 勉强: 'miǎn qiǎng', + 会计: 'kuài jì', + 分散: 'fēn sǎn', + 过分: 'guò fèn', + 济南: 'jǐ nán', + 调动: 'diào dòng', + 燕京: 'yān jīng', + 少将: 'shào jiàng', + 中毒: 'zhòng dú', + 晓得: 'xiǎo de', + 变更: 'biàn gēng', + 认得: 'rèn de', + 苹果: 'pín guǒ', + 念头: 'niàn tou', + 挣扎: 'zhēng zhá', + 三藏: 'sān zàng', + 剥削: 'bō xuē', + 丞相: 'chéng xiàng', + 少量: 'shǎo liàng', + 寻思: 'xín sī', + 夺得: 'duó de', + 干线: 'gàn xiàn', + 呼吁: 'hū yù', + 戏曲: 'xì qǔ', + 处罚: 'chǔ fá', + 长官: 'zhǎng guān', + 见长: 'jiàn zhǎng', + 柏林: 'bó lín', + 亲戚: 'qīn qi', + 身分: 'shēn fèn', + 胳膊: 'gē bo', + 着手: 'zhuó shǒu', + 炸弹: 'zhà dàn', + 咳嗽: 'ké sou', + 西边: 'xī bian', + 赢得: 'yíng de', + 叶子: 'yè zi', + 外长: 'wài zhǎng', + 供给: 'gōng jǐ', + 师长: 'shī zhǎng', + 变量: 'biàn liàng', + 应有: 'yīng yǒu', + 下载: 'xià zài', + 乐器: 'yuè qì', + 间接: 'jiàn jiē', + 底下: 'dǐ xia', + 打扮: 'dǎ ban', + 子弹: 'zǐ dàn', + 弹药: 'dàn yào', + 热量: 'rè liàng', + 削弱: 'xuē ruò', + 骨干: 'gǔ gàn', + 容量: 'róng liàng', + 模糊: 'mó hu', + 转动: 'zhuàn dòng', + 落下: 'là xià', + 称呼: 'chēng hu', + 科长: 'kē zhǎng', + 处置: 'chǔ zhì', + 歌曲: 'gē qǔ', + 着重: 'zhuó zhòng', + 着急: 'zháo jí', + 强迫: 'qiǎng pò', + 庭长: 'tíng zhǎng', + 首相: 'shǒu xiàng', + 喇嘛: 'lǎ ma', + 镇长: 'zhèn zhǎng', + 只管: 'zhǐ guǎn', + 重重: 'chóng chóng', + 免得: 'miǎn de', + 灾难: 'zāi nàn', + 着实: 'zhuó shí', + 所得: 'suǒ de', + 度假: 'dù jià', + 真相: 'zhēn xiàng', + 相貌: 'xiàng mào', + 处分: 'chǔ fèn', + 干预: 'gàn yù', + 委屈: 'wěi qu', + 为期: 'wéi qī', + 伯伯: 'bó bo', + 圈子: 'quān zi', + 见识: 'jiàn shi', + 笼罩: 'lǒng zhào', + 外边: 'wài bian', + 与会: 'yù huì', + 都督: 'dū du', + 宰相: 'zǎi xiàng', + 较量: 'jiào liàng', + 对称: 'duì chèn', + 总长: 'zǒng zhǎng', + 相公: 'xiàng gong', + 空白: 'kòng bái', + 大王: 'dài wáng', + 打量: 'dǎ liang', + 水分: 'shuǐ fèn', + 舌头: 'shé tou', + 没收: 'mò shōu', + 行李: 'xíng li', + 判处: 'pàn chǔ', + 散文: 'sǎn wén', + 处境: 'chǔ jìng', + 孙子: 'sūn zi', + 拳头: 'quán tou', + 打发: 'dǎ fa', + 组长: 'zǔ zhǎng', + 骨头: 'gú tou', + 宁可: 'nìng kě', + 更换: 'gēng huàn', + 薄弱: 'bó ruò', + 还原: 'huán yuán', + 重修: 'chóng xiū', + 东边: 'dōng bian', + 同行: 'tóng háng', + 只顾: 'zhǐ gù', + 爱好: 'ài hào', + 馒头: 'mán tou', + 军长: 'jūn zhǎng', + 散发: 'sàn fà', + 首长: 'shǒu zhǎng', + 厂长: 'chǎng zhǎng', + 司长: 'sī zhǎng', + 长子: 'zhǎng zǐ', + 强劲: 'qiáng jìng', + 恰当: 'qià dàng', + 头儿: 'tou er', + 站长: 'zhàn zhǎng', + 折腾: 'zhē teng', + 相处: 'xiāng chǔ', + 统率: 'tǒng shuài', + 中将: 'zhōng jiàng', + 命中: 'mìng zhòng', + 名将: 'míng jiàng', + 左边: 'zuǒ bian', + 木头: 'mù tou', + 动弹: 'dòng dàn', + 地壳: 'dì qiào', + 干活: 'gàn huó', + 少爷: 'shào ye', + 难民: 'nàn mín', + 水量: 'shuǐ liàng', + 补给: 'bǔ jǐ', + 尾巴: 'wěi ba', + 来得: 'lái de', + 好奇: 'hào qí', + 钥匙: 'yào shi', + 当做: 'dàng zuò', + 沉着: 'chén zhuó', + 哑巴: 'yǎ ba', + 车子: 'chē zi', + 上将: 'shàng jiàng', + 恶心: 'ě xin', + 不对: 'bú duì', + 担子: 'dàn zi', + 应届: 'yīng jiè', + 行列: 'háng liè', + 主角: 'zhǔ jué', + 运转: 'yùn zhuàn', + 兄长: 'xiōng zhǎng', + 格式: 'gé shi', + 正月: 'zhēng yuè', + 营长: 'yíng zhǎng', + 当成: 'dàng chéng', + 右边: 'yòu bian', + 女婿: 'nǚ xu', + 咽喉: 'yān hóu', + 当晚: 'dàng wǎn', + 重阳: 'chóng yáng', + 化为: 'huà wéi', + 双重: 'shuāng chóng', + 吐蕃: 'tǔ bō', + 钻进: 'zuān jìn', + 乐队: 'yuè duì', + 不当: 'bù dàng', + 亮相: 'liàng xiàng', + 被子: 'bèi zi', + 舍得: 'shě de', + 杉木: 'shā mù', + 击中: 'jī zhòng', + 里边: 'lǐ bian', + 排长: 'pái zhǎng', + 假期: 'jià qī', + 分量: 'fèn liàng', + 数次: 'shuò cì', + 提防: 'dī fáng', + 吆喝: 'yāo he', + 查处: 'chá chǔ', + 量子: 'liàng zǐ', + 里头: 'lǐ tou', + 两行: 'liǎng háng', + 调研: 'diào yán', + 伺候: 'cì hou', + 重申: 'chóng shēn', + 枕头: 'zhěn tou', + 拚命: 'pàn mìng', + 社长: 'shè zhǎng', + 苦难: 'kǔ nàn', + 归还: 'guī huán', + 危难: 'wēi nàn', + 批量: 'pī liàng', + 畜牧: 'xù mù', + 点着: 'diǎn zháo', + 甚为: 'shèn wéi', + 小将: 'xiǎo jiàng', + 着眼: 'zhuó yǎn', + 处死: 'chǔ sǐ', + 厌恶: 'yàn wù', + 鼓乐: 'gǔ yuè', + 树干: 'shù gàn', + 秘鲁: 'bì lǔ', + 大方: 'dà fang', + 外头: 'wài tou', + 班长: 'bān zhǎng', + 星宿: 'xīng xiù', + 宁愿: 'nìng yuàn', + 钦差: 'qīn chāi', + 为数: 'wéi shù', + 勾当: 'gòu dàng', + 削减: 'xuē jiǎn', + 一发: 'yī fà', + 间谍: 'jiàn dié', + 埋怨: 'mán yuàn', + 结实: 'jiē shi', + 计量: 'jì liàng', + 淹没: 'yān mò', + 村长: 'cūn zhǎng', + 连长: 'lián zhǎng', + 自给: 'zì jǐ', + 下边: 'xià bian', + 武将: 'wǔ jiàng', + 温差: 'wēn chā', + 直奔: 'zhí bèn', + 供求: 'gōng qiú', + 剂量: 'jì liàng', + 道长: 'dào zhǎng', + 泄露: 'xiè lòu', + 王八: 'wáng ba', + 切割: 'qiē gē', + 间隔: 'jiàn gé', + 一晃: 'yī huǎng', + 长假: 'cháng jià', + 令狐: 'líng hú', + 为害: 'wéi hài', + 句子: 'jù zi', + 偿还: 'cháng huán', + 疙瘩: 'gē dā', + 燕山: 'yān shān', + 堵塞: 'dǔ sè', + 夺冠: 'duó guàn', + 下调: 'xià diào', + 扎实: 'zhā shi', + 电荷: 'diàn hè', + 看守: 'kān shǒu', + 复辟: 'fù bì', + 郁闷: 'yù mèn', + 尽早: 'jǐn zǎo', + 切断: 'qiē duàn', + 指头: 'zhǐ tou', + 为生: 'wéi shēng', + 畜生: 'chù sheng', + 切除: 'qiē chú', + 着力: 'zhuó lì', + 着想: 'zhuó xiǎng', + 级差: 'jí chā', + 投奔: 'tóu bèn', + 棍子: 'gùn zi', + 含糊: 'hán hu', + 少妇: 'shào fù', + 兴致: 'xìng zhì', + 纳闷: 'nà mèn', + 干流: 'gàn liú', + 卷起: 'juǎn qǐ', + 扇子: 'shàn zi', + 更改: 'gēng gǎi', + 笼络: 'lǒng luò', + 喇叭: 'lǎ ba', + 载荷: 'zài hè', + 妥当: 'tuǒ dàng', + 为难: 'wéi nán', + 着陆: 'zhuó lù', + 燕子: 'yàn zi', + 干吗: 'gàn má', + 白发: 'bái fà', + 总得: 'zǒng děi', + 夹击: 'jiā jī', + 曝光: 'bào guāng', + 曲调: 'qǔ diào', + 相机: 'xiàng jī', + 叫化: 'jiào huā', + 角逐: 'jué zhú', + 啊哟: 'ā yō', + 载重: 'zài zhòng', + 长辈: 'zhǎng bèi', + 出差: 'chū chāi', + 垛口: 'duǒ kǒu', + 撇开: 'piē kāi', + 厅长: 'tīng zhǎng', + 组分: 'zǔ fèn', + 误差: 'wù chā', + 家当: 'jiā dàng', + 传记: 'zhuàn jì', + 个子: 'gè zi', + 铺设: 'pū shè', + 干事: 'gàn shì', + 杆菌: 'gǎn jūn', + 五更: 'wǔ gēng', + 定量: 'dìng liàng', + 运载: 'yùn zài', + 会儿: 'huì er', + 酋长: 'qiú zhǎng', + 重返: 'chóng fǎn', + 差额: 'chā é', + 露面: 'lòu miàn', + 钻研: 'zuān yán', + 大城: 'dài chéng', + 上当: 'shàng dàng', + 销量: 'xiāo liàng', + 洋行: 'yáng háng', + 作坊: 'zuō fang', + 照相: 'zhào xiàng', + 哎呀: 'āi yā', + 调集: 'diào jí', + 看中: 'kàn zhòng', + 议长: 'yì zhǎng', + 风筝: 'fēng zheng', + 一应: 'yī yīng', + 辟邪: 'bì xié', + 空隙: 'kòng xì', + 更迭: 'gēng dié', + 偏差: 'piān chā', + 声调: 'shēng diào', + 农行: 'nóng háng', + 适量: 'shì liàng', + 屯子: 'tún zi', + 搜查: 'sōu zhā', + 无量: 'wú liàng', + 空地: 'kòng dì', + 调度: 'diào dù', + 一曲: 'yī qǔ', + 散射: 'sǎn shè', + 太行: 'tài háng', + 创伤: 'chuāng shāng', + 海参: 'hǎi shēn', + 满载: 'mǎn zài', + 重叠: 'chóng dié', + 落差: 'luò chā', + 单调: 'dān diào', + 老将: 'lǎo jiàng', + 人参: 'rén shēn', + 间断: 'jiàn duàn', + 重现: 'chóng xiàn', + 夹杂: 'jiā zá', + 调用: 'diào yòng', + 萝卜: 'luó bo', + 附着: 'fù zhuó', + 应声: 'yīng shēng', + 主将: 'zhǔ jiàng', + 罪过: 'zuì guo', + 咀嚼: 'jǔ jué', + 为政: 'wéi zhèng', + 过量: 'guò liàng', + 乐曲: 'yuè qǔ', + 负荷: 'fù hè', + 枪弹: 'qiāng dàn', + 悄然: 'qiǎo rán', + 处方: 'chǔ fāng', + 悄声: 'qiǎo shēng', + 曲子: 'qǔ zi', + 情调: 'qíng diào', + 一着: 'yī zhāo', + 挑衅: 'tiǎo xìn', + 代为: 'dài wéi', + 了结: 'liǎo jié', + 打中: 'dǎ zhòng', + 酒吧: 'jiǔ bā', + 作曲: 'zuò qǔ', + 懒得: 'lǎn de', + 增量: 'zēng liàng', + 衣着: 'yī zhuó', + 部将: 'bù jiàng', + 要塞: 'yào sài', + 茶几: 'chá jī', + 杠杆: 'gàng gǎn', + 出没: 'chū mò', + 鲜有: 'xiǎn yǒu', + 间隙: 'jiàn xì', + 重担: 'zhòng dàn', + 重演: 'chóng yǎn', + 应酬: 'yìng chou', + 只当: 'zhǐ dāng', + 毋宁: 'wú nìng', + 包扎: 'bāo zā', + 前头: 'qián tou', + 卷烟: 'juǎn yān', + 非得: 'fēi děi', + 弹道: 'dàn dào', + 上调: 'shàng diào', + 杆子: 'gān zi', + 门将: 'mén jiàng', + 后头: 'hòu tou', + 标识: 'biāo zhì', + 喝彩: 'hè cǎi', + 暖和: 'nuǎn huo', + 更深: 'gēng shēn', + 累积: 'lěi jī', + 引得: 'yǐn de', + 调遣: 'diào qiǎn', + 倔强: 'jué jiàng', + 宝藏: 'bǎo zàng', + 丧事: 'sāng shì', + 约莫: 'yuē mo', + 纤夫: 'qiàn fū', + 更替: 'gēng tì', + 装载: 'zhuāng zài', + 背包: 'bēi bāo', + 帖子: 'tiě zi', + 松散: 'sōng sǎn', + 支行: 'zhī háng', + 呼喝: 'hū hè', + 可恶: 'kě wù', + 自转: 'zì zhuàn', + 供电: 'gōng diàn', + 反省: 'fǎn xǐng', + 坦率: 'tǎn shuài', + 苏打: 'sū dá', + 本分: 'běn fèn', + 落得: 'luò de', + 鄙薄: 'bǐ bó', + 相间: 'xiāng jiàn', + 单薄: 'dān bó', + 混蛋: 'hún dàn', + 发难: 'fā nàn', + 贞观: 'zhēn guàn', + 附和: 'fù hè', + 能耐: 'néng nai', + 吓唬: 'xià hu', + 未了: 'wèi liǎo', + 引着: 'yǐn zháo', + 抽调: 'chōu diào', + 沙子: 'shā zi', + 席卷: 'xí juǎn', + 标的: 'biāo dì', + 别扭: 'biè niu', + 思量: 'sī liang', + 喝采: 'hè cǎi', + 论语: 'lún yǔ', + 盖子: 'gài zi', + 曲艺: 'qǔ yì', + 分外: 'fèn wài', + 弄堂: 'lòng táng', + 乐舞: 'yuè wǔ', + 雨量: 'yǔ liàng', + 毛发: 'máo fà', + 差遣: 'chāi qiǎn', + 曲目: 'qǔ mù', + 背负: 'bēi fù', + 转速: 'zhuàn sù', + 声乐: 'shēng yuè', + 夹攻: 'jiā gōng', + 供水: 'gōng shuǐ', + 主干: 'zhǔ gàn', + 逃难: 'táo nàn', + 惩处: 'chéng chǔ', + 长相: 'zhǎng xiàng', + 公差: 'gōng chāi', + 行当: 'háng dang', + 榴弹: 'liú dàn', + 省得: 'shěng de', + 条子: 'tiáo zi', + 重围: 'chóng wéi', + 阻塞: 'zǔ sè', + 劲风: 'jìng fēng', + 纠葛: 'jiū gé', + 颠簸: 'diān bǒ', + 点中: 'diǎn zhòng', + 避难: 'bì nàn', + 重创: 'zhòng chuāng', + 姥姥: 'lǎo lao', + 迷糊: 'mí hu', + 公家: 'gōng jia', + 几率: 'jī lǜ', + 苦闷: 'kǔ mèn', + 度量: 'dù liàng', + 差错: 'chā cuò', + 暑假: 'shǔ jià', + 参差: 'cēn cī', + 搭载: 'dā zài', + 助长: 'zhù zhǎng', + 相称: 'xiāng chèn', + 红晕: 'hóng yùn', + 舍命: 'shě mìng', + 喜好: 'xǐ hào', + 列传: 'liè zhuàn', + 劲敌: 'jìng dí', + 蛤蟆: 'há má', + 三重: 'sān chóng', + 请假: 'qǐng jià', + 钉子: 'dīng zi', + 沉没: 'chén mò', + 高丽: 'gāo lí', + 休假: 'xiū jià', + 无为: 'wú wéi', + 巴结: 'bā jì', + 了得: 'liǎo de', + 变相: 'biàn xiàng', + 核弹: 'hé dàn', + 亲家: 'qìng jia', + 承载: 'chéng zài', + 行家: 'háng jia', + 喝问: 'hè wèn', + 还击: 'huán jī', + 交还: 'jiāo huán', + 当夜: 'dàng yè', + 将令: 'jiàng lìng', + 单于: 'chán yú', + 空缺: 'kòng quē', + 绿林: 'lù lín', + 胆量: 'dǎn liàng', + 执着: 'zhí zhuó', + 低调: 'dī diào', + 责难: 'zé nàn', + 闭塞: 'bì sè', + 轻薄: 'qīng bó', + 得当: 'dé dàng', + 占卜: 'zhān bǔ', + 排行: 'pái háng', + 扫帚: 'sào zhou', + 龟兹: 'qiū cí', + 年长: 'nián zhǎng', + 外传: 'wài zhuàn', + 头子: 'tóu zi', + 裁缝: 'cái féng', + 礼乐: 'lǐ yuè', + 血泊: 'xuè pō', + 散乱: 'sǎn luàn', + 动量: 'dòng liàng', + 倒腾: 'dǎo teng', + 取舍: 'qǔ shě', + 咱家: 'zá jiā', + 长发: 'cháng fà', + 爪哇: 'zhǎo wā', + 弹壳: 'dàn ké', + 省悟: 'xǐng wù', + 嚷嚷: 'rāng rang', + 连累: 'lián lěi', + 应得: 'yīng dé', + 族长: 'zú zhǎng', + 患难: 'huàn nàn', + 抽查: 'chōu zhā', + 柜子: 'guì zi', + 擂鼓: 'léi gǔ', + 眩晕: 'xuàn yùn', + 调配: 'diào pèi', + 躯干: 'qū gàn', + 差役: 'chāi yì', + 坎坷: 'kǎn kě', + 少儿: 'shào ér', + 乐团: 'yuè tuán', + 养分: 'yǎng fèn', + 退还: 'tuì huán', + 格调: 'gé diào', + 语调: 'yǔ diào', + 音调: 'yīn diào', + 乐府: 'yuè fǔ', + 古朴: 'gǔ piáo', + 打点: 'dǎ dian', + 差使: 'chāi shǐ', + 磨难: 'mó nàn', + 匀称: 'yún chèn', + 瘦削: 'shòu xuē', + 膏药: 'gāo yao', + 吞没: 'tūn mò', + 调任: 'diào rèn', + 散居: 'sǎn jū', + 上头: 'shàng tou', + 大难: 'dà nàn', + 风靡: 'fēng mǐ', + 放假: 'fàng jià', + 估量: 'gū liang', + 失当: 'shī dàng', + 中弹: 'zhòng dàn', + 妄为: 'wàng wéi', + 长者: 'zhǎng zhě', + 起哄: 'qǐ hòng', + 末了: 'mò liǎo', + 相声: 'xiàng sheng', + 校正: 'jiào zhèng', + 劝降: 'quàn xiáng', + 矢量: 'shǐ liàng', + 沉闷: 'chén mèn', + 给与: 'jǐ yǔ', + 解法: 'xiè fǎ', + 塞外: 'sài wài', + 将校: 'jiàng xiào', + 嗜好: 'shì hào', + 没落: 'mò luò', + 朴刀: 'pō dāo', + 片子: 'piān zi', + 切削: 'qiē xiāo', + 弹丸: 'dàn wán', + 昆曲: 'kūn qǔ', + 雅致: 'yǎ zhi', + 稀薄: 'xī bó', + 亏得: 'kuī de', + 死难: 'sǐ nàn', + 间歇: 'jiàn xiē', + 翘首: 'qiáo shǒu', + 色调: 'sè diào', + 处决: 'chǔ jué', + 表率: 'biǎo shuài', + 尺子: 'chǐ zi', + 招降: 'zhāo xiáng', + 称职: 'chèn zhí', + 斗篷: 'dǒu peng', + 铺子: 'pù zi', + 底子: 'dǐ zi', + 负载: 'fù zài', + 干警: 'gàn jǐng', + 倒数: 'dào shǔ', + 将官: 'jiàng guān', + 锄头: 'chú tou', + 归降: 'guī xiáng', + 疟疾: 'nüè ji', + 唠叨: 'láo dao', + 限量: 'xiàn liàng', + 一打: 'yī dá', + 屏息: 'bǐng xī', + 重逢: 'chóng féng', + 器乐: 'qì yuè', + 氢弹: 'qīng dàn', + 脖颈: 'bó gěng', + 妃子: 'fēi zi', + 追查: 'zhuī zhā', + 处事: 'chǔ shì', + 参量: 'cān liàng', + 轻率: 'qīng shuài', + 缥缈: 'piāo miǎo', + 幸得: 'xìng de', + 中奖: 'zhòng jiǎng', + 才干: 'cái gàn', + 施舍: 'shī shě', + 卷子: 'juǎn zi', + 游说: 'yóu shuì', + 巷子: 'xiàng zi', + 臂膀: 'bì bǎng', + 切勿: 'qiē wù', + 看管: 'kān guǎn', + 风头: 'fēng tou', + 精干: 'jīng gàn', + 高差: 'gāo chā', + 恐吓: 'kǒng hè', + 扁担: 'biǎn dàn', + 给养: 'jǐ yǎng', + 格子: 'gé zi', + 供需: 'gōng xū', + 反差: 'fǎn chā', + 飞弹: 'fēi dàn', + 微薄: 'wēi bó', + 发型: 'fà xíng', + 勘查: 'kān zhā', + 即兴: 'jí xìng', + 攒动: 'cuán dòng', + 间或: 'jiàn huò', + 浅薄: 'qiǎn bó', + 乐章: 'yuè zhāng', + 顺差: 'shùn chā', + 调子: 'diào zi', + 相位: 'xiàng wèi', + 转子: 'zhuàn zǐ', + 劲旅: 'jìng lǚ', + 咔嚓: 'kā chā', + 了事: 'liǎo shì', + 转悠: 'zhuàn you', + 芍药: 'sháo yao', + 当铺: 'dàng pù', + 爪子: 'zhuǎ zi', + 单子: 'dān zi', + 好战: 'hào zhàn', + 燕麦: 'yān mài', + 只许: 'zhǐ xǔ', + 干练: 'gàn liàn', + 女将: 'nǚ jiàng', + 酒量: 'jiǔ liàng', + 划船: 'huá chuán', + 伎俩: 'jì liǎng', + 挑拨: 'tiǎo bō', + 少校: 'shào xiào', + 着落: 'zhuó luò', + 憎恶: 'zēng wù', + 刻薄: 'kè bó', + 口角: 'kǒu jué', + 马尾: 'mǎ yǐ', + 要挟: 'yāo xié', + 用处: 'yòng chǔ', + 还手: 'huán shǒu', + 模具: 'mú jù', + 执著: 'zhí zhuó', + 喝令: 'hè lìng', + 争得: 'zhēng de', + 保长: 'bǎo zhǎng', + 吸着: 'xī zhuó', + 症结: 'zhēng jié', + 公转: 'gōng zhuàn', + 校勘: 'jiào kān', + 重提: 'chóng tí', + 扫兴: 'sǎo xìng', + 舞曲: 'wǔ qǔ', + 铺盖: 'pū gài', + 长史: 'zhǎng shǐ', + 差价: 'chā jià', + 压根: 'yà gēn', + 怔住: 'zhèng zhù', + 强人: 'qiǎng rén', + 应允: 'yīng yǔn', + 切入: 'qiē rù', + 战将: 'zhàn jiàng', + 年少: 'nián shào', + 舍身: 'shě shēn', + 执拗: 'zhí niù', + 处世: 'chǔ shì', + 中风: 'zhòng fēng', + 等量: 'děng liàng', + 不菲: 'bù fěi', + 放量: 'fàng liàng', + 腔调: 'qiāng diào', + 老少: 'lǎo shào', + 没入: 'mò rù', + 瓜葛: 'guā gé', + 将帅: 'jiàng shuài', + 车载: 'chē zài', + 窝囊: 'wō nāng', + 长进: 'zhǎng jìn', + 可汗: 'kè hán', + 并州: 'bīng zhōu', + 供销: 'gōng xiāo', + 切片: 'qiē piàn', + 差事: 'chāi shì', + 知会: 'zhī hui', + 鹰爪: 'yīng zhǎo', + 处女: 'chǔ nǚ', + 切磋: 'qiē cuō', + 日头: 'rì tou', + 押解: 'yā jiè', + 滋长: 'zī zhǎng', + 道观: 'dào guàn', + 脚色: 'jué sè', + 当量: 'dāng liàng', + 婆家: 'pó jia', + 缘分: 'yuán fèn', + 空闲: 'kòng xián', + 曲牌: 'qǔ pái', + 好色: 'hào sè', + 行会: 'háng huì', + 怒喝: 'nù hè', + 笼统: 'lǒng tǒng', + 边塞: 'biān sài', + 何曾: 'hé zēng', + 重合: 'chóng hé', + 插曲: 'chā qǔ', + 零散: 'líng sǎn', + 轰隆: 'hōng lōng', + 化子: 'huā zi', + 内蒙: 'nèi měng', + 数落: 'shǔ luo', + 逆差: 'nì chā', + 牟利: 'móu lì', + 栅栏: 'zhà lan', + 中标: 'zhòng biāo', + 调档: 'diào dàng', + 佝偻: 'gōu lóu', + 场子: 'chǎng zi', + 甲壳: 'jiǎ qiào', + 重温: 'chóng wēn', + 炮制: 'páo zhì', + 返还: 'fǎn huán', + 自传: 'zì zhuàn', + 高调: 'gāo diào', + 词曲: 'cí qǔ', + 受难: 'shòu nàn', + 殷红: 'yān hóng', + 要约: 'yāo yuē', + 固着: 'gù zhuó', + 强求: 'qiǎng qiú', + 本相: 'běn xiàng', + 骄横: 'jiāo hèng', + 草率: 'cǎo shuài', + 气闷: 'qì mèn', + 着色: 'zhuó sè', + 宁肯: 'nìng kěn', + 兴头: 'xìng tou', + 拘泥: 'jū nì', + 夹角: 'jiā jiǎo', + 发髻: 'fà jì', + 猛将: 'měng jiàng', + 劫难: 'jié nàn', + 约摸: 'yuē mo', + 拖累: 'tuō lěi', + 呢绒: 'ní róng', + 钻探: 'zuān tàn', + 夹层: 'jiā céng', + 把子: 'bà zi', + 落魄: 'luò tuò', + 巷道: 'hàng dào', + 运量: 'yùn liàng', + 头里: 'tóu li', + 解闷: 'jiě mèn', + 空儿: 'kòng ér', + 估摸: 'gū mo', + 好客: 'hào kè', + 小曲: 'xiǎo qǔ', + 折衷: 'shé zhōng', + 钻孔: 'zuān kǒng', + 序曲: 'xù qǔ', + 糊弄: 'hù nong', + 荥阳: 'xíng yáng', + 道行: 'dào héng', + 烦闷: 'fán mèn', + 仓卒: 'cāng cù', + 分叉: 'fēn chà', + 曲率: 'qǔ lǜ', + 相片: 'xiàng piān', + 内行: 'nèi háng', + 厂子: 'chǎng zi', + 小调: 'xiǎo diào', + 少阳: 'shào yáng', + 受降: 'shòu xiáng', + 染坊: 'rǎn fáng', + 胳臂: 'gē bei', + 将门: 'jiàng mén', + 模板: 'mú bǎn', + 配给: 'pèi jǐ', + 为伍: 'wéi wǔ', + 跟头: 'gēn tou', + 划算: 'huá suàn', + 累赘: 'léi zhui', + 哄笑: 'hōng xiào', + 晕眩: 'yùn xuàn', + 干掉: 'gàn diào', + 缝制: 'féng zhì', + 难处: 'nán chǔ', + 着意: 'zhuó yì', + 蛮横: 'mán hèng', + 干将: 'gàn jiàng', + 奇数: 'jī shù', + 短发: 'duǎn fà', + 生还: 'shēng huán', + 还清: 'huán qīng', + 看护: 'kān hù', + 直率: 'zhí shuài', + 奏乐: 'zòu yuè', + 载客: 'zài kè', + 专横: 'zhuān hèng', + 湮没: 'yān mò', + 空格: 'kòng gé', + 铺垫: 'pū diàn', + 良将: 'liáng jiàng', + 哗啦: 'huā lā', + 散漫: 'sǎn màn', + 脱发: 'tuō fà', + 两重: 'liǎng chóng', + 送还: 'sòng huán', + 埋没: 'mái mò', + 累及: 'lěi jí', + 薄雾: 'bó wù', + 调离: 'diào lí', + 舌苔: 'shé tāi', + 机长: 'jī zhǎng', + 栓塞: 'shuān sè', + 配角: 'pèi jué', + 切口: 'qiē kǒu', + 创口: 'chuāng kǒu', + 哈欠: 'hā qian', + 实弹: 'shí dàn', + 铺平: 'pū píng', + 哈达: 'hǎ dá', + 懒散: 'lǎn sǎn', + 实干: 'shí gàn', + 填空: 'tián kòng', + 刁钻: 'diāo zuān', + 乐师: 'yuè shī', + 量变: 'liàng biàn', + 诱降: 'yòu xiáng', + 搪塞: 'táng sè', + 购得: 'gòu de', + 征调: 'zhēng diào', + 夹道: 'jiā dào', + 干咳: 'gān ké', + 乐工: 'yuè gōng', + 商行: 'shāng háng', + 划过: 'huá guò', + 着火: 'zháo huǒ', + 更正: 'gēng zhèng', + 给付: 'jǐ fù', + 空子: 'kòng zi', + 哪吒: 'né zhā', + 散曲: 'sǎn qǔ', + 行规: 'háng guī', + 正着: 'zhèng zháo', + 刁难: 'diāo nàn', + 刷子: 'shuā zi', + 丧葬: 'sāng zàng', + 夹带: 'jiā dài', + 安分: 'ān fèn', + 中意: 'zhòng yì', + 长孙: 'zhǎng sūn', + 校订: 'jiào dìng', + 卷曲: 'juǎn qū', + 载运: 'zài yùn', + 投弹: 'tóu dàn', + 柞蚕: 'zuò cán', + 份量: 'fèn liàng', + 外行: 'wài háng', + 调换: 'diào huàn', + 了然: 'liǎo rán', + 咧嘴: 'liě zuǐ', + 典当: 'diǎn dàng', + 寒假: 'hán jià', + 长兄: 'zhǎng xiōng', + 给水: 'jǐ shuǐ', + 须发: 'xū fà', + 枝干: 'zhī gàn', + 属相: 'shǔ xiang', + 哄抢: 'hōng qiǎng', + 刻划: 'kè huá', + 手把: 'shǒu bà', + 塞子: 'sāi zi', + 单干: 'dān gàn', + 还乡: 'huán xiāng', + 兆头: 'zhào tou', + 寺观: 'sì guàn', + 督率: 'dū shuài', + 受累: 'shòu lěi', + 天台: 'tiān tāi', + 啊哈: 'ā hā', + 割舍: 'gē shě', + 抹布: 'mā bù', + 好恶: 'hào wù', + 下处: 'xià chǔ', + 消长: 'xiāo zhǎng', + 离间: 'lí jiàn', + 准头: 'zhǔn tou', + 校对: 'jiào duì', + 什物: 'shí wù', + 番禺: 'pān yú', + 佛爷: 'fó ye', + 备查: 'bèi zhā', + 吗啡: 'mǎ fēi', + 盐分: 'yán fèn', + 当月: 'dàng yuè', + 虎将: 'hǔ jiàng', + 薄荷: 'bò he', + 独处: 'dú chǔ', + 空位: 'kòng wèi', + 铺路: 'pū lù', + 乌拉: 'wù la', + 调回: 'diào huí', + 来头: 'lái tou', + 闲散: 'xián sǎn', + 胶卷: 'jiāo juǎn', + 冒失: 'mào shi', + 干劲: 'gàn jìn', + 弦乐: 'xián yuè', + 行伍: 'háng wǔ', + 相国: 'xiàng guó', + 查查: 'zhā zhā', + 丹参: 'dān shēn', + 助兴: 'zhù xìng', + 铺开: 'pū kāi', + 次长: 'cì zhǎng', + 发卡: 'fà qiǎ', + 拮据: 'jié jū', + 刹车: 'shā chē', + 生发: 'shēng fà', + 重播: 'chóng bō', + 缝合: 'féng hé', + 音量: 'yīn liàng', + 少尉: 'shào wèi', + 殉难: 'xùn nàn', + 冲压: 'chòng yā', + 苍劲: 'cāng jìng', + 厚薄: 'hòu bó', + 威吓: 'wēi hè', + 外相: 'wài xiàng', + 曲谱: 'qǔ pǔ', + 呼号: 'hū háo', + 着迷: 'zháo mí', + 挑担: 'tiāo dàn', + 纹路: 'wén lu', + 一沓: 'yī dá', + 还俗: 'huán sú', + 强横: 'qiáng hèng', + 四行: 'sì háng', + 着数: 'zhāo shù', + 国难: 'guó nàn', + 降顺: 'xiáng shùn', + 挑明: 'tiǎo míng', + 眯缝: 'mī feng', + 分内: 'fèn nèi', + 更衣: 'gēng yī', + 软和: 'ruǎn huo', + 尽兴: 'jìn xìng', + 号子: 'hào zi', + 爪牙: 'zhǎo yá', + 败将: 'bài jiàng', + 猜中: 'cāi zhòng', + 结扎: 'jié zā', + 没空: 'méi kòng', + 夹缝: 'jiā fèng', + 拾掇: 'shí duo', + 掺和: 'chān huo', + 簸箕: 'bò ji', + 电量: 'diàn liàng', + 荷载: 'hè zǎi', + 漯河: 'luò tà hé', + 调式: 'diào shì', + 处身: 'chǔ shēn', + 打手: 'dǎ shou', + 弹弓: 'dàn gōng', + 横蛮: 'hèng mán', + 能干: 'néng gàn', + 校点: 'jiào diǎn', + 加载: 'jiā zài', + 干校: 'gàn xiào', + 哄传: 'hōng chuán', + 校注: 'jiào zhù', + 淤塞: 'yū sè', + 马扎: 'mǎ zhá', + 月氏: 'yuè zhī', + 高干: 'gāo gàn', + 经传: 'jīng zhuàn', + 曾孙: 'zēng sūn', + 好斗: 'hào dòu', + 关卡: 'guān qiǎ', + 逃奔: 'táo bèn', + 磨蹭: 'mó ceng', + 牟取: 'móu qǔ', + 颤栗: 'zhàn lì', + 蚂蚱: 'mà zha', + 撮合: 'cuō he', + 趔趄: 'liè qie', + 摔打: 'shuāi dá', + 台子: 'tái zi', + 分得: 'fēn de', + 粘着: 'nián zhuó', + 采邑: 'cài yì', + 散装: 'sǎn zhuāng', + 婀娜: 'ē nuó', + 兴味: 'xìng wèi', + 行头: 'xíng tou', + 气量: 'qì liàng', + 调运: 'diào yùn', + 处治: 'chǔ zhì', + 乐音: 'yuè yīn', + 组曲: 'zǔ qǔ', + 充塞: 'chōng sè', + 恫吓: 'dòng hè', + 论调: 'lùn diào', + 相中: 'xiāng zhòng', + 民乐: 'mín yuè', + 炮仗: 'pào zhang', + 丧服: 'sāng fú', + 骁将: 'xiāo jiàng', + 量刑: 'liàng xíng', + 缝补: 'féng bǔ', + 财会: 'cái kuài', + 大干: 'dà gàn', + 呱呱: 'gū gū', + 历数: 'lì shǔ', + 校场: 'jiào chǎng', + 塞北: 'sài běi', + 识相: 'shí xiàng', + 辱没: 'rǔ mò', + 鲜亮: 'xiān liang', + 语塞: 'yǔ sè', + 露脸: 'lòu liǎn', + 凉快: 'liáng kuai', + 腰杆: 'yāo gǎn', + 溜达: 'liū da', + 嘎嘎: 'gā gā', + 公干: 'gōng gàn', + 桔梗: 'jié gěng', + 挑逗: 'tiǎo dòu', + 看门: 'kān mén', + 海难: 'hǎi nàn', + 乐歌: 'yuè gē', + 拓片: 'tà piàn', + 挑动: 'tiǎo dòng', + 准将: 'zhǔn jiàng', + 落难: 'luò nàn', + 遒劲: 'qiú jìng', + 磨坊: 'mò fáng', + 逶迤: 'wēi yí', + 搅和: 'jiǎo huo', + 摩挲: 'mā sā', + 作弄: 'zuō nòng', + 苗头: 'miáo tou', + 打颤: 'dǎ zhàn', + 大藏: 'dà zàng', + 畜牲: 'chù sheng', + 勾搭: 'gōu da', + 树荫: 'shù yīn', + 树杈: 'shù chà', + 铁杆: 'tiě gǎn', + 将相: 'jiàng xiàng', + 份子: 'fèn zi', + 视差: 'shì chā', + 绿荫: 'lǜ yīn', + 枪杆: 'qiāng gǎn', + 缝纫: 'féng rèn', + 愁闷: 'chóu mèn', + 点将: 'diǎn jiàng', + 华佗: 'huà tuó', + 劲射: 'jìng shè', + 箱笼: 'xiāng lǒng', + 终了: 'zhōng liǎo', + 鬓发: 'bìn fà', + 结巴: 'jiē ba', + 苦干: 'kǔ gàn', + 看家: 'kān jiā', + 正旦: 'zhēng dàn', + 中肯: 'zhòng kěn', + 厦门: 'xià mén', + 东莞: 'dōng guǎn', + 食量: 'shí liàng', + 宫调: 'gōng diào', + 间作: 'jiàn zuò', + 弹片: 'dàn piàn', + 差池: 'chā chí', + 漂白: 'piǎo bái', + 杠子: 'gàng zi', + 调处: 'tiáo chǔ', + 好动: 'hào dòng', + 转炉: 'zhuàn lú', + 屏气: 'bǐng qì', + 夹板: 'jiā bǎn', + 哀乐: 'āi yuè', + 干道: 'gàn dào', + 苦处: 'kǔ chǔ', + 劈柴: 'pǐ chái', + 长势: 'zhǎng shì', + 天华: 'tiān huā', + 共处: 'gòng chǔ', + 严查: 'yán zhā', + 校验: 'jiào yàn', + 出塞: 'chū sài', + 弹子: 'dàn zǐ', + 磨盘: 'mò pán', + 萎靡: 'wěi mǐ', + 奔丧: 'bēn sāng', + 唱和: 'chàng hè', + 大调: 'dà diào', + 非分: 'fēi fèn', + 钻营: 'zuān yíng', + 夹子: 'jiā zi', + 超载: 'chāo zài', + 更始: 'gēng shǐ', + 铃铛: 'líng dang', + 披散: 'pī sǎn', + 遭难: 'zāo nàn', + 发还: 'fā huán', + 转轮: 'zhuàn lún', + 横财: 'hèng cái', + 泡桐: 'pāo tóng', + 抛撒: 'pāo sǎ', + 天呀: 'tiān yā', + 糊糊: 'hū hū', + 躯壳: 'qū qiào', + 通量: 'tōng liàng', + 奉还: 'fèng huán', + 午觉: 'wǔ jiào', + 闷棍: 'mèn gùn', + 浪头: 'làng tou', + 砚台: 'yàn tāi', + 油坊: 'yóu fáng', + 学长: 'xué zhǎng', + 过载: 'guò zài', + 笔调: 'bǐ diào', + 衣被: 'yì bèi', + 畜产: 'xù chǎn', + 打更: 'dǎ gēng', + 调阅: 'diào yuè', + 蛮干: 'mán gàn', + 曾祖: 'zēng zǔ', + 本行: 'běn háng', + 提干: 'tí gàn', + 变调: 'biàn diào', + 覆没: 'fù mò', + 模子: 'mú zi', + 乐律: 'yuè lǜ', + 称心: 'chèn xīn', + 木杆: 'mù gǎn', + 套曲: 'tào qǔ', + 重印: 'chóng yìn', + 自省: 'zì xǐng', + 提调: 'tí diào', + 看相: 'kàn xiàng', + 芋头: 'yù tou', + 下切: 'xià qiē', + 塞上: 'sài shàng', + 铺张: 'pū zhāng', + 藤蔓: 'téng wàn', + 薄幸: 'bó xìng', + 非难: 'fēi nàn', + 解数: 'xiè shù', + 褪去: 'tùn qù', + 霰弹: 'xiàn dàn', + 柚木: 'yóu mù', + 重载: 'zhòng zài', + 二重: 'èr chóng', + 痕量: 'hén liàng', + 雅乐: 'yǎ yuè', + 号哭: 'háo kū', + 诈降: 'zhà xiáng', + 猪圈: 'zhū juàn', + 咋舌: 'zé shé', + 铣床: 'xǐ chuáng', + 防弹: 'fáng dàn', + 健将: 'jiàn jiàng', + 丽水: 'lí shuǐ', + 削发: 'xuē fà', + 空当: 'kòng dāng', + 多相: 'duō xiàng', + 鲜见: 'xiǎn jiàn', + 划桨: 'huá jiǎng', + 载波: 'zài bō', + 跳蚤: 'tiào zao', + 俏皮: 'qiào pi', + 吧嗒: 'bā dā', + 结发: 'jié fà', + 了断: 'liǎo duàn', + 同调: 'tóng diào', + 石磨: 'shí mò', + 时差: 'shí chā', + 鼻塞: 'bí sè', + 挑子: 'tiāo zi', + 推磨: 'tuī mò', + 武侯: 'wǔ hòu', + 抹煞: 'mǒ shā', + 调转: 'diào zhuǎn', + 籍没: 'jí mò', + 测度: 'cè duó', + 还债: 'huán zhài', + 调演: 'diào yǎn', + 分划: 'fēn huá', + 奇偶: 'jī ǒu', + 断喝: 'duàn hè', + 闷雷: 'mèn léi', + 狼藉: 'láng jí', + 饭量: 'fàn liàng', + 还礼: 'huán lǐ', + 转调: 'zhuǎn diào', + 星相: 'xīng xiàng', + 手相: 'shǒu xiàng', + 配乐: 'pèi yuè', + 盖头: 'gài tou', + 连杆: 'lián gǎn', + 簿记: 'bù jì', + 刀把: 'dāo bà', + 量词: 'liàng cí', + 名角: 'míng jué', + 步调: 'bù diào', + 校本: 'jiào běn', + 曲江: 'qǔ jiāng', + 账簿: 'zhàng bù', + 隽永: 'juàn yǒng', + 哈罗: 'hā luo', + 稍为: 'shāo wéi', + 易传: 'yì zhuàn', + 乐谱: 'yuè pǔ', + 牵累: 'qiān lěi', + 答理: 'dā li', + 喝斥: 'hè chì', + 吟哦: 'yín é', + 干渠: 'gàn qú', + 海量: 'hǎi liàng', + 精当: 'jīng dàng', + 着床: 'zhuó chuáng', + 月相: 'yuè xiàng', + 庶几: 'shù jī', + 宫观: 'gōng guàn', + 论处: 'lùn chǔ', + 征辟: 'zhēng bì', + 厚朴: 'hòu pò', + 介壳: 'jiè qiào', + 吭哧: 'kēng chi', + 咯血: 'kǎ xiě', + 铺陈: 'pū chén', + 重生: 'chóng shēng', + 乐理: 'yuè lǐ', + 哀号: 'āi háo', + 藏历: 'zàng lì', + 琴曲: 'qín qǔ', + 神曲: 'shén qǔ', + 刚劲: 'gāng jìng', + 削平: 'xuē píng', + 浓荫: 'nóng yīn', + 城垛: 'chéng duǒ', + 识记: 'zhì jì', + 当差: 'dāng chāi', + 正传: 'zhèng zhuàn', + 并处: 'bìng chǔ', + 空难: 'kōng nàn', + 创面: 'chuāng miàn', + 旦角: 'dàn jué', + 薄礼: 'bó lǐ', + 晃荡: 'huàng dang', + 臊子: 'sào zi', + 家什: 'jiā shí', + 闷头: 'mèn tóu', + 美发: 'měi fà', + 度数: 'dù shu', + 着凉: 'zháo liáng', + 闯将: 'chuǎng jiàng', + 几案: 'jī àn', + 姘头: 'pīn tou', + 急难: 'jí nàn', + 差数: 'chā shù', + 散碎: 'sǎn suì', + 壅塞: 'yōng sè', + 寒颤: 'hán zhàn', + 牵强: 'qiān qiǎng', + 无间: 'wú jiàn', + 轮转: 'lún zhuàn', + 号叫: 'háo jiào', + 铺排: 'pū pái', + 降伏: 'xiáng fú', + 轧钢: 'zhá gāng', + 东阿: 'dōng ē', + 病假: 'bìng jià', + 累加: 'lěi jiā', + 梗塞: 'gěng sè', + 弹夹: 'dàn jiā', + 钻心: 'zuān xīn', + 晃眼: 'huǎng yǎn', + 魔爪: 'mó zhǎo', + 标量: 'biāo liàng', + 憋闷: 'biē mèn', + 猜度: 'cāi duó', + 处士: 'chǔ shì', + 官差: 'guān chāi', + 讨还: 'tǎo huán', + 长门: 'zhǎng mén', + 馏分: 'liú fèn', + 里弄: 'lǐ lòng', + 色相: 'sè xiàng', + 雅兴: 'yǎ xìng', + 角力: 'jué lì', + 弹坑: 'dàn kēng', + 枝杈: 'zhī chà', + 夹具: 'jiā jù', + 处刑: 'chǔ xíng', + 悍将: 'hàn jiàng', + 好学: 'hào xué', + 好好: 'hǎo hǎo', + 银发: 'yín fà', + 扫把: 'sào bǎ', + 法相: 'fǎ xiàng', + 贵干: 'guì gàn', + 供气: 'gōng qì', + 空余: 'kòng yú', + 捆扎: 'kǔn zā', + 瘠薄: 'jí bó', + 浆糊: 'jiàng hu', + 嘎吱: 'gā zhī', + 不遂: 'bù suí', + 调令: 'diào lìng', + 法帖: 'fǎ tiè', + 淋病: 'lìn bìng', + 调派: 'diào pài', + 转盘: 'zhuàn pán', + 供稿: 'gōng gǎo', + 差官: 'chāi guān', + 忧闷: 'yōu mèn', + 重犯: 'chóng fàn', + 教长: 'jiào zhǎng', + 重唱: 'chóng chàng', + 酒兴: 'jiǔ xìng', + 乐坛: 'yuè tán', + 花呢: 'huā ní', + 叱喝: 'chì hè', + 膀臂: 'bǎng bì', + 重头: 'chóng tóu', + 得空: 'dé kòng', + 转圈: 'zhuàn quān', + 横暴: 'hèng bào', + 哄抬: 'hōng tái', + 引吭: 'yǐn háng', + 载货: 'zài huò', + 中计: 'zhòng jì', + 官长: 'guān zhǎng', + 相面: 'xiàng miàn', + 看头: 'kàn tou', + 盼头: 'pàn tou', + 意兴: 'yì xìng', + 军乐: 'jūn yuè', + 累次: 'lěi cì', + 骨嘟: 'gū dū', + 燕赵: 'yān zhào', + 报丧: 'bào sāng', + 弥撒: 'mí sa', + 挨斗: 'ái dòu', + 扁舟: 'piān zhōu', + 丑角: 'chǒu jué', + 吊丧: 'diào sāng', + 强将: 'qiáng jiàng', + 行号: 'háng háo', + 重奏: 'chóng zòu', + 发辫: 'fà biàn', + 着魔: 'zháo mó', + 着法: 'zhāo fǎ', + 盛放: 'chéng fàng', + 填塞: 'tián sè', + 凶横: 'xiōng hèng', + 稽首: 'qǐ shǒu', + 碑帖: 'bēi tiè', + 冲量: 'chōng liàng', + 发菜: 'fà cài', + 假发: 'jiǎ fà', + 翻卷: 'fān juǎn', + 小量: 'xiǎo liàng', + 胶着: 'jiāo zhuó', + 里子: 'lǐ zi', + 调调: 'diào diao', + 散兵: 'sǎn bīng', + 高挑: 'gāo tiǎo', + 播撒: 'bō sǎ', + 夹心: 'jiā xīn', + 扇动: 'shān dòng', + 叨扰: 'tāo rǎo', + 霓裳: 'ní cháng', + 捻子: 'niǎn zi', + 弥缝: 'mí féng', + 撒布: 'sǎ bù', + 元曲: 'yuán qǔ', + 场院: 'cháng yuàn', + 省亲: 'xǐng qīn', + 提拉: 'dī le', + 惯量: 'guàn liàng', + 强逼: 'qiǎng bī', + 强征: 'qiǎng zhēng', + 晕车: 'yùn chē', + 数道: 'shǔ dào', + 带累: 'dài lěi', + 拓本: 'tà běn', + 嫌恶: 'xián wù', + 宿将: 'sù jiàng', + 龟裂: 'jūn liè', + 缠夹: 'chán jiā', + 发式: 'fà shì', + 隔扇: 'gé shān', + 行货: 'háng huò', + 天分: 'tiān fèn', + 癖好: 'pǐ hào', + 四通: 'sì tòng', + 白术: 'bái zhú', + 划伤: 'huá shāng', + 角斗: 'jué dòu', + 听差: 'tīng chāi', + 岁差: 'suì chā', + 丧礼: 'sāng lǐ', + 脉脉: 'mò mò', + 削瘦: 'xuē shòu', + 撒播: 'sǎ bō', + 莎草: 'suō cǎo', + 犍为: 'qián wéi', + 调头: 'diào tóu', + 龙卷: 'lóng juǎn', + 外调: 'wài diào', + 字帖: 'zì tiè', + 卷发: 'juǎn fà', + 揣度: 'chuǎi duó', + 洋相: 'yáng xiàng', + 散光: 'sǎn guāng', + 骨碌: 'gū lu', + 薄命: 'bó mìng', + 笼头: 'lóng tou', + 咽炎: 'yān yán', + 碌碡: 'liù zhou', + 片儿: 'piān er', + 纤手: 'qiàn shǒu', + 散体: 'sǎn tǐ', + 内省: 'nèi xǐng', + 强留: 'qiǎng liú', + 解送: 'jiè sòng', + 反间: 'fǎn jiàn', + 少壮: 'shào zhuàng', + 一服: 'yī fù', + 留空: 'liú kòng', + 告假: 'gào jià', + 咳血: 'ké xiě', + 薄暮: 'bó mù', + 铺轨: 'pū guǐ', + 磨削: 'mó xuē', + 治丧: 'zhì sāng', + 叉子: 'chā zi', + 哄动: 'hōng dòng', + 蛾子: 'é zi', + 糜子: 'méi zi', + 出落: 'chū là', + 股长: 'gǔ zhǎng', + 贵处: 'guì chǔ', + 还魂: 'huán hún', + 例假: 'lì jià', + 曲池: 'qǔ chí', + 刹住: 'shā zhù', + 身量: 'shēn liàng', + 懂行: 'dǒng háng', + 同好: 'tóng hào', + 模量: 'mó liàng', + 更生: 'gēng shēng', + 服丧: 'fú sāng', + 率直: 'shuài zhí', + 字模: 'zì mú', + 散架: 'sǎn jià', + 答腔: 'dā qiāng', + 交恶: 'jiāo wù', + 薄情: 'bó qíng', + 眼泡: 'yǎn pāo', + 袅娜: 'niǎo nuó', + 草垛: 'cǎo duǒ', + 冲劲: 'chòng jìn', + 呢喃: 'ní nán', + 切中: 'qiè zhòng', + 挑灯: 'tiǎo dēng', + 还愿: 'huán yuàn', + 激将: 'jī jiàng', + 更鼓: 'gēng gǔ', + 没药: 'mò yào', + 难友: 'nàn yǒu', + 败兴: 'bài xìng', + 切面: 'qiē miàn', + 散户: 'sǎn hù', + 累进: 'lěi jìn', + 背带: 'bēi dài', + 秤杆: 'chèng gǎn', + 碾坊: 'niǎn fáng', + 簿子: 'bù zi', + 扳手: 'bān shou', + 铅山: 'yán shān', + 儒将: 'rú jiàng', + 重光: 'chóng guāng', + 剪发: 'jiǎn fà', + 行话: 'háng huà', + 长上: 'zhǎng shàng', + 小传: 'xiǎo zhuàn', + 压轴: 'yā zhòu', + 谱曲: 'pǔ qǔ', + 弱冠: 'ruò guàn', + 花卷: 'huā juǎn', + 横祸: 'hèng huò', + 夹克: 'jiā kè', + 光晕: 'guāng yùn', + 披靡: 'pī mǐ', + 对调: 'duì diào', + 夹持: 'jiā chí', + 空额: 'kòng é', + 平调: 'píng diào', + 铺床: 'pū chuáng', + 丧钟: 'sāng zhōng', + 作乐: 'zuò yuè', + 少府: 'shào fǔ', + 数数: 'shuò shuò', + 奔头: 'bèn tou', + 进给: 'jìn jǐ', + 率性: 'shuài xìng', + 乐子: 'lè zi', + 绑扎: 'bǎng zā', + 挑唆: 'tiǎo suō', + 漂洗: 'piǎo xǐ', + 夹墙: 'jiā qiáng', + 咳喘: 'ké chuǎn', + 乜斜: 'miē xie', + 错处: 'cuò chǔ', + 闷酒: 'mèn jiǔ', + 时调: 'shí diào', + 重孙: 'chóng sūn', + 经幢: 'jīng chuáng', + 圩场: 'xū cháng', + 调门: 'diào mén', + 花头: 'huā tou', + 划拉: 'huá la', + 套色: 'tào shǎi', + 粗率: 'cū shuài', + 相率: 'xiāng shuài', + 款识: 'kuǎn zhì', + 吁请: 'yù qǐng', + 荫蔽: 'yīn bì', + 文蛤: 'wén gé', + 嘀嗒: 'dī dā', + 调取: 'diào qǔ', + 交差: 'jiāo chāi', + 落子: 'lào zǐ', + 相册: 'xiàng cè', + 絮叨: 'xù dáo', + 落发: 'luò fà', + 异相: 'yì xiàng', + 浸没: 'jìn mò', + 角抵: 'jué dǐ', + 卸载: 'xiè zài', + 春卷: 'chūn juǎn', + 扎挣: 'zhá zheng', + 畜养: 'xù yǎng', + 吡咯: 'bǐ luò', + 垛子: 'duǒ zi', + 恶少: 'è shào', + 发际: 'fà jì', + 红苕: 'hóng sháo', + 糨糊: 'jiàng hù', + 哭丧: 'kū sang', + 泡子: 'pāo zǐ', + 稍息: 'shào xī', + 晕船: 'yùn chuán', + 校样: 'jiào yàng', + 外差: 'wài chāi', + 红曲: 'hóng qǔ', + 脚爪: 'jiǎo zhǎo', + 铺展: 'pū zhǎn', + 驮子: 'duò zi', + 芫荽: 'yán sui', + 夹紧: 'jiā jǐn', + 尿泡: 'suī pào', + 丧乱: 'sāng luàn', + 凶相: 'xiōng xiàng', + 华发: 'huá fà', + 打场: 'dǎ cháng', + 云量: 'yún liàng', + 正切: 'zhèng qiē', + 处子: 'chǔ zǐ', + 留难: 'liú nàn', + 划拳: 'huá quán', + 划艇: 'huá tǐng', + 评传: 'píng zhuàn', + 拉纤: 'lā qiàn', + 句读: 'jù dòu', + 散剂: 'sǎn jì', + 骨殖: 'gǔ shi', + 塞音: 'sè yīn', + 铺叙: 'pū xù', + 阏氏: 'yān zhī', + 冷颤: 'lěng zhàn', + 煞住: 'shā zhù', + 夜曲: 'yè qǔ', + 少男: 'shào nán', + 格登: 'gē dēng', + 管乐: 'guǎn yuè', + 号啕: 'háo táo', + 纳降: 'nà xiáng', + 拥塞: 'yōng sè', + 万乘: 'wàn shèng', + 杆儿: 'gǎn ér', + 葛藤: 'gé téng', + 芯子: 'xìn zi', + 簿籍: 'bù jí', + 垫圈: 'diàn juàn', + 皮夹: 'pí jiā', + 校准: 'jiào zhǔn', + 行款: 'háng kuǎn', + 允当: 'yǔn dàng', + 器量: 'qì liàng', + 选调: 'xuǎn diào', + 扮相: 'bàn xiàng', + 干才: 'gàn cái', + 基干: 'jī gàn', + 三校: 'sān jiào', + 割切: 'gē qiē', + 国乐: 'guó yuè', + 卡壳: 'qiǎ ké', + 呢子: 'ní zi', + 辟谷: 'bì gǔ', + 磨房: 'mò fáng', + 咿呀: 'yī yā', + 芥末: 'jiè mo', + 薄技: 'bó jì', + 产假: 'chǎn jià', + 诗兴: 'shī xìng', + 重出: 'chóng chū', + 转椅: 'zhuàn yǐ', + 酌量: 'zhuó liàng', + 簿册: 'bù cè', + 藏青: 'zàng qīng', + 的士: 'dí shì', + 调人: 'diào rén', + 解元: 'jiè yuán', + 茎干: 'jīng gàn', + 巨量: 'jù liàng', + 榔头: 'láng tou', + 率真: 'shuài zhēn', + 喷香: 'pèn xiāng', + 锁钥: 'suǒ yuè', + 虾蟆: 'há má', + 相图: 'xiàng tú', + 兴会: 'xìng huì', + 灶头: 'zào tou', + 重婚: 'chóng hūn', + 钻洞: 'zuān dòng', + 忖度: 'cǔn duó', + 党参: 'dǎng shēn', + 调温: 'diào wēn', + 杆塔: 'gǎn tǎ', + 葛布: 'gé bù', + 拱券: 'gǒng xuàn', + 冠子: 'guàn zi', + 划子: 'huá zǐ', + 夹生: 'jiā shēng', + 露馅: 'lòu xiàn', + 恰切: 'qià qiē', + 散见: 'sǎn jiàn', + 哨卡: 'shào qiǎ', + 烫发: 'tàng fà', + 体量: 'tǐ liàng', + 挺括: 'tǐng guā', + 系带: 'jì dài', + 相士: 'xiàng shì', + 羊圈: 'yáng juàn', + 转矩: 'zhuàn jǔ', + 吧台: 'bā tái', + 苍术: 'cāng zhú', + 菲薄: 'fěi bó', + 蛤蚧: 'gé jiè', + 蛤蜊: 'gé lí', + 瓜蔓: 'guā wàn', + 怪相: 'guài xiàng', + 罹难: 'lí nàn', + 临帖: 'lín tiè', + 女红: 'nǚ gōng', + 刨床: 'bào chuáng', + 翘楚: 'qiáo chǔ', + 数九: 'shǔ jiǔ', + 谈兴: 'tán xìng', + 心曲: 'xīn qǔ', + 雄劲: 'xióng jìng', + 扎染: 'zā rǎn', + 遮荫: 'zhē yīn', + 周正: 'zhōu zhēng', + 赚头: 'zhuàn tou', + 扒手: 'pá shǒu', + 搀和: 'chān huo', + 诚朴: 'chéng piáo', + 肚量: 'dù liàng', + 干结: 'gàn jié', + 工尺: 'gōng chě', + 家累: 'jiā lěi', + 曲水: 'qǔ shuǐ', + 沙参: 'shā shēn', + 挑花: 'tiǎo huā', + 行距: 'háng jù', + 阿门: 'ā mēn', + 背篓: 'bēi lǒu', + 瘪三: 'biē sān', + 裁处: 'cái chǔ', + 创痛: 'chuāng tòng', + 福相: 'fú xiàng', + 更动: 'gēng dòng', + 豪兴: 'háo xìng', + 还阳: 'huán yáng', + 还嘴: 'huán zuǐ', + 借调: 'jiè diào', + 卷云: 'juǎn yún', + 卡子: 'qiǎ zi', + 流弹: 'liú dàn', + 络子: 'lào zi', + 磨子: 'mò zǐ', + 想头: 'xiǎng tou', + 削价: 'xuē jià', + 校阅: 'jiào yuè', + 八行: 'bā háng', + 雅量: 'yǎ liàng', + 别传: 'bié zhuàn', + 薄酒: 'bó jiǔ', + 春假: 'chūn jià', + 发妻: 'fà qī', + 哗哗: 'huā huā', + 宽绰: 'kuān chuo', + 了悟: 'liǎo wù', + 切花: 'qiē huā', + 审度: 'shěn duó', + 应许: 'yīng xǔ', + 转台: 'zhuàn tái', + 仔猪: 'zǐ zhū', + 奔命: 'bèn mìng', + 裁量: 'cái liàng', + 藏戏: 'zàng xì', + 乘兴: 'chéng xìng', + 绸缪: 'chóu móu', + 摧折: 'cuī shé', + 调经: 'diào jīng', + 调职: 'diào zhí', + 缝缀: 'féng zhuì', + 骨朵: 'gū duǒ', + 核儿: 'hú ér', + 恒量: 'héng liàng', + 还价: 'huán jià', + 浑朴: 'hún piáo', + 苦差: 'kǔ chāi', + 面糊: 'miàn hù', + 曲张: 'qǔ zhāng', + 煞车: 'shā chē', + 省视: 'xǐng shì', + 什锦: 'shí jǐn', + 信差: 'xìn chāi', + 余切: 'yú qiē', + 攒眉: 'cuán méi', + 炸糕: 'zhá gāo', + 钻杆: 'zuàn gǎn', + 扒灰: 'pá huī', + 拌和: 'bàn huò', + 长调: 'cháng diào', + 大溜: 'dà liù', + 抖搂: 'dǒu lōu', + 飞转: 'fēi zhuàn', + 赴难: 'fù nàn', + 干仗: 'gàn zhàng', + 好胜: 'hào shèng', + 画片: 'huà piān', + 搅混: 'jiǎo gǔn', + 螺杆: 'luó gǎn', + 木模: 'mù mú', + 怒号: 'nù háo', + 频数: 'pín shuò', + 无宁: 'wú nìng', + 选曲: 'xuǎn qǔ', + 遗少: 'yí shào', + 邮差: 'yóu chāi', + 占卦: 'zhān guà', + 占星: 'zhān xīng', + 重审: 'chóng shěn', + 自量: 'zì liàng', + 待查: 'dài zhā', + 调防: 'diào fáng', + 发廊: 'fà láng', + 翻查: 'fān zhā', + 反调: 'fǎn diào', + 缝子: 'fèng zi', + 更夫: 'gēng fū', + 骨子: 'gǔ zi', + 光杆: 'guāng gǎn', + 夹棍: 'jiā gùn', + 居丧: 'jū sāng', + 巨贾: 'jù gǔ', + 看押: 'kān yā', + 空转: 'kōng zhuàn', + 量力: 'liàng lì', + 蒙尘: 'meng chen', + 蒙难: 'méng nàn', + 炮烙: 'páo luò', + 赔还: 'péi huán', + 扑扇: 'pū shān', + 散记: 'sǎn jì', + 散件: 'sǎn jiàn', + 删削: 'shān xuē', + 射干: 'yè gàn', + 条几: 'tiáo jī', + 偷空: 'tōu kòng', + 削壁: 'xuē bì', + 校核: 'jiào hé', + 阴干: 'yīn gàn', + 择菜: 'zhái cài', + 重九: 'chóng jiǔ', + 主调: 'zhǔ diào', + 自禁: 'zì jīn', + 吧唧: 'bā jī', + 堡子: 'bǔ zi', + 便溺: 'biàn niào', + 词调: 'cí diào', + 叨咕: 'dáo gu', + 干粉: 'gàn fěn', + 俚曲: 'lǐ qǔ', + 落枕: 'lào zhěn', + 铺砌: 'pū qì', + 刷白: 'shuà bái', + 委靡: 'wěi mǐ', + 系泊: 'jì bó', + 相马: 'xiàng mǎ', + 行辈: 'háng bèi', + 熨帖: 'yù tiē', + 转筋: 'zhuàn jīn', + 棒喝: 'bàng hè', + 傧相: 'bīn xiàng', + 镐头: 'gǎo tóu', + 间苗: 'jiàn miáo', + 乐池: 'yuè chí', + 卖相: 'mài xiàng', + 难为: 'nán wéi', + 屏弃: 'bǐng qì', + 铅弹: 'qiān dàn', + 切变: 'qiē biàn', + 请调: 'qǐng diào', + 曲度: 'qǔ dù', + 群氓: 'qún méng', + 散板: 'sǎn bǎn', + 省察: 'xǐng chá', + 事假: 'shì jià', + 纤绳: 'qiàn shéng', + 重影: 'chóng yǐng', + 耕种: 'gēng zhòng', + 种地: 'zhòng dì', + 种菜: 'zhòng cài', + 栽种: 'zāi zhòng', + 接种: 'jiē zhòng', + 垦种: 'kěn zhòng', + 种殖: 'zhòng zhí', + 种瓜: 'zhòng guā', + 种豆: 'zhòng dòu', + 种树: 'zhòng shù', + 睡着: 'shuì zháo', + 笼子: 'lóng zi', +}; +const Pattern2 = Object.keys(DICT2).map((key) => ({ + zh: key, + pinyin: DICT2[key], + priority: 2, + length: 2, +})); + +const DICT3 = { + 为什么: 'wèi shén me', + 实际上: 'shí jì shang', + 检察长: 'jiǎn chá zhǎng', + 不由得: 'bù yóu de', + 差不多: 'chà bu duō', + 只不过: 'zhǐ bu guò', + 国内外: 'guó nèi wai', + 老人家: 'lǎo ren jia', + 干什么: 'gàn shén me', + 可不是: 'kě bù shì', + 这会儿: 'zhè huì er', + 尽可能: 'jǐn kě néng', + 董事长: 'dǒng shì zhǎng', + 了不起: 'liǎo bù qǐ', + 参谋长: 'cān móu zhǎng', + 舍不得: 'shě bu de', + 朝鲜族: 'cháo xiǎn zú', + 恨不得: 'hèn bu de', + 海内外: 'hǎi nèi wai', + 禁不住: 'jīn bú zhù', + 柏拉图: 'bó lā tú', + 怪不得: 'guài bu de', + 不在乎: 'bù zài hu', + 洛杉矶: 'luò shān ji', + 有点儿: 'yǒu diǎn er', + 迫击炮: 'pǎi jī pào', + 大丈夫: 'dà zhàng fu', + 进行曲: 'jìn xíng qǔ', + 免不了: 'miǎn bu liǎo', + 不得了: 'bù dé liǎo', + 过日子: 'guò rì zi', + 马尾松: 'mǎ wěi sōng', + 运输量: 'yùn shū liàng', + 发脾气: 'fā pí qi', + 过不去: 'guò bu qù', + 臭豆腐: 'chòu dòu fu', + 士大夫: 'shì dà fū', + 三部曲: 'sān bù qǔ', + 少不了: 'shǎo bu liǎo', + 仡佬族: 'gē lǎo zú', + 交响曲: 'jiāo xiǎng qǔ', + 分子式: 'fēn zǐ shì', + 好日子: 'hǎo rì zi', + 看样子: 'kàn yàng zi', + 鸭绿江: 'yā lù jiāng', + 巴不得: 'bā bu de', + 协奏曲: 'xié zòu qǔ', + 没关系: 'méi guān xi', + 不见得: 'bú jiàn de', + 压根儿: 'yà gēn er', + 对得起: 'duì de qǐ', + 那会儿: 'nà huì er', + 自个儿: 'zì gě er', + 物理量: 'wù lǐ liàng', + 怎么着: 'zěn me zhāo', + 明晃晃: 'míng huǎng huǎng', + 节假日: 'jié jià rì', + 心里话: 'xīn lǐ huà', + 发行量: 'fā xíng liàng', + 兴冲冲: 'xìng chōng chōng', + 分子量: 'fēn zǐ liàng', + 大不了: 'dà bu liǎo', + 国子监: 'guó zǐ jiàn', + 老大难: 'lǎo dà nán', + 了不得: 'liǎo bu dé', + 石狮子: 'shí shī zi', + 莫不是: 'mò bù shì', + 少不得: 'shǎo bu dé', + 党内外: 'dǎng nèi wai', + 这么着: 'zhè me zhāo', + 少奶奶: 'shào nǎi nai', + 暗地里: 'àn dì li', + 看不起: 'kàn bu qǐ', + 更年期: 'gēng nián qī', + 工作量: 'gōng zuò liàng', + 背地里: 'bèi dì li', + 山里红: 'shān li hóng', + 好好儿: 'hǎo hāo er', + 交响乐: 'jiāo xiǎng yuè', + 好意思: 'hǎo yì si', + 吐谷浑: 'tǔ yù hún', + 没意思: 'méi yì si', + 理发师: 'lǐ fà shī', + 奏鸣曲: 'zòu míng qǔ', + 塔什干: 'tǎ shí gàn', + 充其量: 'chōng qí liàng', + 靠得住: 'kào de zhù', + 车行道: 'chē háng dào', + 中郎将: 'zhōng láng jiàng', + 犯不着: 'fàn bu zháo', + 照明弹: 'zhào míng dàn', + 一溜烟: 'yī liù yān', + 烟幕弹: 'yān mù dàn', + 没奈何: 'mò nài hé', + 乱哄哄: 'luàn hōng hōng', + 惠更斯: 'huì gēng sī', + 载重量: 'zài zhòng liàng', + 瞧得起: 'qiáo de qǐ', + 纪传体: 'jì zhuàn tǐ', + 蚌埠市: 'bèng bù shì', + 冷不丁: 'lěng bu dīng', + 阿房宫: 'ē páng gōng', + 怨不得: 'yuàn bu de', + 卷心菜: 'juǎn xīn cài', + 戏班子: 'xì bān zi', + 过得去: 'guò děi qù', + 大肚子: 'dà dù zi', + 花岗石: 'huā gāng shí', + 外甥女: 'wài sheng nǚ', + 团团转: 'tuán tuán zhuàn', + 大堡礁: 'dà pù jiāo', + 燃烧弹: 'rán shāo dàn', + 劳什子: 'láo shí zi', + 摇滚乐: 'yáo gǔn yuè', + 身子骨: 'shēn zi gǔ', + 夹竹桃: 'jiā zhú táo', + 一刀切: 'yī dāo qiē', + 闹哄哄: 'nào hōng hōng', + 三连冠: 'sān lián guàn', + 重头戏: 'zhòng tóu xì', + 二人转: 'èr rén zhuàn', + 节骨眼: 'jiē gu yǎn', + 知识面: 'zhī shī miàn', + 护士长: 'hù shì zhǎng', + 架子车: 'jià zi chē', + 信号弹: 'xìn hào dàn', + 干电池: 'gàn diàn chí', + 枪杆子: 'qiāng gǎn zi', + 哭丧棒: 'kū sāng bàng', + 鼻咽癌: 'bí yān ái', + 瓦岗军: 'wǎ gāng jūn', + 买得起: 'mǎi de qǐ', + 拗不过: 'niù bu guò', + 癞蛤蟆: 'lài há ma', + 脊梁骨: 'jǐ liang gǔ', + 子母弹: 'zǐ mǔ dàn', + 开小差: 'kāi xiǎo chāi', + 女强人: 'nǚ qiáng rén', + 英雄传: 'yīng xióng zhuàn', + 大嫂子: 'dà sǎo zi', + 爵士乐: 'jué shì yuè', + 说笑话: 'shuō xiào hua', + 混日子: 'hùn rì zi', + 大鼻子: 'dà bí zi', + 碰头会: 'pèng tóu kuài', + 玻璃钢: 'bō li gāng', + 曳光弹: 'yè guāng dàn', + 少林拳: 'shào lín quán', + 咏叹调: 'yǒng tàn diào', + 豆腐干: 'dòu fǔ gàn', + 一个劲: 'yī gè jìn', + 少先队: 'shào xiān duì', + 灵长目: 'líng zhǎng mù', + 对着干: 'duì zhe gàn', + 蒙蒙亮: 'mēng mēng liàng', + 软骨头: 'ruǎn gǔ tou', + 不省得: 'bù xǐng de', + 铺盖卷: 'pū gài juǎn', + 和稀泥: 'huò xī ní', + 亭子间: 'tíng zi jiān', + 背黑锅: 'bēi hēi guō', + 红彤彤: 'hóng tōng tōng', + 武侯祠: 'wǔ hóu cí', + 打哆嗦: 'dǎ duō suo', + 地窨子: 'dì yìn zi', + 狂想曲: 'kuáng xiǎng qǔ', + 幻想曲: 'huàn xiǎng qǔ', + 户口簿: 'hù kǒu bù', + 腿肚子: 'tuǐ dù zi', + 马尾藻: 'mǎ wěi zǎo', + 练习曲: 'liàn xí qǔ', + 夜猫子: 'yè māo zi', + 折子戏: 'zhé zi xì', + 打手势: 'dǎ shǒu shì', + 龙王爷: 'lóng wáng yé', + 要面子: 'yào miàn zi', + 气头上: 'qì tóu shang', + 糊涂虫: 'hú tu chóng', + 笔杆子: 'bǐ gǎn zi', + 占便宜: 'zhàn pián yi', + 打主意: 'dǎ zhǔ yi', + 多弹头: 'duō dàn tóu', + 露一手: 'lòu yī shǒu', + 堰塞湖: 'yàn sè hú', + 保得住: 'bǎo de zhù', + 趵突泉: 'bào tū quán', + 钻空子: 'zuān kòng zi', + 奥得河: 'ào de hé', + 司务长: 'sī wù zhǎng', + 禁不起: 'jīn bu qǐ', + 什刹海: 'shí chà hǎi', + 莲花落: 'lián huā lào', + 一场空: 'yī cháng kōng', + 前奏曲: 'qián zòu qǔ', + 见世面: 'xiàn shì miàn', + 分子筛: 'fēn zǐ shāi', + 豁出去: 'huō chu qu', + 电位差: 'diàn wèi chā', + 挨个儿: 'āi gè er', + 那阵儿: 'nà zhèn er', + 给面子: 'gěi miàn zi', + 肺活量: 'fèi huó liàng', + 大师傅: 'dà shī fū', + 掷弹筒: 'zhì dàn tǒng', + 打呼噜: 'dǎ hū lu', + 广渠门: 'ān qú mén', + 未见得: 'wèi jiàn de', + 大婶儿: 'dà shěn er', + 谈得来: 'tán de lái', + 狮子头: 'shī zi tóu', + 脚丫子: 'jiǎo yā zi', + 变奏曲: 'biàn zòu qǔ', + 空包弹: 'kōng bāo dàn', + 窝里斗: 'wō li dòu', + 弹着点: 'dàn zhuó diǎn', + 免不得: 'miǎn bu de', + 个头儿: 'gè tóu er', + 看得起: 'kàn de qǐ', + 来不得: 'lái bu de', + 糊涂账: 'hú tu zhàng', + 大猩猩: 'dà xīng xing', + 一溜儿: 'yī liù ér', + 禁得起: 'jīn de qǐ', + 法相宗: 'fǎ xiāng zōng', + 可怜相: 'kě lián xiàng', + 吃得下: 'chī de xià', + 汉堡包: 'hàn pù bāo', + 闹嚷嚷: 'nào rāng rāng', + 数来宝: 'shǔ lái bǎo', + 抹脖子: 'mǒ bó zi', + 合得来: 'hé de lái', + 干性油: 'gàn xìng yóu', + 上辈子: 'shàng bèi zi', + 闷葫芦: 'mèn hú lú', + 呱呱叫: 'guā guā jiào', + 西洋参: 'xī yáng shēn', + 碰钉子: 'pèng dìng zǐ', + 林荫道: 'lín yīn dào', + 拉家常: 'lá jiā cháng', + 卷铺盖: 'juǎn pū gài', + 过得硬: 'guò de yìng', + 飞将军: 'fēi jiàng jūn', + 挑大梁: 'tiǎo dà liáng', + 哈巴狗: 'hǎ bā gǒu', + 过家家: 'guō jiā jiā', + 催泪弹: 'cuī lèi dàn', + 雨夹雪: 'yǔ jiā xuě', + 敲竹杠: 'qiāo zhū gàng', + 列车长: 'liè chē zhǎng', + 回旋曲: 'huí xuán qǔ', + 华达呢: 'huá dá ní', + 犯得着: 'fàn de zháo', + 土疙瘩: 'tǔ gē da', + 煞风景: 'shā fēng jǐng', + 轻量级: 'qīng liàng jí', + 羞答答: 'xiū dā dā', + 石子儿: 'shí zǐ er', + 大帽子: 'dà mào zi', + 达姆弹: 'dá mǔ dàn', + 摇篮曲: 'yáo lán qǔ', + 科教片: 'kē jiào piān', + 侃大山: 'kǎn tài shān', + 丁点儿: 'dīng diǎn er', + 吃得消: 'chī de xiāo', + 捋虎须: 'luō hǔ xū', + 间奏曲: 'jiàn zòu qǔ', + 高丽参: 'gāo lí shēn', + 安魂曲: 'ān hún qǔ', + 众生相: 'zhòng shēng xiàng', + 咽峡炎: 'yān xiá yán', + 禁得住: 'jīn de zhù', + 打拍子: 'dǎ pāi zi', + 催眠曲: 'cuī mián qǔ', + 臭架子: 'chòu jià zi', + 吃得开: 'chī de kāi', + 柞丝绸: 'zuò sī chóu', + 应声虫: 'yìng shēng chóng', + 数得着: 'shǔ de zháo', + 傻劲儿: 'shǎ jìn er', + 铅玻璃: 'qiān bō li', + 抹不开: 'mò bù kāi', + 可的松: 'kě dì sōng', + 划得来: 'huá de lái', + 红帽子: 'hóng mào zi', + 孩子王: 'hái zi wáng', + 晕乎乎: 'yùn hū hū', + 台柱子: 'tái zhù zi', + 屎壳郎: 'shǐ ke làng', + 尥蹶子: 'liào jué zǐ', + 空架子: 'kōng jià zi', + 藏红花: 'zàng hóng huā', + 说不着: 'shuō bù zháo', + 闷罐车: 'mèn guàn chē', + 卡脖子: 'qiǎ bó zi', + 红澄澄: 'hóng deng deng', + 赶得及: 'gǎn de jí', + 当间儿: 'dāng jiàn ér', + 露马脚: 'lòu mǎ jiǎo', + 鸡内金: 'jī nà jīn', + 犯得上: 'fàn děi shàng', + 钉齿耙: 'dīng chǐ bà', + 饱和点: 'bǎo huó diǎn', + 文曲星: 'wén qǔ xīng', + 翘辫子: 'qiào biàn zi', + 龙爪槐: 'lóng zhǎo huái', + 喝倒彩: 'hè dào cǎi', + 鸽子笼: 'gē zi lóng', + 定冠词: 'dìng guàn cí', + 担担面: 'dàn dan miàn', + 吃得住: 'chī de zhù', + 爪尖儿: 'zhuǎ jiān er', + 支着儿: 'zhī zhāo ér', + 折跟头: 'zhē gēn tou', + 炸丸子: 'zhá wán zǐ', + 阴着儿: 'yīn zhāo ér', + 烟卷儿: 'yān juǎn ér', + 宣传弹: 'xuān chuán dàn', + 信皮儿: 'xìn pí er', + 弦切角: 'xián qiē jiǎo', + 跳房子: 'tiào fáng zi', + 缩砂密: 'sù shā mì', + 说得来: 'shuō de lái', + 水漂儿: 'shuǐ piǎo ér', + 耍笔杆: 'shuǎ bǐ gǎn', + 数得上: 'shǔ děi shàng', + 数不着: 'shǔ bù zháo', + 数不清: 'shǔ bù qīng', + 什件儿: 'shí jiàn ér', + 狮子会: 'shī zi huì', + 生死簿: 'shēng sǐ bù', + 扇风机: 'shān fēng jī', + 散摊子: 'sàn tān zi', + 撒呓挣: 'sā yì zhēng', + 日记簿: 'rì jì bù', + 热得快: 'rè de kuài', + 曲别针: 'qǔ bié zhēn', + 亲家公: 'qìng jiā gōng', + 奇函数: 'jī hán shù', + 炮子儿: 'pào zǐ er', + 拍纸簿: 'pāi zhǐ bù', + 努劲儿: 'nǔ jìn er', + 泥娃娃: 'ní wá wa', + 内切圆: 'nèi qiē yuán', + 哪会儿: 'něi huì er', + 摸不着: 'mō bù zháo', + 闷头儿: 'mèn tou er', + 没谱儿: 'méi pǔ er', + 铆劲儿: 'mǎo jìn er', + 溜肩膀: 'liū jiān bǎng', + 了望台: 'liào wàng tái', + 老来少: 'lǎo lái shào', + 坤角儿: 'kūn jué ér', + 考勤簿: 'kǎo qín bù', + 卷笔刀: 'juǎn bǐ dāo', + 九重霄: 'jiǔ chóng xiāo', + 进给量: 'jìn jǐ liàng', + 划不来: 'huá bù lái', + 汗褂儿: 'hàn guà er', + 鼓囊囊: 'gǔ nāng nang', + 够劲儿: 'gòu jìn er', + 公切线: 'gōng qiē xiàn', + 搁得住: 'gé de zhù', + 搁不住: 'gé bú zhù', + 赶浪头: 'gǎn làng tóu', + 赶得上: 'gǎn děi shàng', + 干酵母: 'gàn jiào mǔ', + 嘎渣儿: 'gā zhā er', + 嘎嘣脆: 'gā bēng cuì', + 对得住: 'duì de zhù', + 逗闷子: 'dòu mèn zǐ', + 顶呱呱: 'dǐng guā guā', + 滴溜儿: 'dī liù ér', + 大轴子: 'dà zhòu zǐ', + 打板子: 'dǎ bǎn zi', + 寸劲儿: 'cùn jìn er', + 醋劲儿: 'cù jìn er', + 创牌子: 'chuàng pái zi', + 揣手儿: 'chuāi shǒu er', + 冲劲儿: 'chòng jìn er', + 吃得来: 'chī de lái', + 不更事: 'bù gēng shì', + 奔头儿: 'bèn tou er', + 百夫长: 'bǎi fū zhǎng', + 娃娃亲: 'wá wa qīn', + 死劲儿: 'sǐ jìng er', + 骨朵儿: 'gū duǒ er', + 功劳簿: 'gōng láo bù', +}; +const Pattern3 = Object.keys(DICT3).map((key) => ({ + zh: key, + pinyin: DICT3[key], + priority: 3, + length: 3, +})); + +const DICT4 = { + 成吉思汗: 'chéng jí sī hán', + 四通八达: 'sì tōng bā dá', + 一模一样: 'yī mú yī yàng', + 青藏高原: 'qīng zàng gāo yuán', + 阿弥陀佛: 'ē mí tuó fó', + 解放思想: 'jiè fàng sī xiǎng', + 所作所为: 'suǒ zuò suǒ wéi', + 迷迷糊糊: 'mí mí hu hū', + 荷枪实弹: 'hè qiāng shí dàn', + 兴高采烈: 'xìng gāo cǎi liè', + 无能为力: 'wú néng wéi lì', + 融为一体: 'róng wéi yī tǐ', + 布鲁塞尔: 'bù lǔ sài ěr', + 为所欲为: 'wéi suǒ yù wéi', + 审时度势: 'shěn shí duó shì', + 克什米尔: 'kè shí mǐ ěr', + 没完没了: 'méi wán méi liǎo', + 不为人知: 'bù wéi rén zhī', + 结结巴巴: 'jiē jiē bā bā', + 前仆后继: 'qián pū hòu jì', + 一年一度: 'yì nián yí dù', + 各行各业: 'gè háng gè yè', + 合二为一: 'hé èr wéi yī', + 被子植物: 'bèi zǐ zhí wù', + 铺天盖地: 'pū tiān gài dì', + 直截了当: 'zhí jié liǎo dàng', + 供不应求: 'gōng bù yìng qiú', + 御史大夫: 'yù shǐ dà fū', + 不为瓦全: 'bù wéi wǎ quán', + 不可收拾: 'bù kě shōu shi', + 胡作非为: 'hú zuò fēi wéi', + 分毫不差: 'fēn háo bù chā', + 模模糊糊: 'mó mó hu hū', + 不足为奇: 'bù zú wéi qí', + 如之奈何: 'rú zhī nai hé', + 悄无声息: 'qiǎo wú shēng xī', + 卷土重来: 'juǎn tǔ chóng lái', + 了如指掌: 'liǎo rú zhǐ zhǎng', + 深恶痛绝: 'shēn wù tòng jué', + 高高兴兴: 'gāo gāo xìng xìng', + 唉声叹气: 'āi shēng tàn qì', + 混为一谈: 'hùn wéi yī tán', + 不了了之: 'bù liǎo liǎo zhī', + 汉藏语系: 'hàn zàng yǔ xì', + 处心积虑: 'chǔ xīn jī lǜ', + 泣不成声: 'qǐ bù chéng shēng', + 半夜三更: 'bàn yè sān gēng', + 失魂落魄: 'shī hún luò pò', + 二十八宿: 'èr shí bā xiù', + 转来转去: 'zhuàn lái zhuàn qù', + 数以万计: 'shǔ yǐ wàn jì', + 相依为命: 'xiāng yī wéi mìng', + 恋恋不舍: 'liàn liàn bù shě', + 屈指可数: 'qū zhǐ kě shǔ', + 神出鬼没: 'shén chū guǐ mò', + 结结实实: 'jiē jiē shí shí', + 有的放矢: 'yǒu dì fàng shǐ', + 叽哩咕噜: 'jī lǐ gū lū', + 合而为一: 'hé ér wéi yī', + 调兵遣将: 'diào bīng qiǎn jiàng', + 载歌载舞: 'zài gē zài wǔ', + 转危为安: 'zhuǎn wēi wéi ān', + 踏踏实实: 'tā tā shi shí', + 桑给巴尔: 'sāng jǐ bā ěr', + 装模作样: 'zhuāng mú zuò yàng', + 见义勇为: 'jiàn yì yǒng wéi', + 相差无几: 'xiāng chā wú jǐ', + 叹为观止: 'tàn wéi guān zhǐ', + 闷闷不乐: 'mèn mèn bù lè', + 喜怒哀乐: 'xǐ nù āi lè', + 鲜为人知: 'xiǎn wéi rén zhī', + 张牙舞爪: 'zhāng yá wǔ zhǎo', + 为非作歹: 'wéi fēi zuò dǎi', + 一蹶不振: 'yī jué bù zhèn', + 含糊其辞: 'hán hú qí cí', + 疲于奔命: 'pí yú bēn mìng', + 勉为其难: 'miǎn wéi qí nán', + 依依不舍: 'yī yī bù shě', + 顶头上司: 'dǐng tóu shàng si', + 不着边际: 'bù zhuó biān jì', + 大模大样: 'dà mú dà yàng', + 寻欢作乐: 'xún huān zuò lè', + 一走了之: 'yī zǒu liǎo zhī', + 一年到头: 'yì nián dào tóu', + 字里行间: 'zì lǐ háng jiān', + 含含糊糊: 'hán hán hu hū', + 数一数二: 'shǔ yī shǔ èr', + 恰如其分: 'qià rú qí fèn', + 破涕为笑: 'pò tì wéi xiào', + 深更半夜: 'shēn gēng bàn yè', + 千差万别: 'qiān chā wàn bié', + 数不胜数: 'shǔ bù shèng shǔ', + 据为己有: 'jù wéi jǐ yǒu', + 天旋地转: 'tiān xuán dì zhuàn', + 养尊处优: 'yǎng zūn chǔ yōu', + 玻璃纤维: 'bō li xiān wéi', + 吵吵闹闹: 'chāo chao nào nào', + 晕头转向: 'yūn tóu zhuàn xiàng', + 土生土长: 'tǔ shēng tǔ zhǎng', + 宁死不屈: 'nìng sǐ bù qū', + 不省人事: 'bù xǐng rén shì', + 尽力而为: 'jìn lì ér wéi', + 精明强干: 'jīng míng qiáng gàn', + 唠唠叨叨: 'láo lao dāo dāo', + 叽叽喳喳: 'jī ji zhā zhā', + 功不可没: 'gōng bù kě mò', + 锲而不舍: 'qiè ér bù shě', + 排忧解难: 'pái yōu jiě nàn', + 稀里糊涂: 'xī li hú tú', + 异曲同工: 'yì qǔ tóng gōng', + 各有所长: 'gè yǒu suǒ chéng', + 的的确确: 'dí dí què què', + 一言为定: 'yī yán wéi dìng', + 哄堂大笑: 'hōng táng dà xiào', + 听而不闻: 'tīng ér bú wén', + 刀耕火种: 'dāo gēng huǒ zhòng', + 说不过去: 'shuō bu guò qù', + 内分泌腺: 'nèi fèn mì xiàn', + 化险为夷: 'huà xiǎn wéi yí', + 百发百中: 'bǎi fā bǎi zhòng', + 重见天日: 'chóng jiàn tiān rì', + 反败为胜: 'fǎn bài wéi shèng', + 一了百了: 'yī liǎo bǎi liǎo', + 大大咧咧: 'dà da liē liē', + 心急火燎: 'xīn jí huǒ liǎo', + 粗心大意: 'cū xīn dà yi', + 鸡皮疙瘩: 'jī pí gē da', + 夷为平地: 'yí wéi píng dì', + 日积月累: 'rì jī yuè lěi', + 设身处地: 'shè shēn chǔ dì', + 投其所好: 'tóu qí suǒ hào', + 间不容发: 'jiān bù róng fà', + 人满为患: 'rén mǎn wéi huàn', + 穷追不舍: 'qióng zhuī bù shě', + 为时已晚: 'wéi shí yǐ wǎn', + 如数家珍: 'rú shǔ jiā zhēn', + 心里有数: 'xīn lǐ yǒu shù', + 一盘散沙: 'yī pán sǎn shā', + 以牙还牙: 'yǐ yá huán yá', + 神不守舍: 'shén bù shǒu shě', + 孟什维克: 'mèng shí wéi kè', + 各自为战: 'gè zì wéi zhàn', + 怨声载道: 'yuàn shēng zài dào', + 一哄而散: 'yī hòng ér sàn', + 救苦救难: 'jiù kǔ jiù nàn', + 好好先生: 'hǎo hǎo xiān sheng', + 怪模怪样: 'guài mú guài yàng', + 抛头露面: 'pāo tóu lù miàn', + 游手好闲: 'yóu shǒu hào xián', + 无所不为: 'wú suǒ bù wéi', + 调虎离山: 'diào hǔ lí shān', + 步步为营: 'bù bù wéi yíng', + 好大喜功: 'hào dà xǐ gōng', + 众矢之的: 'zhòng shǐ zhī dì', + 长生不死: 'cháng shēng bū sǐ', + 蔚为壮观: 'wèi wéi zhuàng guān', + 不可胜数: 'bù kě shèng shǔ', + 鬼使神差: 'guǐ shǐ shén chāi', + 洁身自好: 'jié shēn zì hào', + 敢作敢为: 'gǎn zuò gǎn wéi', + 茅塞顿开: 'máo sè dùn kāi', + 走马换将: 'zǒu mǎ huàn jiàng', + 为时过早: 'wéi shí guò zǎo', + 为人师表: 'wéi rén shī biǎo', + 阴差阳错: 'yīn chā yáng cuò', + 油腔滑调: 'yóu qiāng huá diào', + 重蹈覆辙: 'chóng dǎo fù zhé', + 骂骂咧咧: 'mà ma liē liē', + 絮絮叨叨: 'xù xù dāo dāo', + 如履薄冰: 'rú lǚ bó bīng', + 损兵折将: 'sǔn bīng zhé jiàng', + 无可比拟: 'wú kě bǐ nì', + 拐弯抹角: 'guǎi wān mò jiǎo', + 像模像样: 'xiàng mú xiàng yàng', + 供过于求: 'gōng guò yú qiú', + 开花结果: 'kāi huā jiē guǒ', + 仔仔细细: 'zǐ zǐ xì xì', + 川藏公路: 'chuān zàng gōng lù', + 河北梆子: 'hé běi bāng zi', + 长年累月: 'cháng nián lěi yuè', + 正儿八经: 'zhèng er bā jīng', + 不识抬举: 'bù shí tái ju', + 重振旗鼓: 'chóng zhèn qí gǔ', + 气息奄奄: 'qì xī yān yān', + 紧追不舍: 'jǐn zhuī bù shě', + 服服帖帖: 'fú fu tiē tiē', + 强词夺理: 'qiǎng cí duó lǐ', + 噼里啪啦: 'pī li pā lā', + 人才济济: 'rén cái jǐ jǐ', + 发人深省: 'fā rén shēn xǐng', + 不足为凭: 'bù zú wéi píng', + 为富不仁: 'wéi fù bù rén', + 连篇累牍: 'lián piān lěi dú', + 呼天抢地: 'hū tiān qiāng dì', + 落落大方: 'luò luò dà fāng', + 自吹自擂: 'zì chuī zì léi', + 乐善好施: 'lè shàn hào shī', + 以攻为守: 'yǐ gōng wéi shǒu', + 磨磨蹭蹭: 'mó mó cèng cèng', + 削铁如泥: 'xuē tiě rú ní', + 助纣为虐: 'zhù zhòu wéi nüè', + 以退为进: 'yǐ tuì wéi jìn', + 重整旗鼓: 'chóng zhěng qí gǔ', + 嘁嘁喳喳: 'qī qī chā chā', + 枪林弹雨: 'qiāng lín dàn yǔ', + 令人发指: 'lìng rén fà zhǐ', + 转败为胜: 'zhuǎn bài wéi shèng', + 转弯抹角: 'zhuǎn wān mò jiǎo', + 在劫难逃: 'zài jié nán táo', + 正当防卫: 'zhèng dàng fáng wèi', + 不足为怪: 'bù zú wéi guài', + 难兄难弟: 'nàn xiōng nàn dì', + 咿咿呀呀: 'yī yī yā yā', + 弹尽粮绝: 'dàn jìn liáng jué', + 八旗子弟: 'bā qí zi dì', + 阿谀奉承: 'ē yú fèng chéng', + 稀里哗啦: 'xī li huā lā', + 返老还童: 'fǎn lǎo huán tóng', + 好高骛远: 'hào gāo wù yuǎn', + 灾难深重: 'zāi nán shēn zhòng', + 鹿死谁手: 'lù sǐ shéi shǒu', + 差强人意: 'chā qiáng rén yì', + 大吹大擂: 'dà chuī dà léi', + 成家立业: 'chéng jiā lì yiè', + 自怨自艾: 'zì yuàn zì yì', + 负债累累: 'fù zhai lěi lěi', + 古为今用: 'gǔ wéi jīn yòng', + 入土为安: 'rù tǔ wéi ān', + 下不为例: 'xià bù wéi lì', + 一哄而上: 'yì hōng ér shàng', + 一股劲儿: 'yī gǔ jìn er', + 没头苍蝇: 'méi tóu cāng ying', + 天差地远: 'tiān chā dì yuǎn', + 风卷残云: 'fēng juǎn cán yún', + 多灾多难: 'duō zāi duō nàn', + 乳臭未干: 'rǔ xiù wèi gān', + 行家里手: 'háng jiā lǐ shǒu', + 狼狈为奸: 'láng bèi wéi jiān', + 处变不惊: 'chǔ biàn bù jīng', + 一唱一和: 'yī chàng yī hè', + 一念之差: 'yī niàn zhī chā', + 金蝉脱壳: 'jīn chán tuō qiào', + 滴滴答答: 'dī dī dā dā', + 硕果累累: 'shuò guǒ léi léi', + 只知其一: 'zhǐ zhī qí yī', + 好整以暇: 'hào zhěng yǐ xiá', + 红得发紫: 'hóng de fā zǐ', + 传为美谈: 'chuán wéi měi tán', + 富商大贾: 'fù shāng dà gǔ', + 四海为家: 'sì hǎi wéi jiā', + 失而复得: 'shī ér fù de', + 了若指掌: 'liǎo ruò zhǐ zhǎng', + 大有可为: 'dà yǒu kě wéi', + 出头露面: 'chū tóu lù miàn', + 鼓鼓囊囊: 'gǔ gu nāng nāng', + 窗明几净: 'chuāng míng jī jìng', + 泰然处之: 'tài rán chǔ zhī', + 怒发冲冠: 'nù fà chōng guān', + 不甚了了: 'bù shèn liǎo liǎo', + 有机玻璃: 'yǒu jī bō li', + 骨头架子: 'gú tou jià zi', + 义薄云天: 'yì bó yún tiān', + 一丁点儿: 'yī dīng diǎn er', + 时来运转: 'shí lái yùn zhuǎn', + 陈词滥调: 'chén cí làn diào', + 七十二行: 'qī shí èr háng', + 化整为零: 'huà zhěng wéi líng', + 火烧火燎: 'huǒ shāo huǒ liǎo', + 干脆利索: 'gàn cuì lì suǒ', + 吊儿郎当: 'diào er láng dāng', + 广种薄收: 'guǎng zhòng bó shōu', + 种瓜得瓜: 'zhòng guā dé guā', + 种豆得豆: 'zhòng dòu dé dòu', + 难舍难分: 'nán shě nán fēn', + 歃血为盟: 'shà xuè wéi méng', + 奋发有为: 'fèn fā yǒu wéi', + 阴错阳差: 'yīn cuò yáng chā', + 东躲西藏: 'dōng duǒ xī cáng', + 烟熏火燎: 'yān xūn huǒ liǎo', + 钻牛角尖: 'zuān niú jiǎo jiān', + 乔装打扮: 'qiáo zhuāng dǎ bàn', + 改弦更张: 'gǎi xián gēng zhāng', + 河南梆子: 'hé nán bāng zi', + 好吃懒做: 'hào chī lǎn zuò', + 何乐不为: 'hé lè bù wéi', + 大出风头: 'dà chū fēng tóu', + 攻城掠地: 'gōng chéng lüě dì', + 漂漂亮亮: 'piào piào liang liang', + 折衷主义: 'zhé zhōng zhǔ yì', + 大马哈鱼: 'dà mǎ hǎ yú', + 绿树成荫: 'lǜ shù chéng yīn', + 率先垂范: 'shuài xiān chuí fàn', + 家长里短: 'jiā cháng lǐ duǎn', + 宽大为怀: 'kuān dà wéi huái', + 左膀右臂: 'zuǒ bǎng yòu bì', + 影子内阁: 'yǐng zi nèi gé', + 一笑了之: 'yī xiào liǎo zhī', + 天下为公: 'tiān xià wéi gōng', + 还我河山: 'huán wǒ hé shān', + 何足为奇: 'hé zú wéi qí', + 好自为之: 'hào zì wéi zhī', + 风姿绰约: 'fēng zī chuō yué', + 大雨滂沱: 'dà yǔ páng tuó', + 传为佳话: 'chuán wéi jiā huà', + 吃里扒外: 'chī lǐ pá wài', + 重操旧业: 'chóng cāo jiù yè', + 小家子气: 'xiǎo jiā zi qì', + 少不更事: 'shào bù gēng shì', + 难分难舍: 'nán fēn nán shě', + 只争朝夕: 'zhǐ zhēng zhāo xī', + 添砖加瓦: 'tiān zhuān jiē wǎ', + 是非分明: 'shì fēi fēn míng', + 舍我其谁: 'shě wǒ qí shuí', + 偏听偏信: 'piān tīng piāng xìn', + 量入为出: 'liàng rù wéi chū', + 降龙伏虎: 'xiáng lóng fú hǔ', + 故伎重演: 'gù jì zhòng yǎn', + 钢化玻璃: 'gāng huà bō li', + 正中下怀: 'zhèng zhòng xià huái', + 以身许国: 'yǐ shēng xǔ guó', + 一语中的: 'yī yǔ zhōng dì', + 丧魂落魄: 'sàng hún luò pò', + 三座大山: 'sān zuò tài shān', + 济济一堂: 'jǐ jǐ yī táng', + 好事之徒: 'hào shì zhī tú', + 干净利索: 'gàn jìng lì suǒ', + 出将入相: 'chū jiàng rù xiàng', + 袅袅娜娜: 'niǎo niǎo nuó nuó', + 狐狸尾巴: 'hú li wěi ba', + 好逸恶劳: 'hào yì wù láo', + 大而无当: 'dà ér wú dàng', + 打马虎眼: 'dǎ mǎ hu yǎn', + 板上钉钉: 'bǎn shàng dìng dīng', + 吆五喝六: 'yāo wǔ hè liù', + 虾兵蟹将: 'xiā bīng xiè jiàng', + 水调歌头: 'shuǐ diào gē tóu', + 数典忘祖: 'shǔ diǎn wàng zǔ', + 人事不省: 'rén shì bù xǐng', + 曲高和寡: 'qǔ gāo hè guǎ', + 偶一为之: 'ǒu yī wéi zhī', + 屡教不改: 'lǚ jiàn bù gǎi', + 互为因果: 'hù wéi yīn guò', + 互为表里: 'hù wéi biǎo lǐ', + 厚此薄彼: 'hòu cǐ bó bǐ', + 过关斩将: 'guò guān zhǎn jiàng', + 疙疙瘩瘩: 'gē gē dā dá', + 否极泰来: 'pǐ jí tài lái', + 大腹便便: 'dà fù pián pián', + 走为上策: 'zǒu wéi shàng cè', + 冤家对头: 'yuān jia duì tóu', + 有隙可乘: 'yǒu xì kě chèng', + 一无所得: 'yī wú suǒ dé', + 一鳞半爪: 'yī lín bàn zhǎo', + 一哄而起: 'yī hōng ér qǐ', + 片言只语: 'piàn yán zhǐ yǔ', + 开花结实: 'kāi huā jié shí', + 旧地重游: 'jiù dì chóng yóu', + 经年累月: 'jīng nián lěi yuè', + 含糊其词: 'hán hú qí cí', + 寡廉鲜耻: 'guǎ lián xiǎn chǐ', + 成年累月: 'chéng nián lěi yuè', + 不徇私情: 'bù xún sī qíng', + 不当人子: 'bù dāng rén zǐ', + 膀大腰圆: 'bǎng dà yāo yuán', + 指腹为婚: 'zhǐ fù wéi hūn', + 这么点儿: 'zhè me diǎn er', + 意兴索然: 'yì xīng suǒ rán', + 绣花枕头: 'xiù huā zhěn tóu', + 无的放矢: 'wú dì fàng shǐ', + 望闻问切: 'wàng wén wèn qiē', + 舍己为人: 'shě jǐ wèi rén', + 穷年累月: 'qióng nián lěi yuè', + 排难解纷: 'pái nàn jiě fēn', + 处之泰然: 'chǔ zhī tài rán', + 指鹿为马: 'zhǐ lù wéi mǎ', + 一吐为快: 'yī tǔ wéi kuài', + 一丘之貉: 'yī qiū zhī hé', + 危如累卵: 'wēi rú lěi luǎn', + 天兵天将: 'tiān bīng tiān jiàng', + 舍近求远: 'shě jìn qiú yuǎn', + 南腔北调: 'nán qiāng běi diào', + 苦中作乐: 'kǔ zhōng zuò lè', + 厚积薄发: 'hòu jī bó fā', + 戴绿帽子: 'dài lǜ mào zi', + 臭味相投: 'xiù wèi xiāng tóu', + 长幼有序: 'zhǎng yòu yǒu xù', + 逼良为娼: 'bī liáng wéi chāng', + 悲悲切切: 'bēi bēi qiè qiē', + 败军之将: 'bài jūn zhī jiàng', + 欺行霸市: 'qī háng bà shì', + 削足适履: 'xuē zú shì lǚ', + 先睹为快: 'xiān dǔ wéi kuài', + 啼饥号寒: 'tí jī háo hán', + 疏不间亲: 'shū bù jiàn qīn', + 神差鬼使: 'shén chāi guǐ shǐ', + 敲敲打打: 'qiāo qiāo dā dā', + 平铺直叙: 'píng pū zhí xù', + 没头没尾: 'méi tóu mò wěi', + 寥寥可数: 'liáo liáo kě shǔ', + 哼哈二将: 'hēng hā èr jiàng', + 鹤发童颜: 'hè fà tóng yán', + 各奔前程: 'gè bèn qián chéng', + 弹无虚发: 'dàn wú xū fā', + 大人先生: 'dà rén xiān sheng', + 与民更始: 'yǔ rén gēng shǐ', + 叶落归根: 'yè luò huī gēn', + 一目十行: 'yī mù shí háng', + 虚晃一枪: 'xiù huàng yī qiāng', + 树碑立传: 'shù bēi lì zhuàn', + 是非得失: 'shì fēi dé shī', + 实逼处此: 'shí bī chǔ cǐ', + 塞翁失马: 'sài wēng shī mǎ', + 日薄西山: 'rì bó xī shān', + 切身体会: 'qiē shēn tǐ huì', + 片言只字: 'piàn yán zhǐ zì', + 跑马卖解: 'pǎo mǎ mài xiè', + 宁折不弯: 'nìng zhé bù wān', + 零零散散: 'líng líng sǎn sǎn', + 量体裁衣: 'liàng tǐ cái yī', + 连中三元: 'lián zhòng sān yuán', + 礼崩乐坏: 'lǐ bēng yuè huài', + 胡子拉碴: 'hú zǐ lā chā', + 不为已甚: 'bù wéi yǐ shèn', + 转悲为喜: 'zhuǎn bēi wéi xǐ', + 以眼还眼: 'yǐ yǎn huán yǎn', + 蔚为大观: 'wèi wéi dà guān', + 未为不可: 'wèi wéi bù kě', + 童颜鹤发: 'tóng yán hè fà', + 朋比为奸: 'péng bǐ wéi jiān', + 莫此为甚: 'mò cǐ wéi shèn', + 老调重弹: 'lǎo diào zhòng dàn', + 夹枪带棒: 'jiā qiāng dài bàng', + 富商巨贾: 'fù shāng jù jiǎ', + 多劳多得: 'duō láo duō de', + 淡然处之: 'dàn rán chǔ zhī', + 箪食壶浆: 'dān sì hú jiāng', + 创巨痛深: 'chuāng jù tòng shēn', + 草长莺飞: 'cǎo zhǎng yīng fēi', + 坐视不救: 'zuò shī bù jiù', + 重起炉灶: 'chóng qǐ lú zào', + 以己度人: 'yǐ jǐ duó rén', + 随行就市: 'suí háng jiù shì', + 文以载道: 'wén yǐ zài dào', + 文不对题: 'wén bù duì tí', + 铁板钉钉: 'tiě bǎn dìng dīng', + 身体发肤: 'shēn tǐ fà fū', + 缺吃少穿: 'quē chī xhǎo chuān', + 目无尊长: 'mù wú zūn zhǎng', + 吉人天相: 'jí rén tiān xiàng', + 毁家纾难: 'huǐ jiā shū nàn', + 钢筋铁骨: 'gāng jīng tiě gǔ', + 丢卒保车: 'diū zú bǎo jū', + 丢三落四: 'diū sān là sì', + 闭目塞听: 'bì mù sè tīng', + 削尖脑袋: 'xuē jiān nǎo dài', + 为非作恶: 'wéi fēi zuò è', + 人才难得: 'rén cái cái dé', + 情非得已: 'qíng fēi dé yǐ', + 切中要害: 'qiē zhōng yào hài', + 火急火燎: 'huǒ jí huǒ liǎo', + 画地为牢: 'huà dì wéi láo', + 好酒贪杯: 'hào jiǔ tān bēi', + 长歌当哭: 'cháng gē dàng kū', + 载沉载浮: 'zài chén zài fú', + 遇难呈祥: 'yù nàn chéng xiáng', + 榆木疙瘩: 'yú mù gē da', + 以邻为壑: 'yǐ lín wéi hè', + 洋为中用: 'yáng wéi zhōng yòng', + 言为心声: 'yán wéi xīn shēng', + 言必有中: 'yán bì yǒu zhòng', + 图穷匕见: 'tú qióng bǐ xiàn', + 滂沱大雨: 'páng tuó dà yǔ', + 目不暇给: 'mù bù xiá jǐ', + 量才录用: 'liàng cái lù yòng', + 教学相长: 'jiào xué xiāng zhǎng', + 悔不当初: 'huǐ bù dāng chū', + 呼幺喝六: 'hū yāo hè liù', + 不足为训: 'bù zú wéi xùn', + 不拘形迹: 'bù jū xíng jī', + 傍若无人: 'páng ruò wú rén', + 八大山人: 'bā tài shān rén', + 罪责难逃: 'zuì zé nán táo', + 自我吹嘘: 'zì wǒ chuí xū', + 转祸为福: 'zhuǎn huò wéi fú', + 重峦叠嶂: 'chóng luán dié zhàng', + 勇冠三军: 'yǒng guàn sān jūn', + 易地而处: 'yì dì ér chǔ', + 一语破的: 'yī yǔ pò dì', + 卸磨杀驴: 'xiè mò shā lǘ', + 玩儿不转: 'wán ér bù zhuàn', + 天道好还: 'tiān dào hǎo huán', + 身单力薄: 'shēn dān lì bó', + 撒豆成兵: 'sǎ dòu chéng bīng', + 曲里拐弯: 'qū lǐ guǎn wān', + 片纸只字: 'piàn zhǐ yán zì', + 宁缺毋滥: 'nìng quē wù làn', + 没没无闻: 'mò mò wú wén', + 量力而为: 'liàng lì ér wéi', + 历历可数: 'lì lì kě shǔ', + 口碑载道: 'kǒu bēi zài dào', + 君子好逑: 'jūn zǐ hào qiú', + 好为人师: 'hào wéi rén shī', + 豪商巨贾: 'háo shāng jù jiǎ', + 各有所好: 'gè yǒu suǒ hào', + 度德量力: 'duó dé liàng lì', + 便宜从事: 'biàn yí cóng shì', + 指天为誓: 'zhǐ tiān wéi shì', + 逸兴遄飞: 'yì xìng chuán fēi', + 心宽体胖: 'xīn kuān tǐ pán', + 为德不卒: 'wéi dé bù zú', + 纨袴子弟: 'wán kǔ zǐ dì', + 天下为家: 'tiān xià wéi jiā', + 视为畏途: 'shì wéi wèi tú', + 舍己从人: 'shě jǐ cóng rén', + 三灾八难: 'sān zāi bā nàn', + 人自为战: 'rén zì wéi zhàn', + 群雌粥粥: 'qún cí yù yù', + 那么点儿: 'nà me diǎn er', + 沐猴而冠: 'mù hóu ér guàn', + 谋为不轨: 'móu wéi bù guǐ', + 明窗净几: 'míng chuāng jìng jī', + 哩哩啦啦: 'li li lā lā', + 见缝就钻: 'jiàn fèng jiù zuān', + 夹层玻璃: 'jiā céng bō li', + 急公好义: 'jí gōng hào yì', + 积年累月: 'jī nián lěi yuè', + 划地为牢: 'huá dì wéi láo', + 更名改姓: 'gèng míng gǎi xìng', + 奉为圭臬: 'fèng wéi guī niè', + 多难兴邦: 'duō nàn xīng bāng', + 顿开茅塞: 'dùn kāi máo sè', + 弹尽援绝: 'dàn jìn yuán jué', + 大脖子病: 'dà bó zi bìng', + 不破不立: 'bù può bù lì', + 坐地自划: 'zuò dì zì huá', + 坐不重席: 'zuò bù chóng xí', + 坐不窥堂: 'zùo bù kuī táng', + 作舍道旁: 'zuò shě dào páng', + 作嫁衣裳: 'zuò jià yī shāng', + 左支右吾: 'zuǒ zhī yòu wū', + 左枝右梧: 'zuǒ zhī yòu wū', + 左宜右有: 'zuǒ yí yòu fú', + 罪应万死: 'zuì yīng wàn sǐ', + 钻心刺骨: 'zuàn xīn cì gǔ', + 钻穴逾墙: 'zuān xué yú qiáng', + 钻穴逾隙: 'zuān xué yú xì', + 钻隙逾墙: 'zuān xì yú qiáng', + 钻头觅缝: 'zuān tóu mì fèng', + 钻天觅缝: 'zuàn tiān mì féng', + 钻天打洞: 'zuān tiān dǎ dòng', + 钻皮出羽: 'zuān pí chū yǔ', + 钻懒帮闲: 'zuān lǎn bāng xián', + 钻火得冰: 'zuān huǒ dé bīng', + 钻洞觅缝: 'zuàn dòng mì féng', + 钻冰求火: 'zuān bīng qiú huǒ', + 钻冰求酥: 'zuān bīng qiú sū', + 走为上着: 'zǒu wèi shàng zhaō', + 走花溜水: 'zǒu huā liū bīng', + 纵曲枉直: 'zòng qǔ wǎng zhí', + 自相惊忧: 'zì xiāng jīng rǎo', + 子为父隐: 'zǐ wéi fù yǐn', + 资深望重: 'zī shēng wàng zhòng', + 擢发难数: 'zhuó fà nán shǔ', + 擢发莫数: 'zhuó fà mò shǔ', + 着书立说: 'zhù shū lì shuō', + 着人先鞭: 'zhuó rén xiān biān', + 斫琱为朴: 'zhuó diāo wéi pǔ', + 斫雕为朴: 'zhuó diāo wéi pǔ', + 锥处囊中: 'zhuī chǔ náng zhōng', + 椎膺顿足: 'chuí yīng dùn zú', + 椎胸跌足: 'chuí xiōng diē zú', + 椎胸顿足: 'chuí xiōng dùn zú', + 椎心饮泣: 'chuí xīn yǐn qì', + 椎心泣血: 'chuí xīn qì xuè', + 椎心呕血: 'chuí xīn ǒu xuè', + 椎心顿足: 'chuí xīn dùn zú', + 椎天抢地: 'chuí tiān qiǎng dì', + 椎牛飨士: 'chuí niú xiǎng shì', + 椎牛歃血: 'chuí niú shà xuè', + 椎牛发冢: 'chuí niú fā zhǒng', + 椎埋屠狗: 'chuí mái tú gǒu', + 椎埋狗窃: 'chuí mái gǒu qiè', + 椎肤剥体: 'chuí fū bō tǐ', + 椎肤剥髓: 'chuí fū bō suǐ', + 椎锋陷阵: 'chuí fēng xiàn zhèn', + 椎锋陷陈: 'chuī fēng xiàn chén', + 追欢作乐: 'zhuī huān zuò lè', + 追风摄景: 'zhuī fēng niè jǐng', + 壮发冲冠: 'zhuàng fā chōng guàn', + 庄严宝相: 'zhuāng yán bǎo xiàng', + 转灾为福: 'zhuǎn zāi wéi fú', + 转湾抹角: 'zhuǎn wān mò jiǎo', + 转愁为喜: 'zhuǎn chóu wéi xǐ', + 转嗔为喜: 'zhuǎn chēn wéi xǐ', + 转败为成: 'zhuǎn bài wéi chéng', + 转败为功: 'zhuǎn bài wéi gōng', + 拽巷攞街: 'zhuài xiàng luǒ jiē', + 拽巷啰街: 'zhuài xiàng luó jiē', + 拽耙扶犁: 'zhuāi pá fú lí', + 拽布拖麻: 'zhuāi bù tuō má', + 箸长碗短: 'zhù chàng wǎn duǎn', + 铸剑为犁: 'zhù jiàn wéi lí', + 杼柚之空: 'zhù zhóu zhī kōng', + 杼柚其空: 'zhù zhóu qí kōng', + 杼柚空虚: 'zhù zhóu kōng xū', + 助天为虐: 'zhù tiān wéi nüè', + 助桀为虐: 'zhù jié wéi nüè', + 属垣有耳: 'zhǔ yuán yǒu ěr', + 属毛离里: 'zhǔ máo lí lǐ', + 属辞比事: 'zhǔ cí bǐ shì', + 属词比事: 'zhǔ cí bǐ shì', + 逐物不还: 'zhú wù bù huán', + 铢铢校量: 'zhū zhū xiào liàng', + 铢量寸度: 'zhū liáng cùn duó', + 铢两悉称: 'zhū liǎng xī chèn', + 铢积寸累: 'zhū jī cùn lěi', + 侏儒一节: 'zhū rǔ yī jié', + 侏儒观戏: 'zhū rǔ guān xì', + 朱槃玉敦: 'zhū pán yù duì', + 朱盘玉敦: 'zhū pán yù duì', + 朱轓皁盖: 'zhū fān hǎi gài', + 昼干夕惕: 'zhòu gàn xī tì', + 昼度夜思: 'zhòu duó yè sī', + 诪张为幻: 'zhōu zhāng wéi huàn', + 周郎顾曲: 'zhōu láng gù qǔ', + 侜张为幻: 'zhōu zhāng wéi huàn', + 重足一迹: 'chóng zú yī jì', + 重足屏息: 'chóng zú bǐng xī', + 重足屏气: 'chóng zú bǐng qì', + 重足累息: 'chóng zú lèi xī', + 重足而立: 'chóng zú ér lì', + 重纸累札: 'chóng zhǐ lèi zhá', + 重垣叠锁: 'chóng yuán dié suǒ', + 重垣迭锁: 'chóng yuán dié suǒ', + 重裀列鼎: 'chóng yīn liè dǐng', + 重岩叠嶂: 'chóng yán dié zhàng', + 重兴旗鼓: 'chóng xīng qí gǔ', + 重熙累叶: 'chóng xī lěi yè', + 重熙累盛: 'chóng xī lěi shèng', + 重手累足: 'chóng shǒu lěi zú', + 重山峻岭: 'chóng shān jùn lǐng', + 重山复水: 'chóng shān fù shuǐ', + 重山复岭: 'chóng shān fù lǐng', + 重三叠四: 'chóng sān dié sì', + 重三迭四: 'chóng sān dié sì', + 重气徇命: 'zhòng qì xùn míng', + 重纰貤缪: 'chóng pī yí miù', + 重葩累藻: 'chóng pā lèi zǎo', + 重明继焰: 'chóng míng jì yàn', + 重峦复嶂: 'chóng luán fù zhàng', + 重峦叠巘: 'chóng luán dié yǎn', + 重峦迭巘: 'chóng luán dié yǎn', + 重理旧业: 'chóng lǐ jiù yè', + 重金袭汤: 'chóng jīn xí tāng', + 重金兼紫: 'chóng jīn jiān zǐ', + 重迹屏气: 'chóng jì bǐng qì', + 重珪叠组: 'chóng guī dié zǔ', + 重规袭矩: 'chóng guī xí jǔ', + 重规叠矩: 'chóng guī dié jǔ', + 重规累矩: 'chóng guī lèi jǔ', + 重规迭矩: 'chóng guī dié jǔ', + 重规沓矩: 'chóng guī tà jǔ', + 重圭叠组: 'chóng guī dié zǔ', + 重睹天日: 'chóng dǔ tiān rì', + 重床叠屋: 'chóng chuáng dié wū', + 重床叠架: 'chóng chuáng dié jià', + 重床迭屋: 'chóng chuáng dié wū', + 重床迭架: 'chóng chuáng dié jià', + 众啄同音: 'zhòng zhòu tóng yīn', + 众星攒月: 'zhòng xīng cuán yuè', + 众毛攒裘: 'zhòng máo cuán qiú', + 众好众恶: 'zhòng hào zhòng wù', + 钟鼎人家: 'zhōng dǐng rén jia', + 擿植索涂: 'zhāi zhí suǒ tú', + 擿埴索涂: 'zhāi zhí suǒ tú', + 擿埴索途: 'zhāi zhí suǒ tú', + 稚齿婑媠: 'zhì chǐ wǒ tuǒ', + 致远任重: 'zhì yuǎn rèn zhàng', + 栉比鳞差: 'zhì bǐ lín cǐ', + 至当不易: 'zhì dàng bù yì', + 指皁为白: 'zhǐ zào wéi bái', + 指皂为白: 'zhǐ zào wéi bái', + 指雁为羹: 'zhǐ yàn wéi gēng', + 指树为姓: 'zhǐ shù wéi xìng', + 指山说磨: 'zhǐ shān shuō mò', + 指山卖磨: 'zhǐ shān mài mò', + 只争旦夕: 'zhǐ zhēng dàn xī', + 止戈为武: 'zhǐ gē wéi wǔ', + 植发穿冠: 'zhí fà chuān guàn', + 植发冲冠: 'zhí fà chōng guàn', + 直言切谏: 'zhí yán qiē jiàn', + 直扑无华: 'zhí pǔ wú huá', + 知疼着痒: 'zhī téng zháo yǎng', + 枝叶相持: 'zhī yè xīng chí', + 枝干相持: 'zhī gàn xiāng xhí', + 枝附叶着: 'zhī fù yiè zhuó', + 枝附叶著: 'zhī fù yiè zhuó', + 枝大于本: 'zhī dà yù běn', + 支吾其词: 'zhī wū qí cí', + 支分族解: 'zhī fē zú jiě', + 正中己怀: 'zhèng zhòng jǐ huái', + 正身率下: 'zhèng shēn shuài xià', + 正冠纳履: 'zhèng guàn nà lǚ', + 正冠李下: 'zhèng guàn lǐ xià', + 整冠纳履: 'zhěng guàn nà lǚ', + 整躬率物: 'zhěng gōng shuài wù', + 整顿干坤: 'zhěng dùn gàn kūn', + 蒸沙为饭: 'zhēng shā wéi fàn', + 振兵泽旅: 'zhèn bīng shì lǚ', + 枕席还师: 'zhěn xí huán shī', + 枕石漱流: 'zhěn shí sòu liú', + 枕石嗽流: 'zhěn shí shù liú', + 真相毕露: 'zhēn xiāng bì lù', + 针头削铁: 'zhēn tóu xuē tiě', + 贞松劲柏: 'zhēn sōng jìng bǎi', + 赭衣塞路: 'zhě yī sài lù', + 折腰五斗: 'shé yāo wǔ dòu', + 折箭为誓: 'shé jiàn wéi shì', + 折而族之: 'zhe er zu zi', + 昭德塞违: 'zhāo dé sè wéi', + 彰明较着: 'zhāng míng jiào zhù', + 章句小儒: 'zhāng jù xiāo rú', + 湛恩汪濊: 'zhàn ēn wāng hún', + 占风望气: 'zhān fēng wàng qì', + 占风使帆: 'zhān fēng shǐ fān', + 斩将刈旗: 'zhǎn jiàng yì qí', + 斩将搴旗: 'zhǎn jiàng qiān qí', + 斩钉切铁: 'zhǎn dīng qiē tiě', + 詹言曲说: 'zhān yán qǔ shuō', + 沾沾自好: 'zhān zhān zì hào', + 曾母投杼: 'zēng mǔ tóu zhù', + 曾参杀人: 'zēng shēn shā rén', + 曾不惨然: 'zeng bu chan ran', + 造谣中伤: 'zào yáo zhòng shāng', + 早占勿药: 'zǎo zhān wù yào', + 凿龟数策: 'záo guī shǔ cè', + 攒三集五: 'cuán sān jí wǔ', + 攒三聚五: 'cuán sān jù wǔ', + 攒眉苦脸: 'zǎn méi kǔ liǎn', + 攒眉蹙额: 'cuán mei cù é', + 攒零合整: 'cuán líng hé zhěng', + 攒锋聚镝: 'cuán fēng jù dí', + 载舟覆舟: 'zài zhōu fù zhōu', + 载一抱素: 'zài yī bào sù', + 载笑载言: 'zài xiào zài yán', + 载驱载驰: 'zài qū zài chí', + 载酒问字: 'zài jiǔ wèn zì', + 载歌且舞: 'zài gē qiě wǔ', + 运转时来: 'yùn zhuǎn shí lái', + 殒身不恤: 'yǔn shēn bú xù', + 云舒霞卷: 'yún shū xiá juǎn', + 云泥之差: 'yún ní zhī chā', + 岳镇渊渟: 'yuè zhèn yuān tīng', + 月中折桂: 'yuè zhōng shé guì', + 月没参横: 'yuè mò shēn héng', + 月落参横: 'yuè luò shēn héng', + 远不间亲: 'yuǎn bù jiàn qīn', + 鬻驽窃价: 'yù nǔ qiè jià', + 鬻鸡为凤: 'yù jī wéi fèng', + 遇难成祥: 'yù nàn chéng xiáng', + 郁郁累累: 'yù yù lěi lěi', + 吁天呼地: 'yù tiān hū dì', + 吁咈都俞: 'yù fú dōu yú', + 玉卮无当: 'yù zhī wú dàng', + 语笑喧阗: 'yǔ xiào xuān tiān', + 与世沉浮: 'yú shì chén fú', + 与时消息: 'yǔ shí xiāo xi', + 与民除害: 'yǔ hǔ chú hài', + 逾墙钻隙: 'yú qiáng zuān xì', + 渔阳鞞鼓: 'yǔ yáng pí gǔ', + 渔夺侵牟: 'yú duó qīn móu', + 鱼目混珎: 'yú mù hùn zhū', + 杅穿皮蠹: 'yú chuān shuǐ dù', + 余勇可贾: 'yú yǒng kě gǔ', + 予智予雄: 'yú zhì yú xióng', + 予取予携: 'yú qǔ yú xié', + 予取予求: 'yú qǔ yú qiú', + 予取予夺: 'yú qǔ yú duó', + 于家为国: 'yú jiā wéi guó', + 又弱一个: 'yòu ruò yī gè', + 有借无还: 'yǒu jiè wú huán', + 有加无已: 'yǒu jiā wǔ yǐ', + 有国难投: 'yǒu guó nán tóu', + 有蠙可乘: 'yǒu bīn kě chéng', + 游必有方: 'yōu bì yǒu fāng', + 油干灯尽: 'yóu gàn dēng jìn', + 尤云殢雨: 'yóu yún zhì yǔ', + 饔飧不给: 'yōng sūn bù jǐ', + 庸中皦皦: 'yōng zhōng bì tóng', + 蝇攒蚁聚: 'yíng cuán yǐ jù', + 郢书燕说: 'yǐng shū yān shuō', + 蝇攒蚁附: 'yíng cuán yǐ fù', + 营蝇斐锦: 'yíng yíng fēi jǐn', + 盈千累万: 'yíng qiān lěi wàn', + 盈篇累牍: 'yíng piān lěi dú', + 鹰心雁爪: 'yīng xīn yàn zhǎo', + 莺吟燕儛: 'yīng yín yàn sāi', + 应天顺时: 'yīng tiān shùn shí', + 印累绶若: 'yìn léi shòu ruò', + 隐占身体: 'yin zhan shen qi', + 饮犊上流: 'yìn dú shàng liú', + 饮冰食蘖: 'yǐn bīng shí bò', + 引绳切墨: 'yǐn shéng qiē mò', + 龈齿弹舌: 'yín chǐ dàn shé', + 淫言媟语: 'yín yán liǎng yǔ', + 淫词艳曲: 'yín cí yàn qǔ', + 因缘为市: 'yīn yuán wéi shì', + 因树为屋: 'yīn shù wéi wū', + 因祸为福: 'yīn huò wéi fú', + 因敌为资: 'yīn dí wéi zī', + 溢美溢恶: 'yì měi yì lè', + 逸兴云飞: 'yì xìng yún fēi', + 逸兴横飞: 'yì xìng héng fēi', + 抑塞磊落: 'yì sè lěi luò', + 倚闾望切: 'yǐ lǘ wàng qiē', + 蚁拥蜂攒: 'yǐ yōng fēng cuán', + 以紫为朱: 'yǐ zǐ wéi zhū', + 以意为之: 'yǐ yì wéi zhī', + 以言为讳: 'yǐ yán wéi huì', + 以微知着: 'yǐ wēi zhī zhù', + 以疏间亲: 'yǐ shū jiàn qīn', + 以水济水: 'yǐ shuǐ jǐ shuǐ', + 以书为御: 'yǐ shū wéi yù', + 以守为攻: 'yǐ shǒu wéi gōng', + 以升量石: 'yǐ shēng liáng dàn', + 以慎为键: 'yǐ shèn wéi jiàn', + 以日为年: 'yǐ rì wéi nián', + 以筌为鱼: 'yǐ quán wéi yú', + 以鹿为马: 'yǐ lù wéi mǎ', + 以利累形: 'yǐ lì lěi xíng', + 以毁为罚: 'yǐ huǐ wéi fá', + 以黑为白: 'yǐ hēi wéi bái', + 以规为瑱: 'yǐ guī wéi tiàn', + 以古为鉴: 'yǐ gǔ wéi jiàn', + 以宫笑角: 'yǐ gōng xiào jué', + 以法为教: 'yǐ fǎ wéi jiào', + 以耳为目: 'yǐ ěr wéi mù', + 以大恶细: 'yǐ dà wù xì', + 以不济可: 'yǐ fǒu jì kě', + 以白为黑: 'yǐ bái wéi hēi', + 遗世忘累: 'yí shì wàng lěi', + 遗寝载怀: 'yí qǐn zài huái', + 移孝为忠: 'yí xiào wéi zhōng', + 移的就箭: 'yí dì jiù jiàn', + 依头缕当: 'yī tóu lǚ dàng', + 衣租食税: 'yì zū shí shuì', + 衣轻乘肥: 'yì qīng chéng féi', + 衣裳之会: 'yī shāng zhī huì', + 衣锦食肉: 'yì jǐn shí ròu', + 衣锦过乡: 'yì jǐn guò xiāng', + 衣单食薄: 'yī dān shí bó', + 一重一掩: 'yī chóng yī yǎn', + 一之为甚: 'yī zhī wéi shèn', + 一笑了事: 'yī xiào le shì', + 一现昙华: 'yī xiàn tán huā', + 一岁载赦: 'yī suì zài shè', + 一切万物: 'yī qiē wàn wù', + 一目五行: 'yī mù wǔ háng', + 一鳞一爪: 'yī lín yī zhǎo', + 一鳞片爪: 'yī lín piàn zhǎo', + 一了百当: 'yī liǎo bǎi dàng', + 一见了然: 'yī jiàn le rán', + 一还一报: 'yī huán yī bào', + 一毫不差: 'yī háo bù chā', + 一倡百和: 'yī chàng bǎi hè', + 一鞭先著: 'yī biān xiān zhuó', + 一笔抹摋: 'yī bǐ mò sà', + 一暴十寒: 'yī pù shí hán', + 夜静更阑: 'yè jìng gēng lán', + 叶公好龙: 'yè gōng hào lóng', + 野调无腔: 'yě diào wú qiāng', + 咬血为盟: 'yǎo xuè wéi méng', + 瑶池女使: 'yáo shi nǚ shǐ', + 幺麽小丑: 'yāo mǒ xiǎo chǒu', + 养精畜锐: 'yǎng jīng xù ruì', + 仰屋着书: 'yǎng wū zhù shū', + 卬首信眉: 'áng shǒu shēn méi', + 洋洋纚纚: 'yáng yáng sǎ sǎ', + 羊羔美酒: 'yán gāo měi jiǔ', + 羊肠九曲: 'yáng cháng jiǔ qǔ', + 扬眉眴目: 'yáng méi shùn mù', + 扬厉铺张: 'yáng lì pù zhāng', + 扬风扢雅: 'yáng fēng bào yǎ', + 燕子衔食: 'yàn zǐ xián shí', + 燕昭市骏: 'yān zhāo shì jùn', + 燕昭好马: 'yān zhāo hǎo mǎ', + 燕石妄珍: 'yān shí wàng zhēn', + 燕雀处屋: 'yàn què chǔ wū', + 燕骏千金: 'yān jùn qiān jīn', + 燕金募秀: 'yān jīn mù xiù', + 燕驾越毂: 'yān jià yuè gū', + 燕歌赵舞: 'yān gē zhào wǔ', + 燕岱之石: 'yān dài zhī shí', + 燕处焚巢: 'yàn chǔ fén cháo', + 燕处危巢: 'yàn chǔ wēi cháo', + 燕巢幙上: 'yàn cháo yú shàng', + 掞藻飞声: 'shǎn zǎo fēi shēng', + 偃革为轩: 'yǎn gé wéi xuān', + 岩栖穴处: 'yán qī xué chǔ', + 岩居穴处: 'yán jū xué chǔ', + 妍蚩好恶: 'yán chī hǎo è', + 压良为贱: 'yā liáng wéi jiàn', + 搀行夺市: 'chān háng duó shì', + 三十六行: 'sān shí liù háng', + 泣数行下: 'qì shù háng xià', + 当行出色: 'dāng háng chū sè', + 目下十行: 'mù xià shí háng', + 秀出班行: 'xiù chū bān háng', + 儿女成行: 'ér nǚ chéng háng', + 大行大市: 'dà háng dà shì', + 十行俱下: 'shí háng jù xià', + 寻行数墨: 'xún háng shǔ mò', + 熏莸同器: 'xún yóu tóng qì', + 埙篪相和: 'xūn chí xiāng hè', + 血债累累: 'xuè zhài lěi lěi', + 雪鸿指爪: 'xuě hóng zhǐ zhǎo', + 衒玉贾石: 'zuì yù jiǎ shí', + 炫玉贾石: 'xuàn yù gǔ shí', + 炫石为玉: 'xuàn shí wéi yù', + 旋干转坤: 'xuán qián zhuǎn kūn', + 悬石程书: 'xuán dàn chéng shū', + 悬狟素飡: 'xuán huán sù kòu', + 悬龟系鱼: 'xuán guī jì yú', + 揎拳捰袖: 'xuān quán lǒng xiù', + 揎拳捋袖: 'xuān quán luō xiù', + 轩鹤冠猴: 'xuān hè guàn hóu', + 畜妻养子: 'xù qī yǎng zǐ', + 魆风骤雨: 'zhuō fēng zhòu yǔ', + 褎然冠首: 'yòu rán guàn shǒu', + 羞人答答: 'xiū rén dā dā', + 修鳞养爪: 'xiū lín yǎng zhǎo', + 熊据虎跱: 'xióng jù hǔ shēn', + 汹涌淜湃: 'xiōng yǒng péng pai', + 兄死弟及: 'xiōng féi dì jí', + 腥闻在上: 'xíng wén zài shàng', + 兴文匽武: 'xīng wén diào wǔ', + 兴如嚼蜡: 'xìng rú jiáo là', + 兴观群怨: 'xìng guān qún yuàn', + 兴高彩烈: 'xìng gāo cǎi liè', + 心瞻魏阙: 'xīn zhān wèi què', + 心在魏阙: 'xīn zài wèi què', + 心同止水: 'xīn rú zhǐ shuǐ', + 心手相应: 'xīn shǒu xiāng yìng', + 心手相忘: 'xīn shǒu xiāng wàng', + 心口相应: 'xīn kǒu xiāng yīng', + 心广体胖: 'xīn guǎng tǐ pán', + 心驰魏阙: 'xīn chí wèi què', + 心不应口: 'xīn bù yīng kǒu', + 挟势弄权: 'jiā shì nòng quán', + 胁肩累足: 'xié jiān lěi zú', + 邪魔外祟: 'xié mó wai suì', + 敩学相长: 'zuàn xué xiāng cháng', + 校短量长: 'jiào duǎn liáng cháng', + 小眼薄皮: 'xiǎo yǎn bó pí', + 小廉曲谨: 'xiǎo lián qǔ jǐn', + 硝云弹雨: 'xiāo yún dàn yǔ', + 鸮鸣鼠暴: 'zhāng míng shǔ bào', + 削株掘根: 'xuē zhū jué gēn', + 削铁无声: 'xuē tiě wú shēng', + 削职为民: 'xuē zhí wéi mín', + 削木为吏: 'xuē mù wéi lì', + 削草除根: 'xuē cǎo chú gēn', + 橡皮钉子: 'xiàng pí dìng zǐ', + 想望风褱: 'xiǎng wàng fēng shèng', + 香培玉琢: 'xiang pei yu zuo', + 相与为一: 'xiāng yǔ wéi yī', + 相鼠有皮: 'xiàng shǔ yǒu pí', + 相时而动: 'xiàng shí ér dòng', + 相切相磋: 'xiāng qiē xiāng cuō', + 相女配夫: 'xiàng nǚ pèi fū', + 相门有相: 'xiàng mén yǒu xiàng', + 挦章撦句: 'lóng zhāng zōng jù', + 先我着鞭: 'xiān wǒ zhuó biān', + 习焉不察: 'xī yān bù chá', + 歙漆阿胶: 'shè qī ē jiāo', + 晰毛辨发: 'xī máo biàn fà', + 悉索薄赋: 'xī suǒ bó fù', + 雾鳞云爪: 'wù lín yún zhǎo', + 误作非为: 'wù zuò fēi wéi', + 物稀为贵: 'wù xī wéi guì', + 舞爪张牙: 'wǔ zhǎo zhāng yá', + 碔砆混玉: 'zhì fū hùn yù', + 武断专横: 'wǔ duàn zhuān héng', + 五石六鹢: 'wǔ shí liù yī', + 五色相宣: 'wǔ sè xiāng xuān', + 五侯七贵: 'wǔ hòu qī guì', + 五侯蜡烛: 'wǔ hòu là zhú', + 五羖大夫: 'wǔ gǔ dà fū', + 吾自有处: 'wu zi you chu', + 无与为比: 'wú yǔ wéi bǐ', + 无下箸处: 'wú xià zhù chǔ', + 无適无莫: 'wú dí wú mò', + 无伤无臭: 'wú shēng wú xiù', + 无能为役: 'wú néng wéi yì', + 无寇暴死: 'wu kou bào shi', + 无孔不钻: 'wú kǒng bù zuān', + 无间可伺: 'wú jiān kě sì', + 无间可乘: 'wú jiān kě chéng', + 无间冬夏: 'wú jiān dōng xià', + 无缝天衣: 'wú féng tiān yī', + 无恶不为: 'wú è bù wéi', + 无动为大: 'wú dòng wéi dà', + 无地自处: 'wú dì zì chǔ', + 诬良为盗: 'wū liáng wéi dào', + 握粟出卜: 'wò sù chū bo', + 握拳透爪: 'wò quán tòu zhǎo', + 稳操左券: 'wén cāo zuǒ quàn', + 闻风响应: 'wén fēng xiǎng yīng', + 文武差事: 'wén wǔ chà shì', + 文身剪发: 'wén shēn jiǎn fā', + 文房四侯: 'wén fáng sì hòu', + 温枕扇席: 'wēn zhěn shān xí', + 温席扇枕: 'wēn xí shān zhěn', + 温凊定省: 'wēn qǐng dìng shěng', + 温衾扇枕: 'wēn qīn shān zhěn', + 亹亹不倦: 'tān wěi bù juàn', + 委委佗佗: 'wēi wēi tuó tuó', + 委曲成全: 'wěi qǔ chéng quán', + 尾大难掉: 'wěi dà nán diào', + 惟所欲为: 'wéi suǒ yù wéi', + 惟日为岁: 'wéi rì wéi suì', + 惟利是趋: 'wéi lì shì qú', + 帷薄不修: 'wéi bó bù xiū', + 唯唯否否: 'wěi wěi fǒu fǒu', + 唯所欲为: 'wéi suǒ yù wéi', + 为蛇添足: 'wéi shé tiān zú', + 为善最乐: 'wéi shàn zuì lè', + 为蛇画足: 'wéi shé huà zú', + 为山止篑: 'wéi shān zhǐ kuì', + 为仁不富: 'wéi rén bù fù', + 为裘为箕: 'wéi qiú wéi jī', + 为民父母: 'wéi mín fù mǔ', + 为虺弗摧: 'wéi huǐ fú cuī', + 为好成歉: 'wéi hǎo chéng qiàn', + 为鬼为蜮: 'wéi guǐ wéi yù', + 为法自弊: 'wéi fǎ zì bì', + 为恶不悛: 'wéi è bù quān', + 为德不终: 'wéi dé bù zhōng', + 煨干就湿: 'wēi gàn jiù shī', + 煨干避湿: 'wēi gàn bì shī', + 危于累卵: 'wēi yú lěi luǎn', + 望风响应: 'wàng fēng xiǎng yīng', + 望尘僄声: 'wàng chén bù shēng', + 枉曲直凑: 'wǎng qǔ zhí còu', + 往渚还汀: 'wǎng zhǔ huán tīng', + 王贡弹冠: 'wáng gòng dàn guàn', + 亡魂失魄: 'wáng hún shī hún', + 亡国大夫: 'wáng guó dà fū', + 万载千秋: 'wàn zài qiān qiū', + 万贯家私: 'wàn guàn ji sī', + 万夫不当: 'wàn fū bù dāng', + 万别千差: 'wàn bié qiān chā', + 晚食当肉: 'wǎn shí dàng ròu', + 晚节不保: 'wǎn jíe bù bǎo', + 玩岁愒月: 'wán suì yī yuè', + 玩岁愒时: 'wán suì yī shí', + 玩时愒日: 'wán shí ài rì', + 蛙蟆胜负: 'wā má shèng fù', + 吞言咽理: 'tūn yán yān lǐ', + 颓垣断堑: 'tuí yuán duàn piàn', + 推枯折腐: 'tuī kū shé fǔ', + 推干就湿: 'tuī gàn jiù shī', + 剸繁治剧: 'shí fán zhì jù', + 剸繁决剧: 'shí fán jué jù', + 团头聚面: 'tuàn tóu jù miàn', + 兔走鹘落: 'tù zǒu gǔ luò', + 兔丝燕麦: 'tù sī yàn mài', + 兔头麞脑: 'tù tóu suō nǎo', + 兔葵燕麦: 'tù kuí yàn mài', + 兔角龟毛: 'tu jiao gui mao', + 吐哺握发: 'tǔ bǔ wò fà', + 徒讬空言: 'tú tún kōng yán', + 投传而去: 'tóu zhuàn ér qù', + 头足异处: 'tóu zú yì chǔ', + 头上著头: 'tóu shàng zhuó tóu', + 头没杯案: 'tóu mò bēi àn', + 头昏脑闷: 'tóu hūn nǎo mèn', + 头会箕敛: 'tóu kuàn jī liǎn', + 头会箕赋: 'tóu kuài jī fù', + 头出头没: 'tóu chū tóu mò', + 痛自创艾: 'tòng zì chuāng yì', + 痛深恶绝: 'tòng shēn wù jué', + 同源异派: 'tóng yuán yì pai', + 同心僇力: 'tóng xīn jié lì', + 同工异曲: 'tóng gōng yì qǔ', + 同恶相助: 'tóng wù xiāng zhù', + 同恶相恤: 'tóng wù xiāng xù', + 痌瘝在抱: 'tōng guān zào bào', + 通文调武: 'tōng wén diào wǔ', + 通同一气: 'tōng tóng yī yì', + 铤鹿走险: 'dìng lù zǒu xiǎn', + 停留长智: 'tíng liú zhǎng zhì', + 铁树开华: 'tiě shù kāi huā', + 条贯部分: 'tiáo guàn bù fēn', + 挑牙料唇: 'tiǎo yá liào chún', + 挑么挑六: 'tiāo yāo tiāo liù', + 挑唇料嘴: 'tiǎo chún liào zuǐ', + 靦颜事仇: 'tiǎn yán shì chóu', + 恬不为意: 'tián bù wéi yì', + 恬不为怪: 'tián bù wéi guài', + 天下为笼: 'tiān xià wéi lóng', + 天台路迷: 'tiān tái lù mí', + 天年不遂: 'tiān nián bù suì', + 天宝当年: 'tian bao dang nian', + 桃蹊柳曲: 'táo qī liǔ qǔ', + 堂皇冠冕: 'táng huáng guàn miǎn', + 探囊胠箧: 'tàn náng wú qiè', + 谭言微中: 'tán yán wēi zhòng', + 谈言微中: 'tán yán wēi zhòng', + 贪夫狥财: 'tān fū huái cái', + 泰山盘石: 'tai shān pán shí', + 泰来否往: 'tài lái pǐ wǎng', + 泰来否极: 'tai lái fǒu jí', + 泰极而否: 'tài jí ér pǐ', + 狧穅及米: 'shì kǎn jí mǐ', + 损军折将: 'sǔn jūn zhé jiàng', + 遂心应手: 'suì xīn yīng shǒu', + 遂迷不窹: 'suí méi bù wù', + 岁月不居: 'suì yuè bù jú', + 岁聿其莫: 'suì yù qí mù', + 随物应机: 'suí wù yīng jī', + 随风而靡: 'suí fēng ér mǐ', + 宿雨餐风: 'xiǔ yǔ cān fēng', + 宿水飡风: 'xiǔ shuǐ cān fēng', + 宿水餐风: 'xiǔ shuǐ cān fēng', + 夙兴夜处: 'sù xīng yè chǔ', + 搜岩采干: 'sōu yán cǎi gàn', + 薮中荆曲: 'sǒu zhōng jí qǔ', + 宋斤鲁削: 'sòng jīn lǔ xuē', + 松筠之节: 'sōng jūn zhī jié', + 騃童钝夫: 'ái tóng dùn fū', + 騃女痴男: 'ái nǚ chī nán', + 四亭八当: 'sì tíng bā dàng', + 四马攒蹄: 'sì mǎ cuán tí', + 四不拗六: 'sì bù niù liù', + 斯事体大: 'ī shì tǐ dà', + 思所逐之: 'si shuo zhu zi', + 丝恩发怨: 'sī ēn fà yuàn', + 硕望宿德: 'shuò wàng xiǔ dé', + 铄古切今: 'shuò gǔ qiē jīn', + 顺天应时: 'shùn tiān yīng shí', + 顺风转舵: 'shǔn fēng zhuǎn duò', + 顺风驶船: 'shǔn fēng shǐ chuán', + 顺风使船: 'shǔn fēng shǐ chuán', + 顺风而呼: 'shǔn fēng ér hū', + 顺风吹火: 'shǔn fēng chuī huǒ', + 水中捉月: 'shui zhong zhuo yue', + 水中著盐: 'shuǐ zhōng zhuó yán', + 水宿风餐: 'shuǐ xiǔ fēng cān', + 水米无干: 'shuǐ mǐ wú gàn', + 水长船高: 'shuǐ zhǎng chuán gāo', + 双足重茧: 'shuāng zú chóng jiǎn', + 双柑斗酒: 'shuài gān dǒu jiǔ', + 数米而炊: 'shǔ mǐ ér chuī', + 数往知来: 'shǔ wǎng zhī lái', + 数米量柴: 'shǔ mǐ ér chái', + 数理逻辑: 'shù lǐ luó ji', + 数见不鲜: 'shuò jiàn bù xiān', + 数黄道黑: 'shu huang dao hei', + 数黑论黄: 'shǔ hēi lùn huáng', + 数短论长: 'shǔ duǎn lùn cháng', + 数白论黄: 'shǔ bái lùn huáng', + 束缊还妇: 'shù yūn huán fù', + 束缊举火: 'shù yūn jǔ huǒ', + 束身自好: 'shù shēn zì hào', + 束蒲为脯: 'shù pú wéi pú', + 束带结发: 'shù dài jié fā', + 束椽为柱: 'shù chuán wéi zhù', + 书缺有间: 'shū quē yǒu jiàn', + 瘦骨梭棱: 'shòu gǔ léng léng', + 首足异处: 'shǒu zú yì chǔ', + 手足重茧: 'shǒu zú chóng jiǎn', + 手足异处: 'shǒu zú yì chǔ', + 手脚干净: 'shǒu jiǎo gàn jìng', + 手不应心: 'shǒu bù yīng xīn', + 螫手解腕: 'shì shǒu jǐe wǎn', + 释知遗形: 'shì shì yí xíng', + 适时应务: 'shì shí yīng wù', + 适如其分: 'shì rú qí fèn', + 适情率意: 'shì qíng shuài yì', + 适居其反: 'shì jú qí fǎn', + 适当其时: 'shì dāng qí shí', + 适当其冲: 'shì dāng qí chōng', + 饰非遂过: 'shì fēi suí guò', + 视为知己: 'shì wéi zhī jǐ', + 视为儿戏: 'shì wéi ér xì', + 视微知著: 'shì wēi zhī zhuó', + 事与心违: 'shì yù xīn wéi', + 使羊将狼: 'shǐ yáng jiàng láng', + 食为民天: 'shí wéi mín tiān', + 食不重味: 'shí bù chóng wèi', + 食不重肉: 'shí bù zhóng ròu', + 拾掇无遗: 'shi duo wu yi', + 拾带重还: 'shí dài zhòng huán', + 实与有力: 'shí yù yǒu lì', + 实偪处此: 'shí bèng chǔ cǐ', + 识微知著: 'shí wēi zhī zhuó', + 时运不齐: 'shí yùn bù jì', + 时亨运泰: 'shí hēng yùn tai', + 石英玻璃: 'shí yīng bō li', + 石室金匮: 'shí shì jīn guì', + 什袭珍藏: 'shí xí zhēn cáng', + 什袭以藏: 'shí xí yǐ cáng', + 什伍东西: 'shí wǔ dōng xī', + 什袭而藏: 'shí xī ér cáng', + 什围伍攻: 'shí wéi wǔ gōng', + 十魔九难: 'shí mó jiǔ nàn', + 十夫楺椎: 'shí fū zhī zhuī', + 十不当一: 'shí bù huò yī', + 诗书发冢: 'shī shū fà zhǒng', + 虱处裈中: 'shī chǔ kūn zhōng', + 师直为壮: 'shī zhí wéi zhuàng', + 失马塞翁: 'shī mǎ sài wēng', + 尸居龙见: 'shī jū lóng xiàn', + 盛水不漏: 'chéng shuǐ bù lòu', + 圣经贤传: 'shèng jīng xián zhuàn', + 圣君贤相: 'shèng jīng xián xiàng', + 生拖死拽: 'shēng tuō sǐ zhuāi', + 审曲面埶: 'shěn qǔ miàn xīn', + 审己度人: 'shěn jǐ duó rén', + 沈博绝丽: 'chén bó jué lì', + 神武挂冠: 'shén wǔ guà guàn', + 神龙失埶: 'shén lóng shī zhì', + 神号鬼哭: 'shén háo guǐ kū', + 神不收舍: 'shén bù shōu shě', + 深文周内: 'shēn wén zhōu nà', + 深文曲折: 'shēn wén qǔ shé', + 深切着明: 'shēn qiē zhe míng', + 深切着白: 'shēn qiē zhe bái', + 深厉浅揭: 'shēn lì qiǎn qì', + 深谷为陵: 'shēn gǔ wéi líng', + 深恶痛疾: 'shēn wù tòng jí', + 深恶痛嫉: 'shēn wù tòng jí', + 深仇宿怨: 'shēn chóu xiǔ yuàn', + 设心处虑: 'shè xīn chǔ lǜ', + 舍近务远: 'shě jìn wù yuǎn', + 舍己为公: 'shě jǐ wèi gōng', + 舍近即远: 'shě jìn jí yuǎn', + 舍短取长: 'shě duǎn qǔ cháng', + 舍策追羊: 'shě cè zhuī yáng', + 蛇蝎为心: 'shé xiē wéi xīn', + 少年老诚: 'shǎo nián lǎo chéng', + 少成若性: 'shào chéng ruò xìng', + 少不经事: 'shào bù jīng shì', + 上当学乖: 'shàng dāng xué guāi', + 赏不当功: 'shǎng bù dāng gōng', + 善自为谋: 'shàn zì wéi móu', + 善为说辞: 'shàn wéi shuō cí', + 善善恶恶: 'shàn shàn wù è', + 善贾而沽: 'shàn jià ér gū', + 善财难舍: 'shàn cái nán shě', + 扇枕温席: 'shān zhěn wēn xí', + 扇枕温被: 'shān zhěn wēn chuáng', + 苫眼铺眉: 'shān yǎn pū méi', + 讪牙闲嗑: 'shàn yá xián kē', + 山峙渊渟: 'shān zhì yuān zī', + 山阴乘兴: 'shān yīn chéng xīng', + 山殽野湋: 'shān yāo yě fù', + 山溜穿石: 'shān liù chuān shí', + 山节藻棁: 'shān jié zǎo lì', + 沙鸥翔集: 'sha ou xiang ji', + 杀衣缩食: 'shài yī suō shí', + 杀鸡为黍: 'shā jī wéi shǔ', + 色厉胆薄: 'sè lì dǎn bó', + 丧胆销魂: 'sàng hún xiāo hún', + 桑荫未移: 'sāng yīn wèi yí', + 桑荫不徙: 'sāng yīn bù xǐ', + 桑土绸缪: 'sāng tǔ chóu miù', + 桑户棬枢: 'sāng hù juàn shū', + 三战三北: 'sān zhān sān běi', + 三占从二: 'sān zhān cóng èr', + 三瓦两舍: 'sān wǎ liǎng shě', + 三人为众: 'sān rén wèi zhòng', + 三差五错: 'sān chā wǔ cuò', + 三差两错: 'sān chā liǎng cuò', + 三不拗六: 'sān bù niù liù', + 塞翁之马: 'sài wēng zhī mǎ', + 塞翁得马: 'sài wēng dé mǎ', + 塞井焚舍: 'sāi jǐng fén shě', + 洒心更始: 'sǎ xīn gèng shǐ', + 洒扫应对: 'sǎ sào yìng duì', + 软红香土: 'ruǎn hóng xiāng yù', + 入孝出弟: 'rù xiào chū tì', + 入吾彀中: 'rù wǔ gòu zhōng', + 入铁主簿: 'rù tiě zhǔ bù', + 入理切情: 'rù lǐ qiē qíng', + 汝成人耶: 'nu cheng ren ye', + 如水投石: 'rú shǔ tóu shí', + 如切如磋: 'rú qiē rú cuō', + 如登春台: 'rú dé chūn tái', + 肉薄骨并: 'ròu bó gǔ bìng', + 柔情绰态: 'róu qíng chuō tai', + 戎马劻勷: 'róng mǎ dān xiào', + 日朘月削: 'rì juān yuè xuē', + 日中为市: 'rì zhōng wéi shì', + 日中必湲: 'rì zhōng bì tóng', + 日月参辰: 'rì yuè shēn chén', + 日省月修: 'rì xǐng yuè xiū', + 日削月割: 'rì xuē yuè gē', + 日削月朘: 'rì xuē yuè juān', + 日省月试: 'rì xǐng yuè shì', + 日省月课: 'rì xǐng yuè kè', + 日不暇给: 'rì bù xiá jǐ', + 认贼为父: 'rèn zéi wéi fù', + 任达不拘: 'rèn láo bù jū', + 认影为头: 'rèn yǐng wéi tóu', + 认贼为子: 'rèn zéi wéi zǐ', + 人足家给: 'rén zú jiā jǐ', + 人言藉藉: 'rén yán jí jí', + 人模狗样: 'rén mú gǒu yàng', + 人莫予毒: 'rén mò yú dú', + 人给家足: 'rén jǐ jiā zú', + 热熬翻饼: 'rě áo fān bǐng', + 群居穴处: 'qún jū xué chǔ', + 却老还童: 'què lǎo huán tóng', + 权倾中外: 'quán qīng zhōng wai', + 圈牢养物: 'juàn láo yǎng wù', + 去太去甚: 'qù tai qù shèn', + 取予有节: 'qǔ yù yǒu jié', + 诎要桡腘: 'qū yào ráo yù', + 曲终奏雅: 'qǔ zhōng zòu yǎ', + 曲意迎合: 'qǔ yì yíng hé', + 曲意奉迎: 'qǔ yì fèng yíng', + 曲意承迎: 'qǔ yì chéng yíng', + 曲学阿世: 'qǔ xué ā shì', + 曲突移薪: 'qǔ tū yí xīn', + 曲眉丰颊: 'qǔ méi fēng jiá', + 曲肱而枕: 'qǔ gōng ér zhěn', + 秋实春华: 'qiū shí chūn huā', + 穷形尽相: 'qióng xíng jìn xiàng', + 穷年累世: 'qióng nián lěi shì', + 情凄意切: 'qíng qī yì qiē', + 情见埶竭: 'qíng jiàn zhōu jié', + 情见势屈: 'qíng xiàn shì qū', + 情见力屈: 'qíng xiàn lì qū', + 情见乎辞: 'qíng xiàn hū cí', + 清风劲节: 'qīng fēng jìng jié', + 清都绛阙: 'qīng dōu jiàng què', + 清辞丽曲: 'qīng cí lì qǔ', + 倾肠倒肚: 'qīng cháng dào dǔ', + 轻嘴薄舌: 'qīng zuǐ bó shé', + 轻傜薄赋: 'qīng yāo báo fù', + 轻骑简从: 'qīng jì jiǎn cóng', + 轻财好义: 'qīng cái hào yì', + 轻薄无知: 'qīng báo wú zhī', + 轻才好施: 'qīng cái hào shī', + 轻薄无礼: 'qīng báo wú lǐ', + 青紫被体: 'qīng zǐ pī tǐ', + 青林黑塞: 'qīng lín hēi sài', + 青红皁白: 'qīng hóng tóu bái', + 寝苫枕干: 'qǐn shān zhěn gàn', + 螓首蛾眉: 'qín shǒu ér méi', + 擒奸擿伏: 'qín jiān fā fú', + 琴瑟之好: 'qí sè zhī hǎo', + 挈瓶之知: 'qiè píng zhī zhì', + 且住为佳: 'qiě zhù wéi jiā', + 切树倒根: 'qiē shù dǎo gēn', + 切理餍心: 'qiē lǐ yàn xīn', + 切理厌心: 'qiē lǐ yàn xīn', + 切理会心: 'qiē lǐ huì xīn', + 切近的当: 'qiē jìn de dāng', + 切瑳琢磨: 'qiē cùn zhuó mó', + 翘足引领: 'qiáo zú yǐn lǐng', + 翘足而待: 'qiáo zú ér dài', + 巧发奇中: 'qiǎo fā qí zhòng', + 抢地呼天: 'qiāng dì hū tiān', + 强嘴拗舌: 'jiàng zuǐ niù shé', + 强自取折: 'qiáng zì qǔ shé', + 强直自遂: 'qiáng zhí zì suí', + 强文浉醋: 'qiǎng wén jiǎ cù', + 强文假醋: 'qiǎng wén jiǎ cù', + 强死强活: 'qiǎng sǐ qiǎng huó', + 强死赖活: 'qiǎng sǐ lài huó', + 强食自爱: 'qiǎng shí zì ài', + 强食靡角: 'qiǎng shí mí jiǎo', + 强识博闻: 'qiǎng shí bó wén', + 强弓劲弩: 'qiáng gōng jìng nǔ', + 强聒不舍: 'qiǎng guō bù shě', + 强凫变鹤: 'qiǎng fú biàn hè', + 强而后可: 'qiǎng ér hòu kě', + 强词夺正: 'qiǎng cí duó zhèng', + 强得易贫: 'qiǎng dé yì pín', + 遣兴陶情: 'qiǎn xìng táo qíng', + 遣将调兵: 'qiǎn jiāng diào bīng', + 遣兵调将: 'qiǎn bīng diào jiàng', + 前跋后疐: 'qián bá hòu máo', + 搴旗斩将: 'qiān qí zhǎn jiàng', + 搴旗取将: 'qiān qí qǔ jiàng', + 牵羊担酒: 'qiān yáng dàn jiǔ', + 牵强附合: 'qiān qiáng fù hé', + 千姿万态: 'qiān zī wàn tai', + 千状万态: 'qiān zhuàng wàn tai', + 千载一合: 'qiān zài yī hé', + 千载一弹: 'qiān zǎi yī dàn', + 千态万状: 'qiān tai wàn zhuàng', + 千磨百折: 'qiān mó bǎi shé', + 千了万当: 'qiān le wàn dàng', + 千了百当: 'qiān liǎo bǎi dàng', + 千古绝调: 'qiān gǔ jué diào', + 泣下如雨: 'qǐ xià rú yǔ', + 弃之度外: 'qì zhī dù wai', + 气克斗牛: 'qì kè dǒu niú', + 起偃为竖: 'qǐ yǎn wéi shù', + 岂弟君子: 'kǎi tì jūn zǐ', + 綦溪利跂: 'qí xī lì guì', + 棋输先着: 'qí shū xiān zhāo', + 棋输先著: 'qí shū xiān zhuó', + 奇葩异卉: 'qí pā yì hùi', + 齐王舍牛: 'qí wáng shě niú', + 齐量等观: 'qí liàng děng guān', + 欺天诳地: 'qī tiān kuāng dì', + 栖风宿雨: 'qī fēng xiǔ yǔ', + 妻梅子鹤: 'qī mén zǐ hè', + 妻儿老少: 'qī ér lǎo shǎo', + 普天率土: 'pǔ tiān shuài tǔ', + 铺胸纳地: 'pū xiōng nà dì', + 铺眉苫眼: 'pū méi shàn yǎn', + 铺眉蒙眼: 'pū méi méng yǎn', + 铺锦列绣: 'pū jǐn liè xiù', + 破矩为圆: 'pò jǔ wéi yuán', + 破镜重合: 'pò jìng zhòng hé', + 破家为国: 'pò jiā wéi guó', + 破觚为圜: 'pò gū wéi yuán', + 破愁为笑: 'pò chóu wéi xiào', + 瓶坠簪折: 'píng zhùi zān zhé', + 萍飘蓬转: 'píng piāo péng zhuàn', + 帡天极地: 'jú tiān jí dì', + 屏声息气: 'bǐng shēng xī qì', + 屏气吞声: 'bǐng qì tūn shēng', + 凭几据杖: 'píng jī jù zhàng', + 娉婷婀娜: 'pīng tíng ē nà', + 品竹调弦: 'pǐn zhú diào xián', + 贫嘴薄舌: 'pín zuǐ bó shé', + 骈肩累足: 'pián jiān lěi zú', + 骈肩累迹: 'pián jiān lěi jì', + 翩翩年少: 'piān piān nián shǎo', + 片语只辞: 'piàn yán zhǐ cí', + 片鳞半爪: 'piàn lín bàn zhǎo', + 片甲不还: 'piàn jiǎ bù huán', + 披发缨冠: 'pī fā yīng guàn', + 披发文身: 'pī fà wén shēn', + 批砉导窾: 'pī huā dǎo táo', + 批隙导窾: 'pī xì dǎo yín', + 批吭捣虚: 'pī háng dǎo xū', + 批风抹月: 'pī fēng mò yuè', + 烹龙炮凤: 'pēng lóng páo fèng', + 炰鳖脍鲤: 'fèng biē kuài lǐ', + 炮凤烹龙: 'páo fèng pēng lóng', + 旁指曲谕: 'páng zhǐ qǔ yù', + 旁引曲证: 'páng yǐn qǔ zhèng', + 旁通曲畅: 'páng tōng qǔ chàng', + 庞眉皓发: 'páng méi hào fà', + 攀花折柳: 'pān huā shé liǔ', + 攀蟾折桂: 'pān chán shé guì', + 女大难留: 'nǚ dà nán liú', + 女长须嫁: 'nǚ zhǎng xū jià', + 女长当嫁: 'nǚ zhǎng dāng jià', + 弄竹弹丝: 'nòng zhú dàn sī', + 弄玉吹箫: 'nòng yù chuí xiāo', + 弄管调弦: 'nòng guǎn diào xián', + 弄粉调朱: 'nòng fěn diào zhū', + 弄兵潢池: 'nòng bīng huáng shi', + 浓装艳抹: 'nóng zhuāng yàn mò', + 浓抹淡妆: 'nóng mò dàn zhuāng', + 扭转干坤: 'niǔ zhuǎn gàn kūn', + 扭直作曲: 'niǔ zhí zuò qū', + 牛骥同皁: 'niú jì tóng wěn', + 宁缺勿滥: 'nìng quē wù làn', + 啮血为盟: 'niè xuè wéi méng', + 捻土为香: 'niǎn tǔ wéi xiāng', + 年谊世好: 'nián yì shì hào', + 年华垂暮: 'nián huá thuí mù', + 儗不于伦: 'lǐ bù yú lún', + 泥名失实: 'nì míng shī shí', + 泥而不滓: 'niè ér bù zǐ', + 能者为师: 'néng zhě wéi shī', + 能不称官: 'néng bù chèn guān', + 挠直为曲: 'náo zhí wéi qū', + 囊萤照读: 'náng yíng zhào shū', + 难进易退: 'nan jin yi tui', + 难乎为继: 'nán hū wéi jì', + 难乎为情: 'nán hū wéi qíng', + 难更仆数: 'nán gēng pú shǔ', + 难得糊涂: 'nán dé hú tú', + 南蛮鴂舌: 'nán mán xiāng shé', + 南贩北贾: 'nán fàn běi gǔ', + 内修外攘: 'nèi xiū wai rǎng', + 内柔外刚: 'nèi róu wai gāng', + 内峻外和: 'nèi jùn wai hé', + 拿腔作调: 'ná qiāng zuò diào', + 拿粗夹细: 'ná cū jiā xì', + 慕古薄今: 'mù gǔ bó jīn', + 牧猪奴戏: 'mù zhòu nú xì', + 沐猴衣冠: 'mù hóu yī guàn', + 目眢心忳: 'mù yuān xīn wǎng', + 目挑心招: 'mù tiǎo xīn zhāo', + 目空余子: 'mù kōng yú zǐ', + 目量意营: 'mù liàng yì yíng', + 目瞪舌彊: 'mù dèng shé jiàng', + 木头木脑: 'mù tóu mù nǎo', + 木干鸟栖: 'mù gàn niǎo qī', + 侔色揣称: 'móu sè chuǎi chèn', + 莫知所为: 'mò zhī suǒ wéi', + 莫予毒也: 'mò yù dú yě', + 莫为已甚: 'mò wéi yǐ shèn', + 抹月秕风: 'mǒ yuè pī fēng', + 抹粉施脂: 'mò fěn shī zhī', + 磨砻镌切: 'mó lóng juān qiē', + 磨棱刓角: 'mó léng liǎng jiǎo', + 摸头不着: 'mō tóu bù zháo', + 摸门不着: 'mō mén bù zháo', + 摸不着边: 'mō bù zhuó biān', + 命中注定: 'mìng zhōng zhù dìng', + 鸣鹤之应: 'míng hè zhī yīng', + 鸣凤朝阳: 'míng fèng zhāo yáng', + 明效大验: 'míng xiào dà yà', + 名我固当: 'ming wo gu dang', + 灭景追风: 'miè yǐng zhuī fēng', + 邈处欿视: 'miǎo chǔ jī shì', + 面折庭争: 'miàn shé tíng zhēng', + 俛拾地芥: 'bì shí dì jiè', + 俛首帖耳: 'mǎ shǒu tiē ěr', + 黾穴鸲巢: 'měng xué qú cháo', + 绵力薄材: 'mián lì bó cái', + 绵里薄材: 'mián lǐ bó cái', + 靡有孑遗: 'mǐ yǒu jié yí', + 靡衣媮食: 'mǐ yī tōu shí', + 靡衣偷食: 'mǐ yī tōu shí', + 靡然从风: 'mǐ rán cóng fēng', + 靡靡之乐: 'mǐ mǐ zhī yuè', + 迷恋骸骨: 'mí liàn hài gǔ', + 蒙头转向: 'mēng tóu zhuàn xiàng', + 闷海愁山: 'mèn hǎi chóu shān', + 扪参历井: 'mén shēn lì jǐng', + 门单户薄: 'mén dān hù bó', + 昧旦晨兴: 'mèi dàn chún xīng', + 没衷一是: 'mò zhōng yī shì', + 没金饮羽: 'mò jīn yǐn yǔ', + 冒名接脚: 'mào míng jiě jiǎo', + 毛头小子: 'máo tóu xiǎo zi', + 毛遂堕井: 'máo suí duò jǐng', + 毛发耸然: 'máo fā sǒng rán', + 毛发倒竖: 'máo fā dǎo shù', + 毛发不爽: 'máo fā bù shuǎng', + 猫鼠同处: 'māo shǔ tóng chǔ', + 尨眉皓发: 'máng méi hào fà', + 漫天遍地: 'màn shān biàn dì', + 脉脉相通: 'mài mài xiāng tōng', + 卖文为生: 'mài wén wéi shēn', + 卖李钻核: 'mài lǐ zuān hé', + 买椟还珠: 'mǎi dú huán zhū', + 埋天怨地: 'mán tiān yuàn dì', + 埋三怨四: 'mán sān yuàn sì', + 马上房子: 'mǎ shàng fáng zi', + 马入华山: 'mǎ rù huá shān', + 落魄江湖: 'luò pò jīng hú', + 落魄不偶: 'luo tuo bu ou', + 落魄不羁: 'luò pò bù jī', + 落落难合: 'luò luò nán hé', + 落草为寇: 'luò cǎo wéi kòu', + 裸裎袒裼: 'luǒ chéng tǎn xī', + 罗织构陷: 'luò zhī gòu xiàn', + 捋袖揎拳: 'luō xiù xuān quán', + 论黄数黑: 'lùn huáng shǔ hēi', + 乱作胡为: 'luàn zuò hú wéi', + 乱箭攒心: 'luàn jiàn cuán xīn', + 鸾凤和鸣: 'luán fèng hè míng', + 绿叶成荫: 'lǜ yè chéng yīn', + 绿女红男: 'lǜ nǚ hóng nán', + 率由旧章: 'shuài yóu jiù zhāng', + 率由旧则: 'shuài yóu jiù zé', + 率以为常: 'shuài yǐ wéi cháng', + 率土宅心: 'shuài tǔ zhái xīn', + 率土同庆: 'shuài tǔ tóng qìng', + 率兽食人: 'shuài shòu shí rén', + 率土归心: 'shuài tǔ guī xīn', + 率马以骥: 'shuài mǎ yǐ jì', + 率尔成章: 'shuài ěr chéng zhāng', + 履薄临深: 'lǚ bó lín shēn', + 鲁斤燕削: 'lǔ jīn yàn xuē', + 露面抛头: 'lù miàn pāo tóu', + 漏尽更阑: 'lòu jìn gēng lán', + 笼鸟槛猿: 'lóng niǎo jiàn yuán', + 笼鸟池鱼: 'lóng niǎo shi yú', + 龙游曲沼: 'long you qu zhao', + 龙血玄黄: 'lóng xuě xuán huáng', + 龙雕凤咀: 'lóng diāo fèng jǔ', + 六神不安: 'liù shén bǔ ān', + 六尺之讬: 'liù chǐ zhī quàn', + 柳巷花街: 'liǔ xiòng huā jiē', + 柳街花巷: 'liǔ jiē huā xiòng', + 柳骨颜筋: 'jiǔ gǔ yán jīn', + 流离颠疐: 'liú lí diān shǔ', + 令原之戚: 'líng yuán zhī qī', + 令人捧腹: 'lìng rén pěng fǔ', + 陵劲淬砺: 'líng jìng cuì lì', + 临难不惧: 'lín nàn bù jǔ', + 临敌易将: 'lín dí yì jiàng', + 裂裳衣疮: 'liè sháng yī chuāng', + 裂裳裹足: 'liè cháng guǒ zú', + 裂冠毁冕: 'liè guàn huǐ miǎn', + 埒才角妙: 'liè cái jué miào', + 了无惧色: 'liǎo wū jǔ sè', + 了身达命: 'liǎo shēn dá mìng', + 了然无闻: 'le rán wú wén', + 了不可见: 'liǎo bù kě jiàn', + 了不长进: 'liǎo bù zhǎng jǐn', + 燎如观火: 'liǎo rú guān huǒ', + 燎发摧枯: 'liǎo fà cuī kū', + 量小力微: 'liàng xiǎo lì wēi', + 量时度力: 'liàng shí dù lì', + 量枘制凿: 'liàng ruì zhì záo', + 量入计出: 'liàng rù jì chū', + 量如江海: 'liàng rú jiāng hǎi', + 量力度德: 'liàng lì duó dé', + 量金买赋: 'liàng jīn mǎi fù', + 量己审分: 'liàng jǐ shěn fēn', + 量材录用: 'liàng cái lù yòng', + 量才器使: 'liàng cái qì shǐ', + 量才而为: 'liàng cái ér wéi', + 梁孟相敬: 'liáng mèng xiāng jìn', + 恋恋难舍: 'liàn liàn nán shě', + 敛声屏息: 'liǎn shēng bǐng xī', + 敛骨吹魂: 'liǎn gǔ chuí hún', + 联篇累牍: 'lián piān lěi dú', + 连编累牍: 'lián biān lěi dú', + 詈夷为跖: 'lì yí wéi zhí', + 利令志惛: 'lì lìng zhì zào', + 历精为治: 'lì jīng wéi zhì', + 历精更始: 'lì jīng gèng shǐ', + 哩哩罗罗: 'li li luō luō', + 李广不侯: 'lǐ guǎng bù hòu', + 礼为情貌: 'lǐ wéi qíng mào', + 礼让为国: 'lǐ ràng wéi guó', + 礼坏乐崩: 'lǐ huài yuè bēng', + 犁庭扫闾: 'lí tíng sǎo lǚ', + 犁生骍角: 'lí shēng yuè jiǎo', + 犁牛骍角: 'lí niú mài jiǎo', + 离山调虎: 'lí shān diào hǔ', + 离本趣末: 'lí běn qū mò', + 离本徼末: 'lí běn yāo mò', + 楞眉横眼: 'lèng méi héng yǎn', + 擂天倒地: 'léi tiān dǎo dì', + 累足成步: 'lěi zú chéng bù', + 累月经年: 'lěi yuè jīng nián', + 累屋重架: 'lěi wū chóng jià', + 累瓦结绳: 'lěi wǎ jié shéng', + 累土至山: 'lěi tǔ zhì shān', + 累土聚沙: 'lěi tǔ jù shā', + 累苏积块: 'lěi sū jī kuài', + 累卵之危: 'lěi luǎn zhī wēi', + 累累如珠: 'lěi lěi rú zhū', + 累块积苏: 'lěi kuài jī sū', + 累教不改: 'lěi jiào bù gǎi', + 累牍连篇: 'lěi dú lián piān', + 乐山乐水: 'yào shān yào shuǐ', + 潦原浸天: 'lǎo yuán jìn tiān', + 老师宿儒: 'lǎo shī xiǔ rú', + 牢什古子: 'láo shí gǔ zi', + 琅嬛福地: 'láng huán fú dì', + 狼号鬼哭: 'láng háo guǐ kū', + 狼飡虎咽: 'láng cān hǔ yān', + 阑风长雨: 'lán fēng zhàng yǔ', + 拉枯折朽: 'lā kū shé xiǔ', + 揆情度理: 'kuí qíng duó lǐ', + 揆理度情: 'kuí lǐ duó qíng', + 窥间伺隙: 'kuī jiàn sì xì', + 旷日累时: 'kuàng rì lěi shí', + 匡救弥缝: 'kuāng jiù mí fèng', + 枯树生华: 'kū shù shēng huā', + 口轻舌薄: 'kǒu qīng shé bó', + 口角生风: 'kǒu jiǎo shēng fēng', + 口角春风: 'kǒu jiǎo chūn fēng', + 口角风情: 'kǒu jiǎo fēng qíng', + 口干舌焦: 'kǒu gàn shé jiāo', + 口腹之累: 'kǒu fù zhī lěi', + 口出大言: 'kǒu chū dā yán', + 空腹便便: 'kōng fù pián pián', + 嗑牙料嘴: 'kē yá liào zuǐ', + 刻木为吏: 'kè mù wéi lì', + 刻木为鹄: 'kè mù wéi hú', + 咳珠唾玉: 'ké zhū tuò yù', + 咳唾成珠: 'ké tuò chéng zhū', + 抗颜为师: 'kàng yán wéi shī', + 糠豆不赡: 'kang dou bu shan', + 开华结果: 'kāi huā jié guǒ', + 峻阪盐车: 'jùn bǎn yún chē', + 攫为己有: 'jué wéi jǐ yǒu', + 嚼铁咀金: 'jiáo tiě jǔ jīn', + 嚼墨喷纸: 'jué mò pēn zhǐ', + 倔头强脑: 'juè tóu jiàng nǎo', + 倔头倔脑: 'juè tou juè nǎo', + 倦鸟知还: 'juàn niǎo zhī huán', + 卷席而葬: 'juǎn xí ér zàng', + 卷旗息鼓: 'juǎn qí xī gǔ', + 卷甲倍道: 'juǎn jiǎ bèi dào', + 聚米为山: 'jù mǐ wéi shān', + 聚米为谷: 'jù mǐ wéi gǔ', + 锯牙钩爪: 'jù yá gōu zhǎo', + 举手相庆: 'jǔ shǒu xiāng qìng', + 举世混浊: 'jǔ shì hún zhuó', + 鞫为茂草: 'jū wéi mào cǎo', + 鞠为茂草: 'jū wéi mào cǎo', + 拘神遣将: 'jū shén qiǎn jiàng', + 居轴处中: 'jū zhóu chǔ zhōng', + 居下讪上: 'jú xià shàn shàng', + 居不重茵: 'jū bù chóng yīn', + 居不重席: 'jū bù chóng xí', + 旧事重提: 'jiù shì zhòng tí', + 旧调重弹: 'jiù diào chóng tán', + 灸艾分痛: 'jiù ài fēn tòng', + 久要不忘: 'jiǔ yāo bù wàng', + 九转功成: 'jiǔ zhuàn gōng chéng', + 九蒸三熯: 'jiǔ zhēng sān shēng', + 敬业乐群: 'jìng yè yào qún', + 井底虾蟆: 'jǐng dǐ xiā má', + 旌旗卷舒: 'jīng qí juǎn shū', + 惊魂落魄: 'jīng hún luò pò', + 荆棘载途: 'jīng jí zài tú', + 荆棘塞途: 'jīng jí sè tú', + 经纶济世: 'jing lun ji shi', + 禁舍开塞: 'jìn shě kāi sāi', + 祲威盛容: 'lóng wēi shèng róng', + 进退中度: 'jìn tuì zhòng dù', + 进退消长: 'jìn tuì xiāo cháng', + 进退应矩: 'jìn tuì yīng jǔ', + 进退触籓: 'jìn tuì chù zǔ', + 进退出处: 'jìn tuì chū chǔ', + 进退跋疐: 'jìn tuì bá zǔ', + 进寸退尺: 'jǐn cùn tuì chǐ', + 尽多尽少: 'jǐn duō jǐn shǎo', + 锦囊还矢: 'jǐn náng huán shǐ', + 矜名嫉能: 'jīn míng jì néng', + 矜己自饰: 'jīn jǐ zhì shì', + 矜功负气: 'jīn gōng fǔ qì', + 津关险塞: 'jīn guān xiǎn sài', + 金吾不禁: 'jīn wú bù jìn', + 金匮石室: 'jīn guì shí shì', + 金翅擘海: 'jīn chì bāi hǎi', + 戒奢宁俭: 'jiè shē nìng jiān', + 解衣衣人: 'jiè yī yī rén', + 解人难得: 'jiě rén nán dé', + 解铃系铃: 'jiě líng jì líng', + 解发佯狂: 'jiě fà yáng kuáng', + 截铁斩钉: 'jié tiě zhǎn dìng', + 诘屈謷牙: 'jié qū dà yá', + 诘屈磝碻: 'jié qū bìng zhòu', + 诘曲聱牙: 'jié qǔ áo yá', + 教一识百: 'jiāo yī shí bǎi', + 教猱升木: 'jiāo náo shēng mù', + 较瘦量肥: 'jiào shòu liàng féi', + 矫矫不群: 'jiǎo jiǎo bù qùn', + 矫国更俗: 'jiǎo guó gēng sú', + 皎阳似火: 'jiǎo yáng shì huǒ', + 挢抂过正: 'jiǎo kuāng guò zhèng', + 角立杰出: 'jiao li jie chu', + 焦沙烂石: 'jiāo shā shí làn', + 焦唇干舌: 'jiāo chún gàn shé', + 骄泰淫泆: 'jiāo tai yín zhuàng', + 骄奢淫泆: 'jiāo shē yín yí', + 骄儿騃女: 'jiāo ér bā nǚ', + 浇风薄俗: 'jiāo fēng bó sú', + 降妖捉怪: 'xiáng yāo zhuō guài', + 将遇良材: 'jiàng yù liáng cái', + 将取固予: 'jiāng qǔ gū yǔ', + 将门有将: 'jiàng mén yǒu jiàng', + 将功折过: 'jiāng gōng shé guò', + 将夺固与: 'jiāng duó gū yǔ', + 将伯之助: 'qiāng bó zhī zhù', + 将伯之呼: 'qiāng bó zhī hū', + 槛花笼鹤: 'jiàn huā lóng hè', + 鉴影度形: 'jiàn yǐng duó xíng', + 渐不可长: 'jiàn bù kě zhǎng', + 剑首一吷: 'jiàn shǒu yī guī', + 见义敢为: 'jiàn yì gǎn wéi', + 见义当为: 'jiàn yì dāng wéi', + 见义必为: 'jiàn yì bì wéi', + 见素抱朴: 'xiàn sù bào pǔ', + 见弃于人: 'jiàn qì yǔ rén', + 见几而作: 'jiàn jī ér zuò', + 见弹求鸮: 'jiàn dàn qiú háo', + 简丝数米: 'jiǎn sī shǔ mǐ', + 俭不中礼: 'jiǎn bù zhòng lǐ', + 间见层出: 'jiàn xiàn céng chū', + 间不容息: 'jiàn bù róng xī', + 间不容瞚: 'jiān bù róng xǐ', + 尖嘴薄舌: 'jiān zuǐ bó shé', + 假洋鬼子: 'jiǎ yáng guǐ zi', + 甲冠天下: 'jiǎ guàn tiān xià', + 葭莩之亲: 'jiā fú zhī qīn', + 家无担石: 'jiā wú dàn shí', + 家累千金: 'jiā lèi qiān jīn', + 家给人足: 'jiā jǐ rén zú', + 家给民足: 'jiā jǐ mín zú', + 家道从容: 'jiā dào cōng róng', + 家长礼短: 'jiā cháng lǐ duǎn', + 夹枪带棍: 'jiā qiāng dài gùn', + 夹袋人物: 'jiā dài rén wù', + 霁风朗月: 'jī fēng lǎng yuè', + 寄兴寓情: 'jì xìng yù qíng', + 纪纲人论: 'jì gāng rén lún', + 计深虑远: 'jì shēng lǜ yuǎn', + 计功量罪: 'jì gōng liàng zuì', + 掎裳连襼: 'jǐ shang lián zhēng', + 虮虱相吊: 'jǐ shī xiēng diào', + 几不欲生: 'jī bù yù shēng', + 集腋为裘: 'jí yè wéi qiú', + 疾不可为: 'jí bù kě wéi', + 急脉缓灸: 'jí mài huǎn jiù', + 急景凋年: 'jí yǐng diāo nián', + 急公好施: 'jí gōng hào shī', + 极深研几: 'jí shēn yán jī', + 及宾有鱼: 'jí bīn yoǔ yú', + 激薄停浇: 'jī bó tíng jiāo', + 稽古揆今: 'jī gǔ zhèn jīn', + 赍志而没: 'jī zhì ér mò', + 积铢累寸: 'jī zhū lěi cùn', + 积岁累月: 'jī suì lěi yuè', + 积素累旧: 'jī sù lěi jiù', + 积时累日: 'jī shí lěi rì', + 积日累岁: 'jī rì lěi suì', + 积日累月: 'jī rì lěi yuè', + 积日累久: 'jī rì lěi jiǔ', + 积年累岁: 'jī nián lěi suì', + 积露为波: 'jī lù wéi bō', + 积德累仁: 'jī dé lěi rén', + 积德累善: 'jī dé lěi shàn', + 积德累功: 'jī dé lěi gōng', + 积谗糜骨: 'jī chán méi gǔ', + 鸡皮鹤发: 'jī pí hè fà', + 饥寒交切: 'jī hán jiāo qiē', + 饥冻交切: 'jī dòng jiāo qiē', + 击排冒没: 'jī pái mào mò', + 祸为福先: 'huò wéi fú xiān', + 祸福相依: 'huò fú xiāng yī', + 祸福相生: 'huò fú xiāng shēng', + 获隽公车: 'huò jūn gōng chē', + 货而不售: 'huo er bu shou', + 混应滥应: 'hùn yīng làn yīng', + 魂飞魄丧: 'hún fēi pò sāng', + 魂不着体: 'hún bù zhuó tǐ', + 魂不著体: 'hún bù zhuó tǐ', + 浑抡吞枣: 'hún lún tūn zǎo', + 昏迷不省: 'hūn mí bù xǐng', + 昏镜重磨: 'hūn jìng chóng mó', + 昏镜重明: 'hūn jìng chóng míng', + 昏定晨省: 'hūn dìng chén xǐng', + 毁舟为杕: 'huǐ zhōu wéi duò', + 毁钟为铎: 'huǐ zhōng wéi duó', + 毁冠裂裳: 'huǐ guān liè cháng', + 晦盲否塞: 'huì máng pǐ sè', + 诲人不惓: 'huì rén bù tiě', + 悔过自责: 'huǐ guò zì zè', + 回船转舵: 'huí chuán zhǎn duò', + 潢池盗弄: 'huáng shi dào nòng', + 黄冠野服: 'huáng guàn yě fú', + 黄冠草履: 'huáng guàn cǎo lǚ', + 黄冠草服: 'huáng guàn cǎo fú', + 黄发儿齿: 'huáng fà ér chǐ', + 黄发垂髫: 'huáng fà chuí tiáo', + 还珠合浦: 'huán zhū hé pǔ', + 还珠返璧: 'huán zhū fǎn bì', + 还元返本: 'huán yuán fǎn běn', + 还朴反古: 'huán pǔ fǎn gǔ', + 还年驻色: 'huán nián zhù sè', + 还年却老: 'huán nián què lǎo', + 还年卻老: 'huán nián què lǎo', + 还醇返朴: 'huán chún fǎn pǔ', + 还淳返朴: 'huán chún fǎn pǔ', + 还淳反素: 'huán chún fǎn sù', + 还淳反朴: 'huán chún fǎn pǔ', + 还淳反古: 'huán chún fǎn gǔ', + 坏裳为裤: 'huài shang wéi kù', + 槐南一梦: 'huái nán yī mēng', + 画蛇著足: 'huà shé zhuó zú', + 画地为狱: 'huà dì wéi yù', + 画荻和丸: 'huà dí huò wán', + 化枭为鸠: 'huà xiāo wéi jiū', + 化零为整: 'huà líng wéi zhěng', + 化腐为奇: 'huà fǔ wéi qí', + 化鸱为凤: 'huà chī wéi fèng', + 华亭鹤唳: 'huà tíng hè lì', + 花攒锦聚: 'huā cuán jǐn jù', + 花攒锦簇: 'huā cuán jǐn cù', + 花簇锦攒: 'huā cù jǐn cuán', + 花不棱登: 'huā bù lēng dēng', + 户限为穿: 'hù xiàn wéi chuān', + 胡作乱为: 'hú zuò luàn wéi', + 胡作胡为: 'hú zuò hú wéi', + 胡思乱量: 'hú sī luàn liàng', + 呼天吁地: 'hū tiān yù dì', + 呼卢喝雉: 'hū lú hè zhì', + 呼来喝去: 'hū lái hè qù', + 呼不给吸: 'hū bù jǐ xī', + 厚味腊毒: 'hòu wèi xī dú', + 厚今薄古: 'hòu jīn bó gǔ', + 厚德载物: 'hòu dé zài wù', + 鸿泥雪爪: 'hóng ní xuě zhǎo', + 鸿渐于干: 'hóng jiàn yú gàn', + 鸿飞雪爪: 'hóng fēi xuě zhǎo', + 洪炉燎发: 'hóng lú liáo fà', + 红绳系足: 'hóng shéng jì zú', + 红不棱登: 'hóng bù lēng dēng', + 衡石量书: 'héng shí liàng shū', + 横征苛役: 'hèng zhēng kē yì', + 横征苛敛: 'hèng zhēng kē liǎn', + 横征暴赋: 'hèng zhēng bào fù', + 横灾飞祸: 'hèng zāi fēi huò', + 横殃飞祸: 'hèng yāng fēi huò', + 横无忌惮: 'hèng wú jì dàn', + 横拖倒拽: 'héng tuō dào zhuāi', + 横抢硬夺: 'hèng qiǎng yìng duó', + 横抢武夺: 'hèng qiǎng wǔ duó', + 横科暴敛: 'hèng kē bào liǎn', + 横恩滥赏: 'hèng ēn làn shǎng', + 恨海难填: 'hèn hǎi nán tián', + 黑更半夜: 'hēi gēng bàn yè', + 鹤发松姿: 'hè fà sōng zī', + 鹤发鸡皮: 'hè fà jī pí', + 鹤处鸡群: 'hè chǔ jī qún', + 涸思干虑: 'hé sī qián lǜ', + 河涸海干: 'hé hé hǎi qián', + 和颜说色: 'hé yán yuè sè', + 何所不为: 'hé suǒ bù wéi', + 合浦还珠: 'hé pǔ huán zhū', + 合两为一: 'hé liǎng wéi yī', + 合从连衡: 'hé zòng lián héng', + 浩浩汤汤: 'hào hào shāng shāng', + 号咷大哭: 'háo táo dà kū', + 号寒啼饥: 'háo hán tí jī', + 好勇斗狠: 'hào yǒng dòu hěn', + 好佚恶劳: 'hǎo yì wù láo', + 好问则裕: 'hào wèn zé yù', + 好为事端: 'hào wéi shì duān', + 好问决疑: 'hào wèn jué yí', + 好生之德: 'hào shēng zhī dé', + 好善乐施: 'hào shàn lè shī', + 好善恶恶: 'hǎo shàn wù è', + 好骑者堕: 'hào qí zhě duò', + 好奇尚异: 'hǎo qí shàng yì', + 好谋善断: 'hào móu shàn duàn', + 好恶不同: 'hǎo è bù tóng', + 好丹非素: 'hào dān fēi sù', + 豪干暴取: 'háo gàn bào qǔ', + 毫发不爽: 'háo fà bù shuǎng', + 寒酸落魄: 'hán suān luò pò', + 邯郸重步: 'hán dān zhóng bù', + 含英咀华: 'hán yīng jǔ huá', + 含商咀征: 'hán shāng jǔ zhēng', + 含菁咀华: 'hán jīng jǔ huá', + 含糊不明: 'hán hú bù míng', + 含垢藏疾: 'hán gǒu cáng jí', + 含宫咀征: 'hán gōng jǔ zhēng', + 过隙白驹: 'guò xī bái jū', + 过为已甚: 'guò wéi yǐ shèn', + 桂折一枝: 'guì shé yī zhī', + 桂折兰摧: 'guì shé lán cuī', + 规重矩叠: 'guī chóng jǔ dié', + 规旋矩折: 'guī xuán jǔ shé', + 广文先生: 'guǎng wén xiān sheng', + 广譬曲谕: 'guǎng pì qǔ yù', + 广陵散绝: 'guǎng líng sǎn jué', + 冠山戴粒: 'guàn shān dài lì', + 冠绝一时: 'guàn jué yī shí', + 冠屦倒施: 'guàn jù dǎo shī', + 官官相为: 'guān guān xiāng wéi', + 关情脉脉: 'guān qíng mài mài', + 挂席为门: 'guà xí wéi mén', + 寡见鲜闻: 'guǎ jiàn xiǎn wén', + 瓜葛相连: 'guā gě xiāng lián', + 顾曲周郎: 'gù qǔ zhōu láng', + 顾景惭形: 'gù yǐng cán xíng', + 故态复还: 'gù tài fù huán', + 鼓吻奋爪: 'gǔ wěn fèn zhǎo', + 鼓唇咋舌: 'gǔ chún zǎ shé', + 古调单弹: 'gǔ diào dān tán', + 古调不弹: 'gǔ diào bù tán', + 沽名干誉: 'gū míng gàn yù', + 孤独矜寡: 'gū dú guān guǎ', + 姑射神人: 'gū yè shén rén', + 苟合取容: 'gǒu hé qǔ ān', + 狗续侯冠: 'gǒu xù hòu guàn', + 钩爪锯牙: 'gōu zhǎo jù yá', + 共枝别干: 'gòng zhī bié gàn', + 共为唇齿: 'gòng wéi chún chǐ', + 拱手而降: 'gǒng shòu ér xiáng', + 拱肩缩背: 'gǒng jān suō bèi', + 功薄蝉翼: 'gōng bó chán yì', + 弓调马服: 'gōng diào mǎ fú', + 更姓改物: 'gēng xìng gǎi wù', + 更弦易辙: 'gēng xián yì zhé', + 更弦改辙: 'gēng xián gǎi zhé', + 更仆难终: 'gēng pú nán zhōng', + 更仆难数: 'gēng pú nán shǔ', + 更难仆数: 'gēng nán pú shù', + 更令明号: 'gēng lìng míng hào', + 更阑人静: 'gēng lán rén jǐng', + 更待干罢: 'gèng dài gàn bà', + 更唱叠和: 'gēng chàng dié hé', + 更唱迭和: 'gēng chàng dié hé', + 更长梦短: 'gēng cháng mèng duǎn', + 亘古奇闻: 'gèn gǔ qī wén', + 根生土长: 'gēn shēn tǔ zhǎng', + 各色名样: 'gè sè gè yàng', + 格格不纳: 'gē gē bù nà', + 格格不吐: 'gē gē bù tǔ', + 歌莺舞燕: 'gē yíng wǔ yàn', + 告朔饩羊: 'gù shuò xì yáng', + 告老还家: 'gào lǎo huán jiā', + 膏唇岐舌: 'gào chún qí shé', + 膏唇贩舌: 'gào chún fàn shé', + 膏车秣马: 'gào chē mò mǎ', + 高义薄云: 'gāo yì bó yún', + 高风劲节: 'gāo fēng jìng jié', + 岗头泽底: 'gāng tóu zé dǐ', + 敢为敢做: 'gǎn wéi gǎn zuò', + 竿头日上: 'gān tóu rí shàng', + 甘分随时: 'gān fèn suí shí', + 甘处下流: 'gān chǔ xià liú', + 干霄蔽日: 'gàn xiāo bì rì', + 干啼湿哭: 'gàn tí shī kū', + 干名犯义: 'gàn míng fàn yì', + 干将莫邪: 'gān jiàng mò yé', + 干端坤倪: 'gàn duān kūn ní', + 干城之将: 'gān chéng zhī jiàng', + 改张易调: 'gǎi zhāng yì diào', + 改弦易调: 'gǎi xián yì diào', + 改曲易调: 'gǎi qǔ yì diào', + 改恶为善: 'gǎi è wéi shàn', + 腹载五车: 'fù zài wǔ chē', + 富国彊兵: 'fù guó jiāng bīng', + 父债子还: 'fù zhài zǐ huán', + 父为子隐: 'fù wéi zǐ yǐn', + 辅世长民: 'fǔ shì zhǎng mín', + 拊背搤吭: 'fǔ bèi hè kēng', + 福为祸先: 'fú wéi huò xiān', + 福为祸始: 'fú wéi huò shǐ', + 符号逻辑: 'fú hào luó ji', + 浮收勒折: 'fú shōu lè shé', + 伏虎降龙: 'fú hǔ xiáng lóng', + 肤受之愬: 'fū shòu zhī xiāng', + 肤皮潦草: 'fū pǐ liǎo cǎo', + 肤见謭识: 'fū jiàn guǎng shí', + 否终则泰: 'pǐ zhōng zé tài', + 否终复泰: 'pǐ zhōng fù tài', + 否往泰来: 'pǐ wǎng tài lái', + 否去泰来: 'pǐ qù tài lái', + 否极阳回: 'pǐ jí yáng huí', + 否极泰回: 'pǐ jí tài huí', + 佛头著粪: 'fó tóu zhuó fèn', + 奉为楷模: 'fèng wéi kǎi mó', + 凤鸣朝阳: 'fèng míng zhāo yáng', + 凤靡鸾吪: 'fèng mǐ luán é', + 逢场作乐: 'féng chǎng zuò lè', + 蜂攒蚁聚: 'fēng cuán yǐ jù', + 蜂攒蚁集: 'fēng cuán yǐ jí', + 蜂腰削背: 'fēng yāo xuē bèi', + 蜂扇蚁聚: 'fēng shān yǐ jù', + 封豨修蛇: 'fēng xī yǒu shé', + 风影敷衍: 'fēng yǐng fū yān', + 风驰云卷: 'fēng chí yún juǎn', + 风驰电卷: 'fēng chí diàn juǎn', + 风驰草靡: 'fēng chí cǎo mǐ', + 丰屋蔀家: 'fēng wū zhī jiā', + 粪土不如: 'fèn tú bù rú', + 分风劈流: 'fēn fēng pǐ liú', + 沸沸汤汤: 'fèi fèi shāng shāng', + 匪伊朝夕: 'fěi yí zhāo xī', + 菲食薄衣: 'fěi shí bó yī', + 飞沙走砾: 'fēi shē zǒu lì', + 飞将数奇: 'fē jiàng shù jī', + 飞鸿雪爪: 'fēi hóng xuě zhǎo', + 放辟邪侈: 'fàng pì xié chǐ', + 方领圆冠: 'fāng lǐng yuán guàn', + 方寸万重: 'fāng cùn wàn chóng', + 贩夫皁隶: 'fàn fū yě lì', + 泛应曲当: 'fàn yīng qǔ dāng', + 犯而不校: 'fàn ér bù jiào', + 返朴还真: 'fǎn pǔ huán zhēn', + 返本还源: 'fǎn běn huán yuán', + 返本还元: 'fǎn běn huán yuán', + 反老还童: 'fǎn lǎo huán tóng', + 反劳为逸: 'fǎn láo wéi yì', + 翻黄倒皁: 'fān huáng dǎo yí', + 翻肠倒肚: 'fān cháng dǎo dǔ', + 法轮常转: 'fǎ lún cháng zhuàn', + 罚不当罪: 'fá bù dāng zuì', + 发植穿冠: 'fà zhí chuān guān', + 发踊冲冠: 'fà yǒng chōng guān', + 发引千钧: 'fà yǐn qiān jūn', + 发上指冠: 'fā shàng zhǐ guàn', + 发上冲冠: 'fā shàng chōng guàn', + 发怒穿冠: 'fà nù chuān guān', + 发怒冲冠: 'fā nù chōng guàn', + 发蒙解缚: 'fā méng jiě fu', + 发奸擿伏: 'fā jiān tì fú', + 发短心长: 'fà duǎn xīn cháng', + 二竖为虐: 'èr shù wéi nüè', + 耳目闭塞: 'ěr mù bì sāi', + 儿女心肠: 'ér nǘ xīn cháng', + 儿女亲家: 'ér nǚ qìng jiā', + 恩不放债: 'ēn bù fàng zhai', + 遏恶扬善: 'è è yán shàn', + 饿殍枕藉: 'è piǎo zhěn jí', + 饿殍载道: 'è piǎo zài dào', + 恶紫夺朱: 'wù zǐ duó zhū', + 恶醉强酒: 'wù zuì qiǎng jiǔ', + 恶意中伤: 'è yì zhòng shāng', + 恶湿居下: 'wù shī jū xià', + 恶居下流: 'wù jū xià liú', + 恶恶从短: 'wù wù cóng duǎn', + 恶不去善: 'wù bù qù shàn', + 扼吭拊背: 'è gāng fǔ bèi', + 扼吭夺食: 'è gāng duó shí', + 扼襟控咽: 'è jīn kòng yān', + 额手相庆: 'é shǒu xiāng qìng', + 峨峨汤汤: 'é é shāng shāng', + 屙金溺银: 'ē jīn niào yín', + 朵颐大嚼: 'duǒ yī dà jiáo', + 夺人所好: 'duó rén suǒ hào', + 多言数穷: 'duō yán shuò qióng', + 多文为富: 'duō wén wéi fù', + 多钱善贾: 'duō qián shàn gǔ', + 多端寡要: 'duō duān guǎi yào', + 多财善贾: 'duō cái shàn gǔ', + 遁逸无闷: 'dùn yì wú mèn', + 遁俗无闷: 'dùn sú wú mèn', + 遁世无闷: 'dùn shì wú mèn', + 遁迹黄冠: 'dùn jì huáng guàn', + 顿学累功: 'dùn xué lěi gōng', + 对薄公堂: 'duì bù gōng táng', + 堆案盈几: 'duī àn yíng jī', + 断还归宗: 'duàn huán guī zōng', + 断发文身: 'duàn fà wén shēn', + 断长续短: 'duàn chāng xù duǎn', + 断长补短: 'duàn chāng bǔ duǎn', + 短见薄识: 'duǎn jiàn bó shí', + 蠹居棋处: 'dù jū qí chǔ', + 蠹居棊处: 'dù jū què chǔ', + 度己以绳: 'duó jǐ yǐ shéng', + 杜默为诗: 'dù mò wéi shī', + 杜鹃啼血: 'dù juān tí xuě', + 笃志好学: 'dǔ zhì hǎo xué', + 笃近举远: 'dǔ jìn jǔ juǎn', + 独有千秋: 'dú yòu qiān qiū', + 读书得间: 'dú shū dé jiàn', + 斗转参横: 'dǒu zhuǎn shēn héng', + 兜肚连肠: 'dōu dǔ lián cháng', + 洞见症结: 'dòng jiàn zhèng jié', + 栋折榱坏: 'dòng shé cuī huài', + 恫疑虚猲: 'dòng yí xū gé', + 恫疑虚喝: 'dòng yí xū hè', + 动中窾要: 'dòng zhōng zhe yào', + 东抹西涂: 'dōng mò xī tú', + 东鸣西应: 'dōng míng xī yīng', + 东鳞西爪: 'dōng lín xī zhǎo', + 东量西折: 'dōng liàng xī shé', + 东家西舍: 'dōng jiā xī shě', + 东观西望: 'dōng guāng xī wàng', + 东方将白: 'dong fang jiang bai', + 东扯西拽: 'dōng chě xī zhuāi', + 丢魂丧胆: 'diu1 hún sàng dǎn', + 鼎折餗覆: 'dǐng shé sù fù', + 鼎折覆餗: 'dǐng shé fù sù', + 鼎鼐调和: 'dǐng nai tiáo hé', + 鼎铛有耳: 'dǐng chēng yǒu ěr', + 鼎铛玉石: 'dǐng chēng yù shí', + 钉头磷磷: 'ding tou lin lin', + 叠矩重规: 'dié jǔ chóng guī', + 迭矩重规: 'dié jǔ chóng guī', + 跌宕不羁: 'dié dàng bù jī', + 跌弹斑鸠: 'diē dàn bān jiū', + 调嘴调舌: 'tiáo zuǐ diào shé', + 调弦品竹: 'diào xián pǐn zhú', + 吊尔郎当: 'diào er láng dāng', + 雕心雁爪: 'diāo xīn yàn zhǎo', + 雕虫薄技: 'diāo chóng báo jì', + 刁钻促搯: 'diāo zuàn cù chāo', + 点指划脚: 'diǎn zhǐ jí jiǎo', + 点石为金: 'diǎn shí wéi jīn', + 点手划脚: 'diǎn shǒu jí jiǎo', + 颠乾倒坤: 'diān qiān dǎo kūn', + 颠来簸去: 'diān lái bǒ qù', + 颠倒衣裳: 'diān dǎo yī cháng', + 颠倒干坤: 'diān dǎo gàn kūn', + 掂斤抹两: 'diān jīn mò liǎng', + 低唱浅酌: 'dì chàng qiǎn zhuó', + 低唱浅斟: 'dì chàng qiǎn zhēn', + 登台拜将: 'dēng tái bài jiàng', + 灯尽油干: 'dēng jìn yóu gàn', + 灯蛾扑火: 'dé é pū huǒ', + 的一确二: 'dí yī què èr', + 德薄能鲜: 'dé bó néng xiǎn', + 得手应心: 'dé shǒu yīng xīn', + 得马折足: 'dé mǎ shé zú', + 得薄能鲜: 'dé bó néng xiān', + 道远日暮: 'dào yuàn rì mù', + 蹈其覆辙: 'dǎo qì fù zhé', + 捣虚撇抗: 'dǎo xū piē kàng', + 倒载干戈: 'dào zài gān gē', + 倒因为果: 'dǎo yīn wéi guǒ', + 倒裳索领: 'dào cháng suǒ lǐng', + 倒果为因: 'dào guǒ wéi yīn', + 叨在知己: 'tāo zài zhī jǐ', + 叨陪末座: 'tāo péi mò zuò', + 党豺为虐: 'dǎng chái wéi nüè', + 当轴处中: 'dāng zhóu chǔ zhōng', + 当着不着: 'dāng zhuó bù zhuó', + 当务始终: 'dang wu shi zhong', + 淡妆轻抹: 'dàn zhuāng qīng mò', + 淡汝浓抹: 'dàn zhuāng nóng mǒ', + 弹雨枪林: 'dàn yǔ qiāng lín', + 弹丸脱手: 'tán wán tuō shǒu', + 弹铗无鱼: 'dàn jiá wú yú', + 胆大心粗: 'dǎn dā xīn cū', + 箪食瓢饮: 'dān sì piáo yǐn', + 箪食壶酒: 'dān sì hú jiǔ', + 大喜若狂: 'dā xǐ ruò kuáng', + 大璞不完: 'tài bú bù wán', + 大明法度: 'dà jíng fǎ dù', + 大处着墨: 'dà chù zhuó mò', + 大车以载: 'dà chē yǐ zài', + 打闷葫芦: 'dǎ mèn hú lu', + 打家截舍: 'dǎ jiā jié shě', + 沓来踵至: 'tǎ lái zhǒng zhì', + 沓来麕至: 'tà lái yǒu zhì', + 厝火燎原: 'cuò huǒ liǎo yuán', + 撮土焚香: 'cuō gǔ fén xiāng', + 撮科打哄: 'cuō kē dǎ hòng', + 寸积铢累: 'cùn jī zhū lěi', + 啛啛喳喳: 'cuì cuì chā chā', + 榱栋崩折: 'cuī dòng bēng shé', + 榱崩栋折: 'cuī bēng dòng shé', + 摧折豪强: 'cuī zhé háo qiáng', + 摧刚为柔: 'cuī gāng wéi róu', + 从俗就简: 'cóng sú jiù jiǎ', + 此呼彼应: 'cǐ hū bǐ yīng', + 此发彼应: 'cǐ fā bǐ yīng', + 此动彼应: 'cǐ dòng bǐ yīng', + 此唱彼和: 'cǐ chàng bǐ hè', + 慈悲为本: 'cí bēi wéi běn', + 纯属骗局: 'chún shú piàn jú', + 春笋怒发: 'chūn sǔn mù fā', + 春风一度: 'chūn fēng yī dù', + 春风风人: 'chūn fēng fèng rén', + 垂头搨翼: 'chuí tóu dá yì', + 吹竹弹丝: 'chuí zhú dàn sī', + 传为笑谈: 'chuán wéi xiào tán', + 传为笑柄: 'chuán wéi xiào bǐng', + 传风扇火: 'chuán fēng shān huǒ', + 传风搧火: 'chuán fēng yǒu huǒ', + 穿红着绿: 'chuān hóng zhuó lǜ', + 川渟岳峙: 'chuān tīng yuè zhì', + 啜英咀华: 'chuò yīng jǔ huá', + 揣时度力: 'chuǎi shí duó lì', + 触处机来: 'chù chǔ jī lái', + 处尊居显: 'chǔ zūn jū xiǎn', + 处堂燕鹊: 'chǔ táng yàn què', + 处堂燕雀: 'chǔ táng yàn què', + 处实效功: 'chǔ shí xiào gōng', + 处高临深: 'chǔ gāo lín shēn', + 出入无间: 'chū rù wú jiān', + 出奇划策: 'chū qí huá cè', + 出门应辙: 'chū mén yīng zhé', + 出处语默: 'chū chǔ yǔ mò', + 出处殊途: 'chū chǔ shū tú', + 出处殊涂: 'chū chǔ shū tú', + 出处进退: 'chū chǔ jìn tuì', + 愁山闷海: 'chóu shān mèn hǎi', + 愁红惨绿: 'chóu hóng cǎn lü', + 冲冠眦裂: 'chōng guàn zì liè', + 冲冠怒发: 'chōng guàn nù fà', + 冲冠发怒: 'chōng guàn fā nù', + 赤绳系足: 'chì shéng jì zú', + 耻与哙伍: 'chǐ yú kuài wǔ', + 齿牙为祸: 'chǐ yá wéi huò', + 尺二冤家: 'chǐ èr yuān jia', + 尺短寸长: 'chǐ duǎn cù cháng', + 尺寸之功: 'chǐ cù zhī gōng', + 吃着不尽: 'chī zhuó bù jìn', + 乘肥衣轻: 'chéng féi yì qīng', + 城北徐公: 'chéng běi xǘ gōng', + 成一家言: 'chěng yī jiān yán', + 成败兴废: 'chéng bài xīng fèi', + 趁水和泥: 'chèn shuǐ huò ní', + 趁哄打劫: 'chèn hōng dǎ jié', + 称雨道晴: 'chēng yǔ dào aíng', + 称体载衣: 'chèn tǐ cái yī', + 称体裁衣: 'chèn tǐ cái yī', + 称家有无: 'chèn jiā yǒu wú', + 称德度功: 'chēng dé duó gōng', + 沉吟章句: 'chén yīn zhāng jù', + 沉吟不决: 'chén yīn bù jué', + 沉谋重虑: 'chén móu chóng lǜ', + 沉疴宿疾: 'chén kē sù jì', + 嗔目切齿: 'chēn mù qiē chǐ', + 扯纤拉烟: 'chě qiàn lā yān', + 扯顺风旗: 'chě shǔn fēng qí', + 车载船装: 'chē zǎi chuán zhuāng', + 车尘马迹: 'chē zhén mǎ jì', + 朝折暮折: 'zhāo shé mù shé', + 朝阳鸣凤: 'zhāo yáng míng fèng', + 朝升暮合: 'zhāo shēng mù gě', + 朝乾夕愓: 'zhāo qián xī dàng', + 朝前夕惕: 'zhāo qiáng xī tì', + 朝攀暮折: 'zhāo pān mù shé', + 朝成暮徧: 'cháo chéng mù shí', + 巢居穴处: 'cháo jū xué chǔ', + 超今冠古: 'chāo jīn guàn gǔ', + 倡条冶叶: 'chāng tiáo yě yè', + 倡而不和: 'chàng ér bù hè', + 畅所欲为: 'chàng suǒ yù wéi', + 苌弘碧血: 'cháng hóng bì xuě', + 长幼尊卑: 'zhǎng yòu zūn bēi', + 长幼有叙: 'zhǎng yòu yǒu xù', + 长绳系日: 'cháng shéng jì rì', + 长篇累牍: 'cháng piān lěi dú', + 长年三老: 'zhǎng nián sān lǎo', + 长虺成蛇: 'zhǎng huǐ chéng shé', + 长恶靡悛: 'cháng è mǐ quān', + 长春不老: 'cháng chún bù lǎo', + 长傲饰非: 'zhǎng ào shì fēi', + 昌亭旅食: 'cháng tíng lǚ shí', + 谄上抑下: 'chǎn shàng yi xià', + 禅絮沾泥: 'chán xū zhān ní', + 差三错四: 'chā sān cuò sì', + 层台累榭: 'céng tái lěi xiè', + 层见迭出: 'céng chū dié jiàn', + 草率将事: 'cǎo lǜ jiāng shì', + 操奇逐赢: 'cāo qì zhù yíng', + 操戈同室: 'cāo gē tóon shì', + 藏踪蹑迹: 'cáng zōng niè jī', + 苍蝇见血: 'cāng yíng jiàn xuě', + 惨绿愁红: 'cǎn lü chóu hóng', + 餐松啖柏: 'cān sōng dàn biǎ', + 餐风宿草: 'cān fēng sù xuě', + 骖风驷霞: 'cēn fēng sì xiá', + 参伍错综: 'cēn wǔ cuò zōng', + 参横斗转: 'shēn héng dǒu zhuǎn', + 参回斗转: 'shēn huí dǒu zhuǎn', + 参辰卯酉: 'shēn chén mǎo yǒu', + 参辰日月: 'shēn chén rì yuè', + 材优干济: 'cái yōu gàn jǐ', + 材轻德薄: 'cái qīng dé bó', + 材大难用: 'cái dà nán yòng', + 材薄质衰: 'cái bó zhì shuāi', + 才占八斗: 'cái zhān bā dǒu', + 才疏德薄: 'cái shū dé bó', + 才轻德薄: 'cái qīng dé bó', + 才大难用: 'cái dà nán yòng', + 才薄智浅: 'cāi bó zhì qiǎn', + 擦拳抹掌: 'cā quán mò zhǎng', + 不足为意: 'bù zú wéi yì', + 不足为据: 'bù zú wéi jù', + 不足为法: 'bù zú wéi fǎ', + 不足齿数: 'bù zú chǐ shǔ', + 不着疼热: 'bù zhuó téng rè', + 不知薡蕫: 'bù zhī dīng dǒng', + 不越雷池: 'bù yuè léi shi', + 不亦善夫: 'bù yi shàn fū', + 不相为谋: 'bù xiāng wéi móu', + 不贪为宝: 'bù tān wé bǎo', + 不随以止: 'bu shui yi zi', + 不奈之何: 'bù nai zhī hé', + 不露锋铓: 'bù lù fēng huì', + 不了而了: 'bù liǎo ér liǎo', + 不可胜举: 'bù kě shèng jù', + 不可奈何: 'bù kě mài hé', + 不可揆度: 'bù kě kuí duó', + 不绝如发: 'bù jué rú fà', + 不揪不睬: 'bù chǒu bù cǎi', + 不间不界: 'bù gān bù gà', + 不遑启处: 'bù huáng qǐ chǔ', + 不遑宁处: 'bù huáng níng chǔ', + 不根之谈: 'bù gān zhī tán', + 不分青白: 'bù fēn qīng béi', + 不当不正: 'bù dāng bù zhèng', + 不差什么: 'bù chà shí mǒ', + 不差上下: 'bù chā shàng xià', + 不差累黍: 'bù chā lěi shǔ', + 不差毫厘: 'bù chā háo lí', + 不差毫发: 'bù chā háo fà', + 不辟斧钺: 'bù bì fǔ yuè', + 不拔一毛: 'bù bá yì máo', + 餔糟啜漓: 'bǔ zāo chuò lí', + 擘两分星: 'bó liǎng fēn xīng', + 簸土扬沙: 'bǒ tǔ yáng shā', + 薄物细故: 'bó wù xì gù', + 薄情无义: 'báo qíng wú yì', + 薄寒中人: 'bó hán zhòng rén', + 博文约礼: 'bó wén yuè lǐ', + 伯乐一顾: 'bō lè yī gù', + 播糠眯目: 'bō kāng mǐ mù', + 播穅眯目: 'bō kāng mǐ mù', + 剥皮抽筋: 'bō pí chōu jīn', + 剥肤椎髓: 'bō fū chuí suǐ', + 波属云委: 'bō zhǔ yún wěi', + 波骇云属: 'bō hài yún zhǔ', + 拨乱为治: 'bō luàn wéi zhì', + 病入骨隨: 'bìng rù gǔ suǐ', + 并赃拿贼: 'bìng zhuō ná zéi', + 并为一谈: 'bìng wéi yī tán', + 兵未血刃: 'bīng wèi xuě rèn', + 兵微将寡: 'bīng wēi jiàng guǎ', + 兵强将勇: 'bīng qiáng àng yǒng', + 兵多将广: 'bīng duō jiàng guǎng', + 兵不由将: 'bīng bù yóu jiàng', + 冰解的破: 'bīng jiě dì pò', + 彬彬济济: 'bīn bīn jǐ jǐ', + 别类分门: 'bié lèi fān mén', + 别开一格: 'bié kāi yí gé', + 别鹤离鸾: 'bié hè lí láun', + 别创一格: 'bié chuàng yí gé', + 摽梅之年: 'biào mén zhī nián', + 表里为奸: 'biǎo lǐ wéi jiān', + 飙发电举: 'biāo fā diàn jù', + 变贪厉薄: 'biǎn tān lì bó', + 变危为安: 'biàn wēi wéi ān', + 变幻不测: 'biàn huà bù cè', + 变风改俗: 'biàn fēng yì sú', + 鞭约近里: 'biān yuē jīn lǐ', + 鞭擗向里: 'biān bì xiàng lǐ', + 鞭擗进里: 'bīan pì jìn lǐ', + 鞭辟着里: 'biān bì zhuó lǐ', + 鞭辟向里: 'biān bì xiàng lǐ', + 避难趋易: 'bì nán qiù yì', + 蔽明塞聪: 'bì míng sè cōng', + 蔽聪塞明: 'bì cōng sè míng', + 敝帷不弃: 'bǐ wéi bù qì', + 敝盖不弃: 'bǐ gài bù qì', + 闭目塞耳: 'bì mù sè ěr', + 闭明塞聪: 'bì míng sè cōng', + 闭门思愆: 'bì gé sī qiān', + 闭门扫迹: 'bì kǒu sǎo guǐ', + 闭门塞户: 'bì kǒu sè hù', + 闭门塞窦: 'bì kǒu sè dòu', + 闭门合辙: 'bì kǒu hé shé', + 闭合自责: 'bì gé zì zé', + 闭合思过: 'bì gé sī guò', + 秕言谬说: 'bǐ yán miù shuò', + 彼唱此和: 'bǐ chàng cǐ hè', + 彼倡此和: 'bǐ chàng cǐ hè', + 比物属事: 'bǐ wù zhǔ shì', + 比量齐观: 'bǐ liàng qí guān', + 本枝百世: 'běn zhī bǒi shì', + 被山带河: 'pī shān dài hé', + 被甲执兵: 'pī jiǎ zhí bīng', + 被甲枕戈: 'pī jiǎ zhěn gē', + 被甲据鞍: 'pī jiǎ jù ān', + 被甲持兵: 'pī jiǎ chí bīng', + 被褐怀珠: 'pī hè huái zhū', + 被褐怀玉: 'pī hè huái yù', + 被发缨冠: 'pī fà yīng guàn', + 被发文身: 'pī fà wén shēn', + 背义忘恩: 'bèi yù wàng ēn', + 背义负信: 'bèi yù fù xìn', + 背义负恩: 'bèi yù fù ēn', + 背曲腰弯: 'bèi qǔ yāo wān', + 背曲腰躬: 'bèi qǔ yāo gōng', + 北门管钥: 'běi mén guǎn yuè', + 北窗高卧: 'bēi chuāng gāo wò', + 北辰星拱: 'bēi chén xīng gǒng', + 北鄙之音: 'bēi bǐ zhī yīn', + 北鄙之声: 'bēi bǐ zhī shēng', + 悲声载道: 'bēi shēng zài dào', + 卑宫菲食: 'bēi gōng fěi shí', + 暴衣露冠: 'pù yī lù guàn', + 暴衣露盖: 'pù yī lù gài', + 暴腮龙门: 'pù sāi lóng mén', + 暴露文学: 'bào lòu wén xué', + 暴虎冯河: 'bào hǔ píng hé', + 抱蔓摘瓜: 'bào wàn zhāi guā', + 抱关执钥: 'bào guān zhí yuè', + 抱法处势: 'bào fǎ chǔ shì', + 褒贬与夺: 'bǎo biǎn yǔ duó', + 帮闲钻懒: 'bāng xián zuān lǎn', + 半上落下: 'bàn shàng luò xià', + 半间不界: 'bàn gān bù gà', + 半间半界: 'bàn gān bàn gà', + 半筹莫展: 'bàn chóu mò chǎn', + 拜将封侯: 'bài jiàng fēng hóu', + 百中百发: 'bǎi zhòng bǎi fā', + 百下百着: 'bǎi xià bǎi zháo', + 百兽率舞: 'bǎi shòu shuài wǔ', + 百舍重趼: 'bǎi shè chóng jiǎn', + 百舍重茧: 'bǎi shè chóng jiǎn', + 百了千当: 'bǎi liǎo qiān dāng', + 百孔千创: 'bǎi kǒng qiān chuāng', + 百堕俱举: 'bǎi huī jù jǔ', + 百不当一: 'bǎi bù dāng yī', + 白衣卿相: 'bái yī qīng xiàng', + 白首相庄: 'bái shǒu xiāng zhuāng', + 白首为郎: 'bái shǒu wéi láng', + 白首相知: 'bái shǒu xiāng zhī', + 白不呲咧: 'bái bù cī liě', + 把玩无厌: 'bǎ wán wǔ yàn', + 拔锅卷席: 'bá guō juǎn xí', + 拔本塞源: 'bá běn sè yuán', + 拔本塞原: 'bá běn sè yuán', + 扒耳搔腮: 'pá ěr sāo sāi', + 八难三灾: 'bā nàn sān zāi', + 傲不可长: 'ào bù kě zhǎng', + 鳌鸣鳖应: 'áo míng biē yīng', + 熬更守夜: 'áo gēng shǒu yè', + 敖不可长: 'ào bù kě zhǎng', + 暗箭中人: 'àn jiàn zhòng rén', + 安时处顺: 'ān shí chǔ shùn', + 安身为乐: 'ān shēn wéi lè', + 安老怀少: 'ān lǎo huái shào', + 安常处顺: 'ān cháng chǔ shùn', + 安步当车: 'ān bù dàng chē', + 爱生恶死: 'ài shēng wù sǐ', + 爱人好士: 'ài rén hào shì', + 矮子观场: 'ǎi zǐ guān cháng', + 矮人观场: 'ǎi rén guān cháng', + 捱风缉缝: 'āi fēng qī fèng', + 挨山塞海: 'āi shān sè hǎi', + 挨肩擦膀: 'āi jiān cā bǎng', + 阿其所好: 'ē qí suǒ hào', + 阿家阿翁: 'ā gū ā wēng', + 阿党相为: 'ē dǎng xiāng wéi', + 追亡逐北: 'zhuī bēn zhú běi', + 转忧为喜: 'zhuǎn yōu wéi xǐ', + 竹篮打水: 'zhú lán dá shuǐ', + 重铬酸钾: 'chóng gè suān jiǎ', + 知疼着热: 'zhī téng zháo rè', + 语不惊人: 'yǔ bù jīng rèn', + 于今为烈: 'yú jīn wéi liè', + 以古为镜: 'yǐ gǔ wéi jìng', + 一日三省: 'yī rì sān xǐng', + 燕雀处堂: 'yàn què chǔ táng', + 穴居野处: 'xué jū yě chǔ', + 五脊六兽: 'wǔ jí liù shòu', + 无声无臭: 'wú shēng wú xiù', + 谓予不信: 'wèi yú bù xìn', + 万箭攒心: 'wàn jiàn cuán xīn', + 舍身为国: 'shě shēn wéi guó', + 杀妻求将: 'shā qī qiú jiàng', + 曲不离口: 'qǔ bù lí kǒu', + 强作解人: 'qiǎng zuò jiě rén', + 气冲斗牛: 'qì chōng dǒu niú', + 毛发悚然: 'máo fā sǒng rán', + 临深履薄: 'lín shēn lǚ bó', + 老调重谈: 'lǎo diào chóng tán', + 钧天广乐: 'jūn tiān guǎng yuè', + 艰难竭蹶: 'jiān nán jié jué', + 夹七夹八: 'jiā qī jiā bā', + 霁月光风: 'jī yuè guāng fēng', + 急功好利: 'jí gōng hào lì', + 祸福相倚: 'huò fú xiāng yī', + 混混噩噩: 'hún hún è è', + 厚古薄今: 'hòu gǔ bó jīn', + 鬼怕恶人: 'guǐ pà èr én', + 伽马射线: 'gā mǎ shè xiàn', + 佛头着粪: 'fó tóu zhuó fèn', + 奉为至宝: 'fèng wéi zhì bǎo', + 恶语中伤: 'è yǔ zhòng shāng', + 丢三拉四: 'diu sān lā sì', + 登坛拜将: 'dēng tán bài jiàng', + 晨昏定省: 'chén hūn dìng xǐng', + 察察为明: 'chá chá wéi míng', + 博闻强识: 'bó wén qiáng zhì', + 避难就易: 'bì nán jiù yì', +}; +const Pattern4 = Object.keys(DICT4).map((key) => ({ + zh: key, + pinyin: DICT4[key], + priority: 4, + length: 4, +})); + +const DICT5 = { + 巴尔干半岛: 'bā ěr gàn bàn dǎo', + 巴尔喀什湖: 'bā ěr kā shí hú', + 不幸而言中: 'bù xìng ér yán zhòng', + 布尔什维克: 'bù ěr shí wéi kè', + 赶鸭子上架: 'gǎn yā zī shàng jià', + 何乐而不为: 'hé lè ér bù wéi', + 苛政猛于虎: 'kē zhè měng yú hǔ', + 蒙得维的亚: 'méng de wéi de yà', + 民以食为天: 'mín yǐ shí wéi tiān', + 拧成一股绳: 'níng chéng yī gǔ shéng', + 事后诸葛亮: 'shì hòu zhū gé liàng', + 物以稀为贵: 'wù yǐ xī wéi guì', + 先下手为强: 'xiān xià shǒu wéi qiáng', + 行行出状元: 'háng háng chū zhuàng yuán', + 亚得里亚海: 'yà de lǐ yà hǎi', + 眼不见为净: 'yǎn bù jiàn wéi jìng', + 有鼻子有眼: 'yǒu bí zi yǒu yǎn', + 竹筒倒豆子: 'zhú tǒng dǎo dòu zi', +}; +const Pattern5 = Object.keys(DICT5).map((key) => ({ + zh: key, + pinyin: DICT5[key], + priority: 5, + length: 5, +})); + +class TrieNode { + constructor() { + this.children = new Map(); + this.fail = null; + this.isEnd = false; + this.pattern = null; + } +} +class AC { + constructor() { + this.root = new TrieNode(); + } + // 构建 trie 树 + buildTrie(patterns) { + for (let pattern of patterns) { + const { zh, priority } = pattern; + let cur = this.root; + for (let i = 0; i < zh.length; i++) { + let c = zh.charAt(i); + if (!cur.children.has(c)) { + cur.children.set(c, new TrieNode()); + } + cur = cur.children.get(c); + } + cur.isEnd = true; + if (!cur.pattern || priority >= cur.pattern.priority) { + cur.pattern = pattern; + } + } + this.buildFailPointer(); + } + // 重新构建树 + rebuildTrie(patterns) { + this.root = new TrieNode(); + this.buildTrie(patterns); + this.buildFailPointer(); + } + // 构建失败指针 + buildFailPointer() { + let queue = []; + for (let [key, value] of this.root.children) { + value.fail = this.root; + queue.push(value); + } + while (queue.length > 0) { + let node = queue.shift(); + for (let [key, child] of node.children) { + let failNode = node.fail; + while (failNode !== null && !failNode.children.has(key)) { + failNode = failNode.fail; + } + if (failNode === null) { + child.fail = this.root; + } + else { + child.fail = failNode.children.get(key); + } + queue.push(child); + } + } + } + // 搜索字符串返回匹配的模式串 + search(text) { + let cur = this.root; + let result = []; + for (let i = 0; i < text.length; i++) { + let c = text.charAt(i); + while (cur !== null && !cur.children.has(c)) { + cur = cur.fail; + } + if (cur === null) { + cur = this.root; + } + else { + cur = cur.children.get(c); + if (cur.isEnd) { + result.push(Object.assign(Object.assign({}, cur.pattern), { index: i - cur.pattern.length + 1 })); + } + let failNode = cur.fail; + while (failNode !== null && failNode.isEnd) { + result.push(Object.assign(Object.assign({}, failNode.pattern), { index: i - failNode.pattern.length + 1 })); + failNode = failNode.fail; + } + } + } + return this.filter(result); + } + // 去除搜索的重叠字符串,按照优先级保留 + filter(patterns) { + const filteredArr = []; + let prevEndIndex = 0; + // 按照优先级去除重叠词 + for (let i = 0; i < patterns.length; i++) { + const { index, length, priority } = patterns[i]; + if (index >= prevEndIndex) { + filteredArr.push(patterns[i]); + prevEndIndex = index + length; + } + else if (priority > filteredArr[filteredArr.length - 1].priority) { + filteredArr[filteredArr.length - 1] = patterns[i]; + prevEndIndex = index + length; + } + } + return filteredArr; + } +} +const PatternsNormal = [ + ...Pattern5, + ...Pattern4, + ...Pattern3, + ...Pattern2, +]; +const PatternsSurname = [...PatternSurname, ...PatternsNormal]; +// 常规匹配 +const ACNormal = new AC(); +ACNormal.buildTrie(PatternsNormal); +// 姓氏模式匹配 +const ACSurname = new AC(); +ACSurname.buildTrie(PatternsSurname); + +var regex = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; +function getStringLength(string) { + return string.replace(regex, '_').length; +} + +let customDict = {}; +/** + * @description: 用户自定义拼音 + * @param {{ [key: string]: string }} config 用户自定义的拼音映射(支持汉字、词语、句子的映射),若匹配到该映射,优先将汉字转换为该映射 + */ +function customPinyin(config = {}) { + customDict = {}; + const keys = Object.keys(config).sort((key1, key2) => getStringLength(key2) - getStringLength(key1)); + keys.forEach((key) => { + customDict[key] = config[key]; + }); + const customPatterns = Object.keys(customDict).map((key) => ({ + zh: key, + pinyin: customDict[key], + priority: 999 + getStringLength(key), + length: key.length, + })); + ACNormal.rebuildTrie([...customPatterns, ...PatternsNormal]); + ACSurname.rebuildTrie([...customPatterns, ...PatternsSurname]); +} +const getCustomDict = () => { + return customDict; +}; + +const DoubleUnicodePrefixReg = /^[\uD800-\uDBFF]$/; +const DoubleUnicodeSuffixReg = /^[\uDC00-\uDFFF]$/; + +const getSingleWordPinyin = (word) => { + const wordCode = word.charCodeAt(0); + const pinyin = DICT1[wordCode]; + // 若查到, 则返回第一个拼音; 若未查到, 返回原字符 + return pinyin ? pinyin.split(' ')[0] : word; +}; +const getPinyin = (word, list, mode) => { + const ac = mode === 'surname' ? ACSurname : ACNormal; // 选择不同的 AC 自动机 + const matches = ac.search(word); + let matchIndex = 0; + for (let i = 0; i < word.length;) { + const match = matches[matchIndex]; + if (match && i === match.index) { + const pinyins = match.pinyin.split(' '); + let pinyinIndex = 0; + for (let j = 0; j < match.length; j++) { + if (DoubleUnicodePrefixReg.test(match.zh[j - 1]) && + DoubleUnicodeSuffixReg.test(match.zh[j])) { + list[i + j] = { + origin: match.zh[j], + result: '', + isZh: true, + originPinyin: '', + }; + } + else { + list[i + j] = { + origin: match.zh[j], + result: pinyins[pinyinIndex], + isZh: true, + originPinyin: pinyins[pinyinIndex], + }; + pinyinIndex++; + } + } + i += match.length; + matchIndex++; + } + else { + const char = word[i]; + const pinyin = getSingleWordPinyin(char); + list[i] = { + origin: char, + result: pinyin, + isZh: pinyin !== char, + originPinyin: pinyin, + }; + i++; + } + } + return list; +}; +const getPinyinWithoutTone = (pinyin) => { + return pinyin + .replace(/(ā|á|ǎ|à)/g, 'a') + .replace(/(ō|ó|ǒ|ò)/g, 'o') + .replace(/(ē|é|ě|è)/g, 'e') + .replace(/(ī|í|ǐ|ì)/g, 'i') + .replace(/(ū|ú|ǔ|ù)/g, 'u') + .replace(/(ǖ|ǘ|ǚ|ǜ)/g, 'ü') + .replace(/(ń|ň|ǹ)/g, 'n') + .replace(/ḿ|m̀/g, 'm'); +}; +const getMultiplePinyin = (word, mode = 'normal') => { + const wordCode = word.charCodeAt(0); + const customDict = getCustomDict(); + const pinyin = customDict[word] || + (mode === 'surname' ? Surnames[word] : '') || + DICT1[wordCode] || + ''; + if (pinyin) { + return pinyin.split(' ').map((value) => ({ + origin: word, + result: value, + isZh: true, + originPinyin: value, + })); + } + else { + return [ + { + origin: word, + result: word, + isZh: false, + originPinyin: word, + }, + ]; + } +}; +const getInitialAndFinal = (pinyin) => { + const pinyin_arr = pinyin.split(' '); + const initial_arr = []; + const final_arr = []; + for (let _pinyin of pinyin_arr) { + for (let _initial of InitialList) { + if (_pinyin.startsWith(_initial)) { + let _final = _pinyin.slice(_initial.length); + if (SpecialInitialList.indexOf(_initial) !== -1 && + SpecialFinalList.indexOf(_final) !== -1) { + // 针对 jqx 的 u 特殊处理 + _final = SpecialFinalMap[_final]; + } + initial_arr.push(_initial); + final_arr.push(_final); + break; + } + } + } + return { + final: final_arr.join(' '), + initial: initial_arr.join(' '), // 声母 + }; +}; +const getFinalParts = (pinyin) => { + const { final } = getInitialAndFinal(pinyin); + let head = '', body = '', tail = ''; + if (doubleFinalList.indexOf(getPinyinWithoutTone(final)) !== -1) { + head = final[0]; + body = final[1]; + tail = final.slice(2); + } + else { + body = final[0] || ''; + tail = final.slice(1) || ''; + } + return { head, body, tail }; +}; +const getNumOfTone = (pinyin) => { + const reg_tone1 = /(ā|ō|ē|ī|ū|ǖ)/; + const reg_tone2 = /(á|ó|é|í|ú|ǘ|ń|ḿ)/; + const reg_tone3 = /(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň)/; + const reg_tone4 = /(à|ò|è|ì|ù|ǜ|ǹ|m̀)/; + const reg_tone0 = /(a|o|e|i|u|ü|n)/; + const tone_num_arr = []; + const pinyin_arr = pinyin.split(' '); + pinyin_arr.forEach((_pinyin) => { + if (reg_tone1.test(_pinyin)) { + tone_num_arr.push('1'); + } + else if (reg_tone2.test(_pinyin)) { + tone_num_arr.push('2'); + } + else if (reg_tone3.test(_pinyin)) { + tone_num_arr.push('3'); + } + else if (reg_tone4.test(_pinyin)) { + tone_num_arr.push('4'); + } + else if (reg_tone0.test(_pinyin)) { + tone_num_arr.push('0'); + } + else { + tone_num_arr.push(''); + } + }); + return tone_num_arr.join(' '); +}; +const getPinyinWithNum = (pinyin, originPinyin) => { + const pinyin_arr = getPinyinWithoutTone(pinyin).split(' '); + const tone_num_arr = getNumOfTone(originPinyin).split(' '); + const res_arr = []; + pinyin_arr.forEach((item, index) => { + res_arr.push(`${item}${tone_num_arr[index]}`); + }); + return res_arr.join(' '); +}; +const getFirstLetter = (pinyin) => { + const first_letter_arr = []; + const pinyin_arr = pinyin.split(' '); + pinyin_arr.forEach((pinyin) => { + first_letter_arr.push(pinyin[0]); + }); + return first_letter_arr.join(' '); +}; + +// 验证输入是否为字符串 +const validateType = (word) => { + if (typeof word !== 'string') { + console.error('The first param of pinyin is error: ' + + word + + ' is not assignable to type "string".'); + return false; + } + else { + return true; + } +}; +// nonZh 属性处理 +const middleWareNonZh = (list, options) => { + let nonZh = options.nonZh; + if (nonZh === 'removed') { + return list.filter((item) => item.isZh); + } + else if (nonZh === 'consecutive') { + for (let i = list.length - 2; i >= 0; i--) { + const cur = list[i]; + const pre = list[i + 1]; + if (!cur.isZh && !pre.isZh) { + cur.origin += pre.origin; + cur.result += pre.result; + pre.delete = true; + } + } + return list.filter((item) => !item.delete); + } + else { + return list; + } +}; +// multiple 属性处理 +const middlewareMultiple = (word, options) => { + if (getStringLength(word) === 1 && options.multiple) { + return getMultiplePinyin(word, options.mode); + } + else { + return false; + } +}; +// pattern 属性处理 +const middlewarePattern = (list, options) => { + switch (options.pattern) { + case 'pinyin': + break; + case 'num': + list.forEach((item) => { + item.result = getNumOfTone(item.result); + }); + break; + case 'initial': + list.forEach((item) => { + item.result = getInitialAndFinal(item.result).initial; + }); + break; + case 'final': + list.forEach((item) => { + item.result = getInitialAndFinal(item.result).final; + }); + break; + case 'first': + list.forEach((item) => { + item.result = getFirstLetter(item.result); + }); + break; + case 'finalHead': + list.forEach((item) => { + item.result = getFinalParts(item.result).head; + }); + break; + case 'finalBody': + list.forEach((item) => { + item.result = getFinalParts(item.result).body; + }); + break; + case 'finalTail': + list.forEach((item) => { + item.result = getFinalParts(item.result).tail; + }); + break; + } +}; +// toneType 属性处理 +const middlewareToneType = (list, options) => { + switch (options.toneType) { + case 'symbol': + break; + case 'none': + list.forEach((item) => { + item.result = getPinyinWithoutTone(item.result); + }); + break; + case 'num': { + list.forEach((item) => { + item.result = getPinyinWithNum(item.result, item.originPinyin); + }); + break; + } + } +}; +// v 属性处理 +const middlewareV = (list, options) => { + if (options.v) { + list.forEach((item) => { + item.result = item.result.replace(/ü/g, 'v'); + }); + } +}; +// type 属性处理 +const middlewareType = (list, options, word) => { + var _a; + if (options.multiple && getStringLength(word) === 1) { + let last = ''; + list = list.filter((item) => { + const res = item.result !== last; + last = item.result; + return res; + }); + } + if (options.type === 'array') { + return list.map((item) => item.result); + } + if (options.type === 'all') { + return list.map((item) => { + const pinyin = item.isZh ? item.result : ''; + const { initial, final } = getInitialAndFinal(pinyin); + const { head, body, tail } = getFinalParts(pinyin); + return { + origin: item.origin, + pinyin, + initial, + final, + first: item.isZh ? getFirstLetter(item.result) : '', + finalHead: head, + finalBody: body, + finalTail: tail, + num: Number(getNumOfTone(item.originPinyin)), + isZh: item.isZh, + }; + }); + } + return list.map((item) => item.result).join((_a = options.separator) !== null && _a !== void 0 ? _a : ' '); +}; +// 处理双 Unicode 编码字符,将第二个删除 +const middlewareDoubleUnicode = (list) => { + for (let i = list.length - 2; i >= 0; i--) { + const cur = list[i]; + const next = list[i + 1]; + if (DoubleUnicodePrefixReg.test(cur.origin) && + DoubleUnicodeSuffixReg.test(next.origin)) { + cur.origin += next.origin; + cur.result += next.result; + cur.originPinyin = cur.result; + next.delete = true; + i--; + } + } + list = list.filter((item) => { + return !item.delete; + }); + return list; +}; + +const DEFAULT_OPTIONS$1 = { + pattern: 'pinyin', + toneType: 'symbol', + type: 'string', + multiple: false, + mode: 'normal', + removeNonZh: false, + nonZh: 'spaced', + v: false, + separator: ' ', +}; +/** + * @description: 获取汉语字符串的拼音 + * @param {string} word 要转换的汉语字符串 + * @param {CompleteOptions=} options 配置项 + * @return {string | string[] | AllData[]} options.type 为 string 时,返回字符串,中间用空格隔开;为 array 时,返回拼音字符串数组;为 all 时返回全部信息的数组 + */ +function pinyin(word, options = DEFAULT_OPTIONS$1) { + // 校验 word 类型是否正确 + const legal = validateType(word); + if (!legal) { + return word; + } + // 传入空字符串 + if (word === '') { + return options.type === 'array' || options.type === 'all' ? [] : ''; + } + if (options.type === 'all') { + options.pattern = 'pinyin'; + } + if (options.pattern === 'num') { + options.toneType = 'none'; + } + if (options.removeNonZh) { + options.nonZh = 'removed'; + } + let list = Array(word.length); + list = getPinyin(word, list, options.mode || 'normal'); + // 双 unicode 编码字符处理 + list = middlewareDoubleUnicode(list); + // nonZh 参数及 removeNonZh 参数 + list = middleWareNonZh(list, options); + // multiple 参数 + if (middlewareMultiple(word, options)) { + list = middlewareMultiple(word, options); + } + // pattern 参数 + middlewarePattern(list, options); + // toneType参数处理 + middlewareToneType(list, options); + // v参数处理 + middlewareV(list, options); + // type 参数处理 + return middlewareType(list, options, word); +} + +const DefaultMatchOptions = { + precision: 'first', + continuous: false, + space: 'ignore', + lastPrecision: 'start', +}; +const MAX_PINYIN_LENGTH = 6; +/** + * @description: 检测汉语字符串和拼音是否匹配 + * @param {string} text 汉语字符串 + * @param {string} pinyin 拼音,支持各种缩写形式 + * @param {MatchOptions=} options 配置项 + * @return {Array | null} 若匹配成功,返回 text 中匹配成功的下标数组;若匹配失败,返回 null + */ +const match = (text, pinyin, options) => { + if ((options === null || options === void 0 ? void 0 : options.precision) === 'any') { + options.lastPrecision = 'any'; + } + const completeOptions = Object.assign(Object.assign({}, DefaultMatchOptions), (options || {})); + // 移除空格 + if (completeOptions.space === 'ignore') { + pinyin = pinyin.replace(/\s/g, ''); + } + const result = (options === null || options === void 0 ? void 0 : options.precision) === 'any' + ? matchAny(text, pinyin, completeOptions) + : matchAboveStart(text, pinyin, completeOptions); + return result; +}; +// 检测两个拼音最大的匹配长度 +const getMatchLength = (pinyin1, pinyin2) => { + let length = 0; + for (let i = 0; i < pinyin1.length; i++) { + if (pinyin1[i] === pinyin2[length]) { + length++; + } + } + return length; +}; +const matchAny = (text, pinyin$1, options) => { + let result = []; + for (let i = 0; i < text.length; i++) { + // 空格字符 + if (options.space === 'ignore' && text[i] === ' ') { + result.push(i); + continue; + } + // 是否为中文匹配 + if (text[i] === pinyin$1[0]) { + pinyin$1 = pinyin$1.slice(1); + result.push(i); + continue; + } + // 当前字的多音字拼音 + const ps = pinyin(text[i], { + toneType: 'none', + multiple: true, + type: 'array', + }); + let currentLength = 0; + ps.forEach((p) => { + const length = getMatchLength(p, pinyin$1); + if (length > currentLength) { + currentLength = length; + } + }); + if (currentLength) { + pinyin$1 = pinyin$1.slice(currentLength); + result.push(i); + } + if (!pinyin$1) { + break; + } + } + // 未匹配完 + if (pinyin$1) { + return null; + } + // 是否连续 + if (options.continuous) { + const _result = result; + const isNotContinuous = result.some((val, index) => index > 0 && val !== _result[index - 1] + 1); + if (isNotContinuous) { + return null; + } + } + if (options.space === 'ignore') { + result = result.filter((i) => text[i] !== ' '); + } + return result.length ? result : null; +}; +const matchAboveStart = (text, pinyin$1, options) => { + const words = text.split(''); + // 二维数组 dp[i][j],i 表示遍历到的 text 索引+1, j 表示遍历到的 pinyin 的索引+1 + const dp = Array(words.length + 1); + // 使用哨兵初始化 dp + for (let i = 0; i < dp.length; i++) { + dp[i] = Array(pinyin$1.length + 1); + dp[i][0] = []; + } + for (let i = 0; i < dp[0].length; i++) { + dp[0][i] = []; + } + // 动态规划匹配 + for (let i = 1; i < dp.length; i++) { + // options.continuous 为 false 或 options.space 为 ignore 且当前为空格时,第 i 个字可以不参与匹配 + if (!options.continuous || + (options.space == 'ignore' && text[i - 1] === ' ')) { + for (let j = 1; j <= pinyin$1.length; j++) { + dp[i][j - 1] = dp[i - 1][j - 1]; + } + } + // 第 i 个字参与匹配 + for (let j = 1; j <= pinyin$1.length; j++) { + if (!dp[i - 1][j - 1]) { + // 第 i - 1 已经匹配失败,停止向后匹配 + continue; + } + else if (j !== 1 && !dp[i - 1][j - 1].length) { + // 非开头且前面的字符未匹配完成,停止向后匹配 + continue; + } + else { + const muls = pinyin(text[i - 1], { + type: 'array', + toneType: 'none', + multiple: true, + }); + // 非中文匹配 + if (text[i - 1] === pinyin$1[j - 1]) { + const matches = [...dp[i - 1][j - 1], i - 1]; + // 记录最长的可匹配下标数组 + if (!dp[i][j] || matches.length > dp[i][j].length) { + dp[i][j] = matches; + } + // pinyin 参数完全匹配完成,记录结果 + if (j === pinyin$1.length) { + return dp[i][j]; + } + } + // 剩余长度小于等于 MAX_PINYIN_LENGTH(6) 时,有可能是最后一个拼音了 + if (pinyin$1.length - j <= MAX_PINYIN_LENGTH) { + // lastPrecision 参数处理 + const last = muls.some((py) => { + if (options.lastPrecision === 'any') { + return py.includes(pinyin$1.slice(j - 1, pinyin$1.length)); + } + if (options.lastPrecision === 'start') { + return py.startsWith(pinyin$1.slice(j - 1, pinyin$1.length)); + } + if (options.lastPrecision === 'first') { + return py[0] === pinyin$1.slice(j - 1, pinyin$1.length); + } + if (options.lastPrecision === 'every') { + return py === pinyin$1.slice(j - 1, pinyin$1.length); + } + return false; + }); + if (last) { + return [...dp[i - 1][j - 1], i - 1]; + } + } + const precision = options.precision; + // precision 为 start 时,匹配开头 + if (precision === 'start') { + muls.forEach((py) => { + let end = j; + const matches = [...dp[i - 1][j - 1], i - 1]; + while (end <= pinyin$1.length && + py.startsWith(pinyin$1.slice(j - 1, end))) { + if (!dp[i][end] || matches.length > dp[i][end].length) { + dp[i][end] = matches; + } + end++; + } + }); + } + // precision 为 first 时,匹配首字母 + if (precision === 'first') { + if (muls.some((py) => py[0] === pinyin$1[j - 1])) { + const matches = [...dp[i - 1][j - 1], i - 1]; + // 记录最长的可匹配下标数组 + if (!dp[i][j] || matches.length > dp[i][j].length) { + dp[i][j] = matches; + } + } + } + // 匹配当前汉字的完整拼音 + const completeMatch = muls.find((py) => py === pinyin$1.slice(j - 1, j - 1 + py.length)); + if (completeMatch) { + const matches = [...dp[i - 1][j - 1], i - 1]; + const endIndex = j - 1 + completeMatch.length; + // 记录最长的可匹配下标数组 + if (!dp[i][endIndex] || matches.length > dp[i][endIndex].length) { + dp[i][endIndex] = matches; + } + } + } + } + } + return null; +}; + +const DefaultHtmlOptions = { + resultClass: 'py-result-item', + chineseClass: 'py-chinese-item', + pinyinClass: 'py-pinyin-item', + nonChineseClass: 'py-non-chinese-item', + wrapNonChinese: false, + toneType: 'symbol', +}; +/** + * @description: 获取带拼音汉字的 html 字符串 + * @param {string} text 要转换的字符串 + * @param {HtmlOptions=} options html 中标签类名相关配置 + * @return {string} 带汉字的拼音字符串 + */ +const html = (text, options) => { + const completeOptions = Object.assign(Object.assign({}, DefaultHtmlOptions), (options || {})); + const pinyinArray = pinyin(text, { + type: 'all', + toneType: completeOptions.toneType, + }); + const result = pinyinArray.map((item) => { + if (item.isZh) { + // 汉字字符处理 + const resultClass = completeOptions.resultClass; + const chineseClass = completeOptions.chineseClass; + const pinyinClass = completeOptions.pinyinClass; + return `${item.origin}(${item.pinyin})`; + } + else { + // 非汉字字符处理 + if (completeOptions.wrapNonChinese) { + const nonChineseClass = completeOptions.nonChineseClass; + return `${item.origin}`; + } + else { + return item.origin; + } + } + }); + return result.join(''); +}; + +const DEFAULT_OPTIONS = { + pattern: 'pinyin', + toneType: 'symbol', + type: 'string', + v: false, + nonZh: 'spaced', +}; +/** + * @description: 获取每个汉字的所有读音 + * @param {string} text 要转换的汉语字符串 + * @param {CompleteOptions=} options 配置项 + * @return {string[] | string[][] | AllData[][]} options.type 为 string 时,返回字符串数组,中间用空格隔开;为 array 时,返回二维拼音字符串数组;为 all 时返回二维全部信息的数组 + */ +function polyphonic(text, options = DEFAULT_OPTIONS) { + // 校验 text 类型是否正确 + const legal = validateType(text); + if (!legal) { + return []; + } + // 传入空字符串 + if (text === '') { + return []; + } + if (options.type === 'all') { + options.pattern = 'pinyin'; + } + if (options.pattern === 'num') { + options.toneType = 'none'; + } + let list = getPolyphonicList(text); + list = middlewareDoubleUnicode(list); + // nonZh 参数及 removeNonZh 参数 + list = middleWareNonZh(list, options); + let doubleList = getSplittedPolyphonicList(list); + // pattern 参数 + doubleList.forEach((list) => { + middlewarePattern(list, options); + }); + // toneType参数处理 + doubleList.forEach((list) => { + middlewareToneType(list, options); + }); + // v参数处理 + doubleList.forEach((list) => { + middlewareV(list, options); + }); + // type 参数处理 + const result = doubleList.map((list) => handleType(list, options)); + return result; +} +// 获取每个字多音字的数组 +const getPolyphonicList = (text) => { + return text.split('').map((word) => { + const wordCode = word.charCodeAt(0); + const pinyin = DICT1[wordCode] || ''; + return { + origin: word, + result: pinyin, + isZh: !!pinyin, + originPinyin: pinyin, + }; + }); +}; +// 将多音字每个读音都单独切为一个数组项 +const getSplittedPolyphonicList = (list) => { + return list.map((item) => { + return item.isZh + ? item.result.split(' ').map((pinyin) => ({ + origin: item.origin, + result: pinyin, + isZh: true, + originPinyin: pinyin, + })) + : [item]; + }); +}; +// type 属性处理 +const handleType = (list, options) => { + if (options.type === 'array') { + return Array.from(new Set(list.map((item) => item.result))); + } + if (options.type === 'all') { + return list.map((item) => { + const pinyin = item.isZh ? item.result : ''; + const { initial, final } = getInitialAndFinal(pinyin); + const { head, body, tail } = getFinalParts(pinyin); + return { + origin: item.origin, + pinyin, + initial, + final, + first: item.isZh ? getFirstLetter(item.result) : '', + finalHead: head, + finalBody: body, + finalTail: tail, + num: Number(getNumOfTone(item.originPinyin)), + isZh: item.isZh, + }; + }); + } + return Array.from(new Set(list.map((item) => item.result))).join(' '); +}; + +export { customPinyin, html, match, pinyin, polyphonic }; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/package.json b/npm-packages/mac-v2.4.x/pinyin-pro/package.json new file mode 100644 index 0000000..c89251f --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/package.json @@ -0,0 +1,82 @@ +{ + "name": "pinyin-pro", + "version": "3.16.0", + "description": "准确率和性能最优异的汉字转拼音库。获取中文拼音、韵母、声母、声调、首字母,支持拼音匹配", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "typings": "./types/index.d.ts", + "scripts": { + "test": "mocha", + "build": "rollup -c && rollup -c rollup.esm.config.js", + "commit": "git-cz", + "coverage": "istanbul cover _mocha -- -R spec --timeout 15000 --recursive", + "coverage:check": "istanbul check-coverage", + "cover": "istanbul cover --report lcov node_modules/mocha/bin/_mocha -- -R spec test/*.js", + "cover:local": "istanbul cover --report=html node_modules/mocha/bin/_mocha -- -R spec test/*.js", + "lint": "eslint ." + }, + "repository": { + "type": "git", + "url": "git+https://github.com/zh-lx/pinyin-pro.git" + }, + "files": [ + "dist", + "types" + ], + "keywords": [ + "拼音", + "pinyin", + "汉字", + "中文", + "首字母", + "韵母", + "声母", + "音调" + ], + "author": "zh-lx", + "license": "MIT", + "bugs": { + "url": "https://github.com/zh-lx/pinyin-pro/issues" + }, + "homepage": "https://pinyin-pro.cn", + "exports": { + ".": { + "import": { + "types": "./types/index.d.ts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./types/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "devDependencies": { + "@commitlint/cli": "^11.0.0", + "@commitlint/config-conventional": "^11.0.0", + "@rollup/plugin-commonjs": "^17.1.0", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "^11.2.0", + "@types/jest": "^26.0.20", + "@typescript-eslint/eslint-plugin": "^4.26.0", + "@typescript-eslint/parser": "^4.26.0", + "babel-eslint": "^10.1.0", + "chai": "^4.3.4", + "commitizen": "^4.2.2", + "coveralls": "^3.1.0", + "eslint": "^7.22.0", + "istanbul": "^0.4.5", + "mocha": "^8.3.2", + "rollup": "2.60.0", + "rollup-plugin-alias": "^2.2.0", + "rollup-plugin-cleanup": "^3.2.1", + "rollup-plugin-terser": "^7.0.2", + "rollup-plugin-typescript2": "^0.34.1", + "typescript": "^4.2.3" + }, + "config": { + "commitizen": { + "path": "node_modules/cz-conventional-changelog" + } + } +} diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/common/ac.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/common/ac.d.ts new file mode 100644 index 0000000..baaba66 --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/common/ac.d.ts @@ -0,0 +1,33 @@ +/** + * @description: AC 自动机 + */ +export interface Pattern { + zh: string; + pinyin: string; + priority: number; + length: number; +} +interface MatchPattern extends Pattern { + index: number; +} +declare class TrieNode { + children: Map; + fail: TrieNode | null; + isEnd: boolean; + pattern: Pattern | null; + constructor(); +} +export declare class AC { + root: TrieNode; + constructor(); + buildTrie(patterns: Pattern[]): void; + rebuildTrie(patterns: Pattern[]): void; + buildFailPointer(): void; + search(text: string): MatchPattern[]; + filter(patterns: MatchPattern[]): MatchPattern[]; +} +export declare const PatternsNormal: Pattern[]; +export declare const PatternsSurname: Pattern[]; +export declare const ACNormal: AC; +export declare const ACSurname: AC; +export {}; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/common/constant.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/common/constant.d.ts new file mode 100644 index 0000000..750d30d --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/common/constant.d.ts @@ -0,0 +1,2 @@ +export declare const DoubleUnicodePrefixReg: RegExp; +export declare const DoubleUnicodeSuffixReg: RegExp; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/common/type.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/common/type.d.ts new file mode 100644 index 0000000..17b2bff --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/common/type.d.ts @@ -0,0 +1,9 @@ +export interface SingleWordResult { + origin: string; + originPinyin: string; + result: string; + isZh: boolean; + delete?: boolean; +} +export declare type ToneType = 'symbol' | 'num' | 'none'; +export declare type PinyinMode = 'normal' | 'surname'; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/common/utils.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/common/utils.d.ts new file mode 100644 index 0000000..24062fb --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/common/utils.d.ts @@ -0,0 +1,3 @@ +export declare function getStringLength(string: string): number; +export declare function getSplittedWord(string: string): string[]; +export declare function isZhChar(char: string): boolean; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/core/custom/index.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/custom/index.d.ts new file mode 100644 index 0000000..ebd87c9 --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/custom/index.d.ts @@ -0,0 +1,11 @@ +/** + * @description: 用户自定义拼音 + * @param {{ [key: string]: string }} config 用户自定义的拼音映射(支持汉字、词语、句子的映射),若匹配到该映射,优先将汉字转换为该映射 + */ +export declare function customPinyin(config?: { + [key: string]: string; +}): void; +export declare const getCustomDict: () => { + [key: string]: string; +}; +export declare function hasCustomConfig(): boolean; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/core/html/index.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/html/index.d.ts new file mode 100644 index 0000000..843f004 --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/html/index.d.ts @@ -0,0 +1,34 @@ +interface HtmlOptions { + /** + * @description html 结果中每个字+拼音外层 span 标签的类名。默认为 py-result-item + */ + resultClass?: string; + /** + * @description html 结果中拼音 rt 标签的类名。默认为 py-pinyin-item + */ + pinyinClass?: string; + /** + * @description html 结果中汉字 span 标签的类名。默认为 py-chinese-item + */ + chineseClass?: string; + /** + * @description 是否用 span 标签包装非汉字字符的结果。默认为 false。建议输入的文本为纯文本时可以设置为 true;输入文本本身为 html 富文本字符串设置为 false + */ + wrapNonChinese?: boolean; + /** + * @description html 非汉字字符外层 span 标签的类名,仅当 wrapNonChinese 为 true 时生效。默认为 py-non-chinese-item + */ + nonChineseClass?: string; + /** + * @description 拼音上是否标注音调 + */ + toneType?: 'symbol' | 'num' | 'none'; +} +/** + * @description: 获取带拼音汉字的 html 字符串 + * @param {string} text 要转换的字符串 + * @param {HtmlOptions=} options html 中标签类名相关配置 + * @return {string} 带汉字的拼音字符串 + */ +export declare const html: (text: string, options?: HtmlOptions | undefined) => string; +export {}; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/core/match/index.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/match/index.d.ts new file mode 100644 index 0000000..ae1e082 --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/match/index.d.ts @@ -0,0 +1,27 @@ +interface MatchOptions { + /** + * @description 每个汉字和拼音需要遵从的匹配精度 + */ + precision?: 'first' | 'start' | 'every' | 'any'; + /** + * @description 匹配的汉字下标是否为连续的才算匹配成功 + */ + continuous?: boolean; + /** + * @description 匹配时对于空格的处理 + */ + space?: 'ignore' | 'preserve'; + /** + * @description 最后一个字的匹配精度 + */ + lastPrecision?: 'first' | 'start' | 'every' | 'any'; +} +/** + * @description: 检测汉语字符串和拼音是否匹配 + * @param {string} text 汉语字符串 + * @param {string} pinyin 拼音,支持各种缩写形式 + * @param {MatchOptions=} options 配置项 + * @return {Array | null} 若匹配成功,返回 text 中匹配成功的下标数组;若匹配失败,返回 null + */ +export declare const match: (text: string, pinyin: string, options?: MatchOptions | undefined) => any; +export {}; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/core/pinyin/handle.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/pinyin/handle.d.ts new file mode 100644 index 0000000..8ca7c1b --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/pinyin/handle.d.ts @@ -0,0 +1,60 @@ +import type { SingleWordResult, PinyinMode } from '../../common/type'; +export declare const getPinyin: (word: string, list: SingleWordResult[], mode: 'normal' | 'surname') => SingleWordResult[]; +/** + * @description: 将带音调符号拼音转换为不带音调拼音 + * @param {string} pinyin + * @return {string} + */ +declare type GetPinyinWithoutTone = (pinyin: string) => string; +declare const getPinyinWithoutTone: GetPinyinWithoutTone; +/** + * @description: 获取单字符的多音拼音 + * @param {string} word + * @return {WordResult[]} + */ +declare type GetMultiplePinyin = (word: string, mode?: PinyinMode) => SingleWordResult[]; +declare const getMultiplePinyin: GetMultiplePinyin; +/** + * @description: 获取拼音的声母和韵母 + * @param {string} pinyin + * @return {*} + */ +declare type GetInitialAndFinal = (pinyin: string) => { + final: string; + initial: string; +}; +declare const getInitialAndFinal: GetInitialAndFinal; +/** + * @description: 获取韵母的韵头、韵腹和韵尾 + * @param {string} pinyin + * @return {*} + */ +declare type GetFinalParts = (pinyin: string) => { + head: string; + body: string; + tail: string; +}; +declare const getFinalParts: GetFinalParts; +/** + * @description: 将带音调符号拼音转换为带音调数字 + * @param {string} pinyin + * @return {string} + */ +declare type GetNumOfTone = (pinyin: string) => string; +declare const getNumOfTone: GetNumOfTone; +/** + * @description: 将带音调符号拼音转换为带音调数字拼音 + * @param {string} pinyin + * @param {string} originPinyin + * @return {string} + */ +declare type GetPinyinWithNum = (pinyin: string, originPinyin: string) => string; +declare const getPinyinWithNum: GetPinyinWithNum; +/** + * @description: 获取拼音的首字母 + * @param {string} pinyin + * @return {string} + */ +declare type GetFirstLetter = (pinyin: string) => string; +declare const getFirstLetter: GetFirstLetter; +export { getPinyinWithoutTone, getInitialAndFinal, getMultiplePinyin, getNumOfTone, getPinyinWithNum, getFirstLetter, getFinalParts, }; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/core/pinyin/index.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/pinyin/index.d.ts new file mode 100644 index 0000000..4e0235f --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/pinyin/index.d.ts @@ -0,0 +1,130 @@ +interface BasicOptions { + /** + * @description 返回的拼音音调类型 + * @value symbol:在字母上加音调 (默认值) + * @value num:以数字格式展示音调,并跟在拼音后面 + * @value none:不展示音调 + */ + toneType?: 'symbol' | 'num' | 'none'; + /** + * @description 返回的拼音格式类型 + * @value pinyin:返回完整拼音 (默认值) + * @value initial:返回声母 + * @value final:返回韵母 + * @value num:返回音调对应的数字 + * @value first:返回首字母 + * @value finalHead:返回韵头(介音) + * @value finalBody:返回韵腹 + * @value finalTail:返回韵尾 + */ + pattern?: 'pinyin' | 'initial' | 'final' | 'num' | 'first' | 'finalHead' | 'finalBody' | 'finalTail'; + /** + * @description 是否返回单个汉字的所有多音,仅针对输入的 word 为单个汉字生效 + * @value false:返回最常用的一个拼音 (默认值) + * @value true:返回所有读音 + */ + multiple?: boolean; + /** + * @description 优先的拼音匹配模式 + * @value normal:正常匹配模式 (默认值) + * @value surname:姓氏模式,遇到姓氏表中的汉字时,优先匹配姓氏读音 + */ + mode?: 'normal' | 'surname'; + /** + * @description 是否移除非汉字字符(推荐使用 removeNonZh: removed 代替) + * @value false:返回结果保留非汉字字符 (默认值) + * @value true:返回结果移除非汉字字符 + */ + removeNonZh?: boolean; + /** + * @description 非汉字字符的间距格式 + * @value spaced:连续非汉字字符之间用空格隔开 (默认值) + * @value consecutive:连续非汉字字符无间距 + * @value removed:返回结果移除非汉字字符 + */ + nonZh?: 'spaced' | 'consecutive' | 'removed'; + /** + * @description 对于 ü 的返回是否转换成 v(仅在 toneType: none 启用时生效) + * @value false:返回值中保留 ü (默认值) + * @value true:返回值中 ü 转换成 v + */ + v?: boolean; +} +interface AllData { + origin: string; + pinyin: string; + initial: string; + final: string; + num: number; + first: string; + finalHead: string; + finalBody: string; + finalTail: string; + isZh: boolean; +} +interface OptionsReturnString extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type?: 'string'; + /** + * @description 拼音之间的分隔符,默认为空格,仅在 type 为 'string' 时生效 + */ + separator?: string; +} +interface OptionsReturnArray extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type: 'array'; +} +interface OptionsReturnAll extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type: 'all'; +} +export interface CompleteOptions extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type?: 'string' | 'array' | 'all'; + /** + * @description 拼音之间的分隔符,默认为空格,仅在 type 为 'string' 时生效 + */ + separator?: string; +} +/** + * @description: 获取汉语字符串的拼音 + * @param {string} word 要转换的汉语字符串 + * @param {OptionsReturnString=} options 配置项 + * @return {string | string[] | AllData[]} options.type 为 string 时,返回字符串,中间用空格隔开;为 array 时,返回拼音字符串数组;为 all 时返回全部信息的数组 + */ +declare function pinyin(word: string, options?: OptionsReturnString): string; +/** + * @description: 获取汉语字符串的拼音 + * @param {string} word 要转换的汉语字符串 + * @param {OptionsReturnArray=} options 配置项 + * @return {string | string[] | AllData[]} options.type 为 string 时,返回字符串,中间用空格隔开;为 array 时,返回拼音字符串数组;为 all 时返回全部信息的数组 + */ +declare function pinyin(word: string, options?: OptionsReturnArray): string[]; +/** + * @description: 获取汉语字符串的拼音 + * @param {string} word 要转换的汉语字符串 + * @param {OptionsReturnAll=} options 配置项 + * @return {string | string[] | AllData[]} options.type 为 string 时,返回字符串,中间用空格隔开;为 array 时,返回拼音字符串数组;为 all 时返回全部信息的数组 + */ +declare function pinyin(word: string, options?: OptionsReturnAll): AllData[]; +export { pinyin }; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/core/pinyin/middlewares.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/pinyin/middlewares.d.ts new file mode 100644 index 0000000..74285ca --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/pinyin/middlewares.d.ts @@ -0,0 +1,21 @@ +import type { SingleWordResult } from '../../common/type'; +import { CompleteOptions } from './index'; +export declare const validateType: (word: unknown) => boolean; +export declare const middleWareNonZh: (list: SingleWordResult[], options: CompleteOptions) => SingleWordResult[]; +export declare const middlewareMultiple: (word: string, options: CompleteOptions) => SingleWordResult[] | false; +export declare const middlewarePattern: (list: SingleWordResult[], options: CompleteOptions) => void; +export declare const middlewareToneType: (list: SingleWordResult[], options: CompleteOptions) => void; +export declare const middlewareV: (list: SingleWordResult[], options: CompleteOptions) => void; +export declare const middlewareType: (list: SingleWordResult[], options: CompleteOptions, word: string) => string | string[] | { + origin: string; + pinyin: string; + initial: string; + final: string; + first: string; + finalHead: string; + finalBody: string; + finalTail: string; + num: number; + isZh: boolean; +}[]; +export declare const middlewareDoubleUnicode: (list: SingleWordResult[]) => SingleWordResult[]; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/core/polyphonic/index.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/polyphonic/index.d.ts new file mode 100644 index 0000000..477ac63 --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/core/polyphonic/index.d.ts @@ -0,0 +1,117 @@ +import type { SingleWordResult } from '../../common/type'; +interface BasicOptions { + /** + * @description 返回的拼音音调类型 + * @value symbol:在字母上加音调 (默认值) + * @value num:以数字格式展示音调,并跟在拼音后面 + * @value none:不展示音调 + */ + toneType?: 'symbol' | 'num' | 'none'; + /** + * @description 返回的拼音格式类型 + * @value pinyin:返回完整拼音 (默认值) + * @value initial:返回声母 + * @value final:返回韵母 + * @value num:返回音调对应的数字 + * @value first:返回首字母 + * @value finalHead:返回韵头(介音) + * @value finalBody:返回韵腹 + * @value finalTail:返回韵尾 + */ + pattern?: 'pinyin' | 'initial' | 'final' | 'num' | 'first' | 'finalHead' | 'finalBody' | 'finalTail'; + /** + * @description 对于 ü 的返回是否转换成 v(仅在 toneType: none 启用时生效) + * @value false:返回值中保留 ü (默认值) + * @value true:返回值中 ü 转换成 v + */ + v?: boolean; + /** + * @description 非汉字字符的间距格式 + * @value spaced:连续非汉字字符之间用空格隔开 (默认值) + * @value consecutive:连续非汉字字符无间距 + * @value removed:返回结果移除非汉字字符 + */ + nonZh?: 'spaced' | 'consecutive' | 'removed'; +} +interface AllData { + origin: string; + pinyin: string; + initial: string; + final: string; + num: number; + first: string; + finalHead: string; + finalBody: string; + finalTail: string; + isZh: boolean; +} +interface OptionsReturnString extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type?: 'string'; +} +interface OptionsReturnArray extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type: 'array'; +} +interface OptionsReturnAll extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type: 'all'; +} +export interface CompleteOptions extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type?: 'string' | 'array' | 'all'; +} +/** + * @description: 获取每个汉字的所有读音 + * @param {string} text 要转换的汉语字符串 + * @param {OptionsReturnString=} options 配置项 + * @return {string[] | string[][] | AllData[][]} options.type 为 string 时,返回字符串数组,中间用空格隔开;为 array 时,返回二维拼音字符串数组;为 all 时返回二维全部信息的数组 + */ +declare function polyphonic(text: string, options?: OptionsReturnString): string[]; +/** + * @description: 获取每个汉字的所有读音 + * @param {string} text 要转换的汉语字符串 + * @param {OptionsReturnArray=} options 配置项 + * @return {string[] | string[][] | AllData[][]} options.type 为 string 时,返回字符串数组,中间用空格隔开;为 array 时,返回二维拼音字符串数组;为 all 时返回二维全部信息的数组 + */ +declare function polyphonic(text: string, options?: OptionsReturnArray): string[][]; +/** + * @description: 获取每个汉字的所有读音 + * @param {string} text 要转换的汉语字符串 + * @param {OptionsReturnAll=} options 配置项 + * @return {string[] | string[][] | AllData[][]} options.type 为 string 时,返回字符串数组,中间用空格隔开;为 array 时,返回二维拼音字符串数组;为 all 时返回二维全部信息的数组 + */ +declare function polyphonic(text: string, options?: OptionsReturnAll): AllData[][]; +export declare const handleType: (list: SingleWordResult[], options: CompleteOptions) => string | string[] | { + origin: string; + pinyin: string; + initial: string; + final: string; + first: string; + finalHead: string; + finalBody: string; + finalTail: string; + num: number; + isZh: boolean; +}[]; +export { polyphonic }; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict1-pinyin.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict1-pinyin.d.ts new file mode 100644 index 0000000..5cfc665 --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict1-pinyin.d.ts @@ -0,0 +1,3 @@ +export declare const DICT1: { + [prop: string]: string; +}; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict1.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict1.d.ts new file mode 100644 index 0000000..0a6fc9b --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict1.d.ts @@ -0,0 +1,2 @@ +declare const DICT1: string[]; +export default DICT1; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict2.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict2.d.ts new file mode 100644 index 0000000..388e95b --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict2.d.ts @@ -0,0 +1,6 @@ +import type { Pattern } from '@/common/ac'; +declare const DICT2: { + [prop: string]: string; +}; +export default DICT2; +export declare const Pattern2: Pattern[]; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict3.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict3.d.ts new file mode 100644 index 0000000..4f5d2df --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict3.d.ts @@ -0,0 +1,6 @@ +import type { Pattern } from '@/common/ac'; +declare const DICT3: { + [prop: string]: string; +}; +export default DICT3; +export declare const Pattern3: Pattern[]; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict4.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict4.d.ts new file mode 100644 index 0000000..f6c2a87 --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict4.d.ts @@ -0,0 +1,6 @@ +import type { Pattern } from '@/common/ac'; +declare const DICT4: { + [prop: string]: string; +}; +export default DICT4; +export declare const Pattern4: Pattern[]; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict5.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict5.d.ts new file mode 100644 index 0000000..7d86cdf --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/dict5.d.ts @@ -0,0 +1,6 @@ +import type { Pattern } from '@/common/ac'; +declare const DICT5: { + [prop: string]: string; +}; +export default DICT5; +export declare const Pattern5: Pattern[]; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/data/special.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/special.d.ts new file mode 100644 index 0000000..3bd4305 --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/special.d.ts @@ -0,0 +1,26 @@ +export declare const InitialList: string[]; +export declare const SpecialInitialList: string[]; +export declare const SpecialFinalList: string[]; +export declare const SpecialFinalMap: { + uān: string; + uán: string; + uǎn: string; + uàn: string; + uan: string; + uē: string; + ué: string; + uě: string; + uè: string; + ue: string; + ūn: string; + ún: string; + ǔn: string; + ùn: string; + un: string; + ū: string; + ú: string; + ǔ: string; + ù: string; + u: string; +}; +export declare const doubleFinalList: string[]; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/data/surname.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/surname.d.ts new file mode 100644 index 0000000..ebc3e8e --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/data/surname.d.ts @@ -0,0 +1,6 @@ +import type { Pattern } from '@/common/ac'; +declare const Surnames: { + [key: string]: string; +}; +export default Surnames; +export declare const PatternSurname: Pattern[]; diff --git a/npm-packages/mac-v2.4.x/pinyin-pro/types/index.d.ts b/npm-packages/mac-v2.4.x/pinyin-pro/types/index.d.ts new file mode 100644 index 0000000..a3de977 --- /dev/null +++ b/npm-packages/mac-v2.4.x/pinyin-pro/types/index.d.ts @@ -0,0 +1,5 @@ +export { pinyin } from './core/pinyin'; +export { customPinyin } from './core/custom'; +export { match } from './core/match'; +export { html } from './core/html'; +export { polyphonic } from './core/polyphonic'; diff --git a/npm-packages/mac-v2.4.x/readable-stream/README.md b/npm-packages/mac-v2.4.x/readable-stream/README.md index 19117c1..6f035ab 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/README.md +++ b/npm-packages/mac-v2.4.x/readable-stream/README.md @@ -15,7 +15,7 @@ npm install --save readable-stream This package is a mirror of the streams implementations in Node.js. -Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.18.1/docs/api/stream.html). +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v10.19.0/docs/api/stream.html). If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). diff --git a/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_duplex.js b/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_duplex.js index 19abfa6..6752519 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_duplex.js +++ b/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_duplex.js @@ -18,48 +18,60 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. - // a duplex stream is just a stream that is both readable and writable. // Since JS doesn't have multiple prototypal inheritance, this class // prototypally inherits from Readable, and then parasitically from // Writable. - 'use strict'; - /**/ + var objectKeys = Object.keys || function (obj) { var keys = []; - for (var key in obj) keys.push(key); + + for (var key in obj) { + keys.push(key); + } + return keys; }; /**/ + module.exports = Duplex; + var Readable = require('./_stream_readable'); + var Writable = require('./_stream_writable'); + require('inherits')(Duplex, Readable); + { // Allow the keys array to be GC'ed. var keys = objectKeys(Writable.prototype); + for (var v = 0; v < keys.length; v++) { var method = keys[v]; if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; } } + function Duplex(options) { if (!(this instanceof Duplex)) return new Duplex(options); Readable.call(this, options); Writable.call(this, options); this.allowHalfOpen = true; + if (options) { if (options.readable === false) this.readable = false; if (options.writable === false) this.writable = false; + if (options.allowHalfOpen === false) { this.allowHalfOpen = false; this.once('end', onend); } } } + Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in @@ -86,20 +98,20 @@ Object.defineProperty(Duplex.prototype, 'writableLength', { get: function get() { return this._writableState.length; } -}); +}); // the no-half-open enforcer -// the no-half-open enforcer function onend() { // If the writable side ended, then we're ok. - if (this._writableState.ended) return; - - // no more data can be written. + if (this._writableState.ended) return; // no more data can be written. // But allow more writes to happen in this tick. + process.nextTick(onEndNT, this); } + function onEndNT(self) { self.end(); } + Object.defineProperty(Duplex.prototype, 'destroyed', { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in @@ -109,6 +121,7 @@ Object.defineProperty(Duplex.prototype, 'destroyed', { if (this._readableState === undefined || this._writableState === undefined) { return false; } + return this._readableState.destroyed && this._writableState.destroyed; }, set: function set(value) { @@ -116,10 +129,10 @@ Object.defineProperty(Duplex.prototype, 'destroyed', { // has not been initialized yet if (this._readableState === undefined || this._writableState === undefined) { return; - } - - // backward compatibility, the user is explicitly + } // backward compatibility, the user is explicitly // managing destroyed + + this._readableState.destroyed = value; this._writableState.destroyed = value; } diff --git a/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_passthrough.js b/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_passthrough.js index 24a6bdd..32e7414 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_passthrough.js +++ b/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_passthrough.js @@ -18,20 +18,22 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. - // a passthrough stream. // basically just the most minimal sort of Transform stream. // Every written chunk gets output as-is. - 'use strict'; module.exports = PassThrough; + var Transform = require('./_stream_transform'); + require('inherits')(PassThrough, Transform); + function PassThrough(options) { if (!(this instanceof PassThrough)) return new PassThrough(options); Transform.call(this, options); } + PassThrough.prototype._transform = function (chunk, encoding, cb) { cb(null, chunk); }; \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_readable.js b/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_readable.js index df1f608..192d451 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_readable.js +++ b/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_readable.js @@ -18,40 +18,49 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. - 'use strict'; module.exports = Readable; - /**/ + var Duplex; /**/ Readable.ReadableState = ReadableState; - /**/ + var EE = require('events').EventEmitter; + var EElistenerCount = function EElistenerCount(emitter, type) { return emitter.listeners(type).length; }; /**/ /**/ + + var Stream = require('./internal/streams/stream'); /**/ + var Buffer = require('buffer').Buffer; -var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; + +var OurUint8Array = global.Uint8Array || function () {}; + function _uint8ArrayToBuffer(chunk) { return Buffer.from(chunk); } + function _isUint8Array(obj) { return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; } - /**/ + + var debugUtil = require('util'); + var debug; + if (debugUtil && debugUtil.debuglog) { debug = debugUtil.debuglog('stream'); } else { @@ -59,57 +68,60 @@ if (debugUtil && debugUtil.debuglog) { } /**/ -var BufferList = require('./internal/streams/buffer_list'); -var destroyImpl = require('./internal/streams/destroy'); -var _require = require('./internal/streams/state'), - getHighWaterMark = _require.getHighWaterMark; -var _require$codes = require('../errors').codes, - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; -// Lazy loaded to improve the startup performance. +var BufferList = require('./internal/streams/buffer_list'); + +var destroyImpl = require('./internal/streams/destroy'); + +var _require = require('./internal/streams/state'), + getHighWaterMark = _require.getHighWaterMark; + +var _require$codes = require('../errors').codes, + ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, + ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance. + + var StringDecoder; var createReadableStreamAsyncIterator; var from; + require('inherits')(Readable, Stream); + var errorOrDestroy = destroyImpl.errorOrDestroy; var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; + function prependListener(emitter, event, fn) { // Sadly this is not cacheable as some libraries bundle their own // event emitter implementation with them. - if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); - - // This is a hack to make sure that our error handler is attached before any + if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any // userland ones. NEVER DO THIS. This is here only because this code needs // to continue to work with older versions of Node.js that do not include // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; } + function ReadableState(options, stream, isDuplex) { Duplex = Duplex || require('./_stream_duplex'); - options = options || {}; - - // Duplex streams are both readable and writable, but share + options = options || {}; // Duplex streams are both readable and writable, but share // the same options object. // However, some cases require setting options to different // values for the readable and the writable sides of the duplex stream. // These options can be provided separately as readableXXX and writableXXX. - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; - // object stream flag. Used to make read(n) ignore n and to + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; - - // the point at which it stops calling _read() to fill the buffer + if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer // Note: 0 is a valid value, means "don't call _read preemptively ever" - this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); - // A linked list is used to store data chunks instead of an array because the + this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the // linked list can remove elements from the beginning faster than // array.shift() + this.buffer = new BufferList(); this.length = 0; this.pipes = null; @@ -117,66 +129,61 @@ function ReadableState(options, stream, isDuplex) { this.flowing = null; this.ended = false; this.endEmitted = false; - this.reading = false; - - // a flag to be able to tell if the event 'readable'/'data' is emitted + this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted // immediately, or on a later tick. We set this to true at first, because // any actions that shouldn't happen until "later" should generally also // not happen before the first read call. - this.sync = true; - // whenever we return null, then we set a flag to say + this.sync = true; // whenever we return null, then we set a flag to say // that we're awaiting a 'readable' event emission. + this.needReadable = false; this.emittedReadable = false; this.readableListening = false; this.resumeScheduled = false; - this.paused = true; + this.paused = true; // Should close be emitted on destroy. Defaults to true. - // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; + this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish') - // Should .destroy() be called after 'end' (and potentially 'finish') - this.autoDestroy = !!options.autoDestroy; + this.autoDestroy = !!options.autoDestroy; // has it been destroyed - // has it been destroyed - this.destroyed = false; - - // Crypto is kind of old and crusty. Historically, its default string + this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string // encoding is 'binary' so we have to make this configurable. // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; + this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s + + this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled - // if true, a maybeReadMore has been scheduled this.readingMore = false; this.decoder = null; this.encoding = null; + if (options.encoding) { if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; this.decoder = new StringDecoder(options.encoding); this.encoding = options.encoding; } } + function Readable(options) { Duplex = Duplex || require('./_stream_duplex'); - if (!(this instanceof Readable)) return new Readable(options); - - // Checking for a Stream.Duplex instance is faster here instead of inside + if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside // the ReadableState constructor, at least with V8 6.5 - var isDuplex = this instanceof Duplex; - this._readableState = new ReadableState(options, this, isDuplex); - // legacy + var isDuplex = this instanceof Duplex; + this._readableState = new ReadableState(options, this, isDuplex); // legacy + this.readable = true; + if (options) { if (typeof options.read === 'function') this._read = options.read; if (typeof options.destroy === 'function') this._destroy = options.destroy; } + Stream.call(this); } + Object.defineProperty(Readable.prototype, 'destroyed', { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in @@ -186,6 +193,7 @@ Object.defineProperty(Readable.prototype, 'destroyed', { if (this._readableState === undefined) { return false; } + return this._readableState.destroyed; }, set: function set(value) { @@ -193,60 +201,69 @@ Object.defineProperty(Readable.prototype, 'destroyed', { // has not been initialized yet if (!this._readableState) { return; - } - - // backward compatibility, the user is explicitly + } // backward compatibility, the user is explicitly // managing destroyed + + this._readableState.destroyed = value; } }); Readable.prototype.destroy = destroyImpl.destroy; Readable.prototype._undestroy = destroyImpl.undestroy; + Readable.prototype._destroy = function (err, cb) { cb(err); -}; - -// Manually shove something into the read() buffer. +}; // Manually shove something into the read() buffer. // This returns true if the highWaterMark has not been hit yet, // similar to how Writable.write() returns true if you should // write() some more. + + Readable.prototype.push = function (chunk, encoding) { var state = this._readableState; var skipChunkCheck; + if (!state.objectMode) { if (typeof chunk === 'string') { encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { chunk = Buffer.from(chunk, encoding); encoding = ''; } + skipChunkCheck = true; } } else { skipChunkCheck = true; } - return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); -}; -// Unshift should *always* be something directly out of read() + return readableAddChunk(this, chunk, encoding, false, skipChunkCheck); +}; // Unshift should *always* be something directly out of read() + + Readable.prototype.unshift = function (chunk) { return readableAddChunk(this, chunk, null, true, false); }; + function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { debug('readableAddChunk', chunk); var state = stream._readableState; + if (chunk === null) { state.reading = false; onEofChunk(stream, state); } else { var er; if (!skipChunkCheck) er = chunkInvalid(state, chunk); + if (er) { errorOrDestroy(stream, er); } else if (state.objectMode || chunk && chunk.length > 0) { if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) { chunk = _uint8ArrayToBuffer(chunk); } + if (addToFront) { if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true); } else if (state.ended) { @@ -255,6 +272,7 @@ function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { return false; } else { state.reading = false; + if (state.decoder && !encoding) { chunk = state.decoder.write(chunk); if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state); @@ -266,13 +284,14 @@ function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) { state.reading = false; maybeReadMore(stream, state); } - } - - // We can push more data if we are below the highWaterMark. + } // We can push more data if we are below the highWaterMark. // Also, if we have no data yet, we can stand some more bytes. // This is to work around cases where hwm=0, such as the repl. + + return !state.ended && (state.length < state.highWaterMark || state.length === 0); } + function addChunk(stream, state, chunk, addToFront) { if (state.flowing && state.length === 0 && !state.sync) { state.awaitDrain = 0; @@ -283,42 +302,50 @@ function addChunk(stream, state, chunk, addToFront) { if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); if (state.needReadable) emitReadable(stream); } + maybeReadMore(stream, state); } + function chunkInvalid(state, chunk) { var er; + if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk); } + return er; } + Readable.prototype.isPaused = function () { return this._readableState.flowing === false; -}; +}; // backwards compatibility. + -// backwards compatibility. Readable.prototype.setEncoding = function (enc) { if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; var decoder = new StringDecoder(enc); - this._readableState.decoder = decoder; - // If setEncoding(null), decoder.encoding equals utf8 - this._readableState.encoding = this._readableState.decoder.encoding; + this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8 + + this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers: - // Iterate over current buffer to convert already stored Buffers: var p = this._readableState.buffer.head; var content = ''; + while (p !== null) { content += decoder.write(p.data); p = p.next; } + this._readableState.buffer.clear(); + if (content !== '') this._readableState.buffer.push(content); this._readableState.length = content.length; return this; -}; +}; // Don't raise the hwm > 1GB + -// Don't raise the hwm > 1GB var MAX_HWM = 0x40000000; + function computeNewHighWaterMark(n) { if (n >= MAX_HWM) { // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE. @@ -334,54 +361,55 @@ function computeNewHighWaterMark(n) { n |= n >>> 16; n++; } - return n; -} -// This function is designed to be inlinable, so please take care when making + return n; +} // This function is designed to be inlinable, so please take care when making // changes to the function body. + + function howMuchToRead(n, state) { if (n <= 0 || state.length === 0 && state.ended) return 0; if (state.objectMode) return 1; + if (n !== n) { // Only flow one buffer at a time if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; - } - // If we're asking for more than the current hwm, then raise the hwm. + } // If we're asking for more than the current hwm, then raise the hwm. + + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); - if (n <= state.length) return n; - // Don't have enough + if (n <= state.length) return n; // Don't have enough + if (!state.ended) { state.needReadable = true; return 0; } - return state.length; -} -// you can override either this method, or the async _read(n) below. + return state.length; +} // you can override either this method, or the async _read(n) below. + + Readable.prototype.read = function (n) { debug('read', n); n = parseInt(n, 10); var state = this._readableState; var nOrig = n; - if (n !== 0) state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we + if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we // already have a bunch of data in the buffer, then just trigger // the 'readable' event and move on. + if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) { debug('read: emitReadable', state.length, state.ended); if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); return null; } - n = howMuchToRead(n, state); - // if we've ended, and we're now clear, then finish it up. + n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { if (state.length === 0) endReadable(this); return null; - } - - // All the actual chunk generation logic needs to be + } // All the actual chunk generation logic needs to be // *below* the call to _read. The reason is that in certain // synthetic stream cases, such as passthrough streams, _read // may be a completely synchronous operation which may change @@ -402,37 +430,40 @@ Readable.prototype.read = function (n) { // 'readable' etc. // // 3. Actually pull the requested chunks out of the buffer and return. - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - debug('need readable', doRead); - // if we currently have less than the highWaterMark, then also read some + + var doRead = state.needReadable; + debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { doRead = true; debug('length less than watermark', doRead); - } - - // however, if we've ended, then there's no point, and if we're already + } // however, if we've ended, then there's no point, and if we're already // reading, then it's unnecessary. + + if (state.ended || state.reading) { doRead = false; debug('reading or ended', doRead); } else if (doRead) { debug('do read'); state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) state.needReadable = true; - // call internal read method + state.sync = true; // if the length is currently zero, then we *need* a readable event. + + if (state.length === 0) state.needReadable = true; // call internal read method + this._read(state.highWaterMark); - state.sync = false; - // If _read pushed data synchronously, then `reading` will be false, + + state.sync = false; // If _read pushed data synchronously, then `reading` will be false, // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); } + var ret; if (n > 0) ret = fromList(n, state);else ret = null; + if (ret === null) { state.needReadable = state.length <= state.highWaterMark; n = 0; @@ -440,28 +471,34 @@ Readable.prototype.read = function (n) { state.length -= n; state.awaitDrain = 0; } + if (state.length === 0) { // If we have nothing in the buffer, then we want to know // as soon as we *do* get something into the buffer. - if (!state.ended) state.needReadable = true; + if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick. - // If we tried to read() past the EOF, then emit end on the next tick. if (nOrig !== n && state.ended) endReadable(this); } + if (ret !== null) this.emit('data', ret); return ret; }; + function onEofChunk(stream, state) { debug('onEofChunk'); if (state.ended) return; + if (state.decoder) { var chunk = state.decoder.end(); + if (chunk && chunk.length) { state.buffer.push(chunk); state.length += state.objectMode ? 1 : chunk.length; } } + state.ended = true; + if (state.sync) { // if we are sync, wait until next tick to emit the data. // Otherwise we risk emitting data in the flow() @@ -470,56 +507,61 @@ function onEofChunk(stream, state) { } else { // emit 'readable' now to make sure it gets picked up. state.needReadable = false; + if (!state.emittedReadable) { state.emittedReadable = true; emitReadable_(stream); } } -} - -// Don't emit readable right away in sync mode, because this can trigger +} // Don't emit readable right away in sync mode, because this can trigger // another read() call => stack overflow. This way, it might trigger // a nextTick recursion warning, but that's not so bad. + + function emitReadable(stream) { var state = stream._readableState; debug('emitReadable', state.needReadable, state.emittedReadable); state.needReadable = false; + if (!state.emittedReadable) { debug('emitReadable', state.flowing); state.emittedReadable = true; process.nextTick(emitReadable_, stream); } } + function emitReadable_(stream) { var state = stream._readableState; debug('emitReadable_', state.destroyed, state.length, state.ended); + if (!state.destroyed && (state.length || state.ended)) { stream.emit('readable'); state.emittedReadable = false; - } - - // The stream needs another readable event if + } // The stream needs another readable event if // 1. It is not flowing, as the flow mechanism will take // care of it. // 2. It is not ended. // 3. It is below the highWaterMark, so we can schedule // another readable later. + + state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark; flow(stream); -} - -// at this point, the user has presumably seen the 'readable' event, +} // at this point, the user has presumably seen the 'readable' event, // and called read() to consume some data. that may have triggered // in turn another _read(n) call, in which case reading = true if // it's in progress. // However, if we're not ended, or reading, and the length < hwm, // then go ahead and try to read some more preemptively. + + function maybeReadMore(stream, state) { if (!state.readingMore) { state.readingMore = true; process.nextTick(maybeReadMore_, stream, state); } } + function maybeReadMore_(stream, state) { // Attempt to read more data if we should. // @@ -548,42 +590,49 @@ function maybeReadMore_(stream, state) { var len = state.length; debug('maybeReadMore read 0'); stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. + if (len === state.length) // didn't get any data, stop spinning. break; } - state.readingMore = false; -} -// abstract method. to be overridden in specific implementation classes. + state.readingMore = false; +} // abstract method. to be overridden in specific implementation classes. // call cb(er, data) where data is <= n in length. // for virtual (non-string, non-buffer) streams, "length" is somewhat // arbitrary, and perhaps not very meaningful. + + Readable.prototype._read = function (n) { errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()')); }; + Readable.prototype.pipe = function (dest, pipeOpts) { var src = this; var state = this._readableState; + switch (state.pipesCount) { case 0: state.pipes = dest; break; + case 1: state.pipes = [state.pipes, dest]; break; + default: state.pipes.push(dest); break; } + state.pipesCount += 1; debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; var endFn = doEnd ? onend : unpipe; if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn); dest.on('unpipe', onunpipe); + function onunpipe(readable, unpipeInfo) { debug('onunpipe'); + if (readable === src) { if (unpipeInfo && unpipeInfo.hasUnpiped === false) { unpipeInfo.hasUnpiped = true; @@ -591,21 +640,23 @@ Readable.prototype.pipe = function (dest, pipeOpts) { } } } + function onend() { debug('onend'); dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter + } // when the dest drains, it reduces the awaitDrain counter // on the source. This would be more elegant with a .once() // handler in flow(), but adding and removing repeatedly is // too slow. + + var ondrain = pipeOnDrain(src); dest.on('drain', ondrain); var cleanedUp = false; + function cleanup() { - debug('cleanup'); - // cleanup event handlers once the pipe is broken + debug('cleanup'); // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); dest.removeListener('finish', onfinish); dest.removeListener('drain', ondrain); @@ -614,20 +665,22 @@ Readable.prototype.pipe = function (dest, pipeOpts) { src.removeListener('end', onend); src.removeListener('end', unpipe); src.removeListener('data', ondata); - cleanedUp = true; - - // if the reader is waiting for a drain event from this + cleanedUp = true; // if the reader is waiting for a drain event from this // specific writer, then it would cause it to never start // flowing again. // So, if this is awaiting a drain, then we just call it now. // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); } + src.on('data', ondata); + function ondata(chunk) { debug('ondata'); var ret = dest.write(chunk); debug('dest.write', ret); + if (ret === false) { // If the user unpiped during `dest.write()`, it is possible // to get stuck in a permanently paused state if that write @@ -637,84 +690,87 @@ Readable.prototype.pipe = function (dest, pipeOpts) { debug('false write response, pause', state.awaitDrain); state.awaitDrain++; } + src.pause(); } - } - - // if the dest has an error, then stop piping into it. + } // if the dest has an error, then stop piping into it. // however, don't suppress the throwing behavior for this. + + function onerror(er) { debug('onerror', er); unpipe(); dest.removeListener('error', onerror); if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er); - } + } // Make sure our error handler is attached before userland ones. - // Make sure our error handler is attached before userland ones. - prependListener(dest, 'error', onerror); - // Both close and finish should trigger unpipe, but only once. + prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once. + function onclose() { dest.removeListener('finish', onfinish); unpipe(); } + dest.once('close', onclose); + function onfinish() { debug('onfinish'); dest.removeListener('close', onclose); unpipe(); } + dest.once('finish', onfinish); + function unpipe() { debug('unpipe'); src.unpipe(dest); - } + } // tell the dest that it's being piped to - // tell the dest that it's being piped to - dest.emit('pipe', src); - // start the flow if it hasn't been started already. + dest.emit('pipe', src); // start the flow if it hasn't been started already. + if (!state.flowing) { debug('pipe resume'); src.resume(); } + return dest; }; + function pipeOnDrain(src) { return function pipeOnDrainFunctionResult() { var state = src._readableState; debug('pipeOnDrain', state.awaitDrain); if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { state.flowing = true; flow(src); } }; } + Readable.prototype.unpipe = function (dest) { var state = this._readableState; var unpipeInfo = { hasUnpiped: false - }; + }; // if we're not piping anywhere, then do nothing. - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) return this; + if (state.pipesCount === 0) return this; // just one destination. most common case. - // just one destination. most common case. if (state.pipesCount === 1) { // passed in one, but it's not the right one. if (dest && dest !== state.pipes) return this; - if (!dest) dest = state.pipes; + if (!dest) dest = state.pipes; // got a match. - // got a match. state.pipes = null; state.pipesCount = 0; state.flowing = false; if (dest) dest.emit('unpipe', this, unpipeInfo); return this; - } + } // slow case. multiple pipe destinations. - // slow case. multiple pipe destinations. if (!dest) { // remove all. @@ -723,13 +779,17 @@ Readable.prototype.unpipe = function (dest) { state.pipes = null; state.pipesCount = 0; state.flowing = false; - for (var i = 0; i < len; i++) dests[i].emit('unpipe', this, { - hasUnpiped: false - }); - return this; - } - // try to find the right one. + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this, { + hasUnpiped: false + }); + } + + return this; + } // try to find the right one. + + var index = indexOf(state.pipes, dest); if (index === -1) return this; state.pipes.splice(index, 1); @@ -737,19 +797,19 @@ Readable.prototype.unpipe = function (dest) { if (state.pipesCount === 1) state.pipes = state.pipes[0]; dest.emit('unpipe', this, unpipeInfo); return this; -}; - -// set up data events if they are asked for +}; // set up data events if they are asked for // Ensure readable listeners eventually get something + + Readable.prototype.on = function (ev, fn) { var res = Stream.prototype.on.call(this, ev, fn); var state = this._readableState; + if (ev === 'data') { // update readableListening so that resume() may be a no-op // a few lines down. This is needed to support once('readable'). - state.readableListening = this.listenerCount('readable') > 0; + state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused - // Try start flowing on next tick if stream isn't explicitly paused if (state.flowing !== false) this.resume(); } else if (ev === 'readable') { if (!state.endEmitted && !state.readableListening) { @@ -757,6 +817,7 @@ Readable.prototype.on = function (ev, fn) { state.flowing = false; state.emittedReadable = false; debug('on readable', state.length, state.reading); + if (state.length) { emitReadable(this); } else if (!state.reading) { @@ -764,11 +825,15 @@ Readable.prototype.on = function (ev, fn) { } } } + return res; }; + Readable.prototype.addListener = Readable.prototype.on; + Readable.prototype.removeListener = function (ev, fn) { var res = Stream.prototype.removeListener.call(this, ev, fn); + if (ev === 'readable') { // We need to check if there is someone still listening to // readable and reset the state. However this needs to happen @@ -778,10 +843,13 @@ Readable.prototype.removeListener = function (ev, fn) { // effect. process.nextTick(updateReadableListening, this); } + return res; }; + Readable.prototype.removeAllListeners = function (ev) { var res = Stream.prototype.removeAllListeners.apply(this, arguments); + if (ev === 'readable' || ev === undefined) { // We need to check if there is someone still listening to // readable and reset the state. However this needs to happen @@ -791,103 +859,121 @@ Readable.prototype.removeAllListeners = function (ev) { // effect. process.nextTick(updateReadableListening, this); } + return res; }; + function updateReadableListening(self) { var state = self._readableState; state.readableListening = self.listenerCount('readable') > 0; + if (state.resumeScheduled && !state.paused) { // flowing needs to be set to true now, otherwise // the upcoming resume will not flow. - state.flowing = true; - - // crude way to check if we should resume + state.flowing = true; // crude way to check if we should resume } else if (self.listenerCount('data') > 0) { self.resume(); } } + function nReadingNextTick(self) { debug('readable nexttick read 0'); self.read(0); -} - -// pause() and resume() are remnants of the legacy readable stream API +} // pause() and resume() are remnants of the legacy readable stream API // If the user uses them, then switch into old mode. + + Readable.prototype.resume = function () { var state = this._readableState; + if (!state.flowing) { - debug('resume'); - // we flow only if there is no one listening + debug('resume'); // we flow only if there is no one listening // for readable, but we still have to call // resume() + state.flowing = !state.readableListening; resume(this, state); } + state.paused = false; return this; }; + function resume(stream, state) { if (!state.resumeScheduled) { state.resumeScheduled = true; process.nextTick(resume_, stream, state); } } + function resume_(stream, state) { debug('resume', state.reading); + if (!state.reading) { stream.read(0); } + state.resumeScheduled = false; stream.emit('resume'); flow(stream); if (state.flowing && !state.reading) stream.read(0); } + Readable.prototype.pause = function () { debug('call pause flowing=%j', this._readableState.flowing); + if (this._readableState.flowing !== false) { debug('pause'); this._readableState.flowing = false; this.emit('pause'); } + this._readableState.paused = true; return this; }; + function flow(stream) { var state = stream._readableState; debug('flow', state.flowing); - while (state.flowing && stream.read() !== null); -} -// wrap an old-style stream as the async data source. + while (state.flowing && stream.read() !== null) { + ; + } +} // wrap an old-style stream as the async data source. // This is *not* part of the readable stream interface. // It is an ugly unfortunate mess of history. + + Readable.prototype.wrap = function (stream) { var _this = this; + var state = this._readableState; var paused = false; stream.on('end', function () { debug('wrapped end'); + if (state.decoder && !state.ended) { var chunk = state.decoder.end(); if (chunk && chunk.length) _this.push(chunk); } + _this.push(null); }); stream.on('data', function (chunk) { debug('wrapped data'); - if (state.decoder) chunk = state.decoder.write(chunk); + if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode - // don't skip over falsy values in objectMode if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + var ret = _this.push(chunk); + if (!ret) { paused = true; stream.pause(); } - }); - - // proxy all the other methods. + }); // proxy all the other methods. // important when wrapping filters and duplexes. + for (var i in stream) { if (this[i] === undefined && typeof stream[i] === 'function') { this[i] = function methodWrap(method) { @@ -896,32 +982,37 @@ Readable.prototype.wrap = function (stream) { }; }(i); } - } + } // proxy certain important events. + - // proxy certain important events. for (var n = 0; n < kProxyEvents.length; n++) { stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n])); - } - - // when we try to consume some more bytes, simply unpause the + } // when we try to consume some more bytes, simply unpause the // underlying stream. + + this._read = function (n) { debug('wrapped _read', n); + if (paused) { paused = false; stream.resume(); } }; + return this; }; + if (typeof Symbol === 'function') { Readable.prototype[Symbol.asyncIterator] = function () { if (createReadableStreamAsyncIterator === undefined) { createReadableStreamAsyncIterator = require('./internal/streams/async_iterator'); } + return createReadableStreamAsyncIterator(this); }; } + Object.defineProperty(Readable.prototype, 'readableHighWaterMark', { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in @@ -953,9 +1044,8 @@ Object.defineProperty(Readable.prototype, 'readableFlowing', { this._readableState.flowing = state; } } -}); +}); // exposed for testing purposes only. -// exposed for testing purposes only. Readable._fromList = fromList; Object.defineProperty(Readable.prototype, 'readableLength', { // making it explicit this property is not enumerable @@ -965,12 +1055,11 @@ Object.defineProperty(Readable.prototype, 'readableLength', { get: function get() { return this._readableState.length; } -}); - -// Pluck off n bytes from an array of buffers. +}); // Pluck off n bytes from an array of buffers. // Length is the combined lengths of all the buffers in the list. // This function is designed to be inlinable, so please take care when making // changes to the function body. + function fromList(n, state) { // nothing buffered if (state.length === 0) return null; @@ -985,43 +1074,51 @@ function fromList(n, state) { } return ret; } + function endReadable(stream) { var state = stream._readableState; debug('endReadable', state.endEmitted); + if (!state.endEmitted) { state.ended = true; process.nextTick(endReadableNT, state, stream); } } -function endReadableNT(state, stream) { - debug('endReadableNT', state.endEmitted, state.length); - // Check that we didn't get one last unshift. +function endReadableNT(state, stream) { + debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { state.endEmitted = true; stream.readable = false; stream.emit('end'); + if (state.autoDestroy) { // In case of duplex streams we need a way to detect // if the writable side is ready for autoDestroy as well var wState = stream._writableState; + if (!wState || wState.autoDestroy && wState.finished) { stream.destroy(); } } } } + if (typeof Symbol === 'function') { Readable.from = function (iterable, opts) { if (from === undefined) { from = require('./internal/streams/from'); } + return from(Readable, iterable, opts); }; } + function indexOf(xs, x) { for (var i = 0, l = xs.length; i < l; i++) { if (xs[i] === x) return i; } + return -1; } \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_transform.js b/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_transform.js index 1ccb715..41a738c 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_transform.js +++ b/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_transform.js @@ -18,7 +18,6 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. - // a transform stream is a readable/writable stream where you do // something with the data. Sometimes it's called a "filter", // but that's not a great name for it, since that implies a thing where @@ -60,36 +59,42 @@ // However, even in such a pathological case, only a single written chunk // would be consumed, and then the rest would wait (un-transformed) until // the results of the previous transformed chunk were consumed. - 'use strict'; module.exports = Transform; + var _require$codes = require('../errors').codes, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, - ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, + ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING, + ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0; + var Duplex = require('./_stream_duplex'); + require('inherits')(Transform, Duplex); + function afterTransform(er, data) { var ts = this._transformState; ts.transforming = false; var cb = ts.writecb; + if (cb === null) { return this.emit('error', new ERR_MULTIPLE_CALLBACK()); } + ts.writechunk = null; ts.writecb = null; - if (data != null) - // single equals check for both `null` and `undefined` + if (data != null) // single equals check for both `null` and `undefined` this.push(data); cb(er); var rs = this._readableState; rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { this._read(rs.highWaterMark); } } + function Transform(options) { if (!(this instanceof Transform)) return new Transform(options); Duplex.call(this, options); @@ -100,25 +105,26 @@ function Transform(options) { writecb: null, writechunk: null, writeencoding: null - }; + }; // start out asking for a readable event once data is transformed. - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things + this._readableState.needReadable = true; // we have implemented the _read method, and done the other things // that Readable wants before the first _read call, so unset the // sync guard flag. + this._readableState.sync = false; + if (options) { if (typeof options.transform === 'function') this._transform = options.transform; if (typeof options.flush === 'function') this._flush = options.flush; - } + } // When the writable side finishes, then flush out anything remaining. + - // When the writable side finishes, then flush out anything remaining. this.on('prefinish', prefinish); } + function prefinish() { var _this = this; + if (typeof this._flush === 'function' && !this._readableState.destroyed) { this._flush(function (er, data) { done(_this, er, data); @@ -127,12 +133,11 @@ function prefinish() { done(this, null, null); } } + Transform.prototype.push = function (chunk, encoding) { this._transformState.needTransform = false; return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! +}; // This is the part where you do stuff! // override this function in implementation classes. // 'chunk' is an input chunk. // @@ -142,27 +147,33 @@ Transform.prototype.push = function (chunk, encoding) { // Call `cb(err)` when you are done with this chunk. If you pass // an error, then that'll put the hurt on the whole operation. If you // never call cb(), then you'll never get another chunk. + + Transform.prototype._transform = function (chunk, encoding, cb) { cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()')); }; + Transform.prototype._write = function (chunk, encoding, cb) { var ts = this._transformState; ts.writecb = cb; ts.writechunk = chunk; ts.writeencoding = encoding; + if (!ts.transforming) { var rs = this._readableState; if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); } -}; - -// Doesn't matter what the args are here. +}; // Doesn't matter what the args are here. // _transform does all the work. // That we got here means that the readable side wants more data. + + Transform.prototype._read = function (n) { var ts = this._transformState; + if (ts.writechunk !== null && !ts.transforming) { ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); } else { // mark that we need a transform, so that any data that comes in @@ -170,20 +181,20 @@ Transform.prototype._read = function (n) { ts.needTransform = true; } }; + Transform.prototype._destroy = function (err, cb) { Duplex.prototype._destroy.call(this, err, function (err2) { cb(err2); }); }; + function done(stream, er, data) { if (er) return stream.emit('error', er); - if (data != null) - // single equals check for both `null` and `undefined` - stream.push(data); - - // TODO(BridgeAR): Write a test for these two error cases + if (data != null) // single equals check for both `null` and `undefined` + stream.push(data); // TODO(BridgeAR): Write a test for these two error cases // if there's nothing in the write buffer, then that means // that nothing more will ever be provided + if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0(); if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING(); return stream.push(null); diff --git a/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_writable.js b/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_writable.js index 292415e..a2634d7 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_writable.js +++ b/npm-packages/mac-v2.4.x/readable-stream/lib/_stream_writable.js @@ -18,29 +18,29 @@ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. - // A bit simpler than readable streams. // Implement an async ._write(chunk, encoding, cb), and it'll handle all // the drain event emission and buffering. - 'use strict'; module.exports = Writable; - /* */ + function WriteReq(chunk, encoding, cb) { this.chunk = chunk; this.encoding = encoding; this.callback = cb; this.next = null; -} - -// It seems a linked list but it is not +} // It seems a linked list but it is not // there will be only 2 of these for each stream + + function CorkedRequest(state) { var _this = this; + this.next = null; this.entry = null; + this.finish = function () { onCorkedFinish(_this, state); }; @@ -48,159 +48,155 @@ function CorkedRequest(state) { /* */ /**/ + + var Duplex; /**/ Writable.WritableState = WritableState; - /**/ + var internalUtil = { deprecate: require('util-deprecate') }; /**/ /**/ + var Stream = require('./internal/streams/stream'); /**/ + var Buffer = require('buffer').Buffer; -var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {}; + +var OurUint8Array = global.Uint8Array || function () {}; + function _uint8ArrayToBuffer(chunk) { return Buffer.from(chunk); } + function _isUint8Array(obj) { return Buffer.isBuffer(obj) || obj instanceof OurUint8Array; } + var destroyImpl = require('./internal/streams/destroy'); + var _require = require('./internal/streams/state'), - getHighWaterMark = _require.getHighWaterMark; + getHighWaterMark = _require.getHighWaterMark; + var _require$codes = require('../errors').codes, - ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, - ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, - ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, - ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, - ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, - ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, - ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; + ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, + ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED, + ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK, + ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE, + ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED, + ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES, + ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END, + ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING; + var errorOrDestroy = destroyImpl.errorOrDestroy; + require('inherits')(Writable, Stream); + function nop() {} + function WritableState(options, stream, isDuplex) { Duplex = Duplex || require('./_stream_duplex'); - options = options || {}; - - // Duplex streams are both readable and writable, but share + options = options || {}; // Duplex streams are both readable and writable, but share // the same options object. // However, some cases require setting options to different // values for the readable and the writable sides of the duplex stream, // e.g. options.readableObjectMode vs. options.writableObjectMode, etc. - if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; - // object stream flag to indicate whether or not this stream + if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream // contains buffers or objects. - this.objectMode = !!options.objectMode; - if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; - // the point at which write() starts returning false + this.objectMode = !!options.objectMode; + if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false // Note: 0 is a valid value, means that we always return false if // the entire buffer is not flushed immediately on write() - this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); - // if _final has been called - this.finalCalled = false; + this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called - // drain event flag. - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; + this.finalCalled = false; // drain event flag. - // has it been destroyed - this.destroyed = false; + this.needDrain = false; // at the start of calling end() - // should we decode strings into buffers before passing to _write? + this.ending = false; // when end() has been called, and returned + + this.ended = false; // when 'finish' is emitted + + this.finished = false; // has it been destroyed + + this.destroyed = false; // should we decode strings into buffers before passing to _write? // this is here so that some node-core streams can optimize string // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - // Crypto is kind of old and crusty. Historically, its default string + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string // encoding is 'binary' so we have to make this configurable. // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - // not an actual buffer we keep track of, but a measurement + this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement // of how much we're waiting to get pushed to some underlying // socket or file. - this.length = 0; - // a flag to see when we're in the middle of a write. - this.writing = false; + this.length = 0; // a flag to see when we're in the middle of a write. - // when true all writes will be buffered until .uncork() call - this.corked = 0; + this.writing = false; // when true all writes will be buffered until .uncork() call - // a flag to be able to tell if the onwrite cb is called immediately, + this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately, // or on a later tick. We set this to true at first, because any // actions that shouldn't happen until "later" should generally also // not happen before the first write call. - this.sync = true; - // a flag to know if we're processing previously buffered items, which + this.sync = true; // a flag to know if we're processing previously buffered items, which // may call the _write() callback in the same tick, so that we don't // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - // the callback that's passed to _write(chunk,cb) + this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { onwrite(stream, er); - }; + }; // the callback that the user supplies to write(chunk,encoding,cb) - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - // the amount that is being written when _write is called. + this.writecb = null; // the amount that is being written when _write is called. + this.writelen = 0; this.bufferedRequest = null; - this.lastBufferedRequest = null; - - // number of pending user-supplied write callbacks + this.lastBufferedRequest = null; // number of pending user-supplied write callbacks // this must be 0 before 'finish' can be emitted - this.pendingcb = 0; - // emit prefinish if the only thing we're waiting for is _write cbs + this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs // This is relevant for synchronous Transform streams - this.prefinished = false; - // True if the error was already emitted and should not be thrown again - this.errorEmitted = false; + this.prefinished = false; // True if the error was already emitted and should not be thrown again - // Should close be emitted on destroy. Defaults to true. - this.emitClose = options.emitClose !== false; + this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true. - // Should .destroy() be called after 'finish' (and potentially 'end') - this.autoDestroy = !!options.autoDestroy; + this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end') - // count buffered requests - this.bufferedRequestCount = 0; + this.autoDestroy = !!options.autoDestroy; // count buffered requests - // allocate the first CorkedRequest, there is always + this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); } + WritableState.prototype.getBuffer = function getBuffer() { var current = this.bufferedRequest; var out = []; + while (current) { out.push(current); current = current.next; } + return out; }; + (function () { try { Object.defineProperty(WritableState.prototype, 'buffer', { @@ -209,11 +205,12 @@ WritableState.prototype.getBuffer = function getBuffer() { }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003') }); } catch (_) {} -})(); - -// Test _writableState for inheritance to account for Duplex streams, +})(); // Test _writableState for inheritance to account for Duplex streams, // whose prototype chain only points to Readable. + + var realHasInstance; + if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { realHasInstance = Function.prototype[Symbol.hasInstance]; Object.defineProperty(Writable, Symbol.hasInstance, { @@ -228,73 +225,81 @@ if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.protot return object instanceof this; }; } -function Writable(options) { - Duplex = Duplex || require('./_stream_duplex'); - // Writable ctor is applied to Duplexes, too. +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); // Writable ctor is applied to Duplexes, too. // `realHasInstance` is necessary because using plain `instanceof` // would return false, as no `_writableState` property is attached. - // Trying to use the custom `instanceof` for Writable here will also break the // Node.js LazyTransform implementation, which has a non-trivial getter for // `_writableState` that would lead to infinite recursion. - // Checking for a Stream.Duplex instance is faster here instead of inside // the WritableState constructor, at least with V8 6.5 + var isDuplex = this instanceof Duplex; if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options); - this._writableState = new WritableState(options, this, isDuplex); + this._writableState = new WritableState(options, this, isDuplex); // legacy. - // legacy. this.writable = true; + if (options) { if (typeof options.write === 'function') this._write = options.write; if (typeof options.writev === 'function') this._writev = options.writev; if (typeof options.destroy === 'function') this._destroy = options.destroy; if (typeof options.final === 'function') this._final = options.final; } - Stream.call(this); -} -// Otherwise people can pipe Writable streams, which is just wrong. + Stream.call(this); +} // Otherwise people can pipe Writable streams, which is just wrong. + + Writable.prototype.pipe = function () { errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE()); }; + function writeAfterEnd(stream, cb) { - var er = new ERR_STREAM_WRITE_AFTER_END(); - // TODO: defer error events consistently everywhere, not just the cb + var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb + errorOrDestroy(stream, er); process.nextTick(cb, er); -} - -// Checks that a user-supplied chunk is valid, especially for the particular +} // Checks that a user-supplied chunk is valid, especially for the particular // mode the stream is in. Currently this means that `null` is never accepted // and undefined/non-string values are only allowed in object mode. + + function validChunk(stream, state, chunk, cb) { var er; + if (chunk === null) { er = new ERR_STREAM_NULL_VALUES(); } else if (typeof chunk !== 'string' && !state.objectMode) { er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk); } + if (er) { errorOrDestroy(stream, er); process.nextTick(cb, er); return false; } + return true; } + Writable.prototype.write = function (chunk, encoding, cb) { var state = this._writableState; var ret = false; + var isBuf = !state.objectMode && _isUint8Array(chunk); + if (isBuf && !Buffer.isBuffer(chunk)) { chunk = _uint8ArrayToBuffer(chunk); } + if (typeof encoding === 'function') { cb = encoding; encoding = null; } + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; if (typeof cb !== 'function') cb = nop; if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { @@ -303,16 +308,20 @@ Writable.prototype.write = function (chunk, encoding, cb) { } return ret; }; + Writable.prototype.cork = function () { this._writableState.corked++; }; + Writable.prototype.uncork = function () { var state = this._writableState; + if (state.corked) { state.corked--; if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); } }; + Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { // node::ParseEncoding() requires lower case. if (typeof encoding === 'string') encoding = encoding.toLowerCase(); @@ -320,6 +329,7 @@ Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { this._writableState.defaultEncoding = encoding; return this; }; + Object.defineProperty(Writable.prototype, 'writableBuffer', { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in @@ -329,12 +339,15 @@ Object.defineProperty(Writable.prototype, 'writableBuffer', { return this._writableState && this._writableState.getBuffer(); } }); + function decodeChunk(state, chunk, encoding) { if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { chunk = Buffer.from(chunk, encoding); } + return chunk; } + Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in @@ -343,25 +356,27 @@ Object.defineProperty(Writable.prototype, 'writableHighWaterMark', { get: function get() { return this._writableState.highWaterMark; } -}); - -// if we're already writing something, then just put this +}); // if we're already writing something, then just put this // in the queue, and wait our turn. Otherwise, call _write // If we return false, then we need a drain event, so set that flag. + function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { if (!isBuf) { var newChunk = decodeChunk(state, chunk, encoding); + if (chunk !== newChunk) { isBuf = true; encoding = 'buffer'; chunk = newChunk; } } + var len = state.objectMode ? 1 : chunk.length; state.length += len; - var ret = state.length < state.highWaterMark; - // we must ensure that previous needDrain will not be reset to false. + var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + if (state.writing || state.corked) { var last = state.lastBufferedRequest; state.lastBufferedRequest = { @@ -371,17 +386,21 @@ function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { callback: cb, next: null }; + if (last) { last.next = state.lastBufferedRequest; } else { state.bufferedRequest = state.lastBufferedRequest; } + state.bufferedRequestCount += 1; } else { doWrite(stream, state, false, len, chunk, encoding, cb); } + return ret; } + function doWrite(stream, state, writev, len, chunk, encoding, cb) { state.writelen = len; state.writecb = cb; @@ -390,14 +409,16 @@ function doWrite(stream, state, writev, len, chunk, encoding, cb) { if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); state.sync = false; } + function onwriteError(stream, state, sync, er, cb) { --state.pendingcb; + if (sync) { // defer the callback if we are being called synchronously // to avoid piling up things on the stack - process.nextTick(cb, er); - // this can emit finish, and it will always happen + process.nextTick(cb, er); // this can emit finish, and it will always happen // after error + process.nextTick(finishMaybe, stream, state); stream._writableState.errorEmitted = true; errorOrDestroy(stream, er); @@ -406,18 +427,20 @@ function onwriteError(stream, state, sync, er, cb) { // it is async cb(er); stream._writableState.errorEmitted = true; - errorOrDestroy(stream, er); - // this can emit finish, but finish must + errorOrDestroy(stream, er); // this can emit finish, but finish must // always follow error + finishMaybe(stream, state); } } + function onwriteStateUpdate(state) { state.writing = false; state.writecb = null; state.length -= state.writelen; state.writelen = 0; } + function onwrite(stream, er) { var state = stream._writableState; var sync = state.sync; @@ -427,9 +450,11 @@ function onwrite(stream, er) { if (er) onwriteError(stream, state, sync, er, cb);else { // Check if we're actually ready to finish, but don't emit yet var finished = needFinish(state) || stream.destroyed; + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { clearBuffer(stream, state); } + if (sync) { process.nextTick(afterWrite, stream, state, finished, cb); } else { @@ -437,27 +462,29 @@ function onwrite(stream, er) { } } } + function afterWrite(stream, state, finished, cb) { if (!finished) onwriteDrain(stream, state); state.pendingcb--; cb(); finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't +} // Must force callback to be called on nextTick, so that we don't // emit 'drain' before the write() consumer gets the 'false' return // value, and has a chance to attach a 'drain' listener. + + function onwriteDrain(stream, state) { if (state.length === 0 && state.needDrain) { state.needDrain = false; stream.emit('drain'); } -} +} // if there's something in the buffer waiting, then process it + -// if there's something in the buffer waiting, then process it function clearBuffer(stream, state) { state.bufferProcessing = true; var entry = state.bufferedRequest; + if (stream._writev && entry && entry.next) { // Fast case, write everything using _writev() var l = state.bufferedRequestCount; @@ -466,25 +493,28 @@ function clearBuffer(stream, state) { holder.entry = entry; var count = 0; var allBuffers = true; + while (entry) { buffer[count] = entry; if (!entry.isBuf) allBuffers = false; entry = entry.next; count += 1; } - buffer.allBuffers = allBuffers; - doWrite(stream, state, true, state.length, buffer, '', holder.finish); - // doWrite is almost always async, defer these to save a bit of time + buffer.allBuffers = allBuffers; + doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time // as the hot path ends with doWrite + state.pendingcb++; state.lastBufferedRequest = null; + if (holder.next) { state.corkedRequestsFree = holder.next; holder.next = null; } else { state.corkedRequestsFree = new CorkedRequest(state); } + state.bufferedRequestCount = 0; } else { // Slow case, write chunks one-by-one @@ -495,26 +525,32 @@ function clearBuffer(stream, state) { var len = state.objectMode ? 1 : chunk.length; doWrite(stream, state, false, len, chunk, encoding, cb); entry = entry.next; - state.bufferedRequestCount--; - // if we didn't call the onwrite immediately, then + state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then // it means that we need to wait until it does. // also, that means that the chunk and cb are currently // being processed, so move the buffer counter past them. + if (state.writing) { break; } } + if (entry === null) state.lastBufferedRequest = null; } + state.bufferedRequest = entry; state.bufferProcessing = false; } + Writable.prototype._write = function (chunk, encoding, cb) { cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()')); }; + Writable.prototype._writev = null; + Writable.prototype.end = function (chunk, encoding, cb) { var state = this._writableState; + if (typeof chunk === 'function') { cb = chunk; chunk = null; @@ -523,18 +559,19 @@ Writable.prototype.end = function (chunk, encoding, cb) { cb = encoding; encoding = null; } - if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); - // .end() fully uncorks + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks + if (state.corked) { state.corked = 1; this.uncork(); - } + } // ignore unnecessary end() calls. + - // ignore unnecessary end() calls. if (!state.ending) endWritable(this, state, cb); return this; }; + Object.defineProperty(Writable.prototype, 'writableLength', { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in @@ -544,20 +581,25 @@ Object.defineProperty(Writable.prototype, 'writableLength', { return this._writableState.length; } }); + function needFinish(state) { return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; } + function callFinal(stream, state) { stream._final(function (err) { state.pendingcb--; + if (err) { errorOrDestroy(stream, err); } + state.prefinished = true; stream.emit('prefinish'); finishMaybe(stream, state); }); } + function prefinish(stream, state) { if (!state.prefinished && !state.finalCalled) { if (typeof stream._final === 'function' && !state.destroyed) { @@ -570,47 +612,59 @@ function prefinish(stream, state) { } } } + function finishMaybe(stream, state) { var need = needFinish(state); + if (need) { prefinish(stream, state); + if (state.pendingcb === 0) { state.finished = true; stream.emit('finish'); + if (state.autoDestroy) { // In case of duplex streams we need a way to detect // if the readable side is ready for autoDestroy as well var rState = stream._readableState; + if (!rState || rState.autoDestroy && rState.endEmitted) { stream.destroy(); } } } } + return need; } + function endWritable(stream, state, cb) { state.ending = true; finishMaybe(stream, state); + if (cb) { if (state.finished) process.nextTick(cb);else stream.once('finish', cb); } + state.ended = true; stream.writable = false; } + function onCorkedFinish(corkReq, state, err) { var entry = corkReq.entry; corkReq.entry = null; + while (entry) { var cb = entry.callback; state.pendingcb--; cb(err); entry = entry.next; - } + } // reuse the free corkReq. + - // reuse the free corkReq. state.corkedRequestsFree.next = corkReq; } + Object.defineProperty(Writable.prototype, 'destroyed', { // making it explicit this property is not enumerable // because otherwise some prototype manipulation in @@ -620,6 +674,7 @@ Object.defineProperty(Writable.prototype, 'destroyed', { if (this._writableState === undefined) { return false; } + return this._writableState.destroyed; }, set: function set(value) { @@ -627,15 +682,16 @@ Object.defineProperty(Writable.prototype, 'destroyed', { // has not been initialized yet if (!this._writableState) { return; - } - - // backward compatibility, the user is explicitly + } // backward compatibility, the user is explicitly // managing destroyed + + this._writableState.destroyed = value; } }); Writable.prototype.destroy = destroyImpl.destroy; Writable.prototype._undestroy = destroyImpl.undestroy; + Writable.prototype._destroy = function (err, cb) { cb(err); }; \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/async_iterator.js b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/async_iterator.js index 742c5a4..9fb615a 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/async_iterator.js +++ b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/async_iterator.js @@ -1,10 +1,11 @@ 'use strict'; var _Object$setPrototypeO; -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + var finished = require('./end-of-stream'); + var kLastResolve = Symbol('lastResolve'); var kLastReject = Symbol('lastReject'); var kError = Symbol('error'); @@ -12,19 +13,22 @@ var kEnded = Symbol('ended'); var kLastPromise = Symbol('lastPromise'); var kHandlePromise = Symbol('handlePromise'); var kStream = Symbol('stream'); + function createIterResult(value, done) { return { value: value, done: done }; } + function readAndResolve(iter) { var resolve = iter[kLastResolve]; + if (resolve !== null) { - var data = iter[kStream].read(); - // we defer if data is null + var data = iter[kStream].read(); // we defer if data is null // we can be expecting either 'end' or // 'error' + if (data !== null) { iter[kLastPromise] = null; iter[kLastResolve] = null; @@ -33,11 +37,13 @@ function readAndResolve(iter) { } } } + function onReadable(iter) { // we wait for the next tick, because it might // emit an error with process.nextTick process.nextTick(readAndResolve, iter); } + function wrapForNext(lastPromise, iter) { return function (resolve, reject) { lastPromise.then(function () { @@ -45,26 +51,33 @@ function wrapForNext(lastPromise, iter) { resolve(createIterResult(undefined, true)); return; } + iter[kHandlePromise](resolve, reject); }, reject); }; } + var AsyncIteratorPrototype = Object.getPrototypeOf(function () {}); var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = { get stream() { return this[kStream]; }, + next: function next() { var _this = this; + // if we have detected an error in the meanwhile // reject straight away var error = this[kError]; + if (error !== null) { return Promise.reject(error); } + if (this[kEnded]) { return Promise.resolve(createIterResult(undefined, true)); } + if (this[kStream].destroyed) { // We need to defer via nextTick because if .destroy(err) is // called, the error will be emitted via nextTick, and @@ -79,25 +92,29 @@ var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPro } }); }); - } - - // if we have multiple next() calls + } // if we have multiple next() calls // we will wait for the previous Promise to finish // this logic is optimized to support for await loops, // where next() is only called once at a time + + var lastPromise = this[kLastPromise]; var promise; + if (lastPromise) { promise = new Promise(wrapForNext(lastPromise, this)); } else { // fast path needed to support multiple this.push() // without triggering the next() queue var data = this[kStream].read(); + if (data !== null) { return Promise.resolve(createIterResult(data, false)); } + promise = new Promise(this[kHandlePromise]); } + this[kLastPromise] = promise; return promise; } @@ -105,6 +122,7 @@ var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPro return this; }), _defineProperty(_Object$setPrototypeO, "return", function _return() { var _this2 = this; + // destroy(err, cb) is a private API // we can guarantee we have that here, because we control the // Readable class this is attached to @@ -114,12 +132,15 @@ var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPro reject(err); return; } + resolve(createIterResult(undefined, true)); }); }); }), _Object$setPrototypeO), AsyncIteratorPrototype); + var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) { var _Object$create; + var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, { value: stream, writable: true @@ -138,6 +159,7 @@ var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterat }), _defineProperty(_Object$create, kHandlePromise, { value: function value(resolve, reject) { var data = iterator[kStream].read(); + if (data) { iterator[kLastPromise] = null; iterator[kLastResolve] = null; @@ -153,28 +175,33 @@ var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterat iterator[kLastPromise] = null; finished(stream, function (err) { if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') { - var reject = iterator[kLastReject]; - // reject if we are waiting for data in the Promise + var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise // returned by next() and store the error + if (reject !== null) { iterator[kLastPromise] = null; iterator[kLastResolve] = null; iterator[kLastReject] = null; reject(err); } + iterator[kError] = err; return; } + var resolve = iterator[kLastResolve]; + if (resolve !== null) { iterator[kLastPromise] = null; iterator[kLastResolve] = null; iterator[kLastReject] = null; resolve(createIterResult(undefined, true)); } + iterator[kEnded] = true; }); stream.on('readable', onReadable.bind(null, iterator)); return iterator; }; + module.exports = createReadableStreamAsyncIterator; \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/buffer_list.js b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/buffer_list.js index 69bda49..cdea425 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/buffer_list.js +++ b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/buffer_list.js @@ -1,28 +1,40 @@ 'use strict'; -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + var _require = require('buffer'), - Buffer = _require.Buffer; + Buffer = _require.Buffer; + var _require2 = require('util'), - inspect = _require2.inspect; + inspect = _require2.inspect; + var custom = inspect && inspect.custom || 'inspect'; + function copyBuffer(src, target, offset) { Buffer.prototype.copy.call(src, target, offset); } -module.exports = /*#__PURE__*/function () { + +module.exports = +/*#__PURE__*/ +function () { function BufferList() { _classCallCheck(this, BufferList); + this.head = null; this.tail = null; this.length = 0; } + _createClass(BufferList, [{ key: "push", value: function push(v) { @@ -66,7 +78,11 @@ module.exports = /*#__PURE__*/function () { if (this.length === 0) return ''; var p = this.head; var ret = '' + p.data; - while (p = p.next) ret += s + p.data; + + while (p = p.next) { + ret += s + p.data; + } + return ret; } }, { @@ -76,19 +92,21 @@ module.exports = /*#__PURE__*/function () { var ret = Buffer.allocUnsafe(n >>> 0); var p = this.head; var i = 0; + while (p) { copyBuffer(p.data, ret, i); i += p.data.length; p = p.next; } - return ret; - } - // Consumes a specified amount of bytes or characters from the buffered data. + return ret; + } // Consumes a specified amount of bytes or characters from the buffered data. + }, { key: "consume", value: function consume(n, hasStrings) { var ret; + if (n < this.head.data.length) { // `slice` is the same for buffers and strings. ret = this.head.data.slice(0, n); @@ -100,15 +118,15 @@ module.exports = /*#__PURE__*/function () { // Result spans more than one buffer. ret = hasStrings ? this._getString(n) : this._getBuffer(n); } + return ret; } }, { key: "first", value: function first() { return this.head.data; - } + } // Consumes a specified amount of characters from the buffered data. - // Consumes a specified amount of characters from the buffered data. }, { key: "_getString", value: function _getString(n) { @@ -116,11 +134,13 @@ module.exports = /*#__PURE__*/function () { var c = 1; var ret = p.data; n -= ret.length; + while (p = p.next) { var str = p.data; var nb = n > str.length ? str.length : n; if (nb === str.length) ret += str;else ret += str.slice(0, n); n -= nb; + if (n === 0) { if (nb === str.length) { ++c; @@ -129,15 +149,17 @@ module.exports = /*#__PURE__*/function () { this.head = p; p.data = str.slice(nb); } + break; } + ++c; } + this.length -= c; return ret; - } + } // Consumes a specified amount of bytes from the buffered data. - // Consumes a specified amount of bytes from the buffered data. }, { key: "_getBuffer", value: function _getBuffer(n) { @@ -146,11 +168,13 @@ module.exports = /*#__PURE__*/function () { var c = 1; p.data.copy(ret); n -= p.data.length; + while (p = p.next) { var buf = p.data; var nb = n > buf.length ? buf.length : n; buf.copy(ret, ret.length - n, 0, nb); n -= nb; + if (n === 0) { if (nb === buf.length) { ++c; @@ -159,19 +183,21 @@ module.exports = /*#__PURE__*/function () { this.head = p; p.data = buf.slice(nb); } + break; } + ++c; } + this.length -= c; return ret; - } + } // Make sure the linked list only shows the minimal necessary information. - // Make sure the linked list only shows the minimal necessary information. }, { key: custom, value: function value(_, options) { - return inspect(this, _objectSpread(_objectSpread({}, options), {}, { + return inspect(this, _objectSpread({}, options, { // Only inspect one level. depth: 0, // It should not recurse. @@ -179,5 +205,6 @@ module.exports = /*#__PURE__*/function () { })); } }]); + return BufferList; }(); \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/destroy.js b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/destroy.js index 31a17c4..3268a16 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/destroy.js +++ b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/destroy.js @@ -1,10 +1,11 @@ -'use strict'; +'use strict'; // undocumented cb() API, needed for core, not for public API -// undocumented cb() API, needed for core, not for public API function destroy(err, cb) { var _this = this; + var readableDestroyed = this._readableState && this._readableState.destroyed; var writableDestroyed = this._writableState && this._writableState.destroyed; + if (readableDestroyed || writableDestroyed) { if (cb) { cb(err); @@ -16,20 +17,21 @@ function destroy(err, cb) { process.nextTick(emitErrorNT, this, err); } } - return this; - } - // we set destroyed to true before firing error callbacks in order + return this; + } // we set destroyed to true before firing error callbacks in order // to make it re-entrance safe in case destroy() is called within callbacks + if (this._readableState) { this._readableState.destroyed = true; - } + } // if this is a duplex stream mark the writable part as destroyed as well + - // if this is a duplex stream mark the writable part as destroyed as well if (this._writableState) { this._writableState.destroyed = true; } + this._destroy(err || null, function (err) { if (!cb && err) { if (!_this._writableState) { @@ -47,17 +49,21 @@ function destroy(err, cb) { process.nextTick(emitCloseNT, _this); } }); + return this; } + function emitErrorAndCloseNT(self, err) { emitErrorNT(self, err); emitCloseNT(self); } + function emitCloseNT(self) { if (self._writableState && !self._writableState.emitClose) return; if (self._readableState && !self._readableState.emitClose) return; self.emit('close'); } + function undestroy() { if (this._readableState) { this._readableState.destroyed = false; @@ -65,6 +71,7 @@ function undestroy() { this._readableState.ended = false; this._readableState.endEmitted = false; } + if (this._writableState) { this._writableState.destroyed = false; this._writableState.ended = false; @@ -75,20 +82,22 @@ function undestroy() { this._writableState.errorEmitted = false; } } + function emitErrorNT(self, err) { self.emit('error', err); } + function errorOrDestroy(stream, err) { // We have tests that rely on errors being emitted // in the same tick, so changing this is semver major. // For now when you opt-in to autoDestroy we allow // the error to be emitted nextTick. In a future // semver major update we should change the default to this. - var rState = stream._readableState; var wState = stream._writableState; if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err); } + module.exports = { destroy: destroy, undestroy: undestroy, diff --git a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/end-of-stream.js b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/end-of-stream.js index 59c671b..831f286 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/end-of-stream.js +++ b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/end-of-stream.js @@ -1,62 +1,78 @@ // Ported from https://github.com/mafintosh/end-of-stream with // permission from the author, Mathias Buus (@mafintosh). - 'use strict'; var ERR_STREAM_PREMATURE_CLOSE = require('../../../errors').codes.ERR_STREAM_PREMATURE_CLOSE; + function once(callback) { var called = false; return function () { if (called) return; called = true; + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } + callback.apply(this, args); }; } + function noop() {} + function isRequest(stream) { return stream.setHeader && typeof stream.abort === 'function'; } + function eos(stream, opts, callback) { if (typeof opts === 'function') return eos(stream, null, opts); if (!opts) opts = {}; callback = once(callback || noop); var readable = opts.readable || opts.readable !== false && stream.readable; var writable = opts.writable || opts.writable !== false && stream.writable; + var onlegacyfinish = function onlegacyfinish() { if (!stream.writable) onfinish(); }; + var writableEnded = stream._writableState && stream._writableState.finished; + var onfinish = function onfinish() { writable = false; writableEnded = true; if (!readable) callback.call(stream); }; + var readableEnded = stream._readableState && stream._readableState.endEmitted; + var onend = function onend() { readable = false; readableEnded = true; if (!writable) callback.call(stream); }; + var onerror = function onerror(err) { callback.call(stream, err); }; + var onclose = function onclose() { var err; + if (readable && !readableEnded) { if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); return callback.call(stream, err); } + if (writable && !writableEnded) { if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE(); return callback.call(stream, err); } }; + var onrequest = function onrequest() { stream.req.on('finish', onfinish); }; + if (isRequest(stream)) { stream.on('complete', onfinish); stream.on('abort', onclose); @@ -66,6 +82,7 @@ function eos(stream, opts, callback) { stream.on('end', onlegacyfinish); stream.on('close', onlegacyfinish); } + stream.on('end', onend); stream.on('finish', onfinish); if (opts.error !== false) stream.on('error', onerror); @@ -83,4 +100,5 @@ function eos(stream, opts, callback) { stream.removeListener('close', onclose); }; } + module.exports = eos; \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/from.js b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/from.js index 0a34ee9..6c41284 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/from.js +++ b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/from.js @@ -1,42 +1,52 @@ 'use strict'; function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } + function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + +function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } + var ERR_INVALID_ARG_TYPE = require('../../../errors').codes.ERR_INVALID_ARG_TYPE; + function from(Readable, iterable, opts) { var iterator; + if (iterable && typeof iterable.next === 'function') { iterator = iterable; } else if (iterable && iterable[Symbol.asyncIterator]) iterator = iterable[Symbol.asyncIterator]();else if (iterable && iterable[Symbol.iterator]) iterator = iterable[Symbol.iterator]();else throw new ERR_INVALID_ARG_TYPE('iterable', ['Iterable'], iterable); + var readable = new Readable(_objectSpread({ objectMode: true - }, opts)); - // Reading boolean to protect against _read + }, opts)); // Reading boolean to protect against _read // being called before last iteration completion. + var reading = false; + readable._read = function () { if (!reading) { reading = true; next(); } }; + function next() { return _next2.apply(this, arguments); } + function _next2() { _next2 = _asyncToGenerator(function* () { try { - var _yield$iterator$next = yield iterator.next(), - value = _yield$iterator$next.value, - done = _yield$iterator$next.done; + var _ref = yield iterator.next(), + value = _ref.value, + done = _ref.done; + if (done) { readable.push(null); - } else if (readable.push(yield value)) { + } else if (readable.push((yield value))) { next(); } else { reading = false; @@ -47,6 +57,8 @@ function from(Readable, iterable, opts) { }); return _next2.apply(this, arguments); } + return readable; } -module.exports = from; + +module.exports = from; \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/pipeline.js b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/pipeline.js index e6f3924..6589909 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/pipeline.js +++ b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/pipeline.js @@ -1,9 +1,9 @@ // Ported from https://github.com/mafintosh/pump with // permission from the author, Mathias Buus (@mafintosh). - 'use strict'; var eos; + function once(callback) { var called = false; return function () { @@ -12,16 +12,20 @@ function once(callback) { callback.apply(void 0, arguments); }; } + var _require$codes = require('../../../errors').codes, - ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, - ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; + ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS, + ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED; + function noop(err) { // Rethrow the error if it exists to avoid swallowing it if (err) throw err; } + function isRequest(stream) { return stream.setHeader && typeof stream.abort === 'function'; } + function destroyer(stream, reading, writing, callback) { callback = once(callback); var closed = false; @@ -41,34 +45,40 @@ function destroyer(stream, reading, writing, callback) { return function (err) { if (closed) return; if (destroyed) return; - destroyed = true; + destroyed = true; // request.destroy just do .end - .abort is what we want - // request.destroy just do .end - .abort is what we want if (isRequest(stream)) return stream.abort(); if (typeof stream.destroy === 'function') return stream.destroy(); callback(err || new ERR_STREAM_DESTROYED('pipe')); }; } + function call(fn) { fn(); } + function pipe(from, to) { return from.pipe(to); } + function popCallback(streams) { if (!streams.length) return noop; if (typeof streams[streams.length - 1] !== 'function') return noop; return streams.pop(); } + function pipeline() { for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) { streams[_key] = arguments[_key]; } + var callback = popCallback(streams); if (Array.isArray(streams[0])) streams = streams[0]; + if (streams.length < 2) { throw new ERR_MISSING_ARGS('streams'); } + var error; var destroys = streams.map(function (stream, i) { var reading = i < streams.length - 1; @@ -83,4 +93,5 @@ function pipeline() { }); return streams.reduce(pipe); } + module.exports = pipeline; \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/state.js b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/state.js index 3fbf892..19887eb 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/state.js +++ b/npm-packages/mac-v2.4.x/readable-stream/lib/internal/streams/state.js @@ -1,22 +1,27 @@ 'use strict'; var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE; + function highWaterMarkFrom(options, isDuplex, duplexKey) { return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null; } + function getHighWaterMark(state, options, duplexKey, isDuplex) { var hwm = highWaterMarkFrom(options, isDuplex, duplexKey); + if (hwm != null) { if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) { var name = isDuplex ? duplexKey : 'highWaterMark'; throw new ERR_INVALID_OPT_VALUE(name, hwm); } - return Math.floor(hwm); - } - // Default value + return Math.floor(hwm); + } // Default value + + return state.objectMode ? 16 : 16 * 1024; } + module.exports = { getHighWaterMark: getHighWaterMark }; \ No newline at end of file diff --git a/npm-packages/mac-v2.4.x/readable-stream/package.json b/npm-packages/mac-v2.4.x/readable-stream/package.json index ade59e7..0b0c4bd 100644 --- a/npm-packages/mac-v2.4.x/readable-stream/package.json +++ b/npm-packages/mac-v2.4.x/readable-stream/package.json @@ -1,6 +1,6 @@ { "name": "readable-stream", - "version": "3.6.2", + "version": "3.6.0", "description": "Streams3, a user-land copy of the stream library from Node.js", "main": "readable.js", "engines": { diff --git a/npm-packages/mac-v2.4.x/semver/README.md b/npm-packages/mac-v2.4.x/semver/README.md index 53ea9b5..df54e7a 100644 --- a/npm-packages/mac-v2.4.x/semver/README.md +++ b/npm-packages/mac-v2.4.x/semver/README.md @@ -110,9 +110,6 @@ Options: -l --loose Interpret versions and ranges loosely --n <0|1> - This is the base to be used for the prerelease identifier. - -p --include-prerelease Always include prerelease versions in range matching @@ -159,9 +156,7 @@ of primitive `operators` is: For example, the comparator `>=1.2.7` would match the versions `1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6` -or `1.1.0`. The comparator `>1` is equivalent to `>=2.0.0` and -would match the versions `2.0.0` and `3.1.0`, but not the versions -`1.0.1` or `1.1.0`. +or `1.1.0`. Comparators can be joined by whitespace to form a `comparator set`, which is satisfied by the **intersection** of all of the comparators @@ -237,35 +232,6 @@ $ semver 1.2.4-beta.0 -i prerelease 1.2.4-beta.1 ``` -#### Prerelease Identifier Base - -The method `.inc` takes an optional parameter 'identifierBase' string -that will let you let your prerelease number as zero-based or one-based. -Set to `false` to omit the prerelease number altogether. -If you do not specify this parameter, it will default to zero-based. - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta', '1') -// '1.2.4-beta.1' -``` - -```javascript -semver.inc('1.2.3', 'prerelease', 'beta', false) -// '1.2.4-beta' -``` - -command-line example: - -```bash -$ semver 1.2.3 -i prerelease --preid beta -n 1 -1.2.4-beta.1 -``` - -```bash -$ semver 1.2.3 -i prerelease --preid beta -n false -1.2.4-beta -``` - ### Advanced Range Syntax Advanced range syntax desugars to primitive comparators in @@ -547,40 +513,6 @@ ex. * `s.clean(' 2.1.5 ')`: `'2.1.5'` * `s.clean('~1.0.0')`: `null` -## Constants - -As a convenience, helper constants are exported to provide information about what `node-semver` supports: - -### `RELEASE_TYPES` - -- major -- premajor -- minor -- preminor -- patch -- prepatch -- prerelease - -``` -const semver = require('semver'); - -if (semver.RELEASE_TYPES.includes(arbitraryUserInput)) { - console.log('This is a valid release type!'); -} else { - console.warn('This is NOT a valid release type!'); -} -``` - -### `SEMVER_SPEC_VERSION` - -2.0.0 - -``` -const semver = require('semver'); - -console.log('We are currently using the semver specification version:', semver.SEMVER_SPEC_VERSION); -``` - ## Exported Modules >=1.2.3 <1.3.0-0 // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0 // ~0.0.1 --> >=0.0.1 <0.1.0-0 -const replaceTildes = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceTilde(c, options)) - .join(' ') -} +const replaceTildes = (comp, options) => + comp.trim().split(/\s+/).map((c) => { + return replaceTilde(c, options) + }).join(' ') const replaceTilde = (comp, options) => { const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE] @@ -304,13 +294,10 @@ const replaceTilde = (comp, options) => { // ^1.2.0 --> >=1.2.0 <2.0.0-0 // ^0.0.1 --> >=0.0.1 <0.0.2-0 // ^0.1.0 --> >=0.1.0 <0.2.0-0 -const replaceCarets = (comp, options) => { - return comp - .trim() - .split(/\s+/) - .map((c) => replaceCaret(c, options)) - .join(' ') -} +const replaceCarets = (comp, options) => + comp.trim().split(/\s+/).map((c) => { + return replaceCaret(c, options) + }).join(' ') const replaceCaret = (comp, options) => { debug('caret', comp, options) @@ -367,10 +354,9 @@ const replaceCaret = (comp, options) => { const replaceXRanges = (comp, options) => { debug('replaceXRanges', comp, options) - return comp - .split(/\s+/) - .map((c) => replaceXRange(c, options)) - .join(' ') + return comp.split(/\s+/).map((c) => { + return replaceXRange(c, options) + }).join(' ') } const replaceXRange = (comp, options) => { @@ -453,15 +439,12 @@ const replaceXRange = (comp, options) => { const replaceStars = (comp, options) => { debug('replaceStars', comp, options) // Looseness is ignored here. star is always as loose as it gets! - return comp - .trim() - .replace(re[t.STAR], '') + return comp.trim().replace(re[t.STAR], '') } const replaceGTE0 = (comp, options) => { debug('replaceGTE0', comp, options) - return comp - .trim() + return comp.trim() .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '') } @@ -499,7 +482,7 @@ const hyphenReplace = incPr => ($0, to = `<=${to}` } - return `${from} ${to}`.trim() + return (`${from} ${to}`).trim() } const testSet = (set, version, options) => { diff --git a/npm-packages/mac-v2.4.x/semver/classes/semver.js b/npm-packages/mac-v2.4.x/semver/classes/semver.js index 84e8459..af62955 100644 --- a/npm-packages/mac-v2.4.x/semver/classes/semver.js +++ b/npm-packages/mac-v2.4.x/semver/classes/semver.js @@ -1,6 +1,6 @@ const debug = require('../internal/debug') const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants') -const { safeRe: re, t } = require('../internal/re') +const { re, t } = require('../internal/re') const parseOptions = require('../internal/parse-options') const { compareIdentifiers } = require('../internal/identifiers') @@ -16,7 +16,7 @@ class SemVer { version = version.version } } else if (typeof version !== 'string') { - throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`) + throw new TypeError(`Invalid Version: ${version}`) } if (version.length > MAX_LENGTH) { @@ -175,36 +175,36 @@ class SemVer { // preminor will bump the version up to the next minor release, and immediately // down to pre-release. premajor and prepatch work the same way. - inc (release, identifier, identifierBase) { + inc (release, identifier) { switch (release) { case 'premajor': this.prerelease.length = 0 this.patch = 0 this.minor = 0 this.major++ - this.inc('pre', identifier, identifierBase) + this.inc('pre', identifier) break case 'preminor': this.prerelease.length = 0 this.patch = 0 this.minor++ - this.inc('pre', identifier, identifierBase) + this.inc('pre', identifier) break case 'prepatch': // If this is already a prerelease, it will bump to the next version // drop any prereleases that might already exist, since they are not // relevant at this point. this.prerelease.length = 0 - this.inc('patch', identifier, identifierBase) - this.inc('pre', identifier, identifierBase) + this.inc('patch', identifier) + this.inc('pre', identifier) break // If the input is a non-prerelease version, this acts the same as // prepatch. case 'prerelease': if (this.prerelease.length === 0) { - this.inc('patch', identifier, identifierBase) + this.inc('patch', identifier) } - this.inc('pre', identifier, identifierBase) + this.inc('pre', identifier) break case 'major': @@ -246,15 +246,9 @@ class SemVer { break // This probably shouldn't be used publicly. // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction. - case 'pre': { - const base = Number(identifierBase) ? 1 : 0 - - if (!identifier && identifierBase === false) { - throw new Error('invalid increment argument: identifier is empty') - } - + case 'pre': if (this.prerelease.length === 0) { - this.prerelease = [base] + this.prerelease = [0] } else { let i = this.prerelease.length while (--i >= 0) { @@ -265,36 +259,27 @@ class SemVer { } if (i === -1) { // didn't increment anything - if (identifier === this.prerelease.join('.') && identifierBase === false) { - throw new Error('invalid increment argument: identifier already exists') - } - this.prerelease.push(base) + this.prerelease.push(0) } } if (identifier) { // 1.2.0-beta.1 bumps to 1.2.0-beta.2, // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0 - let prerelease = [identifier, base] - if (identifierBase === false) { - prerelease = [identifier] - } if (compareIdentifiers(this.prerelease[0], identifier) === 0) { if (isNaN(this.prerelease[1])) { - this.prerelease = prerelease + this.prerelease = [identifier, 0] } } else { - this.prerelease = prerelease + this.prerelease = [identifier, 0] } } break - } + default: throw new Error(`invalid increment argument: ${release}`) } - this.raw = this.format() - if (this.build.length) { - this.raw += `+${this.build.join('.')}` - } + this.format() + this.raw = this.version return this } } diff --git a/npm-packages/mac-v2.4.x/semver/functions/coerce.js b/npm-packages/mac-v2.4.x/semver/functions/coerce.js index febbff9..2e01452 100644 --- a/npm-packages/mac-v2.4.x/semver/functions/coerce.js +++ b/npm-packages/mac-v2.4.x/semver/functions/coerce.js @@ -1,6 +1,6 @@ const SemVer = require('../classes/semver') const parse = require('./parse') -const { safeRe: re, t } = require('../internal/re') +const { re, t } = require('../internal/re') const coerce = (version, options) => { if (version instanceof SemVer) { diff --git a/npm-packages/mac-v2.4.x/semver/functions/diff.js b/npm-packages/mac-v2.4.x/semver/functions/diff.js index fc224e3..87200ef 100644 --- a/npm-packages/mac-v2.4.x/semver/functions/diff.js +++ b/npm-packages/mac-v2.4.x/semver/functions/diff.js @@ -1,65 +1,23 @@ -const parse = require('./parse.js') +const parse = require('./parse') +const eq = require('./eq') const diff = (version1, version2) => { - const v1 = parse(version1, null, true) - const v2 = parse(version2, null, true) - const comparison = v1.compare(v2) - - if (comparison === 0) { + if (eq(version1, version2)) { return null - } - - const v1Higher = comparison > 0 - const highVersion = v1Higher ? v1 : v2 - const lowVersion = v1Higher ? v2 : v1 - const highHasPre = !!highVersion.prerelease.length - const lowHasPre = !!lowVersion.prerelease.length - - if (lowHasPre && !highHasPre) { - // Going from prerelease -> no prerelease requires some special casing - - // If the low version has only a major, then it will always be a major - // Some examples: - // 1.0.0-1 -> 1.0.0 - // 1.0.0-1 -> 1.1.1 - // 1.0.0-1 -> 2.0.0 - if (!lowVersion.patch && !lowVersion.minor) { - return 'major' + } else { + const v1 = parse(version1) + const v2 = parse(version2) + const hasPre = v1.prerelease.length || v2.prerelease.length + const prefix = hasPre ? 'pre' : '' + const defaultResult = hasPre ? 'prerelease' : '' + for (const key in v1) { + if (key === 'major' || key === 'minor' || key === 'patch') { + if (v1[key] !== v2[key]) { + return prefix + key + } + } } - - // Otherwise it can be determined by checking the high version - - if (highVersion.patch) { - // anything higher than a patch bump would result in the wrong version - return 'patch' - } - - if (highVersion.minor) { - // anything higher than a minor bump would result in the wrong version - return 'minor' - } - - // bumping major/minor/patch all have same result - return 'major' + return defaultResult // may be undefined } - - // add the `pre` prefix if we are going to a prerelease version - const prefix = highHasPre ? 'pre' : '' - - if (v1.major !== v2.major) { - return prefix + 'major' - } - - if (v1.minor !== v2.minor) { - return prefix + 'minor' - } - - if (v1.patch !== v2.patch) { - return prefix + 'patch' - } - - // high and low are preleases - return 'prerelease' } - module.exports = diff diff --git a/npm-packages/mac-v2.4.x/semver/functions/inc.js b/npm-packages/mac-v2.4.x/semver/functions/inc.js index 7670b1b..62d1da2 100644 --- a/npm-packages/mac-v2.4.x/semver/functions/inc.js +++ b/npm-packages/mac-v2.4.x/semver/functions/inc.js @@ -1,8 +1,7 @@ const SemVer = require('../classes/semver') -const inc = (version, release, options, identifier, identifierBase) => { +const inc = (version, release, options, identifier) => { if (typeof (options) === 'string') { - identifierBase = identifier identifier = options options = undefined } @@ -11,7 +10,7 @@ const inc = (version, release, options, identifier, identifierBase) => { return new SemVer( version instanceof SemVer ? version.version : version, options - ).inc(release, identifier, identifierBase).version + ).inc(release, identifier).version } catch (er) { return null } diff --git a/npm-packages/mac-v2.4.x/semver/functions/parse.js b/npm-packages/mac-v2.4.x/semver/functions/parse.js index 459b3b1..a66663a 100644 --- a/npm-packages/mac-v2.4.x/semver/functions/parse.js +++ b/npm-packages/mac-v2.4.x/semver/functions/parse.js @@ -1,15 +1,32 @@ +const { MAX_LENGTH } = require('../internal/constants') +const { re, t } = require('../internal/re') const SemVer = require('../classes/semver') -const parse = (version, options, throwErrors = false) => { + +const parseOptions = require('../internal/parse-options') +const parse = (version, options) => { + options = parseOptions(options) + if (version instanceof SemVer) { return version } + + if (typeof version !== 'string') { + return null + } + + if (version.length > MAX_LENGTH) { + return null + } + + const r = options.loose ? re[t.LOOSE] : re[t.FULL] + if (!r.test(version)) { + return null + } + try { return new SemVer(version, options) } catch (er) { - if (!throwErrors) { - return null - } - throw er + return null } } diff --git a/npm-packages/mac-v2.4.x/semver/index.js b/npm-packages/mac-v2.4.x/semver/index.js index 86d42ac..4a342c6 100644 --- a/npm-packages/mac-v2.4.x/semver/index.js +++ b/npm-packages/mac-v2.4.x/semver/index.js @@ -83,7 +83,6 @@ module.exports = { src: internalRe.src, tokens: internalRe.t, SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION, - RELEASE_TYPES: constants.RELEASE_TYPES, compareIdentifiers: identifiers.compareIdentifiers, rcompareIdentifiers: identifiers.rcompareIdentifiers, } diff --git a/npm-packages/mac-v2.4.x/semver/internal/constants.js b/npm-packages/mac-v2.4.x/semver/internal/constants.js index 94be1c5..4f0de59 100644 --- a/npm-packages/mac-v2.4.x/semver/internal/constants.js +++ b/npm-packages/mac-v2.4.x/semver/internal/constants.js @@ -9,27 +9,9 @@ const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER || // Max safe segment length for coercion. const MAX_SAFE_COMPONENT_LENGTH = 16 -// Max safe length for a build identifier. The max length minus 6 characters for -// the shortest version with a build 0.0.0+BUILD. -const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6 - -const RELEASE_TYPES = [ - 'major', - 'premajor', - 'minor', - 'preminor', - 'patch', - 'prepatch', - 'prerelease', -] - module.exports = { - MAX_LENGTH, - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_SAFE_INTEGER, - RELEASE_TYPES, SEMVER_SPEC_VERSION, - FLAG_INCLUDE_PRERELEASE: 0b001, - FLAG_LOOSE: 0b010, + MAX_LENGTH, + MAX_SAFE_INTEGER, + MAX_SAFE_COMPONENT_LENGTH, } diff --git a/npm-packages/mac-v2.4.x/semver/internal/parse-options.js b/npm-packages/mac-v2.4.x/semver/internal/parse-options.js index 10d64ce..bbd9ec7 100644 --- a/npm-packages/mac-v2.4.x/semver/internal/parse-options.js +++ b/npm-packages/mac-v2.4.x/semver/internal/parse-options.js @@ -1,15 +1,11 @@ -// parse out just the options we care about -const looseOption = Object.freeze({ loose: true }) -const emptyOpts = Object.freeze({ }) -const parseOptions = options => { - if (!options) { - return emptyOpts - } - - if (typeof options !== 'object') { - return looseOption - } - - return options -} +// parse out just the options we care about so we always get a consistent +// obj with keys in a consistent order. +const opts = ['includePrerelease', 'loose', 'rtl'] +const parseOptions = options => + !options ? {} + : typeof options !== 'object' ? { loose: true } + : opts.filter(k => options[k]).reduce((o, k) => { + o[k] = true + return o + }, {}) module.exports = parseOptions diff --git a/npm-packages/mac-v2.4.x/semver/internal/re.js b/npm-packages/mac-v2.4.x/semver/internal/re.js index 21150b3..ed88398 100644 --- a/npm-packages/mac-v2.4.x/semver/internal/re.js +++ b/npm-packages/mac-v2.4.x/semver/internal/re.js @@ -1,49 +1,19 @@ -const { - MAX_SAFE_COMPONENT_LENGTH, - MAX_SAFE_BUILD_LENGTH, - MAX_LENGTH, -} = require('./constants') +const { MAX_SAFE_COMPONENT_LENGTH } = require('./constants') const debug = require('./debug') exports = module.exports = {} // The actual regexps go on exports.re const re = exports.re = [] -const safeRe = exports.safeRe = [] const src = exports.src = [] const t = exports.t = {} let R = 0 -const LETTERDASHNUMBER = '[a-zA-Z0-9-]' - -// Replace some greedy regex tokens to prevent regex dos issues. These regex are -// used internally via the safeRe object since all inputs in this library get -// normalized first to trim and collapse all extra whitespace. The original -// regexes are exported for userland consumption and lower level usage. A -// future breaking change could export the safer regex only with a note that -// all input should have extra whitespace removed. -const safeRegexReplacements = [ - ['\\s', 1], - ['\\d', MAX_LENGTH], - [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH], -] - -const makeSafeRegex = (value) => { - for (const [token, max] of safeRegexReplacements) { - value = value - .split(`${token}*`).join(`${token}{0,${max}}`) - .split(`${token}+`).join(`${token}{1,${max}}`) - } - return value -} - const createToken = (name, value, isGlobal) => { - const safe = makeSafeRegex(value) const index = R++ debug(name, index, value) t[name] = index src[index] = value re[index] = new RegExp(value, isGlobal ? 'g' : undefined) - safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined) } // The following Regular Expressions can be used for tokenizing, @@ -53,13 +23,13 @@ const createToken = (name, value, isGlobal) => { // A single `0`, or a non-zero digit followed by zero or more digits. createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*') -createToken('NUMERICIDENTIFIERLOOSE', '\\d+') +createToken('NUMERICIDENTIFIERLOOSE', '[0-9]+') // ## Non-numeric Identifier // Zero or more digits, followed by a letter or hyphen, and then zero or // more letters, digits, or hyphens. -createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`) +createToken('NONNUMERICIDENTIFIER', '\\d*[a-zA-Z-][a-zA-Z0-9-]*') // ## Main Version // Three dot-separated numeric identifiers. @@ -94,7 +64,7 @@ createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE] // ## Build Metadata Identifier // Any combination of digits, letters, or hyphens. -createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`) +createToken('BUILDIDENTIFIER', '[0-9A-Za-z-]+') // ## Build Metadata // Plus sign, followed by one or more period-separated build metadata diff --git a/npm-packages/mac-v2.4.x/semver/package.json b/npm-packages/mac-v2.4.x/semver/package.json index c145eca..72d3f66 100644 --- a/npm-packages/mac-v2.4.x/semver/package.json +++ b/npm-packages/mac-v2.4.x/semver/package.json @@ -1,6 +1,6 @@ { "name": "semver", - "version": "7.5.4", + "version": "7.3.8", "description": "The semantic version parser used by npm.", "main": "index.js", "scripts": { @@ -13,8 +13,8 @@ "template-oss-apply": "template-oss-apply --force" }, "devDependencies": { - "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.17.0", + "@npmcli/eslint-config": "^3.0.1", + "@npmcli/template-oss": "4.4.4", "tap": "^16.0.0" }, "license": "ISC", @@ -37,7 +37,7 @@ "range.bnf" ], "tap": { - "timeout": 30, + "check-coverage": true, "coverage-map": "map.js", "nyc-arg": [ "--exclude", @@ -53,8 +53,9 @@ "author": "GitHub Inc.", "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.17.0", + "version": "4.4.4", "engines": ">=10", + "content": "./scripts", "ciVersions": [ "10.0.0", "10.x", @@ -63,7 +64,6 @@ "16.x", "18.x" ], - "npmSpec": "8", "distPaths": [ "classes/", "functions/", @@ -81,7 +81,6 @@ "/index.js", "/preload.js", "/range.bnf" - ], - "publish": "true" + ] } } diff --git a/npm-packages/mac-v2.4.x/semver/ranges/intersects.js b/npm-packages/mac-v2.4.x/semver/ranges/intersects.js index e0e9b7c..3d1a6f3 100644 --- a/npm-packages/mac-v2.4.x/semver/ranges/intersects.js +++ b/npm-packages/mac-v2.4.x/semver/ranges/intersects.js @@ -2,6 +2,6 @@ const Range = require('../classes/range') const intersects = (r1, r2, options) => { r1 = new Range(r1, options) r2 = new Range(r2, options) - return r1.intersects(r2, options) + return r1.intersects(r2) } module.exports = intersects diff --git a/npm-packages/mac-v2.4.x/semver/ranges/subset.js b/npm-packages/mac-v2.4.x/semver/ranges/subset.js index 1e5c268..e0dea43 100644 --- a/npm-packages/mac-v2.4.x/semver/ranges/subset.js +++ b/npm-packages/mac-v2.4.x/semver/ranges/subset.js @@ -68,9 +68,6 @@ const subset = (sub, dom, options = {}) => { return true } -const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')] -const minimumVersion = [new Comparator('>=0.0.0')] - const simpleSubset = (sub, dom, options) => { if (sub === dom) { return true @@ -80,9 +77,9 @@ const simpleSubset = (sub, dom, options) => { if (dom.length === 1 && dom[0].semver === ANY) { return true } else if (options.includePrerelease) { - sub = minimumVersionWithPreRelease + sub = [new Comparator('>=0.0.0-0')] } else { - sub = minimumVersion + sub = [new Comparator('>=0.0.0')] } } @@ -90,7 +87,7 @@ const simpleSubset = (sub, dom, options) => { if (options.includePrerelease) { return true } else { - dom = minimumVersion + dom = [new Comparator('>=0.0.0')] } } diff --git a/npm-packages/mac-v2.4.x/tar/lib/normalize-unicode.js b/npm-packages/mac-v2.4.x/tar/lib/normalize-unicode.js index 79e285a..43dc406 100644 --- a/npm-packages/mac-v2.4.x/tar/lib/normalize-unicode.js +++ b/npm-packages/mac-v2.4.x/tar/lib/normalize-unicode.js @@ -6,7 +6,7 @@ const normalizeCache = Object.create(null) const { hasOwnProperty } = Object.prototype module.exports = s => { if (!hasOwnProperty.call(normalizeCache, s)) { - normalizeCache[s] = s.normalize('NFD') + normalizeCache[s] = s.normalize('NFKD') } return normalizeCache[s] } diff --git a/npm-packages/mac-v2.4.x/tar/lib/pack.js b/npm-packages/mac-v2.4.x/tar/lib/pack.js index 938ece8..a3f4ff2 100644 --- a/npm-packages/mac-v2.4.x/tar/lib/pack.js +++ b/npm-packages/mac-v2.4.x/tar/lib/pack.js @@ -22,7 +22,7 @@ class PackJob { } } -const { Minipass } = require('minipass') +const MiniPass = require('minipass') const zlib = require('minizlib') const ReadEntry = require('./read-entry.js') const WriteEntry = require('./write-entry.js') @@ -56,7 +56,7 @@ const path = require('path') const warner = require('./warn-mixin.js') const normPath = require('./normalize-windows-path.js') -const Pack = warner(class Pack extends Minipass { +const Pack = warner(class Pack extends MiniPass { constructor (opt) { super(opt) opt = opt || Object.create(null) diff --git a/npm-packages/mac-v2.4.x/tar/lib/path-reservations.js b/npm-packages/mac-v2.4.x/tar/lib/path-reservations.js index 8d349d5..ef380ca 100644 --- a/npm-packages/mac-v2.4.x/tar/lib/path-reservations.js +++ b/npm-packages/mac-v2.4.x/tar/lib/path-reservations.js @@ -123,7 +123,7 @@ module.exports = () => { // effectively removing all parallelization on windows. paths = isWindows ? ['win32 parallelization disabled'] : paths.map(p => { // don't need normPath, because we skip this entirely for windows - return stripSlashes(join(normalize(p))).toLowerCase() + return normalize(stripSlashes(join(p))).toLowerCase() }) const dirs = new Set( diff --git a/npm-packages/mac-v2.4.x/tar/lib/read-entry.js b/npm-packages/mac-v2.4.x/tar/lib/read-entry.js index 6186266..7f44beb 100644 --- a/npm-packages/mac-v2.4.x/tar/lib/read-entry.js +++ b/npm-packages/mac-v2.4.x/tar/lib/read-entry.js @@ -1,9 +1,9 @@ 'use strict' -const { Minipass } = require('minipass') +const MiniPass = require('minipass') const normPath = require('./normalize-windows-path.js') const SLURP = Symbol('slurp') -module.exports = class ReadEntry extends Minipass { +module.exports = class ReadEntry extends MiniPass { constructor (header, ex, gex) { super() // read entries always start life paused. this is to avoid the diff --git a/npm-packages/mac-v2.4.x/tar/lib/unpack.js b/npm-packages/mac-v2.4.x/tar/lib/unpack.js index fa46611..e341ad0 100644 --- a/npm-packages/mac-v2.4.x/tar/lib/unpack.js +++ b/npm-packages/mac-v2.4.x/tar/lib/unpack.js @@ -105,7 +105,7 @@ const uint32 = (a, b, c) => // Note that on windows, we always drop the entire cache whenever a // symbolic link is encountered, because 8.3 filenames are impossible // to reason about, and collisions are hazards rather than just failures. -const cacheKeyNormalize = path => stripSlash(normPath(normalize(path))) +const cacheKeyNormalize = path => normalize(stripSlash(normPath(path))) .toLowerCase() const pruneCache = (cache, abs) => { diff --git a/npm-packages/mac-v2.4.x/tar/lib/write-entry.js b/npm-packages/mac-v2.4.x/tar/lib/write-entry.js index 7d2f3eb..3b5540f 100644 --- a/npm-packages/mac-v2.4.x/tar/lib/write-entry.js +++ b/npm-packages/mac-v2.4.x/tar/lib/write-entry.js @@ -1,5 +1,5 @@ 'use strict' -const { Minipass } = require('minipass') +const MiniPass = require('minipass') const Pax = require('./pax.js') const Header = require('./header.js') const fs = require('fs') @@ -41,7 +41,7 @@ const stripAbsolutePath = require('./strip-absolute-path.js') const modeFix = require('./mode-fix.js') -const WriteEntry = warner(class WriteEntry extends Minipass { +const WriteEntry = warner(class WriteEntry extends MiniPass { constructor (p, opt) { opt = opt || {} super(opt) @@ -417,7 +417,7 @@ class WriteEntrySync extends WriteEntry { } } -const WriteEntryTar = warner(class WriteEntryTar extends Minipass { +const WriteEntryTar = warner(class WriteEntryTar extends MiniPass { constructor (readEntry, opt) { opt = opt || {} super(opt) diff --git a/npm-packages/mac-v2.4.x/tar/package.json b/npm-packages/mac-v2.4.x/tar/package.json index f59f54a..3a02105 100644 --- a/npm-packages/mac-v2.4.x/tar/package.json +++ b/npm-packages/mac-v2.4.x/tar/package.json @@ -2,10 +2,10 @@ "author": "GitHub Inc.", "name": "tar", "description": "tar for node", - "version": "6.1.15", + "version": "6.1.12", "repository": { "type": "git", - "url": "https://github.com/isaacs/node-tar.git" + "url": "https://github.com/npm/node-tar.git" }, "scripts": { "genparse": "node scripts/generate-parse-fixtures.js", @@ -20,17 +20,17 @@ "dependencies": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", - "minipass": "^5.0.0", + "minipass": "^3.0.0", "minizlib": "^2.1.1", "mkdirp": "^1.0.3", "yallist": "^4.0.0" }, "devDependencies": { "@npmcli/eslint-config": "^4.0.0", - "@npmcli/template-oss": "4.11.0", + "@npmcli/template-oss": "4.8.0", "chmodr": "^1.2.0", "end-of-stream": "^1.4.3", - "events-to-array": "^2.0.3", + "events-to-array": "^1.1.2", "mutate-fs": "^2.1.1", "nock": "^13.2.9", "rimraf": "^3.0.2", @@ -55,7 +55,7 @@ }, "templateOSS": { "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.", - "version": "4.11.0", + "version": "4.8.0", "content": "scripts/template-oss", "engines": ">=10", "distPaths": [ diff --git a/npm-packages/mac-v3.4.+/.bin/tsc b/npm-packages/mac-v3.4.+/.bin/tsc new file mode 120000 index 0000000..0863208 --- /dev/null +++ b/npm-packages/mac-v3.4.+/.bin/tsc @@ -0,0 +1 @@ +../typescript/bin/tsc \ No newline at end of file diff --git a/npm-packages/mac-v3.4.+/.bin/tsserver b/npm-packages/mac-v3.4.+/.bin/tsserver new file mode 120000 index 0000000..f8f8f1a --- /dev/null +++ b/npm-packages/mac-v3.4.+/.bin/tsserver @@ -0,0 +1 @@ +../typescript/bin/tsserver \ No newline at end of file diff --git a/npm-packages/mac-v3.4.+/.package-lock.json b/npm-packages/mac-v3.4.+/.package-lock.json index 2b973c5..56faf2b 100644 --- a/npm-packages/mac-v3.4.+/.package-lock.json +++ b/npm-packages/mac-v3.4.+/.package-lock.json @@ -648,6 +648,11 @@ "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz", "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" }, + "node_modules/pinyin-pro": { + "version": "3.16.0", + "resolved": "https://registry.npmmirror.com/pinyin-pro/-/pinyin-pro-3.16.0.tgz", + "integrity": "sha512-U4pMQ/KSMM5JmSb+ZcReCIbgzGl/JaglaHqWjCli0hpA0rDdjRbAO67e6fOa3ZFcJzbqfe6bJkaMMmpiWmkXgQ==" + }, "node_modules/postcss": { "version": "8.4.20", "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.20.tgz", diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/LICENSE b/npm-packages/mac-v3.4.+/pinyin-pro/LICENSE new file mode 100644 index 0000000..0f073f5 --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022-present zh-lx + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/README.md b/npm-packages/mac-v3.4.+/pinyin-pro/README.md new file mode 100644 index 0000000..4811192 --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/README.md @@ -0,0 +1,194 @@ +[![pinyin-pro Logo](https://t1.wodetu.cn/2022/11/15/168e8a29acc856c48fdef4060c0ba5ad.png)](https://github.com/zh-lx/pinyin-pro) + +[![NPM version](https://img.shields.io/npm/v/pinyin-pro.svg)](https://www.npmjs.com/package/pinyin-pro) +[![GITHUB star](https://img.shields.io/github/stars/zh-lx/pinyin-pro.svg)](https://github.com/zh-lx/pinyin-pro) +[![travis-build](https://travis-ci.com/zh-lx/pinyin-pro.svg?branch=main)](https://travis-ci.com/github/zh-lx/pinyin-pro) +[![NPM Downloads](https://img.shields.io/npm/dm/pinyin-pro.svg)](https://npmcharts.com/compare/pinyin-pro?minimal=true) +[![Coverage Status](https://coveralls.io/repos/github/zh-lx/pinyin-pro/badge.svg?branch=main)](https://coveralls.io/github/zh-lx/pinyin-pro?branch=main) +[![MIT-license](https://img.shields.io/npm/l/pinyin-pro.svg)](https://opensource.org/licenses/MIT) +[![GITHUB-language](https://img.shields.io/github/languages/top/zh-lx/pinyin-pro.svg)](https://github.com/zh-lx/pinyin-pro) + +### 📖 介绍 + +`pinyin-pro` 是一个专业的 js 汉字拼音转换库,功能丰富、准确率高、性能优异。 + +[中文文档](https://pinyin-pro.cn) | [English Docs](https://pinyin-pro.cn/en) | [在线运行](https://pinyin-pro.cn/run/run) + +### 🎨 特色功能 + +- 支持拼音/声母/韵母/首字母/音调/全部信息 +- 支持人名姓氏模式 +- 支持文本和拼音匹配 +- 支持自定义拼音 +- 支持获取带拼音汉字的 HTML 字符串 +- 支持获取汉字的所有拼音 +- 极致的性能和极高的拼音识别准确率 + +### 🔨 安装 + +npm 安装 + +```html +npm install pinyin-pro +``` + +浏览器引入 + +```html + +``` + +### 💡 使用示例 + +全部功能的使用说明文档请查看[在线文档](https://pinyin-pro.cn/use/pinyin) + +- 获取拼音,更多功能请查看[pinyin API](https://pinyin-pro.cn/use/pinyin) + + ```js + import { pinyin } from 'pinyin-pro'; + + // 获取字符串格式拼音 + pinyin('汉语拼音'); // 'hàn yǔ pīn yīn' + + // 获取数组格式拼音 + pinyin('汉语拼音', { type: 'array' }); // ["hàn", "yǔ", "pīn", "yīn"] + + // 获取不带音调数组格式拼音 + pinyin('汉语拼音', { toneType: 'none' }); // "han yu pin yin" + + // 获取不带音调数组格式拼音 + pinyin('汉语拼音', { toneType: 'none', type: 'array' }); // ["han", "yu", "pin", "yin"] + + // 音调以数组形式显示 + pinyin('汉语拼音', { toneType: 'num' }); // "han4 yu3 pin1 yin1" + + // 自动识别多音字 + pinyin('睡着了'); // "shuì zháo le" + ``` + +- 文本和拼音匹配,更多匹配规则请查看[match API](https://pinyin-pro.cn/use/match) + + ```js + import { match } from 'pinyin-pro'; + + // 支持首字母匹配 + match('中文拼音', 'zwp'); // [0, 1, 2] + + // 支持全拼匹配 + match('中文拼音', 'zhongwenpin'); // [0, 1, 2] + + // 支持混合匹配 + match('中文拼音', 'zhongwp'); // [0, 1, 2] + ``` + +- 获取带汉字拼音的 HTML 字符串,更多配置请查看[html API](https://pinyin-pro.cn/use/html) + + ```js + import { html } from 'pinyin-pro'; + + // 带拼音汉字的 HTML 字符串 + html('汉语拼音'); + /* + + + + ( + hàn + ) + + + + + + ( + + ) + + + */ + ``` + + 上述结果浏览器中预览效果如下: + + + + ( + hàn + ) + + + + + + ( + + ) + + + +### 🏆 竞品对比 + +以下是 `pinyin-pro`、`pinyin` 及 `@napi-rs/pinyin` 包对于汉字转换的速度及准确率对比,可以看到 `pinyin-pro` 在各方面都全面领先。 + +- 准确率测试数据: [accuracy](https://github.com/zh-lx/pinyin-pro/blob/main/benchmark/accuracy.js) +- 性能测试数据:[speed](https://github.com/zh-lx/pinyin-pro/blob/main/benchmark/speed.js) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
对比项pinyin@napi-rs/pinyinpinyin-pro
准确率😕 Node 版: 97.844%😕 97.433%🤩 99.744%
😕 Web 版: 94.507%
性能5k字转换耗时🐢 749.111ms🚲 200.877ms🚀 5.958ms
1w字转换耗时🐢 795.904ms🚲 206.5ms🚀 15.260ms
100w字转换耗时⛔ 内存溢出转换失败🚀 638.888ms🚀 607.131ms
兼容性Web 环境✔️ 支持❌ 不支持✔️ 支持
Node 环境✔️ 支持✔️ 支持✔️ 支持
+ +### 📠 反馈 + +使用遇到问题或者需要功能支持欢迎提 issue。 + +技术交流欢迎加 pinyin-pro 用户群 或者微信: + +
+ + +
diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/dist/index.js b/npm-packages/mac-v3.4.+/pinyin-pro/dist/index.js new file mode 100644 index 0000000..fd61377 --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/dist/index.js @@ -0,0 +1 @@ +!function(n,h){"object"==typeof exports&&"undefined"!=typeof module?h(exports):"function"==typeof define&&define.amd?define(["exports"],h):h((n="undefined"!=typeof globalThis?globalThis:n||self).pinyinPro={})}(this,(function(n){"use strict";const h=["zh","ch","sh","z","c","s","b","p","m","f","d","t","n","l","g","k","h","j","q","x","r","y","w",""],i=["j","q","x"],g=["uān","uán","uǎn","uàn","uan","uē","ué","uě","uè","ue","ūn","ún","ǔn","ùn","un","ū","ú","ǔ","ù","u"],u={"uān":"üān","uán":"üán","uǎn":"üǎn","uàn":"üàn",uan:"üan","uē":"üē","ué":"üé","uě":"üě","uè":"üè",ue:"üe","ūn":"ǖn","ún":"ǘn","ǔn":"ǚn","ùn":"ǜn",un:"ün","ū":"ǖ","ú":"ǘ","ǔ":"ǚ","ù":"ǜ",u:"ü"},s=["ia","ian","iang","iao","ie","iu","iong","ua","uai","uan","uang","ue","ui","uo","üan","üe","van","ve"],z={"南宫":"nán gōng","第五":"dì wǔ","万俟":"mò qí","司马":"sī mǎ","上官":"shàng guān","欧阳":"ōu yáng","夏侯":"xià hóu","诸葛":"zhū gě","闻人":"wén rén","东方":"dōng fāng","赫连":"hè lián","皇甫":"huáng fǔ","尉迟":"yù chí","公羊":"gōng yáng","澹台":"tán tái","公冶":"gōng yě","宗政":"zōng zhèng","濮阳":"pú yáng","淳于":"chún yú","单于":"chán yú","太叔":"tài shū","申屠":"shēn tú","公孙":"gōng sūn","仲孙":"zhòng sūn","轩辕":"xuān yuán","令狐":"líng hú","钟离":"zhōng lí","宇文":"yǔ wén","长孙":"zhǎng sūn","慕容":"mù róng","鲜于":"xiān yú","闾丘":"lǘ qiū","司徒":"sī tú","司空":"sī kōng","亓官":"qí guān","司寇":"sī kòu","仉督":"zhǎng dū","子车":"zǐ jū","颛孙":"zhuān sūn","端木":"duān mù","巫马":"wū mǎ","公西":"gōng xī","漆雕":"qī diāo","乐正":"yuè zhèng","壤驷":"rǎng sì","公良":"gōng liáng","拓跋":"tuò bá","夹谷":"jiá gǔ","宰父":"zǎi fǔ","榖梁":"gǔ liáng","段干":"duàn gān","百里":"bǎi lǐ","东郭":"dōng guō","南门":"nán mén","呼延":"hū yán","羊舌":"yáng shé","梁丘":"liáng qiū","左丘":"zuǒ qiū","东门":"dōng mén","西门":"xī mén","赵":"zhào","钱":"qián","孙":"sūn","李":"lǐ","周":"zhōu","吴":"wú","郑":"zhèng","王":"wáng","冯":"féng","陈":"chén","褚":"chǔ","卫":"wèi","蒋":"jiǎng","沈":"shěn","韩":"hán","杨":"yáng","朱":"zhū","秦":"qín","尤":"yóu","许":"xǔ","何":"hé","吕":"lǚ","施":"shī","张":"zhāng","孔":"kǒng","曹":"cáo","严":"yán","华":"huà","金":"jīn","魏":"wèi","陶":"táo","姜":"jiāng","戚":"qī","谢":"xiè","邹":"zōu","喻":"yù","柏":"bǎi","水":"shuǐ","窦":"dòu","章":"zhāng","云":"yún","苏":"sū","潘":"pān","葛":"gě","奚":"xī","范":"fàn","彭":"péng","郎":"láng","鲁":"lǔ","韦":"wéi","昌":"chāng","马":"mǎ","苗":"miáo","凤":"fèng","花":"huā","方":"fāng","俞":"yú","任":"rèn","袁":"yuán","柳":"liǔ","酆":"fēng","鲍":"bào","史":"shǐ","唐":"táng","费":"fèi","廉":"lián","岑":"cén","薛":"xuē","雷":"léi","贺":"hè","倪":"ní","汤":"tāng","滕":"téng","殷":"yīn","罗":"luó","毕":"bì","郝":"hǎo","邬":"wū","安":"ān","常":"cháng","乐":"yuè","于":"yú","时":"shí","傅":"fù","皮":"pí","卞":"biàn","齐":"qí","康":"kāng","伍":"wǔ","余":"yú","元":"yuán","卜":"bǔ","顾":"gù","孟":"mèng","平":"píng","黄":"huáng","和":"hé","穆":"mù","萧":"xiāo","尹":"yǐn","姚":"yáo","邵":"shào","湛":"zhàn","汪":"wāng","祁":"qí","毛":"máo","禹":"yǔ","狄":"dí","米":"mǐ","贝":"bèi","明":"míng","臧":"zāng","计":"jì","伏":"fú","成":"chéng","戴":"dài","谈":"tán","宋":"sòng","茅":"máo","庞":"páng","熊":"xióng","纪":"jì","舒":"shū","屈":"qū","项":"xiàng","祝":"zhù","董":"dǒng","梁":"liáng","杜":"dù","阮":"ruǎn","蓝":"lán","闵":"mǐn","席":"xí","季":"jì","麻":"má","强":"qiáng","贾":"jiǎ","路":"lù","娄":"lóu","危":"wēi","江":"jiāng","童":"tóng","颜":"yán","郭":"guō","梅":"méi","盛":"shèng","林":"lín","刁":"diāo","钟":"zhōng","徐":"xú","邱":"qiū","骆":"luò","高":"gāo","夏":"xià","蔡":"cài","田":"tián","樊":"fán","胡":"hú","凌":"líng","霍":"huò","虞":"yú","万":"wàn","支":"zhī","柯":"kē","昝":"zǎn","管":"guǎn","卢":"lú","莫":"mò","经":"jīng","房":"fáng","裘":"qiú","缪":"miào","干":"gān","解":"xiè","应":"yīng","宗":"zōng","丁":"dīng","宣":"xuān","贲":"bēn","邓":"dèng","郁":"yù","单":"shàn","杭":"háng","洪":"hóng","包":"bāo","诸":"zhū","左":"zuǒ","石":"shí","崔":"cuī","吉":"jí","钮":"niǔ","龚":"gōng","程":"chéng","嵇":"jī","邢":"xíng","滑":"huá","裴":"péi","陆":"lù","荣":"róng","翁":"wēng","荀":"xún","羊":"yáng","於":"yū","惠":"huì","甄":"zhēn","曲":"qū","家":"jiā","封":"fēng","芮":"ruì","羿":"yì","储":"chǔ","靳":"jìn","汲":"jí","邴":"bǐng","糜":"mí","松":"sōng","井":"jǐng","段":"duàn","富":"fù","巫":"wū","乌":"wū","焦":"jiāo","巴":"bā","弓":"gōng","牧":"mù","隗":"kuí","山":"shān","谷":"gǔ","车":"chē","侯":"hóu","宓":"mì","蓬":"péng","全":"quán","郗":"xī","班":"bān","仰":"yǎng","秋":"qiū","仲":"zhòng","伊":"yī","宫":"gōng","宁":"nìng","仇":"qiú","栾":"luán","暴":"bào","甘":"gān","钭":"tǒu","厉":"lì","戎":"róng","祖":"zǔ","武":"wǔ","符":"fú","刘":"liú","景":"jǐng","詹":"zhān","束":"shù","龙":"lóng","叶":"yè","幸":"xìng","司":"sī","韶":"sháo","郜":"gào","黎":"lí","蓟":"jì","薄":"bó","印":"yìn","宿":"sù","白":"bái","怀":"huái","蒲":"pú","邰":"tái","从":"cóng","鄂":"è","索":"suǒ","咸":"xián","籍":"jí","赖":"lài","卓":"zhuó","蔺":"lìn","屠":"tú","蒙":"méng","池":"chí","乔":"qiáo","阴":"yīn","鬱":"yù","胥":"xū","能":"nài","苍":"cāng","双":"shuāng","闻":"wén","莘":"shēn","党":"dǎng","翟":"zhái","谭":"tán","贡":"gòng","劳":"láo","逄":"páng","姬":"jī","申":"shēn","扶":"fú","堵":"dǔ","冉":"rǎn","宰":"zǎi","郦":"lì","雍":"yōng","郤":"xì","璩":"qú","桑":"sāng","桂":"guì","濮":"pú","牛":"niú","寿":"shòu","通":"tōng","边":"biān","扈":"hù","燕":"yān","冀":"jì","郏":"jiá","浦":"pǔ","尚":"shàng","农":"nóng","温":"wēn","别":"bié","庄":"zhuāng","晏":"yàn","柴":"chái","瞿":"qú","阎":"yán","充":"chōng","慕":"mù","连":"lián","茹":"rú","习":"xí","宦":"huàn","艾":"ài","鱼":"yú","容":"róng","向":"xiàng","古":"gǔ","易":"yì","慎":"shèn","戈":"gē","廖":"liào","庾":"yǔ","终":"zhōng","暨":"jì","居":"jū","衡":"héng","步":"bù","都":"dū","耿":"gěng","满":"mǎn","弘":"hóng","匡":"kuāng","国":"guó","文":"wén","寇":"kòu","广":"guǎng","禄":"lù","阙":"quē","东":"dōng","欧":"ōu","殳":"shū","沃":"wò","利":"lì","蔚":"wèi","越":"yuè","夔":"kuí","隆":"lóng","师":"shī","巩":"gǒng","厍":"shè","聂":"niè","晁":"cháo","勾":"gōu","敖":"áo","融":"róng","冷":"lěng","訾":"zǐ","辛":"xīn","阚":"kàn","那":"nā","简":"jiǎn","饶":"ráo","空":"kōng","曾":"zēng","母":"mǔ","沙":"shā","乜":"niè","养":"yǎng","鞠":"jū","须":"xū","丰":"fēng","巢":"cháo","关":"guān","蒯":"kuǎi","相":"xiàng","查":"zhā","后":"hòu","荆":"jīng","红":"hóng","游":"yóu","竺":"zhú","权":"quán","逯":"lù","盖":"gài","益":"yì","桓":"huán","公":"gōng","牟":"móu","哈":"hǎ","言":"yán","福":"fú"},o=Object.keys(z).map((n=>({zh:n,pinyin:z[n],priority:99+n.length,length:n.length}))),y={"líng":[12295,20278,20940,21026,22265,22397,22796,22984,23112,23361,23738,24446,25493,26148,26382,26563,26818,27386,27422,27872,28137,28586,28789,29167,29223,29393,29618,29708,29940,30346,30769,31102,31202,31451,31533,32055,32190,32491,32656,32666,32718,32838,33330,33491,33777,34020,34054,34166,34505,34897,35052,35397,36297,36584,36632,37187,37309,37428,37634,38083,38301,38517,38646,38666,38679,38683,38685,38728,39382,39807,39914,40110,40210,40496,40567,40610,40801,40802,40836,40855],"yī":[19968,20042,20234,20381,21307,21530,21695,22123,22769,22777,22785,23259,23300,24332,25558,25742,27321,27593,27938,28175,28458,29823,30057,31054,31125,31270,32324,34524,34916,35689,36791,37116,37291,37541,38129,40406,40549,40671,40691],"dīng zhēng":[19969],"kǎo qiǎo yú":[19970],"qī":[19971,20507,20699,20932,22017,22660,23096,24765,24956,24957,25114,25471,26578,26724,26748,26866,27071,27450,27791,28114,28422,32042,32192,33803,35076,35526,36809,37098,37850,38667,39756,40328],"shàng":[19972,23577,23578,24678,32212,32497],"xià":[19973,19979,20068,22327,22799,22803,25047,26810,30108,30577,32581,37820,37868],"hǎn":[19974,21898,28011,32597,35907],"wàn mò":[19975],"zhàng":[19976,20183,22663,23938,24080,24115,24155,25177,26454,28081,30190,30252,30260,30613,31872,32960,33081,36076,36134,38556],"sān":[19977,21377,21441,24334,27637,27638,27647,29337,39702],"shàng shǎng shang":[19978],"qí jī":[19980,20854,22855],"bù fǒu":[19981],"yǔ yù yú":[19982],"miǎn":[19983,20589,20813,20885,21193,21204,21909,23081,24848,27717,27796,28238,30540,32236,32517,33148,33858,38758,39864],"gài":[19984,20066,21251,21252,25124,27010,27113,27114,28297,28433,29890,33890,37411,38041],"chǒu":[19985,19986,20404,21532,26493,30597,30657,37276,39767],"zhuān":[19987,21440,23269,23554,23560,29820,29966,30742,30935,30938,34788,35567,37151,38995,39067,40004],"qiě jū":[19988],"pī":[19989,20243,20286,22140,22383,23727,25013,25209,25259,28811,29385,29395,30738,30919,30996,30997,31195,31200,32794,35966,37043,37402,37471,37524,37635,37645,38713,39379,39660,39806],"shì":[19990,19991,20106,20107,20181,20365,20895,21183,21218,21323,21609,21980,22124,22763,22893,23317,23460,24066,24335,24337,24338,24640,24643,25146,25325,25555,26159,26160,26558,26623,26683,28584,28882,29046,30466,30478,30497,30551,31034,31035,31598,31789,33296,33299,35179,35222,35270,35298,35430,35475,35553,35610,35797,35877,36016,36147,36606,36732,36893,36990,37320,37322,37323,37424,37443,37501,38088,39166,39193,39197,39280,39960],"qiū":[19992,2e4,22389,23197,24664,24695,27e3,31179,31180,31312,31693,32231,33833,34322,34479,34677,34775,34852,36261,37041,38822,38823,39948,39949,40133,40342,40537,40861],"bǐng":[19993,23643,24626,25254,26142,26170,26564,26821,28851,31104,31177,31263,33514,34499,37044,37429,38467,38790,39173,39200,39292],"yè":[19994,20145,20727,22711,22812,23978,23979,25268,25433,25819,25834,25835,26196,26308,26309,26327,26355,26357,26556,26557,26989,27906,28082,28594,28904,29121,29207,29837,30371,30641,30648,30991,33099,33865,35585,35858,37050,37172,37745,37943,38757,38760,38913,39029,39203,39233,39308,39516,40314,40456],"cóng":[19995,20174,21474,23107,23406,24467,24468,24470,24752,27191,27401,28121,28743,29212,29742,34242,35508,36072,36073,37661],"dōng":[19996,20530,20908,21658,22508,23741,23852,24474,26168,26481,27681,27693,28087,31511,33523,33732,34624,39831,39903,40327,40363,40491,40725],"sī":[19997,20460,20952,21422,21496,21661,22070,22109,23204,24285,24662,25749,26031,26962,27840,28556,29133,31127,31136,31169,31993,32114,32230,32415,32524,32627,34156,34386,34547,34596,34692,34774,34804,37488,37551,37750,37889,38198,39096,39124,39462,40421,40502,40758],"chéng":[19998,21576,22478,22485,22552,22605,22614,23468,23800,24809,25074,25104,25215,25392,25473,25576,26536,26838,27225,27289,27910,28311,28546,29685,29689,30075,31243,31386,31596,32126,33069,33663,35488,35802,37077,37234,37614,38102,39468,39886],"diū":[19999,20002,37545,38117],"liǎng":[20001,20004,20841,21793,21858,25498,32201,33084,34621,35058,39753,39758],"yǒu":[20003,21347,21451,26756,28277,29270,31113,32657,32840,33475,33696,34575,37193,37546,38101,40669],"yán":[20005,21427,21873,21926,22196,22633,22747,22759,22925,23032,23083,23086,23721,23890,23891,24012,24022,24023,24310,25541,26134,26956,27280,27369,27413,27839,28814,28815,29439,29698,30416,30878,31605,31799,33690,34053,34404,34578,35328,35329,35374,35453,35744,37076,38278,38331,38379,38414,38991,38996,39068,40573,40611],"bìng":[20006,20341,20482,20641,22442,25682,26660,30149,31369,31453,35457,38736,39849],"sàng sāng":[20007],"gǔn":[20008,24771,28378,28414,30937,32196,32498,34008,34057,34926,34974,36645,36746,39820,39872,40103],"jiū":[20009,21244,21886,25578,25579,26427,31350,31998,32416,33819,36211,38404,39695,39726,40169,40480],"gè gě":[20010,20491,21508],"yā":[20011,22311,23410,24216,25276,26514,26720,26895,37647,37914,40201,40232,40310,40486,40493],"pán":[20012,23227,24139,27075,27904,28682,29247,30424,30436,30928,32271,33968,34784,36434,36451,37788,38838],"zhōng zhòng":[20013],"jǐ":[20014,22912,24049,25119,25380,25486,25760,25824,27254,27890,29361,33034,34414,34787,39778,40062,40578],"jiè":[20015,20171,20511,21814,22586,23622,23626,23701,24206,24483,25106,26960,29335,29600,29758,30028,30029,30117,30734,34471,34550,34936,35119,35489,35819,37765,39601,39786],"fēng":[20016,20217,20561,20732,20968,20972,20974,22950,23543,23553,23791,23792,23862,26539,26963,27282,27811,27816,28194,28739,28925,29326,29478,29714,30127,30219,30461,30748,30904,31688,34356,34562,34861,35920,37175,37190,37586,37821,37856,38155,38715,38730,39116,40631],"guàn kuàng":[20017],"chuàn":[20018,27724,29588,36055,37351,38031],"chǎn":[20019,20135,20865,21111,22213,23932,26101,27984,28411,28763,29986,29987,31749,33927,34118,35522,35650,35719,35844,37855,38130,38323,38369,38416,39587],"lín":[20020,20903,22755,23818,23961,26036,26237,26301,26519,28542,28726,29136,29747,29848,30645,30852,30967,31910,31932,32343,32759,33256,36692,36762,36980,37051,37168,37883,38462,38563,38678,39502,40023,40158,40592,40607],"zhuó":[20021,21125,21331,21828,22324,22960,23098,25775,25798,25826,26027,26030,26033,26034,26037,26219,26899,27978,27998,28609,28796,28917,29752,30842,31130,31393,31831,31857,32620,33537,34839,34879,35521,35537,35638,35836,37196,37938,38255,40299,40415],"zhǔ":[20022,20027,21167,22065,22225,23444,24126,25284,28186,28624,29009,29038,29149,30633,30682,32604,35421,38524,40448,40584],"bā":[20023,20168,20843,21485,21749,22847,23708,24052,25420,26419,29584,30116,31494,31889,32659,33453,34438,35933,37343],"wán":[20024,21011,23436,23695,25231,25430,27725,28919,29609,29715,31490,32008,32424,32747,33412,36006,38929,39037],"dān":[20025,21231,21296,21336,22921,23173,27546,27563,29972,30472,30723,31658,31774,32828,32829,32835,32888,35101,35148,36525,37112,37170,37206,38933],"wèi wéi":[20026],"jǐng dǎn":[20028],"lì lí":[20029],"jǔ":[20030,24326,25369,25831,26887,27017,27032,27384,27397,30697,31589,32869,33289,33682,33951,35191,36413,40799,40835],"piě":[20031,33508,37893],"fú":[20032,20239,20440,20971,21020,21264,21640,21753,22424,23386,23722,24063,24087,24133,24158,24343,24447,24619,25206,26603,26687,26740,27679,27885,28014,28074,28563,28837,29624,30006,30025,30273,31059,31119,31274,31526,31641,32049,32060,32101,32141,32450,32459,32600,32614,32711,33344,33433,33443,33531,33536,33583,33748,33869,34393,34472,34569,34656,34970,34993,35142,35173,35560,35943,36414,36667,36752,37083,37464,37468,38861,38888,39083,39668,39812,39858,40167,40172,40212,40297,40699],"yí jí":[20033],"yì":[20034,20041,20100,20134,20159,20231,20287,20350,20427,20740,20863,21e3,21139,21166,21210,21225,21255,21587,21613,21625,21768,22216,22299,22340,22460,22520,22869,23253,23313,23537,23673,23748,23975,24095,24096,24134,24281,24322,24328,24331,24441,24518,24584,24639,24722,24847,25014,25036,25087,25233,25401,25953,26131,26233,26304,26318,26457,26509,26861,27023,27128,27277,27485,27540,27562,27577,27589,27970,28005,28019,28249,28322,28521,28602,28727,28808,28978,29088,29092,29116,29146,29153,29169,29512,29620,30064,30123,30188,30231,30238,30257,30292,30410,30614,31315,31465,31698,32266,32374,32377,32462,32546,32681,32703,32714,32716,32755,32764,32820,32900,32906,33161,33222,33367,33402,33413,33477,33823,34042,34191,34265,34269,34329,34377,34612,34720,34922,34979,35028,35035,35129,35196,35378,35379,35405,35427,35516,35695,35696,35739,35758,35793,35811,35850,35929,35931,35959,35990,36096,36295,36726,36920,37009,37139,37303,37364,37408,37808,37951,38226,38257,38435,38591,38700,39248,39365,39515,39551,39598,39848,40322,40323,40333,40385,40394,40423,40446,40451,40541,40546,40659,40824],"nǎi":[20035,20535,22902,23341,24316,27670,30099,33407,36858,37346],"wǔ":[20036,20116,20213,20237,20398,20533,20763,21320,21838,22953,23084,23285,24209,24289,24548,24579,25006,25664,27494,28501,29075,29310,29597,29687,29798,29970,30868,33310,36492,36821,36892,38490,40289,40521],"jiǔ":[20037,20038,20061,20067,22906,26470,27747,28792,29590,32036,33295,37202,38265,38893,38894],"tuō zhé":[20039,26452,39346],"me mó ma yāo":[20040],"zhī":[20043,20481,21358,24053,25624,25903,26624,26772,26917,27056,27713,27868,30135,31063,31084,31187,31257,32149,32930,32977,32989,33026,33437,34357,34584,34940,38587,40183,40242,40709],"wū wù":[20044],"zhà":[20045,21668,23473,25662,27048,28320,30148,34481,35408,35784,37281,38661],"hū":[20046,20079,21282,21291,21628,21823,22033,22400,23523,24160,24573,24794,26130,27473,27864,28148,28409,28864,33528,34381,34390,35644,36580,36727,38608],"fá":[20047,20240,20640,22394,22433,22690,22978,26672,27980,30594,31529,31567,32602,32624,32632,34245,38309,38400],"lè yuè yào lào":[20048,27138],"yín":[20049,21535,22102,22170,22273,22432,22820,23148,23493,23806,23839,23855,27309,27557,27903,28139,28379,28878,29374,29434,29836,30797,30866,33654,34089,35348,35354,35361,35518,37150,37405,37504,38134,38698,40419,40806],"pīng":[20050,20444,23049,28036,30009,30767,32864,33397,38953],"pāng":[20051,28354,33006,33174,38641,38710],"qiáo":[20052,20392,20689,23286,24980,26725,27095,27189,27211,27381,29342,30631,30810,30980,33613,33630,34126,34286,35673,36267,37896,38802,38845,39014],"hǔ":[20053,29733,33792,34382,34397,37695,39921],"guāi":[20054],"chéng shèng":[20055,20056,23053],"yǐ":[20057,20059,20197,20506,20591,23327,23866,24050,24225,25158,25914,25980,26065,26070,27301,30691,30994,31510,33315,33380,33505,33506,34433,34712,34811,35071,36390,36642,36697,36888,37199,37332,37400,37487,38023,38999,40166,40814],"háo yǐ":[20058],"niè miē":[20060],"qǐ":[20062,20225,21551,21784,21843,21844,21855,23117,23674,26462,26856,29592,30400,32186,32494,33425,35564,36215,37012,38361],"yě":[20063,20918,22050,22492,22724,28444,37326],"xí":[20064,21946,23219,23949,24109,26938,27268,28445,32722,33990,34989,35186,35233,35275,35637,36248,37067,37812,38576,38699,39105,39473,39485,39528,39996,40155],"xiāng":[20065,21410,24258,24512,27007,27392,28248,29910,31269,31665,32215,32515,33207,33431,33835,33881,34188,35140,37111,37129,37130,37141,38002,38262,39321,39524,39591,40028,40600],"shū":[20070,20495,20496,20789,21460,23005,23575,25234,25491,25669,25860,26360,26530,26803,27166,27530,27571,27641,27642,28113,28717,28930,30094,30095,32019,32128,32446,33298,33789,34092,36360,36567,36664,36755,37123,38478,39835,40296],"dǒu":[20071,25238,26515,34474,37380,38439,38497],"shǐ":[20072,20351,20824,21490,22987,23465,23630,27009,30690,31542,35925,37442,39387,39542],"jī":[20073,20703,20987,21001,21007,21086,21501,21799,21918,21976,22064,22334,22522,22716,23020,23632,23878,23879,25731,25802,26398,26426,26501,27181,27231,27588,28608,29316,29585,29859,30072,30079,30314,30710,30959,31215,31309,31492,31571,31637,31754,32193,32641,32647,32648,32813,32908,33448,34368,35209,35210,35663,35684,35749,36075,36087,36173,36347,36369,36491,36536,37512,37668,37910,37959,37977,38574,38622,38847,38898,39138,39249,39269,39765,40174,40335,40378,40388,40452,40481,40782,40783,40785],"náng":[20074,22178,27420,34864,39266],"jiā":[20075,20339,20642,21152,22025,25272,26551,26780,27616,27847,27971,28025,29324,29491,29640,30146,31539,31960,32798,33141,33901,34952,35949,35985,36303,36838,37483,37813,38227,40208,40602],"jù":[20076,20520,20534,20855,21095,21127,21230,22503,22526,22729,22998,23654,23656,23712,24040,24042,24583,24807,24883,25029,25084,25298,25312,26139,27499,27952,28605,28844,28901,29323,31212,31405,31414,31796,31892,32799,32858,34401,34487,35406,35765,35942,36317,36382,36486,36989,37037,37301,37445,37947,38044,39094,39123,39375,39828],"shí":[20077,21313,22488,22610,23036,23454,23455,23508,23526,23765,23925,26102,26105,26178,27055,28252,28321,28859,31055,31437,34432,34645,36795,36936,37456,39136,39267,39830,39971,40101,40747,40749],"mǎo":[20078,20871,21359,23745,25148,26164,27862,31543,34025,37466,38086],"mǎi":[20080,22058,33644,34130,36023,40438],"luàn":[20081,20098,37344],"rǔ":[20083,25833,27741,32919,36785,37135],"xué":[20084,23398,23416,23747,23976,25992,27894,28585,29154,31348,33555,34965,36357,40445,40500],"yǎn":[20085,20456,20547,20796,20822,20823,21411,21428,22110,23373,23875,24024,24026,24327,24861,25133,25162,25217,25513,25564,26350,26940,27327,27783,28215,28436,29744,29975,30524,32616,33810,34648,34893,35095,36541,36931,37118,38546,39017,39751,39768,39947,40352,40673,40676,40684,40685,40694,40756,40761,40820,40849],"fǔ":[20086,20428,20443,20463,24220,24355,25242,25290,25771,26023,26920,28367,28964,29995,30425,31776,33104,33105,34565,36628,36741,37081,37340,37345,38429,38955,39732,40700],"shā":[20087,21798,26432,26732,27578,27630,29440,30183,30722,30832,32023,32378,32433,34097,35039,37801,38121,38327,39679,39782,39882,39883,40104],"nǎ":[20088,38635],"qián":[20089,20097,20209,20546,21069,22680,23178,23698,25297,25518,27049,27244,27500,28507,28508,28659,28746,31645,33893,34388,36577,37392,37463,37549,37666,37766,38052,38065,38067,38764,39450,39453,39980,40660,40666],"suǒ":[20090,21794,21993,25152,26267,28305,28345,29712,29713,29795,32034,35112,37782,37819,37825,38145],"yú":[20091,20110,20112,20227,20313,22563,22572,22948,23067,23087,23089,23337,23859,23886,23899,24858,25205,25540,26079,26977,26992,27014,27428,27464,27487,27510,28180,28189,28257,28417,28574,29263,29427,29591,29593,29788,29877,30402,30574,31404,31485,31813,32685,33140,33278,33281,33286,33349,33584,33838,33848,34125,34331,34398,34422,34643,34744,34919,35093,35238,35278,35547,35619,35840,36400,36671,36701,36926,37016,37201,37725,38533,38611,38633,39192,39296,39455,39596,39619,39770,39779,39869,39922,39941,40060,40416,40454,40821],"zhù":[20092,20267,20295,20303,22398,22712,22772,23872,25280,26492,26609,27174,27574,27880,28855,30128,30493,31069,31081,31450,31599,31672,31723,31767,32053,32056,32443,32668,32741,33486,33671,34496,35387,36015,36142,36307,36596,37458,37619,37956,38136,39349,39376,39547],"zhě":[20093,32773,35126,35189,36205,36407,37754,38167],"qián gān":[20094],"zhì luàn":[20095],"guī":[20096,22317,22955,23215,23266,23296,24112,24402,25707,26909,27131,27132,27383,27512,29674,29808,29853,29900,30344,30625,30789,33573,34348,35215,35268,37053,37068,38312,38394,39465,39734,39737],"lǐn lìn":[20099],"jué":[20101,20915,21012,21122,21303,21413,22090,23378,23379,23835,23851,23973,24399,24992,25008,25092,25225,25367,25496,25899,26743,27227,27228,27438,27666,27770,28749,28979,29094,29201,29236,29237,29527,29571,29606,29608,29647,29812,30234,30669,30689,30724,32085,32118,32477,33220,33461,34141,34152,34419,34792,34793,35286,35310,35324,35363,35662,35776,35890,35996,36221,36233,36471,36521,37388,37901,37917,38017,38242,40194,40195,40418],"le liǎo":[20102],"gè mā":[20103],"yǔ yú":[20104,25049],"zhēng":[20105,20290,20967,22979,23196,23781,23837,23842,24449,24496,28833,28893,29229,29424,29465,30309,30480,30529,30556,31581,31631,31708,32839,33024,33976,36397,37478,37658,37875,39687],"èr":[20108,21045,21665,24333,24336,27186,35456,36014,36019,36144,39670],"chù":[20109,20631,20746,24629,25015,25616,26038,27484,29695,29729,30679,31436,32064,32460,33221,35302,35320,35926,37136,38310,40668],"kuī":[20111,21042,23743,24011,30420,31397,31418,32871,34407,38362,39005],"yún":[20113,20253,21243,21248,22249,22936,24874,25251,26112,27218,27780,28066,28339,28560,29065,30023,31184,31612,31700,32028,32284,32429,32792,33464,33975,34131,37095,37142,37574,38642],"hù":[20114,20913,21952,22171,23135,23277,23278,23733,24077,24342,24601,25142,25143,25144,25149,25160,25252,26120,27124,27789,27818,28396,29097,29920,31068,31503,31748,31888,32148,34096,35703,35952,37152,37721,38912,40047,40160,40184,40460,40561],"qí":[20115,21080,22524,23696,23699,23822,23900,24877,25489,25993,25994,26050,26071,26826,26827,27313,27328,27495,28103,28637,29449,29570,29734,29738,29826,30054,30119,30849,30869,31041,31048,31098,31141,31442,31791,31793,31823,31928,32165,32166,32949,33040,33229,33385,33450,33793,33813,34162,34244,34308,34449,34458,34548,34589,34590,34727,34832,35072,36573,37183,37358,37665,38172,38509,38926,39040,39438,39439,39481,39568,39569,39696,39743,39893,39981,40111,40141,40312,40320,40594,40609],"jǐng":[20117,20742,21037,21060,22355,23441,24156,25004,26299,27532,27755,27756,28555,29828,29855,29861,31357,32956,34812,35686,38449,38938,38968],"sì":[20118,20288,20385,20777,20821,21987,22235,22994,23088,23392,23546,24051,26614,27065,27740,27863,27876,27917,27936,28056,28675,29293,31040,31145,31458,31525,32796,32898,32902,34172,35223,35972,37362,37430,37435,39140,39164,39282,39391,39427,39543],"suì":[20119,23320,23681,23895,26078,27286,27506,27507,28603,29035,29159,29874,30741,30862,31071,31149,31298,31319,31327,32320,32336,32376,35162,35510,35682,35847,36069,36995,37894,37929,38567,38882],"gèn":[20120,20121,25583,25604,33563],"yà":[20122,20124,20473,20916,21148,22292,22304,22497,23045,23149,25568,27689,27692,29373,30737,31247,32848,35198,35200,35357,35766,36711,36819,40830],"xiē suò":[20123],"qí zhāi":[20125,40778],"yā yà":[20126,21387,22445,22739,38100],"jí qì":[20127,28943],"tóu":[20128,25237,38957,39600],"wáng wú":[20129],"kàng háng gāng":[20130],"dà":[20131,30484],"jiāo":[20132,20716,23047,23308,23783,23957,23971,24973,26898,27975,28550,28966,30977,31322,31781,33014,33184,33202,33581,33582,34121,34400,34527,34797,36324,36679,37066,37902,39509,39556,39851,40091,40257,40422,40430,40554],"hài":[20133,21968,23475,27686,39168,39258,39405,39412,39559],"hēng pēng":[20136],"mǔ":[20137,22982,23764,25287,27597,29281,29299,30018,30022,30034,30045,30046,30062,30762,32991,36359,37479],ye:[20138],"xiǎng":[20139,20143,21709,24819,26193,34435,34817,38911,39144,39177,39255,39287,39837,39895,40054,40094],"jīng":[20140,20144,20834,22357,22361,23131,24778,26060,26061,26230,27256,27902,28039,29444,30555,31188,31241,31923,31934,32076,32147,32161,32857,33096,33550,33606,33610,33729,33871,39514,39912,40120,40321,40324,40598,40608,40753],"tíng":[20141,20572,23159,23881,24237,24311,26975,27059,31603,32868,33691,33910,34579,34639,35562,37010,38662,40750],"liàng":[20142,21928,24738,26238,28280,35538,35845,36620,36635,36742,37700],"qīn qìng":[20146,35242],"bó":[20147,20194,20412,20720,21338,24091,24893,25066,25388,25615,27394,28001,28159,28196,29055,29268,29403,29917,31028,31201,31636,31769,31978,32969,33046,33162,33334,33354,33825,33895,34991,35151,35182,35592,36387,37091,37432,37457,37581,37787,37998,38073,38082,38216,39226,39310,39323,39326,39361,39406,39539,39622,40275,40513],"yòu":[20148,20305,20326,20369,21448,21491,21706,21760,22271,23031,23461,23775,24188,29398,31056,34484,35480,35825,35969,36854,37229,37321,40748],"xiè":[20149,20275,20574,20592,20673,21352,21368,22119,22638,22801,23199,23633,23655,24296,24482,25032,26284,26800,27021,27053,27899,27945,28203,28581,28681,28707,28794,28839,28840,29166,29205,29548,31044,31164,31951,32050,32079,32108,32370,32392,32449,32567,34210,34212,34809,34831,35081,35131,35613,35874,36510,36994,38782,38896,40770,40792,40795,40805],"dǎn dàn":[20150,39358],"lián":[20151,21126,21298,21299,22009,22098,22849,22889,23294,24088,24265,24604,24976,28063,28451,28610,28627,28718,29073,29163,31806,31842,31848,32314,32756,32852,32872,32875,32878,32879,33217,33714,34030,34197,34698,34826,35042,35123,35229,35632,36453,36830,36899,37772,37934,38256,39697,39985,40098],"duǒ":[20152,21722,22194,22517,23836,26421,26422,32158,32525,36243,36529,36530,36547],"wěi mén":[20153,26006],"rén":[20154,20155,20161,22764,24520,24526,26418,31170,33442,39772,40256],"jí":[20156,20157,20235,20342,20590,21337,21363,21373,21450,21469,21513,22578,22601,23006,23241,23692,23924,23983,24438,24547,24613,24881,25122,25572,26497,26840,26987,26997,27081,27293,27547,27762,28242,28503,30142,30240,30349,31496,31679,31821,32026,32423,33164,33381,33978,34112,34170,34637,34703,35147,35289,35899,36374,36432,36516,36655,36698,36753,37062,37537,37715,37878,38598,38631,38709,40545],"wáng":[20158,20220,20838,33699,34463],"shén shí":[20160],"lè":[20162,21499,24519,27707,27856,29583,30771,31765,33403,38430,38903,39182,39987,40051,40147],"dīng":[20163,21486,24068,29582,30100,30447,32821,34416,38762],"zè":[20164,23857,24194,25425,26115,26135,27716],"jǐn jìn":[20165,20677,23268],"pú pū":[20166],"chóu qiú":[20167],"zhǎng":[20169,24165,25484,30979],"jīn":[20170,22587,24062,24781,26020,27941,29650,29755,29857,30747,31563,33621,34943,35167,35284,37329,37330,37375,38021,40566,40645],"bīng":[20172,20178,20853,20907,20912,25508,27703,37618],"réng":[20173,31037,33471,36792,38526],"fó":[20175,22386,26811],"jīn sǎn":[20176],"lún":[20177,20262,20374,20523,22261,22279,23144,23832,23833,26822,27814,28138,30958,33088,33749,34598,36378,36650,36718,37632,38511,39913],"cāng":[20179,20218,20489,20948,23906,27815,28356,28664,29514,33329,33369,33485,33980,34725,40487],"zǎi zǐ zī":[20180],"tā":[20182,22604,23427,27033,28347,29280,31042,35103,36287,36962,38375],"fù":[20184,20585,20613,20904,21103,21648,22399,22797,22919,23142,23181,23316,23500,24489,26929,31060,31139,31438,32238,32283,32538,33145,33839,34151,34489,34519,34652,34670,34973,35079,35204,35206,35331,35394,35747,36e3,36070,36091,36127,36171,36185,36212,36665,37713,37730,38428,38468,39333,39385,39544,39826,39954,40075,40134],"xiān":[20185,20186,20321,20682,20722,20808,22037,22910,23667,24303,24570,25016,25472,26297,26484,27673,29655,31046,31176,31868,32330,32398,32406,33518,35132,35187,36345,36462,36506,37232,37697,38184,38895,38897,39334,40059,40369],"tuō chà duó":[20187],"hóng":[20188,21552,22444,22917,23042,23439,23446,24344,24395,27759,27859,27946,28004,28209,28482,29586,29596,30804,31441,31460,31690,31904,32024,32045,32139,32430,32707,32733,32830,33520,33645,33874,33875,35897,35900,37404,37495,37584,38286,38387,38672,38687,38787,39775,40251,40511,40649,40652],"tóng":[20189,20319,21699,23746,23773,24221,24420,26189,26312,26704,27651,28021,28540,29341,29534,30510,30643,30780,31217,31461,31905,33191,33596,34450,35447,36200,37230,37462,37493,37509,38108,39175,39846,40086],"rèn":[20190,20205,20995,20996,22922,23001,23675,23683,25192,29283,31053,32009,32029,32077,32427,32436,32917,33101,34941,34997,35346,35469,35748,35761,36564,36715,37395,38765,38769,38860,38887,39146,39169,39274],"qiān":[20191,20325,20681,21315,22322,22903,23407,23693,24749,24838,24947,25190,25322,25652,25729,25872,25873,25875,26436,27343,27736,27751,29301,29309,31439,31614,31805,31830,31844,31873,33418,33598,34440,35120,35536,35609,35878,35896,36801,36983,37370,37382,37467,37874,38030,38433,38854,38981,39467,39582,39708,39709,40302,40528],"gǎn hàn":[20192],"yì gē":[20193],"dài":[20195,20386,21447,22408,22509,23729,24082,24102,24111,24118,24279,24608,25140,26307,26571,27526,28731,29619,29767,29977,31780,32063,32255,32464,33372,34675,34955,35190,36003,36151,36443,36561,36570,36585,36714,36840,38708,38726,40207,40667,40689],"lìng líng lǐng":[20196],"chào":[20198,32790,35288],"cháng zhǎng":[20199,20815,38263,38271],"sā":[20200],"cháng":[20201,20607,20767,22039,22160,23270,23581,24120,24476,29818,29946,29982,32928,33144,33171,33484,33799,38264,40040,40127],"yí":[20202,20359,20736,20893,21276,21670,22319,22839,23016,23440,23452,23463,23538,23763,23980,23991,24056,24411,24412,24413,24414,24609,24670,25157,26246,26648,26924,26936,27778,27935,29098,29941,30157,31227,31747,31822,32672,33008,33811,34534,34708,35322,35643,36029,36155,36320,36859,36986,37844,38921,38948,38949,38986,39056,39284,39847,40250],"mù":[20203,20969,21215,22675,24149,24153,24916,24917,26286,26287,26408,26968,27619,27792,28817,29287,29383,30446,30566,31302,33362,33500,33711,34462,37484,38076,38638,38658],"men mén":[20204],"fǎn":[20206,21453,27214,36820],"chào miǎo":[20207],"yǎng áng":[20208],"zhòng":[20210,20247,22585,22933,23185,29382,30526,31052,31575,33597,34459,34886,34934,35557],"pǐ pí":[20211],"wò":[20212,20563,21351,23177,24132,25569,26947,27779,28197,28643,29889,30595,30826,32927,33115,33253,40823,40844],"jiàn":[20214,20468,20581,20717,21073,21091,21105,21133,21134,21138,21140,22713,23499,24314,24484,25846,26068,26967,27645,27914,28071,28567,29294,29652,30647,30965,30976,31661,31947,32349,33137,33270,33328,33382,33616,34214,35256,35539,35563,35675,35855,36046,36068,36145,36253,36341,36368,36410,36702,37492,37747,37749,37937,37969,37970,37996,38003,38190,38291,39198,39279],"jià jiè jie":[20215],"yǎo fó":[20216],"rèn rén":[20219],"fèn bīn":[20221],"dī":[20222,20302,21874,22494,22564,23739,24445,27136,28404,30974,31210,32669,34971,36230,38532,38830],"fǎng":[20223,20515,26058,26121,26136,29932,30470,32033,32442,33323,35370,35775,39651,40365],"zhōng":[20224,21027,22928,24146,24440,24544,26570,27767,27848,28802,30405,31846,32066,32456,33327,34080,34585,34724,34749,34931,34935,36465,37409,37758,37912,38047,38202,40228,40744],"pèi":[20226,20329,23029,24084,26046,26054,27803,28031,29678,34012,36705,36756,37197,38664,39351],"diào":[20228,21514,24340,25481,30265,30404,31374,31413,31464,35339,37347,37407,37553,37629,37955,38035,38110,38655,39777],"dùn":[20229,28513,28822,29129,30462,30744,30903,36402,36871,36929,36975,37389,38045],"wěn":[20230,21006,21563,21573,25222,26749,31283,31311,31337,32010,32947,33047],"xǐn":[20232],"kàng":[20233,21279,22245,25239,28821,37415,38058],"ài":[20236,20734,22631,22738,23250,23329,24859,25043,26279,26326,29233,29815,29862,30375,30649,30777,30795,30861,31001,34182,35706,36089,37952,38552,38729,39218,39332,40043,40241],"jì qí":[20238,34234],"xiū xǔ":[20241],"jìn yín":[20242],"dǎn":[20244,21008,25762,29612,29933,32030,32966,33213,34932,36071,36181,40661],"fū":[20245,21579,23056,23413,23555,24612,25071,25975,26057,29598,30726,31235,31583,31952,32146,32932,33178,33602,33652,34925,36282,36311,37022,37148,37212,37383,40617,40620,40625,40632],"tǎng":[20246,20645,20795,22507,25091,26349,29219,30680,36538,37810,38018,38219],"yōu":[20248,20778,21606,22168,23795,24189,24551,24736,24962,25912,27340,28410,28672,32395,32682,32816,36876,37182,40576],"huǒ":[20249,22821,28779,29047,37033,37413,38060],"huì kuài":[20250,26371,27981,29871],"yǔ":[20251,20417,20451,20554,20660,21292,22131,22276,22281,23431,23513,23679,23996,24254,25383,25940,26014,26944,29760,30224,31076,31161,31333,31411,32701,33287,33837,35984,37125,38952,40588,40812,40841],"cuì":[20252,21851,24560,24756,27635,28140,28960,30121,30209,31425,31883,31929,32035,32183,32710,32736,33027,33030,33082,33196,33205,33230,33795,35146,38983],"sǎn":[20254,20632,31972,32342,39242,39315],"wěi":[20255,20266,20553,20605,20702,20784,23059,23530,23639,23843,23945,24491,24839,25444,26256,26806,27943,27992,28200,28828,29010,29477,29614,29771,30207,32239,32428,33138,33353,33435,33479,33649,33806,33894,33933,34111,34620,35529,35839,36371,37729,38865,38873,38881,38890,38944,39097,39593,39594,39595,39850,40084],"chuán zhuàn":[20256,20659],"chē jū":[20257,20453,36554,36710],"yá":[20258,21393,21395,22544,23688,23829,23830,28079,28420,29273,29601,29706,30554,31500,33469,34460,34905,40790],"qiàn":[20259,20436,20521,20761,21003,22733,23345,24723,26824,26912,27111,27424,27465,30360,31695,31711,32308,33441,33960,34099,36644],"shāng":[20260,20663,21830,22674,24943,27527,27556,28403,28449,29109,34063,34730,35294,35316,35626,39738],"chāng":[20261,20480,23100,26124,26905,28112,29462,29737,33750,35054,37673,38176,38326,38410,39911,40115,40730],"chen cāng":[20263],"xùn":[20264,20378,21314,22080,24058,24061,24455,24891,27529,27582,27739,28512,29413,34120,35338,35347,35353,35757,35759,36805,36863,36874,36956,37954,39016,39348,39535],"xìn":[20265,22239,23390,33066,33291,34885,35371,37313,38432,38998],"chǐ":[20268,20360,21366,21498,21582,22417,24677,27503,32827,32916,32995,34439,35053,35115,35913,37497,40786,40831],"xián xuán":[20269],"nú nǔ":[20270],"bǎi bó":[20271],"gū gù":[20272],"nǐ":[20273,20320,20766,23412,25311,25836,26062,26226,29396,33512,34239,38572],"nì ní":[20274],"bàn":[20276,21150,21322,22981,24593,25198,29923,31194,32070,32458,36774,37473,38781],"xù":[20277,20368,21206,21207,21369,21465,22463,22779,23167,24207,24676,25933,25944,26093,26155,26370,27090,27440,27528,27775,27776,27947,28294,28469,28490,28869,28924,29030,29533,29676,30434,30593,31288,32110,32154,32210,32214,32396,32490,32493,32851,32863,33988,34266,35385,36041,37207,38922,40046],"zhòu":[20279,20733,20881,21610,21650,21678,23449,26172,26205,29955,30385,30394,31808,31826,31829,31897,32002,32272,32419,32457,32964,33646,33892,35403,37198,39374,39519,39588],"shēn":[20280,20353,20831,21627,22548,22973,23072,23678,23799,25183,25938,26321,26587,27680,28145,29130,29637,29985,29991,30003,30482,30775,31356,31862,31864,31938,32051,32453,32601,32615,33888,34017,34072,34195,35025,35383,35445,35804,36523,39402,39891,39925,39994,40121,40290],"qū":[20281,20297,21284,21631,22373,23624,23702,23732,23943,24968,25278,25978,27968,28992,31067,31553,31916,32992,34502,34512,34986,35259,35416,35790,36237,36527,36544,38457,39366,39368,39493,39537,39671,39804,39992,40011,40332,40623,40628,40633,40674],"sì cì":[20282],"bēng":[20283,22051,22879,23849,23917,38285],"sì shì":[20284],"jiā qié gā":[20285],"yǐ chì":[20289],"diàn tián":[20291,38079],"hān gàn":[20292],"mài":[20293,21154,21233,21334,21787,22770,33032,34887,36067,36808,36993,38689,38690,40613,40614],"dàn":[20294,20708,21846,21847,21887,22089,22186,24078,25018,26086,26598,27694,27786,27897,28129,29402,30093,30298,31147,31390,33093,33807,34014,34507,34577,35291,35345,35477,35806,36105,38702,39204,39247,39411,39655,40224],"bù":[20296,21199,21541,21656,22487,22496,24067,24269,24598,24721,27493,27496,27497,29951,31728,33657,34048,36356,37096,37110,37384,38042,39202],"bǐ":[20298,20478,21269,22838,22947,24444,26428,26560,27604,27614,27800,30101,31189,31508,31558,31875,32859,33325,35983,37145],"zhāo shào":[20299],"cǐ":[20300,27492,27866,30345],"wèi":[20301,21355,21619,21890,22683,23206,24944,25024,26410,28205,29023,29101,29338,29484,30031,32237,32635,32963,33535,33739,34287,34358,34655,34737,34907,34910,35133,35586,35718,35727,35859,36503,36507,36558,36682,37839,38696,39207,39221,39254,39759,39815,40154],"zuǒ":[20304,24038,32339],"yǎng":[20306,20639,20859,22385,23711,24899,25065,25857,27687,27697,28852,30162,30306,31010,32059,34630,36590,39178,39386],"tǐ tī":[20307,39636],"zhàn":[20308,20577,23960,25112,25126,25136,26632,26719,26855,28251,31449,32187,32509,33754,34360,34405,34406,35687,36687,39503],"hé hē hè":[20309],"bì":[20310,21639,21716,22006,22354,22555,22721,22896,22972,23138,23318,24065,24163,24164,24199,24243,24294,24330,24379,24380,24387,24517,24621,24842,24846,25949,25987,26768,27605,27606,27609,28258,28375,28397,28535,29007,29082,29428,29528,29529,29644,29863,30016,30050,30122,30201,30202,30357,30564,30887,31578,31621,31622,31718,31731,31882,32188,32298,32372,32636,33143,33534,33628,33798,33822,34006,34045,34109,34204,34572,34960,35141,35166,35171,35313,35414,35792,36017,36116,36177,36344,36437,36483,36484,36991,37042,37160,37162,37453,37838,37940,38091,38279,38281,38303,38381,38491,38880,39158,39238,39325,39388,39494,39616,39763,39813,40413,40425,40714],"tuó":[20311,22376,22582,23726,27094,27216,27825,30755,30756,30882,32061,35409,36302,37217,38436,38464,38465,39389,39390,39464,39506,39517,39548,39808,40213,40501,40713,40717,40743],"shé":[20312,33292,34421,34533],"yì dié":[20314,26163,27846,36604],"fó fú bì bó":[20315],"zuò zuō":[20316],"gōu":[20317,27807,28317,30144,31709,31804,32241,32529,34983,35104,37390,37476,38057,38834,38877],"nìng":[20318,20395,20543,23509,27870,28573,28632],"qú":[20322,21164,25141,26026,27403,27412,27661,28141,28744,29216,29846,29865,30319,30962,31847,32071,32970,33246,33731,33867,34134,34343,34781,34871,34876,34896,34914,36515,36581,38010,40221,40476,40498,40745],"yōng yòng":[20323],"wǎ":[20324,21651,30745,37047],"kǎ":[20327,22448,33001,35011,37490],"bāo":[20328,21241,21253,23394,29042,31523,32990,33502,34132,35046,35090,35139,38337,40793,40837],"huái huí":[20330],"gé hè":[20331],"lǎo":[20332,21694,24645,26675,29419,29679,30803,32769,32770,33622,34543,36689,37536,38097,39857],"xiáng":[20333,24224,26649,31077,32116,32724,35443,36333],"gé":[20334,21260,21572,21981,22629,24837,25356,25663,27077,27338,28358,33160,33269,33558,35297,35581,36661,36693,38307,38401,38548,38839,38864,38874,39444,39612,39855],"yáng":[20335,21175,22431,23864,24457,25196,25562,25965,26104,26140,26264,26472,26954,27915,28800,29660,30113,30221,30523,34520,35577,36656,37722,38038,38438,38451,38525,38711,39098,39119,39953,40249,40457],"bǎi":[20336,25453,25670,25850,26658,30334,31457,31912,35180],"fǎ":[20337,23772,27861,28747,30749,37701],"mǐng":[20338,20949,23027,24911,37225],"èr nài":[20340],"hěn":[20343,24456,29408,35434],"huó":[20344,27963],"guǐ":[20345,21286,21293,21420,22429,23037,23428,24203,24234,24657,26231,28224,30328,31082,31755,34539,34785,35300,35437,35809,36556,36712,38482,39740],"quán":[20346,20840,21875,22498,23038,23761,24015,25331,25660,26435,27006,27177,27402,27849,27940,28278,29303,29320,29780,30154,30786,31564,32275,33603,33906,34615,34872,35296,35438,35808,36327,36385,36615,36737,37275,37523,38120,38350,39028,39079,39401,39457,39688,39937,40136,40804],"tiāo":[20347,24227,26091,31079,32846],"jiǎo":[20348,20748,23362,25378,25605,25759,25785,25898,25963,25981,25983,26184,26270,26322,28762,29150,29409,29868,30350,30374,32094,32400,32478,33139,33259,34780,35665,36043,36363,37496,38128,39171,39290,40014,40867],"cì":[20349,21054,24219,26431,26664,27425,32088,33574,33727,34515,34694,36060,36176],"xíng":[20352,21009,21720,22411,23065,24418,27920,30798,34549,37026,37065,37379,37494,37522,38040,38095,38473,38488,39219],"tuō":[20354,21635,21660,22315,25176,25301,25302,27729,33067,33073,33676,34981,35351,35756,39141,39270,39776,39861],"kǎn":[20355,20568,20890,22350,24770,30733,33712,36641,36695,38993],"zhí":[20356,20516,20540,22516,22519,23018,23298,25120,25191,25709,26893,27188,28116,28432,30452,31107,32119,32310,32832,32844,32887,33201,34777,36310,36399,36448,36497,36548,37342,39357],"gāi":[20357,22419,23007,23760,26192,30049,31092,33604,35442,35813,35941,36037,36044,36165,38484],"lái":[20358,20459,20488,23811,23821,24242,26469,26814,26870,28062,28150,29453,29724,31577,31618,33713,33802,36904,37106,37688,38140,39435,39904,40326,40627],"kuǎ":[20361,21685,22446,37529],"gōng":[20362,20844,21151,21265,21268,22632,23467,23470,24037,24138,24339,24685,25915,26459,30909,31996,31999,32945,35301,35317,36524,36531,39672,40852,40858],"lì":[20363,20432,20458,20616,20782,20791,20947,21033,21147,21169,21237,21382,21385,21412,21423,21426,21459,21519,21590,21774,21811,22182,22215,22364,22619,22754,23091,23151,23668,23718,24743,24759,24900,25150,25646,26278,26310,26334,26424,26533,26627,26647,26651,27306,27348,27370,27408,27508,27511,27813,27828,28054,28327,28671,28701,29199,29345,29441,29653,29806,29893,29905,29925,30124,30178,30311,30445,30553,30725,30778,30782,30975,31018,31019,31024,31154,31197,31435,31520,31717,31890,31901,31986,33079,33480,33560,33620,33669,33673,33946,33950,34294,34488,34510,34528,34599,34679,34823,34851,35400,35720,36210,36706,36707,36729,37192,37469,38582,38583,38643,38722,38731,39681,40168,40215,40389,40604],"yīn":[20364,20944,21905,22142,22233,22240,22420,22553,23035,23139,24852,24903,26678,27684,27911,28341,28646,30230,31115,31221,31555,32106,32248,33589,33937,34093,35008,35570,37542,38111,38345,38437,38452,38512,38523,38530,38674,38688,38791,38899,38910,39408,39555,40791],"mǐ":[20366,23370,24365,25929,27939,28211,28758,31859,31886,32651,33042,33416,33886,34077,37540],"zhū":[20367,26666,27104,27237,27367,27371,27929,28532,28710,29482,29664,30787,31228,32081,33585,34127,34523,34667,34857,35006,35461,35576,35803,35832,35948,36326,37054,37526,38114,39407,39842,39930,40248,40708],"ān":[20370,20579,23189,23433,23766,24245,26697,27688,30438,30443,33124,33780,33851,33866,34029,35485,35571,35865,38796,38797,38909,39331,39839,40298,40341,40524],"lù":[20371,20679,21198,21216,22309,22388,22646,23101,23757,24280,24404,24405,25134,25693,26882,27162,28117,28133,28172,28425,28510,29741,29840,29994,30429,30569,30793,31103,31108,31249,31307,31635,31759,31788,31797,31798,31833,31926,34061,34135,34370,34736,36034,36162,36258,36335,36379,36439,36613,36678,36738,36760,36911,37249,37636,37682,37684,37876,38520,39428,39484,39909,40252,40294,40305,40442,40557,40575,40595],"móu":[20372,21178,24648,30520,34513,35584,35851,36366,37738,40254,40624],"ér":[20373,20799,20816,20818,23759,26669,27919,31915,32780,33017,33611,35003,36608,36700,38481,38573,39669,39838,40085,40239,40504],"dòng tǒng tóng":[20375],"chà":[20376,22908,23033,23700,27722,35435,35815],"chì":[20377,20666,21189,21201,21489,21883,24435,24668,24919,24975,25048,25270,25941,26021,26456,28225,28795,28861,28926,29118,30163,30200,30235,32708,32709,32740,32744,33119,36196,36265,36971,37459,38644,39149,39276,40338,40408],"gòng gōng":[20379,20849],"zhōu":[20380,21608,21900,24030,24479,27954,28109,28863,28880,29656,30698,33311,35589,35704,35788,36057,36178,36616,36630,36736,36913,37102,37506,38668,39410,39430,40259,40508],"rú":[20382,20754,22149,22914,23340,23418,24100,26328,26695,28202,28641,31566,33593,34144,34231,34657,34837,35005,35174,37018,37305,37539,38135,39020,39077,40044,40209,40253],"jiàn cún":[20383],"xiá":[20384,20448,21283,23777,23805,25966,26247,26585,28832,28890,29390,29421,29433,29672,29781,30806,30820,30892,31083,31594,32278,32712,33309,33338,34168,36206,36676,36758,36944,37724,37771,38492,38527,38686,39458,39803,40375,40672],"lǚ":[20387,20406,20770,21525,21570,23649,23650,23653,25364,25435,26053,26784,28946,31075,31238,31341,32125,32311,32533,33154,33168,35099,35128,37080,37569,38109],ta:[20388],"jiǎo yáo":[20389,20709,24506],"zhēn":[20390,20597,23498,24103,24106,24128,25656,26015,26722,26984,27035,27196,27549,27976,28254,28519,28597,29513,29645,29646,29799,29956,30494,30495,30759,30890,31087,31118,31131,31668,32983,33275,33908,33942,33985,34237,35998,36126,36675,36937,37209,37341,37441,37681,37756,38024,40053],"cè zè zhāi":[20391,20596],"kuài":[20393,20744,20983,21721,22130,22310,22359,22602,24028,24293,24555,26077,27443,29423,29546,31607,31977,33037,33214,37072,37174,40032,40089],"chái":[20394,20757,21901,26612,29362,31073,35962],"nóng":[20396,20738,20892,21725,22117,27266,27393,27987,28611,29174,31151,31230,31328,33043,33215,34173,35163,35688,36786,36787,37298,39710],"jǐn":[20397,20760,21370,21418,24057,27135,28428,29822,32039,32202,33771,34035,35641,35880,37670,38182,39241,39313],"hóu hòu":[20399,30694],"jiǒng":[20400,20690,20879,22247,27842,28547,28847,28913,29018,29019,29106,29147,31384,32151,35111,36837,36872,38984,39054],"chěng tǐng":[20401],"zhèn zhēn":[20402,25557],"zuò":[20403,20570,21777,22352,23709,23710,24231,31066,31987,32985,33859,33860,34009,34959,38460],"qīn":[20405,20819,23175,23898,23956,27453,34942,35483,38054,38985,39416,39566,39868],"jú":[20407,21881,23109,23616,24008,26888,27224,27878,28119,28264,28951,29329,29386,31927,33738,34332,36252,36348,36459,36610,37113,38320,39414,39527,40281,40308,40362,40752,40755],"shù dōu":[20408],"tǐng":[20409,22306,23063,25402,28047,28918,29693,33057,33351,35476,38962,39051],"shèn":[20410,24892,24910,26138,28033,28183,28402,30214,30254,30488,31091,32958,32962,33060,33102,34563,34564,37600],"tuì tuó":[20411],"nán":[20413,21891,23066,25257,26260,26511,26591,26976,30007,30040,33710,33843,36950],"xiāo":[20414,21715,22069,22203,22210,23115,23471,23477,24232,24391,25585,26541,26549,26783,27385,27466,27594,28040,28487,28703,28785,28786,28875,28935,29447,29538,30170,30175,30813,30819,31385,31659,31768,31787,32131,32481,32731,33198,33831,34157,34376,34387,34754,34767,34800,34856,36355,36877,37559,38144,38660,39093,39501,39553,39623,39632,39752,40222,40245,40397,40494],"biàn pián":[20415,32246,32527],"tuǐ":[20416,33151,36422,39613],"xì":[20418,21304,21324,21612,22669,23619,23635,23661,24549,24620,24644,26910,28509,28511,28569,29058,29332,30966,31114,32048,32140,32280,32454,32484,33283,33284,34158,34409,34891,35236,36201,36231,37092,37363,38411,38553,38559,38716,39228,39273,39721,40662],"cù":[20419,23208,25009,29469,30212,30255,31751,32300,33064,34079,35470,36247,36391,36415,36441,36468,36469,37259,39011,40704],"é":[20420,22254,23077,23753,23784,23785,28048,29684,30354,30539,30912,33706,35355,35472,35660,35769,36823,37387,37608,38151,38943,38989,39069,39780,40285,40286,40517],"qiú":[20421,21492,21778,22234,23863,24047,24048,25167,26754,27535,27628,27714,27731,27845,27991,28269,29034,29360,29580,29699,29830,30387,30426,32012,32127,32909,33409,33677,34412,34415,34551,35032,35283,35305,35332,35333,36053,36167,36878,36881,36946,37195,37338,37371,37558,38916,39810,39876,39997,40765],"xú":[20422,24464,31121],"guàng kuāng":[20423],"kù":[20424,21950,22195,24211,24235,24292,30228,32093,32468,34996,35044,35122,37239],"wù":[20425,21153,21209,21247,21372,22366,22626,22886,23162,23524,23676,23689,23912,24546,24734,24735,24750,25098,25188,26212,26444,28329,28944,29059,29289,30182,30713,31417,31877,34305,35492,35823,37576,38434,38550,38654,38682,38695,38768,39446,39579,40361,40540,40767,40768],"jùn":[20426,20737,21569,22472,23535,23803,25039,25411,25887,26201,26846,29127,29690,30063,31459,31647,34592,36048,37089,38486,39189,39298,39423,39567,40276,40277,40280],"liáng":[20429,22682,26753,26891,27153,31918,31921,31975,33391,36652,36748],"zǔ":[20430,21800,29244,31062,32068,32452,35419,35781,37818,38459,38779],"qiào xiào":[20431],"yǒng":[20433,21191,21192,21647,22471,22606,23921,24430,24634,24703,24704,24805,24849,24889,24898,26593,26640,27704,27891,28263,29996,34553,35424,36362,36404,39890,40108],"hùn":[20434,20529,22274,23585,24897,25485,28343,28957,30580,35304,35554,35816],"jìng":[20435,20665,22659,22924,23129,23143,24362,24371,24452,24465,25964,26324,26737,26807,27972,28702,29517,30153,30169,31454,31455,31467,31478,31480,33003,33051,33686,35497,36353,36851,36885,37857,38236,38742,38745,38748,40283],"sàn":[20437,38288],"pěi":[20438],"sú":[20439],"xī":[20441,20694,20846,20958,21349,21376,21560,21775,21821,22075,22095,22193,22805,22874,23302,23305,23638,23904,24007,24076,24454,24495,24687,24713,24725,24769,24796,26132,26206,26224,26227,26342,26512,26744,27069,27176,27200,27447,27685,27728,28e3,28101,28179,28330,28911,28929,28936,28959,29060,29064,29081,29113,29114,29115,29160,29204,29306,29312,29344,29351,29707,30236,30361,30542,30630,30717,30802,30926,30978,31232,31352,31416,31902,31974,32198,32357,32690,32725,32726,32952,32953,33181,33342,33667,33765,33952,34597,34693,34763,34869,35199,35321,35325,35327,35654,35903,35904,35944,35951,35989,36197,37020,37134,37189,37295,37368,37675,37869,37898,38004,38177,38581,39183,39246,39291,39889,40279,40450,40759],"lǐ":[20442,23052,23778,23794,26446,27418,28012,28583,29702,31036,31150,31924,35023,35041,35914,36902,37008,37300,37616,38146,39881,40039,40049,40100,40162],"bǎo":[20445,22562,23212,23453,23514,23539,23542,29668,32229,33862,34293,35091,36082,38732,39161,39165,39281,39362,40181,40199,40488],"yú shù yù":[20446],"sì qí":[20447],"xìn shēn":[20449],"xiū":[20450,20462,21691,24229,27143,28876,32670,33049,33065,33273,35973,37533,37760,39117,39240,39312,39652,39673,39860,40003,40258,40506],"dì":[20452,20569,20672,22474,22673,22700,23075,24093,24607,26099,26762,28941,29587,29963,30513,30535,30898,31094,31128,31532,32224,32532,33123,33730,33922,34069,34627,34669,34734,35558,35867,36406,36882,36883,36958,36976,37482],"chóu":[20454,20756,23334,24774,24833,25060,26662,29181,30068,30087,30359,31264,31609,31820,32082,32162,32504,33751,35446,35726,35728,36364,36490,37223,37228,37307,38612,38624,38630],"zhì":[20455,20587,20776,21046,21141,22401,23073,23512,24089,24092,24159,24226,24228,24268,24408,24463,24477,24535,24558,25061,25067,25347,25370,25527,25711,25842,26072,26186,26234,26633,26702,26813,27341,27355,27835,27959,28365,28382,28399,28492,28676,28825,29099,29438,29464,29839,29894,30164,30179,31017,31057,31209,31223,31258,31290,31305,31378,32041,32251,32622,32720,33187,33267,33268,33430,34541,34975,34976,35069,35231,35287,35311,35318,35468,35921,35922,36013,36074,36100,36136,36157,36337,36396,36499,36618,36734,37061,37517,37589,37973,38106,38183,38495,38578,38601,39396,39469,39482,39495,39576,39919,40217,40409,40503],"liǎ liǎng":[20457],"jiǎn":[20461,20537,20745,20943,21098,22591,24383,24389,25129,25132,25315,25400,25441,25536,25791,26535,26604,26776,26816,26908,27298,28187,28245,28733,29776,30545,30652,30839,30897,30982,31509,31591,31616,31777,32120,32365,32742,33575,34246,34834,35045,35143,35145,35194,35395,35591,35629,35710,35883,36284,36423,37911,39691,39950,40568,40571,40572],"huò":[20464,21663,22191,22207,22895,24416,24785,25110,25837,26084,26340,27316,27790,28273,28694,29554,30312,30483,30672,31096,31117,31339,31394,32815,33243,33383,33719,33958,34303,34838,35595,36008,36135,37699,37962,38252,38616,38669,38723,38852],"jù jū":[20465,25454,37624,38191],"xiào":[20466,20634,21177,21682,21742,21880,22027,22056,22063,23389,25928,25989,25990,27479,28045,29117,31505,35432,35487],"pái":[20467,24472,29260,29348,29445,31792,31794,36651],"biào":[20469,39998,40148],"chù tì":[20470],"fèi":[20471,21077,21406,21536,23645,24223,24259,24290,26162,26314,27360,27832,28663,29394,30280,32954,33801,36027,36153,37928,38212,38507,38725,40739],"fèng":[20472,20964,22857,28247,28968,29e3,36085,36183,40175,40179,40204],"ǎn":[20474,21813,22511,25566,32623,37544,38133],"bèi":[20475,20493,20573,20601,20633,20675,22791,24726,24811,24834,24970,26113,26774,28953,29292,29333,29384,29437,29692,29746,30874,31129,31954,33501,34003,34557,35097,35997,36125,36592,36649,36744,37046,37093,37121,37575,37950,38049,38785,38836],"yù":[20476,20773,21893,21929,21947,22495,22537,22954,23255,23507,23786,23950,24253,24423,24481,24840,24958,25131,26161,26843,26844,26859,27378,27406,27421,27442,27603,28020,28143,28394,28495,28582,28778,28980,29020,29135,29152,29225,29425,29508,29577,29721,30217,30290,30753,30818,30834,30983,30998,31004,31142,31191,31266,31286,31741,31838,31858,31894,32206,32621,32895,32896,33352,33419,33420,33567,33966,34019,34041,34167,34316,34591,34606,34988,35029,35465,35565,35709,35861,35947,36553,36621,36915,36935,36985,37057,37287,37434,37578,37669,37933,38064,38334,38408,38628,38705,38928,39044,39147,39239,39275,39341,39496,39533,39728,39729,39739,39754,40010,40191,40229,40231,40234,40274,40440,40466,40518,40556],"xīn":[20477,22138,22945,23324,24286,24515,24516,24571,24798,26032,26133,26490,27427,27462,28824,30458,34218,35362,36763,37028,37386,37573,37995,38156,39336,39339],"hǔ chí":[20479],"jiù":[20483,20710,21267,21275,21302,21417,21646,23601,24260,24271,24272,24934,25412,25937,26087,26601,26622,26709,27405,27559,30106,33276,33285,33290,39910,40434,40555,40596,40808],"yáo":[20484,20636,21954,22426,22575,23002,23217,23591,23597,23779,23970,23972,24493,25594,25622,25671,25727,26266,27043,28391,28881,29243,29498,29671,29796,29814,30936,31377,31407,31408,32948,34344,35616,35617,35875,36602,36730,36953,36965,37006,39012,39099,39126,39174,39194,39977,40025,40144],"cuì zú":[20485],"liǎng liǎ":[20486],"wǎn":[20487,21773,23113,24779,25405,26202,26213,26217,26236,26778,26880,29740,30073,30358,30412,30871,32169,32176,32510,33048,33814,36384,36627,37588],"zǒng":[20490,20588,20655,23928,24635,24803,25460,25603,25696,29162,32207,32235,32258,32317,34007],"guān":[20492,20851,23448,26874,30237,30287,31396,33924,38306,38359,38364,39973,40030,40143],"tiǎn":[20494,21818,24541,24767,26218,27524,28127,30547,33094,33300,35237,35277,36063,37674,39170],"mén":[20497,25194,25451,29834,33755,34379,37702,38036,38272,38277,38376],"dǎo dào":[20498],"tán tàn":[20499,22510],"juè jué":[20500],"chuí":[20501,22402,22464,25462,25637,26712,26864,27084,31648,33092,33753,37656,37786,38180,38514,38976],"xìng":[20502,22995,23134,23353,24184,24615,24763,26447,28076,32200,33238,33607,33685,33877],"péng":[20503,20656,22620,22643,24376,24969,25408,26379,26842,26902,27173,30844,31261,31484,31735,32388,33192,33411,34028,34325,34778,34779,34998,36643,37643,37981,38904,38908,39471,39676,39685,39700,40300,40527],"tǎng cháng":[20504],"hòu":[20505,21402,21518,22421,22560,24460,27913,33577,35934,36869,37064,39836,40031,40078,40088],"tì":[20508,21059,22159,22164,23625,23644,24716,24720,24789,24790,25147,25510,26367,26385,27474,27554,28053,29899,31545,31818,34201,35077,36886,36919,39664,39680,39684],"gàn":[20509,20942,24185,27046,27274,28134,28776,30448,32058,32448,35404,36113,36195,39597],"liàng jìng":[20510,38739],"suī":[20512,21752,22794,28374,28617,30509,30562,33429,33661,33662,34429,38614,38806],"chàng chāng":[20513],"jié":[20514,20604,20625,21030,21031,21052,21163,21180,21353,21354,23125,23211,23377,23690,23848,23909,23995,24e3,24175,25130,25463,25526,25838,26117,26466,26480,26688,26717,26988,26998,27044,27905,28368,28500,29412,30571,30989,31469,31680,32687,33709,34037,34531,34576,34840,34846,34877,34929,35002,35344,35440,35505,35750,36373,36860,37475,37755,38268,38945,39834,40082],"kǒng kōng":[20517],"juàn":[20518,21173,22854,24955,26698,28099,29431,29543,30519,30538,30560,32109,32121,32482,32613,32642,33091,34088,37124,39179],"zōng":[20519,22571,23447,23887,23893,24830,26401,26837,26934,29095,29475,30955,32195,32746,33113,33916,34668,35957,36392,36394,36452,37712,37953,39436,39459,39572,39683,39689,39735,39918,39932],"ní":[20522,22381,22527,23612,23636,24617,28131,29450,31870,32867,34477,34618,35308,35982,36316,36631,37107,37422,38092,38675,39324,39906,40117,40593,40815],"zhuō":[20524,25305,25417,26700,26802,26817,26867,27093,28095,31399,37935],"wō wēi":[20525],"luǒ":[20526,21062,26346,30256,30323,33245,33999,34819,35064,36534],"sōng":[20527,20935,23040,23847,23913,24250,25021,26494,26496,26537,26583,26789,27303,28126,28621,30841,33752,39686],"lèng":[20528,22542,24867,30550,36380],"zì":[20531,21082,23383,24675,28173,28460,29304,30501,30502,32980,33022,33258,33569,33634],"bèn":[20532,22348,25465,25770,28160,31528,36905],"cǎi":[20536,21835,23111,24425,25505,26828,27613,30572,32181,36340,36393],"zhài":[20538,20661,23528,30261,30758],"yē":[20539,21524,22094,25832,26253,26928,27467,28529,34862],"shà":[20541,21820,21922,27459,31633,32732,32739,33808,38319,38670],"qīng":[20542,20670,21375,22282,23496,27682,27691,28152,28165,34619,36605,36629,36731,37100,37638,37963,38737,38738,39894],"yīng":[20544,22052,22111,22198,23156,23190,23240,23344,23366,23422,24869,25732,25878,26400,26716,27185,27387,28214,29008,29681,29787,29838,29908,29959,29974,30884,31023,32211,32403,32492,32552,32578,32579,32588,33210,33521,33722,34337,34663,34867,35118,35707,36047,36552,37965,38195,38681,38906,40236,40337,40359,40367,40426,40441,40462,40474,40550,40560],"chēng chèn":[20545,29231],"ruǎn":[20548,26378,29772,29888,30877,31005,33117,36575,36653,36719,38446],"zhòng tóng":[20549],"chǔn":[20550,24823,30582,33846,34850,36080],"jiǎ jià":[20551],"jì jié":[20552],"bǐng bìng":[20555],"ruò":[20556,21458,23926,24369,26953,28971,29191,31660,31707,33979,37120,39961,39983,40376],"tí":[20557,21399,21884,21953,23865,28477,29765,30588,31157,31242,32249,32519,32612,34139,35078,35605,36263,36420,36431,37261,37719,38988,39064,39456,39863,39927,40128,40284,40420,40520],"wēi":[20558,21361,21940,23041,23193,23990,24013,24494,24836,25547,25595,26931,26994,28326,28883,29032,29168,30291,32261,33896,33907,34183,34610,34651,35235,35444,36918,38535,38536,38714,39939,39940,40130],"piān":[20559,22248,23205,26948,29327,31687,32745,37698],"yàn":[20560,21388,21421,21761,21933,22152,22181,22576,22943,23026,23306,23359,23476,24421,24422,25957,26191,26277,26325,26339,28383,28750,28756,28775,28777,28948,28976,28977,29078,29124,29290,29458,30746,30831,33395,33398,33399,35214,35267,35326,35578,35724,35742,35866,35891,35923,35924,36107,36119,36189,36549,37184,37245,37308,37317,38593,39181,39260,39440,39443,39476,39511,39520,39564,39731,40171,40200,40243,40387,40432,40798],"tǎng dàng":[20562],"è":[20564,21262,21374,21380,21597,21666,22121,22441,22538,22574,23691,23871,24261,24746,24853,25145,25212,25636,25657,25820,27374,27486,27514,28226,29735,30728,30736,30790,33133,33482,33852,34138,34437,34625,35240,35556,35725,35860,35935,36571,36598,36717,36940,36943,36987,37122,37418,37716,37993,38199,38440,38456,38942,38990,39066,39187,39209,39295,39952,39978,40055,40132,40346,40535,40771,40822],"xié":[20565,21232,21327,21332,21963,22437,22858,24650,24886,25337,25658,25783,25813,25847,25884,26012,26090,29057,29170,32138,32243,32256,32556,32723,32961,33029,33031,33035,33166,34658,34938,35181,35559,35735,35856,38795,38837,40868],"chě":[20566,25199,25766],"shěng":[20567,28219,30490],"chā":[20571,21967,25184,25407,25554,25591,30080,33279,33366,37535,37732,38200,39223],"huáng":[20575,20976,21924,22573,22708,23187,23858,24488,24822,27003,28255,29004,29530,29789,29852,30272,30343,30970,31316,31681,31783,33358,33887,34647,34789,35579,36266,36945,37728,37892,38205,38541,38905,39213,39452,39945,40017,40135,40428,40643,40644],"yǎo":[20576,21676,23161,23438,23686,26483,26620,27034,28308,29397,31365,31368,33280,33517,38340,39445,40405,40809],"chǒu qiào":[20578],"yóu":[20580,23588,24238,24611,27787,27833,27999,28216,29369,29494,29495,30001,30115,31198,32940,33692,33720,34133,34480,34659,35367,36623,36662,36912,36938,37038,37109,37438,38080,39360,39799,39819,40063,40073],"xū":[20582,22687,23213,23299,26952,27432,27476,29176,30110,30449,32135,32259,32379,32997,34150,34391,34394,34395,34641,35015,35343,35377,35549,35651,35870,37968,38656,38920,39035,39036,39497,39706,39750,39766],"zhā":[20583,21747,25263,25363,25592,25699,27165,28195,30390,35312,35655,40772,40775],"cī":[20584,30133,34816,36224,39604,39626,40825],"bī":[20586,23620,26949,27636,35917,36924,39951,40126,40278],"xún":[20593,22106,23547,23563,23755,24033,24309,24490,24642,25559,25907,26092,26442,26642,26730,27187,27957,27988,28527,29125,29142,29667,29845,30019,32003,33600,34803,35426,35810,37161,40015,40024,40095],"cāi sī":[20594],"duān":[20595,23183,31471,35085,37748],"ǒu":[20598,21528,22036,32806,33122,34117,34261],"tōu":[20599,20600,37742],"zán zá zǎ":[20602],"lǚ lóu":[20603,20674],"fèn":[20606,20712,22859,22894,24325,24575,24868,24996,28725,30611,31182,31914,31966,33209,40029,40124],"kuǐ guī":[20608],"sǒu":[20609,21468,21471,22014,27362,30605,34222,34282],"zhì sī tí":[20610],"sù":[20611,20723,21961,22608,22609,22809,23242,24875,24991,27041,27150,27157,27536,27869,28049,28335,28344,28506,28517,29578,29663,29851,31756,31899,31903,32032,32292,32899,32901,33158,34060,34263,35307,35380,35606,35785,35873,36250,36444,36895,36961,36972,37577,39191,39500,39573,40016,40427,40532],"xiā":[20612,28998,30606,34418,35898,39084,39957],"yuàn yuán":[20614,23195],"rǒng":[20615,20887,23426,27652,36597],"nù":[20617,24594],"yùn":[20618,23381,24701,24818,24864,24909,26527,33130,34164,34176,34292,34314,35102,35999,36816,36939,37075,37126,37213,37270,37278,38871,38878,38901,38907,39211],"gòu jiǎng":[20619],"mà":[20620,22044,27050,30576,31043,31137,32629,38273,39393,39554,39701],"bàng":[20621,22621,26834,29604,31254,33365,33953,34607,35607,35876,37770,38225],"diān":[20622,21415,23918,24005,24019,24020,25474,25895,25921,27079,28359,30315,30322,36430,39002,39003,39072,40827],"táng":[20623,21776,21882,22371,22530,22616,25642,26848,27062,28303,28447,29051,29805,30916,31135,31702,31939,31958,31963,33157,33179,33998,34711,34739,36207,36412,37132,37283,37781,38554,39225,39236,40374],"hào":[20624,21728,24655,26122,26150,26215,26272,26276,26285,26317,28009,28111,28564,28751,28765,30355,30364,30366,30369,30373,32791,32853,34179,34399,37143,39013,39074,39965],"xī xì":[20626],"shān":[20627,21024,21034,21116,22328,23665,25403,25639,26613,27270,28536,28568,29053,29414,29642,31512,32319,32692,32694,33056,33314,33439,34923,36314,36565,37014,38282,39877],"qiàn jiān":[20628],"què jué":[20629,22470],"cāng chen":[20630],"róng":[20635,23222,23238,23339,23481,23797,23896,23992,25102,25608,26343,26628,27029,27054,27061,27623,28342,28700,28927,29076,29416,29794,31297,32104,32466,32674,32924,33561,33592,33635,33993,34686,34701,34702,34833,35107,37780,38229,39397],"tà tàn":[20637],"suō":[20638,21766,21965,21990,23057,25677,26731,26797,30531,31761,31764,32679,33679,34001,36246,39867],"dǎi":[20643,27513],"zài":[20644,20750,20877,22312,25175,27909,36617,37224],"gǔ":[20646,21476,21842,23603,24882,27030,27070,27753,28104,28658,28692,29295,30391,30396,30444,30653,31296,32607,32662,32929,33077,33228,34211,34506,34865,35393,35778,36674,36903,37431,38068,39222,39305,40723,40724],"bīn":[20647,23486,24428,25996,26901,28392,28626,28657,28661,28693,32381,32548,34408,35945,35955,36051,36052,37024,37964,38228,38694,39022],"chǔ":[20648,20786,26485,26904,26970,26990,27290,28619,29876,30784,30990,31111,34389,40813,40828],"nuó":[20649,20794,25386,26779,27232],"cān càn":[20650],"lěi":[20651,20769,21437,22418,22593,22744,22760,27344,28741,30295,30667,30922,31016,32786,34124,34174,34271,34365,34845,35460,35716,35796,38008,40467],"cuī":[20652,20951,22676,23828,23903,24923,25703,27057,29525,30954,37849],"yōng":[20653,21960,22665,22725,23262,24248,24305,24949,25317,25793,28413,28745,29253,30152,30293,30320,33219,37013,37114,37144,37854,38235,38605,38621,39252,40005,40153,40411],"zāo cáo":[20654],"sǒng":[20657,23927,24578,24730,24879,24939,31462,32824,32883,39415],"ào":[20658,22387,22407,22714,22881,23279,23705,23728,23988,25034,25817,28595,37834,39489,39580],"qī còu":[20662],"chuǎng":[20664,30946,38358,38383],"shǎ":[20667,20749],"hàn":[20668,22462,24717,25022,25182,25421,25750,25788,26097,26200,26293,27721,28038,28450,28698,28938,29442,30356,30533,32752,33695,33761,34559,34605,34706,35648,36634,37356,37554,37582,38615,38967,38980,39060,39419,40382],"zhāng":[20669,23260,24352,24373,24432,24926,26290,27167,28467,29520,29835,31456,31931,34049,34769,36967,37155,37873,39206,39487,40006,40606],"yān yàn":[20671,22677,23342],"piào biāo":[20676,39584],"liàn":[20678,22556,23201,24651,25088,26973,27539,27566,28229,28491,28592,28722,28860,29001,29779,32244,32414,32451,33840,37676,37706,37832,38142,39946],"màn":[20680,22657,24148,24930,26364,28459,28599,29107,29516,32309,32550,34052,34352,37156,37853,38232],"tàn tǎn":[20683],"yíng":[20684,21942,22603,23348,25869,27001,27391,28289,28299,28386,28486,28633,28634,28660,28677,28699,28704,28719,28752,28764,29074,29151,29801,30401,30408,31132,31837,31855,32264,33556,33639,33721,33828,33829,33830,33854,34021,34240,34509,34631,34687,34722,34821,35597,36111,36194,36814,37795],"dòng":[20685,20923,20941,21160,21205,23003,25113,25359,26635,26847,28265,30800,33e3,33012,33110,36853,38680,39399],"zhuàn":[20686,21869,22208,22559,25776,28791,29777,31686,33118,33923,35144,35668,39244,39316],"xiàng":[20687,21224,21521,22190,23008,23953,26319,27233,29670,32575,34771,34902,35152,35937,37900,38917,39033,40012],"shàn":[20688,21892,22688,22689,23319,25797,25982,26923,27199,27482,27733,28759,30109,30960,32341,32558,33203,34798,34810,35349,35590,35697,35754,36109,36193,36216,37167,37925,39245,39480,39583,40019,40020,40157],"tuí tuǐ":[20691],"zǔn":[20692,22082,25753,35664],"pú":[20693,21261,22308,22691,28654,29531,29854,30632,31321,33670,33744,33769,33889,33969,33970,36108,37242,37879,38244],"láo":[20695,21171,21172,21214,21744,23810,23959,24997,26405,28022,29282,30184,30278,31362,31785,37290,37906,38137,39007,39645],"chǎng":[20696,21424,24288,25950,26166,27653,37625],"guāng":[20697,20809,21667,22425,23023,27960,28782,28823,28826,28827,28897,29654,33009,33578,36612,37543,40646],"liáo":[20698,22073,23293,23525,23534,23582,23658,23930,23962,23963,24299,24960,25977,26296,27217,29536,29849,30103,30274,31426,31773,32346,32557,32842,33163,33195,34260,34783,35906,36095,36440,36797,36988,39113,39630,40431,40553],"dèng":[20700,20979,22705,23965,27336,30634,30964,35252,37011,37159,38565],"chán zhàn zhuàn":[20701],"bō":[20704,23955,25320,25765,25773,27874,28298,29627,30326,30411,30773,30854,31009,32573,33760,34992,36467,37474,38069,39185,39293,39499,40013],"huì":[20705,21295,21321,21913,22034,22166,22298,23314,23533,23670,23671,24407,24409,24410,24507,24666,24693,24800,24935,24979,25075,26214,26291,27109,27230,27269,27352,27719,27851,28377,28499,28905,29172,29545,29860,30650,30794,31229,31330,31730,32117,32362,32472,32729,32765,33631,34087,34137,34184,34185,34794,35439,35496,35569,35667,35711,35763,35826,36036,36159,37932,38368,38419,38759,38958,39018,39058,39215],"chuǎn":[20706,21912,33307,33608,36403],"tiě jiàn":[20707],"sēng":[20711,39705],"xiàn":[20713,20724,21743,22455,22634,23021,23050,23466,23704,23796,25010,25738,26203,27212,27258,28032,28695,29486,29563,29616,29694,30476,30541,31919,31982,32100,32171,32218,32447,32528,32673,32680,33146,33236,33277,33483,33703,35490,35919,37607,37646,38480,38501,38519,38704,39201,39301,40626,40760],"yù jú":[20714],"è wū":[20715],"tóng zhuàng":[20718],"lǐn":[20719,20955,20956,24297,24298,25037,25044,25755,27265,27305,28575,30299,30301],"gù":[20721,20933,22266,22540,23827,23854,25925,26767,26845,29311,30204,31099,37678,38178,38599,39015,39038,39901,40116],"jiāng":[20725,22723,23004,27263,27565,27743,30037,30085,30995,32366,32560,32734,33587,33857,34193,34688,34751,35911,38849,40002,40137],"mǐn":[20726,20922,21025,21188,24751,24829,24845,24924,25003,25279,25923,25935,25967,27887,28515,30399,31522,31549,31778,34848,38292,38313,38389,38397,39989,40152,40701],"jìn":[20728,20954,22116,22157,22672,22743,22935,23335,25634,26185,26187,26499,27555,27989,28024,28301,28613,28636,28908,29025,29180,29710,29800,29878,30433,31090,32265,32537,33641,34254,35250,35280,36078,36112,36166,36817,36827,36914,38771,40829],"jià jie":[20729],"qiào":[20730,23789,24105,25772,27579,31373,31429,35482,35822,36488,38487,38825,38866,39642],"pì":[20731,23218,23251,23617,28604,29971,30088,35692,38370,40447,40458],"sài":[20735,31802,36093,36187],"chán tǎn shàn":[20739],"dāng dàng":[20741,24403,38371],"xuān":[20743,21927,22599,23191,23459,24835,24843,25550,26125,26244,29002,29014,29764,30587,30670,31140,31662,32743,32766,33841,33842,34002,34175,34300,34320,34646,34825,35552,35580,35678,35862,36562,36713,37753,39421,39962],"dān dàn":[20747,25812,30213],"càn":[20751,28591,28799,29158,29864,31922,34194,35634],"bīn bìn":[20752],"án àn":[20753],"tái":[20755,22382,23343,25260,25825,27311,28849,28850,31817,33274,34233,36294,37040,39089,39824,40080],"lán":[20758,20848,22226,23146,23706,23888,24177,25318,25876,26003,26005,26639,27396,27415,28572,28734,28742,28769,29155,29175,29884,31726,31811,31843,32383,33915,34013,34253,34347,34349,35124,35157,35172,35188,35197,35659,35733,35888,36509,37997,38247,38348,38417,38858],"nǐ yì ài yí":[20759],"méng":[20762,24170,26330,26406,27223,27308,27659,28309,28635,29965,30015,30431,31006,33384,33684,33804,34116,34427,34673,37171,37176,38719,38720,39021,39259,39885,40463,40562],"níng":[20764,20957,21659,22144,23331,26592,27235,27320,29406,29552,32845,32889,34228,37967,39713,40459],"qióng":[20765,21357,23430,24824,24972,26703,27241,28970,28973,29026,29069,29756,29898,30552,31351,31353,31406,31430,31547,31559,33340,33557,34257,34285,34537,34540,36217,36331,37019,37518],"liè":[20768,20925,21015,21155,21181,22482,22483,23028,23771,24036,25362,25449,26677,27916,27990,28872,28910,29037,29347,29454,29471,29557,32855,33055,33570,34522,36244,36496,36862,39090,39707,39715,39844,40050,40247],"kuǎng":[20771,22844,25069],"bào":[20772,21245,22577,24513,25253,25265,26323,29190,29350,33762,34403,34475,35961,37451,37988,38087,39602,39665,39825,40077],"biāo":[20774,22658,24150,24426,26631,27161,28398,28684,29083,29186,29451,30253,30950,33176,33237,35620,36102,37858,37987,38230,38259,39086,39095,39110,39111,39112,39114,39121,39129,39130,39531,39561,39647],"zǎn":[20775,20793,22086,25861,26141,36273,36274],"háo":[20779,21989,22071,22097,22158,22741,26883,27612,27627,28640,29510,29524,31443,31815,34461,34836,35705,35946],"qìng":[20780,20938,24198,24950,27366,28650,30851,30956,32580,38744],"chèn":[20781,22187,27015,27372,30114,34924,35183,35734,35894,36225,36226,40787,40788,40832],"téng":[20783,24144,28373,28443,30140,31824,31832,32290,33150,34276,34373,34723,35466,35588,36998,39398,39472,39523,39975],"lǒng lóng lòng":[20785],"chán chàn":[20787],"ráng xiāng":[20788,21239],"huì xié":[20790],"luó":[20792,25886,26916,27407,29473,29568,31657,31854,32599,32645,33078,33121,33821,34367,34746,35260,36923,37007,37837,38012,38179,38233,39264,39486,39512,39585,40449],"léi":[20797,23256,27281,27417,29891,30078,32306,32397,32413,32551,32589,32696,34050,34354,34374,36704,37939,37976,38253,38647,38721,40041,40762],"nàng nāng":[20798],"wù wū":[20800],"yǔn":[20801,21911,22845,25230,27538,27550,29377,30930,33658,36081,37399,38445,38504,38549,38691,39355,40811,40819],"zān":[20802,27253,31786,31790,31948,37909,37919,40292],"yuán":[20803,20870,21407,21409,21429,22253,22278,22286,22290,22291,22435,22636,23220,23236,25588,27038,27052,27260,27358,27781,28274,28304,28306,29232,29480,29503,31502,32227,32257,32536,32689,33554,34199,34653,34671,34696,34945,35108,35612,36677,36757,37005,37031,37211,37416,37809,39477,39789,40354,40368,40703,40715],"xiōng":[20804,20807,20982,21250,21256,21701,24567,24671,27769,27958,33015,33016,33422,35369,35454,35771],"chōng":[20805,22019,24545,24963,24999,25679,27798,28026,29675,32639,32704,33282,33375,33594,34909,36438],"zhào":[20806,22423,26064,26316,26523,27330,29031,29171,29411,30654,31498,32576,32617,32644,32897,32903,32904,35412,35791,36213,36249,39841],"duì ruì yuè":[20810,20812,20817],"kè":[20811,21051,21184,21194,22529,23060,23458,24682,24857,27690,28312,30886,32217,32514,33360,34889,35506,35838,37633,38174,39437,39570],"tù":[20814,20820,22541,36812,40309],"dǎng":[20826,25897,27411,35681,35740,35872,40680],"dōu":[20828,20832,21783,27255,31740,34104],"huǎng":[20836,22875,24140,24627,24653,26180,28862,29056,32296,35428,35594,35854],"rù":[20837,21973,23223,25174,26433,27955,28349,32287,32539,34e3,35109,40176],"nèi":[20839,27677,27678,37655],"yú shù":[20842],"liù lù":[20845],han:[20847,29235],"tiān":[20850,22825,23126,28155,37215,38740,38749,40647],"xīng xìng":[20852],"diǎn":[20856,22200,22860,23152,25951,26915,28857,30872,33959,34119,36398,40670],"zī cí":[20857],"jiān":[20860,20927,22223,22362,22533,22904,23014,23015,23574,24181,24804,25099,25108,25627,26942,27179,27388,27516,27569,27570,28244,28688,28728,29006,29086,29112,29259,29770,30583,31003,31031,31546,31627,32216,32273,32516,32547,32937,33392,33393,33733,33786,33868,33977,34090,34129,34163,34371,35708,35932,37999,38595,38831,38848,38857,39216,39330,39956,39964,39993,40099,40146,40273,40307,40380,40547,40585],"shòu":[20861,21463,21806,22781,22784,23551,25480,29417,29539,29560,30185,30246,32172,32502,33156],"jì":[20862,20864,21058,21092,21137,21219,22358,22413,22600,22931,23395,23490,23492,24301,24401,24475,24524,24760,24782,25083,25216,26081,26082,26083,26280,26281,26305,26782,27285,27317,27918,28419,28424,28721,30197,30304,31133,31273,31287,31300,31306,31335,32e3,32153,32318,32331,32380,32487,32489,32637,33262,33456,33549,33572,33898,34015,34055,34186,34318,34350,34363,35034,35136,35244,35274,35336,35352,35467,35745,35760,36321,36349,36447,36857,38469,38555,38657,38717,39525,39589,39675,39742,39773,39781,39898,39933,39990,39999,4e4,40045,40090,40107,40267,40401,40780],"jiōng":[20866,20875,22384,22491,25155,34319,34324,39369,39403],"mào":[20867,20880,23202,24125,24855,25035,26259,26581,26969,27639,29761,30339,30474,30592,32772,33538,33850,34640,34980,35218,35980,36031,36152,37146,37166],"rǎn":[20868,20873,22988,23203,26579,29635,33490,33925],"nèi nà":[20869],"gāng":[20872,20910,21018,21083,22536,22589,23713,25478,25667,26849,29288,29317,30104,32177,32434,32568,32577,32609,32923,37357,37792],"cè":[20874,20876,21397,21408,22824,24257,24699,24827,24993,25927,27979,28204,31527,31574,31582,31604,31651,33629,33815,33844,34011],"guǎ":[20878,21072,21102,21479,23521],"mào mò":[20882],"gòu":[20883,21826,22392,22434,22815,22816,23230,24384,25606,25728,26500,27083,29049,35247,35279,35389,35436,35807,36092,36141,36952,38602],"xǔ":[20884,21923,26250,26665,29661,30440,31944,35425,35583,35817,37158,37265],"mì":[20886,20906,22055,22611,23483,23494,23770,24130,24142,24166,24637,27027,27154,27329,27752,28135,28405,28446,28631,29072,32643,34084,34588,35219,35220,35227,35269,35600,35879,40719],"yóu yín":[20888],"xiě":[20889,20905,34267],"jūn":[20891,21531,22343,26750,27758,30386,30392,30393,30853,33689,34448,34944,35232,36557,37406,37505,37534,37717,38055,38965,39862,40106,40591],"mí":[20894,25823,28720,29218,29461,29564,31074,31152,32315,33982,34252,34346,34364,34990,35448,35598,36855,37274,37310,37311,37316,38270,40461,40586,40587,40603],"guān guàn":[20896,35212,35251,35264,35266],"měng":[20897,21200,25077,25529,29467,29556,33355,34594,34835,37683,38192,39917,40710],"zhǒng":[20898,22618,23600,27505,28996,30215,32959,33131,36405],"zuì":[20899,23989,26220,26368,26668,27100,27271,27276,31101,32074,32618,34142,36768,37204,37243,37257,37642],"yuān":[20900,21064,22246,23357,23491,26857,28149,28161,28166,28170,28181,28737,30498,32921,33918,33964,34574,34613,39372,40182,40219,40311,40482,40499,40531,40728,40733],"míng":[20901,21517,26126,26269,26393,27040,27962,28319,29501,30464,30515,30609,33559,34719,35245,35450,37133,37528,38125,40180,40483],"kòu":[20902,21481,23484,23495,25187,25922,28401,31387,31576,31750,34098,34107,37350,40391],"tài":[20909,22826,22835,24562,24577,24907,27760,27761,27888,28313,32957,33318,37214,37414,38043],"féng píng":[20911,39342],"chōng chòng":[20914],"kuàng":[20917,22329,22745,23730,25068,26103,26175,26336,26694,27841,29196,30486,30518,30719,30783,31014,31340,32075,32086,32394,32425,36026,36150,36582,37021,37178,37489,37595,37979,40651],"lěng":[20919],"pàn":[20920,21028,21467,27804,27886,28351,28813,29257,30036,30460,32833,34978,35195,35402,37612,38011,38934,40293],"fā":[20921,24386,27831,30330,30332],"xiǎn":[20924,23583,23584,23812,23982,24176,25863,26174,27382,27624,28774,28877,29177,29405,29443,29547,29550,29569,31122,31557,31666,34259,34330,34476,34566,35683,36219,36323,37708,38505,38522,38570,38853,38997,39023],"qià":[20926,22326,24098,24688,27534,27965,30792,32994,39618],"jìng chēng":[20928,20936,28136],"sōu":[20929,21974,24256,24267,25436,25628,25673,28338,29504,33368,33936,34699,37131,37273,37802,38204,39100,39125,39231,39306,39466],"měi":[20930,23172,23226,23309,23876,25396,27598,27599,28028,28220,29144,32654,36542,37762,38209,40675],"tú":[20931,22259,22270,22294,22295,22615,23648,23801,23902,24233,24284,24466,24711,25580,28034,30223,31585,33135,33660,33956,36351,36884,37236,37423,37710,39327,39420,40268,40351,40395,40437],"zhǔn":[20934,20950,22523,28310],"liáng liàng":[20937,28092,37327],"diāo":[20939,20993,21023,21500,22877,24372,24427,27720,29745,30857,31763,34413,34497,35970,37677,38613,39817,39899,40119,40304,40742],"còu":[20945,28234,33120,36659,36751],"ái":[20946,21824,22026,25457,28336,30284,30353,30362],"duó":[20953,21099,22842,22890,30181,36401,37420,37944,38094],"dú":[20959,21301,23355,26911,27357,27568,28060,29261,29272,29322,29346,29420,29544,29892,30398,35067,35501,35712,35743,35908,36117,37654,37983,38855,38883,38885,39475,39633,40681,40695],"jǐ jī":[20960],"fán":[20961,20962,20963,21285,22694,26443,26569,26853,27146,28735,28902,29033,29140,29856,30718,31020,31538,31861,32208,32691,33316,33319,34208,34345,34844,35150,36463,37353,37895,37922,38034,40429],"jū":[20965,21258,23093,23150,23621,23820,25221,25398,25516,26798,26896,27275,27625,27633,27843,28090,29401,29722,30141,30752,32605,33106,33357,34587,35070,35530,36308,36376,36537,38513,38606,38816,38827,39378,39545,39816,40225,40331],"chù chǔ":[20966,22788],"zhǐ":[20970,21159,21675,22336,22375,24075,24649,25210,25351,26088,26547,27490,27750,27802,27924,28157,30139,30731,31049,31190,32025,32440,33463,33547,34274,34937,35175,35368,36286,36601,36725,37231,38447,40697],"píng":[20973,20980,21615,22378,22592,23740,24097,24114,24136,24179,24959,24977,26544,27956,28969,29622,29942,29953,31470,31667,31752,32574,33619,33805,34033,34482,34530,35413,35780,36607,36647,37105,39811,40070],"kǎi":[20975,20977,21056,21108,22450,22607,24698,24887,24936,26271,33928,36614,37703,37799,38112,38196,38355,38399,39101],"gān":[20978,22377,23602,23604,23606,23607,26577,27860,28455,29589,29976,30131,30712,31487,31608,31891,32925,33527,36800,37200,39760],"kǎn qiǎn":[20981],"tū":[20984,22551,23936,25464,28043,28261,30172,31167,31171,31361,33878,37621,40282,40757],"āo wā":[20985],"chū":[20986,21021,23680,25716,27019,27159,35993,40803],"dàng":[20988,22325,22449,22731,26723,27284,27705,29847,29949,30442,30602,30720,30893,30993,31772,33633,33770,34153,34351,36260,36927,38652],"hán":[20989,20990,21547,22277,23074,23506,23841,26199,26770,27995,28085,28559,28947,29696,29981,31592,34604,37015,37039,37601,38867,38889],"záo":[20991,38015],"dāo":[20992,20994,24521,27672,33312,34729,37334,39771,40061],"chuāng":[20997,25680,29262,29269,30126,30241,31379,31383,31419],"fēn fèn":[20998],"qiè qiē":[20999],"kān":[21002,21208,22570,25121,26654,40853,40859],"cǔn":[21004,24534],"chú":[21005,21416,24174,24282,27249,27337,27365,28353,29331,31720,32801,33467,33954,33965,34573,34805,35936,36238,36464,36487,36501,37455,37604,38148,38500,38607,38619,40373],"huà huá":[21010],"lí":[21013,21075,21114,21145,21400,21937,22175,22212,23264,23415,24306,24737,26792,26808,26819,28435,28757,29313,29314,29432,29709,29827,29896,30432,30557,31163,31346,31472,31587,31729,31852,31950,32301,32545,32633,33347,33650,33758,34016,34110,34268,34362,34570,34765,34808,34859,35125,35623,35981,37288,37611,37637,37867,37975,38626,39530,39562,39887,39916,40058,40097,40313,40477,40514,40654,40679],"yuè":[21014,23347,23684,23731,23997,24689,24709,24742,25097,25224,25459,26376,27198,28729,29210,29605,31039,31156,31703,31814,31845,31856,31908,31925,34341,34446,34447,35500,36234,36288,36291,36493,36559,37381,37470,38e3,38074,38321,38322,38405,40465,40473,40678,40864],"liú":[21016,21129,22176,23225,23911,26056,26066,27060,27210,27969,27983,28687,29705,29792,29804,29858,30020,30041,30065,30081,30244,30277,30827,33957,33989,34761,35031,37775,37840,37890,38240,39104,39109,39127,39392,39413,39470,39505,39581,39969,40377,40544,40589],"zé":[21017,21063,21863,22038,23271,24123,24152,25246,27149,27509,27810,27854,28333,30367,30612,30688,30987,31654,31744,33332,34102,34828,35159,35630,36094,36188,36846,40453,40794,40816],"chuàng chuāng":[21019,21109],"qù":[21022,21434,21435,38324,38339,38418,40622,40705],"bié biè":[21029,21035],"páo bào":[21032],"chǎn chàn":[21036,21079,24157],"guā":[21038,21120,26736,27460,29041,29916,32973,36411,39082,39091,39463,40240,40505],"gēng":[21039,24218,26921,28013,28991,30026,32090,32686,32697,32789,33774,36065,36179,40330,40530],"dào":[21040,22133,24764,26913,27300,29182,29913,30423,30428,31282,31291,32411,32767,33364,33791,34908,34911,36551,36947],"chuàng":[21041,21071,21081,24582,24884],"kū":[21043,21741,22288,22528,26543,26701,30715,31391,36301,37056,39607,39852],"duò":[21044,21057,22703,23598,24816,24988,25349,26711,33333,36325,36346,38474,38479,39167,39283,40317],"shuā shuà":[21047],"quàn xuàn":[21048],"chà shā":[21049,21070],"cì cī":[21050],"guì":[21053,21055,21130,21132,25740,25904,26123,26690,26914,27126,27195,27331,29476,31148,31552,34005,35160,36020,36149,36330,37888,37966,38844,40022,40037],"lóu":[21061,23044,23105,24276,27004,27155,28295,28426,29089,32807,32812,33371,33932,34078,34684,34747,35633,36545,36977,38843,39621,39631],"cuò":[21065,21074,21405,22798,25387,25514,26852,33693,33697,33996,36906,37564,37679,38153,38169],"xiāo xuē":[21066],"kēi kè":[21067,23557],"là lá":[21068],"tī":[21076,26799,36386,37563,38161,40392,40393],"pōu":[21078],"wān":[21084,22598,22762,24117,24367,24398,28286,28523,28771,30549,34623,35916],"bāo bō":[21085,21093],"duō":[21087,21636,21702,22153,22810,22811,25479,27634,30035,35056],"qíng":[21088,21197,22813,24773,25806,26228,26258,26878,27144,27296,27696,29984,30808,33885,40677],"yǎn shàn":[21089],"dū zhuó":[21090],"yān":[21094,23267,23846,23958,24697,25045,25064,27182,28106,28153,28473,28895,28937,28945,29017,29658,31734,33005,33241,33784,37154,37251,38329,38409,40683],"huō":[21096,21136,21529,25865,31220,32800,38186,39454],"shèng":[21097,21104,21213,22307,22701,23882,26208,27066,27251,29726,32854,34114,36025,36088],"duān zhì":[21100],"wū":[21101,21596,21978,22316,23627,24043,24345,26439,27469,27737,27738,27745,27967,28879,31375,31676,34704,35464,35491,35820,37036,37140,37794,38056,39966,40238],"gē":[21106,21733,22314,24385,25096,25107,25128,27468,28370,29365,32912,35004,35596,37814,40218,40255,40509],"dá zhá":[21107],"chuán":[21110,26295,26941,31685,33313,33321,33337,36658,36932],"tuán zhuān":[21112,28441,31743],"lù jiū":[21113],"pēng":[21115,21257,22061,24614,24690,25256,26760,28921,30768,36591,39373],"piāo":[21117,21217,24915,26074,29349,32754,34741,39107,39108,39128,39762],"kōu":[21118,24388,25248,25715,30477,30616,33444],"jiǎo chāo":[21119,21131,21222,25719],"qiāo":[21121,21226,22685,24167,25970,27207,27587,29126,30807,30973,32337,36268,36343,36365,36474,36475,37115,37153,37157,37739,37740,37936,38201,38941],"huá huà":[21123],"zhā zhá":[21124],"pī pǐ":[21128,24706],"tāng":[21135,22049,32688,34202,34666,36442,38842,40734],"chán":[21142,22197,22757,23157,23307,24009,24283,26830,27610,28281,28537,28538,28598,28685,28730,29016,29521,30939,32254,32399,32402,32544,33388,34633,34768,34796,34814,35479,35730,35863,36500,37181,37185,37579,38001,38261,39262,39307],"zuān":[21143,36508,36518,37446,37978],"mó":[21144,23275,23332,23351,23579,25721,25845,27205,31970,33180,34278,34321,35624,35625,35871,39235,39261,39309,39629,39764,39801],"zhú":[21146,26040,26351,27416,28767,28834,28891,29165,29221,30211,31481,31489,31516,33331,33599,34027,34827,34878,36485,36880,36907,38019,40001],"quàn":[21149,21223,21240,29302,38863],"jìn jìng":[21156,21170,21185],"kēng":[21157,22353,29308,30785,30812,35481,37557,37726,37847,38143,38444],"xié liè":[21158],"zhù chú":[21161],"nǔ":[21162,24361,30766,33004],"shào":[21165,21362,21736,28530,32057,32164,32461,34961,37045],"miǎo":[21168,26474,28156,28218,30471,31186,31694,32242,32520,34256,37e3],"kǒu":[21174,21475],"wā":[21176,22380,23090,23207,23666,25366,25896,27964,28315,28453,29950,30038,31349,31370,31402,34521,38856,40707],"kuāng":[21179,21281,21289,21712,24647,27949,31568,31610,35462,35795,36589,37052],"hé":[21182,21642,21853,22976,23750,25926,26359,26567,26945,27644,27827,28088,28206,28565,29062,30380,30407,30409,30413,30418,31166,31701,31866,31917,32750,33743,33794,35208,35384,35429,37059,37339,37452,37961,38305,38356,38402,38422,38824,38940,39172,39288,39802,40534,40615,40789,40833,40866],"gào":[21186,21567,21578,23804,31086,31088,31134,31606,35493,35824,37084,37615,38150],"bó bèi":[21187],"láng":[21190,23247,24266,25999,26745,27028,27139,27444,29436,29701,29807,30816,31234,33350,33992,34571,34690,36532,37074,37086,37571,37807,38162],"xūn":[21195,21211,21234,21235,22161,22339,22489,22628,22734,22758,26331,29179,29551,30660,32385,33232,34219,34224,34317,37306],"juàn juān":[21196,29945],"lè lēi":[21202],"kài":[21203,28812,28887,37774],"wěng yǎng":[21212],"qín":[21220,21994,22105,23964,24200,25027,25028,25446,25810,26035,27278,28607,29665,29748,29753,30269,31165,31206,32825,33449,33465,33766,34707,34820,37401,37419,38594,38770,40185,40301],"jiàng":[21221,21278,21280,23929,24348,24374,25726,27364,27930,28400,29343,31969,31976,32115,32475,35645,37233,37284,37292],"fān":[21227,23311,24070,24161,24539,24995,26073,26075,32345,32763,34281,36691,39103,39132,40021],"juān":[21228,23010,23071,25424,28051,34866,35024,37816,37931,38220,40515],"tóng dòng":[21229,28884,29137,29418],"lǜ":[21236,22415,23874,24459,24942,27695,28388,28670,29192,31675,32160,32322,33183,33870,34385,37986],"chè":[21238,22396,24443,24505,25507,25764,28552,28898,29217,30638,30825,32837,36832,38937],"sháo":[21242,29631,38902],"gōu gòu":[21246],"cōng":[21254,22250,22257,24553,24625,24740,26288,27180,28439,29821,29825,30619,31733,32369,32865,32870,32874,32880,33473,33552,33905,34031,34085,34764,37743,37843,37862,39448,39492,39586],"táo yáo":[21259,38518],"páo":[21263,21638,22409,24214,29230,29389,34957,35100,36595,38788,40581],"dá":[21266,22962,24603,28831,29173,30051,31530,32653,33625,34200,34813,35418,36798,36815,36822,36826,36921,36948,37949,38780,38801,38851,40854,40856],"huà huā":[21270],"běi bèi":[21271],"nǎo":[21272,22452,22550,23248,24700,24745,24817,29785,30895,33041,33075,33126],"chí shi":[21273],"fāng":[21274,22543,26041,28115,29285,33459,37025,37377,37690,38059,40203],"zā":[21277,21634,24064,27806,33244,33250,36810,37460,39795],"qiè":[21287,21394,22974,24623,24719,24812,24860,25352,31317,31363,31434,31521,31655,31691,31841,36389,37733,38194,39900],"zāng cáng":[21288],"fěi":[21290,22876,24753,26832,27047,31706,32737,34140,35513,35837],"kuì guì":[21294,21297],"suǎn":[21300],"pǐ":[21305,22141,22189,22318,24192,30174,30294,33076,33481,37538,40196],"qū ōu":[21306,21312],"kē qià":[21308],"yǎn yàn":[21309,26858],"biǎn":[21310,24828,25561,30885,31272,31366,34250,35082,36022,36140,40216],"nì":[21311,22532,23263,23354,24772,24885,26165,26289,27708,30500,30568,32268,32978,33147,33193,36870],"niàn":[21316,21816,22493,24319,24565,24791,33356],"sà":[21317,27346,33038,33832,34159,34217,37394,38561,39087,39122,39354],"zú":[21318,21739,23850,26063,31652,36275,36388,38238],"shēng":[21319,21583,22768,26008,26119,26363,26529,27525,27881,28262,28986,29298,29636,29983,29989,31444,31513,32882,37454,37727,38441,38494,38521,40319,40746],"wàn":[21325,21328,24552,26468,30627,33045,33109,33836,34755,36110,36624,37693],"huá huà huā":[21326,33775],"bēi":[21329,24754,25593,26479,26734,30403,30865,34275,40303,40526],"zú cù":[21330],"dān shàn chán":[21333,21934],"nán nā":[21335],"shuài lǜ":[21339],"bǔ bo pú":[21340],"kuàng guàn":[21341],"biàn":[21342,21464,22793,23749,24321,24487,24557,25219,26154,27763,27764,29603,33361,33476,35213,35546,35722,36769,36775,36776,36777,36779,36782,36783,36941,37318],"bǔ":[21343,21754,25429,34917,35036,40468],"zhàn zhān":[21344,35249],"kǎ qiǎ":[21345],"lú":[21346,22183,22406,22746,24208,24300,26341,26534,26636,27368,27896,28696,28809,29200,29561,29576,29904,30439,30673,31834,32401,32591,33002,33242,33326,33339,33387,33446,34310,34854,36708,36723,37417,37994,39025,39045,39359,39639,39794,40056,40072,40469,40492,40696],"lǔ":[21348,22647,25523,25796,27152,27257,27347,27660,28407,28571,28674,30837,30944,31326,33379,33386,34046,34383,34396,37824,37930,37989,38245,39791,40065,40565],"guà":[21350,21865,25346,25499,32611,35074,35455,35798],"áng yǎng":[21356],"yìn":[21360,22461,22583,24277,24941,24982,24983,25050,27925,28250,29452,30282,32996,33562,37235,39843],"què":[21364,21371,22617,23813,24747,24872,24932,25609,27063,29161,29751,30389,30830,30906,31021,38347,38421,40306,40522],"luǎn":[21365],"juàn juǎn":[21367,24059],"chǎng ān hàn":[21378],"wěi yán":[21379],"tīng":[21381,21403,21548,24193,24304,24307,27712,28867,28916,32142,32787,32884,32892,32893,38803],"zhé zhái":[21383],"hàn àn":[21384,23677],"yǎ":[21386,21782,24204,30166,30210,34149],"shè":[21389,21401,24381,24913,24948,25086,25666,27399,28041,28091,28169,28384,28740,31038,33294,34062,34818,35373,35774,36198,39431,40605],"dǐ":[21390,21607,22360,24356,25269,25310,25483,29300,30757,33767,35293,35398,35787,36583,37048,38458,39606,39923],"zhǎ zhǎi":[21391],"páng":[21392,23246,24222,24492,33152,33341,34691,36868,39967,40145,40846,40848],"zhì shī":[21396],"máng":[21398,21506,21732,23055,24537,24702,26455,26471,27730,27997,29307,30173,30450,30829,31488,33426,33579,34313,37017,37359,37609,38099,39417],"zuī":[21404,27190,32407,34773],"shà xià":[21414,24264],"áo":[21419,22007,22008,24274,25942,28406,29522,29523,29832,32753,32758,32762,32881,34076,34735,35639,35640,36968,37846,38558,39986,40140,40404,40711],"lán qiān":[21425],"sī mǒu":[21430],"gōng hóng":[21431],"lín miǎo":[21432],"qiú róu":[21433],"dū":[21438,22047,30563,37263],"xiàn xuán":[21439,32291],"cān shēn cēn sān":[21442,21443,21444,21445],"ài yǐ":[21446],"chā chà chǎ chá":[21449],"shuāng":[21452,23360,23367,27398,31029,33389,38617,38684,39483,39526,39590,40414,40472,40564],"shōu":[21454,25910],"guái":[21455],"bá":[21456,22957,25244,25300,28838,30329,32968,33543,33757,35417,36299,36599,39747,40741],"fā fà":[21457],"zhuó yǐ lì jué":[21461],"qǔ":[21462,23094,31468,34682,35411,40818,40843],"jiǎ xiá":[21466,24486],"wèi yù":[21470,23561,34074],"dié":[21472,22436,22558,23756,24137,24654,24821,25116,26337,27548,27662,29251,29266,29918,30067,30082,30089,30090,30879,32112,32470,32778,32779,32965,33363,33525,34600,34678,35083,35396,35548,35853,36334,36416,36845,38267,39944,40125,40233],"ruì":[21473,26520,27757,29790,30591,33454,34443,34617,37555,37613,38160],"jù gōu":[21477],"lìng":[21478,21604,28841,34342],"dāo dáo tāo":[21480],"zhī zhǐ":[21482],"jiào":[21483,21580,22018,22054,22093,23315,25997,26016,28376,28438,29541,29651,30381,31382,34272,35334,35685,36269,36611,36686,36735,36739,37237,37294,37314],"zhào shào":[21484],"kě kè":[21487],"tái tāi":[21488,33492],"pǒ":[21493,23552,31544,31653,37461,38071,39370],"yè xié":[21494],"hào háo":[21495],"tàn":[21497,22022,25506,27470,28256,28845,30899,33301],"hōng hóng":[21503],"miē":[21504,21673,21750,23405],"xū yū yù":[21505],"chī":[21507,21735,21931,21988,22084,22939,23224,24424,24434,25691,25889,27558,29947,30196,30305,30517,30621,31518,31898,33013,34473,34733,35381,39761,40223,40260,40497,40656,40797],"xuān sòng":[21509],"yāo":[21510,21907,22829,22934,24186,26950,27520,31045,33136,33917,35358,36992,40193,40226],"zǐ":[21511,22985,22986,23376,26445,26771,27039,27252,28371,30711,31213,31531,31869,32043,32788,34424,35391,37352],"hé gě":[21512,40068],"cùn dòu":[21515],"tóng tòng":[21516],"tǔ tù":[21520,21771],"zhà zhā":[21522,22867],"xià hè":[21523],"ā yā":[21526],"ma má mǎ":[21527],"lìn":[21533,24673,24715,27209,28955,29968,33190,34106,34298,36035,36161,36472,36495,36505,36522,36709,38325],"tūn":[21534,26302,26396,28958],"bǐ pǐ":[21537],"qìn":[21538,21539,21786,25227,25599,25607,25779,27777,28697,33763,34301],"jiè gè":[21540],"fǒu pǐ":[21542],"ba bā":[21543],"dūn":[21544,22136,22697,22698,24775,25737,25780,29340,29540,30981,34611,36478,39504],"fēn":[21545,24073,26128,26374,26788,26875,27675,31445,32027,32439,32706,33452,34927,35356,36526,37210,37398,38640,39220,39257,39322],"é huā":[21546],"kēng háng":[21549,22932],"shǔn":[21550],"zhī zī":[21553],"yǐn shěn":[21554],"wú":[21555,21556,21577,22706,23807,26791,27206,27595,27926,28015,28961,29688,29841,31078,33436,33571,33665,34154,34568,34801,35669,37082,37593,38139,39875,40272,40417,40512,40751],"chǎo chāo":[21557],"nà nè":[21558],"xuè chuò jué":[21559],"chuī":[21561,28810,40865],"dōu rú":[21562],"hǒu":[21564,29372],"hōng hǒu ōu":[21565],"wú yù":[21566],"ya yā":[21568],"è e":[21571],"dāi":[21574,25051,29507],"mèn qǐ":[21575],"hōng":[21581,22173,25544,28788,28888,28962,30817,34216,35335,35902,36579,36663,36703,36720,37735],"nà":[21584,25466,31517,32013,32435,32941,33971,34930,35965,35968,36572,37069,37385,38048,38777,39798],"tūn tiān":[21585],"fǔ ḿ":[21586,22072],"dāi tǎi":[21588],"ǒu ōu òu":[21589],"bài bei":[21591],"yuán yún yùn":[21592,21729],"guō":[21593,21871,22035,22490,22557,22670,23838,24393,24397,25046,29459,30225,32850,34632,34760,37101,37403,37707,38149],"huá qì":[21594],"qiàng qiāng":[21595,36292],"shī":[21598,22833,23608,23629,24072,24107,26045,27977,28260,28287,28334,28348,28629,29422,29509,29793,32065,33913,33938,33997,34417,34664,35127,35193,35433,35799,37055,37315,37447,37734,39924,39972,40122,40178,40190,40371,40484],"juǎn":[21599,22477,33223,33764,37640,38185],"pěn":[21600,32760],"wěn mǐn":[21601],"ne ní":[21602],"ḿ m̀ móu":[21603],"rán":[21605,22059,28982,29123,32334,32944,34470,34490,34939,34951,34977,39653,39663],"tiè chè":[21611],"qì zhī":[21614],"zǐ cī":[21616],"guā gū guǎ":[21617],"cī zī":[21618],"hǒu xǔ gòu":[21620],"hē ā á ǎ à a":[21621],"náo":[21622,22802,23793,23977,24014,25376,25747,29489,30791,34546,34799,35401,35658,37891,38105],"xiā gā":[21623],"pēi":[21624,24588,32935,32986,34883,37253],"háo xiāo":[21626],"mìng":[21629,25525],"dá dàn":[21630],"zuǐ jǔ":[21632],"xián gān":[21633],"pǒu":[21637,21731,29315],"yǎng yāng":[21641],"zǎ zé zhā":[21643],"hé hè huó huò hú":[21644],"hāi":[21645],"dā":[21649,21714,22112,22710,25645,25752,32823,35105,37789],"kǎ kā":[21652],"gū":[21653,21762,21763,22993,23284,23396,24044,24045,26599,27245,27837,27858,31250,31519,31629,31643,31696,32603,33533,33735,33776,33991,35290,36593,36594,36721,36764,37220,37426,39829,40227,40490],"kā gā":[21654],zuo:[21655],"lóng":[21657,22184,23952,24003,24004,26173,26344,26407,26634,27102,27379,28272,28381,28427,29206,29649,29903,30275,30508,30675,30779,31025,31026,31423,31452,32843,32894,32999,33551,34338,34858,34860,35185,35909,37863,37992,38707,38727,39521,40471,40845,40850,40857],"xiàn xián":[21662],"qì":[21664,21805,22096,22120,22817,24323,24967,25001,26275,26820,27435,27668,27671,27683,27732,27773,27875,28230,28231,28801,29960,30453,30709,30875,30902,30940,30951,32586,33438,33914,34258,34815,35350,35755,36804,37905],"xì dié":[21669],"liē liě lié lie":[21671],"zī":[21672,21982,22997,23039,23388,23411,23414,23856,23915,26661,26900,28100,28285,28363,28588,29574,31116,31222,31906,32014,32199,32213,32387,32513,33546,33586,33880,35566,35864,36018,36039,36160,36164,36220,36241,36262,36636,36666,36750,37137,37421,37657,37759,37793,38193,38211,38974,38975,39661,39892,39974,40123,40325,40722,40781,40796,40839],"mī":[21674],"jī xī qià":[21677],"gē luò kǎ lo":[21679],"shù xún":[21680],"zán zá zǎ zan":[21681],"hāi ké":[21683],"huī":[21684,22085,22101,23118,23176,24145,24509,24674,25339,25381,25582,26198,26249,26958,27907,28680,28784,28787,28899,30579,31112,32730,32748,34355,34950,35096,35452,35801,35927,36637,36745,39988,40638],"huài shì":[21686],"táo":[21687,21845,26691,27310,27950,28120,31097,32175,32505,33796,34602,35050,36847,36867,37252,37630,38784,38793,39232,39395,39434,40727],"xián":[21688,21859,23092,23097,23153,23244,23290,23291,24358,25382,25743,28046,28282,28566,29961,30187,30279,30286,32067,32984,33335,34262,34495,34525,34900,34904,35512,35572,36066,36114,36132,36657,37262,37532,37990,38289,38386,40435,40436,40444,40519,40569,40601],"è àn":[21689],"xuān xuǎn":[21690,28892],"wāi hé wǒ guǎ guō":[21692],"yàn yè yān":[21693],"āi":[21696,21710,22467,28350,37552,37764,38207],"pǐn":[21697,27008],"shěn":[21698,23158,23352,23457,23479,23529,24350,26315,28182,28683,30635,30692,30695,35262,35360,35543,35717,35842,35849,37029,38947,39787],"hǒng hōng hòng":[21700],"wā wa":[21703],"hā hǎ hà":[21704],"zāi":[21705,26685,28221,28328,28797,28798,28886,30581,36083],"dì diè":[21707],"pài":[21708,27808,27966,28178,28227,33934,37763],"gén hěn":[21711],"yǎ yā":[21713,38597],"yuě huì":[21717,22118],"nián":[21718,24180,31178,31205,39822,39920,40071,40118,40263,40655],"huá huā":[21719,22057],"jì jiē zhāi":[21724,22156],"mōu":[21726],"yō yo":[21727,21938],"lòng":[21730,26759,36122],"ò ó é":[21734],"lī lǐ li":[21737],"nǎ na nǎi né něi":[21738],"hè":[21740,22414,22737,23497,24786,28931,28994,29178,29184,30283,30859,32751,35088,35614,36032,36154,36203,38733,38734,38735,40372,40470,40548],"bō pò bā":[21745],"zhé":[21746,21856,21894,22174,22481,24714,25722,26210,26211,27517,30714,30739,30932,31863,31885,34420,34544,34756,34985,35423,35627,35642,35713,35723,35882,36626,36633,36685,36740,36761,39871],"liàng láng":[21748],"liè lǜ":[21751],"hān":[21755,25e3,34486,35901,37219,38919,39032,39328,39805,40766],"hēng hng":[21756],"gěng":[21757,22466,23802,25389,26775,32134,32480,32831,33668,37088,39614,39873,40096],"chuò yuè":[21758],"gě jiā":[21759],"bei bài":[21764],"hán hàn":[21765],"chún":[21767,28017,28283,28387,28440,29321,32020,32431,33059,33724,33939,34036,37255,37269,37662,38489,39897,40329,40529],"ài āi":[21769],"jiá qiǎn":[21770],"yán dàn xián":[21772],"chē":[21779,30743,30824,33687,34556],"wú ńg ń":[21780],"zào":[21781,21795,22122,24933,26765,28790,29040,29157,30337,30338,31427,31432,31753,33345,35679,36270,36481,36896],"dí":[21785,21831,22016,22145,23265,24312,25932,25973,26769,28068,28364,29380,31515,31860,31988,33494,33659,34059,34064,34273,35263,35276,35956,36842,38766,38932,39344,39650,40464],"gòng hǒng gǒng":[21789,21962],"dóu":[21790],"lào láo":[21792,22062,24998],"huàn":[21796,21914,22850,22864,23462,23880,24187,24739,24844,25442,25563,25808,25868,26777,27125,28003,28067,28185,28470,28579,28873,28949,29029,29773,30186,30227,30534,32914,34279,35938,36696,36909,39879,39926,39936,40105],"léng":[21797,22596,26974,30864,34192],"wō wěi":[21801],"fěng":[21802,35202,35575,35773],"yín jìn":[21803],"hǔ xià":[21804],"wéi":[21807,22260,22285,22749,23767,23774,23916,24079,24119,24131,24799,26693,27817,27912,28064,28235,28296,28493,28505,28543,28656,29353,30656,32173,32500,34038,35257,36829,36949,37164,37248,37711,38344,38385,38859,38886,39840],"shuā":[21808],"chàng":[21809,24581,24757,26274,28987,30021,30076,35503,38868,39727],"ér wā":[21810],"qiàng":[21812,28829,29079,32699],"yō":[21815],"yū":[21817,28132,30208,30419,31626,32006,32417,36796,36802,36803,38483],"lài":[21819,28625,28712,28716,30302,30313,30544,30558,31809,31839,34302,36058,36084,36169,36182,38972,38978,40291],"tuò":[21822,23966,26589,27620,27643,31656,31836,33818,34304,36293],"zhōu zhāo tiào":[21825],"kěn":[21827,22438,22718,24691,25031,32910,32943,32955,35940,37689],"zhuó zhào":[21829,28655],"hēng hèng":[21832,24729],"lín lán":[21833],"a ā á ǎ à":[21834],"qiāng":[21836,22004,23944,25109,25700,26024,26538,27085,28332,29252,29456,29511,32652,32663,33108,34595,35602,37848,38166,38197],"tūn zhūn xiāng duǐ":[21837],"wèn":[21839,22927,25598,25653,29882,38382,38992],"cuì qi":[21840],"dié shà jié tì":[21841],"yuē wā":[21848],"zǐ cǐ":[21849],"bǐ tú":[21850],"chuò chuài":[21852],"yǎ yā è":[21854],"fēi":[21857,23123,23124,25161,26243,28164,29446,32203,32495,35062,38671,38750,38751,39131,39133,39134,39205,39329,39441,39451,39905,40113],"pí":[21860,22720,26503,27607,27608,28983,29749,30130,30382,31738,32628,32646,33086,33111,33165,34445,34493,34609,34743,34863,35964,35988,37099,37433,38448,38516,38566,39790,39821,40079,40295,40729],"shá":[21861],"lā la":[21862],"yīng qíng":[21864],"pā":[21866,22929,33317,33897,36276],"zhě shì":[21867],"sè":[21868,21959,25038,25804,26652,27502,28073,28171,28544,28545,28615,28623,28690,29791,29873,30263,31313,31329,31343,32364,35653,36694,37547,37884,38127,39115],"niè":[21870,21995,22107,22169,22209,22227,22332,23420,23421,23922,23981,24021,24071,25948,26559,27127,27377,28037,28284,30150,31710,31819,31985,31989,32834,32886,33260,33266,34326,34853,35736,36354,36375,36377,36433,36513,37660,37811,37960,38007,38016,38218,38221,38353,38503,38537,39027,39070,40807],"luō luó luo":[21872,22217],"tān chǎn tuō":[21876],bo:[21877,34068],"dìng":[21878,23450,26903,30708,30855,30880,30968,32866,33114,33827,34634,35330,35746,37664,38189,38977,39139,39268],"lāng":[21879],"án ān":[21885],"kā":[21888,25814],"yóng yú":[21889],"lā lá lǎ":[21895],"jiē":[21896,21948,21983,22566,23192,25509,25522,25809,28253,29039,30102,30158,30308,30342,31224,31277,33083,34644,34903,35631,38454,38542,38786,40347],"hóu":[21897,24127,29492,30218,30586,31692,31943,32749,33876,37127,37741,39217,39610,39928],"dié zhá":[21899],"wāi":[21902,27498,31477],"nuò rě":[21903],"xù huò guó":[21904],"zán":[21906],"wō ō":[21908],"hú":[21910,22045,22251,22774,22775,22778,23209,24359,25648,26011,26972,27122,28246,28715,28928,29043,29392,29474,29786,29939,31670,32087,32288,32993,33899,34075,34676,34716,34906,35315,37264,37752,38966,39212,39693,39793,39959,40288,40344,40358,40533],"huàn yuán xuǎn hé":[21915],"xǐ":[21916,22221,22736,23651,24473,24985,26546,27250,27478,28423,29626,29885,30678,31143,32304,33864,33912,34032,34786,35601,36445,36519,37410,37480,37481,40026],"hē hè yè":[21917],"kuì":[21919,22067,23231,23303,24870,24871,24978,31697,31779,31812,32873,32877,32885,33197,34146,35593,39229,39243,39304],"zhǒng chuáng":[21920],"wéi wèi":[21921,28858,29234],"duó zhà":[21925],"sāng sàng":[21930],"qiáo jiāo":[21932],"pèn bēn":[21935],"cān sūn qī":[21936],"zhā chā":[21939],"miāo":[21941],"pēn pèn":[21943],"kuí":[21945,22804,22862,24025,25123,25542,26182,26252,26959,26961,27334,29354,30589,33909,34248,34359,34369,34672,36520,36917,37128,37736,37751,38959,39319,39460,39577,39745],"lou lóu":[21949],"zào qiāo":[21951],"hè xiāo xiào hù":[21955],"á shà":[21956],"xiù":[21957,23723,23744,28340,29659,29703,29843,31168,32137,32333,32353,32483,34705,34966,35086,35087,37561,37861,37885,38152,40773],"qiāng qiàng":[21958,25111,25127,36428,36449],"ài yì":[21964,33406],"má mǎ ma":[21966],"kè kē":[21969],"dā tà":[21970,37769],"sǎng":[21971,25633,30921,35116,37791,39001,39073],"chēn":[21972,25275,29723,30603,35523,35603,36061,37108],"wā gǔ":[21975],"pǎng bēng":[21977],"xián qiǎn qiān":[21979],"lào":[21984,23274,27247,28061,28551,32802,32814,36540,36546,37226],"wēng":[21985,32705,32876,34697,37779,40370,40543],"wà":[21986,33149,33155,34972,35178,38884],"hēi hāi":[21992],"hē":[21996,27441,34842,35382,35779],zi:[21997],"sǎi":[21998],"ǹg ńg ňg":[21999],"gě":[22e3,33336],"ná":[22001,25295,25343,37823,38222],"diǎ":[22002],"ài ǎi āi":[22003],"tōng":[22005,27147,28853,34026],"zuī suī":[22010],"zhē zhè zhù zhe":[22011],"mò":[22012,22333,22651,22696,22970,23292,23518,24094,26153,26411,26554,27519,27521,27819,28448,29189,29519,30268,30348,30525,30527,30608,30617,30750,31027,31203,32072,32390,32817,33545,33672,34022,34536,34772,35971,35978,35992,37510,37836,38214,38476,38778,39488,39785,40664,40665],"sòu":[22013,30262],"tǎn":[22015,22374,24528,25011,25019,26298,27631,29870,33788,34962,35170,37267,37485,38077],"jiào dǎo":[22020],"kǎi gě":[22021],"shān càn":[22023],"cáo":[22024,23942,26361,26362,27133,28437,33370,34040,34732,35135,37866],"piào":[22028,24497,34056,39491],"lóu lou":[22029],"gǎ":[22030,23573,29581],"gǔ jiǎ":[22031],"jiāo xiāo":[22032],"xū shī":[22040,22099],"pó":[22041,22185,23110,27335,30372,37169],"dē dēi":[22042],"ma má":[22043],"lē lei":[22046],"gā gá gǎ":[22048],"sāi":[22053,22139,27618,33134,38987,39955],"zuō chuài":[22060],"cháo zhāo":[22066,26397,40706],"zuǐ":[22068,22143,23946,29883],"qiáo qiào":[22074,32761,35887],"chù xù shòu":[22076],"tān chǎn":[22077],"dàn tán":[22078,24382,24392,24788,28601],"hēi mò":[22079],"ě":[22081,30760,38923,39424,40264],"fān bo":[22083],"chuáng":[22087,24202,29248],"cù zā hé":[22088],"tūn kuò":[22091],"cēng chēng":[22092],"dēng":[22100,23297,28783,29128,29842,30331,31475,31782,33376,35915],"pū":[22103,25169,25778,25908,25909,28541,28807,38496],"juē":[22104,23657,23659,25767],"lū":[22108,22165,25784,25852,35618],"zhān":[22113,23742,24777,26051,26076,26540,26676,27617,27656,27658,27838,30651,34205,34501,35392,35449,35691,35893,36232,36997,38298,38673,39142,39256,39513,39769,40035,40455,40559],"ō":[22114],"zhòu zhuó":[22115],"jiào qiào chī":[22125],"yuàn":[22126,22964,24616,24895,25534,29783,31120,33489,34895,35051,35089,38498,39e3],"ǎi ài āi":[22127],"yōng yǒng":[22128,28589],"jué xué":[22129],"pēn pèn fèn":[22132],"gá":[22134,23580,37331,37687,38022],"xīn hěn hèn":[22135],"dāng":[22137,28578,29680,29867,31580,31801,33377,34807,35014,35168],"làn":[22146,28389,28651,28866,29143,29185,29211,29220,29907,31991,38020],"tà":[22147,22202,23817,25374,25640,25787,27067,27261,27646,28094,28606,28620,31138,31887,35515,35702,36427,36473,36482,36514,36957,37652,38354,38373,38396,38424,38812,38835],"huō huò ǒ":[22148],"hāo":[22150,33568,33983,34181],"hè xià":[22151],"xiù pì":[22154],"zhōu chóu":[22155,30441,35818],"mē":[22162],"chā cā":[22163],"bó pào bào":[22167],"me mèi mò":[22172],"xié hái":[22177],"áo xiāo":[22179],"mō":[22180,25720],"pín":[22188,23078,23252,23338,29613,30665,34226,34841,36007,36139,39024,39078],"mè":[22192,28665],"rǎng rāng":[22199],"lá":[22201,26095],"jiáo jué jiào":[22204],"chuò":[22205,23062,25801,27488,28080,30957,36352,36639,36749,36789,36790,37227,37985,39199,40810,40842],"huān huàn":[22206],"zá cà":[22211],"chài":[22214,34431,34822,34947,35341],"náng nāng":[22218],"zá zàn cān":[22219],"sū":[22220,27375,29990,31267,31308,31395,34311,34323,37221,39874],"zèng":[22222,29111,29969,36104,36192,37605,38147],"zá niè yàn":[22224],"nāng":[22228],"luó luō luo":[22230],"wéi guó":[22231],"huí":[22232,22238,22252,24315,24317,24667,27908,30160,33588,34456,34516,34517,34582,36852,36901,39856],"nín":[22236,24744,33036],"jiǎn nān":[22237],"nān":[22241],"tuán":[22242,22243,22296,24945,25247,25718,27314,31984,37828,40402,40443],"tún dùn":[22244,22345],"guó":[22255,22262,22267,22269,22272,22283,24124,24151,24918,25681,28429,32861,33112,33173,34094,34402,39320],"kùn":[22256,28035,30543],"wéi tōng":[22258],"qūn":[22263,22795,36897],"rì":[22264,26085,34933,37412,39353,39538],"tāi":[22268,23393,32974],"pǔ":[22275,22289,25800,26222,26268,27192,27279,27654,28006,28325,28915,35561,35676,35889,36476,37920,38248],"quān juàn juān":[22280,22287],"chuí chuán":[22284],"tuǎn":[22293,30077,30083],"lüè":[22297,25504,30053,30055,31268,37597,37602,38154],"huán yuán":[22300],"luán":[22301,22302,22897,23048,23372,23402,23423,23782,24018,25371,25891,26347,26686,27410,28390,28772,30324,30325,32649,33044,33248,34378,37550,38014,40265,40478,40510],"tǔ":[22303,22305,37367,38029],"xū wéi":[22313],"dì de":[22320,23987],"qiān sú":[22321],"zhèn":[22323,22630,25355,25391,26389,26650,30013,30521,32022,32124,32444,35499,36049,36168,37620,37805,37806,38215,38453,38499,38663,40198,40489],"chǎng cháng":[22330,22580,22642],"qí yín":[22331],"jiá":[22335,24550,24669,25118,25204,33061,33626,33698,34545,34554,35020,36338,37071,37087,37583,38103,38956,38960,39050,40246,40266],"zhǐ zhì":[22337],"bǎn":[22338,23685,26116,26495,29256,29930,31876,33320,34626,37393,38051,38442,39788],"qǐn":[22341,23505,23517,23522,26129,26795,31497,34748,36222,37599,38163],"méi fén":[22342],"rǒng kēng":[22344],"fāng fáng":[22346],"fèn bèn":[22347],"tān":[22349,24633,25674,25849,25892,28393,28760,30251,30321,33297,36010,36138],"huài pēi pī péi":[22351],"dì làn":[22356],"tán":[22363,22704,22709,22727,22748,23122,24987,26137,26311,27011,27264,28525,29122,30192,30969,32584,32590,34283,35527,35674,35680,35848,35885,35994,37103,37296,37663,38979],"bà":[22365,22459,22761,24349,27419,28766,29240,30706,35207,38712,39809,40069],"fén":[22367,22707,22946,23694,24169,26508,26876,27774,28954,29132,29139,32658,32693,33974,34145,34464,34465,35950,35958,36690,37948,38571,39337,39797,40642,40726,40738],"zhuì":[22368,22684,24820,29952,30071,30984,32180,32267,32512,32530,33103,33159,35528,36101,36184,37258,37667,37958],"pō":[22369,23717,27900,28300,28497,37337,37882,38027,38935,39047],"pǎn bàn":[22370],"kūn":[22372,22531,22546,23824,23825,26118,26204,28489,28956,29108,29457,29736,29819,33742,34603,35016,35049,35084,37260,37653,38175,39433,39648,39649,39656,39908,40114,40318,40356,40525],"diàn":[22379,22443,22666,22722,22880,23133,24215,24806,25154,27202,27583,28096,28593,29623,29716,30005,30300,31775,34580,37439,38651,38747,39508],"mù mǔ":[22390],"kē kě":[22391,36603],"xuè":[22393,23716,26710,28709,29400,30642,35604,35857,36240],"dǐ chí":[22395,26594],"lā":[22403,26566,33736,37003],"lǒng":[22404,22405,22751,22752,25314,25871,31433,38471,38580],"mín":[22410,22980,23735,23823,25450,26107,26108,27665,29641,29720,29725,29769,30203,30463,30727,32205,32225,32535,32608,33504,37425,37641,37746,40214],"dòng tóng":[22412,23762,27934],"cí":[22416,23336,24904,26572,28648,29633,29943,29958,30913,31008,31072,31949,33576,35422,35789,36765,36766,36772,36781,38604,39162,39176,40220,40383,40384,40538],"duī":[22422,22534,22624,30205,30931,37907,37916,40237],"duò duǒ":[22427],"duǒ duò":[22428,25350],"chá":[22430,23519,23894,25661,27086,27307,29497,33580,33590,35431,38763],"shǎng":[22439,26188,27145,36062,36120,36175,37631,37851,37980],"shǒu":[22440,23432,25163,25164,33359,39318],da:[22447,32360,36342],"háng":[22451,26043,26477,31573,32078,32471,33322,33472,34466,35012,36005,36818,38927,39043,39783],"ān ǎn":[22453],"xīng":[22454,24826,26143,26320,29003,29481,29766,30376,31682,33125,33288,35306,35314,35587,39426,39565,39823,39929],"yuàn huán":[22456],"bāng":[22457,24110,24135,24154,24171,25440,26758,27996,37030,37035,38820],"póu fú":[22458],"cén":[22465,23697,28052],"běng fēng":[22468],"dì fáng":[22469],"xiá jiā":[22473],"mái mán":[22475],"làng":[22476,23808,28010,33943,38316],"shān yán":[22479],"qín jīn":[22480],"pǔ bù":[22484],"huā":[22486,23154,26907,30836,31936,33457,33930,34340,35502,37685],"suì sù":[22499],"pí pì":[22500],"qīng zhēng":[22501,40109],"wǎn wān":[22502],"lǔn":[22504,31248],"zhēng chéng":[22505],"kōng":[22506,23814,31644,36539,37651,40316],"cǎi cài":[22512,23488,37319],"chù tòu":[22513],"běng":[22514,29739,33782,38811],"kǎn xiàn":[22515],"yì shì":[22518,37299],"péi":[22521,27632,35060,35061,36064,36180,37639,38187,38443,38506],"sào sǎo":[22525],"jǐn qīn jìn":[22535],"péng bèng":[22539],"qiàn zàn jiàn":[22545],"àn":[22547,23669,23736,25353,26263,26696,33018,33612,35963,35979,37644,38343,38540,40687],"duò huī":[22549,22702],"huán":[22554,23503,23536,23768,26707,27961,28596,29506,29615,29872,31979,32367,32563,32678,33601,33800,33809,35954,37744,37942,38206,38254,38372,38427,38600,39711,40558],"bǎo bǔ pù":[22561],"máo móu wǔ":[22565],"ruán":[22567,22742,25739],"ài è yè":[22568],"gèng":[22569,26245],"méi":[22579,22650,23186,23883,24510,25879,26522,26626,26757,26979,26995,27089,28228,28232,29028,29496,29611,29691,29762,30473,30530,31126,33028,33058,33116,33530,33683,33919,37119,37238,37767,38213,38665,40357,40539,40692],"dǔ":[22581,29757,30585,31491,31716,35241,36077,36172],"féng":[22584,32152,33346,36898],"hèng":[22588],"chūn":[22590,23179,26110,26149,26265,26486,26943,27078,27201,27332,29763,31674,33797,34685,36660,39942,40350],"jiǎng":[22594,22870,22888,22892,26728,27123,29518,32809,33177,33931,34083,35611,35762,39004],"huāng":[22595,24031,24908,32915,33618,34881],"duàn":[22597,26029,26039,26932,27573,27592,28997,29782,30891,31766,31850,32222,32526,33142,33902,36502,37723,38203],"tǎ":[22612,22678,29549,29562,39833,39976,40142],"wěng":[22613,22883,23905,25882,26273,30600,33994],"sāi sài sè":[22622],"zàng":[22623,24329,33235,33247,33900,34101,37562],"tián":[22625,23623,24684,27834,28233,29875,29979,29980,3e4,30027,30033,30901,30924,32971,38352,38423,40235,40390,40399],"zhèng":[22627,24129,25919,35388,35533,35657,35777,35812,37073,37165,38741,40202],"tián zhèn":[22635],"wēn":[22637,26167,27058,27551,28201,28331,29797,30239,34160,35953,36668,36672,36754,37822,39234,39963,39982,40129],"liù":[22639,24263,30943,32719,38625,38692,39230,39736,40410,40552],"hǎi":[22640,28023,28920,37244,37282],"lǎng":[22641,26390,26391,26404,28922,34018],"bèng":[22644,25596,27893,29967,32179,36454,36856,36908,37872,38234],"chén":[22645,23480,23576,24561,25936,25974,26216,26335,26645,27140,27785,28993,30222,33251,33566,33664,33680,34095,34236,34740,35366,35574,36569,36784,36839,37378,38472,38515,38659,40400,40590],"ōu qiū":[22648],"qiàn jiàn":[22649],"zhuān tuán":[22652],"shuǎng":[22653,24929,28474,29245,32276,37871],"shú":[22654,23116,23408,29881,31211,36118,36174],"lǒu":[22655,23901,23937,29962,31699,31757],"chí":[22656,24347,25345,27744,28454,31486,31554,31630,31722,33548,33614,34483,35608,36030,36223,36383,36831,36833,36933,36959,36978,37705,39347,39536],"shù":[22661,24246,24251,24631,24661,25101,26463,26641,27193,27821,28465,28484,28630,31446,31466,32073,33127,33623,33921,34410,34899,35019,35918,36848,37477,37680,37859,38676,40336],"dì zhì":[22662,30096],"kàn":[22664,23809,30640,30681,30945,34894,39723],"chěn":[22667,22822,30838,30876,30947,36098,36283,36408,37718],"zhǐ zhuó":[22668],"qiǎng":[22671,32328,32358,32677,35137],"zēng":[22679,22686,24974,29844,30704,30963,32638,35652,37163,40027],"qiáng":[22681,22715,23281,23321,27183,27299,28434,29254,33378,34051,34103,34336],"kuài tuí":[22692],"tuǎn dǒng":[22693],"qiáo què":[22695],"zūn dūn":[22699],"qiāo áo":[22717],"yì tú":[22719],"xué bó jué":[22726],"lǎn":[22728,23358,23364,23375,25042,25078,25597,25829,25900,27012,27414,28008,28452,28768,32412,32518,32625,35239,35261,35272,37250,39026],"huài":[22730,22750,34366],"rǎng":[22732,22756,25880,29209],"làn xiàn":[22735],"dǎo":[22740,23548,23566,23707,23798,23947,23948,23993,25443,25623,25827,27101,31095,31106,31153,36424,38502,38557,38575],"ruǐ":[22753,26741,27236,32352,34122,34123,34306,34307],san:[22765],"zhuàng":[22766,22767,22773,25758,28939,29366,29376],"ké qiào":[22771,27580],"kǔn":[22776,22780,24707,25414,26801,30833,31093,31239,31259,32145,35021,38315,38328,38403],"mǎng":[22782,28461,33595,33725,33726,34830],"cún":[22783,23384],"zhǐ zhōng":[22786],"gǔ yíng":[22787],"jiàng xiáng":[22789,38477],"páng féng fēng":[22790],"zhāi":[22792,25434,25688,25995,25998,27064,31874,40779],"xuàn xiòng":[22800],"wài":[22806,39009],"wǎn yuàn wān yuān":[22807],"mǎo wǎn":[22808],"mèng":[22818,22819,23391,26790,30310,38693],"dà dài":[22823],"fū fú":[22827,22983,26510,31920],"guài":[22828,24618,24672],"yāng":[22830,22990,25264,27523,27889,31207,32998,37472,37704,38645,40230,40495],"hāng bèn":[22831],"gǎo":[22832,25630,26482,27072,27073,27322,31233,31294,31295,32286,32543,33746,34241,34291],"tāo běn":[22834],"tóu tou":[22836],"yǎn tāo":[22837],"kuā kuà":[22840,35463],"jiá jiā gā xiá":[22841],"huà":[22843,23155,23295,23301,23819,25702,26489,26528,26726,27116,27194,28549,30011,30059,30069,32355,33305,35441,35545,35694,35805,40650],"jiā jiá gā xiá":[22846],"ēn":[22848,24681,33981],"dī tì":[22851],"yǎn yān":[22852,28208],"pào":[22853,30129,30384,30770,31007,31022,38756,40621],"nài":[22856,26608,28223,32784,33816,35110,37692,40720],"quān juàn":[22861,24366,26860],"zòu":[22863,25549],"qì qiè xiè":[22865],"kāi":[22866,24320,25577,37926,38158,38283],"bēn bèn":[22868,27853],"tào":[22871],"zàng zhuǎng":[22872],"běn":[22873,26412,26957,30042,32713,33519],"xùn zhuì":[22878],"shē":[22882,27304,29470,30061,30066,36050,36054,36170,36619],"hǎ pò tǎi":[22884],"ào yù":[22885,22887,28570],"yūn":[22891,27698,27699,33920,33941,34681,36103,36191],"duǒ chě":[22898],"nǚ rǔ":[22899],"nú":[22900,23397,31535,39377,39549],"dīng dǐng tiǎn":[22901],"tā jiě":[22905],"nuán":[22907],"hǎo hào":[22909],"fàn":[22911,23310,26805,27726,27867,28412,28714,29359,30024,30421,31541,31684,33539,35337,36009,36137,36588,36669,39151,39152,39277],"shuò":[22913,25632,26388,27082,28865,29197,30687,33972,37785,37984,38084],"fēi pèi":[22915],"wàng":[22916,24536,26106,26395,26402],"zhuāng":[22918,22941,23076,24196,24210,26729,26761,27137,31911,31962,33624,33674,35013,35037],"mā":[22920,23229],"fū yōu":[22923],"hài jiè":[22926],"dù":[22930,22956,26460,27564,28193,31226,33423,33648,34713,34855,34873,37709,38208,38767],"miào":[22937,24217,24255,24287,29573,31447],"fǒu pēi pī":[22938],"yuè jué":[22940],"niū":[22942],"nà nàn":[22944],"tuǒ":[22949,23287,24249,26925,26965,27234,39692,39958,40270],"wàn yuán":[22951],"fáng":[22952,25151,32938,38450,39796,40066],"nī":[22958],"zhóu":[22959,30881],"zhāo":[22961,24054,25307,26157,37335,37450,37731,38026,39371],"nǎi nǐ":[22963],"tǒu":[22965,25960,32015,34339,40648],"xián xuán xù":[22966],"zhí yì":[22967,31175],"ē":[22968,22975,23104,23641],"mèi":[22969,23194,23504,25274,26048,26151,27820,29021,30167,30491,30584,31065,31683,34654,34946,36298,39741,39749],"qī qì":[22971],"xū xǔ":[22977,31280],"shān shàn":[22989,22999,33515,37348,38032],"mán":[22991,24946,27168,34542,34875,35646,39237,39314,39703,39704,39995,40151],"jiě":[22992,23182,27294,27601,39159],"wěi wēi":[22996],"pīn":[23e3,25340,30999,31334,39338,39518],"huá huó":[23009],"jiāo xiáo":[23011],"gòu dù":[23012],"lǎo mǔ":[23013],"nián niàn":[23017],"zhěn":[23019,23634,24363,25262,26147,26517,30043,30137,30485,31289,32285,32293,32540,32836,33817,34967,35030,35225,35386,35786,36587,36728,36788,39383,39698],"héng":[23022,24646,24658,28870,29673,33019,34309,34913,37957,40244,40262,40507],"jūn xún":[23024],"kuā hù":[23025],"è yà":[23030],"xiān shēn":[23034],"wá":[23043],"ráo rǎo":[23046,23304],"shào shāo":[23051],"xiē":[23054,25587,26964,27463,34638,34829],"wǔ méi mǔ":[23058],"chuò lài":[23061],"niáng":[23064,23330,23363],"nà nuó":[23068],"pōu bǐ":[23069],"něi suī":[23070],"tuì":[23079,29050,34555,34581,36864,39422],"mǎn":[23080,23640,28288,28385,28415,34728,34766,35156,37835],"wú wù yú":[23082],"xī āi":[23085],"zhuì shuì":[23095],"dōng dòng":[23099],"ǎi ái è":[23102],"ē ě":[23103],"mián":[23106,23349,23424,26467,26825,27312,27339,30496,30664,30666,30671,32191,32220,32501,33415,34642],"pǒu péi bù":[23108],"biǎo":[23114,33087,34920,35057,35134,35544,37686],"fù fàn":[23119],"wǒ":[23120,23121,25105],"ní nǐ":[23127,26879],"quán juàn":[23128,24787],"hūn":[23130,26127,26156,26836,28093,30567,30575,30856,33636,33911,34066,36683,38333,38413],"qiān jǐn":[23132],"wān wà":[23136],"lái lài":[23137,24469,24480],"zhōu chōu":[23140],"chuò nào":[23141],"nüè àn":[23145],"hùn kūn":[23147],"dàng yáng":[23160],"nàn":[23163],"ruò chuò":[23164],"jiǎ":[23165,23724,26010,26013,27022,27098,27295,29630,30002,32987,37440,38078],"tōu yú":[23166,23214],"yù yú":[23168],"wéi wěi":[23169],"dì tí":[23170,29686,33488],"róu":[23171,25545,26580,28184,29027,29768,29895,31160,31880,31941,33052,33132,33863,34650,36418,36654,37714,38819,39461,39943,40340],"ruǎn nèn":[23174],"miáo":[23180,23289,25551,30596,33495,40339,40523],"yí pèi":[23184],"mián miǎn":[23188],"tí shì":[23198,24831],"duò tuó":[23200,27826],"ǎo":[23210,23228,33401,33466,34948,35158,38266],"chú zòu":[23216],"yìng":[23221,26144,26254,30828,33185,40038],"qín shēn":[23232],"jià":[23233,24143,26550,27042,31292,39381,39550],"sǎo":[23234],"zhēn zhěn":[23235],"jiē suǒ":[23237],"míng mǐng":[23239],"niǎo":[23243,23325,23346,33553,34086,34949,35018,35117,40479],"tāo":[23245,24141,24354,24902,25487,25647,27076,28059,28372,28644,29803,32091,32282,32295,32486,35420,35615,36673,38833,38876,38892,39160,39253],"biáo":[23249],"piáo piāo":[23254,34232],"xuán":[23257,24748,25080,26294,27272,28457,29572,29831,29887,30147,34561],"màn mān":[23258],"kāng":[23261,23931,24247,24951,27130,28462,30730,31301,31968,36543,37870,40007],"hān nǎn":[23272],"nèn":[23273,23280],"zhē":[23276,36974],"mā má":[23282],"piè":[23283],"zhǎn":[23288,23637,25612,26025,26028,29718,30415,30430,36670,37254,39085,39120],"xiān yǎn jìn":[23312],"liǎn":[23322,25947,25986,29711,29833,32695,33080,33225,34105,34333,34334,35043,35165,37179],"qióng huán xuān":[23323],"dǒng":[23326,25026,31677,33891,34155,35532],"cān":[23328,28236,29208,39137,39184,39490,39574],"tiǎo":[23333,23464,26176,26387,31409,33025],"bí":[23350,33656,40763],"liǔ":[23356,26611,26625,26718,26746,27246,29102,29643,32185,32506,32630,32640,37622,38157],"qiān xiān":[23365,27430],"xié huī":[23368],"huān quán":[23369],"lí lì":[23371,40599],"zhú chuò":[23374],"kǒng":[23380,24656],"mā zī":[23382],"sūn xùn":[23385,23403],"bèi bó":[23387,35478],"yòu niū":[23399],"zhuǎn":[23400,31473,36681],"hái":[23401,39608],"nāo":[23404],"chán càn":[23409],"bò":[23417,27287,34327,35666],"nái":[23419,33097],"níng nìng":[23425,23501,23511,23516,23527,29999],"zhái":[23429],"tū jiā":[23434],"sòng":[23435,35359,35494,35772,35829,36865,37817,38924,39042,39224],"ròu":[23437,32905,35699],"zhūn":[23442,31360,34912,35524,35846,36813],"mì fú":[23443],"dàng tàn":[23445],"wǎn yuān":[23451],"chǒng":[23456,23541],"qún":[23469,23790,24108,32675,32676,35033,35040],"zǎi":[23472,23869],"bǎo shí":[23474],"jiā jia jie":[23478],"huāng huǎng":[23482],"kuān":[23485,23515,23532,33239,37991,39627,39638],"sù xiǔ xiù":[23487],"jié zǎn":[23489],"bìng bǐng":[23502],"jìn qǐn":[23510],"lóu jù":[23520],"xiě xiè":[23531],"qīn qìn":[23540],"cùn":[23544,31871],"duì":[23545,23550,23565,24636,24989,25055,28647,28713,30867,31051,32144,34225,35656,35701,36699,38431,38510],"lüè luó":[23549],"shè yè yì":[23556],"jiāng jiàng qiāng":[23558],"jiāng jiàng":[23559,27974,28479,30074],"zūn":[23562,23967,27197,32583,36981,37903,40018,40159,40334,40439],"shù zhù":[23564,28557],"xiǎo":[23567,26195,26241,26313,30363,30370,31601,31615,31712,35599],"jié jí":[23568,35800,38794],"shǎo shào":[23569],"ěr":[23570,23571,23572,26670,27622,27953,29246,29669,32819,34238,34888,36272,36841,36999,37498,38098,39180,39285,39404],"wāng yóu":[23586],"wāng":[23587,23593,23594,23595,27754],"liào":[23589,23590,24278,25730,26009,28819,31415,37904,38243],"méng máng lóng páng":[23592],"gà":[23596,39744],"kuì kuǐ":[23599],"tuí":[23605,24346,31336,34312,36458,38564,38969,38970,38973,39059,39755],"yǐn":[23609,23998,24341,26372,27267,27324,27389,28158,28645,30270,30318,31884,34335,34451,34750,35732,36218,36251,36625,37391,38775],"chǐ chě":[23610],"kāo":[23611,39643],"jìn jǐn":[23613],"wěi yǐ":[23614],"niào suī":[23615],"céng":[23618,23652,23954,39507],"diǎo":[23628],"píng bǐng bīng":[23631],"lòu":[23642,28431,30232,30266,30267,37860,38210,38475],"shǔ zhǔ":[23646,23660],"xiè tì":[23647],"chè cǎo":[23662],"tún zhūn":[23663],"nì jǐ":[23664],"hóng lóng":[23672],"qǐ kǎi":[23682,35912],"áng":[23687,26114,26171],"gǎng gāng":[23703,23831],"kě":[23714,25956,28167,28212,28835],"gǒu":[23715,29399,29629,31537,32775,32776,32777,33503,35967],"tiáo":[23719,23737,27172,31058,31524,33408,33812,34010,34024,34601,36834,37594,37797,38807,39659,39880,39991,40102,40800,40838],"qū jū":[23720],"lǐng":[23725,23994,38936,39046],"pò":[23734,25920,27942,28240,28894,29632,30772,30774,31893,33962,39748],"bā kè":[23751],"luò":[23752,25694,27931,27932,29334,29662,31551,32409,33638,35451,38610,39409,39558,40261],"fù niè":[23754],"ěn":[23758],"zhì shì":[23769,23867],"qiǎ":[23776,36306,37216,38800],"qiáo jiào":[23780,30276],"xié yé":[23787],"bū":[23788,24239,26209,35495,36875,37437,37691,38072,39188,40271],"chóng":[23815,23816,29214,34411,34665,34802,35080,38528],"zú cuì":[23826,26890],"líng léng":[23834],"dòng dōng":[23840],"xiáo":[23844,27944,28102,35364,35509],"pí bǐ":[23845,33432],"zhǎn chán":[23853,23939,23940],"wǎi wēi":[23860],"yáng dàng":[23861],"shì dié":[23868],"yào":[23870,26332,29070,29183,30661,31358,31380,31556,32768,33374,33647,33903,34220,34277,34958,35230,35407,35729,38783,40386,40542,40764],"kān zhàn":[23873],"hán dǎng":[23877],"qiàn kàn":[23884],"wù máo":[23885],"kě jié":[23889,23985],"wēi wěi":[23892],"kē":[23897,26607,26869,27068,27158,29249,29297,29328,29634,30132,30604,30933,31002,31185,31262,31392,33834,34198,34485,34636,36279,36722,37272,37427,38070,38950,38982,39063,39617],"dàng táng":[23907],"róng yíng":[23908,29187],"ái kǎi":[23910],"kāo qiāo":[23914],"cuó":[23919,23923,30180,30700,33963,34070,34392,40570,40574],"qiǎn qīn":[23920],"dì dié":[23933],"cēn":[23934],"dǐng":[23935,33404,34209,37924,38914,39030,40718,40721],"áo ào":[23941],"pǐ pèi":[23951],"jiào qiáo":[23968,28496],"jué guì":[23969,40156],"zhān shàn":[23974,40163],"xiè jiè":[23984],"guī xī juàn":[23986],"rū":[23999],"lì liè":[24001,26841,29188,32159],"xī guī juàn":[24002],"yíng hōng":[24006],"yǐng":[24010,24302,24433,25708,26796,28481,30271,30317,30696,31310,37090,37915,38964,39053,39061,39062],"chǎo":[24016,28818,29052,30503,40616],"cuán":[24017,27349,27409],"chuān":[24027,24029,27674,29775,31359],"jīng xíng":[24032],"cháo":[24034,24035,26177,28421,28526,29258,31410,32634,35647,36680,37147,40716],"qiǎo":[24039,24832,39644],"gǒng":[24041,24318,25329,25330,26673,27742,29657,36609,38799],"chà chā chāi cī":[24046],"xiàng hàng":[24055],"shuài":[24069,24101,34752],"pà":[24074,24085,24597,34969],"tǎng nú":[24081],"mò wà":[24083],"tiē tiě tiè":[24086],"zhǒu":[24090,26221,30107,30573,31634,32920,33783,39902],"juǎn juàn":[24099],"shuì":[24104,28055,28058,30561,31237,31246,35038],"chóu dào":[24113,24172],"jiǎn jiān sàn":[24116],"shà qiè":[24121],"qí jì":[24122,33632],"shān qiāo shēn":[24147],"zhuàng chuáng":[24162],"chān chàn":[24168],"miè":[24173,25073,25635,28357,28781,28885,31011,31742,34065,34190,34843,34890,37974,40052,40211],"gān gàn":[24178],"bìng bīng":[24182,24183],"jī jǐ":[24190],"guǎng ān":[24191],"guǎng":[24195,24291,29367,29559],me:[24197],"dùn tún":[24201],"bài tīng":[24205],"yìng yīng":[24212],"dǐ de":[24213],"dù duó":[24230],"máng méng páng":[24236],"bìng píng":[24240],"chěng":[24241,24732,30536,36894,39425,39563],"jī cuò":[24244],"qǐng":[24252,24270,27326,28416,33496,35531,35622,35831,38915,39031],"guī wěi huì":[24262],"jǐn qín":[24273],"kuò":[24275,25193,25313,25844,28662,31560,33855,33856,34526,38346,38420,38697,38815,38841,38869,38946,39712],"qiáng sè":[24295,34196],"yǐn yìn":[24308,38544,38560,38577,39150,39154,39278],"pò pǎi":[24313,36843],"nòng lòng":[24324],"dì tì tuí":[24351],"jué zhāng":[24353],"mí mǐ":[24357,24396,38753],"chāo":[24360,24586,25220,27433,35372,36229,37396,38046],yi:[24364],"shāo":[24368,26067,28903,28988,29138,31602,33348,33847,34161,36622,39678,39865],"xuān yuān":[24370],"qiáng qiǎng jiàng":[24375,24378],"tán dàn":[24377,37256],"biè":[24390],"qiáng jiàng qiǎng":[24394],"jì xuě":[24400],"tuàn":[24406,35094],"yuē":[24415,26352,26353,30705],"shān xiǎn":[24417],"wén":[24419,25991,28806,29683,30226,32359,32862,33440,34441,34442,34721,34753,38330,38335,38341,38374,38395,38412,38639,39356,39367,39792,40188,40205,40740],"péng bāng":[24429],"piāo piào":[24431],"zhuó bó":[24436],"tuǒ yí":[24437],"páng fǎng":[24439],"wǎng":[24442,24448,24451,24792,26505,26850,32178,32593,32594,32595,32596,32598,33781,34535,34628,35511,36638,36747,39757],"cú":[24450,27522],"dài dāi":[24453],"huái":[24458,24576,25040,25079,27088,28142,32818,34361,35106,35121,36381],"wā wàng jiā":[24461],"chěng zhèng":[24462],"dé děi de":[24471],"cóng zòng":[24478],"shì tǐ":[24485],"tí chí":[24498,40343,40345],"dé":[24499,24503,24692,24755,24810,28098,37696,38173],"zhǐ zhēng":[24500,24501],"bié":[24502,30335,33666,34498,35154,36457],"chōng zhǒng":[24504],"jiǎo jiào":[24508,31493,31562],"lòng lǒng":[24511],"qú jù":[24514,28192,30655,34742],"dìng tìng":[24522],"gǎi":[24523,25913],"rěn":[24525,26656,26659,31225,31252,32155,33615,33653,36533],"chàn":[24527,25076,25082,30815,32700,38850,39019],"tè":[24529,24925,29305,34776,37617,38141],"tè tēi tuī":[24530],"gān hàn":[24531,25916],"yì qì":[24532],"tài shì":[24533],"xī liě":[24538],"yīng yìng":[24540,25033,35661],"mǐn wěn mín":[24542,24543],"sōng zhōng":[24554],"yù shū":[24556,24710],"qí shì":[24559,32774],"tún zhūn dùn":[24563],"qián qín":[24564,25202],"hún":[24566,27985,28222,39195,39300,39746,40754],"niǔ":[24568,25197,28804,29379,32016,32445,33701,37397,38062,38773],"kuáng wǎng":[24569],"kāng hàng":[24572],"kài xì":[24574,24894],"òu":[24580,24938],"bǎo bào":[24585],"mín mén":[24587],"zuò zhà":[24589],"zěn":[24590],"yàng":[24591,24665,26679,27096,27171,28478,32661,35399],"kòu jù":[24592],"náo niú":[24595],"zhēng zhèng":[24596,25497,38066,38126],"tiē zhān":[24599],"hù gù":[24600],"cū jù zū":[24602],"sī sāi":[24605],"yóu chóu":[24606],"tū dié":[24610],"yōu yào":[24622],"xuàn":[24624,26145,26982,27883,28210,28843,29700,30505,30905,32098,32316,32335,32474,34073,34898,34984,36121,37449,37831,38089,38239,39092],"xù xuè":[24628],"bì pī":[24630],"xī shù":[24632],"nèn nín":[24641],"tiāo yáo":[24652],"xī qī xù":[24659],"xiào jiǎo":[24660],"hū kuā":[24663],"nǜ":[24679,26386,34882,34884],"hèn":[24680],"dòng tōng":[24683],"quán zhuān":[24686],"è wù ě wū":[24694,24801],"tòng":[24696,24927,24965,30171,34901],"yuān juàn":[24705],"qiāo qiǎo":[24708],"jiè kè":[24712],"hào jiào":[24718],"huǐ":[24724,27283,27584,27585,27591,29164,35693],"mán mèn":[24727,38804],"yī yì":[24728,34915],"quān":[24731,31646,37897],"kuī lǐ":[24733],"yì niàn":[24741],"mèn mēn":[24758],"guàn":[24761,24762,24815,24931,25532,25692,27148,27423,27892,28075,28485,28748,29215,29912,30437,31030,31100,32582,32592,36011,36143,36480,36966,37830,38005,40057,40475,40563],"kōng kǒng":[24766],"lǔn lùn":[24768],"guǒ":[24776,26524,26881,27112,31935,32182,33747,34622,35065,35073,36640,39196,39299],"yuān wǎn":[24780,31650],"lán lín":[24783],"yù xù":[24784,28130],"chuò chuì":[24793],"hūn mèn":[24795],"chǎng tǎng":[24797],"suǒ ruǐ":[24802],"cǎn":[24808,24920,25007,40682,40690],"cán":[24813,24921,24922,27531,27544,34453,34629,34870,34874],"dàn dá":[24814,24986],"rě":[24825],"yú tōu":[24841],"kài qì":[24850],"dàng táng shāng yáng":[24851],"chén xìn dān":[24854],"kè qià":[24856],"nuò":[24862,25062,25063,25535,25638,27026,31276,31332,31953,31973,31983,35582,35834,36419,36925,37737,38168],"gǎn":[24863,25792,25954,26751,27204,28553,28600,30383,31174,31240,31540,33417,34918,36214,36245,40036,40161],"còng sōng":[24865],"sāi sī sǐ":[24866],"gōng gòng hǒng":[24873,24912],"shuò sù":[24876,27948],"yáo yào":[24878],"huàng":[24880,26306,27045,28361,30365,30377,37796],"zhěng":[24888,25229,25327,25972,26232],"cǎo":[24890,33400,33609,39474],"xì xié":[24896],"cǎo sāo":[24901],"xù chù":[24905],"qiè qiàn":[24906],"cáo cóng":[24914],"ào áo":[24928],"lián liǎn":[24937,26815,27108,27363],"jìn qín jǐn":[24940],"dì chì":[24952],"zhí zhé":[24953],"lóu lǚ":[24954,40412],"còng":[24961,35621],"zhī zhì":[24964,30693,32340,32455],"chēng":[24966,25690,25744,25745,26239,26621,26854,27221,27273,27871,28030,29732,30624,30848,32253,32585,34511,34806,36202,36204,37887,37923,38455,38743,38963,39251],"biē":[24971,34380,40009,40150,40712,40862],"chéng dèng zhèng":[24981],"xǐ xī":[24984],"duì dùn tūn":[24990],"xiāo jiāo":[24994],"xián xiàn":[25002],"liáo liǎo":[25005,29134,29198,29202],"shéng":[25012,32260,32329,32361,32499,35677],"náo nǎo náng":[25017],"jǐng jìng":[25020],"jǐ jiǎo":[25023],"xuān huān":[25025],"cǎo sāo sào":[25030],"mèn":[25041,25059,26282,28950,29148],"mèng méng měng":[25052],"ài yì nǐ":[25053],"méng měng":[25054,30626,30674],"qí jī jì":[25056],"mǒ":[25057],"lán xiàn":[25058],"yōu yǒu":[25070],"liú liǔ":[25072,34288],"ràng":[25081,35698,35731,35753],"huān":[25085,27426,27475,27489,29566,35737,35995,37188,39529,40197,40269],"nǎn":[25089,25543,28275,29045,33129,34683,36199],"mí mó":[25090],"gàng zhuàng":[25093,25094],"zhuàng gàng":[25095],"qu xū":[25100],"xì hū":[25103,25135,25138],"jiá gā":[25115],"zéi":[25117,34824,36042,36156,39938,40033,40087],"děng":[25125,31561],"hū xì":[25137],"chuō":[25139,36372,36916],"biǎn piān":[25153],"shǎng jiōng":[25156],"shàn shān":[25159],"cái":[25165,26448,32404,35009,36001,36130],"zhā zā zhá":[25166],"lè lì cái":[25168],"bā pá":[25170],"dǎ dá":[25171],"rēng":[25172],"fǎn fú":[25173],"diǎo dí yuē lì":[25178],"káng gāng":[25179],"yū wū":[25180],"yū wū kū":[25181],"tuō chǐ yǐ":[25185],"gǔ jié xì gē":[25186],"dèn":[25189,25213],"sǎo sào":[25195,25475],"rǎo":[25200,25854,38562],"xī chā qì":[25201],"bān pān":[25203],"bā ào":[25207],"xī zhé":[25208],"zhì sǔn kǎn":[25211],"zhǎo":[25214,27836,29813],"kuáng wǎng zài":[25218],"hú gǔ":[25223,40516,40536],"bǎ bà":[25226],"dǎn shěn":[25228],"nè nì ruì nà":[25232],"zhuā":[25235,27291,31803,33212,39677],"póu":[25236,35026],"zhé shé zhē":[25240],"póu pōu fū":[25241,25418],"pāo":[25243,25291,33068,33826],"ǎo ào niù":[25245],"lūn lún":[25249,25476],"qiǎng qiāng chēng":[25250],"zhǐ zhǎi":[25255],"bù pū":[25258,26600],"yǎo tāo":[25261],"hē hè qiā":[25266],"nǐ ní":[25267],"pī pēi":[25271],"mǒ mò mā":[25273],"chōu":[25277,29352,29355,30259,31704],"jiā yá":[25281],"fú bì":[25282,30032,40349],"zhǎ":[25283,30504,30751,39866,40093],"dān dàn dǎn":[25285],"chāi cā":[25286],"niān":[25288,34091],"lā lá lǎ là":[25289],"bàn pàn":[25292],"pāi":[25293],"līn":[25294],"guǎi":[25296,26548,26618],"tuò tà zhí":[25299],"ào ǎo niù":[25303],"jū gōu":[25304],"pīn pàn fān":[25306],"bài bái":[25308],"bài":[25309,25943,31255,31930,34221,36097,36133,38875],"qiá":[25316],"nǐng níng nìng":[25319],"zé zhái":[25321,25799],"hén":[25323,30165,38798],"kuò guā":[25324],"jié jiá":[25326],"nǐn":[25328],"shuān":[25332,26643,38274,38377],"cún zùn":[25333],"zā zǎn":[25334,26714],"kǎo":[25335,25911,26674,28900,32771],"yí chǐ hài":[25336],"cè sè chuò":[25338],"zhuài zhuāi yè":[25341],"shí shè":[25342],"bāi":[25344,25520],"kuò guāng":[25348],"nòng":[25354,25397,40776],"jiào jiāo":[25357,25934,25945],"kuà kū":[25358],"ná rú":[25360],"tiāo tiǎo":[25361],"dié shè":[25365],"liě":[25368,27615],"yà yǎ":[25372,25495],"wō zhuā":[25373],"xié jiā":[25375,25406],"dǎng dàng":[25377,25803],"zhèng zhēng":[25379,27491,30151],"āi ái":[25384],"tuō shuì":[25385,25437],"tǐ tì":[25390],"suō shā":[25393],"sā shā suō":[25394],"kēng qiān":[25395,25724],"bàng péng":[25399],"ruó ruá":[25404],"jiǎo kù":[25409],"wǔ wú":[25410],"tǒng":[25413,26742,31570,31593,32113,32130,32479],"huò chì":[25415],"tú shū chá":[25416],"lǚ luō":[25419],"shāo shào":[25422,31245],"niē":[25423,25553],"shù sǒng sōu":[25426],"yé yú":[25427],"jué zhuó":[25428],"bù pú zhì":[25431],"zùn":[25432,37516],"lāo":[25438,25736,31913],"sǔn":[25439,25613,27051,31499,31565,31664,37800,38588],"wàn wǎn wān yù":[25445],"pěng":[25447,28110,30351],"shě":[25448],"fǔ fù bǔ":[25452],"dáo":[25455],"luò luǒ wǒ":[25456],"juǎn quán":[25458],"chēn tiǎn":[25461],"niǎn niē":[25467],"ruó wěi ré":[25468],"zuó":[25469,26152,31208,31251,31600,33675,37436],"wò xiá":[25470],"qìng qiàn":[25477],"póu pǒu":[25482],"qiā":[25488,33884],"pái pǎi":[25490],"qiān wàn":[25492],"yè yē":[25494],"niè nǐ yì":[25500],"huò xù":[25501],"yàn shàn yǎn":[25502],"zhěng dìng":[25503],"kòng":[25511,38810],"tuī":[25512,34039,34284],"zōu zhōu chōu":[25515],"tiàn":[25517,33306],"kèn":[25519,35017,35075],"pá":[25521,26487,28502,29228,29750,31586],"guó guāi":[25524],"dǎn shàn":[25528,25763],"chān xiān càn shǎn":[25530],"sāo":[25531,25620,28318,32325,32555,34726,39442,39479,39968,40034,40139],"pèng":[25533,26922,27120,30896,36395],"zhēng kēng":[25537],"jiū yóu":[25538],"jiān jiǎn":[25539,31835],"pì chè":[25546],"sāi zǒng cāi":[25548],"tí dī dǐ":[25552],"zǒng sōng":[25556],"huáng yóng":[25560],"zǎn zuàn":[25565],"xū jū":[25567],"ké qiā":[25570],"chuāi chuǎi chuài tuán zhuī":[25571],"dì tì":[25573],"lá là":[25574],"là":[25575,26955,28290,29902,30220,32715,33240,34635,34674,34847,36770,36771,37982,38260,39694,39931],"jiē qì":[25581],"chòng dǒng":[25584],"dié shé yè":[25586],"jiàn qián jiǎn":[25589],"yé":[25590,29239,29242,29784,37603,37761,38104],"chān":[25600,25723,25881,35047,35164,35224,35271,36799,37587],"gē gé":[25601,25841],"lǒu lōu":[25602,25695],"chōu zǒu":[25610],"chuāi":[25611],"sūn":[25614,27074,29426,29499,33642,33984,34165,34206,39143,39153],"róng náng nǎng":[25617],"péng bàng":[25618],"cuō":[25619,29811,30923,36425,36979,37277],"kē è":[25621],"nù nuò nòu":[25625],"lā xié xiàn":[25626],"qiǔ":[25629,31959],"xiǎn xiān":[25631],"jié zhé":[25641],"pán bān pó":[25643],"bān":[25644,25917,26001,26002,29677,30242,30285,32934,34689,34700,35113,36780,38930,39041],"zhì nái":[25649],"wā wǎ wà":[25650],"huá":[25651,25782,28369,29502,34128,34710,35649,37877,38119,39498,39557,40424],"qiāng qiǎng chēng":[25654],"tián shēn":[25655],"ná nuò":[25659],"èn":[25665],"shè niè":[25668,25885],"bìn":[25672,25839,27553,27567,33169,33231,39628,39637,39657,39682,39699,39714],"shā sà shǎi":[25675],"chǎn sùn":[25676],"jiū liú liáo jiǎo náo":[25678],"féng pěng":[25683],"shuāi":[25684],"dì tú zhí":[25685],"qì jì chá":[25686],"sōu sǒng":[25687],"liǎn liàn":[25689],"gài xì":[25697],"hù chū":[25698],"tàng":[25701,28907,29145,37899],"nái zhì":[25704],"mó mā":[25705],"jiāng qiàng":[25706],"áo qiáo":[25710],"niè chè":[25712],"mán màn":[25713],"chàn cán":[25714],"sè mí sù":[25717],"biāo biào":[25725],"juē jué":[25733],"piē":[25734,26300,27669,30629],"piě piē":[25735],"zǎn zān zēn qián":[25741],"sā sǎ":[25746],"hòng":[25748,35340,35751,38336,39720],"héng guàng":[25751],"niǎn":[25754,25781,25862,28042,28990,30910,31760,36429,36456,36494,36646,36743],"chéng zhěng":[25756],"huī wéi":[25757],"cāo":[25761,25805,31961],"xiāo sōu":[25768],"liáo liāo":[25769],"cuō zuǒ":[25774],"wěi tuǒ":[25777],"cuān":[25786,25883,27718,36479,36517,38009,38249],"qiào yāo jī":[25789],"zhuā wō":[25790],"lèi léi":[25794],"nǎng":[25795,25902,26345,28770],"qíng jǐng":[25807],"kuǎi":[25811,33967],"pǐ bò":[25815],"bò bāi":[25816],"jù jǐ":[25818],"mēng":[25821],"sǒu sòu":[25822],"xǐng":[25828,31669,37266],"cā":[25830],"níng nǐng nìng":[25840],"zhì jié":[25843],"là liè":[25848,29193],"sòu sǒu":[25851],"lì luò yuè":[25853],"tī zhāi zhì":[25855],"pān":[25856,28504,30469,33824],"lèi":[25858,27882,28057,28122,31159,31867,32391,34353,37241,37511,37649,38939,38954,39006,39075],"cā sǎ":[25859],"jùn pèi":[25864],"lì luò":[25866,36498],"là lài":[25867,27380],"lú luó":[25870],"zǎn cuán":[25874],"xiān jiān":[25877],"mí mǐ mó":[25888],"zǎn cuán zàn zuān":[25890],"zuàn":[25893],"lì shài":[25894],"lì luǒ":[25901],"guǐ guì":[25905],"jī qī yǐ":[25906],"fàng":[25918],"wù móu":[25924],"chù shōu":[25930],"gé guó è":[25931],"duó duì":[25939,25946],"duō què":[25952,25962],"sàn sǎn":[25955],"dūn duì":[25958,38246],"qī yǐ jī":[25959],"xiào xué":[25961],"shù shǔ shuò":[25968,25976],"ái zhú":[25969,25971],"xiòng xuàn":[25979],"zhuó zhú":[25984],"yì dù":[25985],"lí tái":[25988],"fěi fēi":[26e3],"yǔ zhōng":[26004],"dòu dǒu":[26007],"wò guǎn":[26017],"tǒu tiǎo":[26018],"dòu":[26019,26794,28002,30168,31398,31431,33072,33651,35910,36887,37078,37208,38295,38360,39190,39294,39717,39718,39722,39724,39725],"yín zhì":[26022],"chǎn jiè":[26042],"wū yū yú":[26044],"yóu liú":[26047],"páng bàng":[26049],"máo mào":[26052],"pī bì":[26055],"xuán xuàn":[26059],"wú mó":[26080],"zǎo":[26089,26531,26630,26839,28577,29866,34235,34299,34468],"gā":[26094],"gàn hàn":[26096],"tái yīng":[26098],"xū xù":[26100],"tūn zhùn":[26109],"wù wǔ":[26111],"pò pèi":[26146],"zòng":[26158,29460,30125,30258,31933,31945,31981,32294],"ǎi":[26169,27600,30702,34108,34297,35690,36535,38701,38724],"huàng huǎng":[26179],"xuǎn":[26181,30307,30316,36873,36984],"xù kuā":[26183],"hǒng":[26190],"shài":[26194,26348],"yūn yùn":[26197,29044],"shèng chéng":[26207,26889,30427],"jǐng yǐng":[26223],"shǎn":[26225,29068,30546,35234,38275,38378,38485,38493],"qǐ dù":[26229],"ǎn àn yǎn":[26235],"wǎng wàng":[26240],"zàn":[26242,26283,29897,29906,29914,31158,35192,35715,35738,36059,36106,36190,36436,37180,37694,37864,39265],"yùn yūn":[26248],"mín mǐn":[26251],"dǔ shǔ":[26255],"shǔ":[26257,26329,28539,30297,31980,32626,34213,34223,34295,34560,34868,35169,35177,40042,40048,40653,40736,40737],"jiǎn lán":[26261],"nuǎn":[26262,29015,39210],"bào pù":[26292],"xī xǐ":[26303],"pù bào":[26333,28689],"qū qǔ":[26354,32054],"gèng gēng":[26356],"hū hù":[26358,38653],"zēng céng":[26365,27239],"céng zēng":[26366,31474],"cǎn qián jiàn":[26369],"qiè hé":[26373],"bì pí":[26375,31110,31507,35048],"yǒu yòu":[26377],"bān fén":[26380,40187],"fú fù":[26381,27921],"fěi kū":[26383,32976],"qú xù chǔn":[26384],"juān zuī":[26392],"huāng máng wáng":[26394],"qī jī":[26399],"tóng chuáng":[26403,27238],"zhá":[26413,29264,31642,34491,35671,37720,38113,38296,38392],"zhú shù shú":[26414],"shù shú zhú":[26415],"zhū shú":[26417],"pǔ pò pō piáo":[26420],"dāo tiáo mù":[26423],"guǐ qiú":[26425],"xiǔ":[26429,28395,28483,31956],"chéng chēng":[26430],"zá":[26434,27823,30776,35149,38609,38620,38629,38900],"yú wū":[26437],"gān gǎn":[26438],"chā chà":[26440],"shān shā":[26441],"cūn":[26449,30388,31476,33189,36358,37032],"rèn ér":[26450,26773],"sháo biāo":[26451],"dì duò":[26453,26532],"gū gài":[26458],"yí zhì lí duò":[26461],"gàng gāng":[26464],"tiáo tiāo":[26465,26781],"mà mǎ":[26473],"sì zhǐ xǐ":[26475],"yuán wán":[26476,34454],"bèi fèi":[26478],"shū duì":[26488],"niǔ chǒu":[26491],"wò yuè":[26498,33234],"máo":[26502,27611,27650,28213,29286,30683,32606,33541,33542,34661,34762,36574,37205,37502,37672,38170,39654,40348],"pī mì":[26504],"àng":[26506,30414,37280],"fāng bìng":[26507],"hù dǐ":[26513],"xín":[26516,35153,37908,39733],"yāo yǎo":[26518],"ě è":[26521],"zhī qí":[26525],"cōng zōng":[26526,27141],"xiān zhēn":[26542],"tái sì":[26545],"gǒu jǔ gōu":[26552],"bāo fú":[26553],"yì xiè":[26555,26663],"tuó duò":[26561,39345,39364,39534],"yí duò lí":[26562],"nǐ chì":[26565],"pán bàn":[26568,36312],"yǎng yàng yāng yīng":[26573],"fù fū fǔ":[26574],"bǎi bó bò":[26575],"mǒu":[26576],"sháo shào":[26582],"zhè":[26584,27164,27993,28123,34071,34757,36889,40403,40551],"yòu yóu":[26586,27390],"guì jǔ":[26588],"zhà zuò":[26590],"dié zhì":[26595,30512],"zhā zǔ zū":[26596],"chá zhā":[26597,26619],"āo ào":[26602,36586],"bā fú pèi bó biē":[26605],"duò zuó wù":[26606],"bì bié":[26610],"zhù chù":[26615],"bēi pēi":[26616],"shì fèi":[26617],"shān zhà shi cè":[26629],"lì yuè":[26638,27359],"qì qiè":[26644,30732],"qī xī":[26646,36426],"guā kuò":[26653],"bīng bēn":[26655],"xiào jiào":[26657],"jiàn zùn":[26667,35e3],"yǒu yù":[26671],"hé hú":[26680],"gēn":[26681,36319],"zhī yì":[26682],"gé gē":[26684],"héng háng":[26689],"guàng guāng":[26692],"yí tí":[26699,33617],"sāng":[26705,26706,27105],"jú jié":[26708],"yú móu":[26713],"ráo náo":[26721,27208],"guì huì":[26727,27292],"chén zhèn":[26733],"tīng yíng":[26735],po:[26738],"bèn fàn":[26739],"fēng fèng":[26747,33873],"sù yìn":[26752],"tǐng tìng":[26755],"xuān juān xié":[26763],"tú chá":[26764],"āo yòu":[26766],"kuǎn":[26785,27445,27454,27456],"shāo sào":[26786],"qín chén cén":[26787],"lí sì qǐ":[26793],"chān yán":[26804],"bīn bīng":[26809,27103,27315],"táo chóu dào":[26812],"cōng sōng":[26823],"gùn hùn":[26829],"dé zhé":[26831],"pái bèi pèi":[26833],"bàng pǒu bèi bēi":[26835],"dì dài tì":[26851],"sēn":[26862,26926,27118,35138],"rěn shěn":[26863],"léng lēng líng":[26865],"fú sù":[26868],"zōu sǒu":[26871],"zōu":[26872,31619,32197,35535,35833,37049,37104,37138,37177,38508,39478,39546,39915,40112,40640,40817,40826],"zhào zhuō":[26873],"chēn shēn":[26877],"jiē qiè":[26884],"yǐ yī":[26885],"chóu zhòu diāo":[26886],"qiāng kōng":[26892],"zhuī chuí":[26894],"bēi pí":[26897],"mēn":[26906],"quān juàn quán":[26918],"duǒ chuán":[26927],"wěi huī":[26930],"jiǎ jiā":[26933],"hán jiān":[26935],"shèn zhēn":[26937],"yàn yà":[26939],"zhā chá":[26946],"guō kuǎ":[26951],"jí zhì":[26966],"kǔ hù":[26971],"yóu yǒu":[26978],"sǒng cōng":[26980],"yuán xuàn":[26981],"yǎng yàng yīng":[26983],"pián":[26985,33020,33089,36038,36417,39394,39432,39560,39615],"dié yè":[26986],"dùn shǔn":[26991],"còu zòu":[26993],"dì dǐ shì":[26996],"kǎi jiē":[26999],"róu ròu":[27002],"lè yuè":[27005],"wēn yùn":[27013,38832],"lǘ":[27016,27354,27648,33186,34264,38317,38398,39522,39540],"shén":[27018,31070,37486,39984],"bī pi":[27020],"zhǎn niǎn zhèn":[27024],"fú fù bó":[27025],"jiàn jìn":[27031],"bǎng bàng":[27036],"shā xiè":[27037,27175],"nòu":[27080,32808,37778,37918],"qiǎn lián xiàn":[27087],"gàng":[27091,28981,28985,31611],"gāo":[27092,27129,27248,27356,30590,31705,31957,32660,33263,38879,39227,39640,39641,40398,40433,40731],"diān zhěn zhēn":[27097],"kǎn jiàn":[27099],"xí dié":[27106],"jī guī":[27107],"róng yōng":[27110],"tuán shuàn quán":[27115],"qì sè":[27117],"cuī zhǐ":[27119],"yǒu chǎo":[27121],"màn wàn":[27134],"lí chī":[27142],"léi lěi":[27151,27345,30988],"cháo jiǎo chāo":[27156],"chēng táng":[27160],"jiū liáo":[27163],"mó mú":[27169],"niǎo mù":[27170],"héng hèng":[27178,27243],"xuě":[27184,33188,33373,36684,38634,40008,40149],"fá fèi":[27203],"rùn":[27213,28070,28516,33206,38287,38304,38384],"zhǎn jiǎn":[27215],"shùn":[27219,30618,30636,33308,34147,38918,39034,39690],"tuí dūn":[27220],"táng chēng":[27222],"sù qiū":[27226],"tán diàn":[27229],"fén fèn fèi":[27240],"rǎn yān":[27242],"cū chu":[27259],"shū qiāo":[27262],"píng bò":[27288],"zhái shì tú":[27297],"biǎo biāo":[27302],"qiān lián":[27318],"nǐ mí":[27319],"jiàn kǎn":[27323],"nòu ruǎn rú":[27325],"jī jì":[27333,31144],"huǎng guǒ gǔ":[27342],"lǜ chū":[27350],"miè mèi":[27351],"ōu":[27353,27431,27472,27572,27590,29935,29964,33170,34290,35635,35764,37826,40206,40407,40485],"zhù zhuó":[27361],"jué jì":[27373],"huái guī":[27376],"chán zhàn":[27395],"wéi zuì":[27400],"cáng":[27404,38006],"yù yì":[27429],"chù qù xì":[27434],"kài ài":[27436],"yì yīn":[27437],"xì kài":[27439],"shuò sòu":[27446],"ǎi ēi éi ěi èi":[27448],"qī yī":[27449],"chuā xū":[27451],"chǐ chuài":[27452],"kǎn qiàn":[27455],"kǎn kè":[27457],"chuǎn chuán":[27458],"yīn yān":[27461],"jìn qūn":[27471],"pēn":[27477],"xū chuā":[27480],"xī shè":[27481],"liǎn hān":[27483],"zhì chí":[27501],"sè shà":[27504],"sǐ":[27515],"wěn mò":[27518],"piǎo":[27533,30379,30623,37285,39008],"qíng jìng":[27537],"fǒu bó":[27541],"zhí shi":[27542],"yè yān yàn":[27543],"hūn mèi":[27545],"chòu":[27552,33264,36954],"kuì huì":[27560,28291,28528],"cuàn":[27561,29110,29224,31388,31428,31713,31762],"yīn yān yǐn":[27575],"qìng kēng shēng":[27576],"yáo xiáo xiào":[27581],"gū gǔ":[27586,34500],"guàn wān":[27596],"dú dài":[27602],"xún xùn":[27621],"mú":[27626,27649],"dòu nuò":[27629],"sāi suī":[27640],lu:[27655],"sào":[27657,30233,30658,39646],"shì zhī":[27663],"dī dǐ":[27664],"máng méng":[27667],"yáng rì":[27676],"shuǐ":[27700,27701,27706,38294],"zhěng chéng zhèng":[27702],"tǔn":[27709],"fán fàn":[27710],"guǐ jiǔ":[27711],"bīn pà pā":[27715],"zhuó què":[27723],"dà tài":[27727],"pìn":[27734,29277,32856],"hàn hán":[27735,39343],tu:[27746],"tāng shāng":[27748,28271],"zhī jì":[27749],"gàn hán cén":[27765],"wèn mén":[27766],"fāng pāng":[27768],"hǔ huǎng":[27771],"niú yóu":[27772],"hàng":[27782],"shěn chén":[27784],"dùn zhuàn":[27788],"nǜ niǔ":[27793],"méi mò":[27794,27809],"tà dá":[27795],"mì wù":[27797],"hóng pāng":[27799],"shā shà":[27801],"zhuǐ zǐ":[27805],"ōu òu":[27812,28442],"jǔ jù":[27822],"tuō duó":[27824],"mǐ lì":[27829],"yí chí":[27830],"xiè yì":[27844],"bó pō":[27850],"mì bì":[27852,31192],"chù shè":[27855],"yōu yòu āo":[27857],"pēng píng":[27865,30801],"pào pāo":[27873],"ní nì":[27877,31196],"yuè sà":[27879],"jué xuè":[27884,30118],"lóng shuāng":[27895,28711],"luò pō":[27898,28668],"zé shì":[27901,28580],"sǎ xǐ":[27922],"sè qì zì":[27923],"xǐ xiǎn":[27927],"kǎo kào":[27928],"àn yàn è":[27933],"lěi lèi":[27937],"qiè jié":[27951],"qiǎn jiān":[27973],"jì jǐ":[27982,28168,28639,32426],"hǔ xǔ":[27986,28408],"jùn xùn":[27994,28652],"yǐng chéng yíng":[28007],"liàn lì":[28016],"féng hóng":[28018,28292],"jiǒng jiōng":[28027],"suī něi":[28029],"yǒng chōng":[28044],"tūn yūn":[28050],"wō guō":[28065,28198],"hēng":[28069,33053],"zhǎng zhàng":[28072,28466],"shòu tāo":[28077],"shuàn":[28078,33128],"kōng náng":[28083],"wò wǎn yuān":[28084],"tuō tuò":[28086],"wō":[28089,29479,31389,31401,33716,33845,34583,34680,36370],"qiè jí":[28097],"guǒ guàn":[28105],"lín lìn":[28107,29532,30084],"tǎng chǎng":[28108],"nào chuò zhuō":[28118],"péng píng":[28124],"féi":[28125,32933,33107,34608],"pì pèi":[28128],"niǎn shěn":[28144],"biāo hǔ":[28146],"chún zhūn":[28147],"hùn hún":[28151],"qiǎn":[28154,32382,32561,32951,33153,34616,35700,35892,36963,37971],"wèn mín":[28162],"rè ruò luò":[28163],"dú dòu":[28174,28678,35835],"jiàn jiān":[28176,28293,28472,28666],"miǎn shéng":[28177,28576],"nuǎn nuán":[28188],"qiú wù":[28190],"tíng tīng":[28191],"dì tí dī":[28199],"gǎng jiǎng":[28207],"hōng qìng":[28217],"tuān":[28237,29011],"huì mǐn xū":[28239],"xǔ xù":[28241],"pén":[28243,29931,30406,33872],"mǐn hūn":[28259],"tuàn nuǎn":[28266],"qiū jiǎo":[28267,28268],"yān yīn":[28270],"bàn pán":[28276],"zhuāng hún":[28279],"yàn guì":[28302],"lián liǎn nián xián xiàn":[28307],"dá tǎ":[28314],"liū liù":[28316,28561,36435],"lùn":[28323],"mǎ":[28324,29368,29505,29595,29802,30721,30908,36964,37815,39340,39532,39970,40396],"zhēn qín":[28337],"nì niào":[28346],"chù xù":[28352,30044],"wěng wēng":[28355],"hào xuè":[28360],"qì xì xiē":[28362],"xíng yíng":[28366],"zé hào":[28380],"piāo piào piǎo":[28418],"cóng sǒng":[28430],"féng péng":[28456],"luò tà":[28463],"pēng bēn":[28464],"chóng shuāng":[28468],"huǒ kuò huò":[28471],"liáo liú":[28475],"cuǐ cuī":[28476],"cóng zǒng":[28480],"cóng zōng":[28488],"pì piē":[28494],"dàng xiàng":[28498],"huáng guāng":[28514],"liáo lào lǎo":[28518],"cōng zòng":[28520],"zhí zhì":[28522],"tān shàn":[28524],"tú zhā":[28531],"sàn sǎ":[28533],"hēi":[28534,40657,40658],"chéng dèng":[28548,28691],"cūn cún":[28554],"péng pēng":[28558],"hòng gǒng":[28562,37566],"wàn màn":[28587],"kuài huì":[28590],"guō wō":[28612],"pēn fén":[28614],"jí shà":[28616],"huì huò":[28618],"dǐng tìng":[28622],"mǐ nǐ":[28628],"bì pì":[28638],"cuì zuǐ":[28642],"hù huò":[28649],"ǎi kài kè":[28653],"wěi duì":[28667,28706],"zàn cuán":[28669,28754],"yǎng yàng":[28673],"wǎng wāng":[28679],"mò miè":[28686,30492],"suǐ":[28705,33208,39635],"huái wāi":[28708],"zùn jiàn":[28723],"yīng yǐng yìng":[28724],"ráng ràng":[28732],"shuàng":[28736],"zhuó jiào zé":[28738],"sǎ":[28753,35375,38776],"luán luàn":[28755],"dǎng tǎng":[28761],"xún quán quàn":[28773],"huǒ biāo":[28780],"zhà yù":[28793],"fén bèn":[28803],"jiǒng guì":[28805],"pàng fēng":[28816],"quē":[28820,32570,32572,33947],"biān":[28830,29048,29954,30765,31550,31663,31849,32232,32534,34649,37001,37002,37757,38829,39934,39935,40138],"zhāo zhào":[28836],"zhuō chù":[28842],"pào páo bāo":[28846],"páo fǒu":[28848],"shǎn qián shān":[28854],"zhà zhá":[28856],"jiǎo yào":[28868],"quǎn":[28871,29356,29357,30030,32163,32507,34375],"yàng yáng":[28874],"lào luò":[28889],"huí huǐ":[28896],"rè":[28909,29105],"fú páo":[28912],"xiè chè":[28914,28942],"yàn shān":[28923],"hūn xūn":[28932],"kào":[28933,29330,37548,38096,38752,39859,39884,40083],"juān yè":[28934],"jùn qū":[28940],"tāo dào":[28952],"chǎo jù":[28963],"wò ài":[28965],"zǒng cōng":[28967],"xī yì":[28972],"xìn xīn":[28974],"chāo zhuō":[28975],"xiǒng yīng":[28984,28989],"kuǐ":[28995,36332,36446,38925],"huī yùn xūn":[28999],"jiǎo qiāo":[29005],"qián shǎn shān":[29012],"xī yí":[29013],"shà shā":[29022],"yè zhá":[29024],"yáng yàng":[29036],"ēn yūn":[29054],"yūn yǔn":[29061],"hè xiāo":[29063],"xióng":[29066,29067,38596],"xūn xùn":[29071,29195],"gòng":[29077,36002,36129],"liū":[29080],"cōng zǒng":[29084],"lù āo":[29085],"shú shóu":[29087],"fēng péng":[29090],"cuǐ suī":[29091],"tēng":[29093,33199,40735],"yùn yù":[29096],"áo āo":[29100],"hàn rǎn":[29103],"ōu ǒu":[29104],"huáng huǎng":[29119],"chǎn dǎn chàn":[29120],"jiāo zhuó qiáo jué":[29131],"yàn yān":[29141],"tài liè":[29156],"āo":[29194],"yàn xún":[29203],"jué jiào":[29213,35216,35226,35258,35273],"lǎn làn":[29222],"zhuǎ zhǎo":[29226],"zhǎo zhuǎ":[29227],"fù fǔ":[29238],"diē":[29241,35130,36300],"zāng":[29250,32664,33255,36045,36056,36115,36124,36163,39634],"piàn piān":[29255],"biān miàn":[29265],"bǎng":[29267,32129,32465],"yǒu yōng":[29271],"chēng chèng":[29274,31424],"niú":[29275,29276],"jiū lè":[29278],"mù móu":[29279],"māng":[29284],"gē qiú":[29291],"yòu chōu":[29296],"tè zhí":[29318],"bēn":[29319,37659,38171],"jiān qián":[29325,29610],"má":[29336,30194,34100,34759,40635],"máo lí":[29339],"bá quǎn":[29358],"zhuó bào":[29363],"àn hān":[29364],"kàng gǎng":[29370],"pèi fèi":[29371],"fān huān":[29375],"kuáng":[29378,29381,35473,35827,36566,36576,40287],"yí quán chí":[29387],"xīng shēng":[29388],"tuó yí":[29391],"kǔ":[29404,33510],"huán huān":[29407],"hé mò":[29410],"tà shì":[29415],"máng dòu":[29429],"xī shǐ":[29430],"suān":[29435,30176,37240],"bài pí":[29448],"jiān yàn":[29455,35939],"yī yǐ":[29463],"yá wèi":[29466],"cāi":[29468],"māo máo":[29483,35987],"chuàn chuān":[29485],"tuān tuàn":[29487,35986],"yà jiá qiè":[29488],"hè xiē gé hài":[29490],"biān piàn":[29493,29553],"bó pò":[29500],"háo gāo":[29515],"fén fèn":[29526],"yào xiāo":[29535],"shuò xī":[29537],"gé liè xiē":[29542],"nòu rú":[29555],"náo nǎo yōu":[29558],"ráng":[29565,29924,31155,31331,31344,34328,36511,39716],"náo yōu":[29567],"lǜ shuài":[29575],"wáng wàng":[29579],"yáng chàng":[29594],"mín wén":[29599],"bīn fēn":[29602],"mén yǔn":[29607],"qiāng cāng":[29617,29810,31724],"án gān":[29621],"xuán xián":[29625],"cī cǐ":[29628,36304],"yí tāi":[29638],"zǔ jù":[29639],"fà":[29648,29754,34143,39658,39662],"yín kèn":[29666],"huī hún":[29682],"xuán qióng":[29697],"fú fū":[29704],"bǐng pín":[29717],"cuì sè":[29719],"yù wéi":[29727],"tiǎn tiàn":[29728],"zhuó zuó":[29730],"běng pěi":[29731],"guǎn":[29743,29869,30191,31590,31649,33304,36648,37671,39208,39302,40164],"hún huī":[29759],"xié jiē":[29774],"chàng dàng yáng":[29778],"tiàn zhèn":[29809],"bīn pián":[29816,29880],"tú shū":[29817],"cuǐ":[29824,30368,36257],"zǎo suǒ":[29829],"jué qióng":[29850],"lú fū":[29879],"jì zī":[29886],"suí":[29901,32143,32485,36928,38543,38568,39620],"mí xǐ":[29909],"qióng wěi wèi":[29911],"huán yè yà":[29915],"bó páo":[29919],"zhí hú":[29921],"piáo":[29922,38365],"wǎ wà":[29926],"xiáng hóng":[29928],"wèng":[29934,29973,32587,34169,40774],"shèn shén":[29978],"ruí":[29988,32204,34148],"yòng":[29992,30781,33498,33935,37279],"shuǎi":[29993],"béng":[29997,29998],"yóu zhá":[30004],"diàn tián shèng":[30008],"tǐng dīng":[30010,30012],"zāi zī":[30014],"bì qí":[30017],"dá fú":[30039],"cè jì":[30047],"zāi zī tián":[30048],"zhì chóu shì":[30052],"fān pān":[30056,30058],"shē yú":[30060],"dāng dàng dǎng":[30070],"jiāng qiáng":[30086],"pǐ yǎ shū":[30091],"jié qiè":[30092],"yí nǐ":[30097],"nè":[30098,30514,35365,35767],"gē yì":[30105],"nüè yào":[30111,30247],"lì lài":[30112,30296],"yǎ xiā":[30120],"xuē":[30134,33926,34203,36773,36778,38772,38846],"dǎn da":[30136],"fá biǎn":[30138],"fèi féi":[30143,30193],"shān diàn":[30145],"téng chóng":[30155],"tōng tóng":[30156],"wěi yòu yù":[30159],"tān shǐ":[30161],"pū pù":[30177,37610],"bēng péng":[30189],"má lìn":[30195],"tiǎn diàn":[30198],"ān yè è":[30199],"kē ē":[30206],"zhì chì":[30216],"jiǎ xiá xiā":[30229],"lěi huì":[30243],"chài cuó":[30245],"diān chēn":[30248],"da dá":[30249],"biě biē":[30250],"qué":[30264],"dàn dān":[30281],"guì wēi":[30288],"nòng nóng":[30289],"biē biě":[30303],"bō bǒ":[30327],"bái":[30333],"jí bī":[30336],"de dì dí dī":[30340],"pā bà":[30341],"gāo háo":[30347],"gāo yáo":[30352],"lì luò bō":[30378],"zhā cǔ":[30395],"zhāo zhǎn dǎn":[30397],"jiān jiàn":[30417,30435,37627,38388,38828],"gài gě hé":[30422],"máng wàng":[30451],"yuǎn":[30454,36922,36960],"tián xián":[30455],"xiāng xiàng":[30456],"dǔn":[30457,36280,36489],"xì pǎn":[30459],"shěng xǐng":[30465],"yún hùn":[30467],"miǎn miàn":[30468],"kàn kān":[30475],"yìng yāng yǎng":[30479],"yǎo āo ǎo":[30481],"jū xū kōu":[30487],"yí chì":[30489],"dié tì":[30499],"bǐng fǎng":[30506],"pàng pán":[30507],"mī mí":[30511,30599],"xuàn shùn xún":[30516],"tiào":[30522,31900,31990,35228,36242],"zhe zhuó zháo zhāo":[30528],"qiáo shào xiāo":[30532],"cuó zhuài":[30537],"gùn":[30548,35636],"suì zuì":[30559],"pì bì":[30565,31275,36767],"yì zé gāo":[30570],"xǐng xìng":[30578],"guì wèi kuì":[30598],"kòu jì":[30601],"qióng huán":[30607],"mán mén":[30610,30622],"diāo dōu":[30615],"lou lóu lǘ":[30620],"shùn rún":[30628],"liào liǎo":[30637,38028],"jiàn xián":[30639],"wǔ mí":[30644],"guì kuì":[30646],"nǐng chēng":[30659],"huò yuè":[30662],"mēng méng":[30663],"kuàng guō":[30668],"guàn quán":[30676],"mǎn mán":[30677],"jīn guān qín":[30684],"jīn qín guān":[30685],"yù xù jué":[30686],"jiǎo jiáo":[30699,30703],"duǎn":[30701],"shí dàn":[30707],"gāng qiāng kòng":[30716],"huā xū":[30729],"pīn bīn fēn":[30735],"yán yàn":[30740,30799],"luǒ kē":[30754],"fú fèi":[30761,31536],"zhǔ zhù":[30763],"lá lì lā":[30764],"kuāng guāng":[30788],"gè luò":[30796],"shuò shí":[30805,30889],"wèi wéi ái":[30809],"què kè kù":[30814],"mǎng bàng":[30821],"luò lòng":[30822],"yǒng tóng":[30823],"nüè":[30840,34384],"kēng kěng":[30843],"yān yǎn":[30845],"zhuì chuí duǒ":[30846],"kōng kòng":[30847],"zòng cóng":[30850],"jiān zhàn":[30858],"lù liù":[30860,38470],"què xī":[30863],"lún lǔn lùn":[30870],"náo gāng":[30873],"jié yà":[30883],"wèi wěi":[30888],"tí dī":[30894],"chá chā":[30900],"qiāo què":[30907],"sù xiè":[30911],"liú liù":[30914,36955,37798,39311],"sī tí":[30915],"bàng páng":[30917],"huá kě gū":[30918],"wěi kuǐ":[30920],"xiá qià yà":[30925],"lián qiān":[30927],"wèi ái gài":[30929],"lá lā":[30934],"áo qiāo":[30941],"pēng pèng":[30942,38299],"yīn yǐn":[30948],"lěi léi":[30949],"mó mò":[30952],"qì zhú":[30953],"láo luò":[30961],"pán bō":[30971],"jí shé":[30972],"hé qiāo qiào":[30985],"kè huò":[30986],"què hú":[30992],"è qì":[31e3],"cǎ":[31012,31032],"xián xín":[31013],"léi lěi lèi":[31015],"yán yǎn":[31033],"qí zhǐ":[31047,34452],"bēng fāng":[31050],"bì mì":[31061],"suàn":[31064,31495,31597,31639,33948],"piào piāo":[31080],"jì zhài":[31085],"shuì lèi":[31089],"jìn jīn":[31105],"chán shàn":[31109],"yáng shāng":[31123],"zhī zhǐ tí":[31124],"shàn chán":[31146],"yú yù ǒu":[31162],"zǐ zì":[31172],"chá ná":[31173],"zhǒng zhòng chóng":[31181],"hào mào":[31183],"kù kū":[31193],"zū":[31199,33861],"chèng":[31204,31338],"huó kuò":[31214,31219],"chēng chèn chèng":[31216,31281],"shì zhì":[31218,37556],"fù pū":[31231],"xùn zè":[31236],"tú shǔ":[31244],"zhùn zhǔn":[31253],"jī qí":[31256,32168,35309],"léng líng":[31260],"zuì zú sū":[31265],"xì qiè":[31271,37060],"zhǒng zhòng":[31278],"zōng zǒng":[31279],"xián jiān liàn":[31284],"zī jiū":[31285],"jī qǐ":[31293],"ròng":[31299],"shān cǎn cēn":[31303],"mén méi":[31304],"jǐ jì":[31318],"xiāo rào":[31320],"zhuō bó":[31323],"tóng zhǒng zhòng":[31324],"zuō":[31325],"biāo pāo":[31342,34280],"zhuō jué":[31345],"cuán zàn":[31347],"kōng kòng kǒng":[31354],"yū yǔ":[31355],"zhǎi":[31364,37465],"báo":[31367,38649],"kū zhú":[31371],"jiào liáo liù":[31372],"wā guī":[31376],"tiǎo yáo":[31381],"xūn yìn":[31400],"yà yē":[31403],"tián diān yǎn":[31412],"chāo kē":[31420],"kuǎn cuàn":[31421,31422],"chù qì":[31440],"qǔ kǒu":[31448],"jìng zhěn":[31463],"kǎn kàn":[31479],"zhú dǔ":[31482],"lè jīn":[31483],"zhuì ruì":[31501],"háng hàng":[31504],"cén jìn hán":[31506],"dā xiá nà":[31514],"zé zuó":[31534],"lóng lǒng":[31548,31725,31840,36504,40851],"zhù zhú":[31569,31689],"dá dā":[31572,33605],"shāi":[31579,31721,31745,31853],"yún jūn":[31584],"láng làng":[31588,37070,38406],"zhì zhǐ":[31595],o:[31613],"póu bù fú pú":[31617],"pái bēi":[31620],"gè":[31623,34428,37499,38124],"tái chí":[31624],"guǎi dài":[31625],"zhào dào":[31628],"jīng qìng":[31632],"lín lǐn":[31638],"jùn qūn":[31640],"shī yí":[31671,37366],"yuē yào chuò":[31673],"xiāo shuò qiào":[31678],"gōng gǎn lǒng":[31714],"páng péng":[31715],"zhuó huò":[31719],"jiǎn jiān":[31727],"dí zhú":[31732],"zān cēn cǎn":[31736],"zhuàn suǎn zuàn":[31737],"piǎo biāo":[31739],"guó guì":[31746],"cè jí":[31758],"mì miè":[31770],"shāi sī":[31771],"sǔn zhuàn":[31784],"gàn gǎn":[31795],"bò bǒ":[31800],"bó bù":[31807],shi:[31810],"zhēn jiān":[31816],"zhuàn zuǎn":[31825],"fān pān biān":[31827],"sǒu shǔ":[31828],"zuǎn":[31851,32356,32386,32393,32408,32565],"nǚ":[31865,37369,38037],"shā chǎo":[31878],"kāng jīng":[31879],"fěn":[31881,40698],"cū":[31895,35285,40577,40580,40612],"nián zhān":[31896],"cè sè":[31907],"zhōu yù":[31909],"shēn sǎn":[31937],"biān biǎn":[31940,33849],"miàn":[31942,38754,38755,40618,40619,40629,40634],"hú hū hù":[31946],"gǔ gòu":[31955],"mí méi":[31964],"sǎn shēn":[31965,31971],"zāo":[31967,36455,36973,37289],"mì sī":[31992],"jiū jiǔ":[31994],"xì jì":[31995,32363],"zhēng zhěng":[31997],"chà chǎ":[32001,34921],"yuē yāo":[32004,32422],"hóng gōng":[32005,32418],"hé gē":[32007,32421],"wén wèn":[32011,32441],"fóu":[32017],"jì jié jiè":[32018],"pī pí bǐ":[32021,32432],"jīn jìn":[32031],"zhā zā":[32037,32046],"hā":[32038],"fū fù":[32040],"chōu chóu":[32044],"lèi léi lěi":[32047],"bō bì":[32052],"tiǎn zhěn":[32062],"jiōng jiǒng":[32069],"jié jiē":[32080,32467,33410],"guà kuā":[32083],"bǎi mò":[32084],"gēng huán":[32089],"jié xié":[32092],"quán shuān":[32095],"gǎi ǎi":[32096],"luò lào":[32097,32476],"bīng bēng pēng":[32099],"gěi jǐ":[32102,32473],"tóng tōng dòng":[32103],"tiào diào dào":[32105],"lěi lèi léi":[32107],"gāi hài":[32111],"chī zhǐ":[32122],"wèn miǎn mán wàn":[32123],"huán huàn wàn":[32132],"qīn xiān":[32133],"tì tí":[32136],"yán xiàn":[32150],"zōng zèng zòng":[32156],"chēn lín":[32157],"zhǔn zhùn":[32167],"qiàn qīng zhēng":[32170],"qìng qǐ":[32174],"lún guān":[32184,32438],"chuò chāo":[32189,32496],"tián tǎn chān":[32194],"lǜ lù":[32209,32511],"ruǎn ruàn":[32219],"jí qī":[32221],"zhòng chóng":[32223,37325],"miáo máo":[32226],"xiè yè":[32228],"huǎn":[32233,32531],"gēng gèng":[32234,32262],"tōu xū shū":[32240],"zōng zòng":[32245,32332],"yùn gǔn":[32247],"guā wō":[32250],"yùn yūn wēn":[32252,32277],"bāng bàng":[32269],"gǔ hú":[32270,40379],"cī cuò suǒ":[32274],"cuī shuāi":[32279],"róng rǒng ròng":[32281],"zài zēng":[32289],"cài":[32297,33756,34081],"féng fèng":[32299],"suō sù":[32302,32553],"yǎn yǐn":[32303,37203],"zòng zǒng":[32305,32437],"zhuàn juàn":[32307],"mò mù":[32312,33707],"piǎo piāo":[32313,32549],"fán pó":[32321],"bēng bèng":[32323],"móu miù miào liǎo":[32326],"yáo yóu zhòu":[32327],"zēng zèng":[32338,32559],"jú jué":[32344],"chuō chuò":[32347],"zūn zǔn":[32348],"rào":[32350,32469,36982],"chǎn chán":[32351],"huì huí":[32354,32523,34289],"qiāo sāo zǎo":[32368],"jiǎo zhuó":[32371,32564],"dàn tán chán":[32373],"nǒng":[32375],"pú fú":[32384],"yào lì":[32389],"rǎng xiāng":[32405],"lí sǎ xǐ lǐ":[32410],"xiān qiàn":[32420],"jīng jìng":[32463],"tí tì":[32488],"bēng běng bèng":[32503],"zōng zèng":[32508],"jī qī":[32521],"wēn yùn yūn":[32522],"fèng féng":[32541],"shuāi cuī suī":[32542],"miù móu liáo miào mù":[32554],"qiāo sāo":[32562],"fǒu":[32566,32569,32571,38636,40192],"bà ba pí":[32610,32631],"guà guǎi":[32619],"yáng xiáng":[32650,32655],"měi gāo":[32665],"yì xī":[32667],"qiǎng qiān":[32671],"qiāng kòng":[32683],"qián xián yán":[32684],"nóu":[32698],"hóng gòng":[32702],"pī bì pō":[32717],"qú yù":[32721],"ké":[32727],"qiào qiáo":[32728],"zhái dí":[32735],"dào zhōu":[32738],"hóu qú":[32757],"shuǎ":[32781],"ruǎn nuò":[32782],"ér nài":[32783],"zhuān duān":[32785],"pá bà":[32793],"chí sì":[32795],"qù chú":[32797],"lún lǔn":[32803],"jí jiè":[32804],"tāng tǎng":[32805],"pǎng":[32810,35243],"zhá zé":[32811],"yē yé":[32822],"yún yíng":[32826],"wà tuǐ zhuó":[32841],"ér nǜ":[32847],"tiē zhé":[32849],"dǐ zhì":[32860],"qié":[32890],"nǐ jiàn":[32891],"lèi lē":[32907],"cào":[32911,35161,37173,40732],"bó dí":[32913],"xiào xiāo":[32918],"dù dǔ":[32922],"chāi":[32926,37365,38039],"hán qín hàn":[32931],"pàng pán pàn":[32936,32982],"zhūn chún":[32939],"āng":[32942,39599],"yù yō":[32946],"pí bǐ bì":[32950],"fèi bì":[32967],"bèi bēi":[32972],"fèi zǐ":[32975],"píng pēng":[32979,33529],"fū fú zhǒu":[32981],"shèng shēng":[32988],"kuà":[33007,36328,39611],"gǎi hǎi":[33010],"gē gé gā":[33011],"néng nài":[33021],"guī kuì":[33023],"mài mò":[33033],"zāng zàng":[33039],"jiǎo jué":[33050,35282],"cuǒ":[33054],"de te":[33062],"zuī juān":[33063],"něi":[33070,33095,39186,39297,39870,39896],"pú fǔ":[33071],"niào":[33074],"shuí":[33085],"guò":[33090,36942,37945],"là xī":[33098],"yān ā":[33100],"gāo gào":[33167],"lù biāo":[33172],"chuái":[33175],"zhuān chuán chún zhuǎn":[33182],"chuài":[33194,36409],"fán pán":[33200],"wǔ hū":[33204],"shān dàn":[33211],"tún":[33216,33227,34508,35928,35930,36568,38677,39145,39272,39784,40064,40663],"bì bei":[33218],"là gé":[33224],"sào sāo":[33226],"nào":[33233,38297,38393,39719],"ní luán":[33249],"qiān xián":[33252],"guàng jiǒng":[33254],"guǎng jiǒng":[33257],"chòu xiù":[33261],"mián biān":[33265],"dié zhí":[33271],"zhī jìn":[33272],"shè shě":[33293],"pù":[33302,33303],"bān bō pán":[33324],"kuā":[33343],"gèn gěn":[33390],"sè shǎi":[33394],"fú bó":[33396],"jiāo qiú":[33405],"chāi chā":[33414],"sháo què":[33421],"hù xià":[33424],"zì zǐ":[33427],"huì hū":[33428],"tún chūn":[33434],"jiè gài":[33445],"xù zhù":[33447],"yuán yán":[33451],"xīn xìn":[33455],"lún huā":[33458],"wù hū":[33460],"gōu gǒu":[33462],"mào máo":[33468],"fèi fú":[33470],"chán yín":[33474],"qiē":[33478],"sū sù":[33487],"tiáo sháo":[33493],"lì jī":[33497],"kē hē":[33499],"jù qǔ":[33507],"ruò rě":[33509],"zhù níng":[33511],"pā bó":[33513],"xiú":[33516],"zhǎ zuó":[33522],"jū chá":[33524],"nié":[33526],"shēng ruí":[33532],"qié jiā":[33540],"zǐ cí":[33544],"qiàn xī":[33564],"chǎi":[33565],"fá pèi":[33591],"ráo":[33627,34136,35155,39250,39286],"yíng xíng":[33637],"qián xún":[33640,34113],"yìn yīn":[33643],"hé hè":[33655],"shā suō":[33678],"péng fēng":[33681],"shēn xīn":[33688],"wǎn guān guǎn":[33694],"yóu sù":[33700],"shāo xiāo":[33702,34552],"làng liáng":[33704],"piǎo fú":[33705],"wèn wǎn miǎn":[33708],"shì shí":[33715,33940],"tù tú":[33717],"xiān liǎn":[33718,34207],"wǎn yù":[33728],"zōu chù":[33734],"lù lǜ":[33737],"jūn jùn":[33740],"niè rěn":[33741],"zī zì zāi":[33745],"tú tù":[33759],"jiē shà":[33768],"qiáo zhǎo":[33772],"tái zhī chí":[33773],"fēi fěi":[33778,34586],"qín qīn jīn":[33779],"zū jù":[33785,33961],"lǐn má":[33787],"tián tiàn":[33790],"tiē":[33820,36028,36148],"luò là lào luō":[33853],"zhù zhuó zhe":[33879],"shèn rèn":[33882],"gě gé":[33883],"jùn suǒ":[33904],"kuì kuài":[33929],"rú ná":[33944],"méng mēng měng":[33945],"yuán huán":[33949],"xú shú":[33955],"xí xì":[33973],"mì míng":[33986],"sōu sǒu":[33987],"gài gě hé hài":[33995],"yǎo zhuó":[34004],"diào tiáo dí":[34023],"xū qiū fū":[34034],"zí jú":[34043],"liǎo lù":[34044],xu:[34047],"hàn hǎn":[34058],"màn wàn mán":[34067],"pó bò":[34082],"fān fán bō":[34115],"hóng hòng":[34171],"yù ào":[34177,38569],"xí xiào":[34178],"báo bó bò":[34180],"cí zī":[34187],"wàn luàn":[34189],"kǎo hāo":[34215],"yuǎn wěi":[34227],"zhòu chóu":[34229],"wō mái":[34230],"xiāo hào":[34243],"yù xù xū":[34247],"jiè jí":[34249],"diào zhuó":[34251],"cáng zàng":[34255],"lǎ":[34270],"chú zhū":[34296],"pín píng":[34315],"gān hán":[34423],"hóng jiàng":[34425],"huī huǐ":[34426],"xiā há":[34430],"mǎ mà mā":[34434],"fāng bàng":[34436],"bàng bèng":[34444],"jué quē":[34455],"qín qián":[34457],"gōng zhōng":[34467],"fǔ fù":[34469],"dài dé":[34478],"gǒu qú xù":[34492],"bǒ pí":[34494],"shé yí":[34503],"tiě":[34504,37444,37525,37921,37941,38081,39510],"gé luò":[34514],"máng bàng":[34518],"yì xǔ":[34529],"há gé":[34532],"qiè ní":[34538],"é yǐ":[34558],"zhē zhé":[34567],"là zhà":[34593],"suò":[34614,36900],"yóu qiú":[34660],"xiā hā":[34662],"xī qī":[34695],"bī pí":[34709],"nài něng":[34714],"hé xiá":[34715],"guì huǐ":[34717],"mǎ mā mà":[34718],"shì zhē":[34731],"zhì dié":[34738],"jiàn chán":[34745],"ma má mò":[34758],"mǎng měng":[34770],"biē bié":[34782],"bēn fèi":[34790],"láo liáo":[34791],"yín xún":[34795],"lí lǐ":[34849],"xuè xiě":[34880],"xíng háng hàng héng":[34892],"shuāi cuī":[34928],"tuó tuō":[34953],"lǐng líng":[34954],"bào páo pào":[34956],"jù jiē":[34963],"hè kè":[34964],"yí yì":[34968,36004],"nà jué":[34982],"bèi pī":[34987],"chǐ nuǒ":[34994],"chǐ qǐ duǒ nuǒ":[34995],"jiá qiā jié":[34999],"bó mò":[35001],"guī guà":[35007],"liè liě":[35010],"chéng chěng":[35022],"jiē gé":[35027],"dāo chóu":[35055],"shang cháng":[35059],"yuān gǔn":[35063],"yǎn ān":[35066],"tì xī":[35068],"fù fú":[35092],"chǔ zhǔ":[35098],"tuì tùn":[35114],"lǎi":[35184],"yào yāo":[35201],"qín tán":[35203],"jiàn xiàn":[35211,35265],"piǎn":[35217,35550,35869,36021],"piē miè":[35221],"yíng yǐng":[35246],"qù qū":[35248,35255,35281],"jiàn biǎn":[35253],"luó luǎn":[35254],"zī zuǐ":[35292],"huà xiè":[35295],"jiě jiè xiè":[35299,35303],"xué hù":[35319],"lì lù":[35323],"tǎo":[35342,35752],"zhùn":[35376],"zī zǐ":[35390],"yí dài":[35410,35794],"xiòng":[35415,35783],"diào tiǎo":[35458],"yí chǐ chì":[35459],"lǎng làng":[35471],"ēi éi ěi èi xī":[35474,35830],"shuà":[35484],"yǔ yù":[35486,35821,38632],"shuō shuì yuè":[35498,35828],"shuí shéi":[35504,35841],"qū juè":[35507],"chī lài":[35514],"nì ná":[35517],"diào tiáo":[35519],"pǐ bēi":[35520],"jì jī":[35525],"zé zuò zhǎ cuò":[35534],"chù jí":[35540],"háo xià":[35541],"lùn lún":[35542,35770],"shì dì":[35551],"huà guā":[35555],"xǐ shāi āi":[35568],"nán nàn":[35573,38627],"miù":[35628,35884],"zèn":[35670,35886],"shí zhì":[35672,35782],"juàn xuān":[35714],"yí tuī":[35721],"zhán":[35741],"xǔ hǔ":[35768],"xiáng yáng":[35814],"tiáo diào zhōu":[35843],"chén shèn":[35852],"mí mèi":[35868],"màn mán":[35881],"gǔ yù":[35895],"huō huò huá":[35905],"zhì zhài":[35960],"huān huán":[35974],"kěn kūn":[35975],"mò hé":[35976],"mò hé háo":[35977],"jù lóu":[35991],"zé zhài":[36012,36131],"dài tè":[36024],"bì bēn":[36033],"jiǎ gǔ jià":[36040],"xiōng mín":[36079],"càng":[36086],"zhuàn zuàn":[36090,36186],"wàn zhuàn":[36099],"gàn gòng zhuàng":[36123],"yuán yùn":[36128],"bēn bì":[36146],"jiǎ gǔ":[36158],"zǒu":[36208,36209,39888],"dié tú":[36227],"jū qiè":[36228],"qū cù":[36235,36264],"jí jié":[36236],"guā huó":[36239],"què qì jí":[36254],"tàng tāng":[36255],"chuō zhuó":[36256],"qù cù":[36259],"yuè tì":[36271],"bō bào":[36277],"kuà wù":[36278],"guì jué":[36281],"fāng fàng páng":[36285],"páo bà":[36289],"qí qǐ":[36290],"jiàn chén":[36296],"pǎo páo":[36305],"diǎn diē tiē":[36309],"jū jù qiè":[36313],"bǒ":[36315],"luò lì":[36318],"dài duò duō chí":[36322],"zhuǎi":[36329],"bèng pián":[36336],"tiào táo":[36339],"shū chōu":[36350],"liàng liáng":[36361],"tà tā":[36367],"chǎ":[36421,37972,38258],"dí zhí":[36450],"dēng dèng":[36460,37913,38251],"cèng":[36461],"dūn cún":[36466],"juě jué":[36470],"liāo":[36477],"xiè sǎ":[36512],"tǐ":[36528,36550,39605],"yà zhá gá":[36555],"xìn xiàn":[36560],"fàn guǐ":[36563],"zhuàn zhuǎn":[36578],"zhóu zhòu":[36600,36724],"bú":[36688,37293,40170],"zhuǎn zhuàn zhuǎi":[36716],"zǎi zài":[36733],"niǎn zhǎn":[36759],"biān bian":[36793],"dào biān":[36794],"yǐ yí":[36806,36836,36849],"guò guo guō":[36807],"wàng kuāng":[36811],"hái huán":[36824],"zhè zhèi":[36825],"yuǎn yuàn":[36828],"zhì lì":[36835],"zhù wǎng":[36844],"zhuī duī":[36861],"shì kuò":[36866],"tòu":[36879],"tōng tòng":[36890],"guàng":[36891],"dǎi dài":[36910],"suì suí":[36930],"tí dì":[36934],"yí wèi":[36951],"shì dí zhé":[36969],"cà":[36970],"huán hái":[36996],"lí chí":[37004],"kàng háng":[37023],"nà nèi nā":[37027],"xié yá yé yú xú":[37034],"gāi hái":[37058],"huán xún":[37063],"chī xī":[37079],"hǎo":[37085],"lì zhí":[37094],"xiáo ǎo":[37097],"dōu dū":[37117],"liǎo":[26338,37149,38269],"zàn cuán cuó":[37186,37191],"dīng dǐng":[37194],"cù zuò":[37218],"fā pō":[37222],"shāi shī":[37246],"niàng":[37247,37304],"qiú chōu":[37268],"pō fā":[37271,37297],"chǎn chěn":[37286],"yàn liǎn xiān":[37302],"niàng niáng":[37312],"lǐ li":[37324],"lí xǐ xī":[37328],"liǎo liào":[37333],"dīng dìng":[37336,38025],"qiǎo jiǎo":[37349],"yú huá":[37354],"huá wū":[37355],"rì rèn jiàn":[37360,37372],"dì dài":[37361],"pī zhāo":[37373],"yá yé":[37374],"bǎ pá":[37376,38063],"tā tuó":[37448,38090],"běi":[37491],"bǐng píng":[37500],"hā kē":[37503,38122],"chòng":[37507,38131],"xiǎng jiōng":[37508],"yù sì":[37513],"xù huì":[37514],"rén rěn":[37515],"shàn shuò":[37519],"chì lì":[37520],"xiǎn xǐ":[37521,38115],"hóu xiàng":[37527],"diào tiáo yáo":[37530],"xiān kuò tiǎn guā":[37531,37565,38118],"zhé niè":[37560],"zhōng yōng":[37567],"tōu tù dòu":[37568],"méi méng":[37570],"wàn jiǎn":[37572,37803],"tǐng dìng":[37580,38116],"juān jiān cuān":[37585],"sī tuó":[37590],"juān xuān juàn":[37591],"wú huá wū":[37592],"zhuó chuò":[37596],"xíng xìng jīng":[37598],"jū jú":[37606,38164],"zuì niè":[37623],"yuān yuǎn wǎn wān":[37626],"gāng gàng":[37628,38050],"zhuī":[37648,38181,39429,39571,40315],"ā":[37650,38165],"cuō chā":[37768],"suǒ sè":[37773],"yáo zú":[37776],"yè tà gé":[37777],"qiāng chēng":[37783],"gé lì":[37784,38217,39730],"bī pī bì":[37790],"gǎo hào":[37804],"zú chuò":[37827],"xiū xiù":[37829],"shòu sōu":[37833],"dí dī":[37841,38237],"qiāo sǎn càn":[37842],"lù áo":[37845],"tāng táng":[37852],"jiàn zàn":[37865],"huì suì ruì":[37880],"qiǎng qiāng":[37881,38250],"sǎn xiàn sà":[37886],"jiǎn jiàn":[37927,38159],"dāng chēng":[37946,38107],"zuān zuàn":[38013],"sà xì":[38033],"yào yuè":[38053],"tǒu dǒu":[38061],"zuàn zuān":[38075],"qiān yán":[38085],"pí pī":[38093],"yáo diào tiáo":[38123],"tāng tàng":[38132],"pù pū":[38138],"tán xiān":[38188],"liù liú":[38223],"hào gǎo":[38224],"táng tāng":[38231],"tán chán xín":[38241],"huò shǎn":[38276],"hàn bì":[38280,38380],"kāng kàng":[38284,38390],"xián jiàn jiān jiǎn":[38290],"xiā xiǎ":[38293],"xiǎ kě":[38300],"biàn guān":[38302],"hé gé":[38308,39052],"hòng xiàng":[38311],"sē xī":[38314],"tíng tǐng":[38318],"è yān":[38332,38415],"hòng juǎn xiàng":[38338],"bǎn pàn":[38342],"dū shé":[38349,38407],"què quē":[38357],"tāng táng chāng":[38363],"kàn hǎn":[38366,38426],"xì sè tà":[38367],"mēn mèn":[38391],"quē què":[38425],"yán diàn":[38461],"ā ē":[38463],"bēi pō pí":[38466],"yàn yǎn":[38529],"yú yáo shù":[38531],"lóng lōng":[38534],"duì zhuì":[38538],"suí duò":[38539],"gāi qí ái":[38545],"huī duò":[38547,38579],"wěi kuí":[38551],"lì dài":[38584],"zhuī cuī wéi":[38585],"hè hú":[38586,40366],"jùn juàn":[38589,38603],"nán nàn nuó":[38590],"què qiāo qiǎo":[38592],"guàn huán":[38618],"guī xī":[38623],"sè xí":[38637],"án":[38648],"wù méng":[38650],"tèng":[38703],"lù lòu":[38706],"mái":[38718],"jìng liàng":[38746],"gé jí":[38761],"bǎ":[38774],"yāng yàng":[38789],"gé tà sǎ":[38792],"biān yìng":[38805],"qiào shāo":[38808],"juān xuān":[38809],"shàng zhǎng":[38813],"pí bǐng bì bēi":[38814],la:[38817],"xiè dié":[38818],"ēng":[38821],"móu mù":[38826],"bì bǐng":[38840],"mèi wà":[38862],"rǒu":[38870],"shè xiè":[38872],"yùn wēn":[38891],"dùn dú":[38931,39039],"duǐ":[38951],"luō":[38961],"bīn pín":[38971],"yóng":[38994,39065,39979],"mān":[39010,39071],"jǐng gěng":[39048],"jié xié jiá":[39049],"kē ké":[39055],"pín bīn":[39057],"chàn zhàn":[39076],"fēng fěng":[39080,39118],"biāo diū":[39081],"bá fú":[39088],"sāo sōu":[39102],"liù liáo":[39106],"shí sì yì":[39135],"yǎng juàn":[39148],"zhù tǒu":[39155],"yí sì":[39156],"zuò zé zhā":[39157],"tiè":[39163,39214],"xiǎng náng":[39263],"táng xíng":[39271],"gē le":[39289],"chā zha":[39303],"náng nǎng":[39317],"yūn wò":[39335],"zhī shì":[39350],"xìn jìn":[39352],"kuài jué":[39363],"zǎng":[39380,39541],"tái dài":[39384],"xún xuān":[39400],"liáng láng":[39418],"piàn":[39447,39449,39575,39800],"dài tái":[39552],"sāo sǎo":[39578],"gǔ gū":[39592],"bèi mó":[39603],"xiāo qiāo":[39609],"bǎng pǎng":[39624],"bó jué":[39625],"bì pǒ":[39666],"máo méng":[39667],"kuò yuè":[39674],"bā bà":[39774,40067],"jì cǐ":[39814],"bó bà":[39818],"zhǎ zhà":[39827,40074],"chóu dài":[39832],"luò gé":[39845],"guī xié wā kuí":[39853],"xiān xiǎn":[39854,40092],"pū bū":[39878],"yì sī":[39907],"bà bó":[40076],"guī xié":[40081],"sāi xǐ":[40131],"niǎo diǎo":[40165],"diāo zhāo":[40173],"gān hàn yàn":[40177],"fū guī":[40186],"jiān qiān zhān":[40189],"hé jiè":[40353],"piān biǎn":[40355],"chuàn zhì":[40360],"cāng qiāng":[40364],"sǔn xùn":[40381],"biāo páo":[40579],"zhù cū":[40582],"jūn qún":[40583,40597],chi:[40630],"mó me":[40636],"mó me ma":[40637],"mí mǒ":[40639],"dàn shèn":[40686],"zhěn yān":[40688],"dǎn zhǎn":[40693],"miǎn mǐn měng":[40702],"hōu":[40769],"nàng":[40777],"qí jì zī zhāi":[40784],"yín kěn yǎn":[40834],"yín kěn":[40840],"gōng wò":[40847],"guī jūn qiū":[40860,40863]},l=[];Object.keys(y).forEach((n=>{const h=y[n];for(let i of h)l[i]=n}));const c={"一个":"yí gè","这个":"zhè ge","不是":"bú shì","成为":"chéng wéi","认为":"rèn wéi","作为":"zuò wéi","部分":"bù fèn","要求":"yāo qiú","应该":"yīng gāi","增长":"zēng zhǎng","不会":"bú huì","提供":"tí gōng","那些":"nèi xiē","觉得":"jué de","任务":"rèn wu","那个":"nà ge","称为":"chēng wéi","为主":"wéi zhǔ","了解":"liǎo jiě","处理":"chǔ lǐ","皇上":"huáng shang","只要":"zhǐ yào","大量":"dà liàng","力量":"lì liàng","几乎":"jī hū","干部":"gàn bù","目的":"mù dì","行为":"xíng wéi","只见":"zhǐ jiàn","认识":"rèn shi","市长":"shì zhǎng","师父":"shī fu","调查":"diào chá","重新":"chóng xīn","分为":"fēn wéi","知识":"zhī shi","导弹":"dǎo dàn","行业":"háng yè","质量":"zhì liàng","银行":"yín háng","参与":"cān yù","充分":"chōng fèn","尽管":"jǐn guǎn","生长":"shēng zhǎng","数量":"shù liàng","应当":"yīng dāng","院长":"yuàn zhǎng","强调":"qiáng diào","只能":"zhǐ néng","音乐":"yīn yuè","以为":"yǐ wéi","处于":"chǔ yú","分子":"fèn zǐ","晚上":"wǎn shang","部长":"bù zhǎng","蒙古":"měng gǔ","只有":"zhǐ yǒu","适当":"shì dàng","只好":"zhǐ hǎo","成长":"chéng zhǎng","高兴":"gāo xìng","不了":"bù liǎo","产量":"chǎn liàng","胖子":"pàng zi","显得":"xiǎn de","只是":"zhǐ shì","似的":"shì de","率领":"shuài lǐng","改为":"gǎi wéi","不禁":"bù jīn","成分":"chéng fèn","答应":"dā yìng","少年":"shào nián","兴趣":"xìng qù","太监":"tài jiàn","休息":"xiū xi","校长":"xiào zhǎng","更新":"gēng xīn","合同":"hé tong","喝道":"hè dào","重庆":"chóng qìng","重建":"chóng jiàn","使得":"shǐ de","审查":"shěn zhā","累计":"lěi jì","给予":"jǐ yǔ","上去":"shǎng qù","行情":"háng qíng","极为":"jí wéi","冠军":"guàn jūn","仿佛":"fǎng fú","头发":"tóu fa","投降":"tóu xiáng","家长":"jiā zhǎng","仔细":"zǐ xì","要是":"yào shi","将领":"jiàng lǐng","含量":"hán liàng","更为":"gèng wéi","只得":"zhǐ de","哪些":"něi xiē","积累":"jī lěi","地处":"dì chǔ","县长":"xiàn zhǎng","少女":"shào nǚ","路上":"lù shang","只怕":"zhǐ pà","能量":"néng liàng","一度":"yí dù","储量":"chǔ liàng","供应":"gōng yìng","挑战":"tiǎo zhàn","西藏":"xī zàng","记得":"jì de","影片":"yǐng piān","总量":"zǒng liàng","当真":"dàng zhēn","将士":"jiàng shì","差别":"chā bié","较为":"jiào wéi","一处":"yī chǔ","照片":"zhào piān","长老":"zhǎng lǎo","大夫":"dài fū","差异":"chā yì","懂得":"dǒng de","尽量":"jǐn liàng","模样":"mú yàng","的确":"dí què","鱼肚":"yú dǔ","为首":"wéi shǒu","便宜":"pián yí","更名":"gēng míng","石头":"shí tou","州长":"zhōu zhǎng","为止":"wéi zhǐ","漂亮":"piào liàng","炮弹":"pào dàn","藏族":"zàng zú","哪个":"něi gè","角色":"jué sè","当作":"dàng zuò","尽快":"jǐn kuài","人为":"rén wéi","重复":"chóng fù","胡同":"hú tòng","差距":"chā jù","弟兄":"dì xiong","大将":"dà jiàng","肚子":"dǔ zi","睡觉":"shuì jiào","团长":"tuán zhǎng","队长":"duì zhǎng","区长":"qū zhǎng","难得":"nán de","丫头":"yā tou","打听":"dǎ ting","会长":"huì zhǎng","弟弟":"dì di","王爷":"wáng ye","当天":"dàng tiān","重量":"zhòng liàng","誉为":"yù wéi","家伙":"jiā huo","华山":"huà shān","椅子":"yǐ zi","流量":"liú liàng","长大":"zhǎng dà","勉强":"miǎn qiǎng","会计":"kuài jì","分散":"fēn sǎn","过分":"guò fèn","济南":"jǐ nán","调动":"diào dòng","燕京":"yān jīng","少将":"shào jiàng","中毒":"zhòng dú","晓得":"xiǎo de","变更":"biàn gēng","认得":"rèn de","苹果":"pín guǒ","念头":"niàn tou","挣扎":"zhēng zhá","三藏":"sān zàng","剥削":"bō xuē","丞相":"chéng xiàng","少量":"shǎo liàng","寻思":"xín sī","夺得":"duó de","干线":"gàn xiàn","呼吁":"hū yù","戏曲":"xì qǔ","处罚":"chǔ fá","长官":"zhǎng guān","见长":"jiàn zhǎng","柏林":"bó lín","亲戚":"qīn qi","身分":"shēn fèn","胳膊":"gē bo","着手":"zhuó shǒu","炸弹":"zhà dàn","咳嗽":"ké sou","西边":"xī bian","赢得":"yíng de","叶子":"yè zi","外长":"wài zhǎng","供给":"gōng jǐ","师长":"shī zhǎng","变量":"biàn liàng","应有":"yīng yǒu","下载":"xià zài","乐器":"yuè qì","间接":"jiàn jiē","底下":"dǐ xia","打扮":"dǎ ban","子弹":"zǐ dàn","弹药":"dàn yào","热量":"rè liàng","削弱":"xuē ruò","骨干":"gǔ gàn","容量":"róng liàng","模糊":"mó hu","转动":"zhuàn dòng","落下":"là xià","称呼":"chēng hu","科长":"kē zhǎng","处置":"chǔ zhì","歌曲":"gē qǔ","着重":"zhuó zhòng","着急":"zháo jí","强迫":"qiǎng pò","庭长":"tíng zhǎng","首相":"shǒu xiàng","喇嘛":"lǎ ma","镇长":"zhèn zhǎng","只管":"zhǐ guǎn","重重":"chóng chóng","免得":"miǎn de","灾难":"zāi nàn","着实":"zhuó shí","所得":"suǒ de","度假":"dù jià","真相":"zhēn xiàng","相貌":"xiàng mào","处分":"chǔ fèn","干预":"gàn yù","委屈":"wěi qu","为期":"wéi qī","伯伯":"bó bo","圈子":"quān zi","见识":"jiàn shi","笼罩":"lǒng zhào","外边":"wài bian","与会":"yù huì","都督":"dū du","宰相":"zǎi xiàng","较量":"jiào liàng","对称":"duì chèn","总长":"zǒng zhǎng","相公":"xiàng gong","空白":"kòng bái","大王":"dài wáng","打量":"dǎ liang","水分":"shuǐ fèn","舌头":"shé tou","没收":"mò shōu","行李":"xíng li","判处":"pàn chǔ","散文":"sǎn wén","处境":"chǔ jìng","孙子":"sūn zi","拳头":"quán tou","打发":"dǎ fa","组长":"zǔ zhǎng","骨头":"gú tou","宁可":"nìng kě","更换":"gēng huàn","薄弱":"bó ruò","还原":"huán yuán","重修":"chóng xiū","东边":"dōng bian","同行":"tóng háng","只顾":"zhǐ gù","爱好":"ài hào","馒头":"mán tou","军长":"jūn zhǎng","散发":"sàn fà","首长":"shǒu zhǎng","厂长":"chǎng zhǎng","司长":"sī zhǎng","长子":"zhǎng zǐ","强劲":"qiáng jìng","恰当":"qià dàng","头儿":"tou er","站长":"zhàn zhǎng","折腾":"zhē teng","相处":"xiāng chǔ","统率":"tǒng shuài","中将":"zhōng jiàng","命中":"mìng zhòng","名将":"míng jiàng","左边":"zuǒ bian","木头":"mù tou","动弹":"dòng dàn","地壳":"dì qiào","干活":"gàn huó","少爷":"shào ye","难民":"nàn mín","水量":"shuǐ liàng","补给":"bǔ jǐ","尾巴":"wěi ba","来得":"lái de","好奇":"hào qí","钥匙":"yào shi","当做":"dàng zuò","沉着":"chén zhuó","哑巴":"yǎ ba","车子":"chē zi","上将":"shàng jiàng","恶心":"ě xin","不对":"bú duì","担子":"dàn zi","应届":"yīng jiè","行列":"háng liè","主角":"zhǔ jué","运转":"yùn zhuàn","兄长":"xiōng zhǎng","格式":"gé shi","正月":"zhēng yuè","营长":"yíng zhǎng","当成":"dàng chéng","右边":"yòu bian","女婿":"nǚ xu","咽喉":"yān hóu","当晚":"dàng wǎn","重阳":"chóng yáng","化为":"huà wéi","双重":"shuāng chóng","吐蕃":"tǔ bō","钻进":"zuān jìn","乐队":"yuè duì","不当":"bù dàng","亮相":"liàng xiàng","被子":"bèi zi","舍得":"shě de","杉木":"shā mù","击中":"jī zhòng","里边":"lǐ bian","排长":"pái zhǎng","假期":"jià qī","分量":"fèn liàng","数次":"shuò cì","提防":"dī fáng","吆喝":"yāo he","查处":"chá chǔ","量子":"liàng zǐ","里头":"lǐ tou","两行":"liǎng háng","调研":"diào yán","伺候":"cì hou","重申":"chóng shēn","枕头":"zhěn tou","拚命":"pàn mìng","社长":"shè zhǎng","苦难":"kǔ nàn","归还":"guī huán","危难":"wēi nàn","批量":"pī liàng","畜牧":"xù mù","点着":"diǎn zháo","甚为":"shèn wéi","小将":"xiǎo jiàng","着眼":"zhuó yǎn","处死":"chǔ sǐ","厌恶":"yàn wù","鼓乐":"gǔ yuè","树干":"shù gàn","秘鲁":"bì lǔ","大方":"dà fang","外头":"wài tou","班长":"bān zhǎng","星宿":"xīng xiù","宁愿":"nìng yuàn","钦差":"qīn chāi","为数":"wéi shù","勾当":"gòu dàng","削减":"xuē jiǎn","一发":"yī fà","间谍":"jiàn dié","埋怨":"mán yuàn","结实":"jiē shi","计量":"jì liàng","淹没":"yān mò","村长":"cūn zhǎng","连长":"lián zhǎng","自给":"zì jǐ","下边":"xià bian","武将":"wǔ jiàng","温差":"wēn chā","直奔":"zhí bèn","供求":"gōng qiú","剂量":"jì liàng","道长":"dào zhǎng","泄露":"xiè lòu","王八":"wáng ba","切割":"qiē gē","间隔":"jiàn gé","一晃":"yī huǎng","长假":"cháng jià","令狐":"líng hú","为害":"wéi hài","句子":"jù zi","偿还":"cháng huán","疙瘩":"gē dā","燕山":"yān shān","堵塞":"dǔ sè","夺冠":"duó guàn","下调":"xià diào","扎实":"zhā shi","电荷":"diàn hè","看守":"kān shǒu","复辟":"fù bì","郁闷":"yù mèn","尽早":"jǐn zǎo","切断":"qiē duàn","指头":"zhǐ tou","为生":"wéi shēng","畜生":"chù sheng","切除":"qiē chú","着力":"zhuó lì","着想":"zhuó xiǎng","级差":"jí chā","投奔":"tóu bèn","棍子":"gùn zi","含糊":"hán hu","少妇":"shào fù","兴致":"xìng zhì","纳闷":"nà mèn","干流":"gàn liú","卷起":"juǎn qǐ","扇子":"shàn zi","更改":"gēng gǎi","笼络":"lǒng luò","喇叭":"lǎ ba","载荷":"zài hè","妥当":"tuǒ dàng","为难":"wéi nán","着陆":"zhuó lù","燕子":"yàn zi","干吗":"gàn má","白发":"bái fà","总得":"zǒng děi","夹击":"jiā jī","曝光":"bào guāng","曲调":"qǔ diào","相机":"xiàng jī","叫化":"jiào huā","角逐":"jué zhú","啊哟":"ā yō","载重":"zài zhòng","长辈":"zhǎng bèi","出差":"chū chāi","垛口":"duǒ kǒu","撇开":"piē kāi","厅长":"tīng zhǎng","组分":"zǔ fèn","误差":"wù chā","家当":"jiā dàng","传记":"zhuàn jì","个子":"gè zi","铺设":"pū shè","干事":"gàn shì","杆菌":"gǎn jūn","五更":"wǔ gēng","定量":"dìng liàng","运载":"yùn zài","会儿":"huì er","酋长":"qiú zhǎng","重返":"chóng fǎn","差额":"chā é","露面":"lòu miàn","钻研":"zuān yán","大城":"dài chéng","上当":"shàng dàng","销量":"xiāo liàng","洋行":"yáng háng","作坊":"zuō fang","照相":"zhào xiàng","哎呀":"āi yā","调集":"diào jí","看中":"kàn zhòng","议长":"yì zhǎng","风筝":"fēng zheng","一应":"yī yīng","辟邪":"bì xié","空隙":"kòng xì","更迭":"gēng dié","偏差":"piān chā","声调":"shēng diào","农行":"nóng háng","适量":"shì liàng","屯子":"tún zi","搜查":"sōu zhā","无量":"wú liàng","空地":"kòng dì","调度":"diào dù","一曲":"yī qǔ","散射":"sǎn shè","太行":"tài háng","创伤":"chuāng shāng","海参":"hǎi shēn","满载":"mǎn zài","重叠":"chóng dié","落差":"luò chā","单调":"dān diào","老将":"lǎo jiàng","人参":"rén shēn","间断":"jiàn duàn","重现":"chóng xiàn","夹杂":"jiā zá","调用":"diào yòng","萝卜":"luó bo","附着":"fù zhuó","应声":"yīng shēng","主将":"zhǔ jiàng","罪过":"zuì guo","咀嚼":"jǔ jué","为政":"wéi zhèng","过量":"guò liàng","乐曲":"yuè qǔ","负荷":"fù hè","枪弹":"qiāng dàn","悄然":"qiǎo rán","处方":"chǔ fāng","悄声":"qiǎo shēng","曲子":"qǔ zi","情调":"qíng diào","一着":"yī zhāo","挑衅":"tiǎo xìn","代为":"dài wéi","了结":"liǎo jié","打中":"dǎ zhòng","酒吧":"jiǔ bā","作曲":"zuò qǔ","懒得":"lǎn de","增量":"zēng liàng","衣着":"yī zhuó","部将":"bù jiàng","要塞":"yào sài","茶几":"chá jī","杠杆":"gàng gǎn","出没":"chū mò","鲜有":"xiǎn yǒu","间隙":"jiàn xì","重担":"zhòng dàn","重演":"chóng yǎn","应酬":"yìng chou","只当":"zhǐ dāng","毋宁":"wú nìng","包扎":"bāo zā","前头":"qián tou","卷烟":"juǎn yān","非得":"fēi děi","弹道":"dàn dào","上调":"shàng diào","杆子":"gān zi","门将":"mén jiàng","后头":"hòu tou","标识":"biāo zhì","喝彩":"hè cǎi","暖和":"nuǎn huo","更深":"gēng shēn","累积":"lěi jī","引得":"yǐn de","调遣":"diào qiǎn","倔强":"jué jiàng","宝藏":"bǎo zàng","丧事":"sāng shì","约莫":"yuē mo","纤夫":"qiàn fū","更替":"gēng tì","装载":"zhuāng zài","背包":"bēi bāo","帖子":"tiě zi","松散":"sōng sǎn","支行":"zhī háng","呼喝":"hū hè","可恶":"kě wù","自转":"zì zhuàn","供电":"gōng diàn","反省":"fǎn xǐng","坦率":"tǎn shuài","苏打":"sū dá","本分":"běn fèn","落得":"luò de","鄙薄":"bǐ bó","相间":"xiāng jiàn","单薄":"dān bó","混蛋":"hún dàn","发难":"fā nàn","贞观":"zhēn guàn","附和":"fù hè","能耐":"néng nai","吓唬":"xià hu","未了":"wèi liǎo","引着":"yǐn zháo","抽调":"chōu diào","沙子":"shā zi","席卷":"xí juǎn","标的":"biāo dì","别扭":"biè niu","思量":"sī liang","喝采":"hè cǎi","论语":"lún yǔ","盖子":"gài zi","曲艺":"qǔ yì","分外":"fèn wài","弄堂":"lòng táng","乐舞":"yuè wǔ","雨量":"yǔ liàng","毛发":"máo fà","差遣":"chāi qiǎn","曲目":"qǔ mù","背负":"bēi fù","转速":"zhuàn sù","声乐":"shēng yuè","夹攻":"jiā gōng","供水":"gōng shuǐ","主干":"zhǔ gàn","逃难":"táo nàn","惩处":"chéng chǔ","长相":"zhǎng xiàng","公差":"gōng chāi","行当":"háng dang","榴弹":"liú dàn","省得":"shěng de","条子":"tiáo zi","重围":"chóng wéi","阻塞":"zǔ sè","劲风":"jìng fēng","纠葛":"jiū gé","颠簸":"diān bǒ","点中":"diǎn zhòng","避难":"bì nàn","重创":"zhòng chuāng","姥姥":"lǎo lao","迷糊":"mí hu","公家":"gōng jia","几率":"jī lǜ","苦闷":"kǔ mèn","度量":"dù liàng","差错":"chā cuò","暑假":"shǔ jià","参差":"cēn cī","搭载":"dā zài","助长":"zhù zhǎng","相称":"xiāng chèn","红晕":"hóng yùn","舍命":"shě mìng","喜好":"xǐ hào","列传":"liè zhuàn","劲敌":"jìng dí","蛤蟆":"há má","三重":"sān chóng","请假":"qǐng jià","钉子":"dīng zi","沉没":"chén mò","高丽":"gāo lí","休假":"xiū jià","无为":"wú wéi","巴结":"bā jì","了得":"liǎo de","变相":"biàn xiàng","核弹":"hé dàn","亲家":"qìng jia","承载":"chéng zài","行家":"háng jia","喝问":"hè wèn","还击":"huán jī","交还":"jiāo huán","当夜":"dàng yè","将令":"jiàng lìng","单于":"chán yú","空缺":"kòng quē","绿林":"lù lín","胆量":"dǎn liàng","执着":"zhí zhuó","低调":"dī diào","责难":"zé nàn","闭塞":"bì sè","轻薄":"qīng bó","得当":"dé dàng","占卜":"zhān bǔ","排行":"pái háng","扫帚":"sào zhou","龟兹":"qiū cí","年长":"nián zhǎng","外传":"wài zhuàn","头子":"tóu zi","裁缝":"cái féng","礼乐":"lǐ yuè","血泊":"xuè pō","散乱":"sǎn luàn","动量":"dòng liàng","倒腾":"dǎo teng","取舍":"qǔ shě","咱家":"zá jiā","长发":"cháng fà","爪哇":"zhǎo wā","弹壳":"dàn ké","省悟":"xǐng wù","嚷嚷":"rāng rang","连累":"lián lěi","应得":"yīng dé","族长":"zú zhǎng","患难":"huàn nàn","抽查":"chōu zhā","柜子":"guì zi","擂鼓":"léi gǔ","眩晕":"xuàn yùn","调配":"diào pèi","躯干":"qū gàn","差役":"chāi yì","坎坷":"kǎn kě","少儿":"shào ér","乐团":"yuè tuán","养分":"yǎng fèn","退还":"tuì huán","格调":"gé diào","语调":"yǔ diào","音调":"yīn diào","乐府":"yuè fǔ","古朴":"gǔ piáo","打点":"dǎ dian","差使":"chāi shǐ","磨难":"mó nàn","匀称":"yún chèn","瘦削":"shòu xuē","膏药":"gāo yao","吞没":"tūn mò","调任":"diào rèn","散居":"sǎn jū","上头":"shàng tou","大难":"dà nàn","风靡":"fēng mǐ","放假":"fàng jià","估量":"gū liang","失当":"shī dàng","中弹":"zhòng dàn","妄为":"wàng wéi","长者":"zhǎng zhě","起哄":"qǐ hòng","末了":"mò liǎo","相声":"xiàng sheng","校正":"jiào zhèng","劝降":"quàn xiáng","矢量":"shǐ liàng","沉闷":"chén mèn","给与":"jǐ yǔ","解法":"xiè fǎ","塞外":"sài wài","将校":"jiàng xiào","嗜好":"shì hào","没落":"mò luò","朴刀":"pō dāo","片子":"piān zi","切削":"qiē xiāo","弹丸":"dàn wán","昆曲":"kūn qǔ","雅致":"yǎ zhi","稀薄":"xī bó","亏得":"kuī de","死难":"sǐ nàn","间歇":"jiàn xiē","翘首":"qiáo shǒu","色调":"sè diào","处决":"chǔ jué","表率":"biǎo shuài","尺子":"chǐ zi","招降":"zhāo xiáng","称职":"chèn zhí","斗篷":"dǒu peng","铺子":"pù zi","底子":"dǐ zi","负载":"fù zài","干警":"gàn jǐng","倒数":"dào shǔ","将官":"jiàng guān","锄头":"chú tou","归降":"guī xiáng","疟疾":"nüè ji","唠叨":"láo dao","限量":"xiàn liàng","一打":"yī dá","屏息":"bǐng xī","重逢":"chóng féng","器乐":"qì yuè","氢弹":"qīng dàn","脖颈":"bó gěng","妃子":"fēi zi","追查":"zhuī zhā","处事":"chǔ shì","参量":"cān liàng","轻率":"qīng shuài","缥缈":"piāo miǎo","幸得":"xìng de","中奖":"zhòng jiǎng","才干":"cái gàn","施舍":"shī shě","卷子":"juǎn zi","游说":"yóu shuì","巷子":"xiàng zi","臂膀":"bì bǎng","切勿":"qiē wù","看管":"kān guǎn","风头":"fēng tou","精干":"jīng gàn","高差":"gāo chā","恐吓":"kǒng hè","扁担":"biǎn dàn","给养":"jǐ yǎng","格子":"gé zi","供需":"gōng xū","反差":"fǎn chā","飞弹":"fēi dàn","微薄":"wēi bó","发型":"fà xíng","勘查":"kān zhā","即兴":"jí xìng","攒动":"cuán dòng","间或":"jiàn huò","浅薄":"qiǎn bó","乐章":"yuè zhāng","顺差":"shùn chā","调子":"diào zi","相位":"xiàng wèi","转子":"zhuàn zǐ","劲旅":"jìng lǚ","咔嚓":"kā chā","了事":"liǎo shì","转悠":"zhuàn you","芍药":"sháo yao","当铺":"dàng pù","爪子":"zhuǎ zi","单子":"dān zi","好战":"hào zhàn","燕麦":"yān mài","只许":"zhǐ xǔ","干练":"gàn liàn","女将":"nǚ jiàng","酒量":"jiǔ liàng","划船":"huá chuán","伎俩":"jì liǎng","挑拨":"tiǎo bō","少校":"shào xiào","着落":"zhuó luò","憎恶":"zēng wù","刻薄":"kè bó","口角":"kǒu jué","马尾":"mǎ yǐ","要挟":"yāo xié","用处":"yòng chǔ","还手":"huán shǒu","模具":"mú jù","执著":"zhí zhuó","喝令":"hè lìng","争得":"zhēng de","保长":"bǎo zhǎng","吸着":"xī zhuó","症结":"zhēng jié","公转":"gōng zhuàn","校勘":"jiào kān","重提":"chóng tí","扫兴":"sǎo xìng","舞曲":"wǔ qǔ","铺盖":"pū gài","长史":"zhǎng shǐ","差价":"chā jià","压根":"yà gēn","怔住":"zhèng zhù","强人":"qiǎng rén","应允":"yīng yǔn","切入":"qiē rù","战将":"zhàn jiàng","年少":"nián shào","舍身":"shě shēn","执拗":"zhí niù","处世":"chǔ shì","中风":"zhòng fēng","等量":"děng liàng","不菲":"bù fěi","放量":"fàng liàng","腔调":"qiāng diào","老少":"lǎo shào","没入":"mò rù","瓜葛":"guā gé","将帅":"jiàng shuài","车载":"chē zài","窝囊":"wō nāng","长进":"zhǎng jìn","可汗":"kè hán","并州":"bīng zhōu","供销":"gōng xiāo","切片":"qiē piàn","差事":"chāi shì","知会":"zhī hui","鹰爪":"yīng zhǎo","处女":"chǔ nǚ","切磋":"qiē cuō","日头":"rì tou","押解":"yā jiè","滋长":"zī zhǎng","道观":"dào guàn","脚色":"jué sè","当量":"dāng liàng","婆家":"pó jia","缘分":"yuán fèn","空闲":"kòng xián","曲牌":"qǔ pái","好色":"hào sè","行会":"háng huì","怒喝":"nù hè","笼统":"lǒng tǒng","边塞":"biān sài","何曾":"hé zēng","重合":"chóng hé","插曲":"chā qǔ","零散":"líng sǎn","轰隆":"hōng lōng","化子":"huā zi","内蒙":"nèi měng","数落":"shǔ luo","逆差":"nì chā","牟利":"móu lì","栅栏":"zhà lan","中标":"zhòng biāo","调档":"diào dàng","佝偻":"gōu lóu","场子":"chǎng zi","甲壳":"jiǎ qiào","重温":"chóng wēn","炮制":"páo zhì","返还":"fǎn huán","自传":"zì zhuàn","高调":"gāo diào","词曲":"cí qǔ","受难":"shòu nàn","殷红":"yān hóng","要约":"yāo yuē","固着":"gù zhuó","强求":"qiǎng qiú","本相":"běn xiàng","骄横":"jiāo hèng","草率":"cǎo shuài","气闷":"qì mèn","着色":"zhuó sè","宁肯":"nìng kěn","兴头":"xìng tou","拘泥":"jū nì","夹角":"jiā jiǎo","发髻":"fà jì","猛将":"měng jiàng","劫难":"jié nàn","约摸":"yuē mo","拖累":"tuō lěi","呢绒":"ní róng","钻探":"zuān tàn","夹层":"jiā céng","把子":"bà zi","落魄":"luò tuò","巷道":"hàng dào","运量":"yùn liàng","头里":"tóu li","解闷":"jiě mèn","空儿":"kòng ér","估摸":"gū mo","好客":"hào kè","小曲":"xiǎo qǔ","折衷":"shé zhōng","钻孔":"zuān kǒng","序曲":"xù qǔ","糊弄":"hù nong","荥阳":"xíng yáng","道行":"dào héng","烦闷":"fán mèn","仓卒":"cāng cù","分叉":"fēn chà","曲率":"qǔ lǜ","相片":"xiàng piān","内行":"nèi háng","厂子":"chǎng zi","小调":"xiǎo diào","少阳":"shào yáng","受降":"shòu xiáng","染坊":"rǎn fáng","胳臂":"gē bei","将门":"jiàng mén","模板":"mú bǎn","配给":"pèi jǐ","为伍":"wéi wǔ","跟头":"gēn tou","划算":"huá suàn","累赘":"léi zhui","哄笑":"hōng xiào","晕眩":"yùn xuàn","干掉":"gàn diào","缝制":"féng zhì","难处":"nán chǔ","着意":"zhuó yì","蛮横":"mán hèng","干将":"gàn jiàng","奇数":"jī shù","短发":"duǎn fà","生还":"shēng huán","还清":"huán qīng","看护":"kān hù","直率":"zhí shuài","奏乐":"zòu yuè","载客":"zài kè","专横":"zhuān hèng","湮没":"yān mò","空格":"kòng gé","铺垫":"pū diàn","良将":"liáng jiàng","哗啦":"huā lā","散漫":"sǎn màn","脱发":"tuō fà","两重":"liǎng chóng","送还":"sòng huán","埋没":"mái mò","累及":"lěi jí","薄雾":"bó wù","调离":"diào lí","舌苔":"shé tāi","机长":"jī zhǎng","栓塞":"shuān sè","配角":"pèi jué","切口":"qiē kǒu","创口":"chuāng kǒu","哈欠":"hā qian","实弹":"shí dàn","铺平":"pū píng","哈达":"hǎ dá","懒散":"lǎn sǎn","实干":"shí gàn","填空":"tián kòng","刁钻":"diāo zuān","乐师":"yuè shī","量变":"liàng biàn","诱降":"yòu xiáng","搪塞":"táng sè","购得":"gòu de","征调":"zhēng diào","夹道":"jiā dào","干咳":"gān ké","乐工":"yuè gōng","商行":"shāng háng","划过":"huá guò","着火":"zháo huǒ","更正":"gēng zhèng","给付":"jǐ fù","空子":"kòng zi","哪吒":"né zhā","散曲":"sǎn qǔ","行规":"háng guī","正着":"zhèng zháo","刁难":"diāo nàn","刷子":"shuā zi","丧葬":"sāng zàng","夹带":"jiā dài","安分":"ān fèn","中意":"zhòng yì","长孙":"zhǎng sūn","校订":"jiào dìng","卷曲":"juǎn qū","载运":"zài yùn","投弹":"tóu dàn","柞蚕":"zuò cán","份量":"fèn liàng","外行":"wài háng","调换":"diào huàn","了然":"liǎo rán","咧嘴":"liě zuǐ","典当":"diǎn dàng","寒假":"hán jià","长兄":"zhǎng xiōng","给水":"jǐ shuǐ","须发":"xū fà","枝干":"zhī gàn","属相":"shǔ xiang","哄抢":"hōng qiǎng","刻划":"kè huá","手把":"shǒu bà","塞子":"sāi zi","单干":"dān gàn","还乡":"huán xiāng","兆头":"zhào tou","寺观":"sì guàn","督率":"dū shuài","受累":"shòu lěi","天台":"tiān tāi","啊哈":"ā hā","割舍":"gē shě","抹布":"mā bù","好恶":"hào wù","下处":"xià chǔ","消长":"xiāo zhǎng","离间":"lí jiàn","准头":"zhǔn tou","校对":"jiào duì","什物":"shí wù","番禺":"pān yú","佛爷":"fó ye","备查":"bèi zhā","吗啡":"mǎ fēi","盐分":"yán fèn","当月":"dàng yuè","虎将":"hǔ jiàng","薄荷":"bò he","独处":"dú chǔ","空位":"kòng wèi","铺路":"pū lù","乌拉":"wù la","调回":"diào huí","来头":"lái tou","闲散":"xián sǎn","胶卷":"jiāo juǎn","冒失":"mào shi","干劲":"gàn jìn","弦乐":"xián yuè","行伍":"háng wǔ","相国":"xiàng guó","查查":"zhā zhā","丹参":"dān shēn","助兴":"zhù xìng","铺开":"pū kāi","次长":"cì zhǎng","发卡":"fà qiǎ","拮据":"jié jū","刹车":"shā chē","生发":"shēng fà","重播":"chóng bō","缝合":"féng hé","音量":"yīn liàng","少尉":"shào wèi","殉难":"xùn nàn","冲压":"chòng yā","苍劲":"cāng jìng","厚薄":"hòu bó","威吓":"wēi hè","外相":"wài xiàng","曲谱":"qǔ pǔ","呼号":"hū háo","着迷":"zháo mí","挑担":"tiāo dàn","纹路":"wén lu","一沓":"yī dá","还俗":"huán sú","强横":"qiáng hèng","四行":"sì háng","着数":"zhāo shù","国难":"guó nàn","降顺":"xiáng shùn","挑明":"tiǎo míng","眯缝":"mī feng","分内":"fèn nèi","更衣":"gēng yī","软和":"ruǎn huo","尽兴":"jìn xìng","号子":"hào zi","爪牙":"zhǎo yá","败将":"bài jiàng","猜中":"cāi zhòng","结扎":"jié zā","没空":"méi kòng","夹缝":"jiā fèng","拾掇":"shí duo","掺和":"chān huo","簸箕":"bò ji","电量":"diàn liàng","荷载":"hè zǎi","漯河":"luò tà hé","调式":"diào shì","处身":"chǔ shēn","打手":"dǎ shou","弹弓":"dàn gōng","横蛮":"hèng mán","能干":"néng gàn","校点":"jiào diǎn","加载":"jiā zài","干校":"gàn xiào","哄传":"hōng chuán","校注":"jiào zhù","淤塞":"yū sè","马扎":"mǎ zhá","月氏":"yuè zhī","高干":"gāo gàn","经传":"jīng zhuàn","曾孙":"zēng sūn","好斗":"hào dòu","关卡":"guān qiǎ","逃奔":"táo bèn","磨蹭":"mó ceng","牟取":"móu qǔ","颤栗":"zhàn lì","蚂蚱":"mà zha","撮合":"cuō he","趔趄":"liè qie","摔打":"shuāi dá","台子":"tái zi","分得":"fēn de","粘着":"nián zhuó","采邑":"cài yì","散装":"sǎn zhuāng","婀娜":"ē nuó","兴味":"xìng wèi","行头":"xíng tou","气量":"qì liàng","调运":"diào yùn","处治":"chǔ zhì","乐音":"yuè yīn","组曲":"zǔ qǔ","充塞":"chōng sè","恫吓":"dòng hè","论调":"lùn diào","相中":"xiāng zhòng","民乐":"mín yuè","炮仗":"pào zhang","丧服":"sāng fú","骁将":"xiāo jiàng","量刑":"liàng xíng","缝补":"féng bǔ","财会":"cái kuài","大干":"dà gàn","呱呱":"gū gū","历数":"lì shǔ","校场":"jiào chǎng","塞北":"sài běi","识相":"shí xiàng","辱没":"rǔ mò","鲜亮":"xiān liang","语塞":"yǔ sè","露脸":"lòu liǎn","凉快":"liáng kuai","腰杆":"yāo gǎn","溜达":"liū da","嘎嘎":"gā gā","公干":"gōng gàn","桔梗":"jié gěng","挑逗":"tiǎo dòu","看门":"kān mén","海难":"hǎi nàn","乐歌":"yuè gē","拓片":"tà piàn","挑动":"tiǎo dòng","准将":"zhǔn jiàng","落难":"luò nàn","遒劲":"qiú jìng","磨坊":"mò fáng","逶迤":"wēi yí","搅和":"jiǎo huo","摩挲":"mā sā","作弄":"zuō nòng","苗头":"miáo tou","打颤":"dǎ zhàn","大藏":"dà zàng","畜牲":"chù sheng","勾搭":"gōu da","树荫":"shù yīn","树杈":"shù chà","铁杆":"tiě gǎn","将相":"jiàng xiàng","份子":"fèn zi","视差":"shì chā","绿荫":"lǜ yīn","枪杆":"qiāng gǎn","缝纫":"féng rèn","愁闷":"chóu mèn","点将":"diǎn jiàng","华佗":"huà tuó","劲射":"jìng shè","箱笼":"xiāng lǒng","终了":"zhōng liǎo","鬓发":"bìn fà","结巴":"jiē ba","苦干":"kǔ gàn","看家":"kān jiā","正旦":"zhēng dàn","中肯":"zhòng kěn","厦门":"xià mén","东莞":"dōng guǎn","食量":"shí liàng","宫调":"gōng diào","间作":"jiàn zuò","弹片":"dàn piàn","差池":"chā chí","漂白":"piǎo bái","杠子":"gàng zi","调处":"tiáo chǔ","好动":"hào dòng","转炉":"zhuàn lú","屏气":"bǐng qì","夹板":"jiā bǎn","哀乐":"āi yuè","干道":"gàn dào","苦处":"kǔ chǔ","劈柴":"pǐ chái","长势":"zhǎng shì","天华":"tiān huā","共处":"gòng chǔ","严查":"yán zhā","校验":"jiào yàn","出塞":"chū sài","弹子":"dàn zǐ","磨盘":"mò pán","萎靡":"wěi mǐ","奔丧":"bēn sāng","唱和":"chàng hè","大调":"dà diào","非分":"fēi fèn","钻营":"zuān yíng","夹子":"jiā zi","超载":"chāo zài","更始":"gēng shǐ","铃铛":"líng dang","披散":"pī sǎn","遭难":"zāo nàn","发还":"fā huán","转轮":"zhuàn lún","横财":"hèng cái","泡桐":"pāo tóng","抛撒":"pāo sǎ","天呀":"tiān yā","糊糊":"hū hū","躯壳":"qū qiào","通量":"tōng liàng","奉还":"fèng huán","午觉":"wǔ jiào","闷棍":"mèn gùn","浪头":"làng tou","砚台":"yàn tāi","油坊":"yóu fáng","学长":"xué zhǎng","过载":"guò zài","笔调":"bǐ diào","衣被":"yì bèi","畜产":"xù chǎn","打更":"dǎ gēng","调阅":"diào yuè","蛮干":"mán gàn","曾祖":"zēng zǔ","本行":"běn háng","提干":"tí gàn","变调":"biàn diào","覆没":"fù mò","模子":"mú zi","乐律":"yuè lǜ","称心":"chèn xīn","木杆":"mù gǎn","套曲":"tào qǔ","重印":"chóng yìn","自省":"zì xǐng","提调":"tí diào","看相":"kàn xiàng","芋头":"yù tou","下切":"xià qiē","塞上":"sài shàng","铺张":"pū zhāng","藤蔓":"téng wàn","薄幸":"bó xìng","非难":"fēi nàn","解数":"xiè shù","褪去":"tùn qù","霰弹":"xiàn dàn","柚木":"yóu mù","重载":"zhòng zài","二重":"èr chóng","痕量":"hén liàng","雅乐":"yǎ yuè","号哭":"háo kū","诈降":"zhà xiáng","猪圈":"zhū juàn","咋舌":"zé shé","铣床":"xǐ chuáng","防弹":"fáng dàn","健将":"jiàn jiàng","丽水":"lí shuǐ","削发":"xuē fà","空当":"kòng dāng","多相":"duō xiàng","鲜见":"xiǎn jiàn","划桨":"huá jiǎng","载波":"zài bō","跳蚤":"tiào zao","俏皮":"qiào pi","吧嗒":"bā dā","结发":"jié fà","了断":"liǎo duàn","同调":"tóng diào","石磨":"shí mò","时差":"shí chā","鼻塞":"bí sè","挑子":"tiāo zi","推磨":"tuī mò","武侯":"wǔ hòu","抹煞":"mǒ shā","调转":"diào zhuǎn","籍没":"jí mò","测度":"cè duó","还债":"huán zhài","调演":"diào yǎn","分划":"fēn huá","奇偶":"jī ǒu","断喝":"duàn hè","闷雷":"mèn léi","狼藉":"láng jí","饭量":"fàn liàng","还礼":"huán lǐ","转调":"zhuǎn diào","星相":"xīng xiàng","手相":"shǒu xiàng","配乐":"pèi yuè","盖头":"gài tou","连杆":"lián gǎn","簿记":"bù jì","刀把":"dāo bà","量词":"liàng cí","名角":"míng jué","步调":"bù diào","校本":"jiào běn","曲江":"qǔ jiāng","账簿":"zhàng bù","隽永":"juàn yǒng","哈罗":"hā luo","稍为":"shāo wéi","易传":"yì zhuàn","乐谱":"yuè pǔ","牵累":"qiān lěi","答理":"dā li","喝斥":"hè chì","吟哦":"yín é","干渠":"gàn qú","海量":"hǎi liàng","精当":"jīng dàng","着床":"zhuó chuáng","月相":"yuè xiàng","庶几":"shù jī","宫观":"gōng guàn","论处":"lùn chǔ","征辟":"zhēng bì","厚朴":"hòu pò","介壳":"jiè qiào","吭哧":"kēng chi","咯血":"kǎ xiě","铺陈":"pū chén","重生":"chóng shēng","乐理":"yuè lǐ","哀号":"āi háo","藏历":"zàng lì","琴曲":"qín qǔ","神曲":"shén qǔ","刚劲":"gāng jìng","削平":"xuē píng","浓荫":"nóng yīn","城垛":"chéng duǒ","识记":"zhì jì","当差":"dāng chāi","正传":"zhèng zhuàn","并处":"bìng chǔ","空难":"kōng nàn","创面":"chuāng miàn","旦角":"dàn jué","薄礼":"bó lǐ","晃荡":"huàng dang","臊子":"sào zi","家什":"jiā shí","闷头":"mèn tóu","美发":"měi fà","度数":"dù shu","着凉":"zháo liáng","闯将":"chuǎng jiàng","几案":"jī àn","姘头":"pīn tou","急难":"jí nàn","差数":"chā shù","散碎":"sǎn suì","壅塞":"yōng sè","寒颤":"hán zhàn","牵强":"qiān qiǎng","无间":"wú jiàn","轮转":"lún zhuàn","号叫":"háo jiào","铺排":"pū pái","降伏":"xiáng fú","轧钢":"zhá gāng","东阿":"dōng ē","病假":"bìng jià","累加":"lěi jiā","梗塞":"gěng sè","弹夹":"dàn jiā","钻心":"zuān xīn","晃眼":"huǎng yǎn","魔爪":"mó zhǎo","标量":"biāo liàng","憋闷":"biē mèn","猜度":"cāi duó","处士":"chǔ shì","官差":"guān chāi","讨还":"tǎo huán","长门":"zhǎng mén","馏分":"liú fèn","里弄":"lǐ lòng","色相":"sè xiàng","雅兴":"yǎ xìng","角力":"jué lì","弹坑":"dàn kēng","枝杈":"zhī chà","夹具":"jiā jù","处刑":"chǔ xíng","悍将":"hàn jiàng","好学":"hào xué","好好":"hǎo hǎo","银发":"yín fà","扫把":"sào bǎ","法相":"fǎ xiàng","贵干":"guì gàn","供气":"gōng qì","空余":"kòng yú","捆扎":"kǔn zā","瘠薄":"jí bó","浆糊":"jiàng hu","嘎吱":"gā zhī","不遂":"bù suí","调令":"diào lìng","法帖":"fǎ tiè","淋病":"lìn bìng","调派":"diào pài","转盘":"zhuàn pán","供稿":"gōng gǎo","差官":"chāi guān","忧闷":"yōu mèn","重犯":"chóng fàn","教长":"jiào zhǎng","重唱":"chóng chàng","酒兴":"jiǔ xìng","乐坛":"yuè tán","花呢":"huā ní","叱喝":"chì hè","膀臂":"bǎng bì","重头":"chóng tóu","得空":"dé kòng","转圈":"zhuàn quān","横暴":"hèng bào","哄抬":"hōng tái","引吭":"yǐn háng","载货":"zài huò","中计":"zhòng jì","官长":"guān zhǎng","相面":"xiàng miàn","看头":"kàn tou","盼头":"pàn tou","意兴":"yì xìng","军乐":"jūn yuè","累次":"lěi cì","骨嘟":"gū dū","燕赵":"yān zhào","报丧":"bào sāng","弥撒":"mí sa","挨斗":"ái dòu","扁舟":"piān zhōu","丑角":"chǒu jué","吊丧":"diào sāng","强将":"qiáng jiàng","行号":"háng háo","重奏":"chóng zòu","发辫":"fà biàn","着魔":"zháo mó","着法":"zhāo fǎ","盛放":"chéng fàng","填塞":"tián sè","凶横":"xiōng hèng","稽首":"qǐ shǒu","碑帖":"bēi tiè","冲量":"chōng liàng","发菜":"fà cài","假发":"jiǎ fà","翻卷":"fān juǎn","小量":"xiǎo liàng","胶着":"jiāo zhuó","里子":"lǐ zi","调调":"diào diao","散兵":"sǎn bīng","高挑":"gāo tiǎo","播撒":"bō sǎ","夹心":"jiā xīn","扇动":"shān dòng","叨扰":"tāo rǎo","霓裳":"ní cháng","捻子":"niǎn zi","弥缝":"mí féng","撒布":"sǎ bù","元曲":"yuán qǔ","场院":"cháng yuàn","省亲":"xǐng qīn","提拉":"dī le","惯量":"guàn liàng","强逼":"qiǎng bī","强征":"qiǎng zhēng","晕车":"yùn chē","数道":"shǔ dào","带累":"dài lěi","拓本":"tà běn","嫌恶":"xián wù","宿将":"sù jiàng","龟裂":"jūn liè","缠夹":"chán jiā","发式":"fà shì","隔扇":"gé shān","行货":"háng huò","天分":"tiān fèn","癖好":"pǐ hào","四通":"sì tòng","白术":"bái zhú","划伤":"huá shāng","角斗":"jué dòu","听差":"tīng chāi","岁差":"suì chā","丧礼":"sāng lǐ","脉脉":"mò mò","削瘦":"xuē shòu","撒播":"sǎ bō","莎草":"suō cǎo","犍为":"qián wéi","调头":"diào tóu","龙卷":"lóng juǎn","外调":"wài diào","字帖":"zì tiè","卷发":"juǎn fà","揣度":"chuǎi duó","洋相":"yáng xiàng","散光":"sǎn guāng","骨碌":"gū lu","薄命":"bó mìng","笼头":"lóng tou","咽炎":"yān yán","碌碡":"liù zhou","片儿":"piān er","纤手":"qiàn shǒu","散体":"sǎn tǐ","内省":"nèi xǐng","强留":"qiǎng liú","解送":"jiè sòng","反间":"fǎn jiàn","少壮":"shào zhuàng","一服":"yī fù","留空":"liú kòng","告假":"gào jià","咳血":"ké xiě","薄暮":"bó mù","铺轨":"pū guǐ","磨削":"mó xuē","治丧":"zhì sāng","叉子":"chā zi","哄动":"hōng dòng","蛾子":"é zi","糜子":"méi zi","出落":"chū là","股长":"gǔ zhǎng","贵处":"guì chǔ","还魂":"huán hún","例假":"lì jià","曲池":"qǔ chí","刹住":"shā zhù","身量":"shēn liàng","懂行":"dǒng háng","同好":"tóng hào","模量":"mó liàng","更生":"gēng shēng","服丧":"fú sāng","率直":"shuài zhí","字模":"zì mú","散架":"sǎn jià","答腔":"dā qiāng","交恶":"jiāo wù","薄情":"bó qíng","眼泡":"yǎn pāo","袅娜":"niǎo nuó","草垛":"cǎo duǒ","冲劲":"chòng jìn","呢喃":"ní nán","切中":"qiè zhòng","挑灯":"tiǎo dēng","还愿":"huán yuàn","激将":"jī jiàng","更鼓":"gēng gǔ","没药":"mò yào","难友":"nàn yǒu","败兴":"bài xìng","切面":"qiē miàn","散户":"sǎn hù","累进":"lěi jìn","背带":"bēi dài","秤杆":"chèng gǎn","碾坊":"niǎn fáng","簿子":"bù zi","扳手":"bān shou","铅山":"yán shān","儒将":"rú jiàng","重光":"chóng guāng","剪发":"jiǎn fà","行话":"háng huà","长上":"zhǎng shàng","小传":"xiǎo zhuàn","压轴":"yā zhòu","谱曲":"pǔ qǔ","弱冠":"ruò guàn","花卷":"huā juǎn","横祸":"hèng huò","夹克":"jiā kè","光晕":"guāng yùn","披靡":"pī mǐ","对调":"duì diào","夹持":"jiā chí","空额":"kòng é","平调":"píng diào","铺床":"pū chuáng","丧钟":"sāng zhōng","作乐":"zuò yuè","少府":"shào fǔ","数数":"shuò shuò","奔头":"bèn tou","进给":"jìn jǐ","率性":"shuài xìng","乐子":"lè zi","绑扎":"bǎng zā","挑唆":"tiǎo suō","漂洗":"piǎo xǐ","夹墙":"jiā qiáng","咳喘":"ké chuǎn","乜斜":"miē xie","错处":"cuò chǔ","闷酒":"mèn jiǔ","时调":"shí diào","重孙":"chóng sūn","经幢":"jīng chuáng","圩场":"xū cháng","调门":"diào mén","花头":"huā tou","划拉":"huá la","套色":"tào shǎi","粗率":"cū shuài","相率":"xiāng shuài","款识":"kuǎn zhì","吁请":"yù qǐng","荫蔽":"yīn bì","文蛤":"wén gé","嘀嗒":"dī dā","调取":"diào qǔ","交差":"jiāo chāi","落子":"lào zǐ","相册":"xiàng cè","絮叨":"xù dáo","落发":"luò fà","异相":"yì xiàng","浸没":"jìn mò","角抵":"jué dǐ","卸载":"xiè zài","春卷":"chūn juǎn","扎挣":"zhá zheng","畜养":"xù yǎng","吡咯":"bǐ luò","垛子":"duǒ zi","恶少":"è shào","发际":"fà jì","红苕":"hóng sháo","糨糊":"jiàng hù","哭丧":"kū sang","泡子":"pāo zǐ","稍息":"shào xī","晕船":"yùn chuán","校样":"jiào yàng","外差":"wài chāi","红曲":"hóng qǔ","脚爪":"jiǎo zhǎo","铺展":"pū zhǎn","驮子":"duò zi","芫荽":"yán sui","夹紧":"jiā jǐn","尿泡":"suī pào","丧乱":"sāng luàn","凶相":"xiōng xiàng","华发":"huá fà","打场":"dǎ cháng","云量":"yún liàng","正切":"zhèng qiē","处子":"chǔ zǐ","留难":"liú nàn","划拳":"huá quán","划艇":"huá tǐng","评传":"píng zhuàn","拉纤":"lā qiàn","句读":"jù dòu","散剂":"sǎn jì","骨殖":"gǔ shi","塞音":"sè yīn","铺叙":"pū xù","阏氏":"yān zhī","冷颤":"lěng zhàn","煞住":"shā zhù","夜曲":"yè qǔ","少男":"shào nán","格登":"gē dēng","管乐":"guǎn yuè","号啕":"háo táo","纳降":"nà xiáng","拥塞":"yōng sè","万乘":"wàn shèng","杆儿":"gǎn ér","葛藤":"gé téng","芯子":"xìn zi","簿籍":"bù jí","垫圈":"diàn juàn","皮夹":"pí jiā","校准":"jiào zhǔn","行款":"háng kuǎn","允当":"yǔn dàng","器量":"qì liàng","选调":"xuǎn diào","扮相":"bàn xiàng","干才":"gàn cái","基干":"jī gàn","三校":"sān jiào","割切":"gē qiē","国乐":"guó yuè","卡壳":"qiǎ ké","呢子":"ní zi","辟谷":"bì gǔ","磨房":"mò fáng","咿呀":"yī yā","芥末":"jiè mo","薄技":"bó jì","产假":"chǎn jià","诗兴":"shī xìng","重出":"chóng chū","转椅":"zhuàn yǐ","酌量":"zhuó liàng","簿册":"bù cè","藏青":"zàng qīng","的士":"dí shì","调人":"diào rén","解元":"jiè yuán","茎干":"jīng gàn","巨量":"jù liàng","榔头":"láng tou","率真":"shuài zhēn","喷香":"pèn xiāng","锁钥":"suǒ yuè","虾蟆":"há má","相图":"xiàng tú","兴会":"xìng huì","灶头":"zào tou","重婚":"chóng hūn","钻洞":"zuān dòng","忖度":"cǔn duó","党参":"dǎng shēn","调温":"diào wēn","杆塔":"gǎn tǎ","葛布":"gé bù","拱券":"gǒng xuàn","冠子":"guàn zi","划子":"huá zǐ","夹生":"jiā shēng","露馅":"lòu xiàn","恰切":"qià qiē","散见":"sǎn jiàn","哨卡":"shào qiǎ","烫发":"tàng fà","体量":"tǐ liàng","挺括":"tǐng guā","系带":"jì dài","相士":"xiàng shì","羊圈":"yáng juàn","转矩":"zhuàn jǔ","吧台":"bā tái","苍术":"cāng zhú","菲薄":"fěi bó","蛤蚧":"gé jiè","蛤蜊":"gé lí","瓜蔓":"guā wàn","怪相":"guài xiàng","罹难":"lí nàn","临帖":"lín tiè","女红":"nǚ gōng","刨床":"bào chuáng","翘楚":"qiáo chǔ","数九":"shǔ jiǔ","谈兴":"tán xìng","心曲":"xīn qǔ","雄劲":"xióng jìng","扎染":"zā rǎn","遮荫":"zhē yīn","周正":"zhōu zhēng","赚头":"zhuàn tou","扒手":"pá shǒu","搀和":"chān huo","诚朴":"chéng piáo","肚量":"dù liàng","干结":"gàn jié","工尺":"gōng chě","家累":"jiā lěi","曲水":"qǔ shuǐ","沙参":"shā shēn","挑花":"tiǎo huā","行距":"háng jù","阿门":"ā mēn","背篓":"bēi lǒu","瘪三":"biē sān","裁处":"cái chǔ","创痛":"chuāng tòng","福相":"fú xiàng","更动":"gēng dòng","豪兴":"háo xìng","还阳":"huán yáng","还嘴":"huán zuǐ","借调":"jiè diào","卷云":"juǎn yún","卡子":"qiǎ zi","流弹":"liú dàn","络子":"lào zi","磨子":"mò zǐ","想头":"xiǎng tou","削价":"xuē jià","校阅":"jiào yuè","八行":"bā háng","雅量":"yǎ liàng","别传":"bié zhuàn","薄酒":"bó jiǔ","春假":"chūn jià","发妻":"fà qī","哗哗":"huā huā","宽绰":"kuān chuo","了悟":"liǎo wù","切花":"qiē huā","审度":"shěn duó","应许":"yīng xǔ","转台":"zhuàn tái","仔猪":"zǐ zhū","奔命":"bèn mìng","裁量":"cái liàng","藏戏":"zàng xì","乘兴":"chéng xìng","绸缪":"chóu móu","摧折":"cuī shé","调经":"diào jīng","调职":"diào zhí","缝缀":"féng zhuì","骨朵":"gū duǒ","核儿":"hú ér","恒量":"héng liàng","还价":"huán jià","浑朴":"hún piáo","苦差":"kǔ chāi","面糊":"miàn hù","曲张":"qǔ zhāng","煞车":"shā chē","省视":"xǐng shì","什锦":"shí jǐn","信差":"xìn chāi","余切":"yú qiē","攒眉":"cuán méi","炸糕":"zhá gāo","钻杆":"zuàn gǎn","扒灰":"pá huī","拌和":"bàn huò","长调":"cháng diào","大溜":"dà liù","抖搂":"dǒu lōu","飞转":"fēi zhuàn","赴难":"fù nàn","干仗":"gàn zhàng","好胜":"hào shèng","画片":"huà piān","搅混":"jiǎo gǔn","螺杆":"luó gǎn","木模":"mù mú","怒号":"nù háo","频数":"pín shuò","无宁":"wú nìng","选曲":"xuǎn qǔ","遗少":"yí shào","邮差":"yóu chāi","占卦":"zhān guà","占星":"zhān xīng","重审":"chóng shěn","自量":"zì liàng","待查":"dài zhā","调防":"diào fáng","发廊":"fà láng","翻查":"fān zhā","反调":"fǎn diào","缝子":"fèng zi","更夫":"gēng fū","骨子":"gǔ zi","光杆":"guāng gǎn","夹棍":"jiā gùn","居丧":"jū sāng","巨贾":"jù gǔ","看押":"kān yā","空转":"kōng zhuàn","量力":"liàng lì","蒙尘":"meng chen","蒙难":"méng nàn","炮烙":"páo luò","赔还":"péi huán","扑扇":"pū shān","散记":"sǎn jì","散件":"sǎn jiàn","删削":"shān xuē","射干":"yè gàn","条几":"tiáo jī","偷空":"tōu kòng","削壁":"xuē bì","校核":"jiào hé","阴干":"yīn gàn","择菜":"zhái cài","重九":"chóng jiǔ","主调":"zhǔ diào","自禁":"zì jīn","吧唧":"bā jī","堡子":"bǔ zi","便溺":"biàn niào","词调":"cí diào","叨咕":"dáo gu","干粉":"gàn fěn","俚曲":"lǐ qǔ","落枕":"lào zhěn","铺砌":"pū qì","刷白":"shuà bái","委靡":"wěi mǐ","系泊":"jì bó","相马":"xiàng mǎ","行辈":"háng bèi","熨帖":"yù tiē","转筋":"zhuàn jīn","棒喝":"bàng hè","傧相":"bīn xiàng","镐头":"gǎo tóu","间苗":"jiàn miáo","乐池":"yuè chí","卖相":"mài xiàng","难为":"nán wéi","屏弃":"bǐng qì","铅弹":"qiān dàn","切变":"qiē biàn","请调":"qǐng diào","曲度":"qǔ dù","群氓":"qún méng","散板":"sǎn bǎn","省察":"xǐng chá","事假":"shì jià","纤绳":"qiàn shéng","重影":"chóng yǐng","耕种":"gēng zhòng","种地":"zhòng dì","种菜":"zhòng cài","栽种":"zāi zhòng","接种":"jiē zhòng","垦种":"kěn zhòng","种殖":"zhòng zhí","种瓜":"zhòng guā","种豆":"zhòng dòu","种树":"zhòng shù","睡着":"shuì zháo","笼子":"lóng zi"},j=Object.keys(c).map((n=>({zh:n,pinyin:c[n],priority:2,length:2}))),d={"为什么":"wèi shén me","实际上":"shí jì shang","检察长":"jiǎn chá zhǎng","不由得":"bù yóu de","差不多":"chà bu duō","只不过":"zhǐ bu guò","国内外":"guó nèi wai","老人家":"lǎo ren jia","干什么":"gàn shén me","可不是":"kě bù shì","这会儿":"zhè huì er","尽可能":"jǐn kě néng","董事长":"dǒng shì zhǎng","了不起":"liǎo bù qǐ","参谋长":"cān móu zhǎng","舍不得":"shě bu de","朝鲜族":"cháo xiǎn zú","恨不得":"hèn bu de","海内外":"hǎi nèi wai","禁不住":"jīn bú zhù","柏拉图":"bó lā tú","怪不得":"guài bu de","不在乎":"bù zài hu","洛杉矶":"luò shān ji","有点儿":"yǒu diǎn er","迫击炮":"pǎi jī pào","大丈夫":"dà zhàng fu","进行曲":"jìn xíng qǔ","免不了":"miǎn bu liǎo","不得了":"bù dé liǎo","过日子":"guò rì zi","马尾松":"mǎ wěi sōng","运输量":"yùn shū liàng","发脾气":"fā pí qi","过不去":"guò bu qù","臭豆腐":"chòu dòu fu","士大夫":"shì dà fū","三部曲":"sān bù qǔ","少不了":"shǎo bu liǎo","仡佬族":"gē lǎo zú","交响曲":"jiāo xiǎng qǔ","分子式":"fēn zǐ shì","好日子":"hǎo rì zi","看样子":"kàn yàng zi","鸭绿江":"yā lù jiāng","巴不得":"bā bu de","协奏曲":"xié zòu qǔ","没关系":"méi guān xi","不见得":"bú jiàn de","压根儿":"yà gēn er","对得起":"duì de qǐ","那会儿":"nà huì er","自个儿":"zì gě er","物理量":"wù lǐ liàng","怎么着":"zěn me zhāo","明晃晃":"míng huǎng huǎng","节假日":"jié jià rì","心里话":"xīn lǐ huà","发行量":"fā xíng liàng","兴冲冲":"xìng chōng chōng","分子量":"fēn zǐ liàng","大不了":"dà bu liǎo","国子监":"guó zǐ jiàn","老大难":"lǎo dà nán","了不得":"liǎo bu dé","石狮子":"shí shī zi","莫不是":"mò bù shì","少不得":"shǎo bu dé","党内外":"dǎng nèi wai","这么着":"zhè me zhāo","少奶奶":"shào nǎi nai","暗地里":"àn dì li","看不起":"kàn bu qǐ","更年期":"gēng nián qī","工作量":"gōng zuò liàng","背地里":"bèi dì li","山里红":"shān li hóng","好好儿":"hǎo hāo er","交响乐":"jiāo xiǎng yuè","好意思":"hǎo yì si","吐谷浑":"tǔ yù hún","没意思":"méi yì si","理发师":"lǐ fà shī","奏鸣曲":"zòu míng qǔ","塔什干":"tǎ shí gàn","充其量":"chōng qí liàng","靠得住":"kào de zhù","车行道":"chē háng dào","中郎将":"zhōng láng jiàng","犯不着":"fàn bu zháo","照明弹":"zhào míng dàn","一溜烟":"yī liù yān","烟幕弹":"yān mù dàn","没奈何":"mò nài hé","乱哄哄":"luàn hōng hōng","惠更斯":"huì gēng sī","载重量":"zài zhòng liàng","瞧得起":"qiáo de qǐ","纪传体":"jì zhuàn tǐ","蚌埠市":"bèng bù shì","冷不丁":"lěng bu dīng","阿房宫":"ē páng gōng","怨不得":"yuàn bu de","卷心菜":"juǎn xīn cài","戏班子":"xì bān zi","过得去":"guò děi qù","大肚子":"dà dù zi","花岗石":"huā gāng shí","外甥女":"wài sheng nǚ","团团转":"tuán tuán zhuàn","大堡礁":"dà pù jiāo","燃烧弹":"rán shāo dàn","劳什子":"láo shí zi","摇滚乐":"yáo gǔn yuè","身子骨":"shēn zi gǔ","夹竹桃":"jiā zhú táo","一刀切":"yī dāo qiē","闹哄哄":"nào hōng hōng","三连冠":"sān lián guàn","重头戏":"zhòng tóu xì","二人转":"èr rén zhuàn","节骨眼":"jiē gu yǎn","知识面":"zhī shī miàn","护士长":"hù shì zhǎng","架子车":"jià zi chē","信号弹":"xìn hào dàn","干电池":"gàn diàn chí","枪杆子":"qiāng gǎn zi","哭丧棒":"kū sāng bàng","鼻咽癌":"bí yān ái","瓦岗军":"wǎ gāng jūn","买得起":"mǎi de qǐ","拗不过":"niù bu guò","癞蛤蟆":"lài há ma","脊梁骨":"jǐ liang gǔ","子母弹":"zǐ mǔ dàn","开小差":"kāi xiǎo chāi","女强人":"nǚ qiáng rén","英雄传":"yīng xióng zhuàn","大嫂子":"dà sǎo zi","爵士乐":"jué shì yuè","说笑话":"shuō xiào hua","混日子":"hùn rì zi","大鼻子":"dà bí zi","碰头会":"pèng tóu kuài","玻璃钢":"bō li gāng","曳光弹":"yè guāng dàn","少林拳":"shào lín quán","咏叹调":"yǒng tàn diào","豆腐干":"dòu fǔ gàn","一个劲":"yī gè jìn","少先队":"shào xiān duì","灵长目":"líng zhǎng mù","对着干":"duì zhe gàn","蒙蒙亮":"mēng mēng liàng","软骨头":"ruǎn gǔ tou","不省得":"bù xǐng de","铺盖卷":"pū gài juǎn","和稀泥":"huò xī ní","亭子间":"tíng zi jiān","背黑锅":"bēi hēi guō","红彤彤":"hóng tōng tōng","武侯祠":"wǔ hóu cí","打哆嗦":"dǎ duō suo","地窨子":"dì yìn zi","狂想曲":"kuáng xiǎng qǔ","幻想曲":"huàn xiǎng qǔ","户口簿":"hù kǒu bù","腿肚子":"tuǐ dù zi","马尾藻":"mǎ wěi zǎo","练习曲":"liàn xí qǔ","夜猫子":"yè māo zi","折子戏":"zhé zi xì","打手势":"dǎ shǒu shì","龙王爷":"lóng wáng yé","要面子":"yào miàn zi","气头上":"qì tóu shang","糊涂虫":"hú tu chóng","笔杆子":"bǐ gǎn zi","占便宜":"zhàn pián yi","打主意":"dǎ zhǔ yi","多弹头":"duō dàn tóu","露一手":"lòu yī shǒu","堰塞湖":"yàn sè hú","保得住":"bǎo de zhù","趵突泉":"bào tū quán","钻空子":"zuān kòng zi","奥得河":"ào de hé","司务长":"sī wù zhǎng","禁不起":"jīn bu qǐ","什刹海":"shí chà hǎi","莲花落":"lián huā lào","一场空":"yī cháng kōng","前奏曲":"qián zòu qǔ","见世面":"xiàn shì miàn","分子筛":"fēn zǐ shāi","豁出去":"huō chu qu","电位差":"diàn wèi chā","挨个儿":"āi gè er","那阵儿":"nà zhèn er","给面子":"gěi miàn zi","肺活量":"fèi huó liàng","大师傅":"dà shī fū","掷弹筒":"zhì dàn tǒng","打呼噜":"dǎ hū lu","广渠门":"ān qú mén","未见得":"wèi jiàn de","大婶儿":"dà shěn er","谈得来":"tán de lái","狮子头":"shī zi tóu","脚丫子":"jiǎo yā zi","变奏曲":"biàn zòu qǔ","空包弹":"kōng bāo dàn","窝里斗":"wō li dòu","弹着点":"dàn zhuó diǎn","免不得":"miǎn bu de","个头儿":"gè tóu er","看得起":"kàn de qǐ","来不得":"lái bu de","糊涂账":"hú tu zhàng","大猩猩":"dà xīng xing","一溜儿":"yī liù ér","禁得起":"jīn de qǐ","法相宗":"fǎ xiāng zōng","可怜相":"kě lián xiàng","吃得下":"chī de xià","汉堡包":"hàn pù bāo","闹嚷嚷":"nào rāng rāng","数来宝":"shǔ lái bǎo","抹脖子":"mǒ bó zi","合得来":"hé de lái","干性油":"gàn xìng yóu","上辈子":"shàng bèi zi","闷葫芦":"mèn hú lú","呱呱叫":"guā guā jiào","西洋参":"xī yáng shēn","碰钉子":"pèng dìng zǐ","林荫道":"lín yīn dào","拉家常":"lá jiā cháng","卷铺盖":"juǎn pū gài","过得硬":"guò de yìng","飞将军":"fēi jiàng jūn","挑大梁":"tiǎo dà liáng","哈巴狗":"hǎ bā gǒu","过家家":"guō jiā jiā","催泪弹":"cuī lèi dàn","雨夹雪":"yǔ jiā xuě","敲竹杠":"qiāo zhū gàng","列车长":"liè chē zhǎng","回旋曲":"huí xuán qǔ","华达呢":"huá dá ní","犯得着":"fàn de zháo","土疙瘩":"tǔ gē da","煞风景":"shā fēng jǐng","轻量级":"qīng liàng jí","羞答答":"xiū dā dā","石子儿":"shí zǐ er","大帽子":"dà mào zi","达姆弹":"dá mǔ dàn","摇篮曲":"yáo lán qǔ","科教片":"kē jiào piān","侃大山":"kǎn tài shān","丁点儿":"dīng diǎn er","吃得消":"chī de xiāo","捋虎须":"luō hǔ xū","间奏曲":"jiàn zòu qǔ","高丽参":"gāo lí shēn","安魂曲":"ān hún qǔ","众生相":"zhòng shēng xiàng","咽峡炎":"yān xiá yán","禁得住":"jīn de zhù","打拍子":"dǎ pāi zi","催眠曲":"cuī mián qǔ","臭架子":"chòu jià zi","吃得开":"chī de kāi","柞丝绸":"zuò sī chóu","应声虫":"yìng shēng chóng","数得着":"shǔ de zháo","傻劲儿":"shǎ jìn er","铅玻璃":"qiān bō li","抹不开":"mò bù kāi","可的松":"kě dì sōng","划得来":"huá de lái","红帽子":"hóng mào zi","孩子王":"hái zi wáng","晕乎乎":"yùn hū hū","台柱子":"tái zhù zi","屎壳郎":"shǐ ke làng","尥蹶子":"liào jué zǐ","空架子":"kōng jià zi","藏红花":"zàng hóng huā","说不着":"shuō bù zháo","闷罐车":"mèn guàn chē","卡脖子":"qiǎ bó zi","红澄澄":"hóng deng deng","赶得及":"gǎn de jí","当间儿":"dāng jiàn ér","露马脚":"lòu mǎ jiǎo","鸡内金":"jī nà jīn","犯得上":"fàn děi shàng","钉齿耙":"dīng chǐ bà","饱和点":"bǎo huó diǎn","文曲星":"wén qǔ xīng","翘辫子":"qiào biàn zi","龙爪槐":"lóng zhǎo huái","喝倒彩":"hè dào cǎi","鸽子笼":"gē zi lóng","定冠词":"dìng guàn cí","担担面":"dàn dan miàn","吃得住":"chī de zhù","爪尖儿":"zhuǎ jiān er","支着儿":"zhī zhāo ér","折跟头":"zhē gēn tou","炸丸子":"zhá wán zǐ","阴着儿":"yīn zhāo ér","烟卷儿":"yān juǎn ér","宣传弹":"xuān chuán dàn","信皮儿":"xìn pí er","弦切角":"xián qiē jiǎo","跳房子":"tiào fáng zi","缩砂密":"sù shā mì","说得来":"shuō de lái","水漂儿":"shuǐ piǎo ér","耍笔杆":"shuǎ bǐ gǎn","数得上":"shǔ děi shàng","数不着":"shǔ bù zháo","数不清":"shǔ bù qīng","什件儿":"shí jiàn ér","狮子会":"shī zi huì","生死簿":"shēng sǐ bù","扇风机":"shān fēng jī","散摊子":"sàn tān zi","撒呓挣":"sā yì zhēng","日记簿":"rì jì bù","热得快":"rè de kuài","曲别针":"qǔ bié zhēn","亲家公":"qìng jiā gōng","奇函数":"jī hán shù","炮子儿":"pào zǐ er","拍纸簿":"pāi zhǐ bù","努劲儿":"nǔ jìn er","泥娃娃":"ní wá wa","内切圆":"nèi qiē yuán","哪会儿":"něi huì er","摸不着":"mō bù zháo","闷头儿":"mèn tou er","没谱儿":"méi pǔ er","铆劲儿":"mǎo jìn er","溜肩膀":"liū jiān bǎng","了望台":"liào wàng tái","老来少":"lǎo lái shào","坤角儿":"kūn jué ér","考勤簿":"kǎo qín bù","卷笔刀":"juǎn bǐ dāo","九重霄":"jiǔ chóng xiāo","进给量":"jìn jǐ liàng","划不来":"huá bù lái","汗褂儿":"hàn guà er","鼓囊囊":"gǔ nāng nang","够劲儿":"gòu jìn er","公切线":"gōng qiē xiàn","搁得住":"gé de zhù","搁不住":"gé bú zhù","赶浪头":"gǎn làng tóu","赶得上":"gǎn děi shàng","干酵母":"gàn jiào mǔ","嘎渣儿":"gā zhā er","嘎嘣脆":"gā bēng cuì","对得住":"duì de zhù","逗闷子":"dòu mèn zǐ","顶呱呱":"dǐng guā guā","滴溜儿":"dī liù ér","大轴子":"dà zhòu zǐ","打板子":"dǎ bǎn zi","寸劲儿":"cùn jìn er","醋劲儿":"cù jìn er","创牌子":"chuàng pái zi","揣手儿":"chuāi shǒu er","冲劲儿":"chòng jìn er","吃得来":"chī de lái","不更事":"bù gēng shì","奔头儿":"bèn tou er","百夫长":"bǎi fū zhǎng","娃娃亲":"wá wa qīn","死劲儿":"sǐ jìng er","骨朵儿":"gū duǒ er","功劳簿":"gōng láo bù"},t=Object.keys(d).map((n=>({zh:n,pinyin:d[n],priority:3,length:3}))),b={"成吉思汗":"chéng jí sī hán","四通八达":"sì tōng bā dá","一模一样":"yī mú yī yàng","青藏高原":"qīng zàng gāo yuán","阿弥陀佛":"ē mí tuó fó","解放思想":"jiè fàng sī xiǎng","所作所为":"suǒ zuò suǒ wéi","迷迷糊糊":"mí mí hu hū","荷枪实弹":"hè qiāng shí dàn","兴高采烈":"xìng gāo cǎi liè","无能为力":"wú néng wéi lì","融为一体":"róng wéi yī tǐ","布鲁塞尔":"bù lǔ sài ěr","为所欲为":"wéi suǒ yù wéi","审时度势":"shěn shí duó shì","克什米尔":"kè shí mǐ ěr","没完没了":"méi wán méi liǎo","不为人知":"bù wéi rén zhī","结结巴巴":"jiē jiē bā bā","前仆后继":"qián pū hòu jì","一年一度":"yì nián yí dù","各行各业":"gè háng gè yè","合二为一":"hé èr wéi yī","被子植物":"bèi zǐ zhí wù","铺天盖地":"pū tiān gài dì","直截了当":"zhí jié liǎo dàng","供不应求":"gōng bù yìng qiú","御史大夫":"yù shǐ dà fū","不为瓦全":"bù wéi wǎ quán","不可收拾":"bù kě shōu shi","胡作非为":"hú zuò fēi wéi","分毫不差":"fēn háo bù chā","模模糊糊":"mó mó hu hū","不足为奇":"bù zú wéi qí","如之奈何":"rú zhī nai hé","悄无声息":"qiǎo wú shēng xī","卷土重来":"juǎn tǔ chóng lái","了如指掌":"liǎo rú zhǐ zhǎng","深恶痛绝":"shēn wù tòng jué","高高兴兴":"gāo gāo xìng xìng","唉声叹气":"āi shēng tàn qì","混为一谈":"hùn wéi yī tán","不了了之":"bù liǎo liǎo zhī","汉藏语系":"hàn zàng yǔ xì","处心积虑":"chǔ xīn jī lǜ","泣不成声":"qǐ bù chéng shēng","半夜三更":"bàn yè sān gēng","失魂落魄":"shī hún luò pò","二十八宿":"èr shí bā xiù","转来转去":"zhuàn lái zhuàn qù","数以万计":"shǔ yǐ wàn jì","相依为命":"xiāng yī wéi mìng","恋恋不舍":"liàn liàn bù shě","屈指可数":"qū zhǐ kě shǔ","神出鬼没":"shén chū guǐ mò","结结实实":"jiē jiē shí shí","有的放矢":"yǒu dì fàng shǐ","叽哩咕噜":"jī lǐ gū lū","合而为一":"hé ér wéi yī","调兵遣将":"diào bīng qiǎn jiàng","载歌载舞":"zài gē zài wǔ","转危为安":"zhuǎn wēi wéi ān","踏踏实实":"tā tā shi shí","桑给巴尔":"sāng jǐ bā ěr","装模作样":"zhuāng mú zuò yàng","见义勇为":"jiàn yì yǒng wéi","相差无几":"xiāng chā wú jǐ","叹为观止":"tàn wéi guān zhǐ","闷闷不乐":"mèn mèn bù lè","喜怒哀乐":"xǐ nù āi lè","鲜为人知":"xiǎn wéi rén zhī","张牙舞爪":"zhāng yá wǔ zhǎo","为非作歹":"wéi fēi zuò dǎi","一蹶不振":"yī jué bù zhèn","含糊其辞":"hán hú qí cí","疲于奔命":"pí yú bēn mìng","勉为其难":"miǎn wéi qí nán","依依不舍":"yī yī bù shě","顶头上司":"dǐng tóu shàng si","不着边际":"bù zhuó biān jì","大模大样":"dà mú dà yàng","寻欢作乐":"xún huān zuò lè","一走了之":"yī zǒu liǎo zhī","一年到头":"yì nián dào tóu","字里行间":"zì lǐ háng jiān","含含糊糊":"hán hán hu hū","数一数二":"shǔ yī shǔ èr","恰如其分":"qià rú qí fèn","破涕为笑":"pò tì wéi xiào","深更半夜":"shēn gēng bàn yè","千差万别":"qiān chā wàn bié","数不胜数":"shǔ bù shèng shǔ","据为己有":"jù wéi jǐ yǒu","天旋地转":"tiān xuán dì zhuàn","养尊处优":"yǎng zūn chǔ yōu","玻璃纤维":"bō li xiān wéi","吵吵闹闹":"chāo chao nào nào","晕头转向":"yūn tóu zhuàn xiàng","土生土长":"tǔ shēng tǔ zhǎng","宁死不屈":"nìng sǐ bù qū","不省人事":"bù xǐng rén shì","尽力而为":"jìn lì ér wéi","精明强干":"jīng míng qiáng gàn","唠唠叨叨":"láo lao dāo dāo","叽叽喳喳":"jī ji zhā zhā","功不可没":"gōng bù kě mò","锲而不舍":"qiè ér bù shě","排忧解难":"pái yōu jiě nàn","稀里糊涂":"xī li hú tú","异曲同工":"yì qǔ tóng gōng","各有所长":"gè yǒu suǒ chéng","的的确确":"dí dí què què","一言为定":"yī yán wéi dìng","哄堂大笑":"hōng táng dà xiào","听而不闻":"tīng ér bú wén","刀耕火种":"dāo gēng huǒ zhòng","说不过去":"shuō bu guò qù","内分泌腺":"nèi fèn mì xiàn","化险为夷":"huà xiǎn wéi yí","百发百中":"bǎi fā bǎi zhòng","重见天日":"chóng jiàn tiān rì","反败为胜":"fǎn bài wéi shèng","一了百了":"yī liǎo bǎi liǎo","大大咧咧":"dà da liē liē","心急火燎":"xīn jí huǒ liǎo","粗心大意":"cū xīn dà yi","鸡皮疙瘩":"jī pí gē da","夷为平地":"yí wéi píng dì","日积月累":"rì jī yuè lěi","设身处地":"shè shēn chǔ dì","投其所好":"tóu qí suǒ hào","间不容发":"jiān bù róng fà","人满为患":"rén mǎn wéi huàn","穷追不舍":"qióng zhuī bù shě","为时已晚":"wéi shí yǐ wǎn","如数家珍":"rú shǔ jiā zhēn","心里有数":"xīn lǐ yǒu shù","一盘散沙":"yī pán sǎn shā","以牙还牙":"yǐ yá huán yá","神不守舍":"shén bù shǒu shě","孟什维克":"mèng shí wéi kè","各自为战":"gè zì wéi zhàn","怨声载道":"yuàn shēng zài dào","一哄而散":"yī hòng ér sàn","救苦救难":"jiù kǔ jiù nàn","好好先生":"hǎo hǎo xiān sheng","怪模怪样":"guài mú guài yàng","抛头露面":"pāo tóu lù miàn","游手好闲":"yóu shǒu hào xián","无所不为":"wú suǒ bù wéi","调虎离山":"diào hǔ lí shān","步步为营":"bù bù wéi yíng","好大喜功":"hào dà xǐ gōng","众矢之的":"zhòng shǐ zhī dì","长生不死":"cháng shēng bū sǐ","蔚为壮观":"wèi wéi zhuàng guān","不可胜数":"bù kě shèng shǔ","鬼使神差":"guǐ shǐ shén chāi","洁身自好":"jié shēn zì hào","敢作敢为":"gǎn zuò gǎn wéi","茅塞顿开":"máo sè dùn kāi","走马换将":"zǒu mǎ huàn jiàng","为时过早":"wéi shí guò zǎo","为人师表":"wéi rén shī biǎo","阴差阳错":"yīn chā yáng cuò","油腔滑调":"yóu qiāng huá diào","重蹈覆辙":"chóng dǎo fù zhé","骂骂咧咧":"mà ma liē liē","絮絮叨叨":"xù xù dāo dāo","如履薄冰":"rú lǚ bó bīng","损兵折将":"sǔn bīng zhé jiàng","无可比拟":"wú kě bǐ nì","拐弯抹角":"guǎi wān mò jiǎo","像模像样":"xiàng mú xiàng yàng","供过于求":"gōng guò yú qiú","开花结果":"kāi huā jiē guǒ","仔仔细细":"zǐ zǐ xì xì","川藏公路":"chuān zàng gōng lù","河北梆子":"hé běi bāng zi","长年累月":"cháng nián lěi yuè","正儿八经":"zhèng er bā jīng","不识抬举":"bù shí tái ju","重振旗鼓":"chóng zhèn qí gǔ","气息奄奄":"qì xī yān yān","紧追不舍":"jǐn zhuī bù shě","服服帖帖":"fú fu tiē tiē","强词夺理":"qiǎng cí duó lǐ","噼里啪啦":"pī li pā lā","人才济济":"rén cái jǐ jǐ","发人深省":"fā rén shēn xǐng","不足为凭":"bù zú wéi píng","为富不仁":"wéi fù bù rén","连篇累牍":"lián piān lěi dú","呼天抢地":"hū tiān qiāng dì","落落大方":"luò luò dà fāng","自吹自擂":"zì chuī zì léi","乐善好施":"lè shàn hào shī","以攻为守":"yǐ gōng wéi shǒu","磨磨蹭蹭":"mó mó cèng cèng","削铁如泥":"xuē tiě rú ní","助纣为虐":"zhù zhòu wéi nüè","以退为进":"yǐ tuì wéi jìn","重整旗鼓":"chóng zhěng qí gǔ","嘁嘁喳喳":"qī qī chā chā","枪林弹雨":"qiāng lín dàn yǔ","令人发指":"lìng rén fà zhǐ","转败为胜":"zhuǎn bài wéi shèng","转弯抹角":"zhuǎn wān mò jiǎo","在劫难逃":"zài jié nán táo","正当防卫":"zhèng dàng fáng wèi","不足为怪":"bù zú wéi guài","难兄难弟":"nàn xiōng nàn dì","咿咿呀呀":"yī yī yā yā","弹尽粮绝":"dàn jìn liáng jué","八旗子弟":"bā qí zi dì","阿谀奉承":"ē yú fèng chéng","稀里哗啦":"xī li huā lā","返老还童":"fǎn lǎo huán tóng","好高骛远":"hào gāo wù yuǎn","灾难深重":"zāi nán shēn zhòng","鹿死谁手":"lù sǐ shéi shǒu","差强人意":"chā qiáng rén yì","大吹大擂":"dà chuī dà léi","成家立业":"chéng jiā lì yiè","自怨自艾":"zì yuàn zì yì","负债累累":"fù zhai lěi lěi","古为今用":"gǔ wéi jīn yòng","入土为安":"rù tǔ wéi ān","下不为例":"xià bù wéi lì","一哄而上":"yì hōng ér shàng","一股劲儿":"yī gǔ jìn er","没头苍蝇":"méi tóu cāng ying","天差地远":"tiān chā dì yuǎn","风卷残云":"fēng juǎn cán yún","多灾多难":"duō zāi duō nàn","乳臭未干":"rǔ xiù wèi gān","行家里手":"háng jiā lǐ shǒu","狼狈为奸":"láng bèi wéi jiān","处变不惊":"chǔ biàn bù jīng","一唱一和":"yī chàng yī hè","一念之差":"yī niàn zhī chā","金蝉脱壳":"jīn chán tuō qiào","滴滴答答":"dī dī dā dā","硕果累累":"shuò guǒ léi léi","只知其一":"zhǐ zhī qí yī","好整以暇":"hào zhěng yǐ xiá","红得发紫":"hóng de fā zǐ","传为美谈":"chuán wéi měi tán","富商大贾":"fù shāng dà gǔ","四海为家":"sì hǎi wéi jiā","失而复得":"shī ér fù de","了若指掌":"liǎo ruò zhǐ zhǎng","大有可为":"dà yǒu kě wéi","出头露面":"chū tóu lù miàn","鼓鼓囊囊":"gǔ gu nāng nāng","窗明几净":"chuāng míng jī jìng","泰然处之":"tài rán chǔ zhī","怒发冲冠":"nù fà chōng guān","不甚了了":"bù shèn liǎo liǎo","有机玻璃":"yǒu jī bō li","骨头架子":"gú tou jià zi","义薄云天":"yì bó yún tiān","一丁点儿":"yī dīng diǎn er","时来运转":"shí lái yùn zhuǎn","陈词滥调":"chén cí làn diào","七十二行":"qī shí èr háng","化整为零":"huà zhěng wéi líng","火烧火燎":"huǒ shāo huǒ liǎo","干脆利索":"gàn cuì lì suǒ","吊儿郎当":"diào er láng dāng","广种薄收":"guǎng zhòng bó shōu","种瓜得瓜":"zhòng guā dé guā","种豆得豆":"zhòng dòu dé dòu","难舍难分":"nán shě nán fēn","歃血为盟":"shà xuè wéi méng","奋发有为":"fèn fā yǒu wéi","阴错阳差":"yīn cuò yáng chā","东躲西藏":"dōng duǒ xī cáng","烟熏火燎":"yān xūn huǒ liǎo","钻牛角尖":"zuān niú jiǎo jiān","乔装打扮":"qiáo zhuāng dǎ bàn","改弦更张":"gǎi xián gēng zhāng","河南梆子":"hé nán bāng zi","好吃懒做":"hào chī lǎn zuò","何乐不为":"hé lè bù wéi","大出风头":"dà chū fēng tóu","攻城掠地":"gōng chéng lüě dì","漂漂亮亮":"piào piào liang liang","折衷主义":"zhé zhōng zhǔ yì","大马哈鱼":"dà mǎ hǎ yú","绿树成荫":"lǜ shù chéng yīn","率先垂范":"shuài xiān chuí fàn","家长里短":"jiā cháng lǐ duǎn","宽大为怀":"kuān dà wéi huái","左膀右臂":"zuǒ bǎng yòu bì","影子内阁":"yǐng zi nèi gé","一笑了之":"yī xiào liǎo zhī","天下为公":"tiān xià wéi gōng","还我河山":"huán wǒ hé shān","何足为奇":"hé zú wéi qí","好自为之":"hào zì wéi zhī","风姿绰约":"fēng zī chuō yué","大雨滂沱":"dà yǔ páng tuó","传为佳话":"chuán wéi jiā huà","吃里扒外":"chī lǐ pá wài","重操旧业":"chóng cāo jiù yè","小家子气":"xiǎo jiā zi qì","少不更事":"shào bù gēng shì","难分难舍":"nán fēn nán shě","只争朝夕":"zhǐ zhēng zhāo xī","添砖加瓦":"tiān zhuān jiē wǎ","是非分明":"shì fēi fēn míng","舍我其谁":"shě wǒ qí shuí","偏听偏信":"piān tīng piāng xìn","量入为出":"liàng rù wéi chū","降龙伏虎":"xiáng lóng fú hǔ","故伎重演":"gù jì zhòng yǎn","钢化玻璃":"gāng huà bō li","正中下怀":"zhèng zhòng xià huái","以身许国":"yǐ shēng xǔ guó","一语中的":"yī yǔ zhōng dì","丧魂落魄":"sàng hún luò pò","三座大山":"sān zuò tài shān","济济一堂":"jǐ jǐ yī táng","好事之徒":"hào shì zhī tú","干净利索":"gàn jìng lì suǒ","出将入相":"chū jiàng rù xiàng","袅袅娜娜":"niǎo niǎo nuó nuó","狐狸尾巴":"hú li wěi ba","好逸恶劳":"hào yì wù láo","大而无当":"dà ér wú dàng","打马虎眼":"dǎ mǎ hu yǎn","板上钉钉":"bǎn shàng dìng dīng","吆五喝六":"yāo wǔ hè liù","虾兵蟹将":"xiā bīng xiè jiàng","水调歌头":"shuǐ diào gē tóu","数典忘祖":"shǔ diǎn wàng zǔ","人事不省":"rén shì bù xǐng","曲高和寡":"qǔ gāo hè guǎ","偶一为之":"ǒu yī wéi zhī","屡教不改":"lǚ jiàn bù gǎi","互为因果":"hù wéi yīn guò","互为表里":"hù wéi biǎo lǐ","厚此薄彼":"hòu cǐ bó bǐ","过关斩将":"guò guān zhǎn jiàng","疙疙瘩瘩":"gē gē dā dá","否极泰来":"pǐ jí tài lái","大腹便便":"dà fù pián pián","走为上策":"zǒu wéi shàng cè","冤家对头":"yuān jia duì tóu","有隙可乘":"yǒu xì kě chèng","一无所得":"yī wú suǒ dé","一鳞半爪":"yī lín bàn zhǎo","一哄而起":"yī hōng ér qǐ","片言只语":"piàn yán zhǐ yǔ","开花结实":"kāi huā jié shí","旧地重游":"jiù dì chóng yóu","经年累月":"jīng nián lěi yuè","含糊其词":"hán hú qí cí","寡廉鲜耻":"guǎ lián xiǎn chǐ","成年累月":"chéng nián lěi yuè","不徇私情":"bù xún sī qíng","不当人子":"bù dāng rén zǐ","膀大腰圆":"bǎng dà yāo yuán","指腹为婚":"zhǐ fù wéi hūn","这么点儿":"zhè me diǎn er","意兴索然":"yì xīng suǒ rán","绣花枕头":"xiù huā zhěn tóu","无的放矢":"wú dì fàng shǐ","望闻问切":"wàng wén wèn qiē","舍己为人":"shě jǐ wèi rén","穷年累月":"qióng nián lěi yuè","排难解纷":"pái nàn jiě fēn","处之泰然":"chǔ zhī tài rán","指鹿为马":"zhǐ lù wéi mǎ","一吐为快":"yī tǔ wéi kuài","一丘之貉":"yī qiū zhī hé","危如累卵":"wēi rú lěi luǎn","天兵天将":"tiān bīng tiān jiàng","舍近求远":"shě jìn qiú yuǎn","南腔北调":"nán qiāng běi diào","苦中作乐":"kǔ zhōng zuò lè","厚积薄发":"hòu jī bó fā","戴绿帽子":"dài lǜ mào zi","臭味相投":"xiù wèi xiāng tóu","长幼有序":"zhǎng yòu yǒu xù","逼良为娼":"bī liáng wéi chāng","悲悲切切":"bēi bēi qiè qiē","败军之将":"bài jūn zhī jiàng","欺行霸市":"qī háng bà shì","削足适履":"xuē zú shì lǚ","先睹为快":"xiān dǔ wéi kuài","啼饥号寒":"tí jī háo hán","疏不间亲":"shū bù jiàn qīn","神差鬼使":"shén chāi guǐ shǐ","敲敲打打":"qiāo qiāo dā dā","平铺直叙":"píng pū zhí xù","没头没尾":"méi tóu mò wěi","寥寥可数":"liáo liáo kě shǔ","哼哈二将":"hēng hā èr jiàng","鹤发童颜":"hè fà tóng yán","各奔前程":"gè bèn qián chéng","弹无虚发":"dàn wú xū fā","大人先生":"dà rén xiān sheng","与民更始":"yǔ rén gēng shǐ","叶落归根":"yè luò huī gēn","一目十行":"yī mù shí háng","虚晃一枪":"xiù huàng yī qiāng","树碑立传":"shù bēi lì zhuàn","是非得失":"shì fēi dé shī","实逼处此":"shí bī chǔ cǐ","塞翁失马":"sài wēng shī mǎ","日薄西山":"rì bó xī shān","切身体会":"qiē shēn tǐ huì","片言只字":"piàn yán zhǐ zì","跑马卖解":"pǎo mǎ mài xiè","宁折不弯":"nìng zhé bù wān","零零散散":"líng líng sǎn sǎn","量体裁衣":"liàng tǐ cái yī","连中三元":"lián zhòng sān yuán","礼崩乐坏":"lǐ bēng yuè huài","胡子拉碴":"hú zǐ lā chā","不为已甚":"bù wéi yǐ shèn","转悲为喜":"zhuǎn bēi wéi xǐ","以眼还眼":"yǐ yǎn huán yǎn","蔚为大观":"wèi wéi dà guān","未为不可":"wèi wéi bù kě","童颜鹤发":"tóng yán hè fà","朋比为奸":"péng bǐ wéi jiān","莫此为甚":"mò cǐ wéi shèn","老调重弹":"lǎo diào zhòng dàn","夹枪带棒":"jiā qiāng dài bàng","富商巨贾":"fù shāng jù jiǎ","多劳多得":"duō láo duō de","淡然处之":"dàn rán chǔ zhī","箪食壶浆":"dān sì hú jiāng","创巨痛深":"chuāng jù tòng shēn","草长莺飞":"cǎo zhǎng yīng fēi","坐视不救":"zuò shī bù jiù","重起炉灶":"chóng qǐ lú zào","以己度人":"yǐ jǐ duó rén","随行就市":"suí háng jiù shì","文以载道":"wén yǐ zài dào","文不对题":"wén bù duì tí","铁板钉钉":"tiě bǎn dìng dīng","身体发肤":"shēn tǐ fà fū","缺吃少穿":"quē chī xhǎo chuān","目无尊长":"mù wú zūn zhǎng","吉人天相":"jí rén tiān xiàng","毁家纾难":"huǐ jiā shū nàn","钢筋铁骨":"gāng jīng tiě gǔ","丢卒保车":"diū zú bǎo jū","丢三落四":"diū sān là sì","闭目塞听":"bì mù sè tīng","削尖脑袋":"xuē jiān nǎo dài","为非作恶":"wéi fēi zuò è","人才难得":"rén cái cái dé","情非得已":"qíng fēi dé yǐ","切中要害":"qiē zhōng yào hài","火急火燎":"huǒ jí huǒ liǎo","画地为牢":"huà dì wéi láo","好酒贪杯":"hào jiǔ tān bēi","长歌当哭":"cháng gē dàng kū","载沉载浮":"zài chén zài fú","遇难呈祥":"yù nàn chéng xiáng","榆木疙瘩":"yú mù gē da","以邻为壑":"yǐ lín wéi hè","洋为中用":"yáng wéi zhōng yòng","言为心声":"yán wéi xīn shēng","言必有中":"yán bì yǒu zhòng","图穷匕见":"tú qióng bǐ xiàn","滂沱大雨":"páng tuó dà yǔ","目不暇给":"mù bù xiá jǐ","量才录用":"liàng cái lù yòng","教学相长":"jiào xué xiāng zhǎng","悔不当初":"huǐ bù dāng chū","呼幺喝六":"hū yāo hè liù","不足为训":"bù zú wéi xùn","不拘形迹":"bù jū xíng jī","傍若无人":"páng ruò wú rén","八大山人":"bā tài shān rén","罪责难逃":"zuì zé nán táo","自我吹嘘":"zì wǒ chuí xū","转祸为福":"zhuǎn huò wéi fú","重峦叠嶂":"chóng luán dié zhàng","勇冠三军":"yǒng guàn sān jūn","易地而处":"yì dì ér chǔ","一语破的":"yī yǔ pò dì","卸磨杀驴":"xiè mò shā lǘ","玩儿不转":"wán ér bù zhuàn","天道好还":"tiān dào hǎo huán","身单力薄":"shēn dān lì bó","撒豆成兵":"sǎ dòu chéng bīng","曲里拐弯":"qū lǐ guǎn wān","片纸只字":"piàn zhǐ yán zì","宁缺毋滥":"nìng quē wù làn","没没无闻":"mò mò wú wén","量力而为":"liàng lì ér wéi","历历可数":"lì lì kě shǔ","口碑载道":"kǒu bēi zài dào","君子好逑":"jūn zǐ hào qiú","好为人师":"hào wéi rén shī","豪商巨贾":"háo shāng jù jiǎ","各有所好":"gè yǒu suǒ hào","度德量力":"duó dé liàng lì","便宜从事":"biàn yí cóng shì","指天为誓":"zhǐ tiān wéi shì","逸兴遄飞":"yì xìng chuán fēi","心宽体胖":"xīn kuān tǐ pán","为德不卒":"wéi dé bù zú","纨袴子弟":"wán kǔ zǐ dì","天下为家":"tiān xià wéi jiā","视为畏途":"shì wéi wèi tú","舍己从人":"shě jǐ cóng rén","三灾八难":"sān zāi bā nàn","人自为战":"rén zì wéi zhàn","群雌粥粥":"qún cí yù yù","那么点儿":"nà me diǎn er","沐猴而冠":"mù hóu ér guàn","谋为不轨":"móu wéi bù guǐ","明窗净几":"míng chuāng jìng jī","哩哩啦啦":"li li lā lā","见缝就钻":"jiàn fèng jiù zuān","夹层玻璃":"jiā céng bō li","急公好义":"jí gōng hào yì","积年累月":"jī nián lěi yuè","划地为牢":"huá dì wéi láo","更名改姓":"gèng míng gǎi xìng","奉为圭臬":"fèng wéi guī niè","多难兴邦":"duō nàn xīng bāng","顿开茅塞":"dùn kāi máo sè","弹尽援绝":"dàn jìn yuán jué","大脖子病":"dà bó zi bìng","不破不立":"bù può bù lì","坐地自划":"zuò dì zì huá","坐不重席":"zuò bù chóng xí","坐不窥堂":"zùo bù kuī táng","作舍道旁":"zuò shě dào páng","作嫁衣裳":"zuò jià yī shāng","左支右吾":"zuǒ zhī yòu wū","左枝右梧":"zuǒ zhī yòu wū","左宜右有":"zuǒ yí yòu fú","罪应万死":"zuì yīng wàn sǐ","钻心刺骨":"zuàn xīn cì gǔ","钻穴逾墙":"zuān xué yú qiáng","钻穴逾隙":"zuān xué yú xì","钻隙逾墙":"zuān xì yú qiáng","钻头觅缝":"zuān tóu mì fèng","钻天觅缝":"zuàn tiān mì féng","钻天打洞":"zuān tiān dǎ dòng","钻皮出羽":"zuān pí chū yǔ","钻懒帮闲":"zuān lǎn bāng xián","钻火得冰":"zuān huǒ dé bīng","钻洞觅缝":"zuàn dòng mì féng","钻冰求火":"zuān bīng qiú huǒ","钻冰求酥":"zuān bīng qiú sū","走为上着":"zǒu wèi shàng zhaō","走花溜水":"zǒu huā liū bīng","纵曲枉直":"zòng qǔ wǎng zhí","自相惊忧":"zì xiāng jīng rǎo","子为父隐":"zǐ wéi fù yǐn","资深望重":"zī shēng wàng zhòng","擢发难数":"zhuó fà nán shǔ","擢发莫数":"zhuó fà mò shǔ","着书立说":"zhù shū lì shuō","着人先鞭":"zhuó rén xiān biān","斫琱为朴":"zhuó diāo wéi pǔ","斫雕为朴":"zhuó diāo wéi pǔ","锥处囊中":"zhuī chǔ náng zhōng","椎膺顿足":"chuí yīng dùn zú","椎胸跌足":"chuí xiōng diē zú","椎胸顿足":"chuí xiōng dùn zú","椎心饮泣":"chuí xīn yǐn qì","椎心泣血":"chuí xīn qì xuè","椎心呕血":"chuí xīn ǒu xuè","椎心顿足":"chuí xīn dùn zú","椎天抢地":"chuí tiān qiǎng dì","椎牛飨士":"chuí niú xiǎng shì","椎牛歃血":"chuí niú shà xuè","椎牛发冢":"chuí niú fā zhǒng","椎埋屠狗":"chuí mái tú gǒu","椎埋狗窃":"chuí mái gǒu qiè","椎肤剥体":"chuí fū bō tǐ","椎肤剥髓":"chuí fū bō suǐ","椎锋陷阵":"chuí fēng xiàn zhèn","椎锋陷陈":"chuī fēng xiàn chén","追欢作乐":"zhuī huān zuò lè","追风摄景":"zhuī fēng niè jǐng","壮发冲冠":"zhuàng fā chōng guàn","庄严宝相":"zhuāng yán bǎo xiàng","转灾为福":"zhuǎn zāi wéi fú","转湾抹角":"zhuǎn wān mò jiǎo","转愁为喜":"zhuǎn chóu wéi xǐ","转嗔为喜":"zhuǎn chēn wéi xǐ","转败为成":"zhuǎn bài wéi chéng","转败为功":"zhuǎn bài wéi gōng","拽巷攞街":"zhuài xiàng luǒ jiē","拽巷啰街":"zhuài xiàng luó jiē","拽耙扶犁":"zhuāi pá fú lí","拽布拖麻":"zhuāi bù tuō má","箸长碗短":"zhù chàng wǎn duǎn","铸剑为犁":"zhù jiàn wéi lí","杼柚之空":"zhù zhóu zhī kōng","杼柚其空":"zhù zhóu qí kōng","杼柚空虚":"zhù zhóu kōng xū","助天为虐":"zhù tiān wéi nüè","助桀为虐":"zhù jié wéi nüè","属垣有耳":"zhǔ yuán yǒu ěr","属毛离里":"zhǔ máo lí lǐ","属辞比事":"zhǔ cí bǐ shì","属词比事":"zhǔ cí bǐ shì","逐物不还":"zhú wù bù huán","铢铢校量":"zhū zhū xiào liàng","铢量寸度":"zhū liáng cùn duó","铢两悉称":"zhū liǎng xī chèn","铢积寸累":"zhū jī cùn lěi","侏儒一节":"zhū rǔ yī jié","侏儒观戏":"zhū rǔ guān xì","朱槃玉敦":"zhū pán yù duì","朱盘玉敦":"zhū pán yù duì","朱轓皁盖":"zhū fān hǎi gài","昼干夕惕":"zhòu gàn xī tì","昼度夜思":"zhòu duó yè sī","诪张为幻":"zhōu zhāng wéi huàn","周郎顾曲":"zhōu láng gù qǔ","侜张为幻":"zhōu zhāng wéi huàn","重足一迹":"chóng zú yī jì","重足屏息":"chóng zú bǐng xī","重足屏气":"chóng zú bǐng qì","重足累息":"chóng zú lèi xī","重足而立":"chóng zú ér lì","重纸累札":"chóng zhǐ lèi zhá","重垣叠锁":"chóng yuán dié suǒ","重垣迭锁":"chóng yuán dié suǒ","重裀列鼎":"chóng yīn liè dǐng","重岩叠嶂":"chóng yán dié zhàng","重兴旗鼓":"chóng xīng qí gǔ","重熙累叶":"chóng xī lěi yè","重熙累盛":"chóng xī lěi shèng","重手累足":"chóng shǒu lěi zú","重山峻岭":"chóng shān jùn lǐng","重山复水":"chóng shān fù shuǐ","重山复岭":"chóng shān fù lǐng","重三叠四":"chóng sān dié sì","重三迭四":"chóng sān dié sì","重气徇命":"zhòng qì xùn míng","重纰貤缪":"chóng pī yí miù","重葩累藻":"chóng pā lèi zǎo","重明继焰":"chóng míng jì yàn","重峦复嶂":"chóng luán fù zhàng","重峦叠巘":"chóng luán dié yǎn","重峦迭巘":"chóng luán dié yǎn","重理旧业":"chóng lǐ jiù yè","重金袭汤":"chóng jīn xí tāng","重金兼紫":"chóng jīn jiān zǐ","重迹屏气":"chóng jì bǐng qì","重珪叠组":"chóng guī dié zǔ","重规袭矩":"chóng guī xí jǔ","重规叠矩":"chóng guī dié jǔ","重规累矩":"chóng guī lèi jǔ","重规迭矩":"chóng guī dié jǔ","重规沓矩":"chóng guī tà jǔ","重圭叠组":"chóng guī dié zǔ","重睹天日":"chóng dǔ tiān rì","重床叠屋":"chóng chuáng dié wū","重床叠架":"chóng chuáng dié jià","重床迭屋":"chóng chuáng dié wū","重床迭架":"chóng chuáng dié jià","众啄同音":"zhòng zhòu tóng yīn","众星攒月":"zhòng xīng cuán yuè","众毛攒裘":"zhòng máo cuán qiú","众好众恶":"zhòng hào zhòng wù","钟鼎人家":"zhōng dǐng rén jia","擿植索涂":"zhāi zhí suǒ tú","擿埴索涂":"zhāi zhí suǒ tú","擿埴索途":"zhāi zhí suǒ tú","稚齿婑媠":"zhì chǐ wǒ tuǒ","致远任重":"zhì yuǎn rèn zhàng","栉比鳞差":"zhì bǐ lín cǐ","至当不易":"zhì dàng bù yì","指皁为白":"zhǐ zào wéi bái","指皂为白":"zhǐ zào wéi bái","指雁为羹":"zhǐ yàn wéi gēng","指树为姓":"zhǐ shù wéi xìng","指山说磨":"zhǐ shān shuō mò","指山卖磨":"zhǐ shān mài mò","只争旦夕":"zhǐ zhēng dàn xī","止戈为武":"zhǐ gē wéi wǔ","植发穿冠":"zhí fà chuān guàn","植发冲冠":"zhí fà chōng guàn","直言切谏":"zhí yán qiē jiàn","直扑无华":"zhí pǔ wú huá","知疼着痒":"zhī téng zháo yǎng","枝叶相持":"zhī yè xīng chí","枝干相持":"zhī gàn xiāng xhí","枝附叶着":"zhī fù yiè zhuó","枝附叶著":"zhī fù yiè zhuó","枝大于本":"zhī dà yù běn","支吾其词":"zhī wū qí cí","支分族解":"zhī fē zú jiě","正中己怀":"zhèng zhòng jǐ huái","正身率下":"zhèng shēn shuài xià","正冠纳履":"zhèng guàn nà lǚ","正冠李下":"zhèng guàn lǐ xià","整冠纳履":"zhěng guàn nà lǚ","整躬率物":"zhěng gōng shuài wù","整顿干坤":"zhěng dùn gàn kūn","蒸沙为饭":"zhēng shā wéi fàn","振兵泽旅":"zhèn bīng shì lǚ","枕席还师":"zhěn xí huán shī","枕石漱流":"zhěn shí sòu liú","枕石嗽流":"zhěn shí shù liú","真相毕露":"zhēn xiāng bì lù","针头削铁":"zhēn tóu xuē tiě","贞松劲柏":"zhēn sōng jìng bǎi","赭衣塞路":"zhě yī sài lù","折腰五斗":"shé yāo wǔ dòu","折箭为誓":"shé jiàn wéi shì","折而族之":"zhe er zu zi","昭德塞违":"zhāo dé sè wéi","彰明较着":"zhāng míng jiào zhù","章句小儒":"zhāng jù xiāo rú","湛恩汪濊":"zhàn ēn wāng hún","占风望气":"zhān fēng wàng qì","占风使帆":"zhān fēng shǐ fān","斩将刈旗":"zhǎn jiàng yì qí","斩将搴旗":"zhǎn jiàng qiān qí","斩钉切铁":"zhǎn dīng qiē tiě","詹言曲说":"zhān yán qǔ shuō","沾沾自好":"zhān zhān zì hào","曾母投杼":"zēng mǔ tóu zhù","曾参杀人":"zēng shēn shā rén","曾不惨然":"zeng bu chan ran","造谣中伤":"zào yáo zhòng shāng","早占勿药":"zǎo zhān wù yào","凿龟数策":"záo guī shǔ cè","攒三集五":"cuán sān jí wǔ","攒三聚五":"cuán sān jù wǔ","攒眉苦脸":"zǎn méi kǔ liǎn","攒眉蹙额":"cuán mei cù é","攒零合整":"cuán líng hé zhěng","攒锋聚镝":"cuán fēng jù dí","载舟覆舟":"zài zhōu fù zhōu","载一抱素":"zài yī bào sù","载笑载言":"zài xiào zài yán","载驱载驰":"zài qū zài chí","载酒问字":"zài jiǔ wèn zì","载歌且舞":"zài gē qiě wǔ","运转时来":"yùn zhuǎn shí lái","殒身不恤":"yǔn shēn bú xù","云舒霞卷":"yún shū xiá juǎn","云泥之差":"yún ní zhī chā","岳镇渊渟":"yuè zhèn yuān tīng","月中折桂":"yuè zhōng shé guì","月没参横":"yuè mò shēn héng","月落参横":"yuè luò shēn héng","远不间亲":"yuǎn bù jiàn qīn","鬻驽窃价":"yù nǔ qiè jià","鬻鸡为凤":"yù jī wéi fèng","遇难成祥":"yù nàn chéng xiáng","郁郁累累":"yù yù lěi lěi","吁天呼地":"yù tiān hū dì","吁咈都俞":"yù fú dōu yú","玉卮无当":"yù zhī wú dàng","语笑喧阗":"yǔ xiào xuān tiān","与世沉浮":"yú shì chén fú","与时消息":"yǔ shí xiāo xi","与民除害":"yǔ hǔ chú hài","逾墙钻隙":"yú qiáng zuān xì","渔阳鞞鼓":"yǔ yáng pí gǔ","渔夺侵牟":"yú duó qīn móu","鱼目混珎":"yú mù hùn zhū","杅穿皮蠹":"yú chuān shuǐ dù","余勇可贾":"yú yǒng kě gǔ","予智予雄":"yú zhì yú xióng","予取予携":"yú qǔ yú xié","予取予求":"yú qǔ yú qiú","予取予夺":"yú qǔ yú duó","于家为国":"yú jiā wéi guó","又弱一个":"yòu ruò yī gè","有借无还":"yǒu jiè wú huán","有加无已":"yǒu jiā wǔ yǐ","有国难投":"yǒu guó nán tóu","有蠙可乘":"yǒu bīn kě chéng","游必有方":"yōu bì yǒu fāng","油干灯尽":"yóu gàn dēng jìn","尤云殢雨":"yóu yún zhì yǔ","饔飧不给":"yōng sūn bù jǐ","庸中皦皦":"yōng zhōng bì tóng","蝇攒蚁聚":"yíng cuán yǐ jù","郢书燕说":"yǐng shū yān shuō","蝇攒蚁附":"yíng cuán yǐ fù","营蝇斐锦":"yíng yíng fēi jǐn","盈千累万":"yíng qiān lěi wàn","盈篇累牍":"yíng piān lěi dú","鹰心雁爪":"yīng xīn yàn zhǎo","莺吟燕儛":"yīng yín yàn sāi","应天顺时":"yīng tiān shùn shí","印累绶若":"yìn léi shòu ruò","隐占身体":"yin zhan shen qi","饮犊上流":"yìn dú shàng liú","饮冰食蘖":"yǐn bīng shí bò","引绳切墨":"yǐn shéng qiē mò","龈齿弹舌":"yín chǐ dàn shé","淫言媟语":"yín yán liǎng yǔ","淫词艳曲":"yín cí yàn qǔ","因缘为市":"yīn yuán wéi shì","因树为屋":"yīn shù wéi wū","因祸为福":"yīn huò wéi fú","因敌为资":"yīn dí wéi zī","溢美溢恶":"yì měi yì lè","逸兴云飞":"yì xìng yún fēi","逸兴横飞":"yì xìng héng fēi","抑塞磊落":"yì sè lěi luò","倚闾望切":"yǐ lǘ wàng qiē","蚁拥蜂攒":"yǐ yōng fēng cuán","以紫为朱":"yǐ zǐ wéi zhū","以意为之":"yǐ yì wéi zhī","以言为讳":"yǐ yán wéi huì","以微知着":"yǐ wēi zhī zhù","以疏间亲":"yǐ shū jiàn qīn","以水济水":"yǐ shuǐ jǐ shuǐ","以书为御":"yǐ shū wéi yù","以守为攻":"yǐ shǒu wéi gōng","以升量石":"yǐ shēng liáng dàn","以慎为键":"yǐ shèn wéi jiàn","以日为年":"yǐ rì wéi nián","以筌为鱼":"yǐ quán wéi yú","以鹿为马":"yǐ lù wéi mǎ","以利累形":"yǐ lì lěi xíng","以毁为罚":"yǐ huǐ wéi fá","以黑为白":"yǐ hēi wéi bái","以规为瑱":"yǐ guī wéi tiàn","以古为鉴":"yǐ gǔ wéi jiàn","以宫笑角":"yǐ gōng xiào jué","以法为教":"yǐ fǎ wéi jiào","以耳为目":"yǐ ěr wéi mù","以大恶细":"yǐ dà wù xì","以不济可":"yǐ fǒu jì kě","以白为黑":"yǐ bái wéi hēi","遗世忘累":"yí shì wàng lěi","遗寝载怀":"yí qǐn zài huái","移孝为忠":"yí xiào wéi zhōng","移的就箭":"yí dì jiù jiàn","依头缕当":"yī tóu lǚ dàng","衣租食税":"yì zū shí shuì","衣轻乘肥":"yì qīng chéng féi","衣裳之会":"yī shāng zhī huì","衣锦食肉":"yì jǐn shí ròu","衣锦过乡":"yì jǐn guò xiāng","衣单食薄":"yī dān shí bó","一重一掩":"yī chóng yī yǎn","一之为甚":"yī zhī wéi shèn","一笑了事":"yī xiào le shì","一现昙华":"yī xiàn tán huā","一岁载赦":"yī suì zài shè","一切万物":"yī qiē wàn wù","一目五行":"yī mù wǔ háng","一鳞一爪":"yī lín yī zhǎo","一鳞片爪":"yī lín piàn zhǎo","一了百当":"yī liǎo bǎi dàng","一见了然":"yī jiàn le rán","一还一报":"yī huán yī bào","一毫不差":"yī háo bù chā","一倡百和":"yī chàng bǎi hè","一鞭先著":"yī biān xiān zhuó","一笔抹摋":"yī bǐ mò sà","一暴十寒":"yī pù shí hán","夜静更阑":"yè jìng gēng lán","叶公好龙":"yè gōng hào lóng","野调无腔":"yě diào wú qiāng","咬血为盟":"yǎo xuè wéi méng","瑶池女使":"yáo shi nǚ shǐ","幺麽小丑":"yāo mǒ xiǎo chǒu","养精畜锐":"yǎng jīng xù ruì","仰屋着书":"yǎng wū zhù shū","卬首信眉":"áng shǒu shēn méi","洋洋纚纚":"yáng yáng sǎ sǎ","羊羔美酒":"yán gāo měi jiǔ","羊肠九曲":"yáng cháng jiǔ qǔ","扬眉眴目":"yáng méi shùn mù","扬厉铺张":"yáng lì pù zhāng","扬风扢雅":"yáng fēng bào yǎ","燕子衔食":"yàn zǐ xián shí","燕昭市骏":"yān zhāo shì jùn","燕昭好马":"yān zhāo hǎo mǎ","燕石妄珍":"yān shí wàng zhēn","燕雀处屋":"yàn què chǔ wū","燕骏千金":"yān jùn qiān jīn","燕金募秀":"yān jīn mù xiù","燕驾越毂":"yān jià yuè gū","燕歌赵舞":"yān gē zhào wǔ","燕岱之石":"yān dài zhī shí","燕处焚巢":"yàn chǔ fén cháo","燕处危巢":"yàn chǔ wēi cháo","燕巢幙上":"yàn cháo yú shàng","掞藻飞声":"shǎn zǎo fēi shēng","偃革为轩":"yǎn gé wéi xuān","岩栖穴处":"yán qī xué chǔ","岩居穴处":"yán jū xué chǔ","妍蚩好恶":"yán chī hǎo è","压良为贱":"yā liáng wéi jiàn","搀行夺市":"chān háng duó shì","三十六行":"sān shí liù háng","泣数行下":"qì shù háng xià","当行出色":"dāng háng chū sè","目下十行":"mù xià shí háng","秀出班行":"xiù chū bān háng","儿女成行":"ér nǚ chéng háng","大行大市":"dà háng dà shì","十行俱下":"shí háng jù xià","寻行数墨":"xún háng shǔ mò","熏莸同器":"xún yóu tóng qì","埙篪相和":"xūn chí xiāng hè","血债累累":"xuè zhài lěi lěi","雪鸿指爪":"xuě hóng zhǐ zhǎo","衒玉贾石":"zuì yù jiǎ shí","炫玉贾石":"xuàn yù gǔ shí","炫石为玉":"xuàn shí wéi yù","旋干转坤":"xuán qián zhuǎn kūn","悬石程书":"xuán dàn chéng shū","悬狟素飡":"xuán huán sù kòu","悬龟系鱼":"xuán guī jì yú","揎拳捰袖":"xuān quán lǒng xiù","揎拳捋袖":"xuān quán luō xiù","轩鹤冠猴":"xuān hè guàn hóu","畜妻养子":"xù qī yǎng zǐ","魆风骤雨":"zhuō fēng zhòu yǔ","褎然冠首":"yòu rán guàn shǒu","羞人答答":"xiū rén dā dā","修鳞养爪":"xiū lín yǎng zhǎo","熊据虎跱":"xióng jù hǔ shēn","汹涌淜湃":"xiōng yǒng péng pai","兄死弟及":"xiōng féi dì jí","腥闻在上":"xíng wén zài shàng","兴文匽武":"xīng wén diào wǔ","兴如嚼蜡":"xìng rú jiáo là","兴观群怨":"xìng guān qún yuàn","兴高彩烈":"xìng gāo cǎi liè","心瞻魏阙":"xīn zhān wèi què","心在魏阙":"xīn zài wèi què","心同止水":"xīn rú zhǐ shuǐ","心手相应":"xīn shǒu xiāng yìng","心手相忘":"xīn shǒu xiāng wàng","心口相应":"xīn kǒu xiāng yīng","心广体胖":"xīn guǎng tǐ pán","心驰魏阙":"xīn chí wèi què","心不应口":"xīn bù yīng kǒu","挟势弄权":"jiā shì nòng quán","胁肩累足":"xié jiān lěi zú","邪魔外祟":"xié mó wai suì","敩学相长":"zuàn xué xiāng cháng","校短量长":"jiào duǎn liáng cháng","小眼薄皮":"xiǎo yǎn bó pí","小廉曲谨":"xiǎo lián qǔ jǐn","硝云弹雨":"xiāo yún dàn yǔ","鸮鸣鼠暴":"zhāng míng shǔ bào","削株掘根":"xuē zhū jué gēn","削铁无声":"xuē tiě wú shēng","削职为民":"xuē zhí wéi mín","削木为吏":"xuē mù wéi lì","削草除根":"xuē cǎo chú gēn","橡皮钉子":"xiàng pí dìng zǐ","想望风褱":"xiǎng wàng fēng shèng","香培玉琢":"xiang pei yu zuo","相与为一":"xiāng yǔ wéi yī","相鼠有皮":"xiàng shǔ yǒu pí","相时而动":"xiàng shí ér dòng","相切相磋":"xiāng qiē xiāng cuō","相女配夫":"xiàng nǚ pèi fū","相门有相":"xiàng mén yǒu xiàng","挦章撦句":"lóng zhāng zōng jù","先我着鞭":"xiān wǒ zhuó biān","习焉不察":"xī yān bù chá","歙漆阿胶":"shè qī ē jiāo","晰毛辨发":"xī máo biàn fà","悉索薄赋":"xī suǒ bó fù","雾鳞云爪":"wù lín yún zhǎo","误作非为":"wù zuò fēi wéi","物稀为贵":"wù xī wéi guì","舞爪张牙":"wǔ zhǎo zhāng yá","碔砆混玉":"zhì fū hùn yù","武断专横":"wǔ duàn zhuān héng","五石六鹢":"wǔ shí liù yī","五色相宣":"wǔ sè xiāng xuān","五侯七贵":"wǔ hòu qī guì","五侯蜡烛":"wǔ hòu là zhú","五羖大夫":"wǔ gǔ dà fū","吾自有处":"wu zi you chu","无与为比":"wú yǔ wéi bǐ","无下箸处":"wú xià zhù chǔ","无適无莫":"wú dí wú mò","无伤无臭":"wú shēng wú xiù","无能为役":"wú néng wéi yì","无寇暴死":"wu kou bào shi","无孔不钻":"wú kǒng bù zuān","无间可伺":"wú jiān kě sì","无间可乘":"wú jiān kě chéng","无间冬夏":"wú jiān dōng xià","无缝天衣":"wú féng tiān yī","无恶不为":"wú è bù wéi","无动为大":"wú dòng wéi dà","无地自处":"wú dì zì chǔ","诬良为盗":"wū liáng wéi dào","握粟出卜":"wò sù chū bo","握拳透爪":"wò quán tòu zhǎo","稳操左券":"wén cāo zuǒ quàn","闻风响应":"wén fēng xiǎng yīng","文武差事":"wén wǔ chà shì","文身剪发":"wén shēn jiǎn fā","文房四侯":"wén fáng sì hòu","温枕扇席":"wēn zhěn shān xí","温席扇枕":"wēn xí shān zhěn","温凊定省":"wēn qǐng dìng shěng","温衾扇枕":"wēn qīn shān zhěn","亹亹不倦":"tān wěi bù juàn","委委佗佗":"wēi wēi tuó tuó","委曲成全":"wěi qǔ chéng quán","尾大难掉":"wěi dà nán diào","惟所欲为":"wéi suǒ yù wéi","惟日为岁":"wéi rì wéi suì","惟利是趋":"wéi lì shì qú","帷薄不修":"wéi bó bù xiū","唯唯否否":"wěi wěi fǒu fǒu","唯所欲为":"wéi suǒ yù wéi","为蛇添足":"wéi shé tiān zú","为善最乐":"wéi shàn zuì lè","为蛇画足":"wéi shé huà zú","为山止篑":"wéi shān zhǐ kuì","为仁不富":"wéi rén bù fù","为裘为箕":"wéi qiú wéi jī","为民父母":"wéi mín fù mǔ","为虺弗摧":"wéi huǐ fú cuī","为好成歉":"wéi hǎo chéng qiàn","为鬼为蜮":"wéi guǐ wéi yù","为法自弊":"wéi fǎ zì bì","为恶不悛":"wéi è bù quān","为德不终":"wéi dé bù zhōng","煨干就湿":"wēi gàn jiù shī","煨干避湿":"wēi gàn bì shī","危于累卵":"wēi yú lěi luǎn","望风响应":"wàng fēng xiǎng yīng","望尘僄声":"wàng chén bù shēng","枉曲直凑":"wǎng qǔ zhí còu","往渚还汀":"wǎng zhǔ huán tīng","王贡弹冠":"wáng gòng dàn guàn","亡魂失魄":"wáng hún shī hún","亡国大夫":"wáng guó dà fū","万载千秋":"wàn zài qiān qiū","万贯家私":"wàn guàn ji sī","万夫不当":"wàn fū bù dāng","万别千差":"wàn bié qiān chā","晚食当肉":"wǎn shí dàng ròu","晚节不保":"wǎn jíe bù bǎo","玩岁愒月":"wán suì yī yuè","玩岁愒时":"wán suì yī shí","玩时愒日":"wán shí ài rì","蛙蟆胜负":"wā má shèng fù","吞言咽理":"tūn yán yān lǐ","颓垣断堑":"tuí yuán duàn piàn","推枯折腐":"tuī kū shé fǔ","推干就湿":"tuī gàn jiù shī","剸繁治剧":"shí fán zhì jù","剸繁决剧":"shí fán jué jù","团头聚面":"tuàn tóu jù miàn","兔走鹘落":"tù zǒu gǔ luò","兔丝燕麦":"tù sī yàn mài","兔头麞脑":"tù tóu suō nǎo","兔葵燕麦":"tù kuí yàn mài","兔角龟毛":"tu jiao gui mao","吐哺握发":"tǔ bǔ wò fà","徒讬空言":"tú tún kōng yán","投传而去":"tóu zhuàn ér qù","头足异处":"tóu zú yì chǔ","头上著头":"tóu shàng zhuó tóu","头没杯案":"tóu mò bēi àn","头昏脑闷":"tóu hūn nǎo mèn","头会箕敛":"tóu kuàn jī liǎn","头会箕赋":"tóu kuài jī fù","头出头没":"tóu chū tóu mò","痛自创艾":"tòng zì chuāng yì","痛深恶绝":"tòng shēn wù jué","同源异派":"tóng yuán yì pai","同心僇力":"tóng xīn jié lì","同工异曲":"tóng gōng yì qǔ","同恶相助":"tóng wù xiāng zhù","同恶相恤":"tóng wù xiāng xù","痌瘝在抱":"tōng guān zào bào","通文调武":"tōng wén diào wǔ","通同一气":"tōng tóng yī yì","铤鹿走险":"dìng lù zǒu xiǎn","停留长智":"tíng liú zhǎng zhì","铁树开华":"tiě shù kāi huā","条贯部分":"tiáo guàn bù fēn","挑牙料唇":"tiǎo yá liào chún","挑么挑六":"tiāo yāo tiāo liù","挑唇料嘴":"tiǎo chún liào zuǐ","靦颜事仇":"tiǎn yán shì chóu","恬不为意":"tián bù wéi yì","恬不为怪":"tián bù wéi guài","天下为笼":"tiān xià wéi lóng","天台路迷":"tiān tái lù mí","天年不遂":"tiān nián bù suì","天宝当年":"tian bao dang nian","桃蹊柳曲":"táo qī liǔ qǔ","堂皇冠冕":"táng huáng guàn miǎn","探囊胠箧":"tàn náng wú qiè","谭言微中":"tán yán wēi zhòng","谈言微中":"tán yán wēi zhòng","贪夫狥财":"tān fū huái cái","泰山盘石":"tai shān pán shí","泰来否往":"tài lái pǐ wǎng","泰来否极":"tai lái fǒu jí","泰极而否":"tài jí ér pǐ","狧穅及米":"shì kǎn jí mǐ","损军折将":"sǔn jūn zhé jiàng","遂心应手":"suì xīn yīng shǒu","遂迷不窹":"suí méi bù wù","岁月不居":"suì yuè bù jú","岁聿其莫":"suì yù qí mù","随物应机":"suí wù yīng jī","随风而靡":"suí fēng ér mǐ","宿雨餐风":"xiǔ yǔ cān fēng","宿水飡风":"xiǔ shuǐ cān fēng","宿水餐风":"xiǔ shuǐ cān fēng","夙兴夜处":"sù xīng yè chǔ","搜岩采干":"sōu yán cǎi gàn","薮中荆曲":"sǒu zhōng jí qǔ","宋斤鲁削":"sòng jīn lǔ xuē","松筠之节":"sōng jūn zhī jié","騃童钝夫":"ái tóng dùn fū","騃女痴男":"ái nǚ chī nán","四亭八当":"sì tíng bā dàng","四马攒蹄":"sì mǎ cuán tí","四不拗六":"sì bù niù liù","斯事体大":"ī shì tǐ dà","思所逐之":"si shuo zhu zi","丝恩发怨":"sī ēn fà yuàn","硕望宿德":"shuò wàng xiǔ dé","铄古切今":"shuò gǔ qiē jīn","顺天应时":"shùn tiān yīng shí","顺风转舵":"shǔn fēng zhuǎn duò","顺风驶船":"shǔn fēng shǐ chuán","顺风使船":"shǔn fēng shǐ chuán","顺风而呼":"shǔn fēng ér hū","顺风吹火":"shǔn fēng chuī huǒ","水中捉月":"shui zhong zhuo yue","水中著盐":"shuǐ zhōng zhuó yán","水宿风餐":"shuǐ xiǔ fēng cān","水米无干":"shuǐ mǐ wú gàn","水长船高":"shuǐ zhǎng chuán gāo","双足重茧":"shuāng zú chóng jiǎn","双柑斗酒":"shuài gān dǒu jiǔ","数米而炊":"shǔ mǐ ér chuī","数往知来":"shǔ wǎng zhī lái","数米量柴":"shǔ mǐ ér chái","数理逻辑":"shù lǐ luó ji","数见不鲜":"shuò jiàn bù xiān","数黄道黑":"shu huang dao hei","数黑论黄":"shǔ hēi lùn huáng","数短论长":"shǔ duǎn lùn cháng","数白论黄":"shǔ bái lùn huáng","束缊还妇":"shù yūn huán fù","束缊举火":"shù yūn jǔ huǒ","束身自好":"shù shēn zì hào","束蒲为脯":"shù pú wéi pú","束带结发":"shù dài jié fā","束椽为柱":"shù chuán wéi zhù","书缺有间":"shū quē yǒu jiàn","瘦骨梭棱":"shòu gǔ léng léng","首足异处":"shǒu zú yì chǔ","手足重茧":"shǒu zú chóng jiǎn","手足异处":"shǒu zú yì chǔ","手脚干净":"shǒu jiǎo gàn jìng","手不应心":"shǒu bù yīng xīn","螫手解腕":"shì shǒu jǐe wǎn","释知遗形":"shì shì yí xíng","适时应务":"shì shí yīng wù","适如其分":"shì rú qí fèn","适情率意":"shì qíng shuài yì","适居其反":"shì jú qí fǎn","适当其时":"shì dāng qí shí","适当其冲":"shì dāng qí chōng","饰非遂过":"shì fēi suí guò","视为知己":"shì wéi zhī jǐ","视为儿戏":"shì wéi ér xì","视微知著":"shì wēi zhī zhuó","事与心违":"shì yù xīn wéi","使羊将狼":"shǐ yáng jiàng láng","食为民天":"shí wéi mín tiān","食不重味":"shí bù chóng wèi","食不重肉":"shí bù zhóng ròu","拾掇无遗":"shi duo wu yi","拾带重还":"shí dài zhòng huán","实与有力":"shí yù yǒu lì","实偪处此":"shí bèng chǔ cǐ","识微知著":"shí wēi zhī zhuó","时运不齐":"shí yùn bù jì","时亨运泰":"shí hēng yùn tai","石英玻璃":"shí yīng bō li","石室金匮":"shí shì jīn guì","什袭珍藏":"shí xí zhēn cáng","什袭以藏":"shí xí yǐ cáng","什伍东西":"shí wǔ dōng xī","什袭而藏":"shí xī ér cáng","什围伍攻":"shí wéi wǔ gōng","十魔九难":"shí mó jiǔ nàn","十夫楺椎":"shí fū zhī zhuī","十不当一":"shí bù huò yī","诗书发冢":"shī shū fà zhǒng","虱处裈中":"shī chǔ kūn zhōng","师直为壮":"shī zhí wéi zhuàng","失马塞翁":"shī mǎ sài wēng","尸居龙见":"shī jū lóng xiàn","盛水不漏":"chéng shuǐ bù lòu","圣经贤传":"shèng jīng xián zhuàn","圣君贤相":"shèng jīng xián xiàng","生拖死拽":"shēng tuō sǐ zhuāi","审曲面埶":"shěn qǔ miàn xīn","审己度人":"shěn jǐ duó rén","沈博绝丽":"chén bó jué lì","神武挂冠":"shén wǔ guà guàn","神龙失埶":"shén lóng shī zhì","神号鬼哭":"shén háo guǐ kū","神不收舍":"shén bù shōu shě","深文周内":"shēn wén zhōu nà","深文曲折":"shēn wén qǔ shé","深切着明":"shēn qiē zhe míng","深切着白":"shēn qiē zhe bái","深厉浅揭":"shēn lì qiǎn qì","深谷为陵":"shēn gǔ wéi líng","深恶痛疾":"shēn wù tòng jí","深恶痛嫉":"shēn wù tòng jí","深仇宿怨":"shēn chóu xiǔ yuàn","设心处虑":"shè xīn chǔ lǜ","舍近务远":"shě jìn wù yuǎn","舍己为公":"shě jǐ wèi gōng","舍近即远":"shě jìn jí yuǎn","舍短取长":"shě duǎn qǔ cháng","舍策追羊":"shě cè zhuī yáng","蛇蝎为心":"shé xiē wéi xīn","少年老诚":"shǎo nián lǎo chéng","少成若性":"shào chéng ruò xìng","少不经事":"shào bù jīng shì","上当学乖":"shàng dāng xué guāi","赏不当功":"shǎng bù dāng gōng","善自为谋":"shàn zì wéi móu","善为说辞":"shàn wéi shuō cí","善善恶恶":"shàn shàn wù è","善贾而沽":"shàn jià ér gū","善财难舍":"shàn cái nán shě","扇枕温席":"shān zhěn wēn xí","扇枕温被":"shān zhěn wēn chuáng","苫眼铺眉":"shān yǎn pū méi","讪牙闲嗑":"shàn yá xián kē","山峙渊渟":"shān zhì yuān zī","山阴乘兴":"shān yīn chéng xīng","山殽野湋":"shān yāo yě fù","山溜穿石":"shān liù chuān shí","山节藻棁":"shān jié zǎo lì","沙鸥翔集":"sha ou xiang ji","杀衣缩食":"shài yī suō shí","杀鸡为黍":"shā jī wéi shǔ","色厉胆薄":"sè lì dǎn bó","丧胆销魂":"sàng hún xiāo hún","桑荫未移":"sāng yīn wèi yí","桑荫不徙":"sāng yīn bù xǐ","桑土绸缪":"sāng tǔ chóu miù","桑户棬枢":"sāng hù juàn shū","三战三北":"sān zhān sān běi","三占从二":"sān zhān cóng èr","三瓦两舍":"sān wǎ liǎng shě","三人为众":"sān rén wèi zhòng","三差五错":"sān chā wǔ cuò","三差两错":"sān chā liǎng cuò","三不拗六":"sān bù niù liù","塞翁之马":"sài wēng zhī mǎ","塞翁得马":"sài wēng dé mǎ","塞井焚舍":"sāi jǐng fén shě","洒心更始":"sǎ xīn gèng shǐ","洒扫应对":"sǎ sào yìng duì","软红香土":"ruǎn hóng xiāng yù","入孝出弟":"rù xiào chū tì","入吾彀中":"rù wǔ gòu zhōng","入铁主簿":"rù tiě zhǔ bù","入理切情":"rù lǐ qiē qíng","汝成人耶":"nu cheng ren ye","如水投石":"rú shǔ tóu shí","如切如磋":"rú qiē rú cuō","如登春台":"rú dé chūn tái","肉薄骨并":"ròu bó gǔ bìng","柔情绰态":"róu qíng chuō tai","戎马劻勷":"róng mǎ dān xiào","日朘月削":"rì juān yuè xuē","日中为市":"rì zhōng wéi shì","日中必湲":"rì zhōng bì tóng","日月参辰":"rì yuè shēn chén","日省月修":"rì xǐng yuè xiū","日削月割":"rì xuē yuè gē","日削月朘":"rì xuē yuè juān","日省月试":"rì xǐng yuè shì","日省月课":"rì xǐng yuè kè","日不暇给":"rì bù xiá jǐ","认贼为父":"rèn zéi wéi fù","任达不拘":"rèn láo bù jū","认影为头":"rèn yǐng wéi tóu","认贼为子":"rèn zéi wéi zǐ","人足家给":"rén zú jiā jǐ","人言藉藉":"rén yán jí jí","人模狗样":"rén mú gǒu yàng","人莫予毒":"rén mò yú dú","人给家足":"rén jǐ jiā zú","热熬翻饼":"rě áo fān bǐng","群居穴处":"qún jū xué chǔ","却老还童":"què lǎo huán tóng","权倾中外":"quán qīng zhōng wai","圈牢养物":"juàn láo yǎng wù","去太去甚":"qù tai qù shèn","取予有节":"qǔ yù yǒu jié","诎要桡腘":"qū yào ráo yù","曲终奏雅":"qǔ zhōng zòu yǎ","曲意迎合":"qǔ yì yíng hé","曲意奉迎":"qǔ yì fèng yíng","曲意承迎":"qǔ yì chéng yíng","曲学阿世":"qǔ xué ā shì","曲突移薪":"qǔ tū yí xīn","曲眉丰颊":"qǔ méi fēng jiá","曲肱而枕":"qǔ gōng ér zhěn","秋实春华":"qiū shí chūn huā","穷形尽相":"qióng xíng jìn xiàng","穷年累世":"qióng nián lěi shì","情凄意切":"qíng qī yì qiē","情见埶竭":"qíng jiàn zhōu jié","情见势屈":"qíng xiàn shì qū","情见力屈":"qíng xiàn lì qū","情见乎辞":"qíng xiàn hū cí","清风劲节":"qīng fēng jìng jié","清都绛阙":"qīng dōu jiàng què","清辞丽曲":"qīng cí lì qǔ","倾肠倒肚":"qīng cháng dào dǔ","轻嘴薄舌":"qīng zuǐ bó shé","轻傜薄赋":"qīng yāo báo fù","轻骑简从":"qīng jì jiǎn cóng","轻财好义":"qīng cái hào yì","轻薄无知":"qīng báo wú zhī","轻才好施":"qīng cái hào shī","轻薄无礼":"qīng báo wú lǐ","青紫被体":"qīng zǐ pī tǐ","青林黑塞":"qīng lín hēi sài","青红皁白":"qīng hóng tóu bái","寝苫枕干":"qǐn shān zhěn gàn","螓首蛾眉":"qín shǒu ér méi","擒奸擿伏":"qín jiān fā fú","琴瑟之好":"qí sè zhī hǎo","挈瓶之知":"qiè píng zhī zhì","且住为佳":"qiě zhù wéi jiā","切树倒根":"qiē shù dǎo gēn","切理餍心":"qiē lǐ yàn xīn","切理厌心":"qiē lǐ yàn xīn","切理会心":"qiē lǐ huì xīn","切近的当":"qiē jìn de dāng","切瑳琢磨":"qiē cùn zhuó mó","翘足引领":"qiáo zú yǐn lǐng","翘足而待":"qiáo zú ér dài","巧发奇中":"qiǎo fā qí zhòng","抢地呼天":"qiāng dì hū tiān","强嘴拗舌":"jiàng zuǐ niù shé","强自取折":"qiáng zì qǔ shé","强直自遂":"qiáng zhí zì suí","强文浉醋":"qiǎng wén jiǎ cù","强文假醋":"qiǎng wén jiǎ cù","强死强活":"qiǎng sǐ qiǎng huó","强死赖活":"qiǎng sǐ lài huó","强食自爱":"qiǎng shí zì ài","强食靡角":"qiǎng shí mí jiǎo","强识博闻":"qiǎng shí bó wén","强弓劲弩":"qiáng gōng jìng nǔ","强聒不舍":"qiǎng guō bù shě","强凫变鹤":"qiǎng fú biàn hè","强而后可":"qiǎng ér hòu kě","强词夺正":"qiǎng cí duó zhèng","强得易贫":"qiǎng dé yì pín","遣兴陶情":"qiǎn xìng táo qíng","遣将调兵":"qiǎn jiāng diào bīng","遣兵调将":"qiǎn bīng diào jiàng","前跋后疐":"qián bá hòu máo","搴旗斩将":"qiān qí zhǎn jiàng","搴旗取将":"qiān qí qǔ jiàng","牵羊担酒":"qiān yáng dàn jiǔ","牵强附合":"qiān qiáng fù hé","千姿万态":"qiān zī wàn tai","千状万态":"qiān zhuàng wàn tai","千载一合":"qiān zài yī hé","千载一弹":"qiān zǎi yī dàn","千态万状":"qiān tai wàn zhuàng","千磨百折":"qiān mó bǎi shé","千了万当":"qiān le wàn dàng","千了百当":"qiān liǎo bǎi dàng","千古绝调":"qiān gǔ jué diào","泣下如雨":"qǐ xià rú yǔ","弃之度外":"qì zhī dù wai","气克斗牛":"qì kè dǒu niú","起偃为竖":"qǐ yǎn wéi shù","岂弟君子":"kǎi tì jūn zǐ","綦溪利跂":"qí xī lì guì","棋输先着":"qí shū xiān zhāo","棋输先著":"qí shū xiān zhuó","奇葩异卉":"qí pā yì hùi","齐王舍牛":"qí wáng shě niú","齐量等观":"qí liàng děng guān","欺天诳地":"qī tiān kuāng dì","栖风宿雨":"qī fēng xiǔ yǔ","妻梅子鹤":"qī mén zǐ hè","妻儿老少":"qī ér lǎo shǎo","普天率土":"pǔ tiān shuài tǔ","铺胸纳地":"pū xiōng nà dì","铺眉苫眼":"pū méi shàn yǎn","铺眉蒙眼":"pū méi méng yǎn","铺锦列绣":"pū jǐn liè xiù","破矩为圆":"pò jǔ wéi yuán","破镜重合":"pò jìng zhòng hé","破家为国":"pò jiā wéi guó","破觚为圜":"pò gū wéi yuán","破愁为笑":"pò chóu wéi xiào","瓶坠簪折":"píng zhùi zān zhé","萍飘蓬转":"píng piāo péng zhuàn","帡天极地":"jú tiān jí dì","屏声息气":"bǐng shēng xī qì","屏气吞声":"bǐng qì tūn shēng","凭几据杖":"píng jī jù zhàng","娉婷婀娜":"pīng tíng ē nà","品竹调弦":"pǐn zhú diào xián","贫嘴薄舌":"pín zuǐ bó shé","骈肩累足":"pián jiān lěi zú","骈肩累迹":"pián jiān lěi jì","翩翩年少":"piān piān nián shǎo","片语只辞":"piàn yán zhǐ cí","片鳞半爪":"piàn lín bàn zhǎo","片甲不还":"piàn jiǎ bù huán","披发缨冠":"pī fā yīng guàn","披发文身":"pī fà wén shēn","批砉导窾":"pī huā dǎo táo","批隙导窾":"pī xì dǎo yín","批吭捣虚":"pī háng dǎo xū","批风抹月":"pī fēng mò yuè","烹龙炮凤":"pēng lóng páo fèng","炰鳖脍鲤":"fèng biē kuài lǐ","炮凤烹龙":"páo fèng pēng lóng","旁指曲谕":"páng zhǐ qǔ yù","旁引曲证":"páng yǐn qǔ zhèng","旁通曲畅":"páng tōng qǔ chàng","庞眉皓发":"páng méi hào fà","攀花折柳":"pān huā shé liǔ","攀蟾折桂":"pān chán shé guì","女大难留":"nǚ dà nán liú","女长须嫁":"nǚ zhǎng xū jià","女长当嫁":"nǚ zhǎng dāng jià","弄竹弹丝":"nòng zhú dàn sī","弄玉吹箫":"nòng yù chuí xiāo","弄管调弦":"nòng guǎn diào xián","弄粉调朱":"nòng fěn diào zhū","弄兵潢池":"nòng bīng huáng shi","浓装艳抹":"nóng zhuāng yàn mò","浓抹淡妆":"nóng mò dàn zhuāng","扭转干坤":"niǔ zhuǎn gàn kūn","扭直作曲":"niǔ zhí zuò qū","牛骥同皁":"niú jì tóng wěn","宁缺勿滥":"nìng quē wù làn","啮血为盟":"niè xuè wéi méng","捻土为香":"niǎn tǔ wéi xiāng","年谊世好":"nián yì shì hào","年华垂暮":"nián huá thuí mù","儗不于伦":"lǐ bù yú lún","泥名失实":"nì míng shī shí","泥而不滓":"niè ér bù zǐ","能者为师":"néng zhě wéi shī","能不称官":"néng bù chèn guān","挠直为曲":"náo zhí wéi qū","囊萤照读":"náng yíng zhào shū","难进易退":"nan jin yi tui","难乎为继":"nán hū wéi jì","难乎为情":"nán hū wéi qíng","难更仆数":"nán gēng pú shǔ","难得糊涂":"nán dé hú tú","南蛮鴂舌":"nán mán xiāng shé","南贩北贾":"nán fàn běi gǔ","内修外攘":"nèi xiū wai rǎng","内柔外刚":"nèi róu wai gāng","内峻外和":"nèi jùn wai hé","拿腔作调":"ná qiāng zuò diào","拿粗夹细":"ná cū jiā xì","慕古薄今":"mù gǔ bó jīn","牧猪奴戏":"mù zhòu nú xì","沐猴衣冠":"mù hóu yī guàn","目眢心忳":"mù yuān xīn wǎng","目挑心招":"mù tiǎo xīn zhāo","目空余子":"mù kōng yú zǐ","目量意营":"mù liàng yì yíng","目瞪舌彊":"mù dèng shé jiàng","木头木脑":"mù tóu mù nǎo","木干鸟栖":"mù gàn niǎo qī","侔色揣称":"móu sè chuǎi chèn","莫知所为":"mò zhī suǒ wéi","莫予毒也":"mò yù dú yě","莫为已甚":"mò wéi yǐ shèn","抹月秕风":"mǒ yuè pī fēng","抹粉施脂":"mò fěn shī zhī","磨砻镌切":"mó lóng juān qiē","磨棱刓角":"mó léng liǎng jiǎo","摸头不着":"mō tóu bù zháo","摸门不着":"mō mén bù zháo","摸不着边":"mō bù zhuó biān","命中注定":"mìng zhōng zhù dìng","鸣鹤之应":"míng hè zhī yīng","鸣凤朝阳":"míng fèng zhāo yáng","明效大验":"míng xiào dà yà","名我固当":"ming wo gu dang","灭景追风":"miè yǐng zhuī fēng","邈处欿视":"miǎo chǔ jī shì","面折庭争":"miàn shé tíng zhēng","俛拾地芥":"bì shí dì jiè","俛首帖耳":"mǎ shǒu tiē ěr","黾穴鸲巢":"měng xué qú cháo","绵力薄材":"mián lì bó cái","绵里薄材":"mián lǐ bó cái","靡有孑遗":"mǐ yǒu jié yí","靡衣媮食":"mǐ yī tōu shí","靡衣偷食":"mǐ yī tōu shí","靡然从风":"mǐ rán cóng fēng","靡靡之乐":"mǐ mǐ zhī yuè","迷恋骸骨":"mí liàn hài gǔ","蒙头转向":"mēng tóu zhuàn xiàng","闷海愁山":"mèn hǎi chóu shān","扪参历井":"mén shēn lì jǐng","门单户薄":"mén dān hù bó","昧旦晨兴":"mèi dàn chún xīng","没衷一是":"mò zhōng yī shì","没金饮羽":"mò jīn yǐn yǔ","冒名接脚":"mào míng jiě jiǎo","毛头小子":"máo tóu xiǎo zi","毛遂堕井":"máo suí duò jǐng","毛发耸然":"máo fā sǒng rán","毛发倒竖":"máo fā dǎo shù","毛发不爽":"máo fā bù shuǎng","猫鼠同处":"māo shǔ tóng chǔ","尨眉皓发":"máng méi hào fà","漫天遍地":"màn shān biàn dì","脉脉相通":"mài mài xiāng tōng","卖文为生":"mài wén wéi shēn","卖李钻核":"mài lǐ zuān hé","买椟还珠":"mǎi dú huán zhū","埋天怨地":"mán tiān yuàn dì","埋三怨四":"mán sān yuàn sì","马上房子":"mǎ shàng fáng zi","马入华山":"mǎ rù huá shān","落魄江湖":"luò pò jīng hú","落魄不偶":"luo tuo bu ou","落魄不羁":"luò pò bù jī","落落难合":"luò luò nán hé","落草为寇":"luò cǎo wéi kòu","裸裎袒裼":"luǒ chéng tǎn xī","罗织构陷":"luò zhī gòu xiàn","捋袖揎拳":"luō xiù xuān quán","论黄数黑":"lùn huáng shǔ hēi","乱作胡为":"luàn zuò hú wéi","乱箭攒心":"luàn jiàn cuán xīn","鸾凤和鸣":"luán fèng hè míng","绿叶成荫":"lǜ yè chéng yīn","绿女红男":"lǜ nǚ hóng nán","率由旧章":"shuài yóu jiù zhāng","率由旧则":"shuài yóu jiù zé","率以为常":"shuài yǐ wéi cháng","率土宅心":"shuài tǔ zhái xīn","率土同庆":"shuài tǔ tóng qìng","率兽食人":"shuài shòu shí rén","率土归心":"shuài tǔ guī xīn","率马以骥":"shuài mǎ yǐ jì","率尔成章":"shuài ěr chéng zhāng","履薄临深":"lǚ bó lín shēn","鲁斤燕削":"lǔ jīn yàn xuē","露面抛头":"lù miàn pāo tóu","漏尽更阑":"lòu jìn gēng lán","笼鸟槛猿":"lóng niǎo jiàn yuán","笼鸟池鱼":"lóng niǎo shi yú","龙游曲沼":"long you qu zhao","龙血玄黄":"lóng xuě xuán huáng","龙雕凤咀":"lóng diāo fèng jǔ","六神不安":"liù shén bǔ ān","六尺之讬":"liù chǐ zhī quàn","柳巷花街":"liǔ xiòng huā jiē","柳街花巷":"liǔ jiē huā xiòng","柳骨颜筋":"jiǔ gǔ yán jīn","流离颠疐":"liú lí diān shǔ","令原之戚":"líng yuán zhī qī","令人捧腹":"lìng rén pěng fǔ","陵劲淬砺":"líng jìng cuì lì","临难不惧":"lín nàn bù jǔ","临敌易将":"lín dí yì jiàng","裂裳衣疮":"liè sháng yī chuāng","裂裳裹足":"liè cháng guǒ zú","裂冠毁冕":"liè guàn huǐ miǎn","埒才角妙":"liè cái jué miào","了无惧色":"liǎo wū jǔ sè","了身达命":"liǎo shēn dá mìng","了然无闻":"le rán wú wén","了不可见":"liǎo bù kě jiàn","了不长进":"liǎo bù zhǎng jǐn","燎如观火":"liǎo rú guān huǒ","燎发摧枯":"liǎo fà cuī kū","量小力微":"liàng xiǎo lì wēi","量时度力":"liàng shí dù lì","量枘制凿":"liàng ruì zhì záo","量入计出":"liàng rù jì chū","量如江海":"liàng rú jiāng hǎi","量力度德":"liàng lì duó dé","量金买赋":"liàng jīn mǎi fù","量己审分":"liàng jǐ shěn fēn","量材录用":"liàng cái lù yòng","量才器使":"liàng cái qì shǐ","量才而为":"liàng cái ér wéi","梁孟相敬":"liáng mèng xiāng jìn","恋恋难舍":"liàn liàn nán shě","敛声屏息":"liǎn shēng bǐng xī","敛骨吹魂":"liǎn gǔ chuí hún","联篇累牍":"lián piān lěi dú","连编累牍":"lián biān lěi dú","詈夷为跖":"lì yí wéi zhí","利令志惛":"lì lìng zhì zào","历精为治":"lì jīng wéi zhì","历精更始":"lì jīng gèng shǐ","哩哩罗罗":"li li luō luō","李广不侯":"lǐ guǎng bù hòu","礼为情貌":"lǐ wéi qíng mào","礼让为国":"lǐ ràng wéi guó","礼坏乐崩":"lǐ huài yuè bēng","犁庭扫闾":"lí tíng sǎo lǚ","犁生骍角":"lí shēng yuè jiǎo","犁牛骍角":"lí niú mài jiǎo","离山调虎":"lí shān diào hǔ","离本趣末":"lí běn qū mò","离本徼末":"lí běn yāo mò","楞眉横眼":"lèng méi héng yǎn","擂天倒地":"léi tiān dǎo dì","累足成步":"lěi zú chéng bù","累月经年":"lěi yuè jīng nián","累屋重架":"lěi wū chóng jià","累瓦结绳":"lěi wǎ jié shéng","累土至山":"lěi tǔ zhì shān","累土聚沙":"lěi tǔ jù shā","累苏积块":"lěi sū jī kuài","累卵之危":"lěi luǎn zhī wēi","累累如珠":"lěi lěi rú zhū","累块积苏":"lěi kuài jī sū","累教不改":"lěi jiào bù gǎi","累牍连篇":"lěi dú lián piān","乐山乐水":"yào shān yào shuǐ","潦原浸天":"lǎo yuán jìn tiān","老师宿儒":"lǎo shī xiǔ rú","牢什古子":"láo shí gǔ zi","琅嬛福地":"láng huán fú dì","狼号鬼哭":"láng háo guǐ kū","狼飡虎咽":"láng cān hǔ yān","阑风长雨":"lán fēng zhàng yǔ","拉枯折朽":"lā kū shé xiǔ","揆情度理":"kuí qíng duó lǐ","揆理度情":"kuí lǐ duó qíng","窥间伺隙":"kuī jiàn sì xì","旷日累时":"kuàng rì lěi shí","匡救弥缝":"kuāng jiù mí fèng","枯树生华":"kū shù shēng huā","口轻舌薄":"kǒu qīng shé bó","口角生风":"kǒu jiǎo shēng fēng","口角春风":"kǒu jiǎo chūn fēng","口角风情":"kǒu jiǎo fēng qíng","口干舌焦":"kǒu gàn shé jiāo","口腹之累":"kǒu fù zhī lěi","口出大言":"kǒu chū dā yán","空腹便便":"kōng fù pián pián","嗑牙料嘴":"kē yá liào zuǐ","刻木为吏":"kè mù wéi lì","刻木为鹄":"kè mù wéi hú","咳珠唾玉":"ké zhū tuò yù","咳唾成珠":"ké tuò chéng zhū","抗颜为师":"kàng yán wéi shī","糠豆不赡":"kang dou bu shan","开华结果":"kāi huā jié guǒ","峻阪盐车":"jùn bǎn yún chē","攫为己有":"jué wéi jǐ yǒu","嚼铁咀金":"jiáo tiě jǔ jīn","嚼墨喷纸":"jué mò pēn zhǐ","倔头强脑":"juè tóu jiàng nǎo","倔头倔脑":"juè tou juè nǎo","倦鸟知还":"juàn niǎo zhī huán","卷席而葬":"juǎn xí ér zàng","卷旗息鼓":"juǎn qí xī gǔ","卷甲倍道":"juǎn jiǎ bèi dào","聚米为山":"jù mǐ wéi shān","聚米为谷":"jù mǐ wéi gǔ","锯牙钩爪":"jù yá gōu zhǎo","举手相庆":"jǔ shǒu xiāng qìng","举世混浊":"jǔ shì hún zhuó","鞫为茂草":"jū wéi mào cǎo","鞠为茂草":"jū wéi mào cǎo","拘神遣将":"jū shén qiǎn jiàng","居轴处中":"jū zhóu chǔ zhōng","居下讪上":"jú xià shàn shàng","居不重茵":"jū bù chóng yīn","居不重席":"jū bù chóng xí","旧事重提":"jiù shì zhòng tí","旧调重弹":"jiù diào chóng tán","灸艾分痛":"jiù ài fēn tòng","久要不忘":"jiǔ yāo bù wàng","九转功成":"jiǔ zhuàn gōng chéng","九蒸三熯":"jiǔ zhēng sān shēng","敬业乐群":"jìng yè yào qún","井底虾蟆":"jǐng dǐ xiā má","旌旗卷舒":"jīng qí juǎn shū","惊魂落魄":"jīng hún luò pò","荆棘载途":"jīng jí zài tú","荆棘塞途":"jīng jí sè tú","经纶济世":"jing lun ji shi","禁舍开塞":"jìn shě kāi sāi","祲威盛容":"lóng wēi shèng róng","进退中度":"jìn tuì zhòng dù","进退消长":"jìn tuì xiāo cháng","进退应矩":"jìn tuì yīng jǔ","进退触籓":"jìn tuì chù zǔ","进退出处":"jìn tuì chū chǔ","进退跋疐":"jìn tuì bá zǔ","进寸退尺":"jǐn cùn tuì chǐ","尽多尽少":"jǐn duō jǐn shǎo","锦囊还矢":"jǐn náng huán shǐ","矜名嫉能":"jīn míng jì néng","矜己自饰":"jīn jǐ zhì shì","矜功负气":"jīn gōng fǔ qì","津关险塞":"jīn guān xiǎn sài","金吾不禁":"jīn wú bù jìn","金匮石室":"jīn guì shí shì","金翅擘海":"jīn chì bāi hǎi","戒奢宁俭":"jiè shē nìng jiān","解衣衣人":"jiè yī yī rén","解人难得":"jiě rén nán dé","解铃系铃":"jiě líng jì líng","解发佯狂":"jiě fà yáng kuáng","截铁斩钉":"jié tiě zhǎn dìng","诘屈謷牙":"jié qū dà yá","诘屈磝碻":"jié qū bìng zhòu","诘曲聱牙":"jié qǔ áo yá","教一识百":"jiāo yī shí bǎi","教猱升木":"jiāo náo shēng mù","较瘦量肥":"jiào shòu liàng féi","矫矫不群":"jiǎo jiǎo bù qùn","矫国更俗":"jiǎo guó gēng sú","皎阳似火":"jiǎo yáng shì huǒ","挢抂过正":"jiǎo kuāng guò zhèng","角立杰出":"jiao li jie chu","焦沙烂石":"jiāo shā shí làn","焦唇干舌":"jiāo chún gàn shé","骄泰淫泆":"jiāo tai yín zhuàng","骄奢淫泆":"jiāo shē yín yí","骄儿騃女":"jiāo ér bā nǚ","浇风薄俗":"jiāo fēng bó sú","降妖捉怪":"xiáng yāo zhuō guài","将遇良材":"jiàng yù liáng cái","将取固予":"jiāng qǔ gū yǔ","将门有将":"jiàng mén yǒu jiàng","将功折过":"jiāng gōng shé guò","将夺固与":"jiāng duó gū yǔ","将伯之助":"qiāng bó zhī zhù","将伯之呼":"qiāng bó zhī hū","槛花笼鹤":"jiàn huā lóng hè","鉴影度形":"jiàn yǐng duó xíng","渐不可长":"jiàn bù kě zhǎng","剑首一吷":"jiàn shǒu yī guī","见义敢为":"jiàn yì gǎn wéi","见义当为":"jiàn yì dāng wéi","见义必为":"jiàn yì bì wéi","见素抱朴":"xiàn sù bào pǔ","见弃于人":"jiàn qì yǔ rén","见几而作":"jiàn jī ér zuò","见弹求鸮":"jiàn dàn qiú háo","简丝数米":"jiǎn sī shǔ mǐ","俭不中礼":"jiǎn bù zhòng lǐ","间见层出":"jiàn xiàn céng chū","间不容息":"jiàn bù róng xī","间不容瞚":"jiān bù róng xǐ","尖嘴薄舌":"jiān zuǐ bó shé","假洋鬼子":"jiǎ yáng guǐ zi","甲冠天下":"jiǎ guàn tiān xià","葭莩之亲":"jiā fú zhī qīn","家无担石":"jiā wú dàn shí","家累千金":"jiā lèi qiān jīn","家给人足":"jiā jǐ rén zú","家给民足":"jiā jǐ mín zú","家道从容":"jiā dào cōng róng","家长礼短":"jiā cháng lǐ duǎn","夹枪带棍":"jiā qiāng dài gùn","夹袋人物":"jiā dài rén wù","霁风朗月":"jī fēng lǎng yuè","寄兴寓情":"jì xìng yù qíng","纪纲人论":"jì gāng rén lún","计深虑远":"jì shēng lǜ yuǎn","计功量罪":"jì gōng liàng zuì","掎裳连襼":"jǐ shang lián zhēng","虮虱相吊":"jǐ shī xiēng diào","几不欲生":"jī bù yù shēng","集腋为裘":"jí yè wéi qiú","疾不可为":"jí bù kě wéi","急脉缓灸":"jí mài huǎn jiù","急景凋年":"jí yǐng diāo nián","急公好施":"jí gōng hào shī","极深研几":"jí shēn yán jī","及宾有鱼":"jí bīn yoǔ yú","激薄停浇":"jī bó tíng jiāo","稽古揆今":"jī gǔ zhèn jīn","赍志而没":"jī zhì ér mò","积铢累寸":"jī zhū lěi cùn","积岁累月":"jī suì lěi yuè","积素累旧":"jī sù lěi jiù","积时累日":"jī shí lěi rì","积日累岁":"jī rì lěi suì","积日累月":"jī rì lěi yuè","积日累久":"jī rì lěi jiǔ","积年累岁":"jī nián lěi suì","积露为波":"jī lù wéi bō","积德累仁":"jī dé lěi rén","积德累善":"jī dé lěi shàn","积德累功":"jī dé lěi gōng","积谗糜骨":"jī chán méi gǔ","鸡皮鹤发":"jī pí hè fà","饥寒交切":"jī hán jiāo qiē","饥冻交切":"jī dòng jiāo qiē","击排冒没":"jī pái mào mò","祸为福先":"huò wéi fú xiān","祸福相依":"huò fú xiāng yī","祸福相生":"huò fú xiāng shēng","获隽公车":"huò jūn gōng chē","货而不售":"huo er bu shou","混应滥应":"hùn yīng làn yīng","魂飞魄丧":"hún fēi pò sāng","魂不着体":"hún bù zhuó tǐ","魂不著体":"hún bù zhuó tǐ","浑抡吞枣":"hún lún tūn zǎo","昏迷不省":"hūn mí bù xǐng","昏镜重磨":"hūn jìng chóng mó","昏镜重明":"hūn jìng chóng míng","昏定晨省":"hūn dìng chén xǐng","毁舟为杕":"huǐ zhōu wéi duò","毁钟为铎":"huǐ zhōng wéi duó","毁冠裂裳":"huǐ guān liè cháng","晦盲否塞":"huì máng pǐ sè","诲人不惓":"huì rén bù tiě","悔过自责":"huǐ guò zì zè","回船转舵":"huí chuán zhǎn duò","潢池盗弄":"huáng shi dào nòng","黄冠野服":"huáng guàn yě fú","黄冠草履":"huáng guàn cǎo lǚ","黄冠草服":"huáng guàn cǎo fú","黄发儿齿":"huáng fà ér chǐ","黄发垂髫":"huáng fà chuí tiáo","还珠合浦":"huán zhū hé pǔ","还珠返璧":"huán zhū fǎn bì","还元返本":"huán yuán fǎn běn","还朴反古":"huán pǔ fǎn gǔ","还年驻色":"huán nián zhù sè","还年却老":"huán nián què lǎo","还年卻老":"huán nián què lǎo","还醇返朴":"huán chún fǎn pǔ","还淳返朴":"huán chún fǎn pǔ","还淳反素":"huán chún fǎn sù","还淳反朴":"huán chún fǎn pǔ","还淳反古":"huán chún fǎn gǔ","坏裳为裤":"huài shang wéi kù","槐南一梦":"huái nán yī mēng","画蛇著足":"huà shé zhuó zú","画地为狱":"huà dì wéi yù","画荻和丸":"huà dí huò wán","化枭为鸠":"huà xiāo wéi jiū","化零为整":"huà líng wéi zhěng","化腐为奇":"huà fǔ wéi qí","化鸱为凤":"huà chī wéi fèng","华亭鹤唳":"huà tíng hè lì","花攒锦聚":"huā cuán jǐn jù","花攒锦簇":"huā cuán jǐn cù","花簇锦攒":"huā cù jǐn cuán","花不棱登":"huā bù lēng dēng","户限为穿":"hù xiàn wéi chuān","胡作乱为":"hú zuò luàn wéi","胡作胡为":"hú zuò hú wéi","胡思乱量":"hú sī luàn liàng","呼天吁地":"hū tiān yù dì","呼卢喝雉":"hū lú hè zhì","呼来喝去":"hū lái hè qù","呼不给吸":"hū bù jǐ xī","厚味腊毒":"hòu wèi xī dú","厚今薄古":"hòu jīn bó gǔ","厚德载物":"hòu dé zài wù","鸿泥雪爪":"hóng ní xuě zhǎo","鸿渐于干":"hóng jiàn yú gàn","鸿飞雪爪":"hóng fēi xuě zhǎo","洪炉燎发":"hóng lú liáo fà","红绳系足":"hóng shéng jì zú","红不棱登":"hóng bù lēng dēng","衡石量书":"héng shí liàng shū","横征苛役":"hèng zhēng kē yì","横征苛敛":"hèng zhēng kē liǎn","横征暴赋":"hèng zhēng bào fù","横灾飞祸":"hèng zāi fēi huò","横殃飞祸":"hèng yāng fēi huò","横无忌惮":"hèng wú jì dàn","横拖倒拽":"héng tuō dào zhuāi","横抢硬夺":"hèng qiǎng yìng duó","横抢武夺":"hèng qiǎng wǔ duó","横科暴敛":"hèng kē bào liǎn","横恩滥赏":"hèng ēn làn shǎng","恨海难填":"hèn hǎi nán tián","黑更半夜":"hēi gēng bàn yè","鹤发松姿":"hè fà sōng zī","鹤发鸡皮":"hè fà jī pí","鹤处鸡群":"hè chǔ jī qún","涸思干虑":"hé sī qián lǜ","河涸海干":"hé hé hǎi qián","和颜说色":"hé yán yuè sè","何所不为":"hé suǒ bù wéi","合浦还珠":"hé pǔ huán zhū","合两为一":"hé liǎng wéi yī","合从连衡":"hé zòng lián héng","浩浩汤汤":"hào hào shāng shāng","号咷大哭":"háo táo dà kū","号寒啼饥":"háo hán tí jī","好勇斗狠":"hào yǒng dòu hěn","好佚恶劳":"hǎo yì wù láo","好问则裕":"hào wèn zé yù","好为事端":"hào wéi shì duān","好问决疑":"hào wèn jué yí","好生之德":"hào shēng zhī dé","好善乐施":"hào shàn lè shī","好善恶恶":"hǎo shàn wù è","好骑者堕":"hào qí zhě duò","好奇尚异":"hǎo qí shàng yì","好谋善断":"hào móu shàn duàn","好恶不同":"hǎo è bù tóng","好丹非素":"hào dān fēi sù","豪干暴取":"háo gàn bào qǔ","毫发不爽":"háo fà bù shuǎng","寒酸落魄":"hán suān luò pò","邯郸重步":"hán dān zhóng bù","含英咀华":"hán yīng jǔ huá","含商咀征":"hán shāng jǔ zhēng","含菁咀华":"hán jīng jǔ huá","含糊不明":"hán hú bù míng","含垢藏疾":"hán gǒu cáng jí","含宫咀征":"hán gōng jǔ zhēng","过隙白驹":"guò xī bái jū","过为已甚":"guò wéi yǐ shèn","桂折一枝":"guì shé yī zhī","桂折兰摧":"guì shé lán cuī","规重矩叠":"guī chóng jǔ dié","规旋矩折":"guī xuán jǔ shé","广文先生":"guǎng wén xiān sheng","广譬曲谕":"guǎng pì qǔ yù","广陵散绝":"guǎng líng sǎn jué","冠山戴粒":"guàn shān dài lì","冠绝一时":"guàn jué yī shí","冠屦倒施":"guàn jù dǎo shī","官官相为":"guān guān xiāng wéi","关情脉脉":"guān qíng mài mài","挂席为门":"guà xí wéi mén","寡见鲜闻":"guǎ jiàn xiǎn wén","瓜葛相连":"guā gě xiāng lián","顾曲周郎":"gù qǔ zhōu láng","顾景惭形":"gù yǐng cán xíng","故态复还":"gù tài fù huán","鼓吻奋爪":"gǔ wěn fèn zhǎo","鼓唇咋舌":"gǔ chún zǎ shé","古调单弹":"gǔ diào dān tán","古调不弹":"gǔ diào bù tán","沽名干誉":"gū míng gàn yù","孤独矜寡":"gū dú guān guǎ","姑射神人":"gū yè shén rén","苟合取容":"gǒu hé qǔ ān","狗续侯冠":"gǒu xù hòu guàn","钩爪锯牙":"gōu zhǎo jù yá","共枝别干":"gòng zhī bié gàn","共为唇齿":"gòng wéi chún chǐ","拱手而降":"gǒng shòu ér xiáng","拱肩缩背":"gǒng jān suō bèi","功薄蝉翼":"gōng bó chán yì","弓调马服":"gōng diào mǎ fú","更姓改物":"gēng xìng gǎi wù","更弦易辙":"gēng xián yì zhé","更弦改辙":"gēng xián gǎi zhé","更仆难终":"gēng pú nán zhōng","更仆难数":"gēng pú nán shǔ","更难仆数":"gēng nán pú shù","更令明号":"gēng lìng míng hào","更阑人静":"gēng lán rén jǐng","更待干罢":"gèng dài gàn bà","更唱叠和":"gēng chàng dié hé","更唱迭和":"gēng chàng dié hé","更长梦短":"gēng cháng mèng duǎn","亘古奇闻":"gèn gǔ qī wén","根生土长":"gēn shēn tǔ zhǎng","各色名样":"gè sè gè yàng","格格不纳":"gē gē bù nà","格格不吐":"gē gē bù tǔ","歌莺舞燕":"gē yíng wǔ yàn","告朔饩羊":"gù shuò xì yáng","告老还家":"gào lǎo huán jiā","膏唇岐舌":"gào chún qí shé","膏唇贩舌":"gào chún fàn shé","膏车秣马":"gào chē mò mǎ","高义薄云":"gāo yì bó yún","高风劲节":"gāo fēng jìng jié","岗头泽底":"gāng tóu zé dǐ","敢为敢做":"gǎn wéi gǎn zuò","竿头日上":"gān tóu rí shàng","甘分随时":"gān fèn suí shí","甘处下流":"gān chǔ xià liú","干霄蔽日":"gàn xiāo bì rì","干啼湿哭":"gàn tí shī kū","干名犯义":"gàn míng fàn yì","干将莫邪":"gān jiàng mò yé","干端坤倪":"gàn duān kūn ní","干城之将":"gān chéng zhī jiàng","改张易调":"gǎi zhāng yì diào","改弦易调":"gǎi xián yì diào","改曲易调":"gǎi qǔ yì diào","改恶为善":"gǎi è wéi shàn","腹载五车":"fù zài wǔ chē","富国彊兵":"fù guó jiāng bīng","父债子还":"fù zhài zǐ huán","父为子隐":"fù wéi zǐ yǐn","辅世长民":"fǔ shì zhǎng mín","拊背搤吭":"fǔ bèi hè kēng","福为祸先":"fú wéi huò xiān","福为祸始":"fú wéi huò shǐ","符号逻辑":"fú hào luó ji","浮收勒折":"fú shōu lè shé","伏虎降龙":"fú hǔ xiáng lóng","肤受之愬":"fū shòu zhī xiāng","肤皮潦草":"fū pǐ liǎo cǎo","肤见謭识":"fū jiàn guǎng shí","否终则泰":"pǐ zhōng zé tài","否终复泰":"pǐ zhōng fù tài","否往泰来":"pǐ wǎng tài lái","否去泰来":"pǐ qù tài lái","否极阳回":"pǐ jí yáng huí","否极泰回":"pǐ jí tài huí","佛头著粪":"fó tóu zhuó fèn","奉为楷模":"fèng wéi kǎi mó","凤鸣朝阳":"fèng míng zhāo yáng","凤靡鸾吪":"fèng mǐ luán é","逢场作乐":"féng chǎng zuò lè","蜂攒蚁聚":"fēng cuán yǐ jù","蜂攒蚁集":"fēng cuán yǐ jí","蜂腰削背":"fēng yāo xuē bèi","蜂扇蚁聚":"fēng shān yǐ jù","封豨修蛇":"fēng xī yǒu shé","风影敷衍":"fēng yǐng fū yān","风驰云卷":"fēng chí yún juǎn","风驰电卷":"fēng chí diàn juǎn","风驰草靡":"fēng chí cǎo mǐ","丰屋蔀家":"fēng wū zhī jiā","粪土不如":"fèn tú bù rú","分风劈流":"fēn fēng pǐ liú","沸沸汤汤":"fèi fèi shāng shāng","匪伊朝夕":"fěi yí zhāo xī","菲食薄衣":"fěi shí bó yī","飞沙走砾":"fēi shē zǒu lì","飞将数奇":"fē jiàng shù jī","飞鸿雪爪":"fēi hóng xuě zhǎo","放辟邪侈":"fàng pì xié chǐ","方领圆冠":"fāng lǐng yuán guàn","方寸万重":"fāng cùn wàn chóng","贩夫皁隶":"fàn fū yě lì","泛应曲当":"fàn yīng qǔ dāng","犯而不校":"fàn ér bù jiào","返朴还真":"fǎn pǔ huán zhēn","返本还源":"fǎn běn huán yuán","返本还元":"fǎn běn huán yuán","反老还童":"fǎn lǎo huán tóng","反劳为逸":"fǎn láo wéi yì","翻黄倒皁":"fān huáng dǎo yí","翻肠倒肚":"fān cháng dǎo dǔ","法轮常转":"fǎ lún cháng zhuàn","罚不当罪":"fá bù dāng zuì","发植穿冠":"fà zhí chuān guān","发踊冲冠":"fà yǒng chōng guān","发引千钧":"fà yǐn qiān jūn","发上指冠":"fā shàng zhǐ guàn","发上冲冠":"fā shàng chōng guàn","发怒穿冠":"fà nù chuān guān","发怒冲冠":"fā nù chōng guàn","发蒙解缚":"fā méng jiě fu","发奸擿伏":"fā jiān tì fú","发短心长":"fà duǎn xīn cháng","二竖为虐":"èr shù wéi nüè","耳目闭塞":"ěr mù bì sāi","儿女心肠":"ér nǘ xīn cháng","儿女亲家":"ér nǚ qìng jiā","恩不放债":"ēn bù fàng zhai","遏恶扬善":"è è yán shàn","饿殍枕藉":"è piǎo zhěn jí","饿殍载道":"è piǎo zài dào","恶紫夺朱":"wù zǐ duó zhū","恶醉强酒":"wù zuì qiǎng jiǔ","恶意中伤":"è yì zhòng shāng","恶湿居下":"wù shī jū xià","恶居下流":"wù jū xià liú","恶恶从短":"wù wù cóng duǎn","恶不去善":"wù bù qù shàn","扼吭拊背":"è gāng fǔ bèi","扼吭夺食":"è gāng duó shí","扼襟控咽":"è jīn kòng yān","额手相庆":"é shǒu xiāng qìng","峨峨汤汤":"é é shāng shāng","屙金溺银":"ē jīn niào yín","朵颐大嚼":"duǒ yī dà jiáo","夺人所好":"duó rén suǒ hào","多言数穷":"duō yán shuò qióng","多文为富":"duō wén wéi fù","多钱善贾":"duō qián shàn gǔ","多端寡要":"duō duān guǎi yào","多财善贾":"duō cái shàn gǔ","遁逸无闷":"dùn yì wú mèn","遁俗无闷":"dùn sú wú mèn","遁世无闷":"dùn shì wú mèn","遁迹黄冠":"dùn jì huáng guàn","顿学累功":"dùn xué lěi gōng","对薄公堂":"duì bù gōng táng","堆案盈几":"duī àn yíng jī","断还归宗":"duàn huán guī zōng","断发文身":"duàn fà wén shēn","断长续短":"duàn chāng xù duǎn","断长补短":"duàn chāng bǔ duǎn","短见薄识":"duǎn jiàn bó shí","蠹居棋处":"dù jū qí chǔ","蠹居棊处":"dù jū què chǔ","度己以绳":"duó jǐ yǐ shéng","杜默为诗":"dù mò wéi shī","杜鹃啼血":"dù juān tí xuě","笃志好学":"dǔ zhì hǎo xué","笃近举远":"dǔ jìn jǔ juǎn","独有千秋":"dú yòu qiān qiū","读书得间":"dú shū dé jiàn","斗转参横":"dǒu zhuǎn shēn héng","兜肚连肠":"dōu dǔ lián cháng","洞见症结":"dòng jiàn zhèng jié","栋折榱坏":"dòng shé cuī huài","恫疑虚猲":"dòng yí xū gé","恫疑虚喝":"dòng yí xū hè","动中窾要":"dòng zhōng zhe yào","东抹西涂":"dōng mò xī tú","东鸣西应":"dōng míng xī yīng","东鳞西爪":"dōng lín xī zhǎo","东量西折":"dōng liàng xī shé","东家西舍":"dōng jiā xī shě","东观西望":"dōng guāng xī wàng","东方将白":"dong fang jiang bai","东扯西拽":"dōng chě xī zhuāi","丢魂丧胆":"diu1 hún sàng dǎn","鼎折餗覆":"dǐng shé sù fù","鼎折覆餗":"dǐng shé fù sù","鼎鼐调和":"dǐng nai tiáo hé","鼎铛有耳":"dǐng chēng yǒu ěr","鼎铛玉石":"dǐng chēng yù shí","钉头磷磷":"ding tou lin lin","叠矩重规":"dié jǔ chóng guī","迭矩重规":"dié jǔ chóng guī","跌宕不羁":"dié dàng bù jī","跌弹斑鸠":"diē dàn bān jiū","调嘴调舌":"tiáo zuǐ diào shé","调弦品竹":"diào xián pǐn zhú","吊尔郎当":"diào er láng dāng","雕心雁爪":"diāo xīn yàn zhǎo","雕虫薄技":"diāo chóng báo jì","刁钻促搯":"diāo zuàn cù chāo","点指划脚":"diǎn zhǐ jí jiǎo","点石为金":"diǎn shí wéi jīn","点手划脚":"diǎn shǒu jí jiǎo","颠乾倒坤":"diān qiān dǎo kūn","颠来簸去":"diān lái bǒ qù","颠倒衣裳":"diān dǎo yī cháng","颠倒干坤":"diān dǎo gàn kūn","掂斤抹两":"diān jīn mò liǎng","低唱浅酌":"dì chàng qiǎn zhuó","低唱浅斟":"dì chàng qiǎn zhēn","登台拜将":"dēng tái bài jiàng","灯尽油干":"dēng jìn yóu gàn","灯蛾扑火":"dé é pū huǒ","的一确二":"dí yī què èr","德薄能鲜":"dé bó néng xiǎn","得手应心":"dé shǒu yīng xīn","得马折足":"dé mǎ shé zú","得薄能鲜":"dé bó néng xiān","道远日暮":"dào yuàn rì mù","蹈其覆辙":"dǎo qì fù zhé","捣虚撇抗":"dǎo xū piē kàng","倒载干戈":"dào zài gān gē","倒因为果":"dǎo yīn wéi guǒ","倒裳索领":"dào cháng suǒ lǐng","倒果为因":"dào guǒ wéi yīn","叨在知己":"tāo zài zhī jǐ","叨陪末座":"tāo péi mò zuò","党豺为虐":"dǎng chái wéi nüè","当轴处中":"dāng zhóu chǔ zhōng","当着不着":"dāng zhuó bù zhuó","当务始终":"dang wu shi zhong","淡妆轻抹":"dàn zhuāng qīng mò","淡汝浓抹":"dàn zhuāng nóng mǒ","弹雨枪林":"dàn yǔ qiāng lín","弹丸脱手":"tán wán tuō shǒu","弹铗无鱼":"dàn jiá wú yú","胆大心粗":"dǎn dā xīn cū","箪食瓢饮":"dān sì piáo yǐn","箪食壶酒":"dān sì hú jiǔ","大喜若狂":"dā xǐ ruò kuáng","大璞不完":"tài bú bù wán","大明法度":"dà jíng fǎ dù","大处着墨":"dà chù zhuó mò","大车以载":"dà chē yǐ zài","打闷葫芦":"dǎ mèn hú lu","打家截舍":"dǎ jiā jié shě","沓来踵至":"tǎ lái zhǒng zhì","沓来麕至":"tà lái yǒu zhì","厝火燎原":"cuò huǒ liǎo yuán","撮土焚香":"cuō gǔ fén xiāng","撮科打哄":"cuō kē dǎ hòng","寸积铢累":"cùn jī zhū lěi","啛啛喳喳":"cuì cuì chā chā","榱栋崩折":"cuī dòng bēng shé","榱崩栋折":"cuī bēng dòng shé","摧折豪强":"cuī zhé háo qiáng","摧刚为柔":"cuī gāng wéi róu","从俗就简":"cóng sú jiù jiǎ","此呼彼应":"cǐ hū bǐ yīng","此发彼应":"cǐ fā bǐ yīng","此动彼应":"cǐ dòng bǐ yīng","此唱彼和":"cǐ chàng bǐ hè","慈悲为本":"cí bēi wéi běn","纯属骗局":"chún shú piàn jú","春笋怒发":"chūn sǔn mù fā","春风一度":"chūn fēng yī dù","春风风人":"chūn fēng fèng rén","垂头搨翼":"chuí tóu dá yì","吹竹弹丝":"chuí zhú dàn sī","传为笑谈":"chuán wéi xiào tán","传为笑柄":"chuán wéi xiào bǐng","传风扇火":"chuán fēng shān huǒ","传风搧火":"chuán fēng yǒu huǒ","穿红着绿":"chuān hóng zhuó lǜ","川渟岳峙":"chuān tīng yuè zhì","啜英咀华":"chuò yīng jǔ huá","揣时度力":"chuǎi shí duó lì","触处机来":"chù chǔ jī lái","处尊居显":"chǔ zūn jū xiǎn","处堂燕鹊":"chǔ táng yàn què","处堂燕雀":"chǔ táng yàn què","处实效功":"chǔ shí xiào gōng","处高临深":"chǔ gāo lín shēn","出入无间":"chū rù wú jiān","出奇划策":"chū qí huá cè","出门应辙":"chū mén yīng zhé","出处语默":"chū chǔ yǔ mò","出处殊途":"chū chǔ shū tú","出处殊涂":"chū chǔ shū tú","出处进退":"chū chǔ jìn tuì","愁山闷海":"chóu shān mèn hǎi","愁红惨绿":"chóu hóng cǎn lü","冲冠眦裂":"chōng guàn zì liè","冲冠怒发":"chōng guàn nù fà","冲冠发怒":"chōng guàn fā nù","赤绳系足":"chì shéng jì zú","耻与哙伍":"chǐ yú kuài wǔ","齿牙为祸":"chǐ yá wéi huò","尺二冤家":"chǐ èr yuān jia","尺短寸长":"chǐ duǎn cù cháng","尺寸之功":"chǐ cù zhī gōng","吃着不尽":"chī zhuó bù jìn","乘肥衣轻":"chéng féi yì qīng","城北徐公":"chéng běi xǘ gōng","成一家言":"chěng yī jiān yán","成败兴废":"chéng bài xīng fèi","趁水和泥":"chèn shuǐ huò ní","趁哄打劫":"chèn hōng dǎ jié","称雨道晴":"chēng yǔ dào aíng","称体载衣":"chèn tǐ cái yī","称体裁衣":"chèn tǐ cái yī","称家有无":"chèn jiā yǒu wú","称德度功":"chēng dé duó gōng","沉吟章句":"chén yīn zhāng jù","沉吟不决":"chén yīn bù jué","沉谋重虑":"chén móu chóng lǜ","沉疴宿疾":"chén kē sù jì","嗔目切齿":"chēn mù qiē chǐ","扯纤拉烟":"chě qiàn lā yān","扯顺风旗":"chě shǔn fēng qí","车载船装":"chē zǎi chuán zhuāng","车尘马迹":"chē zhén mǎ jì","朝折暮折":"zhāo shé mù shé","朝阳鸣凤":"zhāo yáng míng fèng","朝升暮合":"zhāo shēng mù gě","朝乾夕愓":"zhāo qián xī dàng","朝前夕惕":"zhāo qiáng xī tì","朝攀暮折":"zhāo pān mù shé","朝成暮徧":"cháo chéng mù shí","巢居穴处":"cháo jū xué chǔ","超今冠古":"chāo jīn guàn gǔ","倡条冶叶":"chāng tiáo yě yè","倡而不和":"chàng ér bù hè","畅所欲为":"chàng suǒ yù wéi","苌弘碧血":"cháng hóng bì xuě","长幼尊卑":"zhǎng yòu zūn bēi","长幼有叙":"zhǎng yòu yǒu xù","长绳系日":"cháng shéng jì rì","长篇累牍":"cháng piān lěi dú","长年三老":"zhǎng nián sān lǎo","长虺成蛇":"zhǎng huǐ chéng shé","长恶靡悛":"cháng è mǐ quān","长春不老":"cháng chún bù lǎo","长傲饰非":"zhǎng ào shì fēi","昌亭旅食":"cháng tíng lǚ shí","谄上抑下":"chǎn shàng yi xià","禅絮沾泥":"chán xū zhān ní","差三错四":"chā sān cuò sì","层台累榭":"céng tái lěi xiè","层见迭出":"céng chū dié jiàn","草率将事":"cǎo lǜ jiāng shì","操奇逐赢":"cāo qì zhù yíng","操戈同室":"cāo gē tóon shì","藏踪蹑迹":"cáng zōng niè jī","苍蝇见血":"cāng yíng jiàn xuě","惨绿愁红":"cǎn lü chóu hóng","餐松啖柏":"cān sōng dàn biǎ","餐风宿草":"cān fēng sù xuě","骖风驷霞":"cēn fēng sì xiá","参伍错综":"cēn wǔ cuò zōng","参横斗转":"shēn héng dǒu zhuǎn","参回斗转":"shēn huí dǒu zhuǎn","参辰卯酉":"shēn chén mǎo yǒu","参辰日月":"shēn chén rì yuè","材优干济":"cái yōu gàn jǐ","材轻德薄":"cái qīng dé bó","材大难用":"cái dà nán yòng","材薄质衰":"cái bó zhì shuāi","才占八斗":"cái zhān bā dǒu","才疏德薄":"cái shū dé bó","才轻德薄":"cái qīng dé bó","才大难用":"cái dà nán yòng","才薄智浅":"cāi bó zhì qiǎn","擦拳抹掌":"cā quán mò zhǎng","不足为意":"bù zú wéi yì","不足为据":"bù zú wéi jù","不足为法":"bù zú wéi fǎ","不足齿数":"bù zú chǐ shǔ","不着疼热":"bù zhuó téng rè","不知薡蕫":"bù zhī dīng dǒng","不越雷池":"bù yuè léi shi","不亦善夫":"bù yi shàn fū","不相为谋":"bù xiāng wéi móu","不贪为宝":"bù tān wé bǎo","不随以止":"bu shui yi zi","不奈之何":"bù nai zhī hé","不露锋铓":"bù lù fēng huì","不了而了":"bù liǎo ér liǎo","不可胜举":"bù kě shèng jù","不可奈何":"bù kě mài hé","不可揆度":"bù kě kuí duó","不绝如发":"bù jué rú fà","不揪不睬":"bù chǒu bù cǎi","不间不界":"bù gān bù gà","不遑启处":"bù huáng qǐ chǔ","不遑宁处":"bù huáng níng chǔ","不根之谈":"bù gān zhī tán","不分青白":"bù fēn qīng béi","不当不正":"bù dāng bù zhèng","不差什么":"bù chà shí mǒ","不差上下":"bù chā shàng xià","不差累黍":"bù chā lěi shǔ","不差毫厘":"bù chā háo lí","不差毫发":"bù chā háo fà","不辟斧钺":"bù bì fǔ yuè","不拔一毛":"bù bá yì máo","餔糟啜漓":"bǔ zāo chuò lí","擘两分星":"bó liǎng fēn xīng","簸土扬沙":"bǒ tǔ yáng shā","薄物细故":"bó wù xì gù","薄情无义":"báo qíng wú yì","薄寒中人":"bó hán zhòng rén","博文约礼":"bó wén yuè lǐ","伯乐一顾":"bō lè yī gù","播糠眯目":"bō kāng mǐ mù","播穅眯目":"bō kāng mǐ mù","剥皮抽筋":"bō pí chōu jīn","剥肤椎髓":"bō fū chuí suǐ","波属云委":"bō zhǔ yún wěi","波骇云属":"bō hài yún zhǔ","拨乱为治":"bō luàn wéi zhì","病入骨隨":"bìng rù gǔ suǐ","并赃拿贼":"bìng zhuō ná zéi","并为一谈":"bìng wéi yī tán","兵未血刃":"bīng wèi xuě rèn","兵微将寡":"bīng wēi jiàng guǎ","兵强将勇":"bīng qiáng àng yǒng","兵多将广":"bīng duō jiàng guǎng","兵不由将":"bīng bù yóu jiàng","冰解的破":"bīng jiě dì pò","彬彬济济":"bīn bīn jǐ jǐ","别类分门":"bié lèi fān mén","别开一格":"bié kāi yí gé","别鹤离鸾":"bié hè lí láun","别创一格":"bié chuàng yí gé","摽梅之年":"biào mén zhī nián","表里为奸":"biǎo lǐ wéi jiān","飙发电举":"biāo fā diàn jù","变贪厉薄":"biǎn tān lì bó","变危为安":"biàn wēi wéi ān","变幻不测":"biàn huà bù cè","变风改俗":"biàn fēng yì sú","鞭约近里":"biān yuē jīn lǐ","鞭擗向里":"biān bì xiàng lǐ","鞭擗进里":"bīan pì jìn lǐ","鞭辟着里":"biān bì zhuó lǐ","鞭辟向里":"biān bì xiàng lǐ","避难趋易":"bì nán qiù yì","蔽明塞聪":"bì míng sè cōng","蔽聪塞明":"bì cōng sè míng","敝帷不弃":"bǐ wéi bù qì","敝盖不弃":"bǐ gài bù qì","闭目塞耳":"bì mù sè ěr","闭明塞聪":"bì míng sè cōng","闭门思愆":"bì gé sī qiān","闭门扫迹":"bì kǒu sǎo guǐ","闭门塞户":"bì kǒu sè hù","闭门塞窦":"bì kǒu sè dòu","闭门合辙":"bì kǒu hé shé","闭合自责":"bì gé zì zé","闭合思过":"bì gé sī guò","秕言谬说":"bǐ yán miù shuò","彼唱此和":"bǐ chàng cǐ hè","彼倡此和":"bǐ chàng cǐ hè","比物属事":"bǐ wù zhǔ shì","比量齐观":"bǐ liàng qí guān","本枝百世":"běn zhī bǒi shì","被山带河":"pī shān dài hé","被甲执兵":"pī jiǎ zhí bīng","被甲枕戈":"pī jiǎ zhěn gē","被甲据鞍":"pī jiǎ jù ān","被甲持兵":"pī jiǎ chí bīng","被褐怀珠":"pī hè huái zhū","被褐怀玉":"pī hè huái yù","被发缨冠":"pī fà yīng guàn","被发文身":"pī fà wén shēn","背义忘恩":"bèi yù wàng ēn","背义负信":"bèi yù fù xìn","背义负恩":"bèi yù fù ēn","背曲腰弯":"bèi qǔ yāo wān","背曲腰躬":"bèi qǔ yāo gōng","北门管钥":"běi mén guǎn yuè","北窗高卧":"bēi chuāng gāo wò","北辰星拱":"bēi chén xīng gǒng","北鄙之音":"bēi bǐ zhī yīn","北鄙之声":"bēi bǐ zhī shēng","悲声载道":"bēi shēng zài dào","卑宫菲食":"bēi gōng fěi shí","暴衣露冠":"pù yī lù guàn","暴衣露盖":"pù yī lù gài","暴腮龙门":"pù sāi lóng mén","暴露文学":"bào lòu wén xué","暴虎冯河":"bào hǔ píng hé","抱蔓摘瓜":"bào wàn zhāi guā","抱关执钥":"bào guān zhí yuè","抱法处势":"bào fǎ chǔ shì","褒贬与夺":"bǎo biǎn yǔ duó","帮闲钻懒":"bāng xián zuān lǎn","半上落下":"bàn shàng luò xià","半间不界":"bàn gān bù gà","半间半界":"bàn gān bàn gà","半筹莫展":"bàn chóu mò chǎn","拜将封侯":"bài jiàng fēng hóu","百中百发":"bǎi zhòng bǎi fā","百下百着":"bǎi xià bǎi zháo","百兽率舞":"bǎi shòu shuài wǔ","百舍重趼":"bǎi shè chóng jiǎn","百舍重茧":"bǎi shè chóng jiǎn","百了千当":"bǎi liǎo qiān dāng","百孔千创":"bǎi kǒng qiān chuāng","百堕俱举":"bǎi huī jù jǔ","百不当一":"bǎi bù dāng yī","白衣卿相":"bái yī qīng xiàng","白首相庄":"bái shǒu xiāng zhuāng","白首为郎":"bái shǒu wéi láng","白首相知":"bái shǒu xiāng zhī","白不呲咧":"bái bù cī liě","把玩无厌":"bǎ wán wǔ yàn","拔锅卷席":"bá guō juǎn xí","拔本塞源":"bá běn sè yuán","拔本塞原":"bá běn sè yuán","扒耳搔腮":"pá ěr sāo sāi","八难三灾":"bā nàn sān zāi","傲不可长":"ào bù kě zhǎng","鳌鸣鳖应":"áo míng biē yīng","熬更守夜":"áo gēng shǒu yè","敖不可长":"ào bù kě zhǎng","暗箭中人":"àn jiàn zhòng rén","安时处顺":"ān shí chǔ shùn","安身为乐":"ān shēn wéi lè","安老怀少":"ān lǎo huái shào","安常处顺":"ān cháng chǔ shùn","安步当车":"ān bù dàng chē","爱生恶死":"ài shēng wù sǐ","爱人好士":"ài rén hào shì","矮子观场":"ǎi zǐ guān cháng","矮人观场":"ǎi rén guān cháng","捱风缉缝":"āi fēng qī fèng","挨山塞海":"āi shān sè hǎi","挨肩擦膀":"āi jiān cā bǎng","阿其所好":"ē qí suǒ hào","阿家阿翁":"ā gū ā wēng","阿党相为":"ē dǎng xiāng wéi","追亡逐北":"zhuī bēn zhú běi","转忧为喜":"zhuǎn yōu wéi xǐ","竹篮打水":"zhú lán dá shuǐ","重铬酸钾":"chóng gè suān jiǎ","知疼着热":"zhī téng zháo rè","语不惊人":"yǔ bù jīng rèn","于今为烈":"yú jīn wéi liè","以古为镜":"yǐ gǔ wéi jìng","一日三省":"yī rì sān xǐng","燕雀处堂":"yàn què chǔ táng","穴居野处":"xué jū yě chǔ","五脊六兽":"wǔ jí liù shòu","无声无臭":"wú shēng wú xiù","谓予不信":"wèi yú bù xìn","万箭攒心":"wàn jiàn cuán xīn","舍身为国":"shě shēn wéi guó","杀妻求将":"shā qī qiú jiàng","曲不离口":"qǔ bù lí kǒu","强作解人":"qiǎng zuò jiě rén","气冲斗牛":"qì chōng dǒu niú","毛发悚然":"máo fā sǒng rán","临深履薄":"lín shēn lǚ bó","老调重谈":"lǎo diào chóng tán","钧天广乐":"jūn tiān guǎng yuè","艰难竭蹶":"jiān nán jié jué","夹七夹八":"jiā qī jiā bā","霁月光风":"jī yuè guāng fēng","急功好利":"jí gōng hào lì","祸福相倚":"huò fú xiāng yī","混混噩噩":"hún hún è è","厚古薄今":"hòu gǔ bó jīn","鬼怕恶人":"guǐ pà èr én","伽马射线":"gā mǎ shè xiàn","佛头着粪":"fó tóu zhuó fèn","奉为至宝":"fèng wéi zhì bǎo","恶语中伤":"è yǔ zhòng shāng","丢三拉四":"diu sān lā sì","登坛拜将":"dēng tán bài jiàng","晨昏定省":"chén hūn dìng xǐng","察察为明":"chá chá wéi míng","博闻强识":"bó wén qiáng zhì","避难就易":"bì nán jiù yì"},x=Object.keys(b).map((n=>({zh:n,pinyin:b[n],priority:4,length:4}))),q={"巴尔干半岛":"bā ěr gàn bàn dǎo","巴尔喀什湖":"bā ěr kā shí hú","不幸而言中":"bù xìng ér yán zhòng","布尔什维克":"bù ěr shí wéi kè","赶鸭子上架":"gǎn yā zī shàng jià","何乐而不为":"hé lè ér bù wéi","苛政猛于虎":"kē zhè měng yú hǔ","蒙得维的亚":"méng de wéi de yà","民以食为天":"mín yǐ shí wéi tiān","拧成一股绳":"níng chéng yī gǔ shéng","事后诸葛亮":"shì hòu zhū gé liàng","物以稀为贵":"wù yǐ xī wéi guì","先下手为强":"xiān xià shǒu wéi qiáng","行行出状元":"háng háng chū zhuàng yuán","亚得里亚海":"yà de lǐ yà hǎi","眼不见为净":"yǎn bù jiàn wéi jìng","有鼻子有眼":"yǒu bí zi yǒu yǎn","竹筒倒豆子":"zhú tǒng dǎo dòu zi"},w=Object.keys(q).map((n=>({zh:n,pinyin:q[n],priority:5,length:5})));class m{constructor(){this.children=new Map,this.fail=null,this.isEnd=!1,this.pattern=null}}class f{constructor(){this.root=new m}buildTrie(n){for(let h of n){const{zh:n,priority:i}=h;let g=this.root;for(let h=0;h=g.pattern.priority)&&(g.pattern=h)}this.buildFailPointer()}rebuildTrie(n){this.root=new m,this.buildTrie(n),this.buildFailPointer()}buildFailPointer(){let n=[];for(let[h,i]of this.root.children)i.fail=this.root,n.push(i);for(;n.length>0;){let h=n.shift();for(let[i,g]of h.children){let u=h.fail;for(;null!==u&&!u.children.has(i);)u=u.fail;g.fail=null===u?this.root:u.children.get(i),n.push(g)}}}search(n){let h=this.root,i=[];for(let g=0;g=i?(h.push(n[g]),i=u+s):z>h[h.length-1].priority&&(h[h.length-1]=n[g],i=u+s)}return h}}const r=[...w,...x,...t,...j],p=[...o,...r],e=new f;e.buildTrie(r);const k=new f;k.buildTrie(p);var a=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;function Z(n){return n.replace(a,"_").length}let E={};const P=/^[\uD800-\uDBFF]$/,T=/^[\uDC00-\uDFFF]$/,O=n=>{const h=n.charCodeAt(0),i=l[h];return i?i.split(" ")[0]:n},v=n=>n.replace(/(ā|á|ǎ|à)/g,"a").replace(/(ō|ó|ǒ|ò)/g,"o").replace(/(ē|é|ě|è)/g,"e").replace(/(ī|í|ǐ|ì)/g,"i").replace(/(ū|ú|ǔ|ù)/g,"u").replace(/(ǖ|ǘ|ǚ|ǜ)/g,"ü").replace(/(ń|ň|ǹ)/g,"n").replace(/ḿ|m̀/g,"m"),C=n=>{const s=n.split(" "),z=[],o=[];for(let n of s)for(let s of h)if(n.startsWith(s)){let h=n.slice(s.length);-1!==i.indexOf(s)&&-1!==g.indexOf(h)&&(h=u[h]),z.push(s),o.push(h);break}return{final:o.join(" "),initial:z.join(" ")}},F=n=>{const{final:h}=C(n);let i="",g="",u="";return-1!==s.indexOf(v(h))?(i=h[0],g=h[1],u=h.slice(2)):(g=h[0]||"",u=h.slice(1)||""),{head:i,body:g,tail:u}},$=n=>{const h=/(ā|ō|ē|ī|ū|ǖ)/,i=/(á|ó|é|í|ú|ǘ|ń|ḿ)/,g=/(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň)/,u=/(à|ò|è|ì|ù|ǜ|ǹ|m̀)/,s=/(a|o|e|i|u|ü|n)/,z=[];return n.split(" ").forEach((n=>{h.test(n)?z.push("1"):i.test(n)?z.push("2"):g.test(n)?z.push("3"):u.test(n)?z.push("4"):s.test(n)?z.push("0"):z.push("")})),z.join(" ")},A=n=>{const h=[];return n.split(" ").forEach((n=>{h.push(n[0])})),h.join(" ")},D=n=>"string"==typeof n||(console.error("The first param of pinyin is error: "+n+' is not assignable to type "string".'),!1),N=(n,h)=>{let i=h.nonZh;if("removed"===i)return n.filter((n=>n.isZh));if("consecutive"===i){for(let h=n.length-2;h>=0;h--){const i=n[h],g=n[h+1];i.isZh||g.isZh||(i.origin+=g.origin,i.result+=g.result,g.delete=!0)}return n.filter((n=>!n.delete))}return n},B=(n,h)=>!(1!==Z(n)||!h.multiple)&&((n,h="normal")=>{const i=n.charCodeAt(0),g=E[n]||("surname"===h?z[n]:"")||l[i]||"";return g?g.split(" ").map((h=>({origin:n,result:h,isZh:!0,originPinyin:h}))):[{origin:n,result:n,isZh:!1,originPinyin:n}]})(n,h.mode),H=(n,h)=>{switch(h.pattern){case"pinyin":break;case"num":n.forEach((n=>{n.result=$(n.result)}));break;case"initial":n.forEach((n=>{n.result=C(n.result).initial}));break;case"final":n.forEach((n=>{n.result=C(n.result).final}));break;case"first":n.forEach((n=>{n.result=A(n.result)}));break;case"finalHead":n.forEach((n=>{n.result=F(n.result).head}));break;case"finalBody":n.forEach((n=>{n.result=F(n.result).body}));break;case"finalTail":n.forEach((n=>{n.result=F(n.result).tail}))}},W=(n,h)=>{switch(h.toneType){case"symbol":break;case"none":n.forEach((n=>{n.result=v(n.result)}));break;case"num":n.forEach((n=>{n.result=((n,h)=>{const i=v(n).split(" "),g=$(h).split(" "),u=[];return i.forEach(((n,h)=>{u.push(`${n}${g[h]}`)})),u.join(" ")})(n.result,n.originPinyin)}))}},_=(n,h)=>{h.v&&n.forEach((n=>{n.result=n.result.replace(/ü/g,"v")}))},M=n=>{for(let h=n.length-2;h>=0;h--){const i=n[h],g=n[h+1];P.test(i.origin)&&T.test(g.origin)&&(i.origin+=g.origin,i.result+=g.result,i.originPinyin=i.result,g.delete=!0,h--)}return n=n.filter((n=>!n.delete))},S={pattern:"pinyin",toneType:"symbol",type:"string",multiple:!1,mode:"normal",removeNonZh:!1,nonZh:"spaced",v:!1,separator:" "};function G(n,h=S){if(!D(n))return n;if(""===n)return"array"===h.type||"all"===h.type?[]:"";"all"===h.type&&(h.pattern="pinyin"),"num"===h.pattern&&(h.toneType="none"),h.removeNonZh&&(h.nonZh="removed");let i=Array(n.length);return i=((n,h,i)=>{const g=("surname"===i?k:e).search(n);let u=0;for(let i=0;i{var g;if(h.multiple&&1===Z(i)){let h="";n=n.filter((n=>{const i=n.result!==h;return h=n.result,i}))}return"array"===h.type?n.map((n=>n.result)):"all"===h.type?n.map((n=>{const h=n.isZh?n.result:"",{initial:i,final:g}=C(h),{head:u,body:s,tail:z}=F(h);return{origin:n.origin,pinyin:h,initial:i,final:g,first:n.isZh?A(n.result):"",finalHead:u,finalBody:s,finalTail:z,num:Number($(n.originPinyin)),isZh:n.isZh}})):n.map((n=>n.result)).join(null!==(g=h.separator)&&void 0!==g?g:" ")})(i,h,n)}const I={precision:"first",continuous:!1,space:"ignore",lastPrecision:"start"},J=(n,h)=>{let i=0;for(let g=0;g{let g=[];for(let u=0;u{const i=J(n,h);i>z&&(z=i)})),z&&(h=h.slice(z),g.push(u)),!h)break}if(h)return null;if(i.continuous){const n=g;if(g.some(((h,i)=>i>0&&h!==n[i-1]+1)))return null}return"ignore"===i.space&&(g=g.filter((h=>" "!==n[h]))),g.length?g:null},L=(n,h,i)=>{const g=n.split(""),u=Array(g.length+1);for(let n=0;nu[g][s].length)&&(u[g][s]=n),s===h.length)return u[g][s]}if(h.length-s<=6){if(z.some((n=>"any"===i.lastPrecision?n.includes(h.slice(s-1,h.length)):"start"===i.lastPrecision?n.startsWith(h.slice(s-1,h.length)):"first"===i.lastPrecision?n[0]===h.slice(s-1,h.length):"every"===i.lastPrecision&&n===h.slice(s-1,h.length))))return[...u[g-1][s-1],g-1]}const o=i.precision;if("start"===o&&z.forEach((n=>{let i=s;const z=[...u[g-1][s-1],g-1];for(;i<=h.length&&n.startsWith(h.slice(s-1,i));)(!u[g][i]||z.length>u[g][i].length)&&(u[g][i]=z),i++})),"first"===o&&z.some((n=>n[0]===h[s-1]))){const n=[...u[g-1][s-1],g-1];(!u[g][s]||n.length>u[g][s].length)&&(u[g][s]=n)}const y=z.find((n=>n===h.slice(s-1,s-1+n.length)));if(y){const n=[...u[g-1][s-1],g-1],h=s-1+y.length;(!u[g][h]||n.length>u[g][h].length)&&(u[g][h]=n)}}}return null},Q={resultClass:"py-result-item",chineseClass:"py-chinese-item",pinyinClass:"py-pinyin-item",nonChineseClass:"py-non-chinese-item",wrapNonChinese:!1,toneType:"symbol"},R={pattern:"pinyin",toneType:"symbol",type:"string",v:!1,nonZh:"spaced"};const U=n=>n.split("").map((n=>{const h=n.charCodeAt(0),i=l[h]||"";return{origin:n,result:i,isZh:!!i,originPinyin:i}})),V=n=>n.map((n=>n.isZh?n.result.split(" ").map((h=>({origin:n.origin,result:h,isZh:!0,originPinyin:h}))):[n])),X=(n,h)=>"array"===h.type?Array.from(new Set(n.map((n=>n.result)))):"all"===h.type?n.map((n=>{const h=n.isZh?n.result:"",{initial:i,final:g}=C(h),{head:u,body:s,tail:z}=F(h);return{origin:n.origin,pinyin:h,initial:i,final:g,first:n.isZh?A(n.result):"",finalHead:u,finalBody:s,finalTail:z,num:Number($(n.originPinyin)),isZh:n.isZh}})):Array.from(new Set(n.map((n=>n.result)))).join(" ");n.customPinyin=function(n={}){E={},Object.keys(n).sort(((n,h)=>Z(h)-Z(n))).forEach((h=>{E[h]=n[h]}));const h=Object.keys(E).map((n=>({zh:n,pinyin:E[n],priority:999+Z(n),length:n.length})));e.rebuildTrie([...h,...r]),k.rebuildTrie([...h,...p])},n.html=(n,h)=>{const i=Object.assign(Object.assign({},Q),h||{});return G(n,{type:"all",toneType:i.toneType}).map((n=>{if(n.isZh){const h=i.resultClass,g=i.chineseClass,u=i.pinyinClass;return`${n.origin}(${n.pinyin})`}if(i.wrapNonChinese){return`${n.origin}`}return n.origin})).join("")},n.match=(n,h,i)=>{"any"===(null==i?void 0:i.precision)&&(i.lastPrecision="any");const g=Object.assign(Object.assign({},I),i||{});"ignore"===g.space&&(h=h.replace(/\s/g,""));return"any"===(null==i?void 0:i.precision)?K(n,h,g):L(n,h,g)},n.pinyin=G,n.polyphonic=function(n,h=R){if(!D(n))return[];if(""===n)return[];"all"===h.type&&(h.pattern="pinyin"),"num"===h.pattern&&(h.toneType="none");let i=U(n);i=M(i),i=N(i,h);let g=V(i);return g.forEach((n=>{H(n,h)})),g.forEach((n=>{W(n,h)})),g.forEach((n=>{_(n,h)})),g.map((n=>X(n,h)))},Object.defineProperty(n,"__esModule",{value:!0})})); diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/dist/index.mjs b/npm-packages/mac-v3.4.+/pinyin-pro/dist/index.mjs new file mode 100644 index 0000000..3ba2a38 --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/dist/index.mjs @@ -0,0 +1,12631 @@ +const InitialList = [ + 'zh', + 'ch', + 'sh', + 'z', + 'c', + 's', + 'b', + 'p', + 'm', + 'f', + 'd', + 't', + 'n', + 'l', + 'g', + 'k', + 'h', + 'j', + 'q', + 'x', + 'r', + 'y', + 'w', + '', +]; +const SpecialInitialList = ['j', 'q', 'x']; +const SpecialFinalList = [ + 'uān', + 'uán', + 'uǎn', + 'uàn', + 'uan', + 'uē', + 'ué', + 'uě', + 'uè', + 'ue', + 'ūn', + 'ún', + 'ǔn', + 'ùn', + 'un', + 'ū', + 'ú', + 'ǔ', + 'ù', + 'u', +]; +const SpecialFinalMap = { + uān: 'üān', + uán: 'üán', + uǎn: 'üǎn', + uàn: 'üàn', + uan: 'üan', + uē: 'üē', + ué: 'üé', + uě: 'üě', + uè: 'üè', + ue: 'üe', + ūn: 'ǖn', + ún: 'ǘn', + ǔn: 'ǚn', + ùn: 'ǜn', + un: 'ün', + ū: 'ǖ', + ú: 'ǘ', + ǔ: 'ǚ', + ù: 'ǜ', + u: 'ü', +}; +const doubleFinalList = [ + 'ia', + 'ian', + 'iang', + 'iao', + 'ie', + 'iu', + 'iong', + 'ua', + 'uai', + 'uan', + 'uang', + 'ue', + 'ui', + 'uo', + 'üan', + 'üe', + 'van', + 've', +]; + +const Surnames = { + 南宫: 'nán gōng', + 第五: 'dì wǔ', + 万俟: 'mò qí', + 司马: 'sī mǎ', + 上官: 'shàng guān', + 欧阳: 'ōu yáng', + 夏侯: 'xià hóu', + 诸葛: 'zhū gě', + 闻人: 'wén rén', + 东方: 'dōng fāng', + 赫连: 'hè lián', + 皇甫: 'huáng fǔ', + 尉迟: 'yù chí', + 公羊: 'gōng yáng', + 澹台: 'tán tái', + 公冶: 'gōng yě', + 宗政: 'zōng zhèng', + 濮阳: 'pú yáng', + 淳于: 'chún yú', + 单于: 'chán yú', + 太叔: 'tài shū', + 申屠: 'shēn tú', + 公孙: 'gōng sūn', + 仲孙: 'zhòng sūn', + 轩辕: 'xuān yuán', + 令狐: 'líng hú', + 钟离: 'zhōng lí', + 宇文: 'yǔ wén', + 长孙: 'zhǎng sūn', + 慕容: 'mù róng', + 鲜于: 'xiān yú', + 闾丘: 'lǘ qiū', + 司徒: 'sī tú', + 司空: 'sī kōng', + 亓官: 'qí guān', + 司寇: 'sī kòu', + 仉督: 'zhǎng dū', + 子车: 'zǐ jū', + 颛孙: 'zhuān sūn', + 端木: 'duān mù', + 巫马: 'wū mǎ', + 公西: 'gōng xī', + 漆雕: 'qī diāo', + 乐正: 'yuè zhèng', + 壤驷: 'rǎng sì', + 公良: 'gōng liáng', + 拓跋: 'tuò bá', + 夹谷: 'jiá gǔ', + 宰父: 'zǎi fǔ', + 榖梁: 'gǔ liáng', + 段干: 'duàn gān', + 百里: 'bǎi lǐ', + 东郭: 'dōng guō', + 南门: 'nán mén', + 呼延: 'hū yán', + 羊舌: 'yáng shé', + 梁丘: 'liáng qiū', + 左丘: 'zuǒ qiū', + 东门: 'dōng mén', + 西门: 'xī mén', + 赵: 'zhào', + 钱: 'qián', + 孙: 'sūn', + 李: 'lǐ', + 周: 'zhōu', + 吴: 'wú', + 郑: 'zhèng', + 王: 'wáng', + 冯: 'féng', + 陈: 'chén', + 褚: 'chǔ', + 卫: 'wèi', + 蒋: 'jiǎng', + 沈: 'shěn', + 韩: 'hán', + 杨: 'yáng', + 朱: 'zhū', + 秦: 'qín', + 尤: 'yóu', + 许: 'xǔ', + 何: 'hé', + 吕: 'lǚ', + 施: 'shī', + 张: 'zhāng', + 孔: 'kǒng', + 曹: 'cáo', + 严: 'yán', + 华: 'huà', + 金: 'jīn', + 魏: 'wèi', + 陶: 'táo', + 姜: 'jiāng', + 戚: 'qī', + 谢: 'xiè', + 邹: 'zōu', + 喻: 'yù', + 柏: 'bǎi', + 水: 'shuǐ', + 窦: 'dòu', + 章: 'zhāng', + 云: 'yún', + 苏: 'sū', + 潘: 'pān', + 葛: 'gě', + 奚: 'xī', + 范: 'fàn', + 彭: 'péng', + 郎: 'láng', + 鲁: 'lǔ', + 韦: 'wéi', + 昌: 'chāng', + 马: 'mǎ', + 苗: 'miáo', + 凤: 'fèng', + 花: 'huā', + 方: 'fāng', + 俞: 'yú', + 任: 'rèn', + 袁: 'yuán', + 柳: 'liǔ', + 酆: 'fēng', + 鲍: 'bào', + 史: 'shǐ', + 唐: 'táng', + 费: 'fèi', + 廉: 'lián', + 岑: 'cén', + 薛: 'xuē', + 雷: 'léi', + 贺: 'hè', + 倪: 'ní', + 汤: 'tāng', + 滕: 'téng', + 殷: 'yīn', + 罗: 'luó', + 毕: 'bì', + 郝: 'hǎo', + 邬: 'wū', + 安: 'ān', + 常: 'cháng', + 乐: 'yuè', + 于: 'yú', + 时: 'shí', + 傅: 'fù', + 皮: 'pí', + 卞: 'biàn', + 齐: 'qí', + 康: 'kāng', + 伍: 'wǔ', + 余: 'yú', + 元: 'yuán', + 卜: 'bǔ', + 顾: 'gù', + 孟: 'mèng', + 平: 'píng', + 黄: 'huáng', + 和: 'hé', + 穆: 'mù', + 萧: 'xiāo', + 尹: 'yǐn', + 姚: 'yáo', + 邵: 'shào', + 湛: 'zhàn', + 汪: 'wāng', + 祁: 'qí', + 毛: 'máo', + 禹: 'yǔ', + 狄: 'dí', + 米: 'mǐ', + 贝: 'bèi', + 明: 'míng', + 臧: 'zāng', + 计: 'jì', + 伏: 'fú', + 成: 'chéng', + 戴: 'dài', + 谈: 'tán', + 宋: 'sòng', + 茅: 'máo', + 庞: 'páng', + 熊: 'xióng', + 纪: 'jì', + 舒: 'shū', + 屈: 'qū', + 项: 'xiàng', + 祝: 'zhù', + 董: 'dǒng', + 梁: 'liáng', + 杜: 'dù', + 阮: 'ruǎn', + 蓝: 'lán', + 闵: 'mǐn', + 席: 'xí', + 季: 'jì', + 麻: 'má', + 强: 'qiáng', + 贾: 'jiǎ', + 路: 'lù', + 娄: 'lóu', + 危: 'wēi', + 江: 'jiāng', + 童: 'tóng', + 颜: 'yán', + 郭: 'guō', + 梅: 'méi', + 盛: 'shèng', + 林: 'lín', + 刁: 'diāo', + 钟: 'zhōng', + 徐: 'xú', + 邱: 'qiū', + 骆: 'luò', + 高: 'gāo', + 夏: 'xià', + 蔡: 'cài', + 田: 'tián', + 樊: 'fán', + 胡: 'hú', + 凌: 'líng', + 霍: 'huò', + 虞: 'yú', + 万: 'wàn', + 支: 'zhī', + 柯: 'kē', + 昝: 'zǎn', + 管: 'guǎn', + 卢: 'lú', + 莫: 'mò', + 经: 'jīng', + 房: 'fáng', + 裘: 'qiú', + 缪: 'miào', + 干: 'gān', + 解: 'xiè', + 应: 'yīng', + 宗: 'zōng', + 丁: 'dīng', + 宣: 'xuān', + 贲: 'bēn', + 邓: 'dèng', + 郁: 'yù', + 单: 'shàn', + 杭: 'háng', + 洪: 'hóng', + 包: 'bāo', + 诸: 'zhū', + 左: 'zuǒ', + 石: 'shí', + 崔: 'cuī', + 吉: 'jí', + 钮: 'niǔ', + 龚: 'gōng', + 程: 'chéng', + 嵇: 'jī', + 邢: 'xíng', + 滑: 'huá', + 裴: 'péi', + 陆: 'lù', + 荣: 'róng', + 翁: 'wēng', + 荀: 'xún', + 羊: 'yáng', + 於: 'yū', + 惠: 'huì', + 甄: 'zhēn', + 曲: 'qū', + 家: 'jiā', + 封: 'fēng', + 芮: 'ruì', + 羿: 'yì', + 储: 'chǔ', + 靳: 'jìn', + 汲: 'jí', + 邴: 'bǐng', + 糜: 'mí', + 松: 'sōng', + 井: 'jǐng', + 段: 'duàn', + 富: 'fù', + 巫: 'wū', + 乌: 'wū', + 焦: 'jiāo', + 巴: 'bā', + 弓: 'gōng', + 牧: 'mù', + 隗: 'kuí', + 山: 'shān', + 谷: 'gǔ', + 车: 'chē', + 侯: 'hóu', + 宓: 'mì', + 蓬: 'péng', + 全: 'quán', + 郗: 'xī', + 班: 'bān', + 仰: 'yǎng', + 秋: 'qiū', + 仲: 'zhòng', + 伊: 'yī', + 宫: 'gōng', + 宁: 'nìng', + 仇: 'qiú', + 栾: 'luán', + 暴: 'bào', + 甘: 'gān', + 钭: 'tǒu', + 厉: 'lì', + 戎: 'róng', + 祖: 'zǔ', + 武: 'wǔ', + 符: 'fú', + 刘: 'liú', + 景: 'jǐng', + 詹: 'zhān', + 束: 'shù', + 龙: 'lóng', + 叶: 'yè', + 幸: 'xìng', + 司: 'sī', + 韶: 'sháo', + 郜: 'gào', + 黎: 'lí', + 蓟: 'jì', + 薄: 'bó', + 印: 'yìn', + 宿: 'sù', + 白: 'bái', + 怀: 'huái', + 蒲: 'pú', + 邰: 'tái', + 从: 'cóng', + 鄂: 'è', + 索: 'suǒ', + 咸: 'xián', + 籍: 'jí', + 赖: 'lài', + 卓: 'zhuó', + 蔺: 'lìn', + 屠: 'tú', + 蒙: 'méng', + 池: 'chí', + 乔: 'qiáo', + 阴: 'yīn', + 鬱: 'yù', + 胥: 'xū', + 能: 'nài', + 苍: 'cāng', + 双: 'shuāng', + 闻: 'wén', + 莘: 'shēn', + 党: 'dǎng', + 翟: 'zhái', + 谭: 'tán', + 贡: 'gòng', + 劳: 'láo', + 逄: 'páng', + 姬: 'jī', + 申: 'shēn', + 扶: 'fú', + 堵: 'dǔ', + 冉: 'rǎn', + 宰: 'zǎi', + 郦: 'lì', + 雍: 'yōng', + 郤: 'xì', + 璩: 'qú', + 桑: 'sāng', + 桂: 'guì', + 濮: 'pú', + 牛: 'niú', + 寿: 'shòu', + 通: 'tōng', + 边: 'biān', + 扈: 'hù', + 燕: 'yān', + 冀: 'jì', + 郏: 'jiá', + 浦: 'pǔ', + 尚: 'shàng', + 农: 'nóng', + 温: 'wēn', + 别: 'bié', + 庄: 'zhuāng', + 晏: 'yàn', + 柴: 'chái', + 瞿: 'qú', + 阎: 'yán', + 充: 'chōng', + 慕: 'mù', + 连: 'lián', + 茹: 'rú', + 习: 'xí', + 宦: 'huàn', + 艾: 'ài', + 鱼: 'yú', + 容: 'róng', + 向: 'xiàng', + 古: 'gǔ', + 易: 'yì', + 慎: 'shèn', + 戈: 'gē', + 廖: 'liào', + 庾: 'yǔ', + 终: 'zhōng', + 暨: 'jì', + 居: 'jū', + 衡: 'héng', + 步: 'bù', + 都: 'dū', + 耿: 'gěng', + 满: 'mǎn', + 弘: 'hóng', + 匡: 'kuāng', + 国: 'guó', + 文: 'wén', + 寇: 'kòu', + 广: 'guǎng', + 禄: 'lù', + 阙: 'quē', + 东: 'dōng', + 欧: 'ōu', + 殳: 'shū', + 沃: 'wò', + 利: 'lì', + 蔚: 'wèi', + 越: 'yuè', + 夔: 'kuí', + 隆: 'lóng', + 师: 'shī', + 巩: 'gǒng', + 厍: 'shè', + 聂: 'niè', + 晁: 'cháo', + 勾: 'gōu', + 敖: 'áo', + 融: 'róng', + 冷: 'lěng', + 訾: 'zǐ', + 辛: 'xīn', + 阚: 'kàn', + 那: 'nā', + 简: 'jiǎn', + 饶: 'ráo', + 空: 'kōng', + 曾: 'zēng', + 母: 'mǔ', + 沙: 'shā', + 乜: 'niè', + 养: 'yǎng', + 鞠: 'jū', + 须: 'xū', + 丰: 'fēng', + 巢: 'cháo', + 关: 'guān', + 蒯: 'kuǎi', + 相: 'xiàng', + 查: 'zhā', + 后: 'hòu', + 荆: 'jīng', + 红: 'hóng', + 游: 'yóu', + 竺: 'zhú', + 权: 'quán', + 逯: 'lù', + 盖: 'gài', + 益: 'yì', + 桓: 'huán', + 公: 'gōng', + 牟: 'móu', + 哈: 'hǎ', + 言: 'yán', + 福: 'fú', +}; +const PatternSurname = Object.keys(Surnames).map((key) => ({ + zh: key, + pinyin: Surnames[key], + priority: 99 + key.length, + length: key.length, +})); + +const map = { + líng: [ + 12295, 20278, 20940, 21026, 22265, 22397, 22796, 22984, 23112, 23361, 23738, + 24446, 25493, 26148, 26382, 26563, 26818, 27386, 27422, 27872, 28137, 28586, + 28789, 29167, 29223, 29393, 29618, 29708, 29940, 30346, 30769, 31102, 31202, + 31451, 31533, 32055, 32190, 32491, 32656, 32666, 32718, 32838, 33330, 33491, + 33777, 34020, 34054, 34166, 34505, 34897, 35052, 35397, 36297, 36584, 36632, + 37187, 37309, 37428, 37634, 38083, 38301, 38517, 38646, 38666, 38679, 38683, + 38685, 38728, 39382, 39807, 39914, 40110, 40210, 40496, 40567, 40610, 40801, + 40802, 40836, 40855, + ], + yī: [ + 19968, 20042, 20234, 20381, 21307, 21530, 21695, 22123, 22769, 22777, 22785, + 23259, 23300, 24332, 25558, 25742, 27321, 27593, 27938, 28175, 28458, 29823, + 30057, 31054, 31125, 31270, 32324, 34524, 34916, 35689, 36791, 37116, 37291, + 37541, 38129, 40406, 40549, 40671, 40691, + ], + 'dīng zhēng': [19969], + 'kǎo qiǎo yú': [19970], + qī: [ + 19971, 20507, 20699, 20932, 22017, 22660, 23096, 24765, 24956, 24957, 25114, + 25471, 26578, 26724, 26748, 26866, 27071, 27450, 27791, 28114, 28422, 32042, + 32192, 33803, 35076, 35526, 36809, 37098, 37850, 38667, 39756, 40328, + ], + shàng: [19972, 23577, 23578, 24678, 32212, 32497], + xià: [ + 19973, 19979, 20068, 22327, 22799, 22803, 25047, 26810, 30108, 30577, 32581, + 37820, 37868, + ], + hǎn: [19974, 21898, 28011, 32597, 35907], + 'wàn mò': [19975], + zhàng: [ + 19976, 20183, 22663, 23938, 24080, 24115, 24155, 25177, 26454, 28081, 30190, + 30252, 30260, 30613, 31872, 32960, 33081, 36076, 36134, 38556, + ], + sān: [19977, 21377, 21441, 24334, 27637, 27638, 27647, 29337, 39702], + 'shàng shǎng shang': [19978], + 'qí jī': [19980, 20854, 22855], + 'bù fǒu': [19981], + 'yǔ yù yú': [19982], + miǎn: [ + 19983, 20589, 20813, 20885, 21193, 21204, 21909, 23081, 24848, 27717, 27796, + 28238, 30540, 32236, 32517, 33148, 33858, 38758, 39864, + ], + gài: [ + 19984, 20066, 21251, 21252, 25124, 27010, 27113, 27114, 28297, 28433, 29890, + 33890, 37411, 38041, + ], + chǒu: [19985, 19986, 20404, 21532, 26493, 30597, 30657, 37276, 39767], + zhuān: [ + 19987, 21440, 23269, 23554, 23560, 29820, 29966, 30742, 30935, 30938, 34788, + 35567, 37151, 38995, 39067, 40004, + ], + 'qiě jū': [19988], + pī: [ + 19989, 20243, 20286, 22140, 22383, 23727, 25013, 25209, 25259, 28811, 29385, + 29395, 30738, 30919, 30996, 30997, 31195, 31200, 32794, 35966, 37043, 37402, + 37471, 37524, 37635, 37645, 38713, 39379, 39660, 39806, + ], + shì: [ + 19990, 19991, 20106, 20107, 20181, 20365, 20895, 21183, 21218, 21323, 21609, + 21980, 22124, 22763, 22893, 23317, 23460, 24066, 24335, 24337, 24338, 24640, + 24643, 25146, 25325, 25555, 26159, 26160, 26558, 26623, 26683, 28584, 28882, + 29046, 30466, 30478, 30497, 30551, 31034, 31035, 31598, 31789, 33296, 33299, + 35179, 35222, 35270, 35298, 35430, 35475, 35553, 35610, 35797, 35877, 36016, + 36147, 36606, 36732, 36893, 36990, 37320, 37322, 37323, 37424, 37443, 37501, + 38088, 39166, 39193, 39197, 39280, 39960, + ], + qiū: [ + 19992, 20000, 22389, 23197, 24664, 24695, 27000, 31179, 31180, 31312, 31693, + 32231, 33833, 34322, 34479, 34677, 34775, 34852, 36261, 37041, 38822, 38823, + 39948, 39949, 40133, 40342, 40537, 40861, + ], + bǐng: [ + 19993, 23643, 24626, 25254, 26142, 26170, 26564, 26821, 28851, 31104, 31177, + 31263, 33514, 34499, 37044, 37429, 38467, 38790, 39173, 39200, 39292, + ], + yè: [ + 19994, 20145, 20727, 22711, 22812, 23978, 23979, 25268, 25433, 25819, 25834, + 25835, 26196, 26308, 26309, 26327, 26355, 26357, 26556, 26557, 26989, 27906, + 28082, 28594, 28904, 29121, 29207, 29837, 30371, 30641, 30648, 30991, 33099, + 33865, 35585, 35858, 37050, 37172, 37745, 37943, 38757, 38760, 38913, 39029, + 39203, 39233, 39308, 39516, 40314, 40456, + ], + cóng: [ + 19995, 20174, 21474, 23107, 23406, 24467, 24468, 24470, 24752, 27191, 27401, + 28121, 28743, 29212, 29742, 34242, 35508, 36072, 36073, 37661, + ], + dōng: [ + 19996, 20530, 20908, 21658, 22508, 23741, 23852, 24474, 26168, 26481, 27681, + 27693, 28087, 31511, 33523, 33732, 34624, 39831, 39903, 40327, 40363, 40491, + 40725, + ], + sī: [ + 19997, 20460, 20952, 21422, 21496, 21661, 22070, 22109, 23204, 24285, 24662, + 25749, 26031, 26962, 27840, 28556, 29133, 31127, 31136, 31169, 31993, 32114, + 32230, 32415, 32524, 32627, 34156, 34386, 34547, 34596, 34692, 34774, 34804, + 37488, 37551, 37750, 37889, 38198, 39096, 39124, 39462, 40421, 40502, 40758, + ], + chéng: [ + 19998, 21576, 22478, 22485, 22552, 22605, 22614, 23468, 23800, 24809, 25074, + 25104, 25215, 25392, 25473, 25576, 26536, 26838, 27225, 27289, 27910, 28311, + 28546, 29685, 29689, 30075, 31243, 31386, 31596, 32126, 33069, 33663, 35488, + 35802, 37077, 37234, 37614, 38102, 39468, 39886, + ], + diū: [19999, 20002, 37545, 38117], + liǎng: [ + 20001, 20004, 20841, 21793, 21858, 25498, 32201, 33084, 34621, 35058, 39753, + 39758, + ], + yǒu: [ + 20003, 21347, 21451, 26756, 28277, 29270, 31113, 32657, 32840, 33475, 33696, + 34575, 37193, 37546, 38101, 40669, + ], + yán: [ + 20005, 21427, 21873, 21926, 22196, 22633, 22747, 22759, 22925, 23032, 23083, + 23086, 23721, 23890, 23891, 24012, 24022, 24023, 24310, 25541, 26134, 26956, + 27280, 27369, 27413, 27839, 28814, 28815, 29439, 29698, 30416, 30878, 31605, + 31799, 33690, 34053, 34404, 34578, 35328, 35329, 35374, 35453, 35744, 37076, + 38278, 38331, 38379, 38414, 38991, 38996, 39068, 40573, 40611, + ], + bìng: [ + 20006, 20341, 20482, 20641, 22442, 25682, 26660, 30149, 31369, 31453, 35457, + 38736, 39849, + ], + 'sàng sāng': [20007], + gǔn: [ + 20008, 24771, 28378, 28414, 30937, 32196, 32498, 34008, 34057, 34926, 34974, + 36645, 36746, 39820, 39872, 40103, + ], + jiū: [ + 20009, 21244, 21886, 25578, 25579, 26427, 31350, 31998, 32416, 33819, 36211, + 38404, 39695, 39726, 40169, 40480, + ], + 'gè gě': [20010, 20491, 21508], + yā: [ + 20011, 22311, 23410, 24216, 25276, 26514, 26720, 26895, 37647, 37914, 40201, + 40232, 40310, 40486, 40493, + ], + pán: [ + 20012, 23227, 24139, 27075, 27904, 28682, 29247, 30424, 30436, 30928, 32271, + 33968, 34784, 36434, 36451, 37788, 38838, + ], + 'zhōng zhòng': [20013], + jǐ: [ + 20014, 22912, 24049, 25119, 25380, 25486, 25760, 25824, 27254, 27890, 29361, + 33034, 34414, 34787, 39778, 40062, 40578, + ], + jiè: [ + 20015, 20171, 20511, 21814, 22586, 23622, 23626, 23701, 24206, 24483, 25106, + 26960, 29335, 29600, 29758, 30028, 30029, 30117, 30734, 34471, 34550, 34936, + 35119, 35489, 35819, 37765, 39601, 39786, + ], + fēng: [ + 20016, 20217, 20561, 20732, 20968, 20972, 20974, 22950, 23543, 23553, 23791, + 23792, 23862, 26539, 26963, 27282, 27811, 27816, 28194, 28739, 28925, 29326, + 29478, 29714, 30127, 30219, 30461, 30748, 30904, 31688, 34356, 34562, 34861, + 35920, 37175, 37190, 37586, 37821, 37856, 38155, 38715, 38730, 39116, 40631, + ], + 'guàn kuàng': [20017], + chuàn: [20018, 27724, 29588, 36055, 37351, 38031], + chǎn: [ + 20019, 20135, 20865, 21111, 22213, 23932, 26101, 27984, 28411, 28763, 29986, + 29987, 31749, 33927, 34118, 35522, 35650, 35719, 35844, 37855, 38130, 38323, + 38369, 38416, 39587, + ], + lín: [ + 20020, 20903, 22755, 23818, 23961, 26036, 26237, 26301, 26519, 28542, 28726, + 29136, 29747, 29848, 30645, 30852, 30967, 31910, 31932, 32343, 32759, 33256, + 36692, 36762, 36980, 37051, 37168, 37883, 38462, 38563, 38678, 39502, 40023, + 40158, 40592, 40607, + ], + zhuó: [ + 20021, 21125, 21331, 21828, 22324, 22960, 23098, 25775, 25798, 25826, 26027, + 26030, 26033, 26034, 26037, 26219, 26899, 27978, 27998, 28609, 28796, 28917, + 29752, 30842, 31130, 31393, 31831, 31857, 32620, 33537, 34839, 34879, 35521, + 35537, 35638, 35836, 37196, 37938, 38255, 40299, 40415, + ], + zhǔ: [ + 20022, 20027, 21167, 22065, 22225, 23444, 24126, 25284, 28186, 28624, 29009, + 29038, 29149, 30633, 30682, 32604, 35421, 38524, 40448, 40584, + ], + bā: [ + 20023, 20168, 20843, 21485, 21749, 22847, 23708, 24052, 25420, 26419, 29584, + 30116, 31494, 31889, 32659, 33453, 34438, 35933, 37343, + ], + wán: [ + 20024, 21011, 23436, 23695, 25231, 25430, 27725, 28919, 29609, 29715, 31490, + 32008, 32424, 32747, 33412, 36006, 38929, 39037, + ], + dān: [ + 20025, 21231, 21296, 21336, 22921, 23173, 27546, 27563, 29972, 30472, 30723, + 31658, 31774, 32828, 32829, 32835, 32888, 35101, 35148, 36525, 37112, 37170, + 37206, 38933, + ], + 'wèi wéi': [20026], + 'jǐng dǎn': [20028], + 'lì lí': [20029], + jǔ: [ + 20030, 24326, 25369, 25831, 26887, 27017, 27032, 27384, 27397, 30697, 31589, + 32869, 33289, 33682, 33951, 35191, 36413, 40799, 40835, + ], + piě: [20031, 33508, 37893], + fú: [ + 20032, 20239, 20440, 20971, 21020, 21264, 21640, 21753, 22424, 23386, 23722, + 24063, 24087, 24133, 24158, 24343, 24447, 24619, 25206, 26603, 26687, 26740, + 27679, 27885, 28014, 28074, 28563, 28837, 29624, 30006, 30025, 30273, 31059, + 31119, 31274, 31526, 31641, 32049, 32060, 32101, 32141, 32450, 32459, 32600, + 32614, 32711, 33344, 33433, 33443, 33531, 33536, 33583, 33748, 33869, 34393, + 34472, 34569, 34656, 34970, 34993, 35142, 35173, 35560, 35943, 36414, 36667, + 36752, 37083, 37464, 37468, 38861, 38888, 39083, 39668, 39812, 39858, 40167, + 40172, 40212, 40297, 40699, + ], + 'yí jí': [20033], + yì: [ + 20034, 20041, 20100, 20134, 20159, 20231, 20287, 20350, 20427, 20740, 20863, + 21000, 21139, 21166, 21210, 21225, 21255, 21587, 21613, 21625, 21768, 22216, + 22299, 22340, 22460, 22520, 22869, 23253, 23313, 23537, 23673, 23748, 23975, + 24095, 24096, 24134, 24281, 24322, 24328, 24331, 24441, 24518, 24584, 24639, + 24722, 24847, 25014, 25036, 25087, 25233, 25401, 25953, 26131, 26233, 26304, + 26318, 26457, 26509, 26861, 27023, 27128, 27277, 27485, 27540, 27562, 27577, + 27589, 27970, 28005, 28019, 28249, 28322, 28521, 28602, 28727, 28808, 28978, + 29088, 29092, 29116, 29146, 29153, 29169, 29512, 29620, 30064, 30123, 30188, + 30231, 30238, 30257, 30292, 30410, 30614, 31315, 31465, 31698, 32266, 32374, + 32377, 32462, 32546, 32681, 32703, 32714, 32716, 32755, 32764, 32820, 32900, + 32906, 33161, 33222, 33367, 33402, 33413, 33477, 33823, 34042, 34191, 34265, + 34269, 34329, 34377, 34612, 34720, 34922, 34979, 35028, 35035, 35129, 35196, + 35378, 35379, 35405, 35427, 35516, 35695, 35696, 35739, 35758, 35793, 35811, + 35850, 35929, 35931, 35959, 35990, 36096, 36295, 36726, 36920, 37009, 37139, + 37303, 37364, 37408, 37808, 37951, 38226, 38257, 38435, 38591, 38700, 39248, + 39365, 39515, 39551, 39598, 39848, 40322, 40323, 40333, 40385, 40394, 40423, + 40446, 40451, 40541, 40546, 40659, 40824, + ], + nǎi: [20035, 20535, 22902, 23341, 24316, 27670, 30099, 33407, 36858, 37346], + wǔ: [ + 20036, 20116, 20213, 20237, 20398, 20533, 20763, 21320, 21838, 22953, 23084, + 23285, 24209, 24289, 24548, 24579, 25006, 25664, 27494, 28501, 29075, 29310, + 29597, 29687, 29798, 29970, 30868, 33310, 36492, 36821, 36892, 38490, 40289, + 40521, + ], + jiǔ: [ + 20037, 20038, 20061, 20067, 22906, 26470, 27747, 28792, 29590, 32036, 33295, + 37202, 38265, 38893, 38894, + ], + 'tuō zhé': [20039, 26452, 39346], + 'me mó ma yāo': [20040], + zhī: [ + 20043, 20481, 21358, 24053, 25624, 25903, 26624, 26772, 26917, 27056, 27713, + 27868, 30135, 31063, 31084, 31187, 31257, 32149, 32930, 32977, 32989, 33026, + 33437, 34357, 34584, 34940, 38587, 40183, 40242, 40709, + ], + 'wū wù': [20044], + zhà: [ + 20045, 21668, 23473, 25662, 27048, 28320, 30148, 34481, 35408, 35784, 37281, + 38661, + ], + hū: [ + 20046, 20079, 21282, 21291, 21628, 21823, 22033, 22400, 23523, 24160, 24573, + 24794, 26130, 27473, 27864, 28148, 28409, 28864, 33528, 34381, 34390, 35644, + 36580, 36727, 38608, + ], + fá: [ + 20047, 20240, 20640, 22394, 22433, 22690, 22978, 26672, 27980, 30594, 31529, + 31567, 32602, 32624, 32632, 34245, 38309, 38400, + ], + 'lè yuè yào lào': [20048, 27138], + yín: [ + 20049, 21535, 22102, 22170, 22273, 22432, 22820, 23148, 23493, 23806, 23839, + 23855, 27309, 27557, 27903, 28139, 28379, 28878, 29374, 29434, 29836, 30797, + 30866, 33654, 34089, 35348, 35354, 35361, 35518, 37150, 37405, 37504, 38134, + 38698, 40419, 40806, + ], + pīng: [20050, 20444, 23049, 28036, 30009, 30767, 32864, 33397, 38953], + pāng: [20051, 28354, 33006, 33174, 38641, 38710], + qiáo: [ + 20052, 20392, 20689, 23286, 24980, 26725, 27095, 27189, 27211, 27381, 29342, + 30631, 30810, 30980, 33613, 33630, 34126, 34286, 35673, 36267, 37896, 38802, + 38845, 39014, + ], + hǔ: [20053, 29733, 33792, 34382, 34397, 37695, 39921], + guāi: [20054], + 'chéng shèng': [20055, 20056, 23053], + yǐ: [ + 20057, 20059, 20197, 20506, 20591, 23327, 23866, 24050, 24225, 25158, 25914, + 25980, 26065, 26070, 27301, 30691, 30994, 31510, 33315, 33380, 33505, 33506, + 34433, 34712, 34811, 35071, 36390, 36642, 36697, 36888, 37199, 37332, 37400, + 37487, 38023, 38999, 40166, 40814, + ], + 'háo yǐ': [20058], + 'niè miē': [20060], + qǐ: [ + 20062, 20225, 21551, 21784, 21843, 21844, 21855, 23117, 23674, 26462, 26856, + 29592, 30400, 32186, 32494, 33425, 35564, 36215, 37012, 38361, + ], + yě: [20063, 20918, 22050, 22492, 22724, 28444, 37326], + xí: [ + 20064, 21946, 23219, 23949, 24109, 26938, 27268, 28445, 32722, 33990, 34989, + 35186, 35233, 35275, 35637, 36248, 37067, 37812, 38576, 38699, 39105, 39473, + 39485, 39528, 39996, 40155, + ], + xiāng: [ + 20065, 21410, 24258, 24512, 27007, 27392, 28248, 29910, 31269, 31665, 32215, + 32515, 33207, 33431, 33835, 33881, 34188, 35140, 37111, 37129, 37130, 37141, + 38002, 38262, 39321, 39524, 39591, 40028, 40600, + ], + shū: [ + 20070, 20495, 20496, 20789, 21460, 23005, 23575, 25234, 25491, 25669, 25860, + 26360, 26530, 26803, 27166, 27530, 27571, 27641, 27642, 28113, 28717, 28930, + 30094, 30095, 32019, 32128, 32446, 33298, 33789, 34092, 36360, 36567, 36664, + 36755, 37123, 38478, 39835, 40296, + ], + dǒu: [20071, 25238, 26515, 34474, 37380, 38439, 38497], + shǐ: [ + 20072, 20351, 20824, 21490, 22987, 23465, 23630, 27009, 30690, 31542, 35925, + 37442, 39387, 39542, + ], + jī: [ + 20073, 20703, 20987, 21001, 21007, 21086, 21501, 21799, 21918, 21976, 22064, + 22334, 22522, 22716, 23020, 23632, 23878, 23879, 25731, 25802, 26398, 26426, + 26501, 27181, 27231, 27588, 28608, 29316, 29585, 29859, 30072, 30079, 30314, + 30710, 30959, 31215, 31309, 31492, 31571, 31637, 31754, 32193, 32641, 32647, + 32648, 32813, 32908, 33448, 34368, 35209, 35210, 35663, 35684, 35749, 36075, + 36087, 36173, 36347, 36369, 36491, 36536, 37512, 37668, 37910, 37959, 37977, + 38574, 38622, 38847, 38898, 39138, 39249, 39269, 39765, 40174, 40335, 40378, + 40388, 40452, 40481, 40782, 40783, 40785, + ], + náng: [20074, 22178, 27420, 34864, 39266], + jiā: [ + 20075, 20339, 20642, 21152, 22025, 25272, 26551, 26780, 27616, 27847, 27971, + 28025, 29324, 29491, 29640, 30146, 31539, 31960, 32798, 33141, 33901, 34952, + 35949, 35985, 36303, 36838, 37483, 37813, 38227, 40208, 40602, + ], + jù: [ + 20076, 20520, 20534, 20855, 21095, 21127, 21230, 22503, 22526, 22729, 22998, + 23654, 23656, 23712, 24040, 24042, 24583, 24807, 24883, 25029, 25084, 25298, + 25312, 26139, 27499, 27952, 28605, 28844, 28901, 29323, 31212, 31405, 31414, + 31796, 31892, 32799, 32858, 34401, 34487, 35406, 35765, 35942, 36317, 36382, + 36486, 36989, 37037, 37301, 37445, 37947, 38044, 39094, 39123, 39375, 39828, + ], + shí: [ + 20077, 21313, 22488, 22610, 23036, 23454, 23455, 23508, 23526, 23765, 23925, + 26102, 26105, 26178, 27055, 28252, 28321, 28859, 31055, 31437, 34432, 34645, + 36795, 36936, 37456, 39136, 39267, 39830, 39971, 40101, 40747, 40749, + ], + mǎo: [ + 20078, 20871, 21359, 23745, 25148, 26164, 27862, 31543, 34025, 37466, 38086, + ], + mǎi: [20080, 22058, 33644, 34130, 36023, 40438], + luàn: [20081, 20098, 37344], + rǔ: [20083, 25833, 27741, 32919, 36785, 37135], + xué: [ + 20084, 23398, 23416, 23747, 23976, 25992, 27894, 28585, 29154, 31348, 33555, + 34965, 36357, 40445, 40500, + ], + yǎn: [ + 20085, 20456, 20547, 20796, 20822, 20823, 21411, 21428, 22110, 23373, 23875, + 24024, 24026, 24327, 24861, 25133, 25162, 25217, 25513, 25564, 26350, 26940, + 27327, 27783, 28215, 28436, 29744, 29975, 30524, 32616, 33810, 34648, 34893, + 35095, 36541, 36931, 37118, 38546, 39017, 39751, 39768, 39947, 40352, 40673, + 40676, 40684, 40685, 40694, 40756, 40761, 40820, 40849, + ], + fǔ: [ + 20086, 20428, 20443, 20463, 24220, 24355, 25242, 25290, 25771, 26023, 26920, + 28367, 28964, 29995, 30425, 31776, 33104, 33105, 34565, 36628, 36741, 37081, + 37340, 37345, 38429, 38955, 39732, 40700, + ], + shā: [ + 20087, 21798, 26432, 26732, 27578, 27630, 29440, 30183, 30722, 30832, 32023, + 32378, 32433, 34097, 35039, 37801, 38121, 38327, 39679, 39782, 39882, 39883, + 40104, + ], + nǎ: [20088, 38635], + qián: [ + 20089, 20097, 20209, 20546, 21069, 22680, 23178, 23698, 25297, 25518, 27049, + 27244, 27500, 28507, 28508, 28659, 28746, 31645, 33893, 34388, 36577, 37392, + 37463, 37549, 37666, 37766, 38052, 38065, 38067, 38764, 39450, 39453, 39980, + 40660, 40666, + ], + suǒ: [ + 20090, 21794, 21993, 25152, 26267, 28305, 28345, 29712, 29713, 29795, 32034, + 35112, 37782, 37819, 37825, 38145, + ], + yú: [ + 20091, 20110, 20112, 20227, 20313, 22563, 22572, 22948, 23067, 23087, 23089, + 23337, 23859, 23886, 23899, 24858, 25205, 25540, 26079, 26977, 26992, 27014, + 27428, 27464, 27487, 27510, 28180, 28189, 28257, 28417, 28574, 29263, 29427, + 29591, 29593, 29788, 29877, 30402, 30574, 31404, 31485, 31813, 32685, 33140, + 33278, 33281, 33286, 33349, 33584, 33838, 33848, 34125, 34331, 34398, 34422, + 34643, 34744, 34919, 35093, 35238, 35278, 35547, 35619, 35840, 36400, 36671, + 36701, 36926, 37016, 37201, 37725, 38533, 38611, 38633, 39192, 39296, 39455, + 39596, 39619, 39770, 39779, 39869, 39922, 39941, 40060, 40416, 40454, 40821, + ], + zhù: [ + 20092, 20267, 20295, 20303, 22398, 22712, 22772, 23872, 25280, 26492, 26609, + 27174, 27574, 27880, 28855, 30128, 30493, 31069, 31081, 31450, 31599, 31672, + 31723, 31767, 32053, 32056, 32443, 32668, 32741, 33486, 33671, 34496, 35387, + 36015, 36142, 36307, 36596, 37458, 37619, 37956, 38136, 39349, 39376, 39547, + ], + zhě: [20093, 32773, 35126, 35189, 36205, 36407, 37754, 38167], + 'qián gān': [20094], + 'zhì luàn': [20095], + guī: [ + 20096, 22317, 22955, 23215, 23266, 23296, 24112, 24402, 25707, 26909, 27131, + 27132, 27383, 27512, 29674, 29808, 29853, 29900, 30344, 30625, 30789, 33573, + 34348, 35215, 35268, 37053, 37068, 38312, 38394, 39465, 39734, 39737, + ], + 'lǐn lìn': [20099], + jué: [ + 20101, 20915, 21012, 21122, 21303, 21413, 22090, 23378, 23379, 23835, 23851, + 23973, 24399, 24992, 25008, 25092, 25225, 25367, 25496, 25899, 26743, 27227, + 27228, 27438, 27666, 27770, 28749, 28979, 29094, 29201, 29236, 29237, 29527, + 29571, 29606, 29608, 29647, 29812, 30234, 30669, 30689, 30724, 32085, 32118, + 32477, 33220, 33461, 34141, 34152, 34419, 34792, 34793, 35286, 35310, 35324, + 35363, 35662, 35776, 35890, 35996, 36221, 36233, 36471, 36521, 37388, 37901, + 37917, 38017, 38242, 40194, 40195, 40418, + ], + 'le liǎo': [20102], + 'gè mā': [20103], + 'yǔ yú': [20104, 25049], + zhēng: [ + 20105, 20290, 20967, 22979, 23196, 23781, 23837, 23842, 24449, 24496, 28833, + 28893, 29229, 29424, 29465, 30309, 30480, 30529, 30556, 31581, 31631, 31708, + 32839, 33024, 33976, 36397, 37478, 37658, 37875, 39687, + ], + èr: [ + 20108, 21045, 21665, 24333, 24336, 27186, 35456, 36014, 36019, 36144, 39670, + ], + chù: [ + 20109, 20631, 20746, 24629, 25015, 25616, 26038, 27484, 29695, 29729, 30679, + 31436, 32064, 32460, 33221, 35302, 35320, 35926, 37136, 38310, 40668, + ], + kuī: [ + 20111, 21042, 23743, 24011, 30420, 31397, 31418, 32871, 34407, 38362, 39005, + ], + yún: [ + 20113, 20253, 21243, 21248, 22249, 22936, 24874, 25251, 26112, 27218, 27780, + 28066, 28339, 28560, 29065, 30023, 31184, 31612, 31700, 32028, 32284, 32429, + 32792, 33464, 33975, 34131, 37095, 37142, 37574, 38642, + ], + hù: [ + 20114, 20913, 21952, 22171, 23135, 23277, 23278, 23733, 24077, 24342, 24601, + 25142, 25143, 25144, 25149, 25160, 25252, 26120, 27124, 27789, 27818, 28396, + 29097, 29920, 31068, 31503, 31748, 31888, 32148, 34096, 35703, 35952, 37152, + 37721, 38912, 40047, 40160, 40184, 40460, 40561, + ], + qí: [ + 20115, 21080, 22524, 23696, 23699, 23822, 23900, 24877, 25489, 25993, 25994, + 26050, 26071, 26826, 26827, 27313, 27328, 27495, 28103, 28637, 29449, 29570, + 29734, 29738, 29826, 30054, 30119, 30849, 30869, 31041, 31048, 31098, 31141, + 31442, 31791, 31793, 31823, 31928, 32165, 32166, 32949, 33040, 33229, 33385, + 33450, 33793, 33813, 34162, 34244, 34308, 34449, 34458, 34548, 34589, 34590, + 34727, 34832, 35072, 36573, 37183, 37358, 37665, 38172, 38509, 38926, 39040, + 39438, 39439, 39481, 39568, 39569, 39696, 39743, 39893, 39981, 40111, 40141, + 40312, 40320, 40594, 40609, + ], + jǐng: [ + 20117, 20742, 21037, 21060, 22355, 23441, 24156, 25004, 26299, 27532, 27755, + 27756, 28555, 29828, 29855, 29861, 31357, 32956, 34812, 35686, 38449, 38938, + 38968, + ], + sì: [ + 20118, 20288, 20385, 20777, 20821, 21987, 22235, 22994, 23088, 23392, 23546, + 24051, 26614, 27065, 27740, 27863, 27876, 27917, 27936, 28056, 28675, 29293, + 31040, 31145, 31458, 31525, 32796, 32898, 32902, 34172, 35223, 35972, 37362, + 37430, 37435, 39140, 39164, 39282, 39391, 39427, 39543, + ], + suì: [ + 20119, 23320, 23681, 23895, 26078, 27286, 27506, 27507, 28603, 29035, 29159, + 29874, 30741, 30862, 31071, 31149, 31298, 31319, 31327, 32320, 32336, 32376, + 35162, 35510, 35682, 35847, 36069, 36995, 37894, 37929, 38567, 38882, + ], + gèn: [20120, 20121, 25583, 25604, 33563], + yà: [ + 20122, 20124, 20473, 20916, 21148, 22292, 22304, 22497, 23045, 23149, 25568, + 27689, 27692, 29373, 30737, 31247, 32848, 35198, 35200, 35357, 35766, 36711, + 36819, 40830, + ], + 'xiē suò': [20123], + 'qí zhāi': [20125, 40778], + 'yā yà': [20126, 21387, 22445, 22739, 38100], + 'jí qì': [20127, 28943], + tóu: [20128, 25237, 38957, 39600], + 'wáng wú': [20129], + 'kàng háng gāng': [20130], + dà: [20131, 30484], + jiāo: [ + 20132, 20716, 23047, 23308, 23783, 23957, 23971, 24973, 26898, 27975, 28550, + 28966, 30977, 31322, 31781, 33014, 33184, 33202, 33581, 33582, 34121, 34400, + 34527, 34797, 36324, 36679, 37066, 37902, 39509, 39556, 39851, 40091, 40257, + 40422, 40430, 40554, + ], + hài: [20133, 21968, 23475, 27686, 39168, 39258, 39405, 39412, 39559], + 'hēng pēng': [20136], + mǔ: [ + 20137, 22982, 23764, 25287, 27597, 29281, 29299, 30018, 30022, 30034, 30045, + 30046, 30062, 30762, 32991, 36359, 37479, + ], + ye: [20138], + xiǎng: [ + 20139, 20143, 21709, 24819, 26193, 34435, 34817, 38911, 39144, 39177, 39255, + 39287, 39837, 39895, 40054, 40094, + ], + jīng: [ + 20140, 20144, 20834, 22357, 22361, 23131, 24778, 26060, 26061, 26230, 27256, + 27902, 28039, 29444, 30555, 31188, 31241, 31923, 31934, 32076, 32147, 32161, + 32857, 33096, 33550, 33606, 33610, 33729, 33871, 39514, 39912, 40120, 40321, + 40324, 40598, 40608, 40753, + ], + tíng: [ + 20141, 20572, 23159, 23881, 24237, 24311, 26975, 27059, 31603, 32868, 33691, + 33910, 34579, 34639, 35562, 37010, 38662, 40750, + ], + liàng: [ + 20142, 21928, 24738, 26238, 28280, 35538, 35845, 36620, 36635, 36742, 37700, + ], + 'qīn qìng': [20146, 35242], + bó: [ + 20147, 20194, 20412, 20720, 21338, 24091, 24893, 25066, 25388, 25615, 27394, + 28001, 28159, 28196, 29055, 29268, 29403, 29917, 31028, 31201, 31636, 31769, + 31978, 32969, 33046, 33162, 33334, 33354, 33825, 33895, 34991, 35151, 35182, + 35592, 36387, 37091, 37432, 37457, 37581, 37787, 37998, 38073, 38082, 38216, + 39226, 39310, 39323, 39326, 39361, 39406, 39539, 39622, 40275, 40513, + ], + yòu: [ + 20148, 20305, 20326, 20369, 21448, 21491, 21706, 21760, 22271, 23031, 23461, + 23775, 24188, 29398, 31056, 34484, 35480, 35825, 35969, 36854, 37229, 37321, + 40748, + ], + xiè: [ + 20149, 20275, 20574, 20592, 20673, 21352, 21368, 22119, 22638, 22801, 23199, + 23633, 23655, 24296, 24482, 25032, 26284, 26800, 27021, 27053, 27899, 27945, + 28203, 28581, 28681, 28707, 28794, 28839, 28840, 29166, 29205, 29548, 31044, + 31164, 31951, 32050, 32079, 32108, 32370, 32392, 32449, 32567, 34210, 34212, + 34809, 34831, 35081, 35131, 35613, 35874, 36510, 36994, 38782, 38896, 40770, + 40792, 40795, 40805, + ], + 'dǎn dàn': [20150, 39358], + lián: [ + 20151, 21126, 21298, 21299, 22009, 22098, 22849, 22889, 23294, 24088, 24265, + 24604, 24976, 28063, 28451, 28610, 28627, 28718, 29073, 29163, 31806, 31842, + 31848, 32314, 32756, 32852, 32872, 32875, 32878, 32879, 33217, 33714, 34030, + 34197, 34698, 34826, 35042, 35123, 35229, 35632, 36453, 36830, 36899, 37772, + 37934, 38256, 39697, 39985, 40098, + ], + duǒ: [ + 20152, 21722, 22194, 22517, 23836, 26421, 26422, 32158, 32525, 36243, 36529, + 36530, 36547, + ], + 'wěi mén': [20153, 26006], + rén: [ + 20154, 20155, 20161, 22764, 24520, 24526, 26418, 31170, 33442, 39772, 40256, + ], + jí: [ + 20156, 20157, 20235, 20342, 20590, 21337, 21363, 21373, 21450, 21469, 21513, + 22578, 22601, 23006, 23241, 23692, 23924, 23983, 24438, 24547, 24613, 24881, + 25122, 25572, 26497, 26840, 26987, 26997, 27081, 27293, 27547, 27762, 28242, + 28503, 30142, 30240, 30349, 31496, 31679, 31821, 32026, 32423, 33164, 33381, + 33978, 34112, 34170, 34637, 34703, 35147, 35289, 35899, 36374, 36432, 36516, + 36655, 36698, 36753, 37062, 37537, 37715, 37878, 38598, 38631, 38709, 40545, + ], + wáng: [20158, 20220, 20838, 33699, 34463], + 'shén shí': [20160], + lè: [ + 20162, 21499, 24519, 27707, 27856, 29583, 30771, 31765, 33403, 38430, 38903, + 39182, 39987, 40051, 40147, + ], + dīng: [20163, 21486, 24068, 29582, 30100, 30447, 32821, 34416, 38762], + zè: [20164, 23857, 24194, 25425, 26115, 26135, 27716], + 'jǐn jìn': [20165, 20677, 23268], + 'pú pū': [20166], + 'chóu qiú': [20167], + zhǎng: [20169, 24165, 25484, 30979], + jīn: [ + 20170, 22587, 24062, 24781, 26020, 27941, 29650, 29755, 29857, 30747, 31563, + 33621, 34943, 35167, 35284, 37329, 37330, 37375, 38021, 40566, 40645, + ], + bīng: [20172, 20178, 20853, 20907, 20912, 25508, 27703, 37618], + réng: [20173, 31037, 33471, 36792, 38526], + fó: [20175, 22386, 26811], + 'jīn sǎn': [20176], + lún: [ + 20177, 20262, 20374, 20523, 22261, 22279, 23144, 23832, 23833, 26822, 27814, + 28138, 30958, 33088, 33749, 34598, 36378, 36650, 36718, 37632, 38511, 39913, + ], + cāng: [ + 20179, 20218, 20489, 20948, 23906, 27815, 28356, 28664, 29514, 33329, 33369, + 33485, 33980, 34725, 40487, + ], + 'zǎi zǐ zī': [20180], + tā: [ + 20182, 22604, 23427, 27033, 28347, 29280, 31042, 35103, 36287, 36962, 38375, + ], + fù: [ + 20184, 20585, 20613, 20904, 21103, 21648, 22399, 22797, 22919, 23142, 23181, + 23316, 23500, 24489, 26929, 31060, 31139, 31438, 32238, 32283, 32538, 33145, + 33839, 34151, 34489, 34519, 34652, 34670, 34973, 35079, 35204, 35206, 35331, + 35394, 35747, 36000, 36070, 36091, 36127, 36171, 36185, 36212, 36665, 37713, + 37730, 38428, 38468, 39333, 39385, 39544, 39826, 39954, 40075, 40134, + ], + xiān: [ + 20185, 20186, 20321, 20682, 20722, 20808, 22037, 22910, 23667, 24303, 24570, + 25016, 25472, 26297, 26484, 27673, 29655, 31046, 31176, 31868, 32330, 32398, + 32406, 33518, 35132, 35187, 36345, 36462, 36506, 37232, 37697, 38184, 38895, + 38897, 39334, 40059, 40369, + ], + 'tuō chà duó': [20187], + hóng: [ + 20188, 21552, 22444, 22917, 23042, 23439, 23446, 24344, 24395, 27759, 27859, + 27946, 28004, 28209, 28482, 29586, 29596, 30804, 31441, 31460, 31690, 31904, + 32024, 32045, 32139, 32430, 32707, 32733, 32830, 33520, 33645, 33874, 33875, + 35897, 35900, 37404, 37495, 37584, 38286, 38387, 38672, 38687, 38787, 39775, + 40251, 40511, 40649, 40652, + ], + tóng: [ + 20189, 20319, 21699, 23746, 23773, 24221, 24420, 26189, 26312, 26704, 27651, + 28021, 28540, 29341, 29534, 30510, 30643, 30780, 31217, 31461, 31905, 33191, + 33596, 34450, 35447, 36200, 37230, 37462, 37493, 37509, 38108, 39175, 39846, + 40086, + ], + rèn: [ + 20190, 20205, 20995, 20996, 22922, 23001, 23675, 23683, 25192, 29283, 31053, + 32009, 32029, 32077, 32427, 32436, 32917, 33101, 34941, 34997, 35346, 35469, + 35748, 35761, 36564, 36715, 37395, 38765, 38769, 38860, 38887, 39146, 39169, + 39274, + ], + qiān: [ + 20191, 20325, 20681, 21315, 22322, 22903, 23407, 23693, 24749, 24838, 24947, + 25190, 25322, 25652, 25729, 25872, 25873, 25875, 26436, 27343, 27736, 27751, + 29301, 29309, 31439, 31614, 31805, 31830, 31844, 31873, 33418, 33598, 34440, + 35120, 35536, 35609, 35878, 35896, 36801, 36983, 37370, 37382, 37467, 37874, + 38030, 38433, 38854, 38981, 39467, 39582, 39708, 39709, 40302, 40528, + ], + 'gǎn hàn': [20192], + 'yì gē': [20193], + dài: [ + 20195, 20386, 21447, 22408, 22509, 23729, 24082, 24102, 24111, 24118, 24279, + 24608, 25140, 26307, 26571, 27526, 28731, 29619, 29767, 29977, 31780, 32063, + 32255, 32464, 33372, 34675, 34955, 35190, 36003, 36151, 36443, 36561, 36570, + 36585, 36714, 36840, 38708, 38726, 40207, 40667, 40689, + ], + 'lìng líng lǐng': [20196], + chào: [20198, 32790, 35288], + 'cháng zhǎng': [20199, 20815, 38263, 38271], + sā: [20200], + cháng: [ + 20201, 20607, 20767, 22039, 22160, 23270, 23581, 24120, 24476, 29818, 29946, + 29982, 32928, 33144, 33171, 33484, 33799, 38264, 40040, 40127, + ], + yí: [ + 20202, 20359, 20736, 20893, 21276, 21670, 22319, 22839, 23016, 23440, 23452, + 23463, 23538, 23763, 23980, 23991, 24056, 24411, 24412, 24413, 24414, 24609, + 24670, 25157, 26246, 26648, 26924, 26936, 27778, 27935, 29098, 29941, 30157, + 31227, 31747, 31822, 32672, 33008, 33811, 34534, 34708, 35322, 35643, 36029, + 36155, 36320, 36859, 36986, 37844, 38921, 38948, 38949, 38986, 39056, 39284, + 39847, 40250, + ], + mù: [ + 20203, 20969, 21215, 22675, 24149, 24153, 24916, 24917, 26286, 26287, 26408, + 26968, 27619, 27792, 28817, 29287, 29383, 30446, 30566, 31302, 33362, 33500, + 33711, 34462, 37484, 38076, 38638, 38658, + ], + 'men mén': [20204], + fǎn: [20206, 21453, 27214, 36820], + 'chào miǎo': [20207], + 'yǎng áng': [20208], + zhòng: [ + 20210, 20247, 22585, 22933, 23185, 29382, 30526, 31052, 31575, 33597, 34459, + 34886, 34934, 35557, + ], + 'pǐ pí': [20211], + wò: [ + 20212, 20563, 21351, 23177, 24132, 25569, 26947, 27779, 28197, 28643, 29889, + 30595, 30826, 32927, 33115, 33253, 40823, 40844, + ], + jiàn: [ + 20214, 20468, 20581, 20717, 21073, 21091, 21105, 21133, 21134, 21138, 21140, + 22713, 23499, 24314, 24484, 25846, 26068, 26967, 27645, 27914, 28071, 28567, + 29294, 29652, 30647, 30965, 30976, 31661, 31947, 32349, 33137, 33270, 33328, + 33382, 33616, 34214, 35256, 35539, 35563, 35675, 35855, 36046, 36068, 36145, + 36253, 36341, 36368, 36410, 36702, 37492, 37747, 37749, 37937, 37969, 37970, + 37996, 38003, 38190, 38291, 39198, 39279, + ], + 'jià jiè jie': [20215], + 'yǎo fó': [20216], + 'rèn rén': [20219], + 'fèn bīn': [20221], + dī: [ + 20222, 20302, 21874, 22494, 22564, 23739, 24445, 27136, 28404, 30974, 31210, + 32669, 34971, 36230, 38532, 38830, + ], + fǎng: [ + 20223, 20515, 26058, 26121, 26136, 29932, 30470, 32033, 32442, 33323, 35370, + 35775, 39651, 40365, + ], + zhōng: [ + 20224, 21027, 22928, 24146, 24440, 24544, 26570, 27767, 27848, 28802, 30405, + 31846, 32066, 32456, 33327, 34080, 34585, 34724, 34749, 34931, 34935, 36465, + 37409, 37758, 37912, 38047, 38202, 40228, 40744, + ], + pèi: [ + 20226, 20329, 23029, 24084, 26046, 26054, 27803, 28031, 29678, 34012, 36705, + 36756, 37197, 38664, 39351, + ], + diào: [ + 20228, 21514, 24340, 25481, 30265, 30404, 31374, 31413, 31464, 35339, 37347, + 37407, 37553, 37629, 37955, 38035, 38110, 38655, 39777, + ], + dùn: [ + 20229, 28513, 28822, 29129, 30462, 30744, 30903, 36402, 36871, 36929, 36975, + 37389, 38045, + ], + wěn: [ + 20230, 21006, 21563, 21573, 25222, 26749, 31283, 31311, 31337, 32010, 32947, + 33047, + ], + xǐn: [20232], + kàng: [20233, 21279, 22245, 25239, 28821, 37415, 38058], + ài: [ + 20236, 20734, 22631, 22738, 23250, 23329, 24859, 25043, 26279, 26326, 29233, + 29815, 29862, 30375, 30649, 30777, 30795, 30861, 31001, 34182, 35706, 36089, + 37952, 38552, 38729, 39218, 39332, 40043, 40241, + ], + 'jì qí': [20238, 34234], + 'xiū xǔ': [20241], + 'jìn yín': [20242], + dǎn: [ + 20244, 21008, 25762, 29612, 29933, 32030, 32966, 33213, 34932, 36071, 36181, + 40661, + ], + fū: [ + 20245, 21579, 23056, 23413, 23555, 24612, 25071, 25975, 26057, 29598, 30726, + 31235, 31583, 31952, 32146, 32932, 33178, 33602, 33652, 34925, 36282, 36311, + 37022, 37148, 37212, 37383, 40617, 40620, 40625, 40632, + ], + tǎng: [ + 20246, 20645, 20795, 22507, 25091, 26349, 29219, 30680, 36538, 37810, 38018, + 38219, + ], + yōu: [ + 20248, 20778, 21606, 22168, 23795, 24189, 24551, 24736, 24962, 25912, 27340, + 28410, 28672, 32395, 32682, 32816, 36876, 37182, 40576, + ], + huǒ: [20249, 22821, 28779, 29047, 37033, 37413, 38060], + 'huì kuài': [20250, 26371, 27981, 29871], + yǔ: [ + 20251, 20417, 20451, 20554, 20660, 21292, 22131, 22276, 22281, 23431, 23513, + 23679, 23996, 24254, 25383, 25940, 26014, 26944, 29760, 30224, 31076, 31161, + 31333, 31411, 32701, 33287, 33837, 35984, 37125, 38952, 40588, 40812, 40841, + ], + cuì: [ + 20252, 21851, 24560, 24756, 27635, 28140, 28960, 30121, 30209, 31425, 31883, + 31929, 32035, 32183, 32710, 32736, 33027, 33030, 33082, 33196, 33205, 33230, + 33795, 35146, 38983, + ], + sǎn: [20254, 20632, 31972, 32342, 39242, 39315], + wěi: [ + 20255, 20266, 20553, 20605, 20702, 20784, 23059, 23530, 23639, 23843, 23945, + 24491, 24839, 25444, 26256, 26806, 27943, 27992, 28200, 28828, 29010, 29477, + 29614, 29771, 30207, 32239, 32428, 33138, 33353, 33435, 33479, 33649, 33806, + 33894, 33933, 34111, 34620, 35529, 35839, 36371, 37729, 38865, 38873, 38881, + 38890, 38944, 39097, 39593, 39594, 39595, 39850, 40084, + ], + 'chuán zhuàn': [20256, 20659], + 'chē jū': [20257, 20453, 36554, 36710], + yá: [ + 20258, 21393, 21395, 22544, 23688, 23829, 23830, 28079, 28420, 29273, 29601, + 29706, 30554, 31500, 33469, 34460, 34905, 40790, + ], + qiàn: [ + 20259, 20436, 20521, 20761, 21003, 22733, 23345, 24723, 26824, 26912, 27111, + 27424, 27465, 30360, 31695, 31711, 32308, 33441, 33960, 34099, 36644, + ], + shāng: [ + 20260, 20663, 21830, 22674, 24943, 27527, 27556, 28403, 28449, 29109, 34063, + 34730, 35294, 35316, 35626, 39738, + ], + chāng: [ + 20261, 20480, 23100, 26124, 26905, 28112, 29462, 29737, 33750, 35054, 37673, + 38176, 38326, 38410, 39911, 40115, 40730, + ], + 'chen cāng': [20263], + xùn: [ + 20264, 20378, 21314, 22080, 24058, 24061, 24455, 24891, 27529, 27582, 27739, + 28512, 29413, 34120, 35338, 35347, 35353, 35757, 35759, 36805, 36863, 36874, + 36956, 37954, 39016, 39348, 39535, + ], + xìn: [20265, 22239, 23390, 33066, 33291, 34885, 35371, 37313, 38432, 38998], + chǐ: [ + 20268, 20360, 21366, 21498, 21582, 22417, 24677, 27503, 32827, 32916, 32995, + 34439, 35053, 35115, 35913, 37497, 40786, 40831, + ], + 'xián xuán': [20269], + 'nú nǔ': [20270], + 'bǎi bó': [20271], + 'gū gù': [20272], + nǐ: [ + 20273, 20320, 20766, 23412, 25311, 25836, 26062, 26226, 29396, 33512, 34239, + 38572, + ], + 'nì ní': [20274], + bàn: [ + 20276, 21150, 21322, 22981, 24593, 25198, 29923, 31194, 32070, 32458, 36774, + 37473, 38781, + ], + xù: [ + 20277, 20368, 21206, 21207, 21369, 21465, 22463, 22779, 23167, 24207, 24676, + 25933, 25944, 26093, 26155, 26370, 27090, 27440, 27528, 27775, 27776, 27947, + 28294, 28469, 28490, 28869, 28924, 29030, 29533, 29676, 30434, 30593, 31288, + 32110, 32154, 32210, 32214, 32396, 32490, 32493, 32851, 32863, 33988, 34266, + 35385, 36041, 37207, 38922, 40046, + ], + zhòu: [ + 20279, 20733, 20881, 21610, 21650, 21678, 23449, 26172, 26205, 29955, 30385, + 30394, 31808, 31826, 31829, 31897, 32002, 32272, 32419, 32457, 32964, 33646, + 33892, 35403, 37198, 39374, 39519, 39588, + ], + shēn: [ + 20280, 20353, 20831, 21627, 22548, 22973, 23072, 23678, 23799, 25183, 25938, + 26321, 26587, 27680, 28145, 29130, 29637, 29985, 29991, 30003, 30482, 30775, + 31356, 31862, 31864, 31938, 32051, 32453, 32601, 32615, 33888, 34017, 34072, + 34195, 35025, 35383, 35445, 35804, 36523, 39402, 39891, 39925, 39994, 40121, + 40290, + ], + qū: [ + 20281, 20297, 21284, 21631, 22373, 23624, 23702, 23732, 23943, 24968, 25278, + 25978, 27968, 28992, 31067, 31553, 31916, 32992, 34502, 34512, 34986, 35259, + 35416, 35790, 36237, 36527, 36544, 38457, 39366, 39368, 39493, 39537, 39671, + 39804, 39992, 40011, 40332, 40623, 40628, 40633, 40674, + ], + 'sì cì': [20282], + bēng: [20283, 22051, 22879, 23849, 23917, 38285], + 'sì shì': [20284], + 'jiā qié gā': [20285], + 'yǐ chì': [20289], + 'diàn tián': [20291, 38079], + 'hān gàn': [20292], + mài: [ + 20293, 21154, 21233, 21334, 21787, 22770, 33032, 34887, 36067, 36808, 36993, + 38689, 38690, 40613, 40614, + ], + dàn: [ + 20294, 20708, 21846, 21847, 21887, 22089, 22186, 24078, 25018, 26086, 26598, + 27694, 27786, 27897, 28129, 29402, 30093, 30298, 31147, 31390, 33093, 33807, + 34014, 34507, 34577, 35291, 35345, 35477, 35806, 36105, 38702, 39204, 39247, + 39411, 39655, 40224, + ], + bù: [ + 20296, 21199, 21541, 21656, 22487, 22496, 24067, 24269, 24598, 24721, 27493, + 27496, 27497, 29951, 31728, 33657, 34048, 36356, 37096, 37110, 37384, 38042, + 39202, + ], + bǐ: [ + 20298, 20478, 21269, 22838, 22947, 24444, 26428, 26560, 27604, 27614, 27800, + 30101, 31189, 31508, 31558, 31875, 32859, 33325, 35983, 37145, + ], + 'zhāo shào': [20299], + cǐ: [20300, 27492, 27866, 30345], + wèi: [ + 20301, 21355, 21619, 21890, 22683, 23206, 24944, 25024, 26410, 28205, 29023, + 29101, 29338, 29484, 30031, 32237, 32635, 32963, 33535, 33739, 34287, 34358, + 34655, 34737, 34907, 34910, 35133, 35586, 35718, 35727, 35859, 36503, 36507, + 36558, 36682, 37839, 38696, 39207, 39221, 39254, 39759, 39815, 40154, + ], + zuǒ: [20304, 24038, 32339], + yǎng: [ + 20306, 20639, 20859, 22385, 23711, 24899, 25065, 25857, 27687, 27697, 28852, + 30162, 30306, 31010, 32059, 34630, 36590, 39178, 39386, + ], + 'tǐ tī': [20307, 39636], + zhàn: [ + 20308, 20577, 23960, 25112, 25126, 25136, 26632, 26719, 26855, 28251, 31449, + 32187, 32509, 33754, 34360, 34405, 34406, 35687, 36687, 39503, + ], + 'hé hē hè': [20309], + bì: [ + 20310, 21639, 21716, 22006, 22354, 22555, 22721, 22896, 22972, 23138, 23318, + 24065, 24163, 24164, 24199, 24243, 24294, 24330, 24379, 24380, 24387, 24517, + 24621, 24842, 24846, 25949, 25987, 26768, 27605, 27606, 27609, 28258, 28375, + 28397, 28535, 29007, 29082, 29428, 29528, 29529, 29644, 29863, 30016, 30050, + 30122, 30201, 30202, 30357, 30564, 30887, 31578, 31621, 31622, 31718, 31731, + 31882, 32188, 32298, 32372, 32636, 33143, 33534, 33628, 33798, 33822, 34006, + 34045, 34109, 34204, 34572, 34960, 35141, 35166, 35171, 35313, 35414, 35792, + 36017, 36116, 36177, 36344, 36437, 36483, 36484, 36991, 37042, 37160, 37162, + 37453, 37838, 37940, 38091, 38279, 38281, 38303, 38381, 38491, 38880, 39158, + 39238, 39325, 39388, 39494, 39616, 39763, 39813, 40413, 40425, 40714, + ], + tuó: [ + 20311, 22376, 22582, 23726, 27094, 27216, 27825, 30755, 30756, 30882, 32061, + 35409, 36302, 37217, 38436, 38464, 38465, 39389, 39390, 39464, 39506, 39517, + 39548, 39808, 40213, 40501, 40713, 40717, 40743, + ], + shé: [20312, 33292, 34421, 34533], + 'yì dié': [20314, 26163, 27846, 36604], + 'fó fú bì bó': [20315], + 'zuò zuō': [20316], + gōu: [ + 20317, 27807, 28317, 30144, 31709, 31804, 32241, 32529, 34983, 35104, 37390, + 37476, 38057, 38834, 38877, + ], + nìng: [20318, 20395, 20543, 23509, 27870, 28573, 28632], + qú: [ + 20322, 21164, 25141, 26026, 27403, 27412, 27661, 28141, 28744, 29216, 29846, + 29865, 30319, 30962, 31847, 32071, 32970, 33246, 33731, 33867, 34134, 34343, + 34781, 34871, 34876, 34896, 34914, 36515, 36581, 38010, 40221, 40476, 40498, + 40745, + ], + 'yōng yòng': [20323], + wǎ: [20324, 21651, 30745, 37047], + kǎ: [20327, 22448, 33001, 35011, 37490], + bāo: [ + 20328, 21241, 21253, 23394, 29042, 31523, 32990, 33502, 34132, 35046, 35090, + 35139, 38337, 40793, 40837, + ], + 'huái huí': [20330], + 'gé hè': [20331], + lǎo: [ + 20332, 21694, 24645, 26675, 29419, 29679, 30803, 32769, 32770, 33622, 34543, + 36689, 37536, 38097, 39857, + ], + xiáng: [20333, 24224, 26649, 31077, 32116, 32724, 35443, 36333], + gé: [ + 20334, 21260, 21572, 21981, 22629, 24837, 25356, 25663, 27077, 27338, 28358, + 33160, 33269, 33558, 35297, 35581, 36661, 36693, 38307, 38401, 38548, 38839, + 38864, 38874, 39444, 39612, 39855, + ], + yáng: [ + 20335, 21175, 22431, 23864, 24457, 25196, 25562, 25965, 26104, 26140, 26264, + 26472, 26954, 27915, 28800, 29660, 30113, 30221, 30523, 34520, 35577, 36656, + 37722, 38038, 38438, 38451, 38525, 38711, 39098, 39119, 39953, 40249, 40457, + ], + bǎi: [20336, 25453, 25670, 25850, 26658, 30334, 31457, 31912, 35180], + fǎ: [20337, 23772, 27861, 28747, 30749, 37701], + mǐng: [20338, 20949, 23027, 24911, 37225], + 'èr nài': [20340], + hěn: [20343, 24456, 29408, 35434], + huó: [20344, 27963], + guǐ: [ + 20345, 21286, 21293, 21420, 22429, 23037, 23428, 24203, 24234, 24657, 26231, + 28224, 30328, 31082, 31755, 34539, 34785, 35300, 35437, 35809, 36556, 36712, + 38482, 39740, + ], + quán: [ + 20346, 20840, 21875, 22498, 23038, 23761, 24015, 25331, 25660, 26435, 27006, + 27177, 27402, 27849, 27940, 28278, 29303, 29320, 29780, 30154, 30786, 31564, + 32275, 33603, 33906, 34615, 34872, 35296, 35438, 35808, 36327, 36385, 36615, + 36737, 37275, 37523, 38120, 38350, 39028, 39079, 39401, 39457, 39688, 39937, + 40136, 40804, + ], + tiāo: [20347, 24227, 26091, 31079, 32846], + jiǎo: [ + 20348, 20748, 23362, 25378, 25605, 25759, 25785, 25898, 25963, 25981, 25983, + 26184, 26270, 26322, 28762, 29150, 29409, 29868, 30350, 30374, 32094, 32400, + 32478, 33139, 33259, 34780, 35665, 36043, 36363, 37496, 38128, 39171, 39290, + 40014, 40867, + ], + cì: [ + 20349, 21054, 24219, 26431, 26664, 27425, 32088, 33574, 33727, 34515, 34694, + 36060, 36176, + ], + xíng: [ + 20352, 21009, 21720, 22411, 23065, 24418, 27920, 30798, 34549, 37026, 37065, + 37379, 37494, 37522, 38040, 38095, 38473, 38488, 39219, + ], + tuō: [ + 20354, 21635, 21660, 22315, 25176, 25301, 25302, 27729, 33067, 33073, 33676, + 34981, 35351, 35756, 39141, 39270, 39776, 39861, + ], + kǎn: [20355, 20568, 20890, 22350, 24770, 30733, 33712, 36641, 36695, 38993], + zhí: [ + 20356, 20516, 20540, 22516, 22519, 23018, 23298, 25120, 25191, 25709, 26893, + 27188, 28116, 28432, 30452, 31107, 32119, 32310, 32832, 32844, 32887, 33201, + 34777, 36310, 36399, 36448, 36497, 36548, 37342, 39357, + ], + gāi: [ + 20357, 22419, 23007, 23760, 26192, 30049, 31092, 33604, 35442, 35813, 35941, + 36037, 36044, 36165, 38484, + ], + lái: [ + 20358, 20459, 20488, 23811, 23821, 24242, 26469, 26814, 26870, 28062, 28150, + 29453, 29724, 31577, 31618, 33713, 33802, 36904, 37106, 37688, 38140, 39435, + 39904, 40326, 40627, + ], + kuǎ: [20361, 21685, 22446, 37529], + gōng: [ + 20362, 20844, 21151, 21265, 21268, 22632, 23467, 23470, 24037, 24138, 24339, + 24685, 25915, 26459, 30909, 31996, 31999, 32945, 35301, 35317, 36524, 36531, + 39672, 40852, 40858, + ], + lì: [ + 20363, 20432, 20458, 20616, 20782, 20791, 20947, 21033, 21147, 21169, 21237, + 21382, 21385, 21412, 21423, 21426, 21459, 21519, 21590, 21774, 21811, 22182, + 22215, 22364, 22619, 22754, 23091, 23151, 23668, 23718, 24743, 24759, 24900, + 25150, 25646, 26278, 26310, 26334, 26424, 26533, 26627, 26647, 26651, 27306, + 27348, 27370, 27408, 27508, 27511, 27813, 27828, 28054, 28327, 28671, 28701, + 29199, 29345, 29441, 29653, 29806, 29893, 29905, 29925, 30124, 30178, 30311, + 30445, 30553, 30725, 30778, 30782, 30975, 31018, 31019, 31024, 31154, 31197, + 31435, 31520, 31717, 31890, 31901, 31986, 33079, 33480, 33560, 33620, 33669, + 33673, 33946, 33950, 34294, 34488, 34510, 34528, 34599, 34679, 34823, 34851, + 35400, 35720, 36210, 36706, 36707, 36729, 37192, 37469, 38582, 38583, 38643, + 38722, 38731, 39681, 40168, 40215, 40389, 40604, + ], + yīn: [ + 20364, 20944, 21905, 22142, 22233, 22240, 22420, 22553, 23035, 23139, 24852, + 24903, 26678, 27684, 27911, 28341, 28646, 30230, 31115, 31221, 31555, 32106, + 32248, 33589, 33937, 34093, 35008, 35570, 37542, 38111, 38345, 38437, 38452, + 38512, 38523, 38530, 38674, 38688, 38791, 38899, 38910, 39408, 39555, 40791, + ], + mǐ: [ + 20366, 23370, 24365, 25929, 27939, 28211, 28758, 31859, 31886, 32651, 33042, + 33416, 33886, 34077, 37540, + ], + zhū: [ + 20367, 26666, 27104, 27237, 27367, 27371, 27929, 28532, 28710, 29482, 29664, + 30787, 31228, 32081, 33585, 34127, 34523, 34667, 34857, 35006, 35461, 35576, + 35803, 35832, 35948, 36326, 37054, 37526, 38114, 39407, 39842, 39930, 40248, + 40708, + ], + ān: [ + 20370, 20579, 23189, 23433, 23766, 24245, 26697, 27688, 30438, 30443, 33124, + 33780, 33851, 33866, 34029, 35485, 35571, 35865, 38796, 38797, 38909, 39331, + 39839, 40298, 40341, 40524, + ], + lù: [ + 20371, 20679, 21198, 21216, 22309, 22388, 22646, 23101, 23757, 24280, 24404, + 24405, 25134, 25693, 26882, 27162, 28117, 28133, 28172, 28425, 28510, 29741, + 29840, 29994, 30429, 30569, 30793, 31103, 31108, 31249, 31307, 31635, 31759, + 31788, 31797, 31798, 31833, 31926, 34061, 34135, 34370, 34736, 36034, 36162, + 36258, 36335, 36379, 36439, 36613, 36678, 36738, 36760, 36911, 37249, 37636, + 37682, 37684, 37876, 38520, 39428, 39484, 39909, 40252, 40294, 40305, 40442, + 40557, 40575, 40595, + ], + móu: [ + 20372, 21178, 24648, 30520, 34513, 35584, 35851, 36366, 37738, 40254, 40624, + ], + ér: [ + 20373, 20799, 20816, 20818, 23759, 26669, 27919, 31915, 32780, 33017, 33611, + 35003, 36608, 36700, 38481, 38573, 39669, 39838, 40085, 40239, 40504, + ], + 'dòng tǒng tóng': [20375], + chà: [20376, 22908, 23033, 23700, 27722, 35435, 35815], + chì: [ + 20377, 20666, 21189, 21201, 21489, 21883, 24435, 24668, 24919, 24975, 25048, + 25270, 25941, 26021, 26456, 28225, 28795, 28861, 28926, 29118, 30163, 30200, + 30235, 32708, 32709, 32740, 32744, 33119, 36196, 36265, 36971, 37459, 38644, + 39149, 39276, 40338, 40408, + ], + 'gòng gōng': [20379, 20849], + zhōu: [ + 20380, 21608, 21900, 24030, 24479, 27954, 28109, 28863, 28880, 29656, 30698, + 33311, 35589, 35704, 35788, 36057, 36178, 36616, 36630, 36736, 36913, 37102, + 37506, 38668, 39410, 39430, 40259, 40508, + ], + rú: [ + 20382, 20754, 22149, 22914, 23340, 23418, 24100, 26328, 26695, 28202, 28641, + 31566, 33593, 34144, 34231, 34657, 34837, 35005, 35174, 37018, 37305, 37539, + 38135, 39020, 39077, 40044, 40209, 40253, + ], + 'jiàn cún': [20383], + xiá: [ + 20384, 20448, 21283, 23777, 23805, 25966, 26247, 26585, 28832, 28890, 29390, + 29421, 29433, 29672, 29781, 30806, 30820, 30892, 31083, 31594, 32278, 32712, + 33309, 33338, 34168, 36206, 36676, 36758, 36944, 37724, 37771, 38492, 38527, + 38686, 39458, 39803, 40375, 40672, + ], + lǚ: [ + 20387, 20406, 20770, 21525, 21570, 23649, 23650, 23653, 25364, 25435, 26053, + 26784, 28946, 31075, 31238, 31341, 32125, 32311, 32533, 33154, 33168, 35099, + 35128, 37080, 37569, 38109, + ], + ta: [20388], + 'jiǎo yáo': [20389, 20709, 24506], + zhēn: [ + 20390, 20597, 23498, 24103, 24106, 24128, 25656, 26015, 26722, 26984, 27035, + 27196, 27549, 27976, 28254, 28519, 28597, 29513, 29645, 29646, 29799, 29956, + 30494, 30495, 30759, 30890, 31087, 31118, 31131, 31668, 32983, 33275, 33908, + 33942, 33985, 34237, 35998, 36126, 36675, 36937, 37209, 37341, 37441, 37681, + 37756, 38024, 40053, + ], + 'cè zè zhāi': [20391, 20596], + kuài: [ + 20393, 20744, 20983, 21721, 22130, 22310, 22359, 22602, 24028, 24293, 24555, + 26077, 27443, 29423, 29546, 31607, 31977, 33037, 33214, 37072, 37174, 40032, + 40089, + ], + chái: [20394, 20757, 21901, 26612, 29362, 31073, 35962], + nóng: [ + 20396, 20738, 20892, 21725, 22117, 27266, 27393, 27987, 28611, 29174, 31151, + 31230, 31328, 33043, 33215, 34173, 35163, 35688, 36786, 36787, 37298, 39710, + ], + jǐn: [ + 20397, 20760, 21370, 21418, 24057, 27135, 28428, 29822, 32039, 32202, 33771, + 34035, 35641, 35880, 37670, 38182, 39241, 39313, + ], + 'hóu hòu': [20399, 30694], + jiǒng: [ + 20400, 20690, 20879, 22247, 27842, 28547, 28847, 28913, 29018, 29019, 29106, + 29147, 31384, 32151, 35111, 36837, 36872, 38984, 39054, + ], + 'chěng tǐng': [20401], + 'zhèn zhēn': [20402, 25557], + zuò: [ + 20403, 20570, 21777, 22352, 23709, 23710, 24231, 31066, 31987, 32985, 33859, + 33860, 34009, 34959, 38460, + ], + qīn: [ + 20405, 20819, 23175, 23898, 23956, 27453, 34942, 35483, 38054, 38985, 39416, + 39566, 39868, + ], + jú: [ + 20407, 21881, 23109, 23616, 24008, 26888, 27224, 27878, 28119, 28264, 28951, + 29329, 29386, 31927, 33738, 34332, 36252, 36348, 36459, 36610, 37113, 38320, + 39414, 39527, 40281, 40308, 40362, 40752, 40755, + ], + 'shù dōu': [20408], + tǐng: [ + 20409, 22306, 23063, 25402, 28047, 28918, 29693, 33057, 33351, 35476, 38962, + 39051, + ], + shèn: [ + 20410, 24892, 24910, 26138, 28033, 28183, 28402, 30214, 30254, 30488, 31091, + 32958, 32962, 33060, 33102, 34563, 34564, 37600, + ], + 'tuì tuó': [20411], + nán: [ + 20413, 21891, 23066, 25257, 26260, 26511, 26591, 26976, 30007, 30040, 33710, + 33843, 36950, + ], + xiāo: [ + 20414, 21715, 22069, 22203, 22210, 23115, 23471, 23477, 24232, 24391, 25585, + 26541, 26549, 26783, 27385, 27466, 27594, 28040, 28487, 28703, 28785, 28786, + 28875, 28935, 29447, 29538, 30170, 30175, 30813, 30819, 31385, 31659, 31768, + 31787, 32131, 32481, 32731, 33198, 33831, 34157, 34376, 34387, 34754, 34767, + 34800, 34856, 36355, 36877, 37559, 38144, 38660, 39093, 39501, 39553, 39623, + 39632, 39752, 40222, 40245, 40397, 40494, + ], + 'biàn pián': [20415, 32246, 32527], + tuǐ: [20416, 33151, 36422, 39613], + xì: [ + 20418, 21304, 21324, 21612, 22669, 23619, 23635, 23661, 24549, 24620, 24644, + 26910, 28509, 28511, 28569, 29058, 29332, 30966, 31114, 32048, 32140, 32280, + 32454, 32484, 33283, 33284, 34158, 34409, 34891, 35236, 36201, 36231, 37092, + 37363, 38411, 38553, 38559, 38716, 39228, 39273, 39721, 40662, + ], + cù: [ + 20419, 23208, 25009, 29469, 30212, 30255, 31751, 32300, 33064, 34079, 35470, + 36247, 36391, 36415, 36441, 36468, 36469, 37259, 39011, 40704, + ], + é: [ + 20420, 22254, 23077, 23753, 23784, 23785, 28048, 29684, 30354, 30539, 30912, + 33706, 35355, 35472, 35660, 35769, 36823, 37387, 37608, 38151, 38943, 38989, + 39069, 39780, 40285, 40286, 40517, + ], + qiú: [ + 20421, 21492, 21778, 22234, 23863, 24047, 24048, 25167, 26754, 27535, 27628, + 27714, 27731, 27845, 27991, 28269, 29034, 29360, 29580, 29699, 29830, 30387, + 30426, 32012, 32127, 32909, 33409, 33677, 34412, 34415, 34551, 35032, 35283, + 35305, 35332, 35333, 36053, 36167, 36878, 36881, 36946, 37195, 37338, 37371, + 37558, 38916, 39810, 39876, 39997, 40765, + ], + xú: [20422, 24464, 31121], + 'guàng kuāng': [20423], + kù: [ + 20424, 21950, 22195, 24211, 24235, 24292, 30228, 32093, 32468, 34996, 35044, + 35122, 37239, + ], + wù: [ + 20425, 21153, 21209, 21247, 21372, 22366, 22626, 22886, 23162, 23524, 23676, + 23689, 23912, 24546, 24734, 24735, 24750, 25098, 25188, 26212, 26444, 28329, + 28944, 29059, 29289, 30182, 30713, 31417, 31877, 34305, 35492, 35823, 37576, + 38434, 38550, 38654, 38682, 38695, 38768, 39446, 39579, 40361, 40540, 40767, + 40768, + ], + jùn: [ + 20426, 20737, 21569, 22472, 23535, 23803, 25039, 25411, 25887, 26201, 26846, + 29127, 29690, 30063, 31459, 31647, 34592, 36048, 37089, 38486, 39189, 39298, + 39423, 39567, 40276, 40277, 40280, + ], + liáng: [ + 20429, 22682, 26753, 26891, 27153, 31918, 31921, 31975, 33391, 36652, 36748, + ], + zǔ: [ + 20430, 21800, 29244, 31062, 32068, 32452, 35419, 35781, 37818, 38459, 38779, + ], + 'qiào xiào': [20431], + yǒng: [ + 20433, 21191, 21192, 21647, 22471, 22606, 23921, 24430, 24634, 24703, 24704, + 24805, 24849, 24889, 24898, 26593, 26640, 27704, 27891, 28263, 29996, 34553, + 35424, 36362, 36404, 39890, 40108, + ], + hùn: [ + 20434, 20529, 22274, 23585, 24897, 25485, 28343, 28957, 30580, 35304, 35554, + 35816, + ], + jìng: [ + 20435, 20665, 22659, 22924, 23129, 23143, 24362, 24371, 24452, 24465, 25964, + 26324, 26737, 26807, 27972, 28702, 29517, 30153, 30169, 31454, 31455, 31467, + 31478, 31480, 33003, 33051, 33686, 35497, 36353, 36851, 36885, 37857, 38236, + 38742, 38745, 38748, 40283, + ], + sàn: [20437, 38288], + pěi: [20438], + sú: [20439], + xī: [ + 20441, 20694, 20846, 20958, 21349, 21376, 21560, 21775, 21821, 22075, 22095, + 22193, 22805, 22874, 23302, 23305, 23638, 23904, 24007, 24076, 24454, 24495, + 24687, 24713, 24725, 24769, 24796, 26132, 26206, 26224, 26227, 26342, 26512, + 26744, 27069, 27176, 27200, 27447, 27685, 27728, 28000, 28101, 28179, 28330, + 28911, 28929, 28936, 28959, 29060, 29064, 29081, 29113, 29114, 29115, 29160, + 29204, 29306, 29312, 29344, 29351, 29707, 30236, 30361, 30542, 30630, 30717, + 30802, 30926, 30978, 31232, 31352, 31416, 31902, 31974, 32198, 32357, 32690, + 32725, 32726, 32952, 32953, 33181, 33342, 33667, 33765, 33952, 34597, 34693, + 34763, 34869, 35199, 35321, 35325, 35327, 35654, 35903, 35904, 35944, 35951, + 35989, 36197, 37020, 37134, 37189, 37295, 37368, 37675, 37869, 37898, 38004, + 38177, 38581, 39183, 39246, 39291, 39889, 40279, 40450, 40759, + ], + lǐ: [ + 20442, 23052, 23778, 23794, 26446, 27418, 28012, 28583, 29702, 31036, 31150, + 31924, 35023, 35041, 35914, 36902, 37008, 37300, 37616, 38146, 39881, 40039, + 40049, 40100, 40162, + ], + bǎo: [ + 20445, 22562, 23212, 23453, 23514, 23539, 23542, 29668, 32229, 33862, 34293, + 35091, 36082, 38732, 39161, 39165, 39281, 39362, 40181, 40199, 40488, + ], + 'yú shù yù': [20446], + 'sì qí': [20447], + 'xìn shēn': [20449], + xiū: [ + 20450, 20462, 21691, 24229, 27143, 28876, 32670, 33049, 33065, 33273, 35973, + 37533, 37760, 39117, 39240, 39312, 39652, 39673, 39860, 40003, 40258, 40506, + ], + dì: [ + 20452, 20569, 20672, 22474, 22673, 22700, 23075, 24093, 24607, 26099, 26762, + 28941, 29587, 29963, 30513, 30535, 30898, 31094, 31128, 31532, 32224, 32532, + 33123, 33730, 33922, 34069, 34627, 34669, 34734, 35558, 35867, 36406, 36882, + 36883, 36958, 36976, 37482, + ], + chóu: [ + 20454, 20756, 23334, 24774, 24833, 25060, 26662, 29181, 30068, 30087, 30359, + 31264, 31609, 31820, 32082, 32162, 32504, 33751, 35446, 35726, 35728, 36364, + 36490, 37223, 37228, 37307, 38612, 38624, 38630, + ], + zhì: [ + 20455, 20587, 20776, 21046, 21141, 22401, 23073, 23512, 24089, 24092, 24159, + 24226, 24228, 24268, 24408, 24463, 24477, 24535, 24558, 25061, 25067, 25347, + 25370, 25527, 25711, 25842, 26072, 26186, 26234, 26633, 26702, 26813, 27341, + 27355, 27835, 27959, 28365, 28382, 28399, 28492, 28676, 28825, 29099, 29438, + 29464, 29839, 29894, 30164, 30179, 31017, 31057, 31209, 31223, 31258, 31290, + 31305, 31378, 32041, 32251, 32622, 32720, 33187, 33267, 33268, 33430, 34541, + 34975, 34976, 35069, 35231, 35287, 35311, 35318, 35468, 35921, 35922, 36013, + 36074, 36100, 36136, 36157, 36337, 36396, 36499, 36618, 36734, 37061, 37517, + 37589, 37973, 38106, 38183, 38495, 38578, 38601, 39396, 39469, 39482, 39495, + 39576, 39919, 40217, 40409, 40503, + ], + 'liǎ liǎng': [20457], + jiǎn: [ + 20461, 20537, 20745, 20943, 21098, 22591, 24383, 24389, 25129, 25132, 25315, + 25400, 25441, 25536, 25791, 26535, 26604, 26776, 26816, 26908, 27298, 28187, + 28245, 28733, 29776, 30545, 30652, 30839, 30897, 30982, 31509, 31591, 31616, + 31777, 32120, 32365, 32742, 33575, 34246, 34834, 35045, 35143, 35145, 35194, + 35395, 35591, 35629, 35710, 35883, 36284, 36423, 37911, 39691, 39950, 40568, + 40571, 40572, + ], + huò: [ + 20464, 21663, 22191, 22207, 22895, 24416, 24785, 25110, 25837, 26084, 26340, + 27316, 27790, 28273, 28694, 29554, 30312, 30483, 30672, 31096, 31117, 31339, + 31394, 32815, 33243, 33383, 33719, 33958, 34303, 34838, 35595, 36008, 36135, + 37699, 37962, 38252, 38616, 38669, 38723, 38852, + ], + 'jù jū': [20465, 25454, 37624, 38191], + xiào: [ + 20466, 20634, 21177, 21682, 21742, 21880, 22027, 22056, 22063, 23389, 25928, + 25989, 25990, 27479, 28045, 29117, 31505, 35432, 35487, + ], + pái: [20467, 24472, 29260, 29348, 29445, 31792, 31794, 36651], + biào: [20469, 39998, 40148], + 'chù tì': [20470], + fèi: [ + 20471, 21077, 21406, 21536, 23645, 24223, 24259, 24290, 26162, 26314, 27360, + 27832, 28663, 29394, 30280, 32954, 33801, 36027, 36153, 37928, 38212, 38507, + 38725, 40739, + ], + fèng: [ + 20472, 20964, 22857, 28247, 28968, 29000, 36085, 36183, 40175, 40179, 40204, + ], + ǎn: [20474, 21813, 22511, 25566, 32623, 37544, 38133], + bèi: [ + 20475, 20493, 20573, 20601, 20633, 20675, 22791, 24726, 24811, 24834, 24970, + 26113, 26774, 28953, 29292, 29333, 29384, 29437, 29692, 29746, 30874, 31129, + 31954, 33501, 34003, 34557, 35097, 35997, 36125, 36592, 36649, 36744, 37046, + 37093, 37121, 37575, 37950, 38049, 38785, 38836, + ], + yù: [ + 20476, 20773, 21893, 21929, 21947, 22495, 22537, 22954, 23255, 23507, 23786, + 23950, 24253, 24423, 24481, 24840, 24958, 25131, 26161, 26843, 26844, 26859, + 27378, 27406, 27421, 27442, 27603, 28020, 28143, 28394, 28495, 28582, 28778, + 28980, 29020, 29135, 29152, 29225, 29425, 29508, 29577, 29721, 30217, 30290, + 30753, 30818, 30834, 30983, 30998, 31004, 31142, 31191, 31266, 31286, 31741, + 31838, 31858, 31894, 32206, 32621, 32895, 32896, 33352, 33419, 33420, 33567, + 33966, 34019, 34041, 34167, 34316, 34591, 34606, 34988, 35029, 35465, 35565, + 35709, 35861, 35947, 36553, 36621, 36915, 36935, 36985, 37057, 37287, 37434, + 37578, 37669, 37933, 38064, 38334, 38408, 38628, 38705, 38928, 39044, 39147, + 39239, 39275, 39341, 39496, 39533, 39728, 39729, 39739, 39754, 40010, 40191, + 40229, 40231, 40234, 40274, 40440, 40466, 40518, 40556, + ], + xīn: [ + 20477, 22138, 22945, 23324, 24286, 24515, 24516, 24571, 24798, 26032, 26133, + 26490, 27427, 27462, 28824, 30458, 34218, 35362, 36763, 37028, 37386, 37573, + 37995, 38156, 39336, 39339, + ], + 'hǔ chí': [20479], + jiù: [ + 20483, 20710, 21267, 21275, 21302, 21417, 21646, 23601, 24260, 24271, 24272, + 24934, 25412, 25937, 26087, 26601, 26622, 26709, 27405, 27559, 30106, 33276, + 33285, 33290, 39910, 40434, 40555, 40596, 40808, + ], + yáo: [ + 20484, 20636, 21954, 22426, 22575, 23002, 23217, 23591, 23597, 23779, 23970, + 23972, 24493, 25594, 25622, 25671, 25727, 26266, 27043, 28391, 28881, 29243, + 29498, 29671, 29796, 29814, 30936, 31377, 31407, 31408, 32948, 34344, 35616, + 35617, 35875, 36602, 36730, 36953, 36965, 37006, 39012, 39099, 39126, 39174, + 39194, 39977, 40025, 40144, + ], + 'cuì zú': [20485], + 'liǎng liǎ': [20486], + wǎn: [ + 20487, 21773, 23113, 24779, 25405, 26202, 26213, 26217, 26236, 26778, 26880, + 29740, 30073, 30358, 30412, 30871, 32169, 32176, 32510, 33048, 33814, 36384, + 36627, 37588, + ], + zǒng: [ + 20490, 20588, 20655, 23928, 24635, 24803, 25460, 25603, 25696, 29162, 32207, + 32235, 32258, 32317, 34007, + ], + guān: [ + 20492, 20851, 23448, 26874, 30237, 30287, 31396, 33924, 38306, 38359, 38364, + 39973, 40030, 40143, + ], + tiǎn: [ + 20494, 21818, 24541, 24767, 26218, 27524, 28127, 30547, 33094, 33300, 35237, + 35277, 36063, 37674, 39170, + ], + mén: [ + 20497, 25194, 25451, 29834, 33755, 34379, 37702, 38036, 38272, 38277, 38376, + ], + 'dǎo dào': [20498], + 'tán tàn': [20499, 22510], + 'juè jué': [20500], + chuí: [ + 20501, 22402, 22464, 25462, 25637, 26712, 26864, 27084, 31648, 33092, 33753, + 37656, 37786, 38180, 38514, 38976, + ], + xìng: [ + 20502, 22995, 23134, 23353, 24184, 24615, 24763, 26447, 28076, 32200, 33238, + 33607, 33685, 33877, + ], + péng: [ + 20503, 20656, 22620, 22643, 24376, 24969, 25408, 26379, 26842, 26902, 27173, + 30844, 31261, 31484, 31735, 32388, 33192, 33411, 34028, 34325, 34778, 34779, + 34998, 36643, 37643, 37981, 38904, 38908, 39471, 39676, 39685, 39700, 40300, + 40527, + ], + 'tǎng cháng': [20504], + hòu: [ + 20505, 21402, 21518, 22421, 22560, 24460, 27913, 33577, 35934, 36869, 37064, + 39836, 40031, 40078, 40088, + ], + tì: [ + 20508, 21059, 22159, 22164, 23625, 23644, 24716, 24720, 24789, 24790, 25147, + 25510, 26367, 26385, 27474, 27554, 28053, 29899, 31545, 31818, 34201, 35077, + 36886, 36919, 39664, 39680, 39684, + ], + gàn: [ + 20509, 20942, 24185, 27046, 27274, 28134, 28776, 30448, 32058, 32448, 35404, + 36113, 36195, 39597, + ], + 'liàng jìng': [20510, 38739], + suī: [ + 20512, 21752, 22794, 28374, 28617, 30509, 30562, 33429, 33661, 33662, 34429, + 38614, 38806, + ], + 'chàng chāng': [20513], + jié: [ + 20514, 20604, 20625, 21030, 21031, 21052, 21163, 21180, 21353, 21354, 23125, + 23211, 23377, 23690, 23848, 23909, 23995, 24000, 24175, 25130, 25463, 25526, + 25838, 26117, 26466, 26480, 26688, 26717, 26988, 26998, 27044, 27905, 28368, + 28500, 29412, 30571, 30989, 31469, 31680, 32687, 33709, 34037, 34531, 34576, + 34840, 34846, 34877, 34929, 35002, 35344, 35440, 35505, 35750, 36373, 36860, + 37475, 37755, 38268, 38945, 39834, 40082, + ], + 'kǒng kōng': [20517], + juàn: [ + 20518, 21173, 22854, 24955, 26698, 28099, 29431, 29543, 30519, 30538, 30560, + 32109, 32121, 32482, 32613, 32642, 33091, 34088, 37124, 39179, + ], + zōng: [ + 20519, 22571, 23447, 23887, 23893, 24830, 26401, 26837, 26934, 29095, 29475, + 30955, 32195, 32746, 33113, 33916, 34668, 35957, 36392, 36394, 36452, 37712, + 37953, 39436, 39459, 39572, 39683, 39689, 39735, 39918, 39932, + ], + ní: [ + 20522, 22381, 22527, 23612, 23636, 24617, 28131, 29450, 31870, 32867, 34477, + 34618, 35308, 35982, 36316, 36631, 37107, 37422, 38092, 38675, 39324, 39906, + 40117, 40593, 40815, + ], + zhuō: [ + 20524, 25305, 25417, 26700, 26802, 26817, 26867, 27093, 28095, 31399, 37935, + ], + 'wō wēi': [20525], + luǒ: [20526, 21062, 26346, 30256, 30323, 33245, 33999, 34819, 35064, 36534], + sōng: [ + 20527, 20935, 23040, 23847, 23913, 24250, 25021, 26494, 26496, 26537, 26583, + 26789, 27303, 28126, 28621, 30841, 33752, 39686, + ], + lèng: [20528, 22542, 24867, 30550, 36380], + zì: [ + 20531, 21082, 23383, 24675, 28173, 28460, 29304, 30501, 30502, 32980, 33022, + 33258, 33569, 33634, + ], + bèn: [20532, 22348, 25465, 25770, 28160, 31528, 36905], + cǎi: [ + 20536, 21835, 23111, 24425, 25505, 26828, 27613, 30572, 32181, 36340, 36393, + ], + zhài: [20538, 20661, 23528, 30261, 30758], + yē: [20539, 21524, 22094, 25832, 26253, 26928, 27467, 28529, 34862], + shà: [20541, 21820, 21922, 27459, 31633, 32732, 32739, 33808, 38319, 38670], + qīng: [ + 20542, 20670, 21375, 22282, 23496, 27682, 27691, 28152, 28165, 34619, 36605, + 36629, 36731, 37100, 37638, 37963, 38737, 38738, 39894, + ], + yīng: [ + 20544, 22052, 22111, 22198, 23156, 23190, 23240, 23344, 23366, 23422, 24869, + 25732, 25878, 26400, 26716, 27185, 27387, 28214, 29008, 29681, 29787, 29838, + 29908, 29959, 29974, 30884, 31023, 32211, 32403, 32492, 32552, 32578, 32579, + 32588, 33210, 33521, 33722, 34337, 34663, 34867, 35118, 35707, 36047, 36552, + 37965, 38195, 38681, 38906, 40236, 40337, 40359, 40367, 40426, 40441, 40462, + 40474, 40550, 40560, + ], + 'chēng chèn': [20545, 29231], + ruǎn: [ + 20548, 26378, 29772, 29888, 30877, 31005, 33117, 36575, 36653, 36719, 38446, + ], + 'zhòng tóng': [20549], + chǔn: [20550, 24823, 30582, 33846, 34850, 36080], + 'jiǎ jià': [20551], + 'jì jié': [20552], + 'bǐng bìng': [20555], + ruò: [ + 20556, 21458, 23926, 24369, 26953, 28971, 29191, 31660, 31707, 33979, 37120, + 39961, 39983, 40376, + ], + tí: [ + 20557, 21399, 21884, 21953, 23865, 28477, 29765, 30588, 31157, 31242, 32249, + 32519, 32612, 34139, 35078, 35605, 36263, 36420, 36431, 37261, 37719, 38988, + 39064, 39456, 39863, 39927, 40128, 40284, 40420, 40520, + ], + wēi: [ + 20558, 21361, 21940, 23041, 23193, 23990, 24013, 24494, 24836, 25547, 25595, + 26931, 26994, 28326, 28883, 29032, 29168, 30291, 32261, 33896, 33907, 34183, + 34610, 34651, 35235, 35444, 36918, 38535, 38536, 38714, 39939, 39940, 40130, + ], + piān: [20559, 22248, 23205, 26948, 29327, 31687, 32745, 37698], + yàn: [ + 20560, 21388, 21421, 21761, 21933, 22152, 22181, 22576, 22943, 23026, 23306, + 23359, 23476, 24421, 24422, 25957, 26191, 26277, 26325, 26339, 28383, 28750, + 28756, 28775, 28777, 28948, 28976, 28977, 29078, 29124, 29290, 29458, 30746, + 30831, 33395, 33398, 33399, 35214, 35267, 35326, 35578, 35724, 35742, 35866, + 35891, 35923, 35924, 36107, 36119, 36189, 36549, 37184, 37245, 37308, 37317, + 38593, 39181, 39260, 39440, 39443, 39476, 39511, 39520, 39564, 39731, 40171, + 40200, 40243, 40387, 40432, 40798, + ], + 'tǎng dàng': [20562], + è: [ + 20564, 21262, 21374, 21380, 21597, 21666, 22121, 22441, 22538, 22574, 23691, + 23871, 24261, 24746, 24853, 25145, 25212, 25636, 25657, 25820, 27374, 27486, + 27514, 28226, 29735, 30728, 30736, 30790, 33133, 33482, 33852, 34138, 34437, + 34625, 35240, 35556, 35725, 35860, 35935, 36571, 36598, 36717, 36940, 36943, + 36987, 37122, 37418, 37716, 37993, 38199, 38440, 38456, 38942, 38990, 39066, + 39187, 39209, 39295, 39952, 39978, 40055, 40132, 40346, 40535, 40771, 40822, + ], + xié: [ + 20565, 21232, 21327, 21332, 21963, 22437, 22858, 24650, 24886, 25337, 25658, + 25783, 25813, 25847, 25884, 26012, 26090, 29057, 29170, 32138, 32243, 32256, + 32556, 32723, 32961, 33029, 33031, 33035, 33166, 34658, 34938, 35181, 35559, + 35735, 35856, 38795, 38837, 40868, + ], + chě: [20566, 25199, 25766], + shěng: [20567, 28219, 30490], + chā: [ + 20571, 21967, 25184, 25407, 25554, 25591, 30080, 33279, 33366, 37535, 37732, + 38200, 39223, + ], + huáng: [ + 20575, 20976, 21924, 22573, 22708, 23187, 23858, 24488, 24822, 27003, 28255, + 29004, 29530, 29789, 29852, 30272, 30343, 30970, 31316, 31681, 31783, 33358, + 33887, 34647, 34789, 35579, 36266, 36945, 37728, 37892, 38205, 38541, 38905, + 39213, 39452, 39945, 40017, 40135, 40428, 40643, 40644, + ], + yǎo: [ + 20576, 21676, 23161, 23438, 23686, 26483, 26620, 27034, 28308, 29397, 31365, + 31368, 33280, 33517, 38340, 39445, 40405, 40809, + ], + 'chǒu qiào': [20578], + yóu: [ + 20580, 23588, 24238, 24611, 27787, 27833, 27999, 28216, 29369, 29494, 29495, + 30001, 30115, 31198, 32940, 33692, 33720, 34133, 34480, 34659, 35367, 36623, + 36662, 36912, 36938, 37038, 37109, 37438, 38080, 39360, 39799, 39819, 40063, + 40073, + ], + xū: [ + 20582, 22687, 23213, 23299, 26952, 27432, 27476, 29176, 30110, 30449, 32135, + 32259, 32379, 32997, 34150, 34391, 34394, 34395, 34641, 35015, 35343, 35377, + 35549, 35651, 35870, 37968, 38656, 38920, 39035, 39036, 39497, 39706, 39750, + 39766, + ], + zhā: [ + 20583, 21747, 25263, 25363, 25592, 25699, 27165, 28195, 30390, 35312, 35655, + 40772, 40775, + ], + cī: [20584, 30133, 34816, 36224, 39604, 39626, 40825], + bī: [20586, 23620, 26949, 27636, 35917, 36924, 39951, 40126, 40278], + xún: [ + 20593, 22106, 23547, 23563, 23755, 24033, 24309, 24490, 24642, 25559, 25907, + 26092, 26442, 26642, 26730, 27187, 27957, 27988, 28527, 29125, 29142, 29667, + 29845, 30019, 32003, 33600, 34803, 35426, 35810, 37161, 40015, 40024, 40095, + ], + 'cāi sī': [20594], + duān: [20595, 23183, 31471, 35085, 37748], + ǒu: [20598, 21528, 22036, 32806, 33122, 34117, 34261], + tōu: [20599, 20600, 37742], + 'zán zá zǎ': [20602], + 'lǚ lóu': [20603, 20674], + fèn: [ + 20606, 20712, 22859, 22894, 24325, 24575, 24868, 24996, 28725, 30611, 31182, + 31914, 31966, 33209, 40029, 40124, + ], + 'kuǐ guī': [20608], + sǒu: [20609, 21468, 21471, 22014, 27362, 30605, 34222, 34282], + 'zhì sī tí': [20610], + sù: [ + 20611, 20723, 21961, 22608, 22609, 22809, 23242, 24875, 24991, 27041, 27150, + 27157, 27536, 27869, 28049, 28335, 28344, 28506, 28517, 29578, 29663, 29851, + 31756, 31899, 31903, 32032, 32292, 32899, 32901, 33158, 34060, 34263, 35307, + 35380, 35606, 35785, 35873, 36250, 36444, 36895, 36961, 36972, 37577, 39191, + 39500, 39573, 40016, 40427, 40532, + ], + xiā: [20612, 28998, 30606, 34418, 35898, 39084, 39957], + 'yuàn yuán': [20614, 23195], + rǒng: [20615, 20887, 23426, 27652, 36597], + nù: [20617, 24594], + yùn: [ + 20618, 23381, 24701, 24818, 24864, 24909, 26527, 33130, 34164, 34176, 34292, + 34314, 35102, 35999, 36816, 36939, 37075, 37126, 37213, 37270, 37278, 38871, + 38878, 38901, 38907, 39211, + ], + 'gòu jiǎng': [20619], + mà: [ + 20620, 22044, 27050, 30576, 31043, 31137, 32629, 38273, 39393, 39554, 39701, + ], + bàng: [ + 20621, 22621, 26834, 29604, 31254, 33365, 33953, 34607, 35607, 35876, 37770, + 38225, + ], + diān: [ + 20622, 21415, 23918, 24005, 24019, 24020, 25474, 25895, 25921, 27079, 28359, + 30315, 30322, 36430, 39002, 39003, 39072, 40827, + ], + táng: [ + 20623, 21776, 21882, 22371, 22530, 22616, 25642, 26848, 27062, 28303, 28447, + 29051, 29805, 30916, 31135, 31702, 31939, 31958, 31963, 33157, 33179, 33998, + 34711, 34739, 36207, 36412, 37132, 37283, 37781, 38554, 39225, 39236, 40374, + ], + hào: [ + 20624, 21728, 24655, 26122, 26150, 26215, 26272, 26276, 26285, 26317, 28009, + 28111, 28564, 28751, 28765, 30355, 30364, 30366, 30369, 30373, 32791, 32853, + 34179, 34399, 37143, 39013, 39074, 39965, + ], + 'xī xì': [20626], + shān: [ + 20627, 21024, 21034, 21116, 22328, 23665, 25403, 25639, 26613, 27270, 28536, + 28568, 29053, 29414, 29642, 31512, 32319, 32692, 32694, 33056, 33314, 33439, + 34923, 36314, 36565, 37014, 38282, 39877, + ], + 'qiàn jiān': [20628], + 'què jué': [20629, 22470], + 'cāng chen': [20630], + róng: [ + 20635, 23222, 23238, 23339, 23481, 23797, 23896, 23992, 25102, 25608, 26343, + 26628, 27029, 27054, 27061, 27623, 28342, 28700, 28927, 29076, 29416, 29794, + 31297, 32104, 32466, 32674, 32924, 33561, 33592, 33635, 33993, 34686, 34701, + 34702, 34833, 35107, 37780, 38229, 39397, + ], + 'tà tàn': [20637], + suō: [ + 20638, 21766, 21965, 21990, 23057, 25677, 26731, 26797, 30531, 31761, 31764, + 32679, 33679, 34001, 36246, 39867, + ], + dǎi: [20643, 27513], + zài: [20644, 20750, 20877, 22312, 25175, 27909, 36617, 37224], + gǔ: [ + 20646, 21476, 21842, 23603, 24882, 27030, 27070, 27753, 28104, 28658, 28692, + 29295, 30391, 30396, 30444, 30653, 31296, 32607, 32662, 32929, 33077, 33228, + 34211, 34506, 34865, 35393, 35778, 36674, 36903, 37431, 38068, 39222, 39305, + 40723, 40724, + ], + bīn: [ + 20647, 23486, 24428, 25996, 26901, 28392, 28626, 28657, 28661, 28693, 32381, + 32548, 34408, 35945, 35955, 36051, 36052, 37024, 37964, 38228, 38694, 39022, + ], + chǔ: [ + 20648, 20786, 26485, 26904, 26970, 26990, 27290, 28619, 29876, 30784, 30990, + 31111, 34389, 40813, 40828, + ], + nuó: [20649, 20794, 25386, 26779, 27232], + 'cān càn': [20650], + lěi: [ + 20651, 20769, 21437, 22418, 22593, 22744, 22760, 27344, 28741, 30295, 30667, + 30922, 31016, 32786, 34124, 34174, 34271, 34365, 34845, 35460, 35716, 35796, + 38008, 40467, + ], + cuī: [ + 20652, 20951, 22676, 23828, 23903, 24923, 25703, 27057, 29525, 30954, 37849, + ], + yōng: [ + 20653, 21960, 22665, 22725, 23262, 24248, 24305, 24949, 25317, 25793, 28413, + 28745, 29253, 30152, 30293, 30320, 33219, 37013, 37114, 37144, 37854, 38235, + 38605, 38621, 39252, 40005, 40153, 40411, + ], + 'zāo cáo': [20654], + sǒng: [20657, 23927, 24578, 24730, 24879, 24939, 31462, 32824, 32883, 39415], + ào: [ + 20658, 22387, 22407, 22714, 22881, 23279, 23705, 23728, 23988, 25034, 25817, + 28595, 37834, 39489, 39580, + ], + 'qī còu': [20662], + chuǎng: [20664, 30946, 38358, 38383], + shǎ: [20667, 20749], + hàn: [ + 20668, 22462, 24717, 25022, 25182, 25421, 25750, 25788, 26097, 26200, 26293, + 27721, 28038, 28450, 28698, 28938, 29442, 30356, 30533, 32752, 33695, 33761, + 34559, 34605, 34706, 35648, 36634, 37356, 37554, 37582, 38615, 38967, 38980, + 39060, 39419, 40382, + ], + zhāng: [ + 20669, 23260, 24352, 24373, 24432, 24926, 26290, 27167, 28467, 29520, 29835, + 31456, 31931, 34049, 34769, 36967, 37155, 37873, 39206, 39487, 40006, 40606, + ], + 'yān yàn': [20671, 22677, 23342], + 'piào biāo': [20676, 39584], + liàn: [ + 20678, 22556, 23201, 24651, 25088, 26973, 27539, 27566, 28229, 28491, 28592, + 28722, 28860, 29001, 29779, 32244, 32414, 32451, 33840, 37676, 37706, 37832, + 38142, 39946, + ], + màn: [ + 20680, 22657, 24148, 24930, 26364, 28459, 28599, 29107, 29516, 32309, 32550, + 34052, 34352, 37156, 37853, 38232, + ], + 'tàn tǎn': [20683], + yíng: [ + 20684, 21942, 22603, 23348, 25869, 27001, 27391, 28289, 28299, 28386, 28486, + 28633, 28634, 28660, 28677, 28699, 28704, 28719, 28752, 28764, 29074, 29151, + 29801, 30401, 30408, 31132, 31837, 31855, 32264, 33556, 33639, 33721, 33828, + 33829, 33830, 33854, 34021, 34240, 34509, 34631, 34687, 34722, 34821, 35597, + 36111, 36194, 36814, 37795, + ], + dòng: [ + 20685, 20923, 20941, 21160, 21205, 23003, 25113, 25359, 26635, 26847, 28265, + 30800, 33000, 33012, 33110, 36853, 38680, 39399, + ], + zhuàn: [ + 20686, 21869, 22208, 22559, 25776, 28791, 29777, 31686, 33118, 33923, 35144, + 35668, 39244, 39316, + ], + xiàng: [ + 20687, 21224, 21521, 22190, 23008, 23953, 26319, 27233, 29670, 32575, 34771, + 34902, 35152, 35937, 37900, 38917, 39033, 40012, + ], + shàn: [ + 20688, 21892, 22688, 22689, 23319, 25797, 25982, 26923, 27199, 27482, 27733, + 28759, 30109, 30960, 32341, 32558, 33203, 34798, 34810, 35349, 35590, 35697, + 35754, 36109, 36193, 36216, 37167, 37925, 39245, 39480, 39583, 40019, 40020, + 40157, + ], + 'tuí tuǐ': [20691], + zǔn: [20692, 22082, 25753, 35664], + pú: [ + 20693, 21261, 22308, 22691, 28654, 29531, 29854, 30632, 31321, 33670, 33744, + 33769, 33889, 33969, 33970, 36108, 37242, 37879, 38244, + ], + láo: [ + 20695, 21171, 21172, 21214, 21744, 23810, 23959, 24997, 26405, 28022, 29282, + 30184, 30278, 31362, 31785, 37290, 37906, 38137, 39007, 39645, + ], + chǎng: [20696, 21424, 24288, 25950, 26166, 27653, 37625], + guāng: [ + 20697, 20809, 21667, 22425, 23023, 27960, 28782, 28823, 28826, 28827, 28897, + 29654, 33009, 33578, 36612, 37543, 40646, + ], + liáo: [ + 20698, 22073, 23293, 23525, 23534, 23582, 23658, 23930, 23962, 23963, 24299, + 24960, 25977, 26296, 27217, 29536, 29849, 30103, 30274, 31426, 31773, 32346, + 32557, 32842, 33163, 33195, 34260, 34783, 35906, 36095, 36440, 36797, 36988, + 39113, 39630, 40431, 40553, + ], + dèng: [ + 20700, 20979, 22705, 23965, 27336, 30634, 30964, 35252, 37011, 37159, 38565, + ], + 'chán zhàn zhuàn': [20701], + bō: [ + 20704, 23955, 25320, 25765, 25773, 27874, 28298, 29627, 30326, 30411, 30773, + 30854, 31009, 32573, 33760, 34992, 36467, 37474, 38069, 39185, 39293, 39499, + 40013, + ], + huì: [ + 20705, 21295, 21321, 21913, 22034, 22166, 22298, 23314, 23533, 23670, 23671, + 24407, 24409, 24410, 24507, 24666, 24693, 24800, 24935, 24979, 25075, 26214, + 26291, 27109, 27230, 27269, 27352, 27719, 27851, 28377, 28499, 28905, 29172, + 29545, 29860, 30650, 30794, 31229, 31330, 31730, 32117, 32362, 32472, 32729, + 32765, 33631, 34087, 34137, 34184, 34185, 34794, 35439, 35496, 35569, 35667, + 35711, 35763, 35826, 36036, 36159, 37932, 38368, 38419, 38759, 38958, 39018, + 39058, 39215, + ], + chuǎn: [20706, 21912, 33307, 33608, 36403], + 'tiě jiàn': [20707], + sēng: [20711, 39705], + xiàn: [ + 20713, 20724, 21743, 22455, 22634, 23021, 23050, 23466, 23704, 23796, 25010, + 25738, 26203, 27212, 27258, 28032, 28695, 29486, 29563, 29616, 29694, 30476, + 30541, 31919, 31982, 32100, 32171, 32218, 32447, 32528, 32673, 32680, 33146, + 33236, 33277, 33483, 33703, 35490, 35919, 37607, 37646, 38480, 38501, 38519, + 38704, 39201, 39301, 40626, 40760, + ], + 'yù jú': [20714], + 'è wū': [20715], + 'tóng zhuàng': [20718], + lǐn: [ + 20719, 20955, 20956, 24297, 24298, 25037, 25044, 25755, 27265, 27305, 28575, + 30299, 30301, + ], + gù: [ + 20721, 20933, 22266, 22540, 23827, 23854, 25925, 26767, 26845, 29311, 30204, + 31099, 37678, 38178, 38599, 39015, 39038, 39901, 40116, + ], + jiāng: [ + 20725, 22723, 23004, 27263, 27565, 27743, 30037, 30085, 30995, 32366, 32560, + 32734, 33587, 33857, 34193, 34688, 34751, 35911, 38849, 40002, 40137, + ], + mǐn: [ + 20726, 20922, 21025, 21188, 24751, 24829, 24845, 24924, 25003, 25279, 25923, + 25935, 25967, 27887, 28515, 30399, 31522, 31549, 31778, 34848, 38292, 38313, + 38389, 38397, 39989, 40152, 40701, + ], + jìn: [ + 20728, 20954, 22116, 22157, 22672, 22743, 22935, 23335, 25634, 26185, 26187, + 26499, 27555, 27989, 28024, 28301, 28613, 28636, 28908, 29025, 29180, 29710, + 29800, 29878, 30433, 31090, 32265, 32537, 33641, 34254, 35250, 35280, 36078, + 36112, 36166, 36817, 36827, 36914, 38771, 40829, + ], + 'jià jie': [20729], + qiào: [ + 20730, 23789, 24105, 25772, 27579, 31373, 31429, 35482, 35822, 36488, 38487, + 38825, 38866, 39642, + ], + pì: [ + 20731, 23218, 23251, 23617, 28604, 29971, 30088, 35692, 38370, 40447, 40458, + ], + sài: [20735, 31802, 36093, 36187], + 'chán tǎn shàn': [20739], + 'dāng dàng': [20741, 24403, 38371], + xuān: [ + 20743, 21927, 22599, 23191, 23459, 24835, 24843, 25550, 26125, 26244, 29002, + 29014, 29764, 30587, 30670, 31140, 31662, 32743, 32766, 33841, 33842, 34002, + 34175, 34300, 34320, 34646, 34825, 35552, 35580, 35678, 35862, 36562, 36713, + 37753, 39421, 39962, + ], + 'dān dàn': [20747, 25812, 30213], + càn: [20751, 28591, 28799, 29158, 29864, 31922, 34194, 35634], + 'bīn bìn': [20752], + 'án àn': [20753], + tái: [ + 20755, 22382, 23343, 25260, 25825, 27311, 28849, 28850, 31817, 33274, 34233, + 36294, 37040, 39089, 39824, 40080, + ], + lán: [ + 20758, 20848, 22226, 23146, 23706, 23888, 24177, 25318, 25876, 26003, 26005, + 26639, 27396, 27415, 28572, 28734, 28742, 28769, 29155, 29175, 29884, 31726, + 31811, 31843, 32383, 33915, 34013, 34253, 34347, 34349, 35124, 35157, 35172, + 35188, 35197, 35659, 35733, 35888, 36509, 37997, 38247, 38348, 38417, 38858, + ], + 'nǐ yì ài yí': [20759], + méng: [ + 20762, 24170, 26330, 26406, 27223, 27308, 27659, 28309, 28635, 29965, 30015, + 30431, 31006, 33384, 33684, 33804, 34116, 34427, 34673, 37171, 37176, 38719, + 38720, 39021, 39259, 39885, 40463, 40562, + ], + níng: [ + 20764, 20957, 21659, 22144, 23331, 26592, 27235, 27320, 29406, 29552, 32845, + 32889, 34228, 37967, 39713, 40459, + ], + qióng: [ + 20765, 21357, 23430, 24824, 24972, 26703, 27241, 28970, 28973, 29026, 29069, + 29756, 29898, 30552, 31351, 31353, 31406, 31430, 31547, 31559, 33340, 33557, + 34257, 34285, 34537, 34540, 36217, 36331, 37019, 37518, + ], + liè: [ + 20768, 20925, 21015, 21155, 21181, 22482, 22483, 23028, 23771, 24036, 25362, + 25449, 26677, 27916, 27990, 28872, 28910, 29037, 29347, 29454, 29471, 29557, + 32855, 33055, 33570, 34522, 36244, 36496, 36862, 39090, 39707, 39715, 39844, + 40050, 40247, + ], + kuǎng: [20771, 22844, 25069], + bào: [ + 20772, 21245, 22577, 24513, 25253, 25265, 26323, 29190, 29350, 33762, 34403, + 34475, 35961, 37451, 37988, 38087, 39602, 39665, 39825, 40077, + ], + biāo: [ + 20774, 22658, 24150, 24426, 26631, 27161, 28398, 28684, 29083, 29186, 29451, + 30253, 30950, 33176, 33237, 35620, 36102, 37858, 37987, 38230, 38259, 39086, + 39095, 39110, 39111, 39112, 39114, 39121, 39129, 39130, 39531, 39561, 39647, + ], + zǎn: [20775, 20793, 22086, 25861, 26141, 36273, 36274], + háo: [ + 20779, 21989, 22071, 22097, 22158, 22741, 26883, 27612, 27627, 28640, 29510, + 29524, 31443, 31815, 34461, 34836, 35705, 35946, + ], + qìng: [20780, 20938, 24198, 24950, 27366, 28650, 30851, 30956, 32580, 38744], + chèn: [ + 20781, 22187, 27015, 27372, 30114, 34924, 35183, 35734, 35894, 36225, 36226, + 40787, 40788, 40832, + ], + téng: [ + 20783, 24144, 28373, 28443, 30140, 31824, 31832, 32290, 33150, 34276, 34373, + 34723, 35466, 35588, 36998, 39398, 39472, 39523, 39975, + ], + 'lǒng lóng lòng': [20785], + 'chán chàn': [20787], + 'ráng xiāng': [20788, 21239], + 'huì xié': [20790], + luó: [ + 20792, 25886, 26916, 27407, 29473, 29568, 31657, 31854, 32599, 32645, 33078, + 33121, 33821, 34367, 34746, 35260, 36923, 37007, 37837, 38012, 38179, 38233, + 39264, 39486, 39512, 39585, 40449, + ], + léi: [ + 20797, 23256, 27281, 27417, 29891, 30078, 32306, 32397, 32413, 32551, 32589, + 32696, 34050, 34354, 34374, 36704, 37939, 37976, 38253, 38647, 38721, 40041, + 40762, + ], + 'nàng nāng': [20798], + 'wù wū': [20800], + yǔn: [ + 20801, 21911, 22845, 25230, 27538, 27550, 29377, 30930, 33658, 36081, 37399, + 38445, 38504, 38549, 38691, 39355, 40811, 40819, + ], + zān: [20802, 27253, 31786, 31790, 31948, 37909, 37919, 40292], + yuán: [ + 20803, 20870, 21407, 21409, 21429, 22253, 22278, 22286, 22290, 22291, 22435, + 22636, 23220, 23236, 25588, 27038, 27052, 27260, 27358, 27781, 28274, 28304, + 28306, 29232, 29480, 29503, 31502, 32227, 32257, 32536, 32689, 33554, 34199, + 34653, 34671, 34696, 34945, 35108, 35612, 36677, 36757, 37005, 37031, 37211, + 37416, 37809, 39477, 39789, 40354, 40368, 40703, 40715, + ], + xiōng: [ + 20804, 20807, 20982, 21250, 21256, 21701, 24567, 24671, 27769, 27958, 33015, + 33016, 33422, 35369, 35454, 35771, + ], + chōng: [ + 20805, 22019, 24545, 24963, 24999, 25679, 27798, 28026, 29675, 32639, 32704, + 33282, 33375, 33594, 34909, 36438, + ], + zhào: [ + 20806, 22423, 26064, 26316, 26523, 27330, 29031, 29171, 29411, 30654, 31498, + 32576, 32617, 32644, 32897, 32903, 32904, 35412, 35791, 36213, 36249, 39841, + ], + 'duì ruì yuè': [20810, 20812, 20817], + kè: [ + 20811, 21051, 21184, 21194, 22529, 23060, 23458, 24682, 24857, 27690, 28312, + 30886, 32217, 32514, 33360, 34889, 35506, 35838, 37633, 38174, 39437, 39570, + ], + tù: [20814, 20820, 22541, 36812, 40309], + dǎng: [20826, 25897, 27411, 35681, 35740, 35872, 40680], + dōu: [20828, 20832, 21783, 27255, 31740, 34104], + huǎng: [ + 20836, 22875, 24140, 24627, 24653, 26180, 28862, 29056, 32296, 35428, 35594, + 35854, + ], + rù: [ + 20837, 21973, 23223, 25174, 26433, 27955, 28349, 32287, 32539, 34000, 35109, + 40176, + ], + nèi: [20839, 27677, 27678, 37655], + 'yú shù': [20842], + 'liù lù': [20845], + han: [20847, 29235], + tiān: [20850, 22825, 23126, 28155, 37215, 38740, 38749, 40647], + 'xīng xìng': [20852], + diǎn: [ + 20856, 22200, 22860, 23152, 25951, 26915, 28857, 30872, 33959, 34119, 36398, + 40670, + ], + 'zī cí': [20857], + jiān: [ + 20860, 20927, 22223, 22362, 22533, 22904, 23014, 23015, 23574, 24181, 24804, + 25099, 25108, 25627, 26942, 27179, 27388, 27516, 27569, 27570, 28244, 28688, + 28728, 29006, 29086, 29112, 29259, 29770, 30583, 31003, 31031, 31546, 31627, + 32216, 32273, 32516, 32547, 32937, 33392, 33393, 33733, 33786, 33868, 33977, + 34090, 34129, 34163, 34371, 35708, 35932, 37999, 38595, 38831, 38848, 38857, + 39216, 39330, 39956, 39964, 39993, 40099, 40146, 40273, 40307, 40380, 40547, + 40585, + ], + shòu: [ + 20861, 21463, 21806, 22781, 22784, 23551, 25480, 29417, 29539, 29560, 30185, + 30246, 32172, 32502, 33156, + ], + jì: [ + 20862, 20864, 21058, 21092, 21137, 21219, 22358, 22413, 22600, 22931, 23395, + 23490, 23492, 24301, 24401, 24475, 24524, 24760, 24782, 25083, 25216, 26081, + 26082, 26083, 26280, 26281, 26305, 26782, 27285, 27317, 27918, 28419, 28424, + 28721, 30197, 30304, 31133, 31273, 31287, 31300, 31306, 31335, 32000, 32153, + 32318, 32331, 32380, 32487, 32489, 32637, 33262, 33456, 33549, 33572, 33898, + 34015, 34055, 34186, 34318, 34350, 34363, 35034, 35136, 35244, 35274, 35336, + 35352, 35467, 35745, 35760, 36321, 36349, 36447, 36857, 38469, 38555, 38657, + 38717, 39525, 39589, 39675, 39742, 39773, 39781, 39898, 39933, 39990, 39999, + 40000, 40045, 40090, 40107, 40267, 40401, 40780, + ], + jiōng: [20866, 20875, 22384, 22491, 25155, 34319, 34324, 39369, 39403], + mào: [ + 20867, 20880, 23202, 24125, 24855, 25035, 26259, 26581, 26969, 27639, 29761, + 30339, 30474, 30592, 32772, 33538, 33850, 34640, 34980, 35218, 35980, 36031, + 36152, 37146, 37166, + ], + rǎn: [20868, 20873, 22988, 23203, 26579, 29635, 33490, 33925], + 'nèi nà': [20869], + gāng: [ + 20872, 20910, 21018, 21083, 22536, 22589, 23713, 25478, 25667, 26849, 29288, + 29317, 30104, 32177, 32434, 32568, 32577, 32609, 32923, 37357, 37792, + ], + cè: [ + 20874, 20876, 21397, 21408, 22824, 24257, 24699, 24827, 24993, 25927, 27979, + 28204, 31527, 31574, 31582, 31604, 31651, 33629, 33815, 33844, 34011, + ], + guǎ: [20878, 21072, 21102, 21479, 23521], + 'mào mò': [20882], + gòu: [ + 20883, 21826, 22392, 22434, 22815, 22816, 23230, 24384, 25606, 25728, 26500, + 27083, 29049, 35247, 35279, 35389, 35436, 35807, 36092, 36141, 36952, 38602, + ], + xǔ: [ + 20884, 21923, 26250, 26665, 29661, 30440, 31944, 35425, 35583, 35817, 37158, + 37265, + ], + mì: [ + 20886, 20906, 22055, 22611, 23483, 23494, 23770, 24130, 24142, 24166, 24637, + 27027, 27154, 27329, 27752, 28135, 28405, 28446, 28631, 29072, 32643, 34084, + 34588, 35219, 35220, 35227, 35269, 35600, 35879, 40719, + ], + 'yóu yín': [20888], + xiě: [20889, 20905, 34267], + jūn: [ + 20891, 21531, 22343, 26750, 27758, 30386, 30392, 30393, 30853, 33689, 34448, + 34944, 35232, 36557, 37406, 37505, 37534, 37717, 38055, 38965, 39862, 40106, + 40591, + ], + mí: [ + 20894, 25823, 28720, 29218, 29461, 29564, 31074, 31152, 32315, 33982, 34252, + 34346, 34364, 34990, 35448, 35598, 36855, 37274, 37310, 37311, 37316, 38270, + 40461, 40586, 40587, 40603, + ], + 'guān guàn': [20896, 35212, 35251, 35264, 35266], + měng: [ + 20897, 21200, 25077, 25529, 29467, 29556, 33355, 34594, 34835, 37683, 38192, + 39917, 40710, + ], + zhǒng: [20898, 22618, 23600, 27505, 28996, 30215, 32959, 33131, 36405], + zuì: [ + 20899, 23989, 26220, 26368, 26668, 27100, 27271, 27276, 31101, 32074, 32618, + 34142, 36768, 37204, 37243, 37257, 37642, + ], + yuān: [ + 20900, 21064, 22246, 23357, 23491, 26857, 28149, 28161, 28166, 28170, 28181, + 28737, 30498, 32921, 33918, 33964, 34574, 34613, 39372, 40182, 40219, 40311, + 40482, 40499, 40531, 40728, 40733, + ], + míng: [ + 20901, 21517, 26126, 26269, 26393, 27040, 27962, 28319, 29501, 30464, 30515, + 30609, 33559, 34719, 35245, 35450, 37133, 37528, 38125, 40180, 40483, + ], + kòu: [ + 20902, 21481, 23484, 23495, 25187, 25922, 28401, 31387, 31576, 31750, 34098, + 34107, 37350, 40391, + ], + tài: [ + 20909, 22826, 22835, 24562, 24577, 24907, 27760, 27761, 27888, 28313, 32957, + 33318, 37214, 37414, 38043, + ], + 'féng píng': [20911, 39342], + 'chōng chòng': [20914], + kuàng: [ + 20917, 22329, 22745, 23730, 25068, 26103, 26175, 26336, 26694, 27841, 29196, + 30486, 30518, 30719, 30783, 31014, 31340, 32075, 32086, 32394, 32425, 36026, + 36150, 36582, 37021, 37178, 37489, 37595, 37979, 40651, + ], + lěng: [20919], + pàn: [ + 20920, 21028, 21467, 27804, 27886, 28351, 28813, 29257, 30036, 30460, 32833, + 34978, 35195, 35402, 37612, 38011, 38934, 40293, + ], + fā: [20921, 24386, 27831, 30330, 30332], + xiǎn: [ + 20924, 23583, 23584, 23812, 23982, 24176, 25863, 26174, 27382, 27624, 28774, + 28877, 29177, 29405, 29443, 29547, 29550, 29569, 31122, 31557, 31666, 34259, + 34330, 34476, 34566, 35683, 36219, 36323, 37708, 38505, 38522, 38570, 38853, + 38997, 39023, + ], + qià: [20926, 22326, 24098, 24688, 27534, 27965, 30792, 32994, 39618], + 'jìng chēng': [20928, 20936, 28136], + sōu: [ + 20929, 21974, 24256, 24267, 25436, 25628, 25673, 28338, 29504, 33368, 33936, + 34699, 37131, 37273, 37802, 38204, 39100, 39125, 39231, 39306, 39466, + ], + měi: [ + 20930, 23172, 23226, 23309, 23876, 25396, 27598, 27599, 28028, 28220, 29144, + 32654, 36542, 37762, 38209, 40675, + ], + tú: [ + 20931, 22259, 22270, 22294, 22295, 22615, 23648, 23801, 23902, 24233, 24284, + 24466, 24711, 25580, 28034, 30223, 31585, 33135, 33660, 33956, 36351, 36884, + 37236, 37423, 37710, 39327, 39420, 40268, 40351, 40395, 40437, + ], + zhǔn: [20934, 20950, 22523, 28310], + 'liáng liàng': [20937, 28092, 37327], + diāo: [ + 20939, 20993, 21023, 21500, 22877, 24372, 24427, 27720, 29745, 30857, 31763, + 34413, 34497, 35970, 37677, 38613, 39817, 39899, 40119, 40304, 40742, + ], + còu: [20945, 28234, 33120, 36659, 36751], + ái: [20946, 21824, 22026, 25457, 28336, 30284, 30353, 30362], + duó: [20953, 21099, 22842, 22890, 30181, 36401, 37420, 37944, 38094], + dú: [ + 20959, 21301, 23355, 26911, 27357, 27568, 28060, 29261, 29272, 29322, 29346, + 29420, 29544, 29892, 30398, 35067, 35501, 35712, 35743, 35908, 36117, 37654, + 37983, 38855, 38883, 38885, 39475, 39633, 40681, 40695, + ], + 'jǐ jī': [20960], + fán: [ + 20961, 20962, 20963, 21285, 22694, 26443, 26569, 26853, 27146, 28735, 28902, + 29033, 29140, 29856, 30718, 31020, 31538, 31861, 32208, 32691, 33316, 33319, + 34208, 34345, 34844, 35150, 36463, 37353, 37895, 37922, 38034, 40429, + ], + jū: [ + 20965, 21258, 23093, 23150, 23621, 23820, 25221, 25398, 25516, 26798, 26896, + 27275, 27625, 27633, 27843, 28090, 29401, 29722, 30141, 30752, 32605, 33106, + 33357, 34587, 35070, 35530, 36308, 36376, 36537, 38513, 38606, 38816, 38827, + 39378, 39545, 39816, 40225, 40331, + ], + 'chù chǔ': [20966, 22788], + zhǐ: [ + 20970, 21159, 21675, 22336, 22375, 24075, 24649, 25210, 25351, 26088, 26547, + 27490, 27750, 27802, 27924, 28157, 30139, 30731, 31049, 31190, 32025, 32440, + 33463, 33547, 34274, 34937, 35175, 35368, 36286, 36601, 36725, 37231, 38447, + 40697, + ], + píng: [ + 20973, 20980, 21615, 22378, 22592, 23740, 24097, 24114, 24136, 24179, 24959, + 24977, 26544, 27956, 28969, 29622, 29942, 29953, 31470, 31667, 31752, 32574, + 33619, 33805, 34033, 34482, 34530, 35413, 35780, 36607, 36647, 37105, 39811, + 40070, + ], + kǎi: [ + 20975, 20977, 21056, 21108, 22450, 22607, 24698, 24887, 24936, 26271, 33928, + 36614, 37703, 37799, 38112, 38196, 38355, 38399, 39101, + ], + gān: [ + 20978, 22377, 23602, 23604, 23606, 23607, 26577, 27860, 28455, 29589, 29976, + 30131, 30712, 31487, 31608, 31891, 32925, 33527, 36800, 37200, 39760, + ], + 'kǎn qiǎn': [20981], + tū: [ + 20984, 22551, 23936, 25464, 28043, 28261, 30172, 31167, 31171, 31361, 33878, + 37621, 40282, 40757, + ], + 'āo wā': [20985], + chū: [20986, 21021, 23680, 25716, 27019, 27159, 35993, 40803], + dàng: [ + 20988, 22325, 22449, 22731, 26723, 27284, 27705, 29847, 29949, 30442, 30602, + 30720, 30893, 30993, 31772, 33633, 33770, 34153, 34351, 36260, 36927, 38652, + ], + hán: [ + 20989, 20990, 21547, 22277, 23074, 23506, 23841, 26199, 26770, 27995, 28085, + 28559, 28947, 29696, 29981, 31592, 34604, 37015, 37039, 37601, 38867, 38889, + ], + záo: [20991, 38015], + dāo: [20992, 20994, 24521, 27672, 33312, 34729, 37334, 39771, 40061], + chuāng: [20997, 25680, 29262, 29269, 30126, 30241, 31379, 31383, 31419], + 'fēn fèn': [20998], + 'qiè qiē': [20999], + kān: [21002, 21208, 22570, 25121, 26654, 40853, 40859], + cǔn: [21004, 24534], + chú: [ + 21005, 21416, 24174, 24282, 27249, 27337, 27365, 28353, 29331, 31720, 32801, + 33467, 33954, 33965, 34573, 34805, 35936, 36238, 36464, 36487, 36501, 37455, + 37604, 38148, 38500, 38607, 38619, 40373, + ], + 'huà huá': [21010], + lí: [ + 21013, 21075, 21114, 21145, 21400, 21937, 22175, 22212, 23264, 23415, 24306, + 24737, 26792, 26808, 26819, 28435, 28757, 29313, 29314, 29432, 29709, 29827, + 29896, 30432, 30557, 31163, 31346, 31472, 31587, 31729, 31852, 31950, 32301, + 32545, 32633, 33347, 33650, 33758, 34016, 34110, 34268, 34362, 34570, 34765, + 34808, 34859, 35125, 35623, 35981, 37288, 37611, 37637, 37867, 37975, 38626, + 39530, 39562, 39887, 39916, 40058, 40097, 40313, 40477, 40514, 40654, 40679, + ], + yuè: [ + 21014, 23347, 23684, 23731, 23997, 24689, 24709, 24742, 25097, 25224, 25459, + 26376, 27198, 28729, 29210, 29605, 31039, 31156, 31703, 31814, 31845, 31856, + 31908, 31925, 34341, 34446, 34447, 35500, 36234, 36288, 36291, 36493, 36559, + 37381, 37470, 38000, 38074, 38321, 38322, 38405, 40465, 40473, 40678, 40864, + ], + liú: [ + 21016, 21129, 22176, 23225, 23911, 26056, 26066, 27060, 27210, 27969, 27983, + 28687, 29705, 29792, 29804, 29858, 30020, 30041, 30065, 30081, 30244, 30277, + 30827, 33957, 33989, 34761, 35031, 37775, 37840, 37890, 38240, 39104, 39109, + 39127, 39392, 39413, 39470, 39505, 39581, 39969, 40377, 40544, 40589, + ], + zé: [ + 21017, 21063, 21863, 22038, 23271, 24123, 24152, 25246, 27149, 27509, 27810, + 27854, 28333, 30367, 30612, 30688, 30987, 31654, 31744, 33332, 34102, 34828, + 35159, 35630, 36094, 36188, 36846, 40453, 40794, 40816, + ], + 'chuàng chuāng': [21019, 21109], + qù: [21022, 21434, 21435, 38324, 38339, 38418, 40622, 40705], + 'bié biè': [21029, 21035], + 'páo bào': [21032], + 'chǎn chàn': [21036, 21079, 24157], + guā: [ + 21038, 21120, 26736, 27460, 29041, 29916, 32973, 36411, 39082, 39091, 39463, + 40240, 40505, + ], + gēng: [ + 21039, 24218, 26921, 28013, 28991, 30026, 32090, 32686, 32697, 32789, 33774, + 36065, 36179, 40330, 40530, + ], + dào: [ + 21040, 22133, 24764, 26913, 27300, 29182, 29913, 30423, 30428, 31282, 31291, + 32411, 32767, 33364, 33791, 34908, 34911, 36551, 36947, + ], + chuàng: [21041, 21071, 21081, 24582, 24884], + kū: [ + 21043, 21741, 22288, 22528, 26543, 26701, 30715, 31391, 36301, 37056, 39607, + 39852, + ], + duò: [ + 21044, 21057, 22703, 23598, 24816, 24988, 25349, 26711, 33333, 36325, 36346, + 38474, 38479, 39167, 39283, 40317, + ], + 'shuā shuà': [21047], + 'quàn xuàn': [21048], + 'chà shā': [21049, 21070], + 'cì cī': [21050], + guì: [ + 21053, 21055, 21130, 21132, 25740, 25904, 26123, 26690, 26914, 27126, 27195, + 27331, 29476, 31148, 31552, 34005, 35160, 36020, 36149, 36330, 37888, 37966, + 38844, 40022, 40037, + ], + lóu: [ + 21061, 23044, 23105, 24276, 27004, 27155, 28295, 28426, 29089, 32807, 32812, + 33371, 33932, 34078, 34684, 34747, 35633, 36545, 36977, 38843, 39621, 39631, + ], + cuò: [ + 21065, 21074, 21405, 22798, 25387, 25514, 26852, 33693, 33697, 33996, 36906, + 37564, 37679, 38153, 38169, + ], + 'xiāo xuē': [21066], + 'kēi kè': [21067, 23557], + 'là lá': [21068], + tī: [21076, 26799, 36386, 37563, 38161, 40392, 40393], + pōu: [21078], + wān: [ + 21084, 22598, 22762, 24117, 24367, 24398, 28286, 28523, 28771, 30549, 34623, + 35916, + ], + 'bāo bō': [21085, 21093], + duō: [21087, 21636, 21702, 22153, 22810, 22811, 25479, 27634, 30035, 35056], + qíng: [ + 21088, 21197, 22813, 24773, 25806, 26228, 26258, 26878, 27144, 27296, 27696, + 29984, 30808, 33885, 40677, + ], + 'yǎn shàn': [21089], + 'dū zhuó': [21090], + yān: [ + 21094, 23267, 23846, 23958, 24697, 25045, 25064, 27182, 28106, 28153, 28473, + 28895, 28937, 28945, 29017, 29658, 31734, 33005, 33241, 33784, 37154, 37251, + 38329, 38409, 40683, + ], + huō: [21096, 21136, 21529, 25865, 31220, 32800, 38186, 39454], + shèng: [ + 21097, 21104, 21213, 22307, 22701, 23882, 26208, 27066, 27251, 29726, 32854, + 34114, 36025, 36088, + ], + 'duān zhì': [21100], + wū: [ + 21101, 21596, 21978, 22316, 23627, 24043, 24345, 26439, 27469, 27737, 27738, + 27745, 27967, 28879, 31375, 31676, 34704, 35464, 35491, 35820, 37036, 37140, + 37794, 38056, 39966, 40238, + ], + gē: [ + 21106, 21733, 22314, 24385, 25096, 25107, 25128, 27468, 28370, 29365, 32912, + 35004, 35596, 37814, 40218, 40255, 40509, + ], + 'dá zhá': [21107], + chuán: [21110, 26295, 26941, 31685, 33313, 33321, 33337, 36658, 36932], + 'tuán zhuān': [21112, 28441, 31743], + 'lù jiū': [21113], + pēng: [ + 21115, 21257, 22061, 24614, 24690, 25256, 26760, 28921, 30768, 36591, 39373, + ], + piāo: [ + 21117, 21217, 24915, 26074, 29349, 32754, 34741, 39107, 39108, 39128, 39762, + ], + kōu: [21118, 24388, 25248, 25715, 30477, 30616, 33444], + 'jiǎo chāo': [21119, 21131, 21222, 25719], + qiāo: [ + 21121, 21226, 22685, 24167, 25970, 27207, 27587, 29126, 30807, 30973, 32337, + 36268, 36343, 36365, 36474, 36475, 37115, 37153, 37157, 37739, 37740, 37936, + 38201, 38941, + ], + 'huá huà': [21123], + 'zhā zhá': [21124], + 'pī pǐ': [21128, 24706], + tāng: [21135, 22049, 32688, 34202, 34666, 36442, 38842, 40734], + chán: [ + 21142, 22197, 22757, 23157, 23307, 24009, 24283, 26830, 27610, 28281, 28537, + 28538, 28598, 28685, 28730, 29016, 29521, 30939, 32254, 32399, 32402, 32544, + 33388, 34633, 34768, 34796, 34814, 35479, 35730, 35863, 36500, 37181, 37185, + 37579, 38001, 38261, 39262, 39307, + ], + zuān: [21143, 36508, 36518, 37446, 37978], + mó: [ + 21144, 23275, 23332, 23351, 23579, 25721, 25845, 27205, 31970, 33180, 34278, + 34321, 35624, 35625, 35871, 39235, 39261, 39309, 39629, 39764, 39801, + ], + zhú: [ + 21146, 26040, 26351, 27416, 28767, 28834, 28891, 29165, 29221, 30211, 31481, + 31489, 31516, 33331, 33599, 34027, 34827, 34878, 36485, 36880, 36907, 38019, + 40001, + ], + quàn: [21149, 21223, 21240, 29302, 38863], + 'jìn jìng': [21156, 21170, 21185], + kēng: [ + 21157, 22353, 29308, 30785, 30812, 35481, 37557, 37726, 37847, 38143, 38444, + ], + 'xié liè': [21158], + 'zhù chú': [21161], + nǔ: [21162, 24361, 30766, 33004], + shào: [21165, 21362, 21736, 28530, 32057, 32164, 32461, 34961, 37045], + miǎo: [ + 21168, 26474, 28156, 28218, 30471, 31186, 31694, 32242, 32520, 34256, 37000, + ], + kǒu: [21174, 21475], + wā: [ + 21176, 22380, 23090, 23207, 23666, 25366, 25896, 27964, 28315, 28453, 29950, + 30038, 31349, 31370, 31402, 34521, 38856, 40707, + ], + kuāng: [ + 21179, 21281, 21289, 21712, 24647, 27949, 31568, 31610, 35462, 35795, 36589, + 37052, + ], + hé: [ + 21182, 21642, 21853, 22976, 23750, 25926, 26359, 26567, 26945, 27644, 27827, + 28088, 28206, 28565, 29062, 30380, 30407, 30409, 30413, 30418, 31166, 31701, + 31866, 31917, 32750, 33743, 33794, 35208, 35384, 35429, 37059, 37339, 37452, + 37961, 38305, 38356, 38402, 38422, 38824, 38940, 39172, 39288, 39802, 40534, + 40615, 40789, 40833, 40866, + ], + gào: [ + 21186, 21567, 21578, 23804, 31086, 31088, 31134, 31606, 35493, 35824, 37084, + 37615, 38150, + ], + 'bó bèi': [21187], + láng: [ + 21190, 23247, 24266, 25999, 26745, 27028, 27139, 27444, 29436, 29701, 29807, + 30816, 31234, 33350, 33992, 34571, 34690, 36532, 37074, 37086, 37571, 37807, + 38162, + ], + xūn: [ + 21195, 21211, 21234, 21235, 22161, 22339, 22489, 22628, 22734, 22758, 26331, + 29179, 29551, 30660, 32385, 33232, 34219, 34224, 34317, 37306, + ], + 'juàn juān': [21196, 29945], + 'lè lēi': [21202], + kài: [21203, 28812, 28887, 37774], + 'wěng yǎng': [21212], + qín: [ + 21220, 21994, 22105, 23964, 24200, 25027, 25028, 25446, 25810, 26035, 27278, + 28607, 29665, 29748, 29753, 30269, 31165, 31206, 32825, 33449, 33465, 33766, + 34707, 34820, 37401, 37419, 38594, 38770, 40185, 40301, + ], + jiàng: [ + 21221, 21278, 21280, 23929, 24348, 24374, 25726, 27364, 27930, 28400, 29343, + 31969, 31976, 32115, 32475, 35645, 37233, 37284, 37292, + ], + fān: [ + 21227, 23311, 24070, 24161, 24539, 24995, 26073, 26075, 32345, 32763, 34281, + 36691, 39103, 39132, 40021, + ], + juān: [ + 21228, 23010, 23071, 25424, 28051, 34866, 35024, 37816, 37931, 38220, 40515, + ], + 'tóng dòng': [21229, 28884, 29137, 29418], + lǜ: [ + 21236, 22415, 23874, 24459, 24942, 27695, 28388, 28670, 29192, 31675, 32160, + 32322, 33183, 33870, 34385, 37986, + ], + chè: [ + 21238, 22396, 24443, 24505, 25507, 25764, 28552, 28898, 29217, 30638, 30825, + 32837, 36832, 38937, + ], + sháo: [21242, 29631, 38902], + 'gōu gòu': [21246], + cōng: [ + 21254, 22250, 22257, 24553, 24625, 24740, 26288, 27180, 28439, 29821, 29825, + 30619, 31733, 32369, 32865, 32870, 32874, 32880, 33473, 33552, 33905, 34031, + 34085, 34764, 37743, 37843, 37862, 39448, 39492, 39586, + ], + 'táo yáo': [21259, 38518], + páo: [ + 21263, 21638, 22409, 24214, 29230, 29389, 34957, 35100, 36595, 38788, 40581, + ], + dá: [ + 21266, 22962, 24603, 28831, 29173, 30051, 31530, 32653, 33625, 34200, 34813, + 35418, 36798, 36815, 36822, 36826, 36921, 36948, 37949, 38780, 38801, 38851, + 40854, 40856, + ], + 'huà huā': [21270], + 'běi bèi': [21271], + nǎo: [ + 21272, 22452, 22550, 23248, 24700, 24745, 24817, 29785, 30895, 33041, 33075, + 33126, + ], + 'chí shi': [21273], + fāng: [ + 21274, 22543, 26041, 28115, 29285, 33459, 37025, 37377, 37690, 38059, 40203, + ], + zā: [21277, 21634, 24064, 27806, 33244, 33250, 36810, 37460, 39795], + qiè: [ + 21287, 21394, 22974, 24623, 24719, 24812, 24860, 25352, 31317, 31363, 31434, + 31521, 31655, 31691, 31841, 36389, 37733, 38194, 39900, + ], + 'zāng cáng': [21288], + fěi: [21290, 22876, 24753, 26832, 27047, 31706, 32737, 34140, 35513, 35837], + 'kuì guì': [21294, 21297], + suǎn: [21300], + pǐ: [ + 21305, 22141, 22189, 22318, 24192, 30174, 30294, 33076, 33481, 37538, 40196, + ], + 'qū ōu': [21306, 21312], + 'kē qià': [21308], + 'yǎn yàn': [21309, 26858], + biǎn: [ + 21310, 24828, 25561, 30885, 31272, 31366, 34250, 35082, 36022, 36140, 40216, + ], + nì: [ + 21311, 22532, 23263, 23354, 24772, 24885, 26165, 26289, 27708, 30500, 30568, + 32268, 32978, 33147, 33193, 36870, + ], + niàn: [21316, 21816, 22493, 24319, 24565, 24791, 33356], + sà: [ + 21317, 27346, 33038, 33832, 34159, 34217, 37394, 38561, 39087, 39122, 39354, + ], + zú: [21318, 21739, 23850, 26063, 31652, 36275, 36388, 38238], + shēng: [ + 21319, 21583, 22768, 26008, 26119, 26363, 26529, 27525, 27881, 28262, 28986, + 29298, 29636, 29983, 29989, 31444, 31513, 32882, 37454, 37727, 38441, 38494, + 38521, 40319, 40746, + ], + wàn: [ + 21325, 21328, 24552, 26468, 30627, 33045, 33109, 33836, 34755, 36110, 36624, + 37693, + ], + 'huá huà huā': [21326, 33775], + bēi: [21329, 24754, 25593, 26479, 26734, 30403, 30865, 34275, 40303, 40526], + 'zú cù': [21330], + 'dān shàn chán': [21333, 21934], + 'nán nā': [21335], + 'shuài lǜ': [21339], + 'bǔ bo pú': [21340], + 'kuàng guàn': [21341], + biàn: [ + 21342, 21464, 22793, 23749, 24321, 24487, 24557, 25219, 26154, 27763, 27764, + 29603, 33361, 33476, 35213, 35546, 35722, 36769, 36775, 36776, 36777, 36779, + 36782, 36783, 36941, 37318, + ], + bǔ: [21343, 21754, 25429, 34917, 35036, 40468], + 'zhàn zhān': [21344, 35249], + 'kǎ qiǎ': [21345], + lú: [ + 21346, 22183, 22406, 22746, 24208, 24300, 26341, 26534, 26636, 27368, 27896, + 28696, 28809, 29200, 29561, 29576, 29904, 30439, 30673, 31834, 32401, 32591, + 33002, 33242, 33326, 33339, 33387, 33446, 34310, 34854, 36708, 36723, 37417, + 37994, 39025, 39045, 39359, 39639, 39794, 40056, 40072, 40469, 40492, 40696, + ], + lǔ: [ + 21348, 22647, 25523, 25796, 27152, 27257, 27347, 27660, 28407, 28571, 28674, + 30837, 30944, 31326, 33379, 33386, 34046, 34383, 34396, 37824, 37930, 37989, + 38245, 39791, 40065, 40565, + ], + guà: [21350, 21865, 25346, 25499, 32611, 35074, 35455, 35798], + 'áng yǎng': [21356], + yìn: [ + 21360, 22461, 22583, 24277, 24941, 24982, 24983, 25050, 27925, 28250, 29452, + 30282, 32996, 33562, 37235, 39843, + ], + què: [ + 21364, 21371, 22617, 23813, 24747, 24872, 24932, 25609, 27063, 29161, 29751, + 30389, 30830, 30906, 31021, 38347, 38421, 40306, 40522, + ], + luǎn: [21365], + 'juàn juǎn': [21367, 24059], + 'chǎng ān hàn': [21378], + 'wěi yán': [21379], + tīng: [ + 21381, 21403, 21548, 24193, 24304, 24307, 27712, 28867, 28916, 32142, 32787, + 32884, 32892, 32893, 38803, + ], + 'zhé zhái': [21383], + 'hàn àn': [21384, 23677], + yǎ: [21386, 21782, 24204, 30166, 30210, 34149], + shè: [ + 21389, 21401, 24381, 24913, 24948, 25086, 25666, 27399, 28041, 28091, 28169, + 28384, 28740, 31038, 33294, 34062, 34818, 35373, 35774, 36198, 39431, 40605, + ], + dǐ: [ + 21390, 21607, 22360, 24356, 25269, 25310, 25483, 29300, 30757, 33767, 35293, + 35398, 35787, 36583, 37048, 38458, 39606, 39923, + ], + 'zhǎ zhǎi': [21391], + páng: [ + 21392, 23246, 24222, 24492, 33152, 33341, 34691, 36868, 39967, 40145, 40846, + 40848, + ], + 'zhì shī': [21396], + máng: [ + 21398, 21506, 21732, 23055, 24537, 24702, 26455, 26471, 27730, 27997, 29307, + 30173, 30450, 30829, 31488, 33426, 33579, 34313, 37017, 37359, 37609, 38099, + 39417, + ], + zuī: [21404, 27190, 32407, 34773], + 'shà xià': [21414, 24264], + áo: [ + 21419, 22007, 22008, 24274, 25942, 28406, 29522, 29523, 29832, 32753, 32758, + 32762, 32881, 34076, 34735, 35639, 35640, 36968, 37846, 38558, 39986, 40140, + 40404, 40711, + ], + 'lán qiān': [21425], + 'sī mǒu': [21430], + 'gōng hóng': [21431], + 'lín miǎo': [21432], + 'qiú róu': [21433], + dū: [21438, 22047, 30563, 37263], + 'xiàn xuán': [21439, 32291], + 'cān shēn cēn sān': [21442, 21443, 21444, 21445], + 'ài yǐ': [21446], + 'chā chà chǎ chá': [21449], + shuāng: [ + 21452, 23360, 23367, 27398, 31029, 33389, 38617, 38684, 39483, 39526, 39590, + 40414, 40472, 40564, + ], + shōu: [21454, 25910], + guái: [21455], + bá: [ + 21456, 22957, 25244, 25300, 28838, 30329, 32968, 33543, 33757, 35417, 36299, + 36599, 39747, 40741, + ], + 'fā fà': [21457], + 'zhuó yǐ lì jué': [21461], + qǔ: [21462, 23094, 31468, 34682, 35411, 40818, 40843], + 'jiǎ xiá': [21466, 24486], + 'wèi yù': [21470, 23561, 34074], + dié: [ + 21472, 22436, 22558, 23756, 24137, 24654, 24821, 25116, 26337, 27548, 27662, + 29251, 29266, 29918, 30067, 30082, 30089, 30090, 30879, 32112, 32470, 32778, + 32779, 32965, 33363, 33525, 34600, 34678, 35083, 35396, 35548, 35853, 36334, + 36416, 36845, 38267, 39944, 40125, 40233, + ], + ruì: [ + 21473, 26520, 27757, 29790, 30591, 33454, 34443, 34617, 37555, 37613, 38160, + ], + 'jù gōu': [21477], + lìng: [21478, 21604, 28841, 34342], + 'dāo dáo tāo': [21480], + 'zhī zhǐ': [21482], + jiào: [ + 21483, 21580, 22018, 22054, 22093, 23315, 25997, 26016, 28376, 28438, 29541, + 29651, 30381, 31382, 34272, 35334, 35685, 36269, 36611, 36686, 36735, 36739, + 37237, 37294, 37314, + ], + 'zhào shào': [21484], + 'kě kè': [21487], + 'tái tāi': [21488, 33492], + pǒ: [21493, 23552, 31544, 31653, 37461, 38071, 39370], + 'yè xié': [21494], + 'hào háo': [21495], + tàn: [21497, 22022, 25506, 27470, 28256, 28845, 30899, 33301], + 'hōng hóng': [21503], + miē: [21504, 21673, 21750, 23405], + 'xū yū yù': [21505], + chī: [ + 21507, 21735, 21931, 21988, 22084, 22939, 23224, 24424, 24434, 25691, 25889, + 27558, 29947, 30196, 30305, 30517, 30621, 31518, 31898, 33013, 34473, 34733, + 35381, 39761, 40223, 40260, 40497, 40656, 40797, + ], + 'xuān sòng': [21509], + yāo: [ + 21510, 21907, 22829, 22934, 24186, 26950, 27520, 31045, 33136, 33917, 35358, + 36992, 40193, 40226, + ], + zǐ: [ + 21511, 22985, 22986, 23376, 26445, 26771, 27039, 27252, 28371, 30711, 31213, + 31531, 31869, 32043, 32788, 34424, 35391, 37352, + ], + 'hé gě': [21512, 40068], + 'cùn dòu': [21515], + 'tóng tòng': [21516], + 'tǔ tù': [21520, 21771], + 'zhà zhā': [21522, 22867], + 'xià hè': [21523], + 'ā yā': [21526], + 'ma má mǎ': [21527], + lìn: [ + 21533, 24673, 24715, 27209, 28955, 29968, 33190, 34106, 34298, 36035, 36161, + 36472, 36495, 36505, 36522, 36709, 38325, + ], + tūn: [21534, 26302, 26396, 28958], + 'bǐ pǐ': [21537], + qìn: [ + 21538, 21539, 21786, 25227, 25599, 25607, 25779, 27777, 28697, 33763, 34301, + ], + 'jiè gè': [21540], + 'fǒu pǐ': [21542], + 'ba bā': [21543], + dūn: [ + 21544, 22136, 22697, 22698, 24775, 25737, 25780, 29340, 29540, 30981, 34611, + 36478, 39504, + ], + fēn: [ + 21545, 24073, 26128, 26374, 26788, 26875, 27675, 31445, 32027, 32439, 32706, + 33452, 34927, 35356, 36526, 37210, 37398, 38640, 39220, 39257, 39322, + ], + 'é huā': [21546], + 'kēng háng': [21549, 22932], + shǔn: [21550], + 'zhī zī': [21553], + 'yǐn shěn': [21554], + wú: [ + 21555, 21556, 21577, 22706, 23807, 26791, 27206, 27595, 27926, 28015, 28961, + 29688, 29841, 31078, 33436, 33571, 33665, 34154, 34568, 34801, 35669, 37082, + 37593, 38139, 39875, 40272, 40417, 40512, 40751, + ], + 'chǎo chāo': [21557], + 'nà nè': [21558], + 'xuè chuò jué': [21559], + chuī: [21561, 28810, 40865], + 'dōu rú': [21562], + hǒu: [21564, 29372], + 'hōng hǒu ōu': [21565], + 'wú yù': [21566], + 'ya yā': [21568], + 'è e': [21571], + dāi: [21574, 25051, 29507], + 'mèn qǐ': [21575], + hōng: [ + 21581, 22173, 25544, 28788, 28888, 28962, 30817, 34216, 35335, 35902, 36579, + 36663, 36703, 36720, 37735, + ], + nà: [ + 21584, 25466, 31517, 32013, 32435, 32941, 33971, 34930, 35965, 35968, 36572, + 37069, 37385, 38048, 38777, 39798, + ], + 'tūn tiān': [21585], + 'fǔ ḿ': [21586, 22072], + 'dāi tǎi': [21588], + 'ǒu ōu òu': [21589], + 'bài bei': [21591], + 'yuán yún yùn': [21592, 21729], + guō: [ + 21593, 21871, 22035, 22490, 22557, 22670, 23838, 24393, 24397, 25046, 29459, + 30225, 32850, 34632, 34760, 37101, 37403, 37707, 38149, + ], + 'huá qì': [21594], + 'qiàng qiāng': [21595, 36292], + shī: [ + 21598, 22833, 23608, 23629, 24072, 24107, 26045, 27977, 28260, 28287, 28334, + 28348, 28629, 29422, 29509, 29793, 32065, 33913, 33938, 33997, 34417, 34664, + 35127, 35193, 35433, 35799, 37055, 37315, 37447, 37734, 39924, 39972, 40122, + 40178, 40190, 40371, 40484, + ], + juǎn: [21599, 22477, 33223, 33764, 37640, 38185], + pěn: [21600, 32760], + 'wěn mǐn': [21601], + 'ne ní': [21602], + 'ḿ m̀ móu': [21603], + rán: [ + 21605, 22059, 28982, 29123, 32334, 32944, 34470, 34490, 34939, 34951, 34977, + 39653, 39663, + ], + 'tiè chè': [21611], + 'qì zhī': [21614], + 'zǐ cī': [21616], + 'guā gū guǎ': [21617], + 'cī zī': [21618], + 'hǒu xǔ gòu': [21620], + 'hē ā á ǎ à a': [21621], + náo: [ + 21622, 22802, 23793, 23977, 24014, 25376, 25747, 29489, 30791, 34546, 34799, + 35401, 35658, 37891, 38105, + ], + 'xiā gā': [21623], + pēi: [21624, 24588, 32935, 32986, 34883, 37253], + 'háo xiāo': [21626], + mìng: [21629, 25525], + 'dá dàn': [21630], + 'zuǐ jǔ': [21632], + 'xián gān': [21633], + pǒu: [21637, 21731, 29315], + 'yǎng yāng': [21641], + 'zǎ zé zhā': [21643], + 'hé hè huó huò hú': [21644], + hāi: [21645], + dā: [21649, 21714, 22112, 22710, 25645, 25752, 32823, 35105, 37789], + 'kǎ kā': [21652], + gū: [ + 21653, 21762, 21763, 22993, 23284, 23396, 24044, 24045, 26599, 27245, 27837, + 27858, 31250, 31519, 31629, 31643, 31696, 32603, 33533, 33735, 33776, 33991, + 35290, 36593, 36594, 36721, 36764, 37220, 37426, 39829, 40227, 40490, + ], + 'kā gā': [21654], + zuo: [21655], + lóng: [ + 21657, 22184, 23952, 24003, 24004, 26173, 26344, 26407, 26634, 27102, 27379, + 28272, 28381, 28427, 29206, 29649, 29903, 30275, 30508, 30675, 30779, 31025, + 31026, 31423, 31452, 32843, 32894, 32999, 33551, 34338, 34858, 34860, 35185, + 35909, 37863, 37992, 38707, 38727, 39521, 40471, 40845, 40850, 40857, + ], + 'xiàn xián': [21662], + qì: [ + 21664, 21805, 22096, 22120, 22817, 24323, 24967, 25001, 26275, 26820, 27435, + 27668, 27671, 27683, 27732, 27773, 27875, 28230, 28231, 28801, 29960, 30453, + 30709, 30875, 30902, 30940, 30951, 32586, 33438, 33914, 34258, 34815, 35350, + 35755, 36804, 37905, + ], + 'xì dié': [21669], + 'liē liě lié lie': [21671], + zī: [ + 21672, 21982, 22997, 23039, 23388, 23411, 23414, 23856, 23915, 26661, 26900, + 28100, 28285, 28363, 28588, 29574, 31116, 31222, 31906, 32014, 32199, 32213, + 32387, 32513, 33546, 33586, 33880, 35566, 35864, 36018, 36039, 36160, 36164, + 36220, 36241, 36262, 36636, 36666, 36750, 37137, 37421, 37657, 37759, 37793, + 38193, 38211, 38974, 38975, 39661, 39892, 39974, 40123, 40325, 40722, 40781, + 40796, 40839, + ], + mī: [21674], + 'jī xī qià': [21677], + 'gē luò kǎ lo': [21679], + 'shù xún': [21680], + 'zán zá zǎ zan': [21681], + 'hāi ké': [21683], + huī: [ + 21684, 22085, 22101, 23118, 23176, 24145, 24509, 24674, 25339, 25381, 25582, + 26198, 26249, 26958, 27907, 28680, 28784, 28787, 28899, 30579, 31112, 32730, + 32748, 34355, 34950, 35096, 35452, 35801, 35927, 36637, 36745, 39988, 40638, + ], + 'huài shì': [21686], + táo: [ + 21687, 21845, 26691, 27310, 27950, 28120, 31097, 32175, 32505, 33796, 34602, + 35050, 36847, 36867, 37252, 37630, 38784, 38793, 39232, 39395, 39434, 40727, + ], + xián: [ + 21688, 21859, 23092, 23097, 23153, 23244, 23290, 23291, 24358, 25382, 25743, + 28046, 28282, 28566, 29961, 30187, 30279, 30286, 32067, 32984, 33335, 34262, + 34495, 34525, 34900, 34904, 35512, 35572, 36066, 36114, 36132, 36657, 37262, + 37532, 37990, 38289, 38386, 40435, 40436, 40444, 40519, 40569, 40601, + ], + 'è àn': [21689], + 'xuān xuǎn': [21690, 28892], + 'wāi hé wǒ guǎ guō': [21692], + 'yàn yè yān': [21693], + āi: [21696, 21710, 22467, 28350, 37552, 37764, 38207], + pǐn: [21697, 27008], + shěn: [ + 21698, 23158, 23352, 23457, 23479, 23529, 24350, 26315, 28182, 28683, 30635, + 30692, 30695, 35262, 35360, 35543, 35717, 35842, 35849, 37029, 38947, 39787, + ], + 'hǒng hōng hòng': [21700], + 'wā wa': [21703], + 'hā hǎ hà': [21704], + zāi: [21705, 26685, 28221, 28328, 28797, 28798, 28886, 30581, 36083], + 'dì diè': [21707], + pài: [21708, 27808, 27966, 28178, 28227, 33934, 37763], + 'gén hěn': [21711], + 'yǎ yā': [21713, 38597], + 'yuě huì': [21717, 22118], + nián: [21718, 24180, 31178, 31205, 39822, 39920, 40071, 40118, 40263, 40655], + 'huá huā': [21719, 22057], + 'jì jiē zhāi': [21724, 22156], + mōu: [21726], + 'yō yo': [21727, 21938], + lòng: [21730, 26759, 36122], + 'ò ó é': [21734], + 'lī lǐ li': [21737], + 'nǎ na nǎi né něi': [21738], + hè: [ + 21740, 22414, 22737, 23497, 24786, 28931, 28994, 29178, 29184, 30283, 30859, + 32751, 35088, 35614, 36032, 36154, 36203, 38733, 38734, 38735, 40372, 40470, + 40548, + ], + 'bō pò bā': [21745], + zhé: [ + 21746, 21856, 21894, 22174, 22481, 24714, 25722, 26210, 26211, 27517, 30714, + 30739, 30932, 31863, 31885, 34420, 34544, 34756, 34985, 35423, 35627, 35642, + 35713, 35723, 35882, 36626, 36633, 36685, 36740, 36761, 39871, + ], + 'liàng láng': [21748], + 'liè lǜ': [21751], + hān: [21755, 25000, 34486, 35901, 37219, 38919, 39032, 39328, 39805, 40766], + 'hēng hng': [21756], + gěng: [ + 21757, 22466, 23802, 25389, 26775, 32134, 32480, 32831, 33668, 37088, 39614, + 39873, 40096, + ], + 'chuò yuè': [21758], + 'gě jiā': [21759], + 'bei bài': [21764], + 'hán hàn': [21765], + chún: [ + 21767, 28017, 28283, 28387, 28440, 29321, 32020, 32431, 33059, 33724, 33939, + 34036, 37255, 37269, 37662, 38489, 39897, 40329, 40529, + ], + 'ài āi': [21769], + 'jiá qiǎn': [21770], + 'yán dàn xián': [21772], + chē: [21779, 30743, 30824, 33687, 34556], + 'wú ńg ń': [21780], + zào: [ + 21781, 21795, 22122, 24933, 26765, 28790, 29040, 29157, 30337, 30338, 31427, + 31432, 31753, 33345, 35679, 36270, 36481, 36896, + ], + dí: [ + 21785, 21831, 22016, 22145, 23265, 24312, 25932, 25973, 26769, 28068, 28364, + 29380, 31515, 31860, 31988, 33494, 33659, 34059, 34064, 34273, 35263, 35276, + 35956, 36842, 38766, 38932, 39344, 39650, 40464, + ], + 'gòng hǒng gǒng': [21789, 21962], + dóu: [21790], + 'lào láo': [21792, 22062, 24998], + huàn: [ + 21796, 21914, 22850, 22864, 23462, 23880, 24187, 24739, 24844, 25442, 25563, + 25808, 25868, 26777, 27125, 28003, 28067, 28185, 28470, 28579, 28873, 28949, + 29029, 29773, 30186, 30227, 30534, 32914, 34279, 35938, 36696, 36909, 39879, + 39926, 39936, 40105, + ], + léng: [21797, 22596, 26974, 30864, 34192], + 'wō wěi': [21801], + fěng: [21802, 35202, 35575, 35773], + 'yín jìn': [21803], + 'hǔ xià': [21804], + wéi: [ + 21807, 22260, 22285, 22749, 23767, 23774, 23916, 24079, 24119, 24131, 24799, + 26693, 27817, 27912, 28064, 28235, 28296, 28493, 28505, 28543, 28656, 29353, + 30656, 32173, 32500, 34038, 35257, 36829, 36949, 37164, 37248, 37711, 38344, + 38385, 38859, 38886, 39840, + ], + shuā: [21808], + chàng: [21809, 24581, 24757, 26274, 28987, 30021, 30076, 35503, 38868, 39727], + 'ér wā': [21810], + qiàng: [21812, 28829, 29079, 32699], + yō: [21815], + yū: [ + 21817, 28132, 30208, 30419, 31626, 32006, 32417, 36796, 36802, 36803, 38483, + ], + lài: [ + 21819, 28625, 28712, 28716, 30302, 30313, 30544, 30558, 31809, 31839, 34302, + 36058, 36084, 36169, 36182, 38972, 38978, 40291, + ], + tuò: [21822, 23966, 26589, 27620, 27643, 31656, 31836, 33818, 34304, 36293], + 'zhōu zhāo tiào': [21825], + kěn: [21827, 22438, 22718, 24691, 25031, 32910, 32943, 32955, 35940, 37689], + 'zhuó zhào': [21829, 28655], + 'hēng hèng': [21832, 24729], + 'lín lán': [21833], + 'a ā á ǎ à': [21834], + qiāng: [ + 21836, 22004, 23944, 25109, 25700, 26024, 26538, 27085, 28332, 29252, 29456, + 29511, 32652, 32663, 33108, 34595, 35602, 37848, 38166, 38197, + ], + 'tūn zhūn xiāng duǐ': [21837], + wèn: [21839, 22927, 25598, 25653, 29882, 38382, 38992], + 'cuì qi': [21840], + 'dié shà jié tì': [21841], + 'yuē wā': [21848], + 'zǐ cǐ': [21849], + 'bǐ tú': [21850], + 'chuò chuài': [21852], + 'yǎ yā è': [21854], + fēi: [ + 21857, 23123, 23124, 25161, 26243, 28164, 29446, 32203, 32495, 35062, 38671, + 38750, 38751, 39131, 39133, 39134, 39205, 39329, 39441, 39451, 39905, 40113, + ], + pí: [ + 21860, 22720, 26503, 27607, 27608, 28983, 29749, 30130, 30382, 31738, 32628, + 32646, 33086, 33111, 33165, 34445, 34493, 34609, 34743, 34863, 35964, 35988, + 37099, 37433, 38448, 38516, 38566, 39790, 39821, 40079, 40295, 40729, + ], + shá: [21861], + 'lā la': [21862], + 'yīng qíng': [21864], + pā: [21866, 22929, 33317, 33897, 36276], + 'zhě shì': [21867], + sè: [ + 21868, 21959, 25038, 25804, 26652, 27502, 28073, 28171, 28544, 28545, 28615, + 28623, 28690, 29791, 29873, 30263, 31313, 31329, 31343, 32364, 35653, 36694, + 37547, 37884, 38127, 39115, + ], + niè: [ + 21870, 21995, 22107, 22169, 22209, 22227, 22332, 23420, 23421, 23922, 23981, + 24021, 24071, 25948, 26559, 27127, 27377, 28037, 28284, 30150, 31710, 31819, + 31985, 31989, 32834, 32886, 33260, 33266, 34326, 34853, 35736, 36354, 36375, + 36377, 36433, 36513, 37660, 37811, 37960, 38007, 38016, 38218, 38221, 38353, + 38503, 38537, 39027, 39070, 40807, + ], + 'luō luó luo': [21872, 22217], + 'tān chǎn tuō': [21876], + bo: [21877, 34068], + dìng: [ + 21878, 23450, 26903, 30708, 30855, 30880, 30968, 32866, 33114, 33827, 34634, + 35330, 35746, 37664, 38189, 38977, 39139, 39268, + ], + lāng: [21879], + 'án ān': [21885], + kā: [21888, 25814], + 'yóng yú': [21889], + 'lā lá lǎ': [21895], + jiē: [ + 21896, 21948, 21983, 22566, 23192, 25509, 25522, 25809, 28253, 29039, 30102, + 30158, 30308, 30342, 31224, 31277, 33083, 34644, 34903, 35631, 38454, 38542, + 38786, 40347, + ], + hóu: [ + 21897, 24127, 29492, 30218, 30586, 31692, 31943, 32749, 33876, 37127, 37741, + 39217, 39610, 39928, + ], + 'dié zhá': [21899], + wāi: [21902, 27498, 31477], + 'nuò rě': [21903], + 'xù huò guó': [21904], + zán: [21906], + 'wō ō': [21908], + hú: [ + 21910, 22045, 22251, 22774, 22775, 22778, 23209, 24359, 25648, 26011, 26972, + 27122, 28246, 28715, 28928, 29043, 29392, 29474, 29786, 29939, 31670, 32087, + 32288, 32993, 33899, 34075, 34676, 34716, 34906, 35315, 37264, 37752, 38966, + 39212, 39693, 39793, 39959, 40288, 40344, 40358, 40533, + ], + 'huàn yuán xuǎn hé': [21915], + xǐ: [ + 21916, 22221, 22736, 23651, 24473, 24985, 26546, 27250, 27478, 28423, 29626, + 29885, 30678, 31143, 32304, 33864, 33912, 34032, 34786, 35601, 36445, 36519, + 37410, 37480, 37481, 40026, + ], + 'hē hè yè': [21917], + kuì: [ + 21919, 22067, 23231, 23303, 24870, 24871, 24978, 31697, 31779, 31812, 32873, + 32877, 32885, 33197, 34146, 35593, 39229, 39243, 39304, + ], + 'zhǒng chuáng': [21920], + 'wéi wèi': [21921, 28858, 29234], + 'duó zhà': [21925], + 'sāng sàng': [21930], + 'qiáo jiāo': [21932], + 'pèn bēn': [21935], + 'cān sūn qī': [21936], + 'zhā chā': [21939], + miāo: [21941], + 'pēn pèn': [21943], + kuí: [ + 21945, 22804, 22862, 24025, 25123, 25542, 26182, 26252, 26959, 26961, 27334, + 29354, 30589, 33909, 34248, 34359, 34369, 34672, 36520, 36917, 37128, 37736, + 37751, 38959, 39319, 39460, 39577, 39745, + ], + 'lou lóu': [21949], + 'zào qiāo': [21951], + 'hè xiāo xiào hù': [21955], + 'á shà': [21956], + xiù: [ + 21957, 23723, 23744, 28340, 29659, 29703, 29843, 31168, 32137, 32333, 32353, + 32483, 34705, 34966, 35086, 35087, 37561, 37861, 37885, 38152, 40773, + ], + 'qiāng qiàng': [21958, 25111, 25127, 36428, 36449], + 'ài yì': [21964, 33406], + 'má mǎ ma': [21966], + 'kè kē': [21969], + 'dā tà': [21970, 37769], + sǎng: [21971, 25633, 30921, 35116, 37791, 39001, 39073], + chēn: [21972, 25275, 29723, 30603, 35523, 35603, 36061, 37108], + 'wā gǔ': [21975], + 'pǎng bēng': [21977], + 'xián qiǎn qiān': [21979], + lào: [21984, 23274, 27247, 28061, 28551, 32802, 32814, 36540, 36546, 37226], + wēng: [21985, 32705, 32876, 34697, 37779, 40370, 40543], + wà: [21986, 33149, 33155, 34972, 35178, 38884], + 'hēi hāi': [21992], + hē: [21996, 27441, 34842, 35382, 35779], + zi: [21997], + sǎi: [21998], + 'ǹg ńg ňg': [21999], + gě: [22000, 33336], + ná: [22001, 25295, 25343, 37823, 38222], + diǎ: [22002], + 'ài ǎi āi': [22003], + tōng: [22005, 27147, 28853, 34026], + 'zuī suī': [22010], + 'zhē zhè zhù zhe': [22011], + mò: [ + 22012, 22333, 22651, 22696, 22970, 23292, 23518, 24094, 26153, 26411, 26554, + 27519, 27521, 27819, 28448, 29189, 29519, 30268, 30348, 30525, 30527, 30608, + 30617, 30750, 31027, 31203, 32072, 32390, 32817, 33545, 33672, 34022, 34536, + 34772, 35971, 35978, 35992, 37510, 37836, 38214, 38476, 38778, 39488, 39785, + 40664, 40665, + ], + sòu: [22013, 30262], + tǎn: [ + 22015, 22374, 24528, 25011, 25019, 26298, 27631, 29870, 33788, 34962, 35170, + 37267, 37485, 38077, + ], + 'jiào dǎo': [22020], + 'kǎi gě': [22021], + 'shān càn': [22023], + cáo: [ + 22024, 23942, 26361, 26362, 27133, 28437, 33370, 34040, 34732, 35135, 37866, + ], + piào: [22028, 24497, 34056, 39491], + 'lóu lou': [22029], + gǎ: [22030, 23573, 29581], + 'gǔ jiǎ': [22031], + 'jiāo xiāo': [22032], + 'xū shī': [22040, 22099], + pó: [22041, 22185, 23110, 27335, 30372, 37169], + 'dē dēi': [22042], + 'ma má': [22043], + 'lē lei': [22046], + 'gā gá gǎ': [22048], + sāi: [22053, 22139, 27618, 33134, 38987, 39955], + 'zuō chuài': [22060], + 'cháo zhāo': [22066, 26397, 40706], + zuǐ: [22068, 22143, 23946, 29883], + 'qiáo qiào': [22074, 32761, 35887], + 'chù xù shòu': [22076], + 'tān chǎn': [22077], + 'dàn tán': [22078, 24382, 24392, 24788, 28601], + 'hēi mò': [22079], + ě: [22081, 30760, 38923, 39424, 40264], + 'fān bo': [22083], + chuáng: [22087, 24202, 29248], + 'cù zā hé': [22088], + 'tūn kuò': [22091], + 'cēng chēng': [22092], + dēng: [22100, 23297, 28783, 29128, 29842, 30331, 31475, 31782, 33376, 35915], + pū: [22103, 25169, 25778, 25908, 25909, 28541, 28807, 38496], + juē: [22104, 23657, 23659, 25767], + lū: [22108, 22165, 25784, 25852, 35618], + zhān: [ + 22113, 23742, 24777, 26051, 26076, 26540, 26676, 27617, 27656, 27658, 27838, + 30651, 34205, 34501, 35392, 35449, 35691, 35893, 36232, 36997, 38298, 38673, + 39142, 39256, 39513, 39769, 40035, 40455, 40559, + ], + ō: [22114], + 'zhòu zhuó': [22115], + 'jiào qiào chī': [22125], + yuàn: [ + 22126, 22964, 24616, 24895, 25534, 29783, 31120, 33489, 34895, 35051, 35089, + 38498, 39000, + ], + 'ǎi ài āi': [22127], + 'yōng yǒng': [22128, 28589], + 'jué xué': [22129], + 'pēn pèn fèn': [22132], + gá: [22134, 23580, 37331, 37687, 38022], + 'xīn hěn hèn': [22135], + dāng: [22137, 28578, 29680, 29867, 31580, 31801, 33377, 34807, 35014, 35168], + làn: [ + 22146, 28389, 28651, 28866, 29143, 29185, 29211, 29220, 29907, 31991, 38020, + ], + tà: [ + 22147, 22202, 23817, 25374, 25640, 25787, 27067, 27261, 27646, 28094, 28606, + 28620, 31138, 31887, 35515, 35702, 36427, 36473, 36482, 36514, 36957, 37652, + 38354, 38373, 38396, 38424, 38812, 38835, + ], + 'huō huò ǒ': [22148], + hāo: [22150, 33568, 33983, 34181], + 'hè xià': [22151], + 'xiù pì': [22154], + 'zhōu chóu': [22155, 30441, 35818], + mē: [22162], + 'chā cā': [22163], + 'bó pào bào': [22167], + 'me mèi mò': [22172], + 'xié hái': [22177], + 'áo xiāo': [22179], + mō: [22180, 25720], + pín: [ + 22188, 23078, 23252, 23338, 29613, 30665, 34226, 34841, 36007, 36139, 39024, + 39078, + ], + mè: [22192, 28665], + 'rǎng rāng': [22199], + lá: [22201, 26095], + 'jiáo jué jiào': [22204], + chuò: [ + 22205, 23062, 25801, 27488, 28080, 30957, 36352, 36639, 36749, 36789, 36790, + 37227, 37985, 39199, 40810, 40842, + ], + 'huān huàn': [22206], + 'zá cà': [22211], + chài: [22214, 34431, 34822, 34947, 35341], + 'náng nāng': [22218], + 'zá zàn cān': [22219], + sū: [22220, 27375, 29990, 31267, 31308, 31395, 34311, 34323, 37221, 39874], + zèng: [22222, 29111, 29969, 36104, 36192, 37605, 38147], + 'zá niè yàn': [22224], + nāng: [22228], + 'luó luō luo': [22230], + 'wéi guó': [22231], + huí: [ + 22232, 22238, 22252, 24315, 24317, 24667, 27908, 30160, 33588, 34456, 34516, + 34517, 34582, 36852, 36901, 39856, + ], + nín: [22236, 24744, 33036], + 'jiǎn nān': [22237], + nān: [22241], + tuán: [ + 22242, 22243, 22296, 24945, 25247, 25718, 27314, 31984, 37828, 40402, 40443, + ], + 'tún dùn': [22244, 22345], + guó: [ + 22255, 22262, 22267, 22269, 22272, 22283, 24124, 24151, 24918, 25681, 28429, + 32861, 33112, 33173, 34094, 34402, 39320, + ], + kùn: [22256, 28035, 30543], + 'wéi tōng': [22258], + qūn: [22263, 22795, 36897], + rì: [22264, 26085, 34933, 37412, 39353, 39538], + tāi: [22268, 23393, 32974], + pǔ: [ + 22275, 22289, 25800, 26222, 26268, 27192, 27279, 27654, 28006, 28325, 28915, + 35561, 35676, 35889, 36476, 37920, 38248, + ], + 'quān juàn juān': [22280, 22287], + 'chuí chuán': [22284], + tuǎn: [22293, 30077, 30083], + lüè: [22297, 25504, 30053, 30055, 31268, 37597, 37602, 38154], + 'huán yuán': [22300], + luán: [ + 22301, 22302, 22897, 23048, 23372, 23402, 23423, 23782, 24018, 25371, 25891, + 26347, 26686, 27410, 28390, 28772, 30324, 30325, 32649, 33044, 33248, 34378, + 37550, 38014, 40265, 40478, 40510, + ], + tǔ: [22303, 22305, 37367, 38029], + 'xū wéi': [22313], + 'dì de': [22320, 23987], + 'qiān sú': [22321], + zhèn: [ + 22323, 22630, 25355, 25391, 26389, 26650, 30013, 30521, 32022, 32124, 32444, + 35499, 36049, 36168, 37620, 37805, 37806, 38215, 38453, 38499, 38663, 40198, + 40489, + ], + 'chǎng cháng': [22330, 22580, 22642], + 'qí yín': [22331], + jiá: [ + 22335, 24550, 24669, 25118, 25204, 33061, 33626, 33698, 34545, 34554, 35020, + 36338, 37071, 37087, 37583, 38103, 38956, 38960, 39050, 40246, 40266, + ], + 'zhǐ zhì': [22337], + bǎn: [ + 22338, 23685, 26116, 26495, 29256, 29930, 31876, 33320, 34626, 37393, 38051, + 38442, 39788, + ], + qǐn: [ + 22341, 23505, 23517, 23522, 26129, 26795, 31497, 34748, 36222, 37599, 38163, + ], + 'méi fén': [22342], + 'rǒng kēng': [22344], + 'fāng fáng': [22346], + 'fèn bèn': [22347], + tān: [ + 22349, 24633, 25674, 25849, 25892, 28393, 28760, 30251, 30321, 33297, 36010, + 36138, + ], + 'huài pēi pī péi': [22351], + 'dì làn': [22356], + tán: [ + 22363, 22704, 22709, 22727, 22748, 23122, 24987, 26137, 26311, 27011, 27264, + 28525, 29122, 30192, 30969, 32584, 32590, 34283, 35527, 35674, 35680, 35848, + 35885, 35994, 37103, 37296, 37663, 38979, + ], + bà: [ + 22365, 22459, 22761, 24349, 27419, 28766, 29240, 30706, 35207, 38712, 39809, + 40069, + ], + fén: [ + 22367, 22707, 22946, 23694, 24169, 26508, 26876, 27774, 28954, 29132, 29139, + 32658, 32693, 33974, 34145, 34464, 34465, 35950, 35958, 36690, 37948, 38571, + 39337, 39797, 40642, 40726, 40738, + ], + zhuì: [ + 22368, 22684, 24820, 29952, 30071, 30984, 32180, 32267, 32512, 32530, 33103, + 33159, 35528, 36101, 36184, 37258, 37667, 37958, + ], + pō: [22369, 23717, 27900, 28300, 28497, 37337, 37882, 38027, 38935, 39047], + 'pǎn bàn': [22370], + kūn: [ + 22372, 22531, 22546, 23824, 23825, 26118, 26204, 28489, 28956, 29108, 29457, + 29736, 29819, 33742, 34603, 35016, 35049, 35084, 37260, 37653, 38175, 39433, + 39648, 39649, 39656, 39908, 40114, 40318, 40356, 40525, + ], + diàn: [ + 22379, 22443, 22666, 22722, 22880, 23133, 24215, 24806, 25154, 27202, 27583, + 28096, 28593, 29623, 29716, 30005, 30300, 31775, 34580, 37439, 38651, 38747, + 39508, + ], + 'mù mǔ': [22390], + 'kē kě': [22391, 36603], + xuè: [22393, 23716, 26710, 28709, 29400, 30642, 35604, 35857, 36240], + 'dǐ chí': [22395, 26594], + lā: [22403, 26566, 33736, 37003], + lǒng: [22404, 22405, 22751, 22752, 25314, 25871, 31433, 38471, 38580], + mín: [ + 22410, 22980, 23735, 23823, 25450, 26107, 26108, 27665, 29641, 29720, 29725, + 29769, 30203, 30463, 30727, 32205, 32225, 32535, 32608, 33504, 37425, 37641, + 37746, 40214, + ], + 'dòng tóng': [22412, 23762, 27934], + cí: [ + 22416, 23336, 24904, 26572, 28648, 29633, 29943, 29958, 30913, 31008, 31072, + 31949, 33576, 35422, 35789, 36765, 36766, 36772, 36781, 38604, 39162, 39176, + 40220, 40383, 40384, 40538, + ], + duī: [22422, 22534, 22624, 30205, 30931, 37907, 37916, 40237], + 'duò duǒ': [22427], + 'duǒ duò': [22428, 25350], + chá: [ + 22430, 23519, 23894, 25661, 27086, 27307, 29497, 33580, 33590, 35431, 38763, + ], + shǎng: [22439, 26188, 27145, 36062, 36120, 36175, 37631, 37851, 37980], + shǒu: [22440, 23432, 25163, 25164, 33359, 39318], + da: [22447, 32360, 36342], + háng: [ + 22451, 26043, 26477, 31573, 32078, 32471, 33322, 33472, 34466, 35012, 36005, + 36818, 38927, 39043, 39783, + ], + 'ān ǎn': [22453], + xīng: [ + 22454, 24826, 26143, 26320, 29003, 29481, 29766, 30376, 31682, 33125, 33288, + 35306, 35314, 35587, 39426, 39565, 39823, 39929, + ], + 'yuàn huán': [22456], + bāng: [ + 22457, 24110, 24135, 24154, 24171, 25440, 26758, 27996, 37030, 37035, 38820, + ], + 'póu fú': [22458], + cén: [22465, 23697, 28052], + 'běng fēng': [22468], + 'dì fáng': [22469], + 'xiá jiā': [22473], + 'mái mán': [22475], + làng: [22476, 23808, 28010, 33943, 38316], + 'shān yán': [22479], + 'qín jīn': [22480], + 'pǔ bù': [22484], + huā: [22486, 23154, 26907, 30836, 31936, 33457, 33930, 34340, 35502, 37685], + 'suì sù': [22499], + 'pí pì': [22500], + 'qīng zhēng': [22501, 40109], + 'wǎn wān': [22502], + lǔn: [22504, 31248], + 'zhēng chéng': [22505], + kōng: [22506, 23814, 31644, 36539, 37651, 40316], + 'cǎi cài': [22512, 23488, 37319], + 'chù tòu': [22513], + běng: [22514, 29739, 33782, 38811], + 'kǎn xiàn': [22515], + 'yì shì': [22518, 37299], + péi: [22521, 27632, 35060, 35061, 36064, 36180, 37639, 38187, 38443, 38506], + 'sào sǎo': [22525], + 'jǐn qīn jìn': [22535], + 'péng bèng': [22539], + 'qiàn zàn jiàn': [22545], + àn: [ + 22547, 23669, 23736, 25353, 26263, 26696, 33018, 33612, 35963, 35979, 37644, + 38343, 38540, 40687, + ], + 'duò huī': [22549, 22702], + huán: [ + 22554, 23503, 23536, 23768, 26707, 27961, 28596, 29506, 29615, 29872, 31979, + 32367, 32563, 32678, 33601, 33800, 33809, 35954, 37744, 37942, 38206, 38254, + 38372, 38427, 38600, 39711, 40558, + ], + 'bǎo bǔ pù': [22561], + 'máo móu wǔ': [22565], + ruán: [22567, 22742, 25739], + 'ài è yè': [22568], + gèng: [22569, 26245], + méi: [ + 22579, 22650, 23186, 23883, 24510, 25879, 26522, 26626, 26757, 26979, 26995, + 27089, 28228, 28232, 29028, 29496, 29611, 29691, 29762, 30473, 30530, 31126, + 33028, 33058, 33116, 33530, 33683, 33919, 37119, 37238, 37767, 38213, 38665, + 40357, 40539, 40692, + ], + dǔ: [22581, 29757, 30585, 31491, 31716, 35241, 36077, 36172], + féng: [22584, 32152, 33346, 36898], + hèng: [22588], + chūn: [ + 22590, 23179, 26110, 26149, 26265, 26486, 26943, 27078, 27201, 27332, 29763, + 31674, 33797, 34685, 36660, 39942, 40350, + ], + jiǎng: [ + 22594, 22870, 22888, 22892, 26728, 27123, 29518, 32809, 33177, 33931, 34083, + 35611, 35762, 39004, + ], + huāng: [22595, 24031, 24908, 32915, 33618, 34881], + duàn: [ + 22597, 26029, 26039, 26932, 27573, 27592, 28997, 29782, 30891, 31766, 31850, + 32222, 32526, 33142, 33902, 36502, 37723, 38203, + ], + tǎ: [22612, 22678, 29549, 29562, 39833, 39976, 40142], + wěng: [22613, 22883, 23905, 25882, 26273, 30600, 33994], + 'sāi sài sè': [22622], + zàng: [22623, 24329, 33235, 33247, 33900, 34101, 37562], + tián: [ + 22625, 23623, 24684, 27834, 28233, 29875, 29979, 29980, 30000, 30027, 30033, + 30901, 30924, 32971, 38352, 38423, 40235, 40390, 40399, + ], + zhèng: [ + 22627, 24129, 25919, 35388, 35533, 35657, 35777, 35812, 37073, 37165, 38741, + 40202, + ], + 'tián zhèn': [22635], + wēn: [ + 22637, 26167, 27058, 27551, 28201, 28331, 29797, 30239, 34160, 35953, 36668, + 36672, 36754, 37822, 39234, 39963, 39982, 40129, + ], + liù: [22639, 24263, 30943, 32719, 38625, 38692, 39230, 39736, 40410, 40552], + hǎi: [22640, 28023, 28920, 37244, 37282], + lǎng: [22641, 26390, 26391, 26404, 28922, 34018], + bèng: [22644, 25596, 27893, 29967, 32179, 36454, 36856, 36908, 37872, 38234], + chén: [ + 22645, 23480, 23576, 24561, 25936, 25974, 26216, 26335, 26645, 27140, 27785, + 28993, 30222, 33251, 33566, 33664, 33680, 34095, 34236, 34740, 35366, 35574, + 36569, 36784, 36839, 37378, 38472, 38515, 38659, 40400, 40590, + ], + 'ōu qiū': [22648], + 'qiàn jiàn': [22649], + 'zhuān tuán': [22652], + shuǎng: [22653, 24929, 28474, 29245, 32276, 37871], + shú: [22654, 23116, 23408, 29881, 31211, 36118, 36174], + lǒu: [22655, 23901, 23937, 29962, 31699, 31757], + chí: [ + 22656, 24347, 25345, 27744, 28454, 31486, 31554, 31630, 31722, 33548, 33614, + 34483, 35608, 36030, 36223, 36383, 36831, 36833, 36933, 36959, 36978, 37705, + 39347, 39536, + ], + shù: [ + 22661, 24246, 24251, 24631, 24661, 25101, 26463, 26641, 27193, 27821, 28465, + 28484, 28630, 31446, 31466, 32073, 33127, 33623, 33921, 34410, 34899, 35019, + 35918, 36848, 37477, 37680, 37859, 38676, 40336, + ], + 'dì zhì': [22662, 30096], + kàn: [22664, 23809, 30640, 30681, 30945, 34894, 39723], + chěn: [22667, 22822, 30838, 30876, 30947, 36098, 36283, 36408, 37718], + 'zhǐ zhuó': [22668], + qiǎng: [22671, 32328, 32358, 32677, 35137], + zēng: [22679, 22686, 24974, 29844, 30704, 30963, 32638, 35652, 37163, 40027], + qiáng: [ + 22681, 22715, 23281, 23321, 27183, 27299, 28434, 29254, 33378, 34051, 34103, + 34336, + ], + 'kuài tuí': [22692], + 'tuǎn dǒng': [22693], + 'qiáo què': [22695], + 'zūn dūn': [22699], + 'qiāo áo': [22717], + 'yì tú': [22719], + 'xué bó jué': [22726], + lǎn: [ + 22728, 23358, 23364, 23375, 25042, 25078, 25597, 25829, 25900, 27012, 27414, + 28008, 28452, 28768, 32412, 32518, 32625, 35239, 35261, 35272, 37250, 39026, + ], + huài: [22730, 22750, 34366], + rǎng: [22732, 22756, 25880, 29209], + 'làn xiàn': [22735], + dǎo: [ + 22740, 23548, 23566, 23707, 23798, 23947, 23948, 23993, 25443, 25623, 25827, + 27101, 31095, 31106, 31153, 36424, 38502, 38557, 38575, + ], + ruǐ: [22753, 26741, 27236, 32352, 34122, 34123, 34306, 34307], + san: [22765], + zhuàng: [22766, 22767, 22773, 25758, 28939, 29366, 29376], + 'ké qiào': [22771, 27580], + kǔn: [ + 22776, 22780, 24707, 25414, 26801, 30833, 31093, 31239, 31259, 32145, 35021, + 38315, 38328, 38403, + ], + mǎng: [22782, 28461, 33595, 33725, 33726, 34830], + cún: [22783, 23384], + 'zhǐ zhōng': [22786], + 'gǔ yíng': [22787], + 'jiàng xiáng': [22789, 38477], + 'páng féng fēng': [22790], + zhāi: [22792, 25434, 25688, 25995, 25998, 27064, 31874, 40779], + 'xuàn xiòng': [22800], + wài: [22806, 39009], + 'wǎn yuàn wān yuān': [22807], + 'mǎo wǎn': [22808], + mèng: [22818, 22819, 23391, 26790, 30310, 38693], + 'dà dài': [22823], + 'fū fú': [22827, 22983, 26510, 31920], + guài: [22828, 24618, 24672], + yāng: [ + 22830, 22990, 25264, 27523, 27889, 31207, 32998, 37472, 37704, 38645, 40230, + 40495, + ], + 'hāng bèn': [22831], + gǎo: [ + 22832, 25630, 26482, 27072, 27073, 27322, 31233, 31294, 31295, 32286, 32543, + 33746, 34241, 34291, + ], + 'tāo běn': [22834], + 'tóu tou': [22836], + 'yǎn tāo': [22837], + 'kuā kuà': [22840, 35463], + 'jiá jiā gā xiá': [22841], + huà: [ + 22843, 23155, 23295, 23301, 23819, 25702, 26489, 26528, 26726, 27116, 27194, + 28549, 30011, 30059, 30069, 32355, 33305, 35441, 35545, 35694, 35805, 40650, + ], + 'jiā jiá gā xiá': [22846], + ēn: [22848, 24681, 33981], + 'dī tì': [22851], + 'yǎn yān': [22852, 28208], + pào: [22853, 30129, 30384, 30770, 31007, 31022, 38756, 40621], + nài: [22856, 26608, 28223, 32784, 33816, 35110, 37692, 40720], + 'quān juàn': [22861, 24366, 26860], + zòu: [22863, 25549], + 'qì qiè xiè': [22865], + kāi: [22866, 24320, 25577, 37926, 38158, 38283], + 'bēn bèn': [22868, 27853], + tào: [22871], + 'zàng zhuǎng': [22872], + běn: [22873, 26412, 26957, 30042, 32713, 33519], + 'xùn zhuì': [22878], + shē: [22882, 27304, 29470, 30061, 30066, 36050, 36054, 36170, 36619], + 'hǎ pò tǎi': [22884], + 'ào yù': [22885, 22887, 28570], + yūn: [22891, 27698, 27699, 33920, 33941, 34681, 36103, 36191], + 'duǒ chě': [22898], + 'nǚ rǔ': [22899], + nú: [22900, 23397, 31535, 39377, 39549], + 'dīng dǐng tiǎn': [22901], + 'tā jiě': [22905], + nuán: [22907], + 'hǎo hào': [22909], + fàn: [ + 22911, 23310, 26805, 27726, 27867, 28412, 28714, 29359, 30024, 30421, 31541, + 31684, 33539, 35337, 36009, 36137, 36588, 36669, 39151, 39152, 39277, + ], + shuò: [ + 22913, 25632, 26388, 27082, 28865, 29197, 30687, 33972, 37785, 37984, 38084, + ], + 'fēi pèi': [22915], + wàng: [22916, 24536, 26106, 26395, 26402], + zhuāng: [ + 22918, 22941, 23076, 24196, 24210, 26729, 26761, 27137, 31911, 31962, 33624, + 33674, 35013, 35037, + ], + mā: [22920, 23229], + 'fū yōu': [22923], + 'hài jiè': [22926], + dù: [ + 22930, 22956, 26460, 27564, 28193, 31226, 33423, 33648, 34713, 34855, 34873, + 37709, 38208, 38767, + ], + miào: [22937, 24217, 24255, 24287, 29573, 31447], + 'fǒu pēi pī': [22938], + 'yuè jué': [22940], + niū: [22942], + 'nà nàn': [22944], + tuǒ: [22949, 23287, 24249, 26925, 26965, 27234, 39692, 39958, 40270], + 'wàn yuán': [22951], + fáng: [22952, 25151, 32938, 38450, 39796, 40066], + nī: [22958], + zhóu: [22959, 30881], + zhāo: [22961, 24054, 25307, 26157, 37335, 37450, 37731, 38026, 39371], + 'nǎi nǐ': [22963], + tǒu: [22965, 25960, 32015, 34339, 40648], + 'xián xuán xù': [22966], + 'zhí yì': [22967, 31175], + ē: [22968, 22975, 23104, 23641], + mèi: [ + 22969, 23194, 23504, 25274, 26048, 26151, 27820, 29021, 30167, 30491, 30584, + 31065, 31683, 34654, 34946, 36298, 39741, 39749, + ], + 'qī qì': [22971], + 'xū xǔ': [22977, 31280], + 'shān shàn': [22989, 22999, 33515, 37348, 38032], + mán: [ + 22991, 24946, 27168, 34542, 34875, 35646, 39237, 39314, 39703, 39704, 39995, + 40151, + ], + jiě: [22992, 23182, 27294, 27601, 39159], + 'wěi wēi': [22996], + pīn: [23000, 25340, 30999, 31334, 39338, 39518], + 'huá huó': [23009], + 'jiāo xiáo': [23011], + 'gòu dù': [23012], + 'lǎo mǔ': [23013], + 'nián niàn': [23017], + zhěn: [ + 23019, 23634, 24363, 25262, 26147, 26517, 30043, 30137, 30485, 31289, 32285, + 32293, 32540, 32836, 33817, 34967, 35030, 35225, 35386, 35786, 36587, 36728, + 36788, 39383, 39698, + ], + héng: [ + 23022, 24646, 24658, 28870, 29673, 33019, 34309, 34913, 37957, 40244, 40262, + 40507, + ], + 'jūn xún': [23024], + 'kuā hù': [23025], + 'è yà': [23030], + 'xiān shēn': [23034], + wá: [23043], + 'ráo rǎo': [23046, 23304], + 'shào shāo': [23051], + xiē: [23054, 25587, 26964, 27463, 34638, 34829], + 'wǔ méi mǔ': [23058], + 'chuò lài': [23061], + niáng: [23064, 23330, 23363], + 'nà nuó': [23068], + 'pōu bǐ': [23069], + 'něi suī': [23070], + tuì: [23079, 29050, 34555, 34581, 36864, 39422], + mǎn: [23080, 23640, 28288, 28385, 28415, 34728, 34766, 35156, 37835], + 'wú wù yú': [23082], + 'xī āi': [23085], + 'zhuì shuì': [23095], + 'dōng dòng': [23099], + 'ǎi ái è': [23102], + 'ē ě': [23103], + mián: [ + 23106, 23349, 23424, 26467, 26825, 27312, 27339, 30496, 30664, 30666, 30671, + 32191, 32220, 32501, 33415, 34642, + ], + 'pǒu péi bù': [23108], + biǎo: [23114, 33087, 34920, 35057, 35134, 35544, 37686], + 'fù fàn': [23119], + wǒ: [23120, 23121, 25105], + 'ní nǐ': [23127, 26879], + 'quán juàn': [23128, 24787], + hūn: [ + 23130, 26127, 26156, 26836, 28093, 30567, 30575, 30856, 33636, 33911, 34066, + 36683, 38333, 38413, + ], + 'qiān jǐn': [23132], + 'wān wà': [23136], + 'lái lài': [23137, 24469, 24480], + 'zhōu chōu': [23140], + 'chuò nào': [23141], + 'nüè àn': [23145], + 'hùn kūn': [23147], + 'dàng yáng': [23160], + nàn: [23163], + 'ruò chuò': [23164], + jiǎ: [ + 23165, 23724, 26010, 26013, 27022, 27098, 27295, 29630, 30002, 32987, 37440, + 38078, + ], + 'tōu yú': [23166, 23214], + 'yù yú': [23168], + 'wéi wěi': [23169], + 'dì tí': [23170, 29686, 33488], + róu: [ + 23171, 25545, 26580, 28184, 29027, 29768, 29895, 31160, 31880, 31941, 33052, + 33132, 33863, 34650, 36418, 36654, 37714, 38819, 39461, 39943, 40340, + ], + 'ruǎn nèn': [23174], + miáo: [23180, 23289, 25551, 30596, 33495, 40339, 40523], + 'yí pèi': [23184], + 'mián miǎn': [23188], + 'tí shì': [23198, 24831], + 'duò tuó': [23200, 27826], + ǎo: [23210, 23228, 33401, 33466, 34948, 35158, 38266], + 'chú zòu': [23216], + yìng: [23221, 26144, 26254, 30828, 33185, 40038], + 'qín shēn': [23232], + jià: [23233, 24143, 26550, 27042, 31292, 39381, 39550], + sǎo: [23234], + 'zhēn zhěn': [23235], + 'jiē suǒ': [23237], + 'míng mǐng': [23239], + niǎo: [23243, 23325, 23346, 33553, 34086, 34949, 35018, 35117, 40479], + tāo: [ + 23245, 24141, 24354, 24902, 25487, 25647, 27076, 28059, 28372, 28644, 29803, + 32091, 32282, 32295, 32486, 35420, 35615, 36673, 38833, 38876, 38892, 39160, + 39253, + ], + biáo: [23249], + 'piáo piāo': [23254, 34232], + xuán: [ + 23257, 24748, 25080, 26294, 27272, 28457, 29572, 29831, 29887, 30147, 34561, + ], + 'màn mān': [23258], + kāng: [ + 23261, 23931, 24247, 24951, 27130, 28462, 30730, 31301, 31968, 36543, 37870, + 40007, + ], + 'hān nǎn': [23272], + nèn: [23273, 23280], + zhē: [23276, 36974], + 'mā má': [23282], + piè: [23283], + zhǎn: [ + 23288, 23637, 25612, 26025, 26028, 29718, 30415, 30430, 36670, 37254, 39085, + 39120, + ], + 'xiān yǎn jìn': [23312], + liǎn: [ + 23322, 25947, 25986, 29711, 29833, 32695, 33080, 33225, 34105, 34333, 34334, + 35043, 35165, 37179, + ], + 'qióng huán xuān': [23323], + dǒng: [23326, 25026, 31677, 33891, 34155, 35532], + cān: [23328, 28236, 29208, 39137, 39184, 39490, 39574], + tiǎo: [23333, 23464, 26176, 26387, 31409, 33025], + bí: [23350, 33656, 40763], + liǔ: [ + 23356, 26611, 26625, 26718, 26746, 27246, 29102, 29643, 32185, 32506, 32630, + 32640, 37622, 38157, + ], + 'qiān xiān': [23365, 27430], + 'xié huī': [23368], + 'huān quán': [23369], + 'lí lì': [23371, 40599], + 'zhú chuò': [23374], + kǒng: [23380, 24656], + 'mā zī': [23382], + 'sūn xùn': [23385, 23403], + 'bèi bó': [23387, 35478], + 'yòu niū': [23399], + zhuǎn: [23400, 31473, 36681], + hái: [23401, 39608], + nāo: [23404], + 'chán càn': [23409], + bò: [23417, 27287, 34327, 35666], + nái: [23419, 33097], + 'níng nìng': [23425, 23501, 23511, 23516, 23527, 29999], + zhái: [23429], + 'tū jiā': [23434], + sòng: [23435, 35359, 35494, 35772, 35829, 36865, 37817, 38924, 39042, 39224], + ròu: [23437, 32905, 35699], + zhūn: [23442, 31360, 34912, 35524, 35846, 36813], + 'mì fú': [23443], + 'dàng tàn': [23445], + 'wǎn yuān': [23451], + chǒng: [23456, 23541], + qún: [23469, 23790, 24108, 32675, 32676, 35033, 35040], + zǎi: [23472, 23869], + 'bǎo shí': [23474], + 'jiā jia jie': [23478], + 'huāng huǎng': [23482], + kuān: [23485, 23515, 23532, 33239, 37991, 39627, 39638], + 'sù xiǔ xiù': [23487], + 'jié zǎn': [23489], + 'bìng bǐng': [23502], + 'jìn qǐn': [23510], + 'lóu jù': [23520], + 'xiě xiè': [23531], + 'qīn qìn': [23540], + cùn: [23544, 31871], + duì: [ + 23545, 23550, 23565, 24636, 24989, 25055, 28647, 28713, 30867, 31051, 32144, + 34225, 35656, 35701, 36699, 38431, 38510, + ], + 'lüè luó': [23549], + 'shè yè yì': [23556], + 'jiāng jiàng qiāng': [23558], + 'jiāng jiàng': [23559, 27974, 28479, 30074], + zūn: [23562, 23967, 27197, 32583, 36981, 37903, 40018, 40159, 40334, 40439], + 'shù zhù': [23564, 28557], + xiǎo: [23567, 26195, 26241, 26313, 30363, 30370, 31601, 31615, 31712, 35599], + 'jié jí': [23568, 35800, 38794], + 'shǎo shào': [23569], + ěr: [ + 23570, 23571, 23572, 26670, 27622, 27953, 29246, 29669, 32819, 34238, 34888, + 36272, 36841, 36999, 37498, 38098, 39180, 39285, 39404, + ], + 'wāng yóu': [23586], + wāng: [23587, 23593, 23594, 23595, 27754], + liào: [23589, 23590, 24278, 25730, 26009, 28819, 31415, 37904, 38243], + 'méng máng lóng páng': [23592], + gà: [23596, 39744], + 'kuì kuǐ': [23599], + tuí: [ + 23605, 24346, 31336, 34312, 36458, 38564, 38969, 38970, 38973, 39059, 39755, + ], + yǐn: [ + 23609, 23998, 24341, 26372, 27267, 27324, 27389, 28158, 28645, 30270, 30318, + 31884, 34335, 34451, 34750, 35732, 36218, 36251, 36625, 37391, 38775, + ], + 'chǐ chě': [23610], + kāo: [23611, 39643], + 'jìn jǐn': [23613], + 'wěi yǐ': [23614], + 'niào suī': [23615], + céng: [23618, 23652, 23954, 39507], + diǎo: [23628], + 'píng bǐng bīng': [23631], + lòu: [23642, 28431, 30232, 30266, 30267, 37860, 38210, 38475], + 'shǔ zhǔ': [23646, 23660], + 'xiè tì': [23647], + 'chè cǎo': [23662], + 'tún zhūn': [23663], + 'nì jǐ': [23664], + 'hóng lóng': [23672], + 'qǐ kǎi': [23682, 35912], + áng: [23687, 26114, 26171], + 'gǎng gāng': [23703, 23831], + kě: [23714, 25956, 28167, 28212, 28835], + gǒu: [23715, 29399, 29629, 31537, 32775, 32776, 32777, 33503, 35967], + tiáo: [ + 23719, 23737, 27172, 31058, 31524, 33408, 33812, 34010, 34024, 34601, 36834, + 37594, 37797, 38807, 39659, 39880, 39991, 40102, 40800, 40838, + ], + 'qū jū': [23720], + lǐng: [23725, 23994, 38936, 39046], + pò: [ + 23734, 25920, 27942, 28240, 28894, 29632, 30772, 30774, 31893, 33962, 39748, + ], + 'bā kè': [23751], + luò: [ + 23752, 25694, 27931, 27932, 29334, 29662, 31551, 32409, 33638, 35451, 38610, + 39409, 39558, 40261, + ], + 'fù niè': [23754], + ěn: [23758], + 'zhì shì': [23769, 23867], + qiǎ: [23776, 36306, 37216, 38800], + 'qiáo jiào': [23780, 30276], + 'xié yé': [23787], + bū: [23788, 24239, 26209, 35495, 36875, 37437, 37691, 38072, 39188, 40271], + chóng: [23815, 23816, 29214, 34411, 34665, 34802, 35080, 38528], + 'zú cuì': [23826, 26890], + 'líng léng': [23834], + 'dòng dōng': [23840], + xiáo: [23844, 27944, 28102, 35364, 35509], + 'pí bǐ': [23845, 33432], + 'zhǎn chán': [23853, 23939, 23940], + 'wǎi wēi': [23860], + 'yáng dàng': [23861], + 'shì dié': [23868], + yào: [ + 23870, 26332, 29070, 29183, 30661, 31358, 31380, 31556, 32768, 33374, 33647, + 33903, 34220, 34277, 34958, 35230, 35407, 35729, 38783, 40386, 40542, 40764, + ], + 'kān zhàn': [23873], + 'hán dǎng': [23877], + 'qiàn kàn': [23884], + 'wù máo': [23885], + 'kě jié': [23889, 23985], + 'wēi wěi': [23892], + kē: [ + 23897, 26607, 26869, 27068, 27158, 29249, 29297, 29328, 29634, 30132, 30604, + 30933, 31002, 31185, 31262, 31392, 33834, 34198, 34485, 34636, 36279, 36722, + 37272, 37427, 38070, 38950, 38982, 39063, 39617, + ], + 'dàng táng': [23907], + 'róng yíng': [23908, 29187], + 'ái kǎi': [23910], + 'kāo qiāo': [23914], + cuó: [23919, 23923, 30180, 30700, 33963, 34070, 34392, 40570, 40574], + 'qiǎn qīn': [23920], + 'dì dié': [23933], + cēn: [23934], + dǐng: [23935, 33404, 34209, 37924, 38914, 39030, 40718, 40721], + 'áo ào': [23941], + 'pǐ pèi': [23951], + 'jiào qiáo': [23968, 28496], + 'jué guì': [23969, 40156], + 'zhān shàn': [23974, 40163], + 'xiè jiè': [23984], + 'guī xī juàn': [23986], + rū: [23999], + 'lì liè': [24001, 26841, 29188, 32159], + 'xī guī juàn': [24002], + 'yíng hōng': [24006], + yǐng: [ + 24010, 24302, 24433, 25708, 26796, 28481, 30271, 30317, 30696, 31310, 37090, + 37915, 38964, 39053, 39061, 39062, + ], + chǎo: [24016, 28818, 29052, 30503, 40616], + cuán: [24017, 27349, 27409], + chuān: [24027, 24029, 27674, 29775, 31359], + 'jīng xíng': [24032], + cháo: [ + 24034, 24035, 26177, 28421, 28526, 29258, 31410, 32634, 35647, 36680, 37147, + 40716, + ], + qiǎo: [24039, 24832, 39644], + gǒng: [24041, 24318, 25329, 25330, 26673, 27742, 29657, 36609, 38799], + 'chà chā chāi cī': [24046], + 'xiàng hàng': [24055], + shuài: [24069, 24101, 34752], + pà: [24074, 24085, 24597, 34969], + 'tǎng nú': [24081], + 'mò wà': [24083], + 'tiē tiě tiè': [24086], + zhǒu: [24090, 26221, 30107, 30573, 31634, 32920, 33783, 39902], + 'juǎn juàn': [24099], + shuì: [24104, 28055, 28058, 30561, 31237, 31246, 35038], + 'chóu dào': [24113, 24172], + 'jiǎn jiān sàn': [24116], + 'shà qiè': [24121], + 'qí jì': [24122, 33632], + 'shān qiāo shēn': [24147], + 'zhuàng chuáng': [24162], + 'chān chàn': [24168], + miè: [ + 24173, 25073, 25635, 28357, 28781, 28885, 31011, 31742, 34065, 34190, 34843, + 34890, 37974, 40052, 40211, + ], + 'gān gàn': [24178], + 'bìng bīng': [24182, 24183], + 'jī jǐ': [24190], + 'guǎng ān': [24191], + guǎng: [24195, 24291, 29367, 29559], + me: [24197], + 'dùn tún': [24201], + 'bài tīng': [24205], + 'yìng yīng': [24212], + 'dǐ de': [24213], + 'dù duó': [24230], + 'máng méng páng': [24236], + 'bìng píng': [24240], + chěng: [24241, 24732, 30536, 36894, 39425, 39563], + 'jī cuò': [24244], + qǐng: [24252, 24270, 27326, 28416, 33496, 35531, 35622, 35831, 38915, 39031], + 'guī wěi huì': [24262], + 'jǐn qín': [24273], + kuò: [ + 24275, 25193, 25313, 25844, 28662, 31560, 33855, 33856, 34526, 38346, 38420, + 38697, 38815, 38841, 38869, 38946, 39712, + ], + 'qiáng sè': [24295, 34196], + 'yǐn yìn': [24308, 38544, 38560, 38577, 39150, 39154, 39278], + 'pò pǎi': [24313, 36843], + 'nòng lòng': [24324], + 'dì tì tuí': [24351], + 'jué zhāng': [24353], + 'mí mǐ': [24357, 24396, 38753], + chāo: [24360, 24586, 25220, 27433, 35372, 36229, 37396, 38046], + yi: [24364], + shāo: [ + 24368, 26067, 28903, 28988, 29138, 31602, 33348, 33847, 34161, 36622, 39678, + 39865, + ], + 'xuān yuān': [24370], + 'qiáng qiǎng jiàng': [24375, 24378], + 'tán dàn': [24377, 37256], + biè: [24390], + 'qiáng jiàng qiǎng': [24394], + 'jì xuě': [24400], + tuàn: [24406, 35094], + yuē: [24415, 26352, 26353, 30705], + 'shān xiǎn': [24417], + wén: [ + 24419, 25991, 28806, 29683, 30226, 32359, 32862, 33440, 34441, 34442, 34721, + 34753, 38330, 38335, 38341, 38374, 38395, 38412, 38639, 39356, 39367, 39792, + 40188, 40205, 40740, + ], + 'péng bāng': [24429], + 'piāo piào': [24431], + 'zhuó bó': [24436], + 'tuǒ yí': [24437], + 'páng fǎng': [24439], + wǎng: [ + 24442, 24448, 24451, 24792, 26505, 26850, 32178, 32593, 32594, 32595, 32596, + 32598, 33781, 34535, 34628, 35511, 36638, 36747, 39757, + ], + cú: [24450, 27522], + 'dài dāi': [24453], + huái: [ + 24458, 24576, 25040, 25079, 27088, 28142, 32818, 34361, 35106, 35121, 36381, + ], + 'wā wàng jiā': [24461], + 'chěng zhèng': [24462], + 'dé děi de': [24471], + 'cóng zòng': [24478], + 'shì tǐ': [24485], + 'tí chí': [24498, 40343, 40345], + dé: [24499, 24503, 24692, 24755, 24810, 28098, 37696, 38173], + 'zhǐ zhēng': [24500, 24501], + bié: [24502, 30335, 33666, 34498, 35154, 36457], + 'chōng zhǒng': [24504], + 'jiǎo jiào': [24508, 31493, 31562], + 'lòng lǒng': [24511], + 'qú jù': [24514, 28192, 30655, 34742], + 'dìng tìng': [24522], + gǎi: [24523, 25913], + rěn: [24525, 26656, 26659, 31225, 31252, 32155, 33615, 33653, 36533], + chàn: [24527, 25076, 25082, 30815, 32700, 38850, 39019], + tè: [24529, 24925, 29305, 34776, 37617, 38141], + 'tè tēi tuī': [24530], + 'gān hàn': [24531, 25916], + 'yì qì': [24532], + 'tài shì': [24533], + 'xī liě': [24538], + 'yīng yìng': [24540, 25033, 35661], + 'mǐn wěn mín': [24542, 24543], + 'sōng zhōng': [24554], + 'yù shū': [24556, 24710], + 'qí shì': [24559, 32774], + 'tún zhūn dùn': [24563], + 'qián qín': [24564, 25202], + hún: [24566, 27985, 28222, 39195, 39300, 39746, 40754], + niǔ: [24568, 25197, 28804, 29379, 32016, 32445, 33701, 37397, 38062, 38773], + 'kuáng wǎng': [24569], + 'kāng hàng': [24572], + 'kài xì': [24574, 24894], + òu: [24580, 24938], + 'bǎo bào': [24585], + 'mín mén': [24587], + 'zuò zhà': [24589], + zěn: [24590], + yàng: [24591, 24665, 26679, 27096, 27171, 28478, 32661, 35399], + 'kòu jù': [24592], + 'náo niú': [24595], + 'zhēng zhèng': [24596, 25497, 38066, 38126], + 'tiē zhān': [24599], + 'hù gù': [24600], + 'cū jù zū': [24602], + 'sī sāi': [24605], + 'yóu chóu': [24606], + 'tū dié': [24610], + 'yōu yào': [24622], + xuàn: [ + 24624, 26145, 26982, 27883, 28210, 28843, 29700, 30505, 30905, 32098, 32316, + 32335, 32474, 34073, 34898, 34984, 36121, 37449, 37831, 38089, 38239, 39092, + ], + 'xù xuè': [24628], + 'bì pī': [24630], + 'xī shù': [24632], + 'nèn nín': [24641], + 'tiāo yáo': [24652], + 'xī qī xù': [24659], + 'xiào jiǎo': [24660], + 'hū kuā': [24663], + nǜ: [24679, 26386, 34882, 34884], + hèn: [24680], + 'dòng tōng': [24683], + 'quán zhuān': [24686], + 'è wù ě wū': [24694, 24801], + tòng: [24696, 24927, 24965, 30171, 34901], + 'yuān juàn': [24705], + 'qiāo qiǎo': [24708], + 'jiè kè': [24712], + 'hào jiào': [24718], + huǐ: [24724, 27283, 27584, 27585, 27591, 29164, 35693], + 'mán mèn': [24727, 38804], + 'yī yì': [24728, 34915], + quān: [24731, 31646, 37897], + 'kuī lǐ': [24733], + 'yì niàn': [24741], + 'mèn mēn': [24758], + guàn: [ + 24761, 24762, 24815, 24931, 25532, 25692, 27148, 27423, 27892, 28075, 28485, + 28748, 29215, 29912, 30437, 31030, 31100, 32582, 32592, 36011, 36143, 36480, + 36966, 37830, 38005, 40057, 40475, 40563, + ], + 'kōng kǒng': [24766], + 'lǔn lùn': [24768], + guǒ: [ + 24776, 26524, 26881, 27112, 31935, 32182, 33747, 34622, 35065, 35073, 36640, + 39196, 39299, + ], + 'yuān wǎn': [24780, 31650], + 'lán lín': [24783], + 'yù xù': [24784, 28130], + 'chuò chuì': [24793], + 'hūn mèn': [24795], + 'chǎng tǎng': [24797], + 'suǒ ruǐ': [24802], + cǎn: [24808, 24920, 25007, 40682, 40690], + cán: [24813, 24921, 24922, 27531, 27544, 34453, 34629, 34870, 34874], + 'dàn dá': [24814, 24986], + rě: [24825], + 'yú tōu': [24841], + 'kài qì': [24850], + 'dàng táng shāng yáng': [24851], + 'chén xìn dān': [24854], + 'kè qià': [24856], + nuò: [ + 24862, 25062, 25063, 25535, 25638, 27026, 31276, 31332, 31953, 31973, 31983, + 35582, 35834, 36419, 36925, 37737, 38168, + ], + gǎn: [ + 24863, 25792, 25954, 26751, 27204, 28553, 28600, 30383, 31174, 31240, 31540, + 33417, 34918, 36214, 36245, 40036, 40161, + ], + 'còng sōng': [24865], + 'sāi sī sǐ': [24866], + 'gōng gòng hǒng': [24873, 24912], + 'shuò sù': [24876, 27948], + 'yáo yào': [24878], + huàng: [24880, 26306, 27045, 28361, 30365, 30377, 37796], + zhěng: [24888, 25229, 25327, 25972, 26232], + cǎo: [24890, 33400, 33609, 39474], + 'xì xié': [24896], + 'cǎo sāo': [24901], + 'xù chù': [24905], + 'qiè qiàn': [24906], + 'cáo cóng': [24914], + 'ào áo': [24928], + 'lián liǎn': [24937, 26815, 27108, 27363], + 'jìn qín jǐn': [24940], + 'dì chì': [24952], + 'zhí zhé': [24953], + 'lóu lǚ': [24954, 40412], + còng: [24961, 35621], + 'zhī zhì': [24964, 30693, 32340, 32455], + chēng: [ + 24966, 25690, 25744, 25745, 26239, 26621, 26854, 27221, 27273, 27871, 28030, + 29732, 30624, 30848, 32253, 32585, 34511, 34806, 36202, 36204, 37887, 37923, + 38455, 38743, 38963, 39251, + ], + biē: [24971, 34380, 40009, 40150, 40712, 40862], + 'chéng dèng zhèng': [24981], + 'xǐ xī': [24984], + 'duì dùn tūn': [24990], + 'xiāo jiāo': [24994], + 'xián xiàn': [25002], + 'liáo liǎo': [25005, 29134, 29198, 29202], + shéng: [25012, 32260, 32329, 32361, 32499, 35677], + 'náo nǎo náng': [25017], + 'jǐng jìng': [25020], + 'jǐ jiǎo': [25023], + 'xuān huān': [25025], + 'cǎo sāo sào': [25030], + mèn: [25041, 25059, 26282, 28950, 29148], + 'mèng méng měng': [25052], + 'ài yì nǐ': [25053], + 'méng měng': [25054, 30626, 30674], + 'qí jī jì': [25056], + mǒ: [25057], + 'lán xiàn': [25058], + 'yōu yǒu': [25070], + 'liú liǔ': [25072, 34288], + ràng: [25081, 35698, 35731, 35753], + huān: [ + 25085, 27426, 27475, 27489, 29566, 35737, 35995, 37188, 39529, 40197, 40269, + ], + nǎn: [25089, 25543, 28275, 29045, 33129, 34683, 36199], + 'mí mó': [25090], + 'gàng zhuàng': [25093, 25094], + 'zhuàng gàng': [25095], + 'qu xū': [25100], + 'xì hū': [25103, 25135, 25138], + 'jiá gā': [25115], + zéi: [25117, 34824, 36042, 36156, 39938, 40033, 40087], + děng: [25125, 31561], + 'hū xì': [25137], + chuō: [25139, 36372, 36916], + 'biǎn piān': [25153], + 'shǎng jiōng': [25156], + 'shàn shān': [25159], + cái: [25165, 26448, 32404, 35009, 36001, 36130], + 'zhā zā zhá': [25166], + 'lè lì cái': [25168], + 'bā pá': [25170], + 'dǎ dá': [25171], + rēng: [25172], + 'fǎn fú': [25173], + 'diǎo dí yuē lì': [25178], + 'káng gāng': [25179], + 'yū wū': [25180], + 'yū wū kū': [25181], + 'tuō chǐ yǐ': [25185], + 'gǔ jié xì gē': [25186], + dèn: [25189, 25213], + 'sǎo sào': [25195, 25475], + rǎo: [25200, 25854, 38562], + 'xī chā qì': [25201], + 'bān pān': [25203], + 'bā ào': [25207], + 'xī zhé': [25208], + 'zhì sǔn kǎn': [25211], + zhǎo: [25214, 27836, 29813], + 'kuáng wǎng zài': [25218], + 'hú gǔ': [25223, 40516, 40536], + 'bǎ bà': [25226], + 'dǎn shěn': [25228], + 'nè nì ruì nà': [25232], + zhuā: [25235, 27291, 31803, 33212, 39677], + póu: [25236, 35026], + 'zhé shé zhē': [25240], + 'póu pōu fū': [25241, 25418], + pāo: [25243, 25291, 33068, 33826], + 'ǎo ào niù': [25245], + 'lūn lún': [25249, 25476], + 'qiǎng qiāng chēng': [25250], + 'zhǐ zhǎi': [25255], + 'bù pū': [25258, 26600], + 'yǎo tāo': [25261], + 'hē hè qiā': [25266], + 'nǐ ní': [25267], + 'pī pēi': [25271], + 'mǒ mò mā': [25273], + chōu: [25277, 29352, 29355, 30259, 31704], + 'jiā yá': [25281], + 'fú bì': [25282, 30032, 40349], + zhǎ: [25283, 30504, 30751, 39866, 40093], + 'dān dàn dǎn': [25285], + 'chāi cā': [25286], + niān: [25288, 34091], + 'lā lá lǎ là': [25289], + 'bàn pàn': [25292], + pāi: [25293], + līn: [25294], + guǎi: [25296, 26548, 26618], + 'tuò tà zhí': [25299], + 'ào ǎo niù': [25303], + 'jū gōu': [25304], + 'pīn pàn fān': [25306], + 'bài bái': [25308], + bài: [25309, 25943, 31255, 31930, 34221, 36097, 36133, 38875], + qiá: [25316], + 'nǐng níng nìng': [25319], + 'zé zhái': [25321, 25799], + hén: [25323, 30165, 38798], + 'kuò guā': [25324], + 'jié jiá': [25326], + nǐn: [25328], + shuān: [25332, 26643, 38274, 38377], + 'cún zùn': [25333], + 'zā zǎn': [25334, 26714], + kǎo: [25335, 25911, 26674, 28900, 32771], + 'yí chǐ hài': [25336], + 'cè sè chuò': [25338], + 'zhuài zhuāi yè': [25341], + 'shí shè': [25342], + bāi: [25344, 25520], + 'kuò guāng': [25348], + nòng: [25354, 25397, 40776], + 'jiào jiāo': [25357, 25934, 25945], + 'kuà kū': [25358], + 'ná rú': [25360], + 'tiāo tiǎo': [25361], + 'dié shè': [25365], + liě: [25368, 27615], + 'yà yǎ': [25372, 25495], + 'wō zhuā': [25373], + 'xié jiā': [25375, 25406], + 'dǎng dàng': [25377, 25803], + 'zhèng zhēng': [25379, 27491, 30151], + 'āi ái': [25384], + 'tuō shuì': [25385, 25437], + 'tǐ tì': [25390], + 'suō shā': [25393], + 'sā shā suō': [25394], + 'kēng qiān': [25395, 25724], + 'bàng péng': [25399], + 'ruó ruá': [25404], + 'jiǎo kù': [25409], + 'wǔ wú': [25410], + tǒng: [25413, 26742, 31570, 31593, 32113, 32130, 32479], + 'huò chì': [25415], + 'tú shū chá': [25416], + 'lǚ luō': [25419], + 'shāo shào': [25422, 31245], + niē: [25423, 25553], + 'shù sǒng sōu': [25426], + 'yé yú': [25427], + 'jué zhuó': [25428], + 'bù pú zhì': [25431], + zùn: [25432, 37516], + lāo: [25438, 25736, 31913], + sǔn: [25439, 25613, 27051, 31499, 31565, 31664, 37800, 38588], + 'wàn wǎn wān yù': [25445], + pěng: [25447, 28110, 30351], + shě: [25448], + 'fǔ fù bǔ': [25452], + dáo: [25455], + 'luò luǒ wǒ': [25456], + 'juǎn quán': [25458], + 'chēn tiǎn': [25461], + 'niǎn niē': [25467], + 'ruó wěi ré': [25468], + zuó: [25469, 26152, 31208, 31251, 31600, 33675, 37436], + 'wò xiá': [25470], + 'qìng qiàn': [25477], + 'póu pǒu': [25482], + qiā: [25488, 33884], + 'pái pǎi': [25490], + 'qiān wàn': [25492], + 'yè yē': [25494], + 'niè nǐ yì': [25500], + 'huò xù': [25501], + 'yàn shàn yǎn': [25502], + 'zhěng dìng': [25503], + kòng: [25511, 38810], + tuī: [25512, 34039, 34284], + 'zōu zhōu chōu': [25515], + tiàn: [25517, 33306], + kèn: [25519, 35017, 35075], + pá: [25521, 26487, 28502, 29228, 29750, 31586], + 'guó guāi': [25524], + 'dǎn shàn': [25528, 25763], + 'chān xiān càn shǎn': [25530], + sāo: [ + 25531, 25620, 28318, 32325, 32555, 34726, 39442, 39479, 39968, 40034, 40139, + ], + pèng: [25533, 26922, 27120, 30896, 36395], + 'zhēng kēng': [25537], + 'jiū yóu': [25538], + 'jiān jiǎn': [25539, 31835], + 'pì chè': [25546], + 'sāi zǒng cāi': [25548], + 'tí dī dǐ': [25552], + 'zǒng sōng': [25556], + 'huáng yóng': [25560], + 'zǎn zuàn': [25565], + 'xū jū': [25567], + 'ké qiā': [25570], + 'chuāi chuǎi chuài tuán zhuī': [25571], + 'dì tì': [25573], + 'lá là': [25574], + là: [ + 25575, 26955, 28290, 29902, 30220, 32715, 33240, 34635, 34674, 34847, 36770, + 36771, 37982, 38260, 39694, 39931, + ], + 'jiē qì': [25581], + 'chòng dǒng': [25584], + 'dié shé yè': [25586], + 'jiàn qián jiǎn': [25589], + yé: [25590, 29239, 29242, 29784, 37603, 37761, 38104], + chān: [25600, 25723, 25881, 35047, 35164, 35224, 35271, 36799, 37587], + 'gē gé': [25601, 25841], + 'lǒu lōu': [25602, 25695], + 'chōu zǒu': [25610], + chuāi: [25611], + sūn: [25614, 27074, 29426, 29499, 33642, 33984, 34165, 34206, 39143, 39153], + 'róng náng nǎng': [25617], + 'péng bàng': [25618], + cuō: [25619, 29811, 30923, 36425, 36979, 37277], + 'kē è': [25621], + 'nù nuò nòu': [25625], + 'lā xié xiàn': [25626], + qiǔ: [25629, 31959], + 'xiǎn xiān': [25631], + 'jié zhé': [25641], + 'pán bān pó': [25643], + bān: [ + 25644, 25917, 26001, 26002, 29677, 30242, 30285, 32934, 34689, 34700, 35113, + 36780, 38930, 39041, + ], + 'zhì nái': [25649], + 'wā wǎ wà': [25650], + huá: [ + 25651, 25782, 28369, 29502, 34128, 34710, 35649, 37877, 38119, 39498, 39557, + 40424, + ], + 'qiāng qiǎng chēng': [25654], + 'tián shēn': [25655], + 'ná nuò': [25659], + èn: [25665], + 'shè niè': [25668, 25885], + bìn: [ + 25672, 25839, 27553, 27567, 33169, 33231, 39628, 39637, 39657, 39682, 39699, + 39714, + ], + 'shā sà shǎi': [25675], + 'chǎn sùn': [25676], + 'jiū liú liáo jiǎo náo': [25678], + 'féng pěng': [25683], + shuāi: [25684], + 'dì tú zhí': [25685], + 'qì jì chá': [25686], + 'sōu sǒng': [25687], + 'liǎn liàn': [25689], + 'gài xì': [25697], + 'hù chū': [25698], + tàng: [25701, 28907, 29145, 37899], + 'nái zhì': [25704], + 'mó mā': [25705], + 'jiāng qiàng': [25706], + 'áo qiáo': [25710], + 'niè chè': [25712], + 'mán màn': [25713], + 'chàn cán': [25714], + 'sè mí sù': [25717], + 'biāo biào': [25725], + 'juē jué': [25733], + piē: [25734, 26300, 27669, 30629], + 'piě piē': [25735], + 'zǎn zān zēn qián': [25741], + 'sā sǎ': [25746], + hòng: [25748, 35340, 35751, 38336, 39720], + 'héng guàng': [25751], + niǎn: [ + 25754, 25781, 25862, 28042, 28990, 30910, 31760, 36429, 36456, 36494, 36646, + 36743, + ], + 'chéng zhěng': [25756], + 'huī wéi': [25757], + cāo: [25761, 25805, 31961], + 'xiāo sōu': [25768], + 'liáo liāo': [25769], + 'cuō zuǒ': [25774], + 'wěi tuǒ': [25777], + cuān: [25786, 25883, 27718, 36479, 36517, 38009, 38249], + 'qiào yāo jī': [25789], + 'zhuā wō': [25790], + 'lèi léi': [25794], + nǎng: [25795, 25902, 26345, 28770], + 'qíng jǐng': [25807], + kuǎi: [25811, 33967], + 'pǐ bò': [25815], + 'bò bāi': [25816], + 'jù jǐ': [25818], + mēng: [25821], + 'sǒu sòu': [25822], + xǐng: [25828, 31669, 37266], + cā: [25830], + 'níng nǐng nìng': [25840], + 'zhì jié': [25843], + 'là liè': [25848, 29193], + 'sòu sǒu': [25851], + 'lì luò yuè': [25853], + 'tī zhāi zhì': [25855], + pān: [25856, 28504, 30469, 33824], + lèi: [ + 25858, 27882, 28057, 28122, 31159, 31867, 32391, 34353, 37241, 37511, 37649, + 38939, 38954, 39006, 39075, + ], + 'cā sǎ': [25859], + 'jùn pèi': [25864], + 'lì luò': [25866, 36498], + 'là lài': [25867, 27380], + 'lú luó': [25870], + 'zǎn cuán': [25874], + 'xiān jiān': [25877], + 'mí mǐ mó': [25888], + 'zǎn cuán zàn zuān': [25890], + zuàn: [25893], + 'lì shài': [25894], + 'lì luǒ': [25901], + 'guǐ guì': [25905], + 'jī qī yǐ': [25906], + fàng: [25918], + 'wù móu': [25924], + 'chù shōu': [25930], + 'gé guó è': [25931], + 'duó duì': [25939, 25946], + 'duō què': [25952, 25962], + 'sàn sǎn': [25955], + 'dūn duì': [25958, 38246], + 'qī yǐ jī': [25959], + 'xiào xué': [25961], + 'shù shǔ shuò': [25968, 25976], + 'ái zhú': [25969, 25971], + 'xiòng xuàn': [25979], + 'zhuó zhú': [25984], + 'yì dù': [25985], + 'lí tái': [25988], + 'fěi fēi': [26000], + 'yǔ zhōng': [26004], + 'dòu dǒu': [26007], + 'wò guǎn': [26017], + 'tǒu tiǎo': [26018], + dòu: [ + 26019, 26794, 28002, 30168, 31398, 31431, 33072, 33651, 35910, 36887, 37078, + 37208, 38295, 38360, 39190, 39294, 39717, 39718, 39722, 39724, 39725, + ], + 'yín zhì': [26022], + 'chǎn jiè': [26042], + 'wū yū yú': [26044], + 'yóu liú': [26047], + 'páng bàng': [26049], + 'máo mào': [26052], + 'pī bì': [26055], + 'xuán xuàn': [26059], + 'wú mó': [26080], + zǎo: [26089, 26531, 26630, 26839, 28577, 29866, 34235, 34299, 34468], + gā: [26094], + 'gàn hàn': [26096], + 'tái yīng': [26098], + 'xū xù': [26100], + 'tūn zhùn': [26109], + 'wù wǔ': [26111], + 'pò pèi': [26146], + zòng: [26158, 29460, 30125, 30258, 31933, 31945, 31981, 32294], + ǎi: [26169, 27600, 30702, 34108, 34297, 35690, 36535, 38701, 38724], + 'huàng huǎng': [26179], + xuǎn: [26181, 30307, 30316, 36873, 36984], + 'xù kuā': [26183], + hǒng: [26190], + shài: [26194, 26348], + 'yūn yùn': [26197, 29044], + 'shèng chéng': [26207, 26889, 30427], + 'jǐng yǐng': [26223], + shǎn: [26225, 29068, 30546, 35234, 38275, 38378, 38485, 38493], + 'qǐ dù': [26229], + 'ǎn àn yǎn': [26235], + 'wǎng wàng': [26240], + zàn: [ + 26242, 26283, 29897, 29906, 29914, 31158, 35192, 35715, 35738, 36059, 36106, + 36190, 36436, 37180, 37694, 37864, 39265, + ], + 'yùn yūn': [26248], + 'mín mǐn': [26251], + 'dǔ shǔ': [26255], + shǔ: [ + 26257, 26329, 28539, 30297, 31980, 32626, 34213, 34223, 34295, 34560, 34868, + 35169, 35177, 40042, 40048, 40653, 40736, 40737, + ], + 'jiǎn lán': [26261], + nuǎn: [26262, 29015, 39210], + 'bào pù': [26292], + 'xī xǐ': [26303], + 'pù bào': [26333, 28689], + 'qū qǔ': [26354, 32054], + 'gèng gēng': [26356], + 'hū hù': [26358, 38653], + 'zēng céng': [26365, 27239], + 'céng zēng': [26366, 31474], + 'cǎn qián jiàn': [26369], + 'qiè hé': [26373], + 'bì pí': [26375, 31110, 31507, 35048], + 'yǒu yòu': [26377], + 'bān fén': [26380, 40187], + 'fú fù': [26381, 27921], + 'fěi kū': [26383, 32976], + 'qú xù chǔn': [26384], + 'juān zuī': [26392], + 'huāng máng wáng': [26394], + 'qī jī': [26399], + 'tóng chuáng': [26403, 27238], + zhá: [26413, 29264, 31642, 34491, 35671, 37720, 38113, 38296, 38392], + 'zhú shù shú': [26414], + 'shù shú zhú': [26415], + 'zhū shú': [26417], + 'pǔ pò pō piáo': [26420], + 'dāo tiáo mù': [26423], + 'guǐ qiú': [26425], + xiǔ: [26429, 28395, 28483, 31956], + 'chéng chēng': [26430], + zá: [26434, 27823, 30776, 35149, 38609, 38620, 38629, 38900], + 'yú wū': [26437], + 'gān gǎn': [26438], + 'chā chà': [26440], + 'shān shā': [26441], + cūn: [26449, 30388, 31476, 33189, 36358, 37032], + 'rèn ér': [26450, 26773], + 'sháo biāo': [26451], + 'dì duò': [26453, 26532], + 'gū gài': [26458], + 'yí zhì lí duò': [26461], + 'gàng gāng': [26464], + 'tiáo tiāo': [26465, 26781], + 'mà mǎ': [26473], + 'sì zhǐ xǐ': [26475], + 'yuán wán': [26476, 34454], + 'bèi fèi': [26478], + 'shū duì': [26488], + 'niǔ chǒu': [26491], + 'wò yuè': [26498, 33234], + máo: [ + 26502, 27611, 27650, 28213, 29286, 30683, 32606, 33541, 33542, 34661, 34762, + 36574, 37205, 37502, 37672, 38170, 39654, 40348, + ], + 'pī mì': [26504], + àng: [26506, 30414, 37280], + 'fāng bìng': [26507], + 'hù dǐ': [26513], + xín: [26516, 35153, 37908, 39733], + 'yāo yǎo': [26518], + 'ě è': [26521], + 'zhī qí': [26525], + 'cōng zōng': [26526, 27141], + 'xiān zhēn': [26542], + 'tái sì': [26545], + 'gǒu jǔ gōu': [26552], + 'bāo fú': [26553], + 'yì xiè': [26555, 26663], + 'tuó duò': [26561, 39345, 39364, 39534], + 'yí duò lí': [26562], + 'nǐ chì': [26565], + 'pán bàn': [26568, 36312], + 'yǎng yàng yāng yīng': [26573], + 'fù fū fǔ': [26574], + 'bǎi bó bò': [26575], + mǒu: [26576], + 'sháo shào': [26582], + zhè: [26584, 27164, 27993, 28123, 34071, 34757, 36889, 40403, 40551], + 'yòu yóu': [26586, 27390], + 'guì jǔ': [26588], + 'zhà zuò': [26590], + 'dié zhì': [26595, 30512], + 'zhā zǔ zū': [26596], + 'chá zhā': [26597, 26619], + 'āo ào': [26602, 36586], + 'bā fú pèi bó biē': [26605], + 'duò zuó wù': [26606], + 'bì bié': [26610], + 'zhù chù': [26615], + 'bēi pēi': [26616], + 'shì fèi': [26617], + 'shān zhà shi cè': [26629], + 'lì yuè': [26638, 27359], + 'qì qiè': [26644, 30732], + 'qī xī': [26646, 36426], + 'guā kuò': [26653], + 'bīng bēn': [26655], + 'xiào jiào': [26657], + 'jiàn zùn': [26667, 35000], + 'yǒu yù': [26671], + 'hé hú': [26680], + gēn: [26681, 36319], + 'zhī yì': [26682], + 'gé gē': [26684], + 'héng háng': [26689], + 'guàng guāng': [26692], + 'yí tí': [26699, 33617], + sāng: [26705, 26706, 27105], + 'jú jié': [26708], + 'yú móu': [26713], + 'ráo náo': [26721, 27208], + 'guì huì': [26727, 27292], + 'chén zhèn': [26733], + 'tīng yíng': [26735], + po: [26738], + 'bèn fàn': [26739], + 'fēng fèng': [26747, 33873], + 'sù yìn': [26752], + 'tǐng tìng': [26755], + 'xuān juān xié': [26763], + 'tú chá': [26764], + 'āo yòu': [26766], + kuǎn: [26785, 27445, 27454, 27456], + 'shāo sào': [26786], + 'qín chén cén': [26787], + 'lí sì qǐ': [26793], + 'chān yán': [26804], + 'bīn bīng': [26809, 27103, 27315], + 'táo chóu dào': [26812], + 'cōng sōng': [26823], + 'gùn hùn': [26829], + 'dé zhé': [26831], + 'pái bèi pèi': [26833], + 'bàng pǒu bèi bēi': [26835], + 'dì dài tì': [26851], + sēn: [26862, 26926, 27118, 35138], + 'rěn shěn': [26863], + 'léng lēng líng': [26865], + 'fú sù': [26868], + 'zōu sǒu': [26871], + zōu: [ + 26872, 31619, 32197, 35535, 35833, 37049, 37104, 37138, 37177, 38508, 39478, + 39546, 39915, 40112, 40640, 40817, 40826, + ], + 'zhào zhuō': [26873], + 'chēn shēn': [26877], + 'jiē qiè': [26884], + 'yǐ yī': [26885], + 'chóu zhòu diāo': [26886], + 'qiāng kōng': [26892], + 'zhuī chuí': [26894], + 'bēi pí': [26897], + mēn: [26906], + 'quān juàn quán': [26918], + 'duǒ chuán': [26927], + 'wěi huī': [26930], + 'jiǎ jiā': [26933], + 'hán jiān': [26935], + 'shèn zhēn': [26937], + 'yàn yà': [26939], + 'zhā chá': [26946], + 'guō kuǎ': [26951], + 'jí zhì': [26966], + 'kǔ hù': [26971], + 'yóu yǒu': [26978], + 'sǒng cōng': [26980], + 'yuán xuàn': [26981], + 'yǎng yàng yīng': [26983], + pián: [26985, 33020, 33089, 36038, 36417, 39394, 39432, 39560, 39615], + 'dié yè': [26986], + 'dùn shǔn': [26991], + 'còu zòu': [26993], + 'dì dǐ shì': [26996], + 'kǎi jiē': [26999], + 'róu ròu': [27002], + 'lè yuè': [27005], + 'wēn yùn': [27013, 38832], + lǘ: [27016, 27354, 27648, 33186, 34264, 38317, 38398, 39522, 39540], + shén: [27018, 31070, 37486, 39984], + 'bī pi': [27020], + 'zhǎn niǎn zhèn': [27024], + 'fú fù bó': [27025], + 'jiàn jìn': [27031], + 'bǎng bàng': [27036], + 'shā xiè': [27037, 27175], + nòu: [27080, 32808, 37778, 37918], + 'qiǎn lián xiàn': [27087], + gàng: [27091, 28981, 28985, 31611], + gāo: [ + 27092, 27129, 27248, 27356, 30590, 31705, 31957, 32660, 33263, 38879, 39227, + 39640, 39641, 40398, 40433, 40731, + ], + 'diān zhěn zhēn': [27097], + 'kǎn jiàn': [27099], + 'xí dié': [27106], + 'jī guī': [27107], + 'róng yōng': [27110], + 'tuán shuàn quán': [27115], + 'qì sè': [27117], + 'cuī zhǐ': [27119], + 'yǒu chǎo': [27121], + 'màn wàn': [27134], + 'lí chī': [27142], + 'léi lěi': [27151, 27345, 30988], + 'cháo jiǎo chāo': [27156], + 'chēng táng': [27160], + 'jiū liáo': [27163], + 'mó mú': [27169], + 'niǎo mù': [27170], + 'héng hèng': [27178, 27243], + xuě: [27184, 33188, 33373, 36684, 38634, 40008, 40149], + 'fá fèi': [27203], + rùn: [27213, 28070, 28516, 33206, 38287, 38304, 38384], + 'zhǎn jiǎn': [27215], + shùn: [27219, 30618, 30636, 33308, 34147, 38918, 39034, 39690], + 'tuí dūn': [27220], + 'táng chēng': [27222], + 'sù qiū': [27226], + 'tán diàn': [27229], + 'fén fèn fèi': [27240], + 'rǎn yān': [27242], + 'cū chu': [27259], + 'shū qiāo': [27262], + 'píng bò': [27288], + 'zhái shì tú': [27297], + 'biǎo biāo': [27302], + 'qiān lián': [27318], + 'nǐ mí': [27319], + 'jiàn kǎn': [27323], + 'nòu ruǎn rú': [27325], + 'jī jì': [27333, 31144], + 'huǎng guǒ gǔ': [27342], + 'lǜ chū': [27350], + 'miè mèi': [27351], + ōu: [ + 27353, 27431, 27472, 27572, 27590, 29935, 29964, 33170, 34290, 35635, 35764, + 37826, 40206, 40407, 40485, + ], + 'zhù zhuó': [27361], + 'jué jì': [27373], + 'huái guī': [27376], + 'chán zhàn': [27395], + 'wéi zuì': [27400], + cáng: [27404, 38006], + 'yù yì': [27429], + 'chù qù xì': [27434], + 'kài ài': [27436], + 'yì yīn': [27437], + 'xì kài': [27439], + 'shuò sòu': [27446], + 'ǎi ēi éi ěi èi': [27448], + 'qī yī': [27449], + 'chuā xū': [27451], + 'chǐ chuài': [27452], + 'kǎn qiàn': [27455], + 'kǎn kè': [27457], + 'chuǎn chuán': [27458], + 'yīn yān': [27461], + 'jìn qūn': [27471], + pēn: [27477], + 'xū chuā': [27480], + 'xī shè': [27481], + 'liǎn hān': [27483], + 'zhì chí': [27501], + 'sè shà': [27504], + sǐ: [27515], + 'wěn mò': [27518], + piǎo: [27533, 30379, 30623, 37285, 39008], + 'qíng jìng': [27537], + 'fǒu bó': [27541], + 'zhí shi': [27542], + 'yè yān yàn': [27543], + 'hūn mèi': [27545], + chòu: [27552, 33264, 36954], + 'kuì huì': [27560, 28291, 28528], + cuàn: [27561, 29110, 29224, 31388, 31428, 31713, 31762], + 'yīn yān yǐn': [27575], + 'qìng kēng shēng': [27576], + 'yáo xiáo xiào': [27581], + 'gū gǔ': [27586, 34500], + 'guàn wān': [27596], + 'dú dài': [27602], + 'xún xùn': [27621], + mú: [27626, 27649], + 'dòu nuò': [27629], + 'sāi suī': [27640], + lu: [27655], + sào: [27657, 30233, 30658, 39646], + 'shì zhī': [27663], + 'dī dǐ': [27664], + 'máng méng': [27667], + 'yáng rì': [27676], + shuǐ: [27700, 27701, 27706, 38294], + 'zhěng chéng zhèng': [27702], + tǔn: [27709], + 'fán fàn': [27710], + 'guǐ jiǔ': [27711], + 'bīn pà pā': [27715], + 'zhuó què': [27723], + 'dà tài': [27727], + pìn: [27734, 29277, 32856], + 'hàn hán': [27735, 39343], + tu: [27746], + 'tāng shāng': [27748, 28271], + 'zhī jì': [27749], + 'gàn hán cén': [27765], + 'wèn mén': [27766], + 'fāng pāng': [27768], + 'hǔ huǎng': [27771], + 'niú yóu': [27772], + hàng: [27782], + 'shěn chén': [27784], + 'dùn zhuàn': [27788], + 'nǜ niǔ': [27793], + 'méi mò': [27794, 27809], + 'tà dá': [27795], + 'mì wù': [27797], + 'hóng pāng': [27799], + 'shā shà': [27801], + 'zhuǐ zǐ': [27805], + 'ōu òu': [27812, 28442], + 'jǔ jù': [27822], + 'tuō duó': [27824], + 'mǐ lì': [27829], + 'yí chí': [27830], + 'xiè yì': [27844], + 'bó pō': [27850], + 'mì bì': [27852, 31192], + 'chù shè': [27855], + 'yōu yòu āo': [27857], + 'pēng píng': [27865, 30801], + 'pào pāo': [27873], + 'ní nì': [27877, 31196], + 'yuè sà': [27879], + 'jué xuè': [27884, 30118], + 'lóng shuāng': [27895, 28711], + 'luò pō': [27898, 28668], + 'zé shì': [27901, 28580], + 'sǎ xǐ': [27922], + 'sè qì zì': [27923], + 'xǐ xiǎn': [27927], + 'kǎo kào': [27928], + 'àn yàn è': [27933], + 'lěi lèi': [27937], + 'qiè jié': [27951], + 'qiǎn jiān': [27973], + 'jì jǐ': [27982, 28168, 28639, 32426], + 'hǔ xǔ': [27986, 28408], + 'jùn xùn': [27994, 28652], + 'yǐng chéng yíng': [28007], + 'liàn lì': [28016], + 'féng hóng': [28018, 28292], + 'jiǒng jiōng': [28027], + 'suī něi': [28029], + 'yǒng chōng': [28044], + 'tūn yūn': [28050], + 'wō guō': [28065, 28198], + hēng: [28069, 33053], + 'zhǎng zhàng': [28072, 28466], + 'shòu tāo': [28077], + shuàn: [28078, 33128], + 'kōng náng': [28083], + 'wò wǎn yuān': [28084], + 'tuō tuò': [28086], + wō: [28089, 29479, 31389, 31401, 33716, 33845, 34583, 34680, 36370], + 'qiè jí': [28097], + 'guǒ guàn': [28105], + 'lín lìn': [28107, 29532, 30084], + 'tǎng chǎng': [28108], + 'nào chuò zhuō': [28118], + 'péng píng': [28124], + féi: [28125, 32933, 33107, 34608], + 'pì pèi': [28128], + 'niǎn shěn': [28144], + 'biāo hǔ': [28146], + 'chún zhūn': [28147], + 'hùn hún': [28151], + qiǎn: [28154, 32382, 32561, 32951, 33153, 34616, 35700, 35892, 36963, 37971], + 'wèn mín': [28162], + 'rè ruò luò': [28163], + 'dú dòu': [28174, 28678, 35835], + 'jiàn jiān': [28176, 28293, 28472, 28666], + 'miǎn shéng': [28177, 28576], + 'nuǎn nuán': [28188], + 'qiú wù': [28190], + 'tíng tīng': [28191], + 'dì tí dī': [28199], + 'gǎng jiǎng': [28207], + 'hōng qìng': [28217], + tuān: [28237, 29011], + 'huì mǐn xū': [28239], + 'xǔ xù': [28241], + pén: [28243, 29931, 30406, 33872], + 'mǐn hūn': [28259], + 'tuàn nuǎn': [28266], + 'qiū jiǎo': [28267, 28268], + 'yān yīn': [28270], + 'bàn pán': [28276], + 'zhuāng hún': [28279], + 'yàn guì': [28302], + 'lián liǎn nián xián xiàn': [28307], + 'dá tǎ': [28314], + 'liū liù': [28316, 28561, 36435], + lùn: [28323], + mǎ: [ + 28324, 29368, 29505, 29595, 29802, 30721, 30908, 36964, 37815, 39340, 39532, + 39970, 40396, + ], + 'zhēn qín': [28337], + 'nì niào': [28346], + 'chù xù': [28352, 30044], + 'wěng wēng': [28355], + 'hào xuè': [28360], + 'qì xì xiē': [28362], + 'xíng yíng': [28366], + 'zé hào': [28380], + 'piāo piào piǎo': [28418], + 'cóng sǒng': [28430], + 'féng péng': [28456], + 'luò tà': [28463], + 'pēng bēn': [28464], + 'chóng shuāng': [28468], + 'huǒ kuò huò': [28471], + 'liáo liú': [28475], + 'cuǐ cuī': [28476], + 'cóng zǒng': [28480], + 'cóng zōng': [28488], + 'pì piē': [28494], + 'dàng xiàng': [28498], + 'huáng guāng': [28514], + 'liáo lào lǎo': [28518], + 'cōng zòng': [28520], + 'zhí zhì': [28522], + 'tān shàn': [28524], + 'tú zhā': [28531], + 'sàn sǎ': [28533], + hēi: [28534, 40657, 40658], + 'chéng dèng': [28548, 28691], + 'cūn cún': [28554], + 'péng pēng': [28558], + 'hòng gǒng': [28562, 37566], + 'wàn màn': [28587], + 'kuài huì': [28590], + 'guō wō': [28612], + 'pēn fén': [28614], + 'jí shà': [28616], + 'huì huò': [28618], + 'dǐng tìng': [28622], + 'mǐ nǐ': [28628], + 'bì pì': [28638], + 'cuì zuǐ': [28642], + 'hù huò': [28649], + 'ǎi kài kè': [28653], + 'wěi duì': [28667, 28706], + 'zàn cuán': [28669, 28754], + 'yǎng yàng': [28673], + 'wǎng wāng': [28679], + 'mò miè': [28686, 30492], + suǐ: [28705, 33208, 39635], + 'huái wāi': [28708], + 'zùn jiàn': [28723], + 'yīng yǐng yìng': [28724], + 'ráng ràng': [28732], + shuàng: [28736], + 'zhuó jiào zé': [28738], + sǎ: [28753, 35375, 38776], + 'luán luàn': [28755], + 'dǎng tǎng': [28761], + 'xún quán quàn': [28773], + 'huǒ biāo': [28780], + 'zhà yù': [28793], + 'fén bèn': [28803], + 'jiǒng guì': [28805], + 'pàng fēng': [28816], + quē: [28820, 32570, 32572, 33947], + biān: [ + 28830, 29048, 29954, 30765, 31550, 31663, 31849, 32232, 32534, 34649, 37001, + 37002, 37757, 38829, 39934, 39935, 40138, + ], + 'zhāo zhào': [28836], + 'zhuō chù': [28842], + 'pào páo bāo': [28846], + 'páo fǒu': [28848], + 'shǎn qián shān': [28854], + 'zhà zhá': [28856], + 'jiǎo yào': [28868], + quǎn: [28871, 29356, 29357, 30030, 32163, 32507, 34375], + 'yàng yáng': [28874], + 'lào luò': [28889], + 'huí huǐ': [28896], + rè: [28909, 29105], + 'fú páo': [28912], + 'xiè chè': [28914, 28942], + 'yàn shān': [28923], + 'hūn xūn': [28932], + kào: [28933, 29330, 37548, 38096, 38752, 39859, 39884, 40083], + 'juān yè': [28934], + 'jùn qū': [28940], + 'tāo dào': [28952], + 'chǎo jù': [28963], + 'wò ài': [28965], + 'zǒng cōng': [28967], + 'xī yì': [28972], + 'xìn xīn': [28974], + 'chāo zhuō': [28975], + 'xiǒng yīng': [28984, 28989], + kuǐ: [28995, 36332, 36446, 38925], + 'huī yùn xūn': [28999], + 'jiǎo qiāo': [29005], + 'qián shǎn shān': [29012], + 'xī yí': [29013], + 'shà shā': [29022], + 'yè zhá': [29024], + 'yáng yàng': [29036], + 'ēn yūn': [29054], + 'yūn yǔn': [29061], + 'hè xiāo': [29063], + xióng: [29066, 29067, 38596], + 'xūn xùn': [29071, 29195], + gòng: [29077, 36002, 36129], + liū: [29080], + 'cōng zǒng': [29084], + 'lù āo': [29085], + 'shú shóu': [29087], + 'fēng péng': [29090], + 'cuǐ suī': [29091], + tēng: [29093, 33199, 40735], + 'yùn yù': [29096], + 'áo āo': [29100], + 'hàn rǎn': [29103], + 'ōu ǒu': [29104], + 'huáng huǎng': [29119], + 'chǎn dǎn chàn': [29120], + 'jiāo zhuó qiáo jué': [29131], + 'yàn yān': [29141], + 'tài liè': [29156], + āo: [29194], + 'yàn xún': [29203], + 'jué jiào': [29213, 35216, 35226, 35258, 35273], + 'lǎn làn': [29222], + 'zhuǎ zhǎo': [29226], + 'zhǎo zhuǎ': [29227], + 'fù fǔ': [29238], + diē: [29241, 35130, 36300], + zāng: [29250, 32664, 33255, 36045, 36056, 36115, 36124, 36163, 39634], + 'piàn piān': [29255], + 'biān miàn': [29265], + bǎng: [29267, 32129, 32465], + 'yǒu yōng': [29271], + 'chēng chèng': [29274, 31424], + niú: [29275, 29276], + 'jiū lè': [29278], + 'mù móu': [29279], + māng: [29284], + 'gē qiú': [29291], + 'yòu chōu': [29296], + 'tè zhí': [29318], + bēn: [29319, 37659, 38171], + 'jiān qián': [29325, 29610], + má: [29336, 30194, 34100, 34759, 40635], + 'máo lí': [29339], + 'bá quǎn': [29358], + 'zhuó bào': [29363], + 'àn hān': [29364], + 'kàng gǎng': [29370], + 'pèi fèi': [29371], + 'fān huān': [29375], + kuáng: [29378, 29381, 35473, 35827, 36566, 36576, 40287], + 'yí quán chí': [29387], + 'xīng shēng': [29388], + 'tuó yí': [29391], + kǔ: [29404, 33510], + 'huán huān': [29407], + 'hé mò': [29410], + 'tà shì': [29415], + 'máng dòu': [29429], + 'xī shǐ': [29430], + suān: [29435, 30176, 37240], + 'bài pí': [29448], + 'jiān yàn': [29455, 35939], + 'yī yǐ': [29463], + 'yá wèi': [29466], + cāi: [29468], + 'māo máo': [29483, 35987], + 'chuàn chuān': [29485], + 'tuān tuàn': [29487, 35986], + 'yà jiá qiè': [29488], + 'hè xiē gé hài': [29490], + 'biān piàn': [29493, 29553], + 'bó pò': [29500], + 'háo gāo': [29515], + 'fén fèn': [29526], + 'yào xiāo': [29535], + 'shuò xī': [29537], + 'gé liè xiē': [29542], + 'nòu rú': [29555], + 'náo nǎo yōu': [29558], + ráng: [29565, 29924, 31155, 31331, 31344, 34328, 36511, 39716], + 'náo yōu': [29567], + 'lǜ shuài': [29575], + 'wáng wàng': [29579], + 'yáng chàng': [29594], + 'mín wén': [29599], + 'bīn fēn': [29602], + 'mén yǔn': [29607], + 'qiāng cāng': [29617, 29810, 31724], + 'án gān': [29621], + 'xuán xián': [29625], + 'cī cǐ': [29628, 36304], + 'yí tāi': [29638], + 'zǔ jù': [29639], + fà: [29648, 29754, 34143, 39658, 39662], + 'yín kèn': [29666], + 'huī hún': [29682], + 'xuán qióng': [29697], + 'fú fū': [29704], + 'bǐng pín': [29717], + 'cuì sè': [29719], + 'yù wéi': [29727], + 'tiǎn tiàn': [29728], + 'zhuó zuó': [29730], + 'běng pěi': [29731], + guǎn: [ + 29743, 29869, 30191, 31590, 31649, 33304, 36648, 37671, 39208, 39302, 40164, + ], + 'hún huī': [29759], + 'xié jiē': [29774], + 'chàng dàng yáng': [29778], + 'tiàn zhèn': [29809], + 'bīn pián': [29816, 29880], + 'tú shū': [29817], + cuǐ: [29824, 30368, 36257], + 'zǎo suǒ': [29829], + 'jué qióng': [29850], + 'lú fū': [29879], + 'jì zī': [29886], + suí: [29901, 32143, 32485, 36928, 38543, 38568, 39620], + 'mí xǐ': [29909], + 'qióng wěi wèi': [29911], + 'huán yè yà': [29915], + 'bó páo': [29919], + 'zhí hú': [29921], + piáo: [29922, 38365], + 'wǎ wà': [29926], + 'xiáng hóng': [29928], + wèng: [29934, 29973, 32587, 34169, 40774], + 'shèn shén': [29978], + ruí: [29988, 32204, 34148], + yòng: [29992, 30781, 33498, 33935, 37279], + shuǎi: [29993], + béng: [29997, 29998], + 'yóu zhá': [30004], + 'diàn tián shèng': [30008], + 'tǐng dīng': [30010, 30012], + 'zāi zī': [30014], + 'bì qí': [30017], + 'dá fú': [30039], + 'cè jì': [30047], + 'zāi zī tián': [30048], + 'zhì chóu shì': [30052], + 'fān pān': [30056, 30058], + 'shē yú': [30060], + 'dāng dàng dǎng': [30070], + 'jiāng qiáng': [30086], + 'pǐ yǎ shū': [30091], + 'jié qiè': [30092], + 'yí nǐ': [30097], + nè: [30098, 30514, 35365, 35767], + 'gē yì': [30105], + 'nüè yào': [30111, 30247], + 'lì lài': [30112, 30296], + 'yǎ xiā': [30120], + xuē: [30134, 33926, 34203, 36773, 36778, 38772, 38846], + 'dǎn da': [30136], + 'fá biǎn': [30138], + 'fèi féi': [30143, 30193], + 'shān diàn': [30145], + 'téng chóng': [30155], + 'tōng tóng': [30156], + 'wěi yòu yù': [30159], + 'tān shǐ': [30161], + 'pū pù': [30177, 37610], + 'bēng péng': [30189], + 'má lìn': [30195], + 'tiǎn diàn': [30198], + 'ān yè è': [30199], + 'kē ē': [30206], + 'zhì chì': [30216], + 'jiǎ xiá xiā': [30229], + 'lěi huì': [30243], + 'chài cuó': [30245], + 'diān chēn': [30248], + 'da dá': [30249], + 'biě biē': [30250], + qué: [30264], + 'dàn dān': [30281], + 'guì wēi': [30288], + 'nòng nóng': [30289], + 'biē biě': [30303], + 'bō bǒ': [30327], + bái: [30333], + 'jí bī': [30336], + 'de dì dí dī': [30340], + 'pā bà': [30341], + 'gāo háo': [30347], + 'gāo yáo': [30352], + 'lì luò bō': [30378], + 'zhā cǔ': [30395], + 'zhāo zhǎn dǎn': [30397], + 'jiān jiàn': [30417, 30435, 37627, 38388, 38828], + 'gài gě hé': [30422], + 'máng wàng': [30451], + yuǎn: [30454, 36922, 36960], + 'tián xián': [30455], + 'xiāng xiàng': [30456], + dǔn: [30457, 36280, 36489], + 'xì pǎn': [30459], + 'shěng xǐng': [30465], + 'yún hùn': [30467], + 'miǎn miàn': [30468], + 'kàn kān': [30475], + 'yìng yāng yǎng': [30479], + 'yǎo āo ǎo': [30481], + 'jū xū kōu': [30487], + 'yí chì': [30489], + 'dié tì': [30499], + 'bǐng fǎng': [30506], + 'pàng pán': [30507], + 'mī mí': [30511, 30599], + 'xuàn shùn xún': [30516], + tiào: [30522, 31900, 31990, 35228, 36242], + 'zhe zhuó zháo zhāo': [30528], + 'qiáo shào xiāo': [30532], + 'cuó zhuài': [30537], + gùn: [30548, 35636], + 'suì zuì': [30559], + 'pì bì': [30565, 31275, 36767], + 'yì zé gāo': [30570], + 'xǐng xìng': [30578], + 'guì wèi kuì': [30598], + 'kòu jì': [30601], + 'qióng huán': [30607], + 'mán mén': [30610, 30622], + 'diāo dōu': [30615], + 'lou lóu lǘ': [30620], + 'shùn rún': [30628], + 'liào liǎo': [30637, 38028], + 'jiàn xián': [30639], + 'wǔ mí': [30644], + 'guì kuì': [30646], + 'nǐng chēng': [30659], + 'huò yuè': [30662], + 'mēng méng': [30663], + 'kuàng guō': [30668], + 'guàn quán': [30676], + 'mǎn mán': [30677], + 'jīn guān qín': [30684], + 'jīn qín guān': [30685], + 'yù xù jué': [30686], + 'jiǎo jiáo': [30699, 30703], + duǎn: [30701], + 'shí dàn': [30707], + 'gāng qiāng kòng': [30716], + 'huā xū': [30729], + 'pīn bīn fēn': [30735], + 'yán yàn': [30740, 30799], + 'luǒ kē': [30754], + 'fú fèi': [30761, 31536], + 'zhǔ zhù': [30763], + 'lá lì lā': [30764], + 'kuāng guāng': [30788], + 'gè luò': [30796], + 'shuò shí': [30805, 30889], + 'wèi wéi ái': [30809], + 'què kè kù': [30814], + 'mǎng bàng': [30821], + 'luò lòng': [30822], + 'yǒng tóng': [30823], + nüè: [30840, 34384], + 'kēng kěng': [30843], + 'yān yǎn': [30845], + 'zhuì chuí duǒ': [30846], + 'kōng kòng': [30847], + 'zòng cóng': [30850], + 'jiān zhàn': [30858], + 'lù liù': [30860, 38470], + 'què xī': [30863], + 'lún lǔn lùn': [30870], + 'náo gāng': [30873], + 'jié yà': [30883], + 'wèi wěi': [30888], + 'tí dī': [30894], + 'chá chā': [30900], + 'qiāo què': [30907], + 'sù xiè': [30911], + 'liú liù': [30914, 36955, 37798, 39311], + 'sī tí': [30915], + 'bàng páng': [30917], + 'huá kě gū': [30918], + 'wěi kuǐ': [30920], + 'xiá qià yà': [30925], + 'lián qiān': [30927], + 'wèi ái gài': [30929], + 'lá lā': [30934], + 'áo qiāo': [30941], + 'pēng pèng': [30942, 38299], + 'yīn yǐn': [30948], + 'lěi léi': [30949], + 'mó mò': [30952], + 'qì zhú': [30953], + 'láo luò': [30961], + 'pán bō': [30971], + 'jí shé': [30972], + 'hé qiāo qiào': [30985], + 'kè huò': [30986], + 'què hú': [30992], + 'è qì': [31000], + cǎ: [31012, 31032], + 'xián xín': [31013], + 'léi lěi lèi': [31015], + 'yán yǎn': [31033], + 'qí zhǐ': [31047, 34452], + 'bēng fāng': [31050], + 'bì mì': [31061], + suàn: [31064, 31495, 31597, 31639, 33948], + 'piào piāo': [31080], + 'jì zhài': [31085], + 'shuì lèi': [31089], + 'jìn jīn': [31105], + 'chán shàn': [31109], + 'yáng shāng': [31123], + 'zhī zhǐ tí': [31124], + 'shàn chán': [31146], + 'yú yù ǒu': [31162], + 'zǐ zì': [31172], + 'chá ná': [31173], + 'zhǒng zhòng chóng': [31181], + 'hào mào': [31183], + 'kù kū': [31193], + zū: [31199, 33861], + chèng: [31204, 31338], + 'huó kuò': [31214, 31219], + 'chēng chèn chèng': [31216, 31281], + 'shì zhì': [31218, 37556], + 'fù pū': [31231], + 'xùn zè': [31236], + 'tú shǔ': [31244], + 'zhùn zhǔn': [31253], + 'jī qí': [31256, 32168, 35309], + 'léng líng': [31260], + 'zuì zú sū': [31265], + 'xì qiè': [31271, 37060], + 'zhǒng zhòng': [31278], + 'zōng zǒng': [31279], + 'xián jiān liàn': [31284], + 'zī jiū': [31285], + 'jī qǐ': [31293], + ròng: [31299], + 'shān cǎn cēn': [31303], + 'mén méi': [31304], + 'jǐ jì': [31318], + 'xiāo rào': [31320], + 'zhuō bó': [31323], + 'tóng zhǒng zhòng': [31324], + zuō: [31325], + 'biāo pāo': [31342, 34280], + 'zhuō jué': [31345], + 'cuán zàn': [31347], + 'kōng kòng kǒng': [31354], + 'yū yǔ': [31355], + zhǎi: [31364, 37465], + báo: [31367, 38649], + 'kū zhú': [31371], + 'jiào liáo liù': [31372], + 'wā guī': [31376], + 'tiǎo yáo': [31381], + 'xūn yìn': [31400], + 'yà yē': [31403], + 'tián diān yǎn': [31412], + 'chāo kē': [31420], + 'kuǎn cuàn': [31421, 31422], + 'chù qì': [31440], + 'qǔ kǒu': [31448], + 'jìng zhěn': [31463], + 'kǎn kàn': [31479], + 'zhú dǔ': [31482], + 'lè jīn': [31483], + 'zhuì ruì': [31501], + 'háng hàng': [31504], + 'cén jìn hán': [31506], + 'dā xiá nà': [31514], + 'zé zuó': [31534], + 'lóng lǒng': [31548, 31725, 31840, 36504, 40851], + 'zhù zhú': [31569, 31689], + 'dá dā': [31572, 33605], + shāi: [31579, 31721, 31745, 31853], + 'yún jūn': [31584], + 'láng làng': [31588, 37070, 38406], + 'zhì zhǐ': [31595], + o: [31613], + 'póu bù fú pú': [31617], + 'pái bēi': [31620], + gè: [31623, 34428, 37499, 38124], + 'tái chí': [31624], + 'guǎi dài': [31625], + 'zhào dào': [31628], + 'jīng qìng': [31632], + 'lín lǐn': [31638], + 'jùn qūn': [31640], + 'shī yí': [31671, 37366], + 'yuē yào chuò': [31673], + 'xiāo shuò qiào': [31678], + 'gōng gǎn lǒng': [31714], + 'páng péng': [31715], + 'zhuó huò': [31719], + 'jiǎn jiān': [31727], + 'dí zhú': [31732], + 'zān cēn cǎn': [31736], + 'zhuàn suǎn zuàn': [31737], + 'piǎo biāo': [31739], + 'guó guì': [31746], + 'cè jí': [31758], + 'mì miè': [31770], + 'shāi sī': [31771], + 'sǔn zhuàn': [31784], + 'gàn gǎn': [31795], + 'bò bǒ': [31800], + 'bó bù': [31807], + shi: [31810], + 'zhēn jiān': [31816], + 'zhuàn zuǎn': [31825], + 'fān pān biān': [31827], + 'sǒu shǔ': [31828], + zuǎn: [31851, 32356, 32386, 32393, 32408, 32565], + nǚ: [31865, 37369, 38037], + 'shā chǎo': [31878], + 'kāng jīng': [31879], + fěn: [31881, 40698], + cū: [31895, 35285, 40577, 40580, 40612], + 'nián zhān': [31896], + 'cè sè': [31907], + 'zhōu yù': [31909], + 'shēn sǎn': [31937], + 'biān biǎn': [31940, 33849], + miàn: [31942, 38754, 38755, 40618, 40619, 40629, 40634], + 'hú hū hù': [31946], + 'gǔ gòu': [31955], + 'mí méi': [31964], + 'sǎn shēn': [31965, 31971], + zāo: [31967, 36455, 36973, 37289], + 'mì sī': [31992], + 'jiū jiǔ': [31994], + 'xì jì': [31995, 32363], + 'zhēng zhěng': [31997], + 'chà chǎ': [32001, 34921], + 'yuē yāo': [32004, 32422], + 'hóng gōng': [32005, 32418], + 'hé gē': [32007, 32421], + 'wén wèn': [32011, 32441], + fóu: [32017], + 'jì jié jiè': [32018], + 'pī pí bǐ': [32021, 32432], + 'jīn jìn': [32031], + 'zhā zā': [32037, 32046], + hā: [32038], + 'fū fù': [32040], + 'chōu chóu': [32044], + 'lèi léi lěi': [32047], + 'bō bì': [32052], + 'tiǎn zhěn': [32062], + 'jiōng jiǒng': [32069], + 'jié jiē': [32080, 32467, 33410], + 'guà kuā': [32083], + 'bǎi mò': [32084], + 'gēng huán': [32089], + 'jié xié': [32092], + 'quán shuān': [32095], + 'gǎi ǎi': [32096], + 'luò lào': [32097, 32476], + 'bīng bēng pēng': [32099], + 'gěi jǐ': [32102, 32473], + 'tóng tōng dòng': [32103], + 'tiào diào dào': [32105], + 'lěi lèi léi': [32107], + 'gāi hài': [32111], + 'chī zhǐ': [32122], + 'wèn miǎn mán wàn': [32123], + 'huán huàn wàn': [32132], + 'qīn xiān': [32133], + 'tì tí': [32136], + 'yán xiàn': [32150], + 'zōng zèng zòng': [32156], + 'chēn lín': [32157], + 'zhǔn zhùn': [32167], + 'qiàn qīng zhēng': [32170], + 'qìng qǐ': [32174], + 'lún guān': [32184, 32438], + 'chuò chāo': [32189, 32496], + 'tián tǎn chān': [32194], + 'lǜ lù': [32209, 32511], + 'ruǎn ruàn': [32219], + 'jí qī': [32221], + 'zhòng chóng': [32223, 37325], + 'miáo máo': [32226], + 'xiè yè': [32228], + huǎn: [32233, 32531], + 'gēng gèng': [32234, 32262], + 'tōu xū shū': [32240], + 'zōng zòng': [32245, 32332], + 'yùn gǔn': [32247], + 'guā wō': [32250], + 'yùn yūn wēn': [32252, 32277], + 'bāng bàng': [32269], + 'gǔ hú': [32270, 40379], + 'cī cuò suǒ': [32274], + 'cuī shuāi': [32279], + 'róng rǒng ròng': [32281], + 'zài zēng': [32289], + cài: [32297, 33756, 34081], + 'féng fèng': [32299], + 'suō sù': [32302, 32553], + 'yǎn yǐn': [32303, 37203], + 'zòng zǒng': [32305, 32437], + 'zhuàn juàn': [32307], + 'mò mù': [32312, 33707], + 'piǎo piāo': [32313, 32549], + 'fán pó': [32321], + 'bēng bèng': [32323], + 'móu miù miào liǎo': [32326], + 'yáo yóu zhòu': [32327], + 'zēng zèng': [32338, 32559], + 'jú jué': [32344], + 'chuō chuò': [32347], + 'zūn zǔn': [32348], + rào: [32350, 32469, 36982], + 'chǎn chán': [32351], + 'huì huí': [32354, 32523, 34289], + 'qiāo sāo zǎo': [32368], + 'jiǎo zhuó': [32371, 32564], + 'dàn tán chán': [32373], + nǒng: [32375], + 'pú fú': [32384], + 'yào lì': [32389], + 'rǎng xiāng': [32405], + 'lí sǎ xǐ lǐ': [32410], + 'xiān qiàn': [32420], + 'jīng jìng': [32463], + 'tí tì': [32488], + 'bēng běng bèng': [32503], + 'zōng zèng': [32508], + 'jī qī': [32521], + 'wēn yùn yūn': [32522], + 'fèng féng': [32541], + 'shuāi cuī suī': [32542], + 'miù móu liáo miào mù': [32554], + 'qiāo sāo': [32562], + fǒu: [32566, 32569, 32571, 38636, 40192], + 'bà ba pí': [32610, 32631], + 'guà guǎi': [32619], + 'yáng xiáng': [32650, 32655], + 'měi gāo': [32665], + 'yì xī': [32667], + 'qiǎng qiān': [32671], + 'qiāng kòng': [32683], + 'qián xián yán': [32684], + nóu: [32698], + 'hóng gòng': [32702], + 'pī bì pō': [32717], + 'qú yù': [32721], + ké: [32727], + 'qiào qiáo': [32728], + 'zhái dí': [32735], + 'dào zhōu': [32738], + 'hóu qú': [32757], + shuǎ: [32781], + 'ruǎn nuò': [32782], + 'ér nài': [32783], + 'zhuān duān': [32785], + 'pá bà': [32793], + 'chí sì': [32795], + 'qù chú': [32797], + 'lún lǔn': [32803], + 'jí jiè': [32804], + 'tāng tǎng': [32805], + pǎng: [32810, 35243], + 'zhá zé': [32811], + 'yē yé': [32822], + 'yún yíng': [32826], + 'wà tuǐ zhuó': [32841], + 'ér nǜ': [32847], + 'tiē zhé': [32849], + 'dǐ zhì': [32860], + qié: [32890], + 'nǐ jiàn': [32891], + 'lèi lē': [32907], + cào: [32911, 35161, 37173, 40732], + 'bó dí': [32913], + 'xiào xiāo': [32918], + 'dù dǔ': [32922], + chāi: [32926, 37365, 38039], + 'hán qín hàn': [32931], + 'pàng pán pàn': [32936, 32982], + 'zhūn chún': [32939], + āng: [32942, 39599], + 'yù yō': [32946], + 'pí bǐ bì': [32950], + 'fèi bì': [32967], + 'bèi bēi': [32972], + 'fèi zǐ': [32975], + 'píng pēng': [32979, 33529], + 'fū fú zhǒu': [32981], + 'shèng shēng': [32988], + kuà: [33007, 36328, 39611], + 'gǎi hǎi': [33010], + 'gē gé gā': [33011], + 'néng nài': [33021], + 'guī kuì': [33023], + 'mài mò': [33033], + 'zāng zàng': [33039], + 'jiǎo jué': [33050, 35282], + cuǒ: [33054], + 'de te': [33062], + 'zuī juān': [33063], + něi: [33070, 33095, 39186, 39297, 39870, 39896], + 'pú fǔ': [33071], + niào: [33074], + shuí: [33085], + guò: [33090, 36942, 37945], + 'là xī': [33098], + 'yān ā': [33100], + 'gāo gào': [33167], + 'lù biāo': [33172], + chuái: [33175], + 'zhuān chuán chún zhuǎn': [33182], + chuài: [33194, 36409], + 'fán pán': [33200], + 'wǔ hū': [33204], + 'shān dàn': [33211], + tún: [ + 33216, 33227, 34508, 35928, 35930, 36568, 38677, 39145, 39272, 39784, 40064, + 40663, + ], + 'bì bei': [33218], + 'là gé': [33224], + 'sào sāo': [33226], + nào: [33233, 38297, 38393, 39719], + 'ní luán': [33249], + 'qiān xián': [33252], + 'guàng jiǒng': [33254], + 'guǎng jiǒng': [33257], + 'chòu xiù': [33261], + 'mián biān': [33265], + 'dié zhí': [33271], + 'zhī jìn': [33272], + 'shè shě': [33293], + pù: [33302, 33303], + 'bān bō pán': [33324], + kuā: [33343], + 'gèn gěn': [33390], + 'sè shǎi': [33394], + 'fú bó': [33396], + 'jiāo qiú': [33405], + 'chāi chā': [33414], + 'sháo què': [33421], + 'hù xià': [33424], + 'zì zǐ': [33427], + 'huì hū': [33428], + 'tún chūn': [33434], + 'jiè gài': [33445], + 'xù zhù': [33447], + 'yuán yán': [33451], + 'xīn xìn': [33455], + 'lún huā': [33458], + 'wù hū': [33460], + 'gōu gǒu': [33462], + 'mào máo': [33468], + 'fèi fú': [33470], + 'chán yín': [33474], + qiē: [33478], + 'sū sù': [33487], + 'tiáo sháo': [33493], + 'lì jī': [33497], + 'kē hē': [33499], + 'jù qǔ': [33507], + 'ruò rě': [33509], + 'zhù níng': [33511], + 'pā bó': [33513], + xiú: [33516], + 'zhǎ zuó': [33522], + 'jū chá': [33524], + nié: [33526], + 'shēng ruí': [33532], + 'qié jiā': [33540], + 'zǐ cí': [33544], + 'qiàn xī': [33564], + chǎi: [33565], + 'fá pèi': [33591], + ráo: [33627, 34136, 35155, 39250, 39286], + 'yíng xíng': [33637], + 'qián xún': [33640, 34113], + 'yìn yīn': [33643], + 'hé hè': [33655], + 'shā suō': [33678], + 'péng fēng': [33681], + 'shēn xīn': [33688], + 'wǎn guān guǎn': [33694], + 'yóu sù': [33700], + 'shāo xiāo': [33702, 34552], + 'làng liáng': [33704], + 'piǎo fú': [33705], + 'wèn wǎn miǎn': [33708], + 'shì shí': [33715, 33940], + 'tù tú': [33717], + 'xiān liǎn': [33718, 34207], + 'wǎn yù': [33728], + 'zōu chù': [33734], + 'lù lǜ': [33737], + 'jūn jùn': [33740], + 'niè rěn': [33741], + 'zī zì zāi': [33745], + 'tú tù': [33759], + 'jiē shà': [33768], + 'qiáo zhǎo': [33772], + 'tái zhī chí': [33773], + 'fēi fěi': [33778, 34586], + 'qín qīn jīn': [33779], + 'zū jù': [33785, 33961], + 'lǐn má': [33787], + 'tián tiàn': [33790], + tiē: [33820, 36028, 36148], + 'luò là lào luō': [33853], + 'zhù zhuó zhe': [33879], + 'shèn rèn': [33882], + 'gě gé': [33883], + 'jùn suǒ': [33904], + 'kuì kuài': [33929], + 'rú ná': [33944], + 'méng mēng měng': [33945], + 'yuán huán': [33949], + 'xú shú': [33955], + 'xí xì': [33973], + 'mì míng': [33986], + 'sōu sǒu': [33987], + 'gài gě hé hài': [33995], + 'yǎo zhuó': [34004], + 'diào tiáo dí': [34023], + 'xū qiū fū': [34034], + 'zí jú': [34043], + 'liǎo lù': [34044], + xu: [34047], + 'hàn hǎn': [34058], + 'màn wàn mán': [34067], + 'pó bò': [34082], + 'fān fán bō': [34115], + 'hóng hòng': [34171], + 'yù ào': [34177, 38569], + 'xí xiào': [34178], + 'báo bó bò': [34180], + 'cí zī': [34187], + 'wàn luàn': [34189], + 'kǎo hāo': [34215], + 'yuǎn wěi': [34227], + 'zhòu chóu': [34229], + 'wō mái': [34230], + 'xiāo hào': [34243], + 'yù xù xū': [34247], + 'jiè jí': [34249], + 'diào zhuó': [34251], + 'cáng zàng': [34255], + lǎ: [34270], + 'chú zhū': [34296], + 'pín píng': [34315], + 'gān hán': [34423], + 'hóng jiàng': [34425], + 'huī huǐ': [34426], + 'xiā há': [34430], + 'mǎ mà mā': [34434], + 'fāng bàng': [34436], + 'bàng bèng': [34444], + 'jué quē': [34455], + 'qín qián': [34457], + 'gōng zhōng': [34467], + 'fǔ fù': [34469], + 'dài dé': [34478], + 'gǒu qú xù': [34492], + 'bǒ pí': [34494], + 'shé yí': [34503], + tiě: [34504, 37444, 37525, 37921, 37941, 38081, 39510], + 'gé luò': [34514], + 'máng bàng': [34518], + 'yì xǔ': [34529], + 'há gé': [34532], + 'qiè ní': [34538], + 'é yǐ': [34558], + 'zhē zhé': [34567], + 'là zhà': [34593], + suò: [34614, 36900], + 'yóu qiú': [34660], + 'xiā hā': [34662], + 'xī qī': [34695], + 'bī pí': [34709], + 'nài něng': [34714], + 'hé xiá': [34715], + 'guì huǐ': [34717], + 'mǎ mā mà': [34718], + 'shì zhē': [34731], + 'zhì dié': [34738], + 'jiàn chán': [34745], + 'ma má mò': [34758], + 'mǎng měng': [34770], + 'biē bié': [34782], + 'bēn fèi': [34790], + 'láo liáo': [34791], + 'yín xún': [34795], + 'lí lǐ': [34849], + 'xuè xiě': [34880], + 'xíng háng hàng héng': [34892], + 'shuāi cuī': [34928], + 'tuó tuō': [34953], + 'lǐng líng': [34954], + 'bào páo pào': [34956], + 'jù jiē': [34963], + 'hè kè': [34964], + 'yí yì': [34968, 36004], + 'nà jué': [34982], + 'bèi pī': [34987], + 'chǐ nuǒ': [34994], + 'chǐ qǐ duǒ nuǒ': [34995], + 'jiá qiā jié': [34999], + 'bó mò': [35001], + 'guī guà': [35007], + 'liè liě': [35010], + 'chéng chěng': [35022], + 'jiē gé': [35027], + 'dāo chóu': [35055], + 'shang cháng': [35059], + 'yuān gǔn': [35063], + 'yǎn ān': [35066], + 'tì xī': [35068], + 'fù fú': [35092], + 'chǔ zhǔ': [35098], + 'tuì tùn': [35114], + lǎi: [35184], + 'yào yāo': [35201], + 'qín tán': [35203], + 'jiàn xiàn': [35211, 35265], + piǎn: [35217, 35550, 35869, 36021], + 'piē miè': [35221], + 'yíng yǐng': [35246], + 'qù qū': [35248, 35255, 35281], + 'jiàn biǎn': [35253], + 'luó luǎn': [35254], + 'zī zuǐ': [35292], + 'huà xiè': [35295], + 'jiě jiè xiè': [35299, 35303], + 'xué hù': [35319], + 'lì lù': [35323], + tǎo: [35342, 35752], + zhùn: [35376], + 'zī zǐ': [35390], + 'yí dài': [35410, 35794], + xiòng: [35415, 35783], + 'diào tiǎo': [35458], + 'yí chǐ chì': [35459], + 'lǎng làng': [35471], + 'ēi éi ěi èi xī': [35474, 35830], + shuà: [35484], + 'yǔ yù': [35486, 35821, 38632], + 'shuō shuì yuè': [35498, 35828], + 'shuí shéi': [35504, 35841], + 'qū juè': [35507], + 'chī lài': [35514], + 'nì ná': [35517], + 'diào tiáo': [35519], + 'pǐ bēi': [35520], + 'jì jī': [35525], + 'zé zuò zhǎ cuò': [35534], + 'chù jí': [35540], + 'háo xià': [35541], + 'lùn lún': [35542, 35770], + 'shì dì': [35551], + 'huà guā': [35555], + 'xǐ shāi āi': [35568], + 'nán nàn': [35573, 38627], + miù: [35628, 35884], + zèn: [35670, 35886], + 'shí zhì': [35672, 35782], + 'juàn xuān': [35714], + 'yí tuī': [35721], + zhán: [35741], + 'xǔ hǔ': [35768], + 'xiáng yáng': [35814], + 'tiáo diào zhōu': [35843], + 'chén shèn': [35852], + 'mí mèi': [35868], + 'màn mán': [35881], + 'gǔ yù': [35895], + 'huō huò huá': [35905], + 'zhì zhài': [35960], + 'huān huán': [35974], + 'kěn kūn': [35975], + 'mò hé': [35976], + 'mò hé háo': [35977], + 'jù lóu': [35991], + 'zé zhài': [36012, 36131], + 'dài tè': [36024], + 'bì bēn': [36033], + 'jiǎ gǔ jià': [36040], + 'xiōng mín': [36079], + càng: [36086], + 'zhuàn zuàn': [36090, 36186], + 'wàn zhuàn': [36099], + 'gàn gòng zhuàng': [36123], + 'yuán yùn': [36128], + 'bēn bì': [36146], + 'jiǎ gǔ': [36158], + zǒu: [36208, 36209, 39888], + 'dié tú': [36227], + 'jū qiè': [36228], + 'qū cù': [36235, 36264], + 'jí jié': [36236], + 'guā huó': [36239], + 'què qì jí': [36254], + 'tàng tāng': [36255], + 'chuō zhuó': [36256], + 'qù cù': [36259], + 'yuè tì': [36271], + 'bō bào': [36277], + 'kuà wù': [36278], + 'guì jué': [36281], + 'fāng fàng páng': [36285], + 'páo bà': [36289], + 'qí qǐ': [36290], + 'jiàn chén': [36296], + 'pǎo páo': [36305], + 'diǎn diē tiē': [36309], + 'jū jù qiè': [36313], + bǒ: [36315], + 'luò lì': [36318], + 'dài duò duō chí': [36322], + zhuǎi: [36329], + 'bèng pián': [36336], + 'tiào táo': [36339], + 'shū chōu': [36350], + 'liàng liáng': [36361], + 'tà tā': [36367], + chǎ: [36421, 37972, 38258], + 'dí zhí': [36450], + 'dēng dèng': [36460, 37913, 38251], + cèng: [36461], + 'dūn cún': [36466], + 'juě jué': [36470], + liāo: [36477], + 'xiè sǎ': [36512], + tǐ: [36528, 36550, 39605], + 'yà zhá gá': [36555], + 'xìn xiàn': [36560], + 'fàn guǐ': [36563], + 'zhuàn zhuǎn': [36578], + 'zhóu zhòu': [36600, 36724], + bú: [36688, 37293, 40170], + 'zhuǎn zhuàn zhuǎi': [36716], + 'zǎi zài': [36733], + 'niǎn zhǎn': [36759], + 'biān bian': [36793], + 'dào biān': [36794], + 'yǐ yí': [36806, 36836, 36849], + 'guò guo guō': [36807], + 'wàng kuāng': [36811], + 'hái huán': [36824], + 'zhè zhèi': [36825], + 'yuǎn yuàn': [36828], + 'zhì lì': [36835], + 'zhù wǎng': [36844], + 'zhuī duī': [36861], + 'shì kuò': [36866], + tòu: [36879], + 'tōng tòng': [36890], + guàng: [36891], + 'dǎi dài': [36910], + 'suì suí': [36930], + 'tí dì': [36934], + 'yí wèi': [36951], + 'shì dí zhé': [36969], + cà: [36970], + 'huán hái': [36996], + 'lí chí': [37004], + 'kàng háng': [37023], + 'nà nèi nā': [37027], + 'xié yá yé yú xú': [37034], + 'gāi hái': [37058], + 'huán xún': [37063], + 'chī xī': [37079], + hǎo: [37085], + 'lì zhí': [37094], + 'xiáo ǎo': [37097], + 'dōu dū': [37117], + liǎo: [26338, 37149, 38269], + 'zàn cuán cuó': [37186, 37191], + 'dīng dǐng': [37194], + 'cù zuò': [37218], + 'fā pō': [37222], + 'shāi shī': [37246], + niàng: [37247, 37304], + 'qiú chōu': [37268], + 'pō fā': [37271, 37297], + 'chǎn chěn': [37286], + 'yàn liǎn xiān': [37302], + 'niàng niáng': [37312], + 'lǐ li': [37324], + 'lí xǐ xī': [37328], + 'liǎo liào': [37333], + 'dīng dìng': [37336, 38025], + 'qiǎo jiǎo': [37349], + 'yú huá': [37354], + 'huá wū': [37355], + 'rì rèn jiàn': [37360, 37372], + 'dì dài': [37361], + 'pī zhāo': [37373], + 'yá yé': [37374], + 'bǎ pá': [37376, 38063], + 'tā tuó': [37448, 38090], + běi: [37491], + 'bǐng píng': [37500], + 'hā kē': [37503, 38122], + chòng: [37507, 38131], + 'xiǎng jiōng': [37508], + 'yù sì': [37513], + 'xù huì': [37514], + 'rén rěn': [37515], + 'shàn shuò': [37519], + 'chì lì': [37520], + 'xiǎn xǐ': [37521, 38115], + 'hóu xiàng': [37527], + 'diào tiáo yáo': [37530], + 'xiān kuò tiǎn guā': [37531, 37565, 38118], + 'zhé niè': [37560], + 'zhōng yōng': [37567], + 'tōu tù dòu': [37568], + 'méi méng': [37570], + 'wàn jiǎn': [37572, 37803], + 'tǐng dìng': [37580, 38116], + 'juān jiān cuān': [37585], + 'sī tuó': [37590], + 'juān xuān juàn': [37591], + 'wú huá wū': [37592], + 'zhuó chuò': [37596], + 'xíng xìng jīng': [37598], + 'jū jú': [37606, 38164], + 'zuì niè': [37623], + 'yuān yuǎn wǎn wān': [37626], + 'gāng gàng': [37628, 38050], + zhuī: [37648, 38181, 39429, 39571, 40315], + ā: [37650, 38165], + 'cuō chā': [37768], + 'suǒ sè': [37773], + 'yáo zú': [37776], + 'yè tà gé': [37777], + 'qiāng chēng': [37783], + 'gé lì': [37784, 38217, 39730], + 'bī pī bì': [37790], + 'gǎo hào': [37804], + 'zú chuò': [37827], + 'xiū xiù': [37829], + 'shòu sōu': [37833], + 'dí dī': [37841, 38237], + 'qiāo sǎn càn': [37842], + 'lù áo': [37845], + 'tāng táng': [37852], + 'jiàn zàn': [37865], + 'huì suì ruì': [37880], + 'qiǎng qiāng': [37881, 38250], + 'sǎn xiàn sà': [37886], + 'jiǎn jiàn': [37927, 38159], + 'dāng chēng': [37946, 38107], + 'zuān zuàn': [38013], + 'sà xì': [38033], + 'yào yuè': [38053], + 'tǒu dǒu': [38061], + 'zuàn zuān': [38075], + 'qiān yán': [38085], + 'pí pī': [38093], + 'yáo diào tiáo': [38123], + 'tāng tàng': [38132], + 'pù pū': [38138], + 'tán xiān': [38188], + 'liù liú': [38223], + 'hào gǎo': [38224], + 'táng tāng': [38231], + 'tán chán xín': [38241], + 'huò shǎn': [38276], + 'hàn bì': [38280, 38380], + 'kāng kàng': [38284, 38390], + 'xián jiàn jiān jiǎn': [38290], + 'xiā xiǎ': [38293], + 'xiǎ kě': [38300], + 'biàn guān': [38302], + 'hé gé': [38308, 39052], + 'hòng xiàng': [38311], + 'sē xī': [38314], + 'tíng tǐng': [38318], + 'è yān': [38332, 38415], + 'hòng juǎn xiàng': [38338], + 'bǎn pàn': [38342], + 'dū shé': [38349, 38407], + 'què quē': [38357], + 'tāng táng chāng': [38363], + 'kàn hǎn': [38366, 38426], + 'xì sè tà': [38367], + 'mēn mèn': [38391], + 'quē què': [38425], + 'yán diàn': [38461], + 'ā ē': [38463], + 'bēi pō pí': [38466], + 'yàn yǎn': [38529], + 'yú yáo shù': [38531], + 'lóng lōng': [38534], + 'duì zhuì': [38538], + 'suí duò': [38539], + 'gāi qí ái': [38545], + 'huī duò': [38547, 38579], + 'wěi kuí': [38551], + 'lì dài': [38584], + 'zhuī cuī wéi': [38585], + 'hè hú': [38586, 40366], + 'jùn juàn': [38589, 38603], + 'nán nàn nuó': [38590], + 'què qiāo qiǎo': [38592], + 'guàn huán': [38618], + 'guī xī': [38623], + 'sè xí': [38637], + án: [38648], + 'wù méng': [38650], + tèng: [38703], + 'lù lòu': [38706], + mái: [38718], + 'jìng liàng': [38746], + 'gé jí': [38761], + bǎ: [38774], + 'yāng yàng': [38789], + 'gé tà sǎ': [38792], + 'biān yìng': [38805], + 'qiào shāo': [38808], + 'juān xuān': [38809], + 'shàng zhǎng': [38813], + 'pí bǐng bì bēi': [38814], + la: [38817], + 'xiè dié': [38818], + ēng: [38821], + 'móu mù': [38826], + 'bì bǐng': [38840], + 'mèi wà': [38862], + rǒu: [38870], + 'shè xiè': [38872], + 'yùn wēn': [38891], + 'dùn dú': [38931, 39039], + duǐ: [38951], + luō: [38961], + 'bīn pín': [38971], + yóng: [38994, 39065, 39979], + mān: [39010, 39071], + 'jǐng gěng': [39048], + 'jié xié jiá': [39049], + 'kē ké': [39055], + 'pín bīn': [39057], + 'chàn zhàn': [39076], + 'fēng fěng': [39080, 39118], + 'biāo diū': [39081], + 'bá fú': [39088], + 'sāo sōu': [39102], + 'liù liáo': [39106], + 'shí sì yì': [39135], + 'yǎng juàn': [39148], + 'zhù tǒu': [39155], + 'yí sì': [39156], + 'zuò zé zhā': [39157], + tiè: [39163, 39214], + 'xiǎng náng': [39263], + 'táng xíng': [39271], + 'gē le': [39289], + 'chā zha': [39303], + 'náng nǎng': [39317], + 'yūn wò': [39335], + 'zhī shì': [39350], + 'xìn jìn': [39352], + 'kuài jué': [39363], + zǎng: [39380, 39541], + 'tái dài': [39384], + 'xún xuān': [39400], + 'liáng láng': [39418], + piàn: [39447, 39449, 39575, 39800], + 'dài tái': [39552], + 'sāo sǎo': [39578], + 'gǔ gū': [39592], + 'bèi mó': [39603], + 'xiāo qiāo': [39609], + 'bǎng pǎng': [39624], + 'bó jué': [39625], + 'bì pǒ': [39666], + 'máo méng': [39667], + 'kuò yuè': [39674], + 'bā bà': [39774, 40067], + 'jì cǐ': [39814], + 'bó bà': [39818], + 'zhǎ zhà': [39827, 40074], + 'chóu dài': [39832], + 'luò gé': [39845], + 'guī xié wā kuí': [39853], + 'xiān xiǎn': [39854, 40092], + 'pū bū': [39878], + 'yì sī': [39907], + 'bà bó': [40076], + 'guī xié': [40081], + 'sāi xǐ': [40131], + 'niǎo diǎo': [40165], + 'diāo zhāo': [40173], + 'gān hàn yàn': [40177], + 'fū guī': [40186], + 'jiān qiān zhān': [40189], + 'hé jiè': [40353], + 'piān biǎn': [40355], + 'chuàn zhì': [40360], + 'cāng qiāng': [40364], + 'sǔn xùn': [40381], + 'biāo páo': [40579], + 'zhù cū': [40582], + 'jūn qún': [40583, 40597], + chi: [40630], + 'mó me': [40636], + 'mó me ma': [40637], + 'mí mǒ': [40639], + 'dàn shèn': [40686], + 'zhěn yān': [40688], + 'dǎn zhǎn': [40693], + 'miǎn mǐn měng': [40702], + hōu: [40769], + nàng: [40777], + 'qí jì zī zhāi': [40784], + 'yín kěn yǎn': [40834], + 'yín kěn': [40840], + 'gōng wò': [40847], + 'guī jūn qiū': [40860, 40863], +}; +const DICT1 = []; +Object.keys(map).forEach((key) => { + const codes = map[key]; + for (let code of codes) { + DICT1[code] = key; + } +}); + +const DICT2 = { + 一个: 'yí gè', + 这个: 'zhè ge', + 不是: 'bú shì', + 成为: 'chéng wéi', + 认为: 'rèn wéi', + 作为: 'zuò wéi', + 部分: 'bù fèn', + 要求: 'yāo qiú', + 应该: 'yīng gāi', + 增长: 'zēng zhǎng', + 不会: 'bú huì', + 提供: 'tí gōng', + 那些: 'nèi xiē', + 觉得: 'jué de', + 任务: 'rèn wu', + 那个: 'nà ge', + 称为: 'chēng wéi', + 为主: 'wéi zhǔ', + 了解: 'liǎo jiě', + 处理: 'chǔ lǐ', + 皇上: 'huáng shang', + 只要: 'zhǐ yào', + 大量: 'dà liàng', + 力量: 'lì liàng', + 几乎: 'jī hū', + 干部: 'gàn bù', + 目的: 'mù dì', + 行为: 'xíng wéi', + 只见: 'zhǐ jiàn', + 认识: 'rèn shi', + 市长: 'shì zhǎng', + 师父: 'shī fu', + 调查: 'diào chá', + 重新: 'chóng xīn', + 分为: 'fēn wéi', + 知识: 'zhī shi', + 导弹: 'dǎo dàn', + 行业: 'háng yè', + 质量: 'zhì liàng', + 银行: 'yín háng', + 参与: 'cān yù', + 充分: 'chōng fèn', + 尽管: 'jǐn guǎn', + 生长: 'shēng zhǎng', + 数量: 'shù liàng', + 应当: 'yīng dāng', + 院长: 'yuàn zhǎng', + 强调: 'qiáng diào', + 只能: 'zhǐ néng', + 音乐: 'yīn yuè', + 以为: 'yǐ wéi', + 处于: 'chǔ yú', + 分子: 'fèn zǐ', + 晚上: 'wǎn shang', + 部长: 'bù zhǎng', + 蒙古: 'měng gǔ', + 只有: 'zhǐ yǒu', + 适当: 'shì dàng', + 只好: 'zhǐ hǎo', + 成长: 'chéng zhǎng', + 高兴: 'gāo xìng', + 不了: 'bù liǎo', + 产量: 'chǎn liàng', + 胖子: 'pàng zi', + 显得: 'xiǎn de', + 只是: 'zhǐ shì', + 似的: 'shì de', + 率领: 'shuài lǐng', + 改为: 'gǎi wéi', + 不禁: 'bù jīn', + 成分: 'chéng fèn', + 答应: 'dā yìng', + 少年: 'shào nián', + 兴趣: 'xìng qù', + 太监: 'tài jiàn', + 休息: 'xiū xi', + 校长: 'xiào zhǎng', + 更新: 'gēng xīn', + 合同: 'hé tong', + 喝道: 'hè dào', + 重庆: 'chóng qìng', + 重建: 'chóng jiàn', + 使得: 'shǐ de', + 审查: 'shěn zhā', + 累计: 'lěi jì', + 给予: 'jǐ yǔ', + 上去: 'shǎng qù', + 行情: 'háng qíng', + 极为: 'jí wéi', + 冠军: 'guàn jūn', + 仿佛: 'fǎng fú', + 头发: 'tóu fa', + 投降: 'tóu xiáng', + 家长: 'jiā zhǎng', + 仔细: 'zǐ xì', + 要是: 'yào shi', + 将领: 'jiàng lǐng', + 含量: 'hán liàng', + 更为: 'gèng wéi', + 只得: 'zhǐ de', + 哪些: 'něi xiē', + 积累: 'jī lěi', + 地处: 'dì chǔ', + 县长: 'xiàn zhǎng', + 少女: 'shào nǚ', + 路上: 'lù shang', + 只怕: 'zhǐ pà', + 能量: 'néng liàng', + 一度: 'yí dù', + 储量: 'chǔ liàng', + 供应: 'gōng yìng', + 挑战: 'tiǎo zhàn', + 西藏: 'xī zàng', + 记得: 'jì de', + 影片: 'yǐng piān', + 总量: 'zǒng liàng', + 当真: 'dàng zhēn', + 将士: 'jiàng shì', + 差别: 'chā bié', + 较为: 'jiào wéi', + 一处: 'yī chǔ', + 照片: 'zhào piān', + 长老: 'zhǎng lǎo', + 大夫: 'dài fū', + 差异: 'chā yì', + 懂得: 'dǒng de', + 尽量: 'jǐn liàng', + 模样: 'mú yàng', + 的确: 'dí què', + 鱼肚: 'yú dǔ', + 为首: 'wéi shǒu', + 便宜: 'pián yí', + 更名: 'gēng míng', + 石头: 'shí tou', + 州长: 'zhōu zhǎng', + 为止: 'wéi zhǐ', + 漂亮: 'piào liàng', + 炮弹: 'pào dàn', + 藏族: 'zàng zú', + 哪个: 'něi gè', + 角色: 'jué sè', + 当作: 'dàng zuò', + 尽快: 'jǐn kuài', + 人为: 'rén wéi', + 重复: 'chóng fù', + 胡同: 'hú tòng', + 差距: 'chā jù', + 弟兄: 'dì xiong', + 大将: 'dà jiàng', + 肚子: 'dǔ zi', + 睡觉: 'shuì jiào', + 团长: 'tuán zhǎng', + 队长: 'duì zhǎng', + 区长: 'qū zhǎng', + 难得: 'nán de', + 丫头: 'yā tou', + 打听: 'dǎ ting', + 会长: 'huì zhǎng', + 弟弟: 'dì di', + 王爷: 'wáng ye', + 当天: 'dàng tiān', + 重量: 'zhòng liàng', + 誉为: 'yù wéi', + 家伙: 'jiā huo', + 华山: 'huà shān', + 椅子: 'yǐ zi', + 流量: 'liú liàng', + 长大: 'zhǎng dà', + 勉强: 'miǎn qiǎng', + 会计: 'kuài jì', + 分散: 'fēn sǎn', + 过分: 'guò fèn', + 济南: 'jǐ nán', + 调动: 'diào dòng', + 燕京: 'yān jīng', + 少将: 'shào jiàng', + 中毒: 'zhòng dú', + 晓得: 'xiǎo de', + 变更: 'biàn gēng', + 认得: 'rèn de', + 苹果: 'pín guǒ', + 念头: 'niàn tou', + 挣扎: 'zhēng zhá', + 三藏: 'sān zàng', + 剥削: 'bō xuē', + 丞相: 'chéng xiàng', + 少量: 'shǎo liàng', + 寻思: 'xín sī', + 夺得: 'duó de', + 干线: 'gàn xiàn', + 呼吁: 'hū yù', + 戏曲: 'xì qǔ', + 处罚: 'chǔ fá', + 长官: 'zhǎng guān', + 见长: 'jiàn zhǎng', + 柏林: 'bó lín', + 亲戚: 'qīn qi', + 身分: 'shēn fèn', + 胳膊: 'gē bo', + 着手: 'zhuó shǒu', + 炸弹: 'zhà dàn', + 咳嗽: 'ké sou', + 西边: 'xī bian', + 赢得: 'yíng de', + 叶子: 'yè zi', + 外长: 'wài zhǎng', + 供给: 'gōng jǐ', + 师长: 'shī zhǎng', + 变量: 'biàn liàng', + 应有: 'yīng yǒu', + 下载: 'xià zài', + 乐器: 'yuè qì', + 间接: 'jiàn jiē', + 底下: 'dǐ xia', + 打扮: 'dǎ ban', + 子弹: 'zǐ dàn', + 弹药: 'dàn yào', + 热量: 'rè liàng', + 削弱: 'xuē ruò', + 骨干: 'gǔ gàn', + 容量: 'róng liàng', + 模糊: 'mó hu', + 转动: 'zhuàn dòng', + 落下: 'là xià', + 称呼: 'chēng hu', + 科长: 'kē zhǎng', + 处置: 'chǔ zhì', + 歌曲: 'gē qǔ', + 着重: 'zhuó zhòng', + 着急: 'zháo jí', + 强迫: 'qiǎng pò', + 庭长: 'tíng zhǎng', + 首相: 'shǒu xiàng', + 喇嘛: 'lǎ ma', + 镇长: 'zhèn zhǎng', + 只管: 'zhǐ guǎn', + 重重: 'chóng chóng', + 免得: 'miǎn de', + 灾难: 'zāi nàn', + 着实: 'zhuó shí', + 所得: 'suǒ de', + 度假: 'dù jià', + 真相: 'zhēn xiàng', + 相貌: 'xiàng mào', + 处分: 'chǔ fèn', + 干预: 'gàn yù', + 委屈: 'wěi qu', + 为期: 'wéi qī', + 伯伯: 'bó bo', + 圈子: 'quān zi', + 见识: 'jiàn shi', + 笼罩: 'lǒng zhào', + 外边: 'wài bian', + 与会: 'yù huì', + 都督: 'dū du', + 宰相: 'zǎi xiàng', + 较量: 'jiào liàng', + 对称: 'duì chèn', + 总长: 'zǒng zhǎng', + 相公: 'xiàng gong', + 空白: 'kòng bái', + 大王: 'dài wáng', + 打量: 'dǎ liang', + 水分: 'shuǐ fèn', + 舌头: 'shé tou', + 没收: 'mò shōu', + 行李: 'xíng li', + 判处: 'pàn chǔ', + 散文: 'sǎn wén', + 处境: 'chǔ jìng', + 孙子: 'sūn zi', + 拳头: 'quán tou', + 打发: 'dǎ fa', + 组长: 'zǔ zhǎng', + 骨头: 'gú tou', + 宁可: 'nìng kě', + 更换: 'gēng huàn', + 薄弱: 'bó ruò', + 还原: 'huán yuán', + 重修: 'chóng xiū', + 东边: 'dōng bian', + 同行: 'tóng háng', + 只顾: 'zhǐ gù', + 爱好: 'ài hào', + 馒头: 'mán tou', + 军长: 'jūn zhǎng', + 散发: 'sàn fà', + 首长: 'shǒu zhǎng', + 厂长: 'chǎng zhǎng', + 司长: 'sī zhǎng', + 长子: 'zhǎng zǐ', + 强劲: 'qiáng jìng', + 恰当: 'qià dàng', + 头儿: 'tou er', + 站长: 'zhàn zhǎng', + 折腾: 'zhē teng', + 相处: 'xiāng chǔ', + 统率: 'tǒng shuài', + 中将: 'zhōng jiàng', + 命中: 'mìng zhòng', + 名将: 'míng jiàng', + 左边: 'zuǒ bian', + 木头: 'mù tou', + 动弹: 'dòng dàn', + 地壳: 'dì qiào', + 干活: 'gàn huó', + 少爷: 'shào ye', + 难民: 'nàn mín', + 水量: 'shuǐ liàng', + 补给: 'bǔ jǐ', + 尾巴: 'wěi ba', + 来得: 'lái de', + 好奇: 'hào qí', + 钥匙: 'yào shi', + 当做: 'dàng zuò', + 沉着: 'chén zhuó', + 哑巴: 'yǎ ba', + 车子: 'chē zi', + 上将: 'shàng jiàng', + 恶心: 'ě xin', + 不对: 'bú duì', + 担子: 'dàn zi', + 应届: 'yīng jiè', + 行列: 'háng liè', + 主角: 'zhǔ jué', + 运转: 'yùn zhuàn', + 兄长: 'xiōng zhǎng', + 格式: 'gé shi', + 正月: 'zhēng yuè', + 营长: 'yíng zhǎng', + 当成: 'dàng chéng', + 右边: 'yòu bian', + 女婿: 'nǚ xu', + 咽喉: 'yān hóu', + 当晚: 'dàng wǎn', + 重阳: 'chóng yáng', + 化为: 'huà wéi', + 双重: 'shuāng chóng', + 吐蕃: 'tǔ bō', + 钻进: 'zuān jìn', + 乐队: 'yuè duì', + 不当: 'bù dàng', + 亮相: 'liàng xiàng', + 被子: 'bèi zi', + 舍得: 'shě de', + 杉木: 'shā mù', + 击中: 'jī zhòng', + 里边: 'lǐ bian', + 排长: 'pái zhǎng', + 假期: 'jià qī', + 分量: 'fèn liàng', + 数次: 'shuò cì', + 提防: 'dī fáng', + 吆喝: 'yāo he', + 查处: 'chá chǔ', + 量子: 'liàng zǐ', + 里头: 'lǐ tou', + 两行: 'liǎng háng', + 调研: 'diào yán', + 伺候: 'cì hou', + 重申: 'chóng shēn', + 枕头: 'zhěn tou', + 拚命: 'pàn mìng', + 社长: 'shè zhǎng', + 苦难: 'kǔ nàn', + 归还: 'guī huán', + 危难: 'wēi nàn', + 批量: 'pī liàng', + 畜牧: 'xù mù', + 点着: 'diǎn zháo', + 甚为: 'shèn wéi', + 小将: 'xiǎo jiàng', + 着眼: 'zhuó yǎn', + 处死: 'chǔ sǐ', + 厌恶: 'yàn wù', + 鼓乐: 'gǔ yuè', + 树干: 'shù gàn', + 秘鲁: 'bì lǔ', + 大方: 'dà fang', + 外头: 'wài tou', + 班长: 'bān zhǎng', + 星宿: 'xīng xiù', + 宁愿: 'nìng yuàn', + 钦差: 'qīn chāi', + 为数: 'wéi shù', + 勾当: 'gòu dàng', + 削减: 'xuē jiǎn', + 一发: 'yī fà', + 间谍: 'jiàn dié', + 埋怨: 'mán yuàn', + 结实: 'jiē shi', + 计量: 'jì liàng', + 淹没: 'yān mò', + 村长: 'cūn zhǎng', + 连长: 'lián zhǎng', + 自给: 'zì jǐ', + 下边: 'xià bian', + 武将: 'wǔ jiàng', + 温差: 'wēn chā', + 直奔: 'zhí bèn', + 供求: 'gōng qiú', + 剂量: 'jì liàng', + 道长: 'dào zhǎng', + 泄露: 'xiè lòu', + 王八: 'wáng ba', + 切割: 'qiē gē', + 间隔: 'jiàn gé', + 一晃: 'yī huǎng', + 长假: 'cháng jià', + 令狐: 'líng hú', + 为害: 'wéi hài', + 句子: 'jù zi', + 偿还: 'cháng huán', + 疙瘩: 'gē dā', + 燕山: 'yān shān', + 堵塞: 'dǔ sè', + 夺冠: 'duó guàn', + 下调: 'xià diào', + 扎实: 'zhā shi', + 电荷: 'diàn hè', + 看守: 'kān shǒu', + 复辟: 'fù bì', + 郁闷: 'yù mèn', + 尽早: 'jǐn zǎo', + 切断: 'qiē duàn', + 指头: 'zhǐ tou', + 为生: 'wéi shēng', + 畜生: 'chù sheng', + 切除: 'qiē chú', + 着力: 'zhuó lì', + 着想: 'zhuó xiǎng', + 级差: 'jí chā', + 投奔: 'tóu bèn', + 棍子: 'gùn zi', + 含糊: 'hán hu', + 少妇: 'shào fù', + 兴致: 'xìng zhì', + 纳闷: 'nà mèn', + 干流: 'gàn liú', + 卷起: 'juǎn qǐ', + 扇子: 'shàn zi', + 更改: 'gēng gǎi', + 笼络: 'lǒng luò', + 喇叭: 'lǎ ba', + 载荷: 'zài hè', + 妥当: 'tuǒ dàng', + 为难: 'wéi nán', + 着陆: 'zhuó lù', + 燕子: 'yàn zi', + 干吗: 'gàn má', + 白发: 'bái fà', + 总得: 'zǒng děi', + 夹击: 'jiā jī', + 曝光: 'bào guāng', + 曲调: 'qǔ diào', + 相机: 'xiàng jī', + 叫化: 'jiào huā', + 角逐: 'jué zhú', + 啊哟: 'ā yō', + 载重: 'zài zhòng', + 长辈: 'zhǎng bèi', + 出差: 'chū chāi', + 垛口: 'duǒ kǒu', + 撇开: 'piē kāi', + 厅长: 'tīng zhǎng', + 组分: 'zǔ fèn', + 误差: 'wù chā', + 家当: 'jiā dàng', + 传记: 'zhuàn jì', + 个子: 'gè zi', + 铺设: 'pū shè', + 干事: 'gàn shì', + 杆菌: 'gǎn jūn', + 五更: 'wǔ gēng', + 定量: 'dìng liàng', + 运载: 'yùn zài', + 会儿: 'huì er', + 酋长: 'qiú zhǎng', + 重返: 'chóng fǎn', + 差额: 'chā é', + 露面: 'lòu miàn', + 钻研: 'zuān yán', + 大城: 'dài chéng', + 上当: 'shàng dàng', + 销量: 'xiāo liàng', + 洋行: 'yáng háng', + 作坊: 'zuō fang', + 照相: 'zhào xiàng', + 哎呀: 'āi yā', + 调集: 'diào jí', + 看中: 'kàn zhòng', + 议长: 'yì zhǎng', + 风筝: 'fēng zheng', + 一应: 'yī yīng', + 辟邪: 'bì xié', + 空隙: 'kòng xì', + 更迭: 'gēng dié', + 偏差: 'piān chā', + 声调: 'shēng diào', + 农行: 'nóng háng', + 适量: 'shì liàng', + 屯子: 'tún zi', + 搜查: 'sōu zhā', + 无量: 'wú liàng', + 空地: 'kòng dì', + 调度: 'diào dù', + 一曲: 'yī qǔ', + 散射: 'sǎn shè', + 太行: 'tài háng', + 创伤: 'chuāng shāng', + 海参: 'hǎi shēn', + 满载: 'mǎn zài', + 重叠: 'chóng dié', + 落差: 'luò chā', + 单调: 'dān diào', + 老将: 'lǎo jiàng', + 人参: 'rén shēn', + 间断: 'jiàn duàn', + 重现: 'chóng xiàn', + 夹杂: 'jiā zá', + 调用: 'diào yòng', + 萝卜: 'luó bo', + 附着: 'fù zhuó', + 应声: 'yīng shēng', + 主将: 'zhǔ jiàng', + 罪过: 'zuì guo', + 咀嚼: 'jǔ jué', + 为政: 'wéi zhèng', + 过量: 'guò liàng', + 乐曲: 'yuè qǔ', + 负荷: 'fù hè', + 枪弹: 'qiāng dàn', + 悄然: 'qiǎo rán', + 处方: 'chǔ fāng', + 悄声: 'qiǎo shēng', + 曲子: 'qǔ zi', + 情调: 'qíng diào', + 一着: 'yī zhāo', + 挑衅: 'tiǎo xìn', + 代为: 'dài wéi', + 了结: 'liǎo jié', + 打中: 'dǎ zhòng', + 酒吧: 'jiǔ bā', + 作曲: 'zuò qǔ', + 懒得: 'lǎn de', + 增量: 'zēng liàng', + 衣着: 'yī zhuó', + 部将: 'bù jiàng', + 要塞: 'yào sài', + 茶几: 'chá jī', + 杠杆: 'gàng gǎn', + 出没: 'chū mò', + 鲜有: 'xiǎn yǒu', + 间隙: 'jiàn xì', + 重担: 'zhòng dàn', + 重演: 'chóng yǎn', + 应酬: 'yìng chou', + 只当: 'zhǐ dāng', + 毋宁: 'wú nìng', + 包扎: 'bāo zā', + 前头: 'qián tou', + 卷烟: 'juǎn yān', + 非得: 'fēi děi', + 弹道: 'dàn dào', + 上调: 'shàng diào', + 杆子: 'gān zi', + 门将: 'mén jiàng', + 后头: 'hòu tou', + 标识: 'biāo zhì', + 喝彩: 'hè cǎi', + 暖和: 'nuǎn huo', + 更深: 'gēng shēn', + 累积: 'lěi jī', + 引得: 'yǐn de', + 调遣: 'diào qiǎn', + 倔强: 'jué jiàng', + 宝藏: 'bǎo zàng', + 丧事: 'sāng shì', + 约莫: 'yuē mo', + 纤夫: 'qiàn fū', + 更替: 'gēng tì', + 装载: 'zhuāng zài', + 背包: 'bēi bāo', + 帖子: 'tiě zi', + 松散: 'sōng sǎn', + 支行: 'zhī háng', + 呼喝: 'hū hè', + 可恶: 'kě wù', + 自转: 'zì zhuàn', + 供电: 'gōng diàn', + 反省: 'fǎn xǐng', + 坦率: 'tǎn shuài', + 苏打: 'sū dá', + 本分: 'běn fèn', + 落得: 'luò de', + 鄙薄: 'bǐ bó', + 相间: 'xiāng jiàn', + 单薄: 'dān bó', + 混蛋: 'hún dàn', + 发难: 'fā nàn', + 贞观: 'zhēn guàn', + 附和: 'fù hè', + 能耐: 'néng nai', + 吓唬: 'xià hu', + 未了: 'wèi liǎo', + 引着: 'yǐn zháo', + 抽调: 'chōu diào', + 沙子: 'shā zi', + 席卷: 'xí juǎn', + 标的: 'biāo dì', + 别扭: 'biè niu', + 思量: 'sī liang', + 喝采: 'hè cǎi', + 论语: 'lún yǔ', + 盖子: 'gài zi', + 曲艺: 'qǔ yì', + 分外: 'fèn wài', + 弄堂: 'lòng táng', + 乐舞: 'yuè wǔ', + 雨量: 'yǔ liàng', + 毛发: 'máo fà', + 差遣: 'chāi qiǎn', + 曲目: 'qǔ mù', + 背负: 'bēi fù', + 转速: 'zhuàn sù', + 声乐: 'shēng yuè', + 夹攻: 'jiā gōng', + 供水: 'gōng shuǐ', + 主干: 'zhǔ gàn', + 逃难: 'táo nàn', + 惩处: 'chéng chǔ', + 长相: 'zhǎng xiàng', + 公差: 'gōng chāi', + 行当: 'háng dang', + 榴弹: 'liú dàn', + 省得: 'shěng de', + 条子: 'tiáo zi', + 重围: 'chóng wéi', + 阻塞: 'zǔ sè', + 劲风: 'jìng fēng', + 纠葛: 'jiū gé', + 颠簸: 'diān bǒ', + 点中: 'diǎn zhòng', + 避难: 'bì nàn', + 重创: 'zhòng chuāng', + 姥姥: 'lǎo lao', + 迷糊: 'mí hu', + 公家: 'gōng jia', + 几率: 'jī lǜ', + 苦闷: 'kǔ mèn', + 度量: 'dù liàng', + 差错: 'chā cuò', + 暑假: 'shǔ jià', + 参差: 'cēn cī', + 搭载: 'dā zài', + 助长: 'zhù zhǎng', + 相称: 'xiāng chèn', + 红晕: 'hóng yùn', + 舍命: 'shě mìng', + 喜好: 'xǐ hào', + 列传: 'liè zhuàn', + 劲敌: 'jìng dí', + 蛤蟆: 'há má', + 三重: 'sān chóng', + 请假: 'qǐng jià', + 钉子: 'dīng zi', + 沉没: 'chén mò', + 高丽: 'gāo lí', + 休假: 'xiū jià', + 无为: 'wú wéi', + 巴结: 'bā jì', + 了得: 'liǎo de', + 变相: 'biàn xiàng', + 核弹: 'hé dàn', + 亲家: 'qìng jia', + 承载: 'chéng zài', + 行家: 'háng jia', + 喝问: 'hè wèn', + 还击: 'huán jī', + 交还: 'jiāo huán', + 当夜: 'dàng yè', + 将令: 'jiàng lìng', + 单于: 'chán yú', + 空缺: 'kòng quē', + 绿林: 'lù lín', + 胆量: 'dǎn liàng', + 执着: 'zhí zhuó', + 低调: 'dī diào', + 责难: 'zé nàn', + 闭塞: 'bì sè', + 轻薄: 'qīng bó', + 得当: 'dé dàng', + 占卜: 'zhān bǔ', + 排行: 'pái háng', + 扫帚: 'sào zhou', + 龟兹: 'qiū cí', + 年长: 'nián zhǎng', + 外传: 'wài zhuàn', + 头子: 'tóu zi', + 裁缝: 'cái féng', + 礼乐: 'lǐ yuè', + 血泊: 'xuè pō', + 散乱: 'sǎn luàn', + 动量: 'dòng liàng', + 倒腾: 'dǎo teng', + 取舍: 'qǔ shě', + 咱家: 'zá jiā', + 长发: 'cháng fà', + 爪哇: 'zhǎo wā', + 弹壳: 'dàn ké', + 省悟: 'xǐng wù', + 嚷嚷: 'rāng rang', + 连累: 'lián lěi', + 应得: 'yīng dé', + 族长: 'zú zhǎng', + 患难: 'huàn nàn', + 抽查: 'chōu zhā', + 柜子: 'guì zi', + 擂鼓: 'léi gǔ', + 眩晕: 'xuàn yùn', + 调配: 'diào pèi', + 躯干: 'qū gàn', + 差役: 'chāi yì', + 坎坷: 'kǎn kě', + 少儿: 'shào ér', + 乐团: 'yuè tuán', + 养分: 'yǎng fèn', + 退还: 'tuì huán', + 格调: 'gé diào', + 语调: 'yǔ diào', + 音调: 'yīn diào', + 乐府: 'yuè fǔ', + 古朴: 'gǔ piáo', + 打点: 'dǎ dian', + 差使: 'chāi shǐ', + 磨难: 'mó nàn', + 匀称: 'yún chèn', + 瘦削: 'shòu xuē', + 膏药: 'gāo yao', + 吞没: 'tūn mò', + 调任: 'diào rèn', + 散居: 'sǎn jū', + 上头: 'shàng tou', + 大难: 'dà nàn', + 风靡: 'fēng mǐ', + 放假: 'fàng jià', + 估量: 'gū liang', + 失当: 'shī dàng', + 中弹: 'zhòng dàn', + 妄为: 'wàng wéi', + 长者: 'zhǎng zhě', + 起哄: 'qǐ hòng', + 末了: 'mò liǎo', + 相声: 'xiàng sheng', + 校正: 'jiào zhèng', + 劝降: 'quàn xiáng', + 矢量: 'shǐ liàng', + 沉闷: 'chén mèn', + 给与: 'jǐ yǔ', + 解法: 'xiè fǎ', + 塞外: 'sài wài', + 将校: 'jiàng xiào', + 嗜好: 'shì hào', + 没落: 'mò luò', + 朴刀: 'pō dāo', + 片子: 'piān zi', + 切削: 'qiē xiāo', + 弹丸: 'dàn wán', + 昆曲: 'kūn qǔ', + 雅致: 'yǎ zhi', + 稀薄: 'xī bó', + 亏得: 'kuī de', + 死难: 'sǐ nàn', + 间歇: 'jiàn xiē', + 翘首: 'qiáo shǒu', + 色调: 'sè diào', + 处决: 'chǔ jué', + 表率: 'biǎo shuài', + 尺子: 'chǐ zi', + 招降: 'zhāo xiáng', + 称职: 'chèn zhí', + 斗篷: 'dǒu peng', + 铺子: 'pù zi', + 底子: 'dǐ zi', + 负载: 'fù zài', + 干警: 'gàn jǐng', + 倒数: 'dào shǔ', + 将官: 'jiàng guān', + 锄头: 'chú tou', + 归降: 'guī xiáng', + 疟疾: 'nüè ji', + 唠叨: 'láo dao', + 限量: 'xiàn liàng', + 一打: 'yī dá', + 屏息: 'bǐng xī', + 重逢: 'chóng féng', + 器乐: 'qì yuè', + 氢弹: 'qīng dàn', + 脖颈: 'bó gěng', + 妃子: 'fēi zi', + 追查: 'zhuī zhā', + 处事: 'chǔ shì', + 参量: 'cān liàng', + 轻率: 'qīng shuài', + 缥缈: 'piāo miǎo', + 幸得: 'xìng de', + 中奖: 'zhòng jiǎng', + 才干: 'cái gàn', + 施舍: 'shī shě', + 卷子: 'juǎn zi', + 游说: 'yóu shuì', + 巷子: 'xiàng zi', + 臂膀: 'bì bǎng', + 切勿: 'qiē wù', + 看管: 'kān guǎn', + 风头: 'fēng tou', + 精干: 'jīng gàn', + 高差: 'gāo chā', + 恐吓: 'kǒng hè', + 扁担: 'biǎn dàn', + 给养: 'jǐ yǎng', + 格子: 'gé zi', + 供需: 'gōng xū', + 反差: 'fǎn chā', + 飞弹: 'fēi dàn', + 微薄: 'wēi bó', + 发型: 'fà xíng', + 勘查: 'kān zhā', + 即兴: 'jí xìng', + 攒动: 'cuán dòng', + 间或: 'jiàn huò', + 浅薄: 'qiǎn bó', + 乐章: 'yuè zhāng', + 顺差: 'shùn chā', + 调子: 'diào zi', + 相位: 'xiàng wèi', + 转子: 'zhuàn zǐ', + 劲旅: 'jìng lǚ', + 咔嚓: 'kā chā', + 了事: 'liǎo shì', + 转悠: 'zhuàn you', + 芍药: 'sháo yao', + 当铺: 'dàng pù', + 爪子: 'zhuǎ zi', + 单子: 'dān zi', + 好战: 'hào zhàn', + 燕麦: 'yān mài', + 只许: 'zhǐ xǔ', + 干练: 'gàn liàn', + 女将: 'nǚ jiàng', + 酒量: 'jiǔ liàng', + 划船: 'huá chuán', + 伎俩: 'jì liǎng', + 挑拨: 'tiǎo bō', + 少校: 'shào xiào', + 着落: 'zhuó luò', + 憎恶: 'zēng wù', + 刻薄: 'kè bó', + 口角: 'kǒu jué', + 马尾: 'mǎ yǐ', + 要挟: 'yāo xié', + 用处: 'yòng chǔ', + 还手: 'huán shǒu', + 模具: 'mú jù', + 执著: 'zhí zhuó', + 喝令: 'hè lìng', + 争得: 'zhēng de', + 保长: 'bǎo zhǎng', + 吸着: 'xī zhuó', + 症结: 'zhēng jié', + 公转: 'gōng zhuàn', + 校勘: 'jiào kān', + 重提: 'chóng tí', + 扫兴: 'sǎo xìng', + 舞曲: 'wǔ qǔ', + 铺盖: 'pū gài', + 长史: 'zhǎng shǐ', + 差价: 'chā jià', + 压根: 'yà gēn', + 怔住: 'zhèng zhù', + 强人: 'qiǎng rén', + 应允: 'yīng yǔn', + 切入: 'qiē rù', + 战将: 'zhàn jiàng', + 年少: 'nián shào', + 舍身: 'shě shēn', + 执拗: 'zhí niù', + 处世: 'chǔ shì', + 中风: 'zhòng fēng', + 等量: 'děng liàng', + 不菲: 'bù fěi', + 放量: 'fàng liàng', + 腔调: 'qiāng diào', + 老少: 'lǎo shào', + 没入: 'mò rù', + 瓜葛: 'guā gé', + 将帅: 'jiàng shuài', + 车载: 'chē zài', + 窝囊: 'wō nāng', + 长进: 'zhǎng jìn', + 可汗: 'kè hán', + 并州: 'bīng zhōu', + 供销: 'gōng xiāo', + 切片: 'qiē piàn', + 差事: 'chāi shì', + 知会: 'zhī hui', + 鹰爪: 'yīng zhǎo', + 处女: 'chǔ nǚ', + 切磋: 'qiē cuō', + 日头: 'rì tou', + 押解: 'yā jiè', + 滋长: 'zī zhǎng', + 道观: 'dào guàn', + 脚色: 'jué sè', + 当量: 'dāng liàng', + 婆家: 'pó jia', + 缘分: 'yuán fèn', + 空闲: 'kòng xián', + 曲牌: 'qǔ pái', + 好色: 'hào sè', + 行会: 'háng huì', + 怒喝: 'nù hè', + 笼统: 'lǒng tǒng', + 边塞: 'biān sài', + 何曾: 'hé zēng', + 重合: 'chóng hé', + 插曲: 'chā qǔ', + 零散: 'líng sǎn', + 轰隆: 'hōng lōng', + 化子: 'huā zi', + 内蒙: 'nèi měng', + 数落: 'shǔ luo', + 逆差: 'nì chā', + 牟利: 'móu lì', + 栅栏: 'zhà lan', + 中标: 'zhòng biāo', + 调档: 'diào dàng', + 佝偻: 'gōu lóu', + 场子: 'chǎng zi', + 甲壳: 'jiǎ qiào', + 重温: 'chóng wēn', + 炮制: 'páo zhì', + 返还: 'fǎn huán', + 自传: 'zì zhuàn', + 高调: 'gāo diào', + 词曲: 'cí qǔ', + 受难: 'shòu nàn', + 殷红: 'yān hóng', + 要约: 'yāo yuē', + 固着: 'gù zhuó', + 强求: 'qiǎng qiú', + 本相: 'běn xiàng', + 骄横: 'jiāo hèng', + 草率: 'cǎo shuài', + 气闷: 'qì mèn', + 着色: 'zhuó sè', + 宁肯: 'nìng kěn', + 兴头: 'xìng tou', + 拘泥: 'jū nì', + 夹角: 'jiā jiǎo', + 发髻: 'fà jì', + 猛将: 'měng jiàng', + 劫难: 'jié nàn', + 约摸: 'yuē mo', + 拖累: 'tuō lěi', + 呢绒: 'ní róng', + 钻探: 'zuān tàn', + 夹层: 'jiā céng', + 把子: 'bà zi', + 落魄: 'luò tuò', + 巷道: 'hàng dào', + 运量: 'yùn liàng', + 头里: 'tóu li', + 解闷: 'jiě mèn', + 空儿: 'kòng ér', + 估摸: 'gū mo', + 好客: 'hào kè', + 小曲: 'xiǎo qǔ', + 折衷: 'shé zhōng', + 钻孔: 'zuān kǒng', + 序曲: 'xù qǔ', + 糊弄: 'hù nong', + 荥阳: 'xíng yáng', + 道行: 'dào héng', + 烦闷: 'fán mèn', + 仓卒: 'cāng cù', + 分叉: 'fēn chà', + 曲率: 'qǔ lǜ', + 相片: 'xiàng piān', + 内行: 'nèi háng', + 厂子: 'chǎng zi', + 小调: 'xiǎo diào', + 少阳: 'shào yáng', + 受降: 'shòu xiáng', + 染坊: 'rǎn fáng', + 胳臂: 'gē bei', + 将门: 'jiàng mén', + 模板: 'mú bǎn', + 配给: 'pèi jǐ', + 为伍: 'wéi wǔ', + 跟头: 'gēn tou', + 划算: 'huá suàn', + 累赘: 'léi zhui', + 哄笑: 'hōng xiào', + 晕眩: 'yùn xuàn', + 干掉: 'gàn diào', + 缝制: 'féng zhì', + 难处: 'nán chǔ', + 着意: 'zhuó yì', + 蛮横: 'mán hèng', + 干将: 'gàn jiàng', + 奇数: 'jī shù', + 短发: 'duǎn fà', + 生还: 'shēng huán', + 还清: 'huán qīng', + 看护: 'kān hù', + 直率: 'zhí shuài', + 奏乐: 'zòu yuè', + 载客: 'zài kè', + 专横: 'zhuān hèng', + 湮没: 'yān mò', + 空格: 'kòng gé', + 铺垫: 'pū diàn', + 良将: 'liáng jiàng', + 哗啦: 'huā lā', + 散漫: 'sǎn màn', + 脱发: 'tuō fà', + 两重: 'liǎng chóng', + 送还: 'sòng huán', + 埋没: 'mái mò', + 累及: 'lěi jí', + 薄雾: 'bó wù', + 调离: 'diào lí', + 舌苔: 'shé tāi', + 机长: 'jī zhǎng', + 栓塞: 'shuān sè', + 配角: 'pèi jué', + 切口: 'qiē kǒu', + 创口: 'chuāng kǒu', + 哈欠: 'hā qian', + 实弹: 'shí dàn', + 铺平: 'pū píng', + 哈达: 'hǎ dá', + 懒散: 'lǎn sǎn', + 实干: 'shí gàn', + 填空: 'tián kòng', + 刁钻: 'diāo zuān', + 乐师: 'yuè shī', + 量变: 'liàng biàn', + 诱降: 'yòu xiáng', + 搪塞: 'táng sè', + 购得: 'gòu de', + 征调: 'zhēng diào', + 夹道: 'jiā dào', + 干咳: 'gān ké', + 乐工: 'yuè gōng', + 商行: 'shāng háng', + 划过: 'huá guò', + 着火: 'zháo huǒ', + 更正: 'gēng zhèng', + 给付: 'jǐ fù', + 空子: 'kòng zi', + 哪吒: 'né zhā', + 散曲: 'sǎn qǔ', + 行规: 'háng guī', + 正着: 'zhèng zháo', + 刁难: 'diāo nàn', + 刷子: 'shuā zi', + 丧葬: 'sāng zàng', + 夹带: 'jiā dài', + 安分: 'ān fèn', + 中意: 'zhòng yì', + 长孙: 'zhǎng sūn', + 校订: 'jiào dìng', + 卷曲: 'juǎn qū', + 载运: 'zài yùn', + 投弹: 'tóu dàn', + 柞蚕: 'zuò cán', + 份量: 'fèn liàng', + 外行: 'wài háng', + 调换: 'diào huàn', + 了然: 'liǎo rán', + 咧嘴: 'liě zuǐ', + 典当: 'diǎn dàng', + 寒假: 'hán jià', + 长兄: 'zhǎng xiōng', + 给水: 'jǐ shuǐ', + 须发: 'xū fà', + 枝干: 'zhī gàn', + 属相: 'shǔ xiang', + 哄抢: 'hōng qiǎng', + 刻划: 'kè huá', + 手把: 'shǒu bà', + 塞子: 'sāi zi', + 单干: 'dān gàn', + 还乡: 'huán xiāng', + 兆头: 'zhào tou', + 寺观: 'sì guàn', + 督率: 'dū shuài', + 受累: 'shòu lěi', + 天台: 'tiān tāi', + 啊哈: 'ā hā', + 割舍: 'gē shě', + 抹布: 'mā bù', + 好恶: 'hào wù', + 下处: 'xià chǔ', + 消长: 'xiāo zhǎng', + 离间: 'lí jiàn', + 准头: 'zhǔn tou', + 校对: 'jiào duì', + 什物: 'shí wù', + 番禺: 'pān yú', + 佛爷: 'fó ye', + 备查: 'bèi zhā', + 吗啡: 'mǎ fēi', + 盐分: 'yán fèn', + 当月: 'dàng yuè', + 虎将: 'hǔ jiàng', + 薄荷: 'bò he', + 独处: 'dú chǔ', + 空位: 'kòng wèi', + 铺路: 'pū lù', + 乌拉: 'wù la', + 调回: 'diào huí', + 来头: 'lái tou', + 闲散: 'xián sǎn', + 胶卷: 'jiāo juǎn', + 冒失: 'mào shi', + 干劲: 'gàn jìn', + 弦乐: 'xián yuè', + 行伍: 'háng wǔ', + 相国: 'xiàng guó', + 查查: 'zhā zhā', + 丹参: 'dān shēn', + 助兴: 'zhù xìng', + 铺开: 'pū kāi', + 次长: 'cì zhǎng', + 发卡: 'fà qiǎ', + 拮据: 'jié jū', + 刹车: 'shā chē', + 生发: 'shēng fà', + 重播: 'chóng bō', + 缝合: 'féng hé', + 音量: 'yīn liàng', + 少尉: 'shào wèi', + 殉难: 'xùn nàn', + 冲压: 'chòng yā', + 苍劲: 'cāng jìng', + 厚薄: 'hòu bó', + 威吓: 'wēi hè', + 外相: 'wài xiàng', + 曲谱: 'qǔ pǔ', + 呼号: 'hū háo', + 着迷: 'zháo mí', + 挑担: 'tiāo dàn', + 纹路: 'wén lu', + 一沓: 'yī dá', + 还俗: 'huán sú', + 强横: 'qiáng hèng', + 四行: 'sì háng', + 着数: 'zhāo shù', + 国难: 'guó nàn', + 降顺: 'xiáng shùn', + 挑明: 'tiǎo míng', + 眯缝: 'mī feng', + 分内: 'fèn nèi', + 更衣: 'gēng yī', + 软和: 'ruǎn huo', + 尽兴: 'jìn xìng', + 号子: 'hào zi', + 爪牙: 'zhǎo yá', + 败将: 'bài jiàng', + 猜中: 'cāi zhòng', + 结扎: 'jié zā', + 没空: 'méi kòng', + 夹缝: 'jiā fèng', + 拾掇: 'shí duo', + 掺和: 'chān huo', + 簸箕: 'bò ji', + 电量: 'diàn liàng', + 荷载: 'hè zǎi', + 漯河: 'luò tà hé', + 调式: 'diào shì', + 处身: 'chǔ shēn', + 打手: 'dǎ shou', + 弹弓: 'dàn gōng', + 横蛮: 'hèng mán', + 能干: 'néng gàn', + 校点: 'jiào diǎn', + 加载: 'jiā zài', + 干校: 'gàn xiào', + 哄传: 'hōng chuán', + 校注: 'jiào zhù', + 淤塞: 'yū sè', + 马扎: 'mǎ zhá', + 月氏: 'yuè zhī', + 高干: 'gāo gàn', + 经传: 'jīng zhuàn', + 曾孙: 'zēng sūn', + 好斗: 'hào dòu', + 关卡: 'guān qiǎ', + 逃奔: 'táo bèn', + 磨蹭: 'mó ceng', + 牟取: 'móu qǔ', + 颤栗: 'zhàn lì', + 蚂蚱: 'mà zha', + 撮合: 'cuō he', + 趔趄: 'liè qie', + 摔打: 'shuāi dá', + 台子: 'tái zi', + 分得: 'fēn de', + 粘着: 'nián zhuó', + 采邑: 'cài yì', + 散装: 'sǎn zhuāng', + 婀娜: 'ē nuó', + 兴味: 'xìng wèi', + 行头: 'xíng tou', + 气量: 'qì liàng', + 调运: 'diào yùn', + 处治: 'chǔ zhì', + 乐音: 'yuè yīn', + 组曲: 'zǔ qǔ', + 充塞: 'chōng sè', + 恫吓: 'dòng hè', + 论调: 'lùn diào', + 相中: 'xiāng zhòng', + 民乐: 'mín yuè', + 炮仗: 'pào zhang', + 丧服: 'sāng fú', + 骁将: 'xiāo jiàng', + 量刑: 'liàng xíng', + 缝补: 'féng bǔ', + 财会: 'cái kuài', + 大干: 'dà gàn', + 呱呱: 'gū gū', + 历数: 'lì shǔ', + 校场: 'jiào chǎng', + 塞北: 'sài běi', + 识相: 'shí xiàng', + 辱没: 'rǔ mò', + 鲜亮: 'xiān liang', + 语塞: 'yǔ sè', + 露脸: 'lòu liǎn', + 凉快: 'liáng kuai', + 腰杆: 'yāo gǎn', + 溜达: 'liū da', + 嘎嘎: 'gā gā', + 公干: 'gōng gàn', + 桔梗: 'jié gěng', + 挑逗: 'tiǎo dòu', + 看门: 'kān mén', + 海难: 'hǎi nàn', + 乐歌: 'yuè gē', + 拓片: 'tà piàn', + 挑动: 'tiǎo dòng', + 准将: 'zhǔn jiàng', + 落难: 'luò nàn', + 遒劲: 'qiú jìng', + 磨坊: 'mò fáng', + 逶迤: 'wēi yí', + 搅和: 'jiǎo huo', + 摩挲: 'mā sā', + 作弄: 'zuō nòng', + 苗头: 'miáo tou', + 打颤: 'dǎ zhàn', + 大藏: 'dà zàng', + 畜牲: 'chù sheng', + 勾搭: 'gōu da', + 树荫: 'shù yīn', + 树杈: 'shù chà', + 铁杆: 'tiě gǎn', + 将相: 'jiàng xiàng', + 份子: 'fèn zi', + 视差: 'shì chā', + 绿荫: 'lǜ yīn', + 枪杆: 'qiāng gǎn', + 缝纫: 'féng rèn', + 愁闷: 'chóu mèn', + 点将: 'diǎn jiàng', + 华佗: 'huà tuó', + 劲射: 'jìng shè', + 箱笼: 'xiāng lǒng', + 终了: 'zhōng liǎo', + 鬓发: 'bìn fà', + 结巴: 'jiē ba', + 苦干: 'kǔ gàn', + 看家: 'kān jiā', + 正旦: 'zhēng dàn', + 中肯: 'zhòng kěn', + 厦门: 'xià mén', + 东莞: 'dōng guǎn', + 食量: 'shí liàng', + 宫调: 'gōng diào', + 间作: 'jiàn zuò', + 弹片: 'dàn piàn', + 差池: 'chā chí', + 漂白: 'piǎo bái', + 杠子: 'gàng zi', + 调处: 'tiáo chǔ', + 好动: 'hào dòng', + 转炉: 'zhuàn lú', + 屏气: 'bǐng qì', + 夹板: 'jiā bǎn', + 哀乐: 'āi yuè', + 干道: 'gàn dào', + 苦处: 'kǔ chǔ', + 劈柴: 'pǐ chái', + 长势: 'zhǎng shì', + 天华: 'tiān huā', + 共处: 'gòng chǔ', + 严查: 'yán zhā', + 校验: 'jiào yàn', + 出塞: 'chū sài', + 弹子: 'dàn zǐ', + 磨盘: 'mò pán', + 萎靡: 'wěi mǐ', + 奔丧: 'bēn sāng', + 唱和: 'chàng hè', + 大调: 'dà diào', + 非分: 'fēi fèn', + 钻营: 'zuān yíng', + 夹子: 'jiā zi', + 超载: 'chāo zài', + 更始: 'gēng shǐ', + 铃铛: 'líng dang', + 披散: 'pī sǎn', + 遭难: 'zāo nàn', + 发还: 'fā huán', + 转轮: 'zhuàn lún', + 横财: 'hèng cái', + 泡桐: 'pāo tóng', + 抛撒: 'pāo sǎ', + 天呀: 'tiān yā', + 糊糊: 'hū hū', + 躯壳: 'qū qiào', + 通量: 'tōng liàng', + 奉还: 'fèng huán', + 午觉: 'wǔ jiào', + 闷棍: 'mèn gùn', + 浪头: 'làng tou', + 砚台: 'yàn tāi', + 油坊: 'yóu fáng', + 学长: 'xué zhǎng', + 过载: 'guò zài', + 笔调: 'bǐ diào', + 衣被: 'yì bèi', + 畜产: 'xù chǎn', + 打更: 'dǎ gēng', + 调阅: 'diào yuè', + 蛮干: 'mán gàn', + 曾祖: 'zēng zǔ', + 本行: 'běn háng', + 提干: 'tí gàn', + 变调: 'biàn diào', + 覆没: 'fù mò', + 模子: 'mú zi', + 乐律: 'yuè lǜ', + 称心: 'chèn xīn', + 木杆: 'mù gǎn', + 套曲: 'tào qǔ', + 重印: 'chóng yìn', + 自省: 'zì xǐng', + 提调: 'tí diào', + 看相: 'kàn xiàng', + 芋头: 'yù tou', + 下切: 'xià qiē', + 塞上: 'sài shàng', + 铺张: 'pū zhāng', + 藤蔓: 'téng wàn', + 薄幸: 'bó xìng', + 非难: 'fēi nàn', + 解数: 'xiè shù', + 褪去: 'tùn qù', + 霰弹: 'xiàn dàn', + 柚木: 'yóu mù', + 重载: 'zhòng zài', + 二重: 'èr chóng', + 痕量: 'hén liàng', + 雅乐: 'yǎ yuè', + 号哭: 'háo kū', + 诈降: 'zhà xiáng', + 猪圈: 'zhū juàn', + 咋舌: 'zé shé', + 铣床: 'xǐ chuáng', + 防弹: 'fáng dàn', + 健将: 'jiàn jiàng', + 丽水: 'lí shuǐ', + 削发: 'xuē fà', + 空当: 'kòng dāng', + 多相: 'duō xiàng', + 鲜见: 'xiǎn jiàn', + 划桨: 'huá jiǎng', + 载波: 'zài bō', + 跳蚤: 'tiào zao', + 俏皮: 'qiào pi', + 吧嗒: 'bā dā', + 结发: 'jié fà', + 了断: 'liǎo duàn', + 同调: 'tóng diào', + 石磨: 'shí mò', + 时差: 'shí chā', + 鼻塞: 'bí sè', + 挑子: 'tiāo zi', + 推磨: 'tuī mò', + 武侯: 'wǔ hòu', + 抹煞: 'mǒ shā', + 调转: 'diào zhuǎn', + 籍没: 'jí mò', + 测度: 'cè duó', + 还债: 'huán zhài', + 调演: 'diào yǎn', + 分划: 'fēn huá', + 奇偶: 'jī ǒu', + 断喝: 'duàn hè', + 闷雷: 'mèn léi', + 狼藉: 'láng jí', + 饭量: 'fàn liàng', + 还礼: 'huán lǐ', + 转调: 'zhuǎn diào', + 星相: 'xīng xiàng', + 手相: 'shǒu xiàng', + 配乐: 'pèi yuè', + 盖头: 'gài tou', + 连杆: 'lián gǎn', + 簿记: 'bù jì', + 刀把: 'dāo bà', + 量词: 'liàng cí', + 名角: 'míng jué', + 步调: 'bù diào', + 校本: 'jiào běn', + 曲江: 'qǔ jiāng', + 账簿: 'zhàng bù', + 隽永: 'juàn yǒng', + 哈罗: 'hā luo', + 稍为: 'shāo wéi', + 易传: 'yì zhuàn', + 乐谱: 'yuè pǔ', + 牵累: 'qiān lěi', + 答理: 'dā li', + 喝斥: 'hè chì', + 吟哦: 'yín é', + 干渠: 'gàn qú', + 海量: 'hǎi liàng', + 精当: 'jīng dàng', + 着床: 'zhuó chuáng', + 月相: 'yuè xiàng', + 庶几: 'shù jī', + 宫观: 'gōng guàn', + 论处: 'lùn chǔ', + 征辟: 'zhēng bì', + 厚朴: 'hòu pò', + 介壳: 'jiè qiào', + 吭哧: 'kēng chi', + 咯血: 'kǎ xiě', + 铺陈: 'pū chén', + 重生: 'chóng shēng', + 乐理: 'yuè lǐ', + 哀号: 'āi háo', + 藏历: 'zàng lì', + 琴曲: 'qín qǔ', + 神曲: 'shén qǔ', + 刚劲: 'gāng jìng', + 削平: 'xuē píng', + 浓荫: 'nóng yīn', + 城垛: 'chéng duǒ', + 识记: 'zhì jì', + 当差: 'dāng chāi', + 正传: 'zhèng zhuàn', + 并处: 'bìng chǔ', + 空难: 'kōng nàn', + 创面: 'chuāng miàn', + 旦角: 'dàn jué', + 薄礼: 'bó lǐ', + 晃荡: 'huàng dang', + 臊子: 'sào zi', + 家什: 'jiā shí', + 闷头: 'mèn tóu', + 美发: 'měi fà', + 度数: 'dù shu', + 着凉: 'zháo liáng', + 闯将: 'chuǎng jiàng', + 几案: 'jī àn', + 姘头: 'pīn tou', + 急难: 'jí nàn', + 差数: 'chā shù', + 散碎: 'sǎn suì', + 壅塞: 'yōng sè', + 寒颤: 'hán zhàn', + 牵强: 'qiān qiǎng', + 无间: 'wú jiàn', + 轮转: 'lún zhuàn', + 号叫: 'háo jiào', + 铺排: 'pū pái', + 降伏: 'xiáng fú', + 轧钢: 'zhá gāng', + 东阿: 'dōng ē', + 病假: 'bìng jià', + 累加: 'lěi jiā', + 梗塞: 'gěng sè', + 弹夹: 'dàn jiā', + 钻心: 'zuān xīn', + 晃眼: 'huǎng yǎn', + 魔爪: 'mó zhǎo', + 标量: 'biāo liàng', + 憋闷: 'biē mèn', + 猜度: 'cāi duó', + 处士: 'chǔ shì', + 官差: 'guān chāi', + 讨还: 'tǎo huán', + 长门: 'zhǎng mén', + 馏分: 'liú fèn', + 里弄: 'lǐ lòng', + 色相: 'sè xiàng', + 雅兴: 'yǎ xìng', + 角力: 'jué lì', + 弹坑: 'dàn kēng', + 枝杈: 'zhī chà', + 夹具: 'jiā jù', + 处刑: 'chǔ xíng', + 悍将: 'hàn jiàng', + 好学: 'hào xué', + 好好: 'hǎo hǎo', + 银发: 'yín fà', + 扫把: 'sào bǎ', + 法相: 'fǎ xiàng', + 贵干: 'guì gàn', + 供气: 'gōng qì', + 空余: 'kòng yú', + 捆扎: 'kǔn zā', + 瘠薄: 'jí bó', + 浆糊: 'jiàng hu', + 嘎吱: 'gā zhī', + 不遂: 'bù suí', + 调令: 'diào lìng', + 法帖: 'fǎ tiè', + 淋病: 'lìn bìng', + 调派: 'diào pài', + 转盘: 'zhuàn pán', + 供稿: 'gōng gǎo', + 差官: 'chāi guān', + 忧闷: 'yōu mèn', + 重犯: 'chóng fàn', + 教长: 'jiào zhǎng', + 重唱: 'chóng chàng', + 酒兴: 'jiǔ xìng', + 乐坛: 'yuè tán', + 花呢: 'huā ní', + 叱喝: 'chì hè', + 膀臂: 'bǎng bì', + 重头: 'chóng tóu', + 得空: 'dé kòng', + 转圈: 'zhuàn quān', + 横暴: 'hèng bào', + 哄抬: 'hōng tái', + 引吭: 'yǐn háng', + 载货: 'zài huò', + 中计: 'zhòng jì', + 官长: 'guān zhǎng', + 相面: 'xiàng miàn', + 看头: 'kàn tou', + 盼头: 'pàn tou', + 意兴: 'yì xìng', + 军乐: 'jūn yuè', + 累次: 'lěi cì', + 骨嘟: 'gū dū', + 燕赵: 'yān zhào', + 报丧: 'bào sāng', + 弥撒: 'mí sa', + 挨斗: 'ái dòu', + 扁舟: 'piān zhōu', + 丑角: 'chǒu jué', + 吊丧: 'diào sāng', + 强将: 'qiáng jiàng', + 行号: 'háng háo', + 重奏: 'chóng zòu', + 发辫: 'fà biàn', + 着魔: 'zháo mó', + 着法: 'zhāo fǎ', + 盛放: 'chéng fàng', + 填塞: 'tián sè', + 凶横: 'xiōng hèng', + 稽首: 'qǐ shǒu', + 碑帖: 'bēi tiè', + 冲量: 'chōng liàng', + 发菜: 'fà cài', + 假发: 'jiǎ fà', + 翻卷: 'fān juǎn', + 小量: 'xiǎo liàng', + 胶着: 'jiāo zhuó', + 里子: 'lǐ zi', + 调调: 'diào diao', + 散兵: 'sǎn bīng', + 高挑: 'gāo tiǎo', + 播撒: 'bō sǎ', + 夹心: 'jiā xīn', + 扇动: 'shān dòng', + 叨扰: 'tāo rǎo', + 霓裳: 'ní cháng', + 捻子: 'niǎn zi', + 弥缝: 'mí féng', + 撒布: 'sǎ bù', + 元曲: 'yuán qǔ', + 场院: 'cháng yuàn', + 省亲: 'xǐng qīn', + 提拉: 'dī le', + 惯量: 'guàn liàng', + 强逼: 'qiǎng bī', + 强征: 'qiǎng zhēng', + 晕车: 'yùn chē', + 数道: 'shǔ dào', + 带累: 'dài lěi', + 拓本: 'tà běn', + 嫌恶: 'xián wù', + 宿将: 'sù jiàng', + 龟裂: 'jūn liè', + 缠夹: 'chán jiā', + 发式: 'fà shì', + 隔扇: 'gé shān', + 行货: 'háng huò', + 天分: 'tiān fèn', + 癖好: 'pǐ hào', + 四通: 'sì tòng', + 白术: 'bái zhú', + 划伤: 'huá shāng', + 角斗: 'jué dòu', + 听差: 'tīng chāi', + 岁差: 'suì chā', + 丧礼: 'sāng lǐ', + 脉脉: 'mò mò', + 削瘦: 'xuē shòu', + 撒播: 'sǎ bō', + 莎草: 'suō cǎo', + 犍为: 'qián wéi', + 调头: 'diào tóu', + 龙卷: 'lóng juǎn', + 外调: 'wài diào', + 字帖: 'zì tiè', + 卷发: 'juǎn fà', + 揣度: 'chuǎi duó', + 洋相: 'yáng xiàng', + 散光: 'sǎn guāng', + 骨碌: 'gū lu', + 薄命: 'bó mìng', + 笼头: 'lóng tou', + 咽炎: 'yān yán', + 碌碡: 'liù zhou', + 片儿: 'piān er', + 纤手: 'qiàn shǒu', + 散体: 'sǎn tǐ', + 内省: 'nèi xǐng', + 强留: 'qiǎng liú', + 解送: 'jiè sòng', + 反间: 'fǎn jiàn', + 少壮: 'shào zhuàng', + 一服: 'yī fù', + 留空: 'liú kòng', + 告假: 'gào jià', + 咳血: 'ké xiě', + 薄暮: 'bó mù', + 铺轨: 'pū guǐ', + 磨削: 'mó xuē', + 治丧: 'zhì sāng', + 叉子: 'chā zi', + 哄动: 'hōng dòng', + 蛾子: 'é zi', + 糜子: 'méi zi', + 出落: 'chū là', + 股长: 'gǔ zhǎng', + 贵处: 'guì chǔ', + 还魂: 'huán hún', + 例假: 'lì jià', + 曲池: 'qǔ chí', + 刹住: 'shā zhù', + 身量: 'shēn liàng', + 懂行: 'dǒng háng', + 同好: 'tóng hào', + 模量: 'mó liàng', + 更生: 'gēng shēng', + 服丧: 'fú sāng', + 率直: 'shuài zhí', + 字模: 'zì mú', + 散架: 'sǎn jià', + 答腔: 'dā qiāng', + 交恶: 'jiāo wù', + 薄情: 'bó qíng', + 眼泡: 'yǎn pāo', + 袅娜: 'niǎo nuó', + 草垛: 'cǎo duǒ', + 冲劲: 'chòng jìn', + 呢喃: 'ní nán', + 切中: 'qiè zhòng', + 挑灯: 'tiǎo dēng', + 还愿: 'huán yuàn', + 激将: 'jī jiàng', + 更鼓: 'gēng gǔ', + 没药: 'mò yào', + 难友: 'nàn yǒu', + 败兴: 'bài xìng', + 切面: 'qiē miàn', + 散户: 'sǎn hù', + 累进: 'lěi jìn', + 背带: 'bēi dài', + 秤杆: 'chèng gǎn', + 碾坊: 'niǎn fáng', + 簿子: 'bù zi', + 扳手: 'bān shou', + 铅山: 'yán shān', + 儒将: 'rú jiàng', + 重光: 'chóng guāng', + 剪发: 'jiǎn fà', + 行话: 'háng huà', + 长上: 'zhǎng shàng', + 小传: 'xiǎo zhuàn', + 压轴: 'yā zhòu', + 谱曲: 'pǔ qǔ', + 弱冠: 'ruò guàn', + 花卷: 'huā juǎn', + 横祸: 'hèng huò', + 夹克: 'jiā kè', + 光晕: 'guāng yùn', + 披靡: 'pī mǐ', + 对调: 'duì diào', + 夹持: 'jiā chí', + 空额: 'kòng é', + 平调: 'píng diào', + 铺床: 'pū chuáng', + 丧钟: 'sāng zhōng', + 作乐: 'zuò yuè', + 少府: 'shào fǔ', + 数数: 'shuò shuò', + 奔头: 'bèn tou', + 进给: 'jìn jǐ', + 率性: 'shuài xìng', + 乐子: 'lè zi', + 绑扎: 'bǎng zā', + 挑唆: 'tiǎo suō', + 漂洗: 'piǎo xǐ', + 夹墙: 'jiā qiáng', + 咳喘: 'ké chuǎn', + 乜斜: 'miē xie', + 错处: 'cuò chǔ', + 闷酒: 'mèn jiǔ', + 时调: 'shí diào', + 重孙: 'chóng sūn', + 经幢: 'jīng chuáng', + 圩场: 'xū cháng', + 调门: 'diào mén', + 花头: 'huā tou', + 划拉: 'huá la', + 套色: 'tào shǎi', + 粗率: 'cū shuài', + 相率: 'xiāng shuài', + 款识: 'kuǎn zhì', + 吁请: 'yù qǐng', + 荫蔽: 'yīn bì', + 文蛤: 'wén gé', + 嘀嗒: 'dī dā', + 调取: 'diào qǔ', + 交差: 'jiāo chāi', + 落子: 'lào zǐ', + 相册: 'xiàng cè', + 絮叨: 'xù dáo', + 落发: 'luò fà', + 异相: 'yì xiàng', + 浸没: 'jìn mò', + 角抵: 'jué dǐ', + 卸载: 'xiè zài', + 春卷: 'chūn juǎn', + 扎挣: 'zhá zheng', + 畜养: 'xù yǎng', + 吡咯: 'bǐ luò', + 垛子: 'duǒ zi', + 恶少: 'è shào', + 发际: 'fà jì', + 红苕: 'hóng sháo', + 糨糊: 'jiàng hù', + 哭丧: 'kū sang', + 泡子: 'pāo zǐ', + 稍息: 'shào xī', + 晕船: 'yùn chuán', + 校样: 'jiào yàng', + 外差: 'wài chāi', + 红曲: 'hóng qǔ', + 脚爪: 'jiǎo zhǎo', + 铺展: 'pū zhǎn', + 驮子: 'duò zi', + 芫荽: 'yán sui', + 夹紧: 'jiā jǐn', + 尿泡: 'suī pào', + 丧乱: 'sāng luàn', + 凶相: 'xiōng xiàng', + 华发: 'huá fà', + 打场: 'dǎ cháng', + 云量: 'yún liàng', + 正切: 'zhèng qiē', + 处子: 'chǔ zǐ', + 留难: 'liú nàn', + 划拳: 'huá quán', + 划艇: 'huá tǐng', + 评传: 'píng zhuàn', + 拉纤: 'lā qiàn', + 句读: 'jù dòu', + 散剂: 'sǎn jì', + 骨殖: 'gǔ shi', + 塞音: 'sè yīn', + 铺叙: 'pū xù', + 阏氏: 'yān zhī', + 冷颤: 'lěng zhàn', + 煞住: 'shā zhù', + 夜曲: 'yè qǔ', + 少男: 'shào nán', + 格登: 'gē dēng', + 管乐: 'guǎn yuè', + 号啕: 'háo táo', + 纳降: 'nà xiáng', + 拥塞: 'yōng sè', + 万乘: 'wàn shèng', + 杆儿: 'gǎn ér', + 葛藤: 'gé téng', + 芯子: 'xìn zi', + 簿籍: 'bù jí', + 垫圈: 'diàn juàn', + 皮夹: 'pí jiā', + 校准: 'jiào zhǔn', + 行款: 'háng kuǎn', + 允当: 'yǔn dàng', + 器量: 'qì liàng', + 选调: 'xuǎn diào', + 扮相: 'bàn xiàng', + 干才: 'gàn cái', + 基干: 'jī gàn', + 三校: 'sān jiào', + 割切: 'gē qiē', + 国乐: 'guó yuè', + 卡壳: 'qiǎ ké', + 呢子: 'ní zi', + 辟谷: 'bì gǔ', + 磨房: 'mò fáng', + 咿呀: 'yī yā', + 芥末: 'jiè mo', + 薄技: 'bó jì', + 产假: 'chǎn jià', + 诗兴: 'shī xìng', + 重出: 'chóng chū', + 转椅: 'zhuàn yǐ', + 酌量: 'zhuó liàng', + 簿册: 'bù cè', + 藏青: 'zàng qīng', + 的士: 'dí shì', + 调人: 'diào rén', + 解元: 'jiè yuán', + 茎干: 'jīng gàn', + 巨量: 'jù liàng', + 榔头: 'láng tou', + 率真: 'shuài zhēn', + 喷香: 'pèn xiāng', + 锁钥: 'suǒ yuè', + 虾蟆: 'há má', + 相图: 'xiàng tú', + 兴会: 'xìng huì', + 灶头: 'zào tou', + 重婚: 'chóng hūn', + 钻洞: 'zuān dòng', + 忖度: 'cǔn duó', + 党参: 'dǎng shēn', + 调温: 'diào wēn', + 杆塔: 'gǎn tǎ', + 葛布: 'gé bù', + 拱券: 'gǒng xuàn', + 冠子: 'guàn zi', + 划子: 'huá zǐ', + 夹生: 'jiā shēng', + 露馅: 'lòu xiàn', + 恰切: 'qià qiē', + 散见: 'sǎn jiàn', + 哨卡: 'shào qiǎ', + 烫发: 'tàng fà', + 体量: 'tǐ liàng', + 挺括: 'tǐng guā', + 系带: 'jì dài', + 相士: 'xiàng shì', + 羊圈: 'yáng juàn', + 转矩: 'zhuàn jǔ', + 吧台: 'bā tái', + 苍术: 'cāng zhú', + 菲薄: 'fěi bó', + 蛤蚧: 'gé jiè', + 蛤蜊: 'gé lí', + 瓜蔓: 'guā wàn', + 怪相: 'guài xiàng', + 罹难: 'lí nàn', + 临帖: 'lín tiè', + 女红: 'nǚ gōng', + 刨床: 'bào chuáng', + 翘楚: 'qiáo chǔ', + 数九: 'shǔ jiǔ', + 谈兴: 'tán xìng', + 心曲: 'xīn qǔ', + 雄劲: 'xióng jìng', + 扎染: 'zā rǎn', + 遮荫: 'zhē yīn', + 周正: 'zhōu zhēng', + 赚头: 'zhuàn tou', + 扒手: 'pá shǒu', + 搀和: 'chān huo', + 诚朴: 'chéng piáo', + 肚量: 'dù liàng', + 干结: 'gàn jié', + 工尺: 'gōng chě', + 家累: 'jiā lěi', + 曲水: 'qǔ shuǐ', + 沙参: 'shā shēn', + 挑花: 'tiǎo huā', + 行距: 'háng jù', + 阿门: 'ā mēn', + 背篓: 'bēi lǒu', + 瘪三: 'biē sān', + 裁处: 'cái chǔ', + 创痛: 'chuāng tòng', + 福相: 'fú xiàng', + 更动: 'gēng dòng', + 豪兴: 'háo xìng', + 还阳: 'huán yáng', + 还嘴: 'huán zuǐ', + 借调: 'jiè diào', + 卷云: 'juǎn yún', + 卡子: 'qiǎ zi', + 流弹: 'liú dàn', + 络子: 'lào zi', + 磨子: 'mò zǐ', + 想头: 'xiǎng tou', + 削价: 'xuē jià', + 校阅: 'jiào yuè', + 八行: 'bā háng', + 雅量: 'yǎ liàng', + 别传: 'bié zhuàn', + 薄酒: 'bó jiǔ', + 春假: 'chūn jià', + 发妻: 'fà qī', + 哗哗: 'huā huā', + 宽绰: 'kuān chuo', + 了悟: 'liǎo wù', + 切花: 'qiē huā', + 审度: 'shěn duó', + 应许: 'yīng xǔ', + 转台: 'zhuàn tái', + 仔猪: 'zǐ zhū', + 奔命: 'bèn mìng', + 裁量: 'cái liàng', + 藏戏: 'zàng xì', + 乘兴: 'chéng xìng', + 绸缪: 'chóu móu', + 摧折: 'cuī shé', + 调经: 'diào jīng', + 调职: 'diào zhí', + 缝缀: 'féng zhuì', + 骨朵: 'gū duǒ', + 核儿: 'hú ér', + 恒量: 'héng liàng', + 还价: 'huán jià', + 浑朴: 'hún piáo', + 苦差: 'kǔ chāi', + 面糊: 'miàn hù', + 曲张: 'qǔ zhāng', + 煞车: 'shā chē', + 省视: 'xǐng shì', + 什锦: 'shí jǐn', + 信差: 'xìn chāi', + 余切: 'yú qiē', + 攒眉: 'cuán méi', + 炸糕: 'zhá gāo', + 钻杆: 'zuàn gǎn', + 扒灰: 'pá huī', + 拌和: 'bàn huò', + 长调: 'cháng diào', + 大溜: 'dà liù', + 抖搂: 'dǒu lōu', + 飞转: 'fēi zhuàn', + 赴难: 'fù nàn', + 干仗: 'gàn zhàng', + 好胜: 'hào shèng', + 画片: 'huà piān', + 搅混: 'jiǎo gǔn', + 螺杆: 'luó gǎn', + 木模: 'mù mú', + 怒号: 'nù háo', + 频数: 'pín shuò', + 无宁: 'wú nìng', + 选曲: 'xuǎn qǔ', + 遗少: 'yí shào', + 邮差: 'yóu chāi', + 占卦: 'zhān guà', + 占星: 'zhān xīng', + 重审: 'chóng shěn', + 自量: 'zì liàng', + 待查: 'dài zhā', + 调防: 'diào fáng', + 发廊: 'fà láng', + 翻查: 'fān zhā', + 反调: 'fǎn diào', + 缝子: 'fèng zi', + 更夫: 'gēng fū', + 骨子: 'gǔ zi', + 光杆: 'guāng gǎn', + 夹棍: 'jiā gùn', + 居丧: 'jū sāng', + 巨贾: 'jù gǔ', + 看押: 'kān yā', + 空转: 'kōng zhuàn', + 量力: 'liàng lì', + 蒙尘: 'meng chen', + 蒙难: 'méng nàn', + 炮烙: 'páo luò', + 赔还: 'péi huán', + 扑扇: 'pū shān', + 散记: 'sǎn jì', + 散件: 'sǎn jiàn', + 删削: 'shān xuē', + 射干: 'yè gàn', + 条几: 'tiáo jī', + 偷空: 'tōu kòng', + 削壁: 'xuē bì', + 校核: 'jiào hé', + 阴干: 'yīn gàn', + 择菜: 'zhái cài', + 重九: 'chóng jiǔ', + 主调: 'zhǔ diào', + 自禁: 'zì jīn', + 吧唧: 'bā jī', + 堡子: 'bǔ zi', + 便溺: 'biàn niào', + 词调: 'cí diào', + 叨咕: 'dáo gu', + 干粉: 'gàn fěn', + 俚曲: 'lǐ qǔ', + 落枕: 'lào zhěn', + 铺砌: 'pū qì', + 刷白: 'shuà bái', + 委靡: 'wěi mǐ', + 系泊: 'jì bó', + 相马: 'xiàng mǎ', + 行辈: 'háng bèi', + 熨帖: 'yù tiē', + 转筋: 'zhuàn jīn', + 棒喝: 'bàng hè', + 傧相: 'bīn xiàng', + 镐头: 'gǎo tóu', + 间苗: 'jiàn miáo', + 乐池: 'yuè chí', + 卖相: 'mài xiàng', + 难为: 'nán wéi', + 屏弃: 'bǐng qì', + 铅弹: 'qiān dàn', + 切变: 'qiē biàn', + 请调: 'qǐng diào', + 曲度: 'qǔ dù', + 群氓: 'qún méng', + 散板: 'sǎn bǎn', + 省察: 'xǐng chá', + 事假: 'shì jià', + 纤绳: 'qiàn shéng', + 重影: 'chóng yǐng', + 耕种: 'gēng zhòng', + 种地: 'zhòng dì', + 种菜: 'zhòng cài', + 栽种: 'zāi zhòng', + 接种: 'jiē zhòng', + 垦种: 'kěn zhòng', + 种殖: 'zhòng zhí', + 种瓜: 'zhòng guā', + 种豆: 'zhòng dòu', + 种树: 'zhòng shù', + 睡着: 'shuì zháo', + 笼子: 'lóng zi', +}; +const Pattern2 = Object.keys(DICT2).map((key) => ({ + zh: key, + pinyin: DICT2[key], + priority: 2, + length: 2, +})); + +const DICT3 = { + 为什么: 'wèi shén me', + 实际上: 'shí jì shang', + 检察长: 'jiǎn chá zhǎng', + 不由得: 'bù yóu de', + 差不多: 'chà bu duō', + 只不过: 'zhǐ bu guò', + 国内外: 'guó nèi wai', + 老人家: 'lǎo ren jia', + 干什么: 'gàn shén me', + 可不是: 'kě bù shì', + 这会儿: 'zhè huì er', + 尽可能: 'jǐn kě néng', + 董事长: 'dǒng shì zhǎng', + 了不起: 'liǎo bù qǐ', + 参谋长: 'cān móu zhǎng', + 舍不得: 'shě bu de', + 朝鲜族: 'cháo xiǎn zú', + 恨不得: 'hèn bu de', + 海内外: 'hǎi nèi wai', + 禁不住: 'jīn bú zhù', + 柏拉图: 'bó lā tú', + 怪不得: 'guài bu de', + 不在乎: 'bù zài hu', + 洛杉矶: 'luò shān ji', + 有点儿: 'yǒu diǎn er', + 迫击炮: 'pǎi jī pào', + 大丈夫: 'dà zhàng fu', + 进行曲: 'jìn xíng qǔ', + 免不了: 'miǎn bu liǎo', + 不得了: 'bù dé liǎo', + 过日子: 'guò rì zi', + 马尾松: 'mǎ wěi sōng', + 运输量: 'yùn shū liàng', + 发脾气: 'fā pí qi', + 过不去: 'guò bu qù', + 臭豆腐: 'chòu dòu fu', + 士大夫: 'shì dà fū', + 三部曲: 'sān bù qǔ', + 少不了: 'shǎo bu liǎo', + 仡佬族: 'gē lǎo zú', + 交响曲: 'jiāo xiǎng qǔ', + 分子式: 'fēn zǐ shì', + 好日子: 'hǎo rì zi', + 看样子: 'kàn yàng zi', + 鸭绿江: 'yā lù jiāng', + 巴不得: 'bā bu de', + 协奏曲: 'xié zòu qǔ', + 没关系: 'méi guān xi', + 不见得: 'bú jiàn de', + 压根儿: 'yà gēn er', + 对得起: 'duì de qǐ', + 那会儿: 'nà huì er', + 自个儿: 'zì gě er', + 物理量: 'wù lǐ liàng', + 怎么着: 'zěn me zhāo', + 明晃晃: 'míng huǎng huǎng', + 节假日: 'jié jià rì', + 心里话: 'xīn lǐ huà', + 发行量: 'fā xíng liàng', + 兴冲冲: 'xìng chōng chōng', + 分子量: 'fēn zǐ liàng', + 大不了: 'dà bu liǎo', + 国子监: 'guó zǐ jiàn', + 老大难: 'lǎo dà nán', + 了不得: 'liǎo bu dé', + 石狮子: 'shí shī zi', + 莫不是: 'mò bù shì', + 少不得: 'shǎo bu dé', + 党内外: 'dǎng nèi wai', + 这么着: 'zhè me zhāo', + 少奶奶: 'shào nǎi nai', + 暗地里: 'àn dì li', + 看不起: 'kàn bu qǐ', + 更年期: 'gēng nián qī', + 工作量: 'gōng zuò liàng', + 背地里: 'bèi dì li', + 山里红: 'shān li hóng', + 好好儿: 'hǎo hāo er', + 交响乐: 'jiāo xiǎng yuè', + 好意思: 'hǎo yì si', + 吐谷浑: 'tǔ yù hún', + 没意思: 'méi yì si', + 理发师: 'lǐ fà shī', + 奏鸣曲: 'zòu míng qǔ', + 塔什干: 'tǎ shí gàn', + 充其量: 'chōng qí liàng', + 靠得住: 'kào de zhù', + 车行道: 'chē háng dào', + 中郎将: 'zhōng láng jiàng', + 犯不着: 'fàn bu zháo', + 照明弹: 'zhào míng dàn', + 一溜烟: 'yī liù yān', + 烟幕弹: 'yān mù dàn', + 没奈何: 'mò nài hé', + 乱哄哄: 'luàn hōng hōng', + 惠更斯: 'huì gēng sī', + 载重量: 'zài zhòng liàng', + 瞧得起: 'qiáo de qǐ', + 纪传体: 'jì zhuàn tǐ', + 蚌埠市: 'bèng bù shì', + 冷不丁: 'lěng bu dīng', + 阿房宫: 'ē páng gōng', + 怨不得: 'yuàn bu de', + 卷心菜: 'juǎn xīn cài', + 戏班子: 'xì bān zi', + 过得去: 'guò děi qù', + 大肚子: 'dà dù zi', + 花岗石: 'huā gāng shí', + 外甥女: 'wài sheng nǚ', + 团团转: 'tuán tuán zhuàn', + 大堡礁: 'dà pù jiāo', + 燃烧弹: 'rán shāo dàn', + 劳什子: 'láo shí zi', + 摇滚乐: 'yáo gǔn yuè', + 身子骨: 'shēn zi gǔ', + 夹竹桃: 'jiā zhú táo', + 一刀切: 'yī dāo qiē', + 闹哄哄: 'nào hōng hōng', + 三连冠: 'sān lián guàn', + 重头戏: 'zhòng tóu xì', + 二人转: 'èr rén zhuàn', + 节骨眼: 'jiē gu yǎn', + 知识面: 'zhī shī miàn', + 护士长: 'hù shì zhǎng', + 架子车: 'jià zi chē', + 信号弹: 'xìn hào dàn', + 干电池: 'gàn diàn chí', + 枪杆子: 'qiāng gǎn zi', + 哭丧棒: 'kū sāng bàng', + 鼻咽癌: 'bí yān ái', + 瓦岗军: 'wǎ gāng jūn', + 买得起: 'mǎi de qǐ', + 拗不过: 'niù bu guò', + 癞蛤蟆: 'lài há ma', + 脊梁骨: 'jǐ liang gǔ', + 子母弹: 'zǐ mǔ dàn', + 开小差: 'kāi xiǎo chāi', + 女强人: 'nǚ qiáng rén', + 英雄传: 'yīng xióng zhuàn', + 大嫂子: 'dà sǎo zi', + 爵士乐: 'jué shì yuè', + 说笑话: 'shuō xiào hua', + 混日子: 'hùn rì zi', + 大鼻子: 'dà bí zi', + 碰头会: 'pèng tóu kuài', + 玻璃钢: 'bō li gāng', + 曳光弹: 'yè guāng dàn', + 少林拳: 'shào lín quán', + 咏叹调: 'yǒng tàn diào', + 豆腐干: 'dòu fǔ gàn', + 一个劲: 'yī gè jìn', + 少先队: 'shào xiān duì', + 灵长目: 'líng zhǎng mù', + 对着干: 'duì zhe gàn', + 蒙蒙亮: 'mēng mēng liàng', + 软骨头: 'ruǎn gǔ tou', + 不省得: 'bù xǐng de', + 铺盖卷: 'pū gài juǎn', + 和稀泥: 'huò xī ní', + 亭子间: 'tíng zi jiān', + 背黑锅: 'bēi hēi guō', + 红彤彤: 'hóng tōng tōng', + 武侯祠: 'wǔ hóu cí', + 打哆嗦: 'dǎ duō suo', + 地窨子: 'dì yìn zi', + 狂想曲: 'kuáng xiǎng qǔ', + 幻想曲: 'huàn xiǎng qǔ', + 户口簿: 'hù kǒu bù', + 腿肚子: 'tuǐ dù zi', + 马尾藻: 'mǎ wěi zǎo', + 练习曲: 'liàn xí qǔ', + 夜猫子: 'yè māo zi', + 折子戏: 'zhé zi xì', + 打手势: 'dǎ shǒu shì', + 龙王爷: 'lóng wáng yé', + 要面子: 'yào miàn zi', + 气头上: 'qì tóu shang', + 糊涂虫: 'hú tu chóng', + 笔杆子: 'bǐ gǎn zi', + 占便宜: 'zhàn pián yi', + 打主意: 'dǎ zhǔ yi', + 多弹头: 'duō dàn tóu', + 露一手: 'lòu yī shǒu', + 堰塞湖: 'yàn sè hú', + 保得住: 'bǎo de zhù', + 趵突泉: 'bào tū quán', + 钻空子: 'zuān kòng zi', + 奥得河: 'ào de hé', + 司务长: 'sī wù zhǎng', + 禁不起: 'jīn bu qǐ', + 什刹海: 'shí chà hǎi', + 莲花落: 'lián huā lào', + 一场空: 'yī cháng kōng', + 前奏曲: 'qián zòu qǔ', + 见世面: 'xiàn shì miàn', + 分子筛: 'fēn zǐ shāi', + 豁出去: 'huō chu qu', + 电位差: 'diàn wèi chā', + 挨个儿: 'āi gè er', + 那阵儿: 'nà zhèn er', + 给面子: 'gěi miàn zi', + 肺活量: 'fèi huó liàng', + 大师傅: 'dà shī fū', + 掷弹筒: 'zhì dàn tǒng', + 打呼噜: 'dǎ hū lu', + 广渠门: 'ān qú mén', + 未见得: 'wèi jiàn de', + 大婶儿: 'dà shěn er', + 谈得来: 'tán de lái', + 狮子头: 'shī zi tóu', + 脚丫子: 'jiǎo yā zi', + 变奏曲: 'biàn zòu qǔ', + 空包弹: 'kōng bāo dàn', + 窝里斗: 'wō li dòu', + 弹着点: 'dàn zhuó diǎn', + 免不得: 'miǎn bu de', + 个头儿: 'gè tóu er', + 看得起: 'kàn de qǐ', + 来不得: 'lái bu de', + 糊涂账: 'hú tu zhàng', + 大猩猩: 'dà xīng xing', + 一溜儿: 'yī liù ér', + 禁得起: 'jīn de qǐ', + 法相宗: 'fǎ xiāng zōng', + 可怜相: 'kě lián xiàng', + 吃得下: 'chī de xià', + 汉堡包: 'hàn pù bāo', + 闹嚷嚷: 'nào rāng rāng', + 数来宝: 'shǔ lái bǎo', + 抹脖子: 'mǒ bó zi', + 合得来: 'hé de lái', + 干性油: 'gàn xìng yóu', + 上辈子: 'shàng bèi zi', + 闷葫芦: 'mèn hú lú', + 呱呱叫: 'guā guā jiào', + 西洋参: 'xī yáng shēn', + 碰钉子: 'pèng dìng zǐ', + 林荫道: 'lín yīn dào', + 拉家常: 'lá jiā cháng', + 卷铺盖: 'juǎn pū gài', + 过得硬: 'guò de yìng', + 飞将军: 'fēi jiàng jūn', + 挑大梁: 'tiǎo dà liáng', + 哈巴狗: 'hǎ bā gǒu', + 过家家: 'guō jiā jiā', + 催泪弹: 'cuī lèi dàn', + 雨夹雪: 'yǔ jiā xuě', + 敲竹杠: 'qiāo zhū gàng', + 列车长: 'liè chē zhǎng', + 回旋曲: 'huí xuán qǔ', + 华达呢: 'huá dá ní', + 犯得着: 'fàn de zháo', + 土疙瘩: 'tǔ gē da', + 煞风景: 'shā fēng jǐng', + 轻量级: 'qīng liàng jí', + 羞答答: 'xiū dā dā', + 石子儿: 'shí zǐ er', + 大帽子: 'dà mào zi', + 达姆弹: 'dá mǔ dàn', + 摇篮曲: 'yáo lán qǔ', + 科教片: 'kē jiào piān', + 侃大山: 'kǎn tài shān', + 丁点儿: 'dīng diǎn er', + 吃得消: 'chī de xiāo', + 捋虎须: 'luō hǔ xū', + 间奏曲: 'jiàn zòu qǔ', + 高丽参: 'gāo lí shēn', + 安魂曲: 'ān hún qǔ', + 众生相: 'zhòng shēng xiàng', + 咽峡炎: 'yān xiá yán', + 禁得住: 'jīn de zhù', + 打拍子: 'dǎ pāi zi', + 催眠曲: 'cuī mián qǔ', + 臭架子: 'chòu jià zi', + 吃得开: 'chī de kāi', + 柞丝绸: 'zuò sī chóu', + 应声虫: 'yìng shēng chóng', + 数得着: 'shǔ de zháo', + 傻劲儿: 'shǎ jìn er', + 铅玻璃: 'qiān bō li', + 抹不开: 'mò bù kāi', + 可的松: 'kě dì sōng', + 划得来: 'huá de lái', + 红帽子: 'hóng mào zi', + 孩子王: 'hái zi wáng', + 晕乎乎: 'yùn hū hū', + 台柱子: 'tái zhù zi', + 屎壳郎: 'shǐ ke làng', + 尥蹶子: 'liào jué zǐ', + 空架子: 'kōng jià zi', + 藏红花: 'zàng hóng huā', + 说不着: 'shuō bù zháo', + 闷罐车: 'mèn guàn chē', + 卡脖子: 'qiǎ bó zi', + 红澄澄: 'hóng deng deng', + 赶得及: 'gǎn de jí', + 当间儿: 'dāng jiàn ér', + 露马脚: 'lòu mǎ jiǎo', + 鸡内金: 'jī nà jīn', + 犯得上: 'fàn děi shàng', + 钉齿耙: 'dīng chǐ bà', + 饱和点: 'bǎo huó diǎn', + 文曲星: 'wén qǔ xīng', + 翘辫子: 'qiào biàn zi', + 龙爪槐: 'lóng zhǎo huái', + 喝倒彩: 'hè dào cǎi', + 鸽子笼: 'gē zi lóng', + 定冠词: 'dìng guàn cí', + 担担面: 'dàn dan miàn', + 吃得住: 'chī de zhù', + 爪尖儿: 'zhuǎ jiān er', + 支着儿: 'zhī zhāo ér', + 折跟头: 'zhē gēn tou', + 炸丸子: 'zhá wán zǐ', + 阴着儿: 'yīn zhāo ér', + 烟卷儿: 'yān juǎn ér', + 宣传弹: 'xuān chuán dàn', + 信皮儿: 'xìn pí er', + 弦切角: 'xián qiē jiǎo', + 跳房子: 'tiào fáng zi', + 缩砂密: 'sù shā mì', + 说得来: 'shuō de lái', + 水漂儿: 'shuǐ piǎo ér', + 耍笔杆: 'shuǎ bǐ gǎn', + 数得上: 'shǔ děi shàng', + 数不着: 'shǔ bù zháo', + 数不清: 'shǔ bù qīng', + 什件儿: 'shí jiàn ér', + 狮子会: 'shī zi huì', + 生死簿: 'shēng sǐ bù', + 扇风机: 'shān fēng jī', + 散摊子: 'sàn tān zi', + 撒呓挣: 'sā yì zhēng', + 日记簿: 'rì jì bù', + 热得快: 'rè de kuài', + 曲别针: 'qǔ bié zhēn', + 亲家公: 'qìng jiā gōng', + 奇函数: 'jī hán shù', + 炮子儿: 'pào zǐ er', + 拍纸簿: 'pāi zhǐ bù', + 努劲儿: 'nǔ jìn er', + 泥娃娃: 'ní wá wa', + 内切圆: 'nèi qiē yuán', + 哪会儿: 'něi huì er', + 摸不着: 'mō bù zháo', + 闷头儿: 'mèn tou er', + 没谱儿: 'méi pǔ er', + 铆劲儿: 'mǎo jìn er', + 溜肩膀: 'liū jiān bǎng', + 了望台: 'liào wàng tái', + 老来少: 'lǎo lái shào', + 坤角儿: 'kūn jué ér', + 考勤簿: 'kǎo qín bù', + 卷笔刀: 'juǎn bǐ dāo', + 九重霄: 'jiǔ chóng xiāo', + 进给量: 'jìn jǐ liàng', + 划不来: 'huá bù lái', + 汗褂儿: 'hàn guà er', + 鼓囊囊: 'gǔ nāng nang', + 够劲儿: 'gòu jìn er', + 公切线: 'gōng qiē xiàn', + 搁得住: 'gé de zhù', + 搁不住: 'gé bú zhù', + 赶浪头: 'gǎn làng tóu', + 赶得上: 'gǎn děi shàng', + 干酵母: 'gàn jiào mǔ', + 嘎渣儿: 'gā zhā er', + 嘎嘣脆: 'gā bēng cuì', + 对得住: 'duì de zhù', + 逗闷子: 'dòu mèn zǐ', + 顶呱呱: 'dǐng guā guā', + 滴溜儿: 'dī liù ér', + 大轴子: 'dà zhòu zǐ', + 打板子: 'dǎ bǎn zi', + 寸劲儿: 'cùn jìn er', + 醋劲儿: 'cù jìn er', + 创牌子: 'chuàng pái zi', + 揣手儿: 'chuāi shǒu er', + 冲劲儿: 'chòng jìn er', + 吃得来: 'chī de lái', + 不更事: 'bù gēng shì', + 奔头儿: 'bèn tou er', + 百夫长: 'bǎi fū zhǎng', + 娃娃亲: 'wá wa qīn', + 死劲儿: 'sǐ jìng er', + 骨朵儿: 'gū duǒ er', + 功劳簿: 'gōng láo bù', +}; +const Pattern3 = Object.keys(DICT3).map((key) => ({ + zh: key, + pinyin: DICT3[key], + priority: 3, + length: 3, +})); + +const DICT4 = { + 成吉思汗: 'chéng jí sī hán', + 四通八达: 'sì tōng bā dá', + 一模一样: 'yī mú yī yàng', + 青藏高原: 'qīng zàng gāo yuán', + 阿弥陀佛: 'ē mí tuó fó', + 解放思想: 'jiè fàng sī xiǎng', + 所作所为: 'suǒ zuò suǒ wéi', + 迷迷糊糊: 'mí mí hu hū', + 荷枪实弹: 'hè qiāng shí dàn', + 兴高采烈: 'xìng gāo cǎi liè', + 无能为力: 'wú néng wéi lì', + 融为一体: 'róng wéi yī tǐ', + 布鲁塞尔: 'bù lǔ sài ěr', + 为所欲为: 'wéi suǒ yù wéi', + 审时度势: 'shěn shí duó shì', + 克什米尔: 'kè shí mǐ ěr', + 没完没了: 'méi wán méi liǎo', + 不为人知: 'bù wéi rén zhī', + 结结巴巴: 'jiē jiē bā bā', + 前仆后继: 'qián pū hòu jì', + 一年一度: 'yì nián yí dù', + 各行各业: 'gè háng gè yè', + 合二为一: 'hé èr wéi yī', + 被子植物: 'bèi zǐ zhí wù', + 铺天盖地: 'pū tiān gài dì', + 直截了当: 'zhí jié liǎo dàng', + 供不应求: 'gōng bù yìng qiú', + 御史大夫: 'yù shǐ dà fū', + 不为瓦全: 'bù wéi wǎ quán', + 不可收拾: 'bù kě shōu shi', + 胡作非为: 'hú zuò fēi wéi', + 分毫不差: 'fēn háo bù chā', + 模模糊糊: 'mó mó hu hū', + 不足为奇: 'bù zú wéi qí', + 如之奈何: 'rú zhī nai hé', + 悄无声息: 'qiǎo wú shēng xī', + 卷土重来: 'juǎn tǔ chóng lái', + 了如指掌: 'liǎo rú zhǐ zhǎng', + 深恶痛绝: 'shēn wù tòng jué', + 高高兴兴: 'gāo gāo xìng xìng', + 唉声叹气: 'āi shēng tàn qì', + 混为一谈: 'hùn wéi yī tán', + 不了了之: 'bù liǎo liǎo zhī', + 汉藏语系: 'hàn zàng yǔ xì', + 处心积虑: 'chǔ xīn jī lǜ', + 泣不成声: 'qǐ bù chéng shēng', + 半夜三更: 'bàn yè sān gēng', + 失魂落魄: 'shī hún luò pò', + 二十八宿: 'èr shí bā xiù', + 转来转去: 'zhuàn lái zhuàn qù', + 数以万计: 'shǔ yǐ wàn jì', + 相依为命: 'xiāng yī wéi mìng', + 恋恋不舍: 'liàn liàn bù shě', + 屈指可数: 'qū zhǐ kě shǔ', + 神出鬼没: 'shén chū guǐ mò', + 结结实实: 'jiē jiē shí shí', + 有的放矢: 'yǒu dì fàng shǐ', + 叽哩咕噜: 'jī lǐ gū lū', + 合而为一: 'hé ér wéi yī', + 调兵遣将: 'diào bīng qiǎn jiàng', + 载歌载舞: 'zài gē zài wǔ', + 转危为安: 'zhuǎn wēi wéi ān', + 踏踏实实: 'tā tā shi shí', + 桑给巴尔: 'sāng jǐ bā ěr', + 装模作样: 'zhuāng mú zuò yàng', + 见义勇为: 'jiàn yì yǒng wéi', + 相差无几: 'xiāng chā wú jǐ', + 叹为观止: 'tàn wéi guān zhǐ', + 闷闷不乐: 'mèn mèn bù lè', + 喜怒哀乐: 'xǐ nù āi lè', + 鲜为人知: 'xiǎn wéi rén zhī', + 张牙舞爪: 'zhāng yá wǔ zhǎo', + 为非作歹: 'wéi fēi zuò dǎi', + 一蹶不振: 'yī jué bù zhèn', + 含糊其辞: 'hán hú qí cí', + 疲于奔命: 'pí yú bēn mìng', + 勉为其难: 'miǎn wéi qí nán', + 依依不舍: 'yī yī bù shě', + 顶头上司: 'dǐng tóu shàng si', + 不着边际: 'bù zhuó biān jì', + 大模大样: 'dà mú dà yàng', + 寻欢作乐: 'xún huān zuò lè', + 一走了之: 'yī zǒu liǎo zhī', + 一年到头: 'yì nián dào tóu', + 字里行间: 'zì lǐ háng jiān', + 含含糊糊: 'hán hán hu hū', + 数一数二: 'shǔ yī shǔ èr', + 恰如其分: 'qià rú qí fèn', + 破涕为笑: 'pò tì wéi xiào', + 深更半夜: 'shēn gēng bàn yè', + 千差万别: 'qiān chā wàn bié', + 数不胜数: 'shǔ bù shèng shǔ', + 据为己有: 'jù wéi jǐ yǒu', + 天旋地转: 'tiān xuán dì zhuàn', + 养尊处优: 'yǎng zūn chǔ yōu', + 玻璃纤维: 'bō li xiān wéi', + 吵吵闹闹: 'chāo chao nào nào', + 晕头转向: 'yūn tóu zhuàn xiàng', + 土生土长: 'tǔ shēng tǔ zhǎng', + 宁死不屈: 'nìng sǐ bù qū', + 不省人事: 'bù xǐng rén shì', + 尽力而为: 'jìn lì ér wéi', + 精明强干: 'jīng míng qiáng gàn', + 唠唠叨叨: 'láo lao dāo dāo', + 叽叽喳喳: 'jī ji zhā zhā', + 功不可没: 'gōng bù kě mò', + 锲而不舍: 'qiè ér bù shě', + 排忧解难: 'pái yōu jiě nàn', + 稀里糊涂: 'xī li hú tú', + 异曲同工: 'yì qǔ tóng gōng', + 各有所长: 'gè yǒu suǒ chéng', + 的的确确: 'dí dí què què', + 一言为定: 'yī yán wéi dìng', + 哄堂大笑: 'hōng táng dà xiào', + 听而不闻: 'tīng ér bú wén', + 刀耕火种: 'dāo gēng huǒ zhòng', + 说不过去: 'shuō bu guò qù', + 内分泌腺: 'nèi fèn mì xiàn', + 化险为夷: 'huà xiǎn wéi yí', + 百发百中: 'bǎi fā bǎi zhòng', + 重见天日: 'chóng jiàn tiān rì', + 反败为胜: 'fǎn bài wéi shèng', + 一了百了: 'yī liǎo bǎi liǎo', + 大大咧咧: 'dà da liē liē', + 心急火燎: 'xīn jí huǒ liǎo', + 粗心大意: 'cū xīn dà yi', + 鸡皮疙瘩: 'jī pí gē da', + 夷为平地: 'yí wéi píng dì', + 日积月累: 'rì jī yuè lěi', + 设身处地: 'shè shēn chǔ dì', + 投其所好: 'tóu qí suǒ hào', + 间不容发: 'jiān bù róng fà', + 人满为患: 'rén mǎn wéi huàn', + 穷追不舍: 'qióng zhuī bù shě', + 为时已晚: 'wéi shí yǐ wǎn', + 如数家珍: 'rú shǔ jiā zhēn', + 心里有数: 'xīn lǐ yǒu shù', + 一盘散沙: 'yī pán sǎn shā', + 以牙还牙: 'yǐ yá huán yá', + 神不守舍: 'shén bù shǒu shě', + 孟什维克: 'mèng shí wéi kè', + 各自为战: 'gè zì wéi zhàn', + 怨声载道: 'yuàn shēng zài dào', + 一哄而散: 'yī hòng ér sàn', + 救苦救难: 'jiù kǔ jiù nàn', + 好好先生: 'hǎo hǎo xiān sheng', + 怪模怪样: 'guài mú guài yàng', + 抛头露面: 'pāo tóu lù miàn', + 游手好闲: 'yóu shǒu hào xián', + 无所不为: 'wú suǒ bù wéi', + 调虎离山: 'diào hǔ lí shān', + 步步为营: 'bù bù wéi yíng', + 好大喜功: 'hào dà xǐ gōng', + 众矢之的: 'zhòng shǐ zhī dì', + 长生不死: 'cháng shēng bū sǐ', + 蔚为壮观: 'wèi wéi zhuàng guān', + 不可胜数: 'bù kě shèng shǔ', + 鬼使神差: 'guǐ shǐ shén chāi', + 洁身自好: 'jié shēn zì hào', + 敢作敢为: 'gǎn zuò gǎn wéi', + 茅塞顿开: 'máo sè dùn kāi', + 走马换将: 'zǒu mǎ huàn jiàng', + 为时过早: 'wéi shí guò zǎo', + 为人师表: 'wéi rén shī biǎo', + 阴差阳错: 'yīn chā yáng cuò', + 油腔滑调: 'yóu qiāng huá diào', + 重蹈覆辙: 'chóng dǎo fù zhé', + 骂骂咧咧: 'mà ma liē liē', + 絮絮叨叨: 'xù xù dāo dāo', + 如履薄冰: 'rú lǚ bó bīng', + 损兵折将: 'sǔn bīng zhé jiàng', + 无可比拟: 'wú kě bǐ nì', + 拐弯抹角: 'guǎi wān mò jiǎo', + 像模像样: 'xiàng mú xiàng yàng', + 供过于求: 'gōng guò yú qiú', + 开花结果: 'kāi huā jiē guǒ', + 仔仔细细: 'zǐ zǐ xì xì', + 川藏公路: 'chuān zàng gōng lù', + 河北梆子: 'hé běi bāng zi', + 长年累月: 'cháng nián lěi yuè', + 正儿八经: 'zhèng er bā jīng', + 不识抬举: 'bù shí tái ju', + 重振旗鼓: 'chóng zhèn qí gǔ', + 气息奄奄: 'qì xī yān yān', + 紧追不舍: 'jǐn zhuī bù shě', + 服服帖帖: 'fú fu tiē tiē', + 强词夺理: 'qiǎng cí duó lǐ', + 噼里啪啦: 'pī li pā lā', + 人才济济: 'rén cái jǐ jǐ', + 发人深省: 'fā rén shēn xǐng', + 不足为凭: 'bù zú wéi píng', + 为富不仁: 'wéi fù bù rén', + 连篇累牍: 'lián piān lěi dú', + 呼天抢地: 'hū tiān qiāng dì', + 落落大方: 'luò luò dà fāng', + 自吹自擂: 'zì chuī zì léi', + 乐善好施: 'lè shàn hào shī', + 以攻为守: 'yǐ gōng wéi shǒu', + 磨磨蹭蹭: 'mó mó cèng cèng', + 削铁如泥: 'xuē tiě rú ní', + 助纣为虐: 'zhù zhòu wéi nüè', + 以退为进: 'yǐ tuì wéi jìn', + 重整旗鼓: 'chóng zhěng qí gǔ', + 嘁嘁喳喳: 'qī qī chā chā', + 枪林弹雨: 'qiāng lín dàn yǔ', + 令人发指: 'lìng rén fà zhǐ', + 转败为胜: 'zhuǎn bài wéi shèng', + 转弯抹角: 'zhuǎn wān mò jiǎo', + 在劫难逃: 'zài jié nán táo', + 正当防卫: 'zhèng dàng fáng wèi', + 不足为怪: 'bù zú wéi guài', + 难兄难弟: 'nàn xiōng nàn dì', + 咿咿呀呀: 'yī yī yā yā', + 弹尽粮绝: 'dàn jìn liáng jué', + 八旗子弟: 'bā qí zi dì', + 阿谀奉承: 'ē yú fèng chéng', + 稀里哗啦: 'xī li huā lā', + 返老还童: 'fǎn lǎo huán tóng', + 好高骛远: 'hào gāo wù yuǎn', + 灾难深重: 'zāi nán shēn zhòng', + 鹿死谁手: 'lù sǐ shéi shǒu', + 差强人意: 'chā qiáng rén yì', + 大吹大擂: 'dà chuī dà léi', + 成家立业: 'chéng jiā lì yiè', + 自怨自艾: 'zì yuàn zì yì', + 负债累累: 'fù zhai lěi lěi', + 古为今用: 'gǔ wéi jīn yòng', + 入土为安: 'rù tǔ wéi ān', + 下不为例: 'xià bù wéi lì', + 一哄而上: 'yì hōng ér shàng', + 一股劲儿: 'yī gǔ jìn er', + 没头苍蝇: 'méi tóu cāng ying', + 天差地远: 'tiān chā dì yuǎn', + 风卷残云: 'fēng juǎn cán yún', + 多灾多难: 'duō zāi duō nàn', + 乳臭未干: 'rǔ xiù wèi gān', + 行家里手: 'háng jiā lǐ shǒu', + 狼狈为奸: 'láng bèi wéi jiān', + 处变不惊: 'chǔ biàn bù jīng', + 一唱一和: 'yī chàng yī hè', + 一念之差: 'yī niàn zhī chā', + 金蝉脱壳: 'jīn chán tuō qiào', + 滴滴答答: 'dī dī dā dā', + 硕果累累: 'shuò guǒ léi léi', + 只知其一: 'zhǐ zhī qí yī', + 好整以暇: 'hào zhěng yǐ xiá', + 红得发紫: 'hóng de fā zǐ', + 传为美谈: 'chuán wéi měi tán', + 富商大贾: 'fù shāng dà gǔ', + 四海为家: 'sì hǎi wéi jiā', + 失而复得: 'shī ér fù de', + 了若指掌: 'liǎo ruò zhǐ zhǎng', + 大有可为: 'dà yǒu kě wéi', + 出头露面: 'chū tóu lù miàn', + 鼓鼓囊囊: 'gǔ gu nāng nāng', + 窗明几净: 'chuāng míng jī jìng', + 泰然处之: 'tài rán chǔ zhī', + 怒发冲冠: 'nù fà chōng guān', + 不甚了了: 'bù shèn liǎo liǎo', + 有机玻璃: 'yǒu jī bō li', + 骨头架子: 'gú tou jià zi', + 义薄云天: 'yì bó yún tiān', + 一丁点儿: 'yī dīng diǎn er', + 时来运转: 'shí lái yùn zhuǎn', + 陈词滥调: 'chén cí làn diào', + 七十二行: 'qī shí èr háng', + 化整为零: 'huà zhěng wéi líng', + 火烧火燎: 'huǒ shāo huǒ liǎo', + 干脆利索: 'gàn cuì lì suǒ', + 吊儿郎当: 'diào er láng dāng', + 广种薄收: 'guǎng zhòng bó shōu', + 种瓜得瓜: 'zhòng guā dé guā', + 种豆得豆: 'zhòng dòu dé dòu', + 难舍难分: 'nán shě nán fēn', + 歃血为盟: 'shà xuè wéi méng', + 奋发有为: 'fèn fā yǒu wéi', + 阴错阳差: 'yīn cuò yáng chā', + 东躲西藏: 'dōng duǒ xī cáng', + 烟熏火燎: 'yān xūn huǒ liǎo', + 钻牛角尖: 'zuān niú jiǎo jiān', + 乔装打扮: 'qiáo zhuāng dǎ bàn', + 改弦更张: 'gǎi xián gēng zhāng', + 河南梆子: 'hé nán bāng zi', + 好吃懒做: 'hào chī lǎn zuò', + 何乐不为: 'hé lè bù wéi', + 大出风头: 'dà chū fēng tóu', + 攻城掠地: 'gōng chéng lüě dì', + 漂漂亮亮: 'piào piào liang liang', + 折衷主义: 'zhé zhōng zhǔ yì', + 大马哈鱼: 'dà mǎ hǎ yú', + 绿树成荫: 'lǜ shù chéng yīn', + 率先垂范: 'shuài xiān chuí fàn', + 家长里短: 'jiā cháng lǐ duǎn', + 宽大为怀: 'kuān dà wéi huái', + 左膀右臂: 'zuǒ bǎng yòu bì', + 影子内阁: 'yǐng zi nèi gé', + 一笑了之: 'yī xiào liǎo zhī', + 天下为公: 'tiān xià wéi gōng', + 还我河山: 'huán wǒ hé shān', + 何足为奇: 'hé zú wéi qí', + 好自为之: 'hào zì wéi zhī', + 风姿绰约: 'fēng zī chuō yué', + 大雨滂沱: 'dà yǔ páng tuó', + 传为佳话: 'chuán wéi jiā huà', + 吃里扒外: 'chī lǐ pá wài', + 重操旧业: 'chóng cāo jiù yè', + 小家子气: 'xiǎo jiā zi qì', + 少不更事: 'shào bù gēng shì', + 难分难舍: 'nán fēn nán shě', + 只争朝夕: 'zhǐ zhēng zhāo xī', + 添砖加瓦: 'tiān zhuān jiē wǎ', + 是非分明: 'shì fēi fēn míng', + 舍我其谁: 'shě wǒ qí shuí', + 偏听偏信: 'piān tīng piāng xìn', + 量入为出: 'liàng rù wéi chū', + 降龙伏虎: 'xiáng lóng fú hǔ', + 故伎重演: 'gù jì zhòng yǎn', + 钢化玻璃: 'gāng huà bō li', + 正中下怀: 'zhèng zhòng xià huái', + 以身许国: 'yǐ shēng xǔ guó', + 一语中的: 'yī yǔ zhōng dì', + 丧魂落魄: 'sàng hún luò pò', + 三座大山: 'sān zuò tài shān', + 济济一堂: 'jǐ jǐ yī táng', + 好事之徒: 'hào shì zhī tú', + 干净利索: 'gàn jìng lì suǒ', + 出将入相: 'chū jiàng rù xiàng', + 袅袅娜娜: 'niǎo niǎo nuó nuó', + 狐狸尾巴: 'hú li wěi ba', + 好逸恶劳: 'hào yì wù láo', + 大而无当: 'dà ér wú dàng', + 打马虎眼: 'dǎ mǎ hu yǎn', + 板上钉钉: 'bǎn shàng dìng dīng', + 吆五喝六: 'yāo wǔ hè liù', + 虾兵蟹将: 'xiā bīng xiè jiàng', + 水调歌头: 'shuǐ diào gē tóu', + 数典忘祖: 'shǔ diǎn wàng zǔ', + 人事不省: 'rén shì bù xǐng', + 曲高和寡: 'qǔ gāo hè guǎ', + 偶一为之: 'ǒu yī wéi zhī', + 屡教不改: 'lǚ jiàn bù gǎi', + 互为因果: 'hù wéi yīn guò', + 互为表里: 'hù wéi biǎo lǐ', + 厚此薄彼: 'hòu cǐ bó bǐ', + 过关斩将: 'guò guān zhǎn jiàng', + 疙疙瘩瘩: 'gē gē dā dá', + 否极泰来: 'pǐ jí tài lái', + 大腹便便: 'dà fù pián pián', + 走为上策: 'zǒu wéi shàng cè', + 冤家对头: 'yuān jia duì tóu', + 有隙可乘: 'yǒu xì kě chèng', + 一无所得: 'yī wú suǒ dé', + 一鳞半爪: 'yī lín bàn zhǎo', + 一哄而起: 'yī hōng ér qǐ', + 片言只语: 'piàn yán zhǐ yǔ', + 开花结实: 'kāi huā jié shí', + 旧地重游: 'jiù dì chóng yóu', + 经年累月: 'jīng nián lěi yuè', + 含糊其词: 'hán hú qí cí', + 寡廉鲜耻: 'guǎ lián xiǎn chǐ', + 成年累月: 'chéng nián lěi yuè', + 不徇私情: 'bù xún sī qíng', + 不当人子: 'bù dāng rén zǐ', + 膀大腰圆: 'bǎng dà yāo yuán', + 指腹为婚: 'zhǐ fù wéi hūn', + 这么点儿: 'zhè me diǎn er', + 意兴索然: 'yì xīng suǒ rán', + 绣花枕头: 'xiù huā zhěn tóu', + 无的放矢: 'wú dì fàng shǐ', + 望闻问切: 'wàng wén wèn qiē', + 舍己为人: 'shě jǐ wèi rén', + 穷年累月: 'qióng nián lěi yuè', + 排难解纷: 'pái nàn jiě fēn', + 处之泰然: 'chǔ zhī tài rán', + 指鹿为马: 'zhǐ lù wéi mǎ', + 一吐为快: 'yī tǔ wéi kuài', + 一丘之貉: 'yī qiū zhī hé', + 危如累卵: 'wēi rú lěi luǎn', + 天兵天将: 'tiān bīng tiān jiàng', + 舍近求远: 'shě jìn qiú yuǎn', + 南腔北调: 'nán qiāng běi diào', + 苦中作乐: 'kǔ zhōng zuò lè', + 厚积薄发: 'hòu jī bó fā', + 戴绿帽子: 'dài lǜ mào zi', + 臭味相投: 'xiù wèi xiāng tóu', + 长幼有序: 'zhǎng yòu yǒu xù', + 逼良为娼: 'bī liáng wéi chāng', + 悲悲切切: 'bēi bēi qiè qiē', + 败军之将: 'bài jūn zhī jiàng', + 欺行霸市: 'qī háng bà shì', + 削足适履: 'xuē zú shì lǚ', + 先睹为快: 'xiān dǔ wéi kuài', + 啼饥号寒: 'tí jī háo hán', + 疏不间亲: 'shū bù jiàn qīn', + 神差鬼使: 'shén chāi guǐ shǐ', + 敲敲打打: 'qiāo qiāo dā dā', + 平铺直叙: 'píng pū zhí xù', + 没头没尾: 'méi tóu mò wěi', + 寥寥可数: 'liáo liáo kě shǔ', + 哼哈二将: 'hēng hā èr jiàng', + 鹤发童颜: 'hè fà tóng yán', + 各奔前程: 'gè bèn qián chéng', + 弹无虚发: 'dàn wú xū fā', + 大人先生: 'dà rén xiān sheng', + 与民更始: 'yǔ rén gēng shǐ', + 叶落归根: 'yè luò huī gēn', + 一目十行: 'yī mù shí háng', + 虚晃一枪: 'xiù huàng yī qiāng', + 树碑立传: 'shù bēi lì zhuàn', + 是非得失: 'shì fēi dé shī', + 实逼处此: 'shí bī chǔ cǐ', + 塞翁失马: 'sài wēng shī mǎ', + 日薄西山: 'rì bó xī shān', + 切身体会: 'qiē shēn tǐ huì', + 片言只字: 'piàn yán zhǐ zì', + 跑马卖解: 'pǎo mǎ mài xiè', + 宁折不弯: 'nìng zhé bù wān', + 零零散散: 'líng líng sǎn sǎn', + 量体裁衣: 'liàng tǐ cái yī', + 连中三元: 'lián zhòng sān yuán', + 礼崩乐坏: 'lǐ bēng yuè huài', + 胡子拉碴: 'hú zǐ lā chā', + 不为已甚: 'bù wéi yǐ shèn', + 转悲为喜: 'zhuǎn bēi wéi xǐ', + 以眼还眼: 'yǐ yǎn huán yǎn', + 蔚为大观: 'wèi wéi dà guān', + 未为不可: 'wèi wéi bù kě', + 童颜鹤发: 'tóng yán hè fà', + 朋比为奸: 'péng bǐ wéi jiān', + 莫此为甚: 'mò cǐ wéi shèn', + 老调重弹: 'lǎo diào zhòng dàn', + 夹枪带棒: 'jiā qiāng dài bàng', + 富商巨贾: 'fù shāng jù jiǎ', + 多劳多得: 'duō láo duō de', + 淡然处之: 'dàn rán chǔ zhī', + 箪食壶浆: 'dān sì hú jiāng', + 创巨痛深: 'chuāng jù tòng shēn', + 草长莺飞: 'cǎo zhǎng yīng fēi', + 坐视不救: 'zuò shī bù jiù', + 重起炉灶: 'chóng qǐ lú zào', + 以己度人: 'yǐ jǐ duó rén', + 随行就市: 'suí háng jiù shì', + 文以载道: 'wén yǐ zài dào', + 文不对题: 'wén bù duì tí', + 铁板钉钉: 'tiě bǎn dìng dīng', + 身体发肤: 'shēn tǐ fà fū', + 缺吃少穿: 'quē chī xhǎo chuān', + 目无尊长: 'mù wú zūn zhǎng', + 吉人天相: 'jí rén tiān xiàng', + 毁家纾难: 'huǐ jiā shū nàn', + 钢筋铁骨: 'gāng jīng tiě gǔ', + 丢卒保车: 'diū zú bǎo jū', + 丢三落四: 'diū sān là sì', + 闭目塞听: 'bì mù sè tīng', + 削尖脑袋: 'xuē jiān nǎo dài', + 为非作恶: 'wéi fēi zuò è', + 人才难得: 'rén cái cái dé', + 情非得已: 'qíng fēi dé yǐ', + 切中要害: 'qiē zhōng yào hài', + 火急火燎: 'huǒ jí huǒ liǎo', + 画地为牢: 'huà dì wéi láo', + 好酒贪杯: 'hào jiǔ tān bēi', + 长歌当哭: 'cháng gē dàng kū', + 载沉载浮: 'zài chén zài fú', + 遇难呈祥: 'yù nàn chéng xiáng', + 榆木疙瘩: 'yú mù gē da', + 以邻为壑: 'yǐ lín wéi hè', + 洋为中用: 'yáng wéi zhōng yòng', + 言为心声: 'yán wéi xīn shēng', + 言必有中: 'yán bì yǒu zhòng', + 图穷匕见: 'tú qióng bǐ xiàn', + 滂沱大雨: 'páng tuó dà yǔ', + 目不暇给: 'mù bù xiá jǐ', + 量才录用: 'liàng cái lù yòng', + 教学相长: 'jiào xué xiāng zhǎng', + 悔不当初: 'huǐ bù dāng chū', + 呼幺喝六: 'hū yāo hè liù', + 不足为训: 'bù zú wéi xùn', + 不拘形迹: 'bù jū xíng jī', + 傍若无人: 'páng ruò wú rén', + 八大山人: 'bā tài shān rén', + 罪责难逃: 'zuì zé nán táo', + 自我吹嘘: 'zì wǒ chuí xū', + 转祸为福: 'zhuǎn huò wéi fú', + 重峦叠嶂: 'chóng luán dié zhàng', + 勇冠三军: 'yǒng guàn sān jūn', + 易地而处: 'yì dì ér chǔ', + 一语破的: 'yī yǔ pò dì', + 卸磨杀驴: 'xiè mò shā lǘ', + 玩儿不转: 'wán ér bù zhuàn', + 天道好还: 'tiān dào hǎo huán', + 身单力薄: 'shēn dān lì bó', + 撒豆成兵: 'sǎ dòu chéng bīng', + 曲里拐弯: 'qū lǐ guǎn wān', + 片纸只字: 'piàn zhǐ yán zì', + 宁缺毋滥: 'nìng quē wù làn', + 没没无闻: 'mò mò wú wén', + 量力而为: 'liàng lì ér wéi', + 历历可数: 'lì lì kě shǔ', + 口碑载道: 'kǒu bēi zài dào', + 君子好逑: 'jūn zǐ hào qiú', + 好为人师: 'hào wéi rén shī', + 豪商巨贾: 'háo shāng jù jiǎ', + 各有所好: 'gè yǒu suǒ hào', + 度德量力: 'duó dé liàng lì', + 便宜从事: 'biàn yí cóng shì', + 指天为誓: 'zhǐ tiān wéi shì', + 逸兴遄飞: 'yì xìng chuán fēi', + 心宽体胖: 'xīn kuān tǐ pán', + 为德不卒: 'wéi dé bù zú', + 纨袴子弟: 'wán kǔ zǐ dì', + 天下为家: 'tiān xià wéi jiā', + 视为畏途: 'shì wéi wèi tú', + 舍己从人: 'shě jǐ cóng rén', + 三灾八难: 'sān zāi bā nàn', + 人自为战: 'rén zì wéi zhàn', + 群雌粥粥: 'qún cí yù yù', + 那么点儿: 'nà me diǎn er', + 沐猴而冠: 'mù hóu ér guàn', + 谋为不轨: 'móu wéi bù guǐ', + 明窗净几: 'míng chuāng jìng jī', + 哩哩啦啦: 'li li lā lā', + 见缝就钻: 'jiàn fèng jiù zuān', + 夹层玻璃: 'jiā céng bō li', + 急公好义: 'jí gōng hào yì', + 积年累月: 'jī nián lěi yuè', + 划地为牢: 'huá dì wéi láo', + 更名改姓: 'gèng míng gǎi xìng', + 奉为圭臬: 'fèng wéi guī niè', + 多难兴邦: 'duō nàn xīng bāng', + 顿开茅塞: 'dùn kāi máo sè', + 弹尽援绝: 'dàn jìn yuán jué', + 大脖子病: 'dà bó zi bìng', + 不破不立: 'bù può bù lì', + 坐地自划: 'zuò dì zì huá', + 坐不重席: 'zuò bù chóng xí', + 坐不窥堂: 'zùo bù kuī táng', + 作舍道旁: 'zuò shě dào páng', + 作嫁衣裳: 'zuò jià yī shāng', + 左支右吾: 'zuǒ zhī yòu wū', + 左枝右梧: 'zuǒ zhī yòu wū', + 左宜右有: 'zuǒ yí yòu fú', + 罪应万死: 'zuì yīng wàn sǐ', + 钻心刺骨: 'zuàn xīn cì gǔ', + 钻穴逾墙: 'zuān xué yú qiáng', + 钻穴逾隙: 'zuān xué yú xì', + 钻隙逾墙: 'zuān xì yú qiáng', + 钻头觅缝: 'zuān tóu mì fèng', + 钻天觅缝: 'zuàn tiān mì féng', + 钻天打洞: 'zuān tiān dǎ dòng', + 钻皮出羽: 'zuān pí chū yǔ', + 钻懒帮闲: 'zuān lǎn bāng xián', + 钻火得冰: 'zuān huǒ dé bīng', + 钻洞觅缝: 'zuàn dòng mì féng', + 钻冰求火: 'zuān bīng qiú huǒ', + 钻冰求酥: 'zuān bīng qiú sū', + 走为上着: 'zǒu wèi shàng zhaō', + 走花溜水: 'zǒu huā liū bīng', + 纵曲枉直: 'zòng qǔ wǎng zhí', + 自相惊忧: 'zì xiāng jīng rǎo', + 子为父隐: 'zǐ wéi fù yǐn', + 资深望重: 'zī shēng wàng zhòng', + 擢发难数: 'zhuó fà nán shǔ', + 擢发莫数: 'zhuó fà mò shǔ', + 着书立说: 'zhù shū lì shuō', + 着人先鞭: 'zhuó rén xiān biān', + 斫琱为朴: 'zhuó diāo wéi pǔ', + 斫雕为朴: 'zhuó diāo wéi pǔ', + 锥处囊中: 'zhuī chǔ náng zhōng', + 椎膺顿足: 'chuí yīng dùn zú', + 椎胸跌足: 'chuí xiōng diē zú', + 椎胸顿足: 'chuí xiōng dùn zú', + 椎心饮泣: 'chuí xīn yǐn qì', + 椎心泣血: 'chuí xīn qì xuè', + 椎心呕血: 'chuí xīn ǒu xuè', + 椎心顿足: 'chuí xīn dùn zú', + 椎天抢地: 'chuí tiān qiǎng dì', + 椎牛飨士: 'chuí niú xiǎng shì', + 椎牛歃血: 'chuí niú shà xuè', + 椎牛发冢: 'chuí niú fā zhǒng', + 椎埋屠狗: 'chuí mái tú gǒu', + 椎埋狗窃: 'chuí mái gǒu qiè', + 椎肤剥体: 'chuí fū bō tǐ', + 椎肤剥髓: 'chuí fū bō suǐ', + 椎锋陷阵: 'chuí fēng xiàn zhèn', + 椎锋陷陈: 'chuī fēng xiàn chén', + 追欢作乐: 'zhuī huān zuò lè', + 追风摄景: 'zhuī fēng niè jǐng', + 壮发冲冠: 'zhuàng fā chōng guàn', + 庄严宝相: 'zhuāng yán bǎo xiàng', + 转灾为福: 'zhuǎn zāi wéi fú', + 转湾抹角: 'zhuǎn wān mò jiǎo', + 转愁为喜: 'zhuǎn chóu wéi xǐ', + 转嗔为喜: 'zhuǎn chēn wéi xǐ', + 转败为成: 'zhuǎn bài wéi chéng', + 转败为功: 'zhuǎn bài wéi gōng', + 拽巷攞街: 'zhuài xiàng luǒ jiē', + 拽巷啰街: 'zhuài xiàng luó jiē', + 拽耙扶犁: 'zhuāi pá fú lí', + 拽布拖麻: 'zhuāi bù tuō má', + 箸长碗短: 'zhù chàng wǎn duǎn', + 铸剑为犁: 'zhù jiàn wéi lí', + 杼柚之空: 'zhù zhóu zhī kōng', + 杼柚其空: 'zhù zhóu qí kōng', + 杼柚空虚: 'zhù zhóu kōng xū', + 助天为虐: 'zhù tiān wéi nüè', + 助桀为虐: 'zhù jié wéi nüè', + 属垣有耳: 'zhǔ yuán yǒu ěr', + 属毛离里: 'zhǔ máo lí lǐ', + 属辞比事: 'zhǔ cí bǐ shì', + 属词比事: 'zhǔ cí bǐ shì', + 逐物不还: 'zhú wù bù huán', + 铢铢校量: 'zhū zhū xiào liàng', + 铢量寸度: 'zhū liáng cùn duó', + 铢两悉称: 'zhū liǎng xī chèn', + 铢积寸累: 'zhū jī cùn lěi', + 侏儒一节: 'zhū rǔ yī jié', + 侏儒观戏: 'zhū rǔ guān xì', + 朱槃玉敦: 'zhū pán yù duì', + 朱盘玉敦: 'zhū pán yù duì', + 朱轓皁盖: 'zhū fān hǎi gài', + 昼干夕惕: 'zhòu gàn xī tì', + 昼度夜思: 'zhòu duó yè sī', + 诪张为幻: 'zhōu zhāng wéi huàn', + 周郎顾曲: 'zhōu láng gù qǔ', + 侜张为幻: 'zhōu zhāng wéi huàn', + 重足一迹: 'chóng zú yī jì', + 重足屏息: 'chóng zú bǐng xī', + 重足屏气: 'chóng zú bǐng qì', + 重足累息: 'chóng zú lèi xī', + 重足而立: 'chóng zú ér lì', + 重纸累札: 'chóng zhǐ lèi zhá', + 重垣叠锁: 'chóng yuán dié suǒ', + 重垣迭锁: 'chóng yuán dié suǒ', + 重裀列鼎: 'chóng yīn liè dǐng', + 重岩叠嶂: 'chóng yán dié zhàng', + 重兴旗鼓: 'chóng xīng qí gǔ', + 重熙累叶: 'chóng xī lěi yè', + 重熙累盛: 'chóng xī lěi shèng', + 重手累足: 'chóng shǒu lěi zú', + 重山峻岭: 'chóng shān jùn lǐng', + 重山复水: 'chóng shān fù shuǐ', + 重山复岭: 'chóng shān fù lǐng', + 重三叠四: 'chóng sān dié sì', + 重三迭四: 'chóng sān dié sì', + 重气徇命: 'zhòng qì xùn míng', + 重纰貤缪: 'chóng pī yí miù', + 重葩累藻: 'chóng pā lèi zǎo', + 重明继焰: 'chóng míng jì yàn', + 重峦复嶂: 'chóng luán fù zhàng', + 重峦叠巘: 'chóng luán dié yǎn', + 重峦迭巘: 'chóng luán dié yǎn', + 重理旧业: 'chóng lǐ jiù yè', + 重金袭汤: 'chóng jīn xí tāng', + 重金兼紫: 'chóng jīn jiān zǐ', + 重迹屏气: 'chóng jì bǐng qì', + 重珪叠组: 'chóng guī dié zǔ', + 重规袭矩: 'chóng guī xí jǔ', + 重规叠矩: 'chóng guī dié jǔ', + 重规累矩: 'chóng guī lèi jǔ', + 重规迭矩: 'chóng guī dié jǔ', + 重规沓矩: 'chóng guī tà jǔ', + 重圭叠组: 'chóng guī dié zǔ', + 重睹天日: 'chóng dǔ tiān rì', + 重床叠屋: 'chóng chuáng dié wū', + 重床叠架: 'chóng chuáng dié jià', + 重床迭屋: 'chóng chuáng dié wū', + 重床迭架: 'chóng chuáng dié jià', + 众啄同音: 'zhòng zhòu tóng yīn', + 众星攒月: 'zhòng xīng cuán yuè', + 众毛攒裘: 'zhòng máo cuán qiú', + 众好众恶: 'zhòng hào zhòng wù', + 钟鼎人家: 'zhōng dǐng rén jia', + 擿植索涂: 'zhāi zhí suǒ tú', + 擿埴索涂: 'zhāi zhí suǒ tú', + 擿埴索途: 'zhāi zhí suǒ tú', + 稚齿婑媠: 'zhì chǐ wǒ tuǒ', + 致远任重: 'zhì yuǎn rèn zhàng', + 栉比鳞差: 'zhì bǐ lín cǐ', + 至当不易: 'zhì dàng bù yì', + 指皁为白: 'zhǐ zào wéi bái', + 指皂为白: 'zhǐ zào wéi bái', + 指雁为羹: 'zhǐ yàn wéi gēng', + 指树为姓: 'zhǐ shù wéi xìng', + 指山说磨: 'zhǐ shān shuō mò', + 指山卖磨: 'zhǐ shān mài mò', + 只争旦夕: 'zhǐ zhēng dàn xī', + 止戈为武: 'zhǐ gē wéi wǔ', + 植发穿冠: 'zhí fà chuān guàn', + 植发冲冠: 'zhí fà chōng guàn', + 直言切谏: 'zhí yán qiē jiàn', + 直扑无华: 'zhí pǔ wú huá', + 知疼着痒: 'zhī téng zháo yǎng', + 枝叶相持: 'zhī yè xīng chí', + 枝干相持: 'zhī gàn xiāng xhí', + 枝附叶着: 'zhī fù yiè zhuó', + 枝附叶著: 'zhī fù yiè zhuó', + 枝大于本: 'zhī dà yù běn', + 支吾其词: 'zhī wū qí cí', + 支分族解: 'zhī fē zú jiě', + 正中己怀: 'zhèng zhòng jǐ huái', + 正身率下: 'zhèng shēn shuài xià', + 正冠纳履: 'zhèng guàn nà lǚ', + 正冠李下: 'zhèng guàn lǐ xià', + 整冠纳履: 'zhěng guàn nà lǚ', + 整躬率物: 'zhěng gōng shuài wù', + 整顿干坤: 'zhěng dùn gàn kūn', + 蒸沙为饭: 'zhēng shā wéi fàn', + 振兵泽旅: 'zhèn bīng shì lǚ', + 枕席还师: 'zhěn xí huán shī', + 枕石漱流: 'zhěn shí sòu liú', + 枕石嗽流: 'zhěn shí shù liú', + 真相毕露: 'zhēn xiāng bì lù', + 针头削铁: 'zhēn tóu xuē tiě', + 贞松劲柏: 'zhēn sōng jìng bǎi', + 赭衣塞路: 'zhě yī sài lù', + 折腰五斗: 'shé yāo wǔ dòu', + 折箭为誓: 'shé jiàn wéi shì', + 折而族之: 'zhe er zu zi', + 昭德塞违: 'zhāo dé sè wéi', + 彰明较着: 'zhāng míng jiào zhù', + 章句小儒: 'zhāng jù xiāo rú', + 湛恩汪濊: 'zhàn ēn wāng hún', + 占风望气: 'zhān fēng wàng qì', + 占风使帆: 'zhān fēng shǐ fān', + 斩将刈旗: 'zhǎn jiàng yì qí', + 斩将搴旗: 'zhǎn jiàng qiān qí', + 斩钉切铁: 'zhǎn dīng qiē tiě', + 詹言曲说: 'zhān yán qǔ shuō', + 沾沾自好: 'zhān zhān zì hào', + 曾母投杼: 'zēng mǔ tóu zhù', + 曾参杀人: 'zēng shēn shā rén', + 曾不惨然: 'zeng bu chan ran', + 造谣中伤: 'zào yáo zhòng shāng', + 早占勿药: 'zǎo zhān wù yào', + 凿龟数策: 'záo guī shǔ cè', + 攒三集五: 'cuán sān jí wǔ', + 攒三聚五: 'cuán sān jù wǔ', + 攒眉苦脸: 'zǎn méi kǔ liǎn', + 攒眉蹙额: 'cuán mei cù é', + 攒零合整: 'cuán líng hé zhěng', + 攒锋聚镝: 'cuán fēng jù dí', + 载舟覆舟: 'zài zhōu fù zhōu', + 载一抱素: 'zài yī bào sù', + 载笑载言: 'zài xiào zài yán', + 载驱载驰: 'zài qū zài chí', + 载酒问字: 'zài jiǔ wèn zì', + 载歌且舞: 'zài gē qiě wǔ', + 运转时来: 'yùn zhuǎn shí lái', + 殒身不恤: 'yǔn shēn bú xù', + 云舒霞卷: 'yún shū xiá juǎn', + 云泥之差: 'yún ní zhī chā', + 岳镇渊渟: 'yuè zhèn yuān tīng', + 月中折桂: 'yuè zhōng shé guì', + 月没参横: 'yuè mò shēn héng', + 月落参横: 'yuè luò shēn héng', + 远不间亲: 'yuǎn bù jiàn qīn', + 鬻驽窃价: 'yù nǔ qiè jià', + 鬻鸡为凤: 'yù jī wéi fèng', + 遇难成祥: 'yù nàn chéng xiáng', + 郁郁累累: 'yù yù lěi lěi', + 吁天呼地: 'yù tiān hū dì', + 吁咈都俞: 'yù fú dōu yú', + 玉卮无当: 'yù zhī wú dàng', + 语笑喧阗: 'yǔ xiào xuān tiān', + 与世沉浮: 'yú shì chén fú', + 与时消息: 'yǔ shí xiāo xi', + 与民除害: 'yǔ hǔ chú hài', + 逾墙钻隙: 'yú qiáng zuān xì', + 渔阳鞞鼓: 'yǔ yáng pí gǔ', + 渔夺侵牟: 'yú duó qīn móu', + 鱼目混珎: 'yú mù hùn zhū', + 杅穿皮蠹: 'yú chuān shuǐ dù', + 余勇可贾: 'yú yǒng kě gǔ', + 予智予雄: 'yú zhì yú xióng', + 予取予携: 'yú qǔ yú xié', + 予取予求: 'yú qǔ yú qiú', + 予取予夺: 'yú qǔ yú duó', + 于家为国: 'yú jiā wéi guó', + 又弱一个: 'yòu ruò yī gè', + 有借无还: 'yǒu jiè wú huán', + 有加无已: 'yǒu jiā wǔ yǐ', + 有国难投: 'yǒu guó nán tóu', + 有蠙可乘: 'yǒu bīn kě chéng', + 游必有方: 'yōu bì yǒu fāng', + 油干灯尽: 'yóu gàn dēng jìn', + 尤云殢雨: 'yóu yún zhì yǔ', + 饔飧不给: 'yōng sūn bù jǐ', + 庸中皦皦: 'yōng zhōng bì tóng', + 蝇攒蚁聚: 'yíng cuán yǐ jù', + 郢书燕说: 'yǐng shū yān shuō', + 蝇攒蚁附: 'yíng cuán yǐ fù', + 营蝇斐锦: 'yíng yíng fēi jǐn', + 盈千累万: 'yíng qiān lěi wàn', + 盈篇累牍: 'yíng piān lěi dú', + 鹰心雁爪: 'yīng xīn yàn zhǎo', + 莺吟燕儛: 'yīng yín yàn sāi', + 应天顺时: 'yīng tiān shùn shí', + 印累绶若: 'yìn léi shòu ruò', + 隐占身体: 'yin zhan shen qi', + 饮犊上流: 'yìn dú shàng liú', + 饮冰食蘖: 'yǐn bīng shí bò', + 引绳切墨: 'yǐn shéng qiē mò', + 龈齿弹舌: 'yín chǐ dàn shé', + 淫言媟语: 'yín yán liǎng yǔ', + 淫词艳曲: 'yín cí yàn qǔ', + 因缘为市: 'yīn yuán wéi shì', + 因树为屋: 'yīn shù wéi wū', + 因祸为福: 'yīn huò wéi fú', + 因敌为资: 'yīn dí wéi zī', + 溢美溢恶: 'yì měi yì lè', + 逸兴云飞: 'yì xìng yún fēi', + 逸兴横飞: 'yì xìng héng fēi', + 抑塞磊落: 'yì sè lěi luò', + 倚闾望切: 'yǐ lǘ wàng qiē', + 蚁拥蜂攒: 'yǐ yōng fēng cuán', + 以紫为朱: 'yǐ zǐ wéi zhū', + 以意为之: 'yǐ yì wéi zhī', + 以言为讳: 'yǐ yán wéi huì', + 以微知着: 'yǐ wēi zhī zhù', + 以疏间亲: 'yǐ shū jiàn qīn', + 以水济水: 'yǐ shuǐ jǐ shuǐ', + 以书为御: 'yǐ shū wéi yù', + 以守为攻: 'yǐ shǒu wéi gōng', + 以升量石: 'yǐ shēng liáng dàn', + 以慎为键: 'yǐ shèn wéi jiàn', + 以日为年: 'yǐ rì wéi nián', + 以筌为鱼: 'yǐ quán wéi yú', + 以鹿为马: 'yǐ lù wéi mǎ', + 以利累形: 'yǐ lì lěi xíng', + 以毁为罚: 'yǐ huǐ wéi fá', + 以黑为白: 'yǐ hēi wéi bái', + 以规为瑱: 'yǐ guī wéi tiàn', + 以古为鉴: 'yǐ gǔ wéi jiàn', + 以宫笑角: 'yǐ gōng xiào jué', + 以法为教: 'yǐ fǎ wéi jiào', + 以耳为目: 'yǐ ěr wéi mù', + 以大恶细: 'yǐ dà wù xì', + 以不济可: 'yǐ fǒu jì kě', + 以白为黑: 'yǐ bái wéi hēi', + 遗世忘累: 'yí shì wàng lěi', + 遗寝载怀: 'yí qǐn zài huái', + 移孝为忠: 'yí xiào wéi zhōng', + 移的就箭: 'yí dì jiù jiàn', + 依头缕当: 'yī tóu lǚ dàng', + 衣租食税: 'yì zū shí shuì', + 衣轻乘肥: 'yì qīng chéng féi', + 衣裳之会: 'yī shāng zhī huì', + 衣锦食肉: 'yì jǐn shí ròu', + 衣锦过乡: 'yì jǐn guò xiāng', + 衣单食薄: 'yī dān shí bó', + 一重一掩: 'yī chóng yī yǎn', + 一之为甚: 'yī zhī wéi shèn', + 一笑了事: 'yī xiào le shì', + 一现昙华: 'yī xiàn tán huā', + 一岁载赦: 'yī suì zài shè', + 一切万物: 'yī qiē wàn wù', + 一目五行: 'yī mù wǔ háng', + 一鳞一爪: 'yī lín yī zhǎo', + 一鳞片爪: 'yī lín piàn zhǎo', + 一了百当: 'yī liǎo bǎi dàng', + 一见了然: 'yī jiàn le rán', + 一还一报: 'yī huán yī bào', + 一毫不差: 'yī háo bù chā', + 一倡百和: 'yī chàng bǎi hè', + 一鞭先著: 'yī biān xiān zhuó', + 一笔抹摋: 'yī bǐ mò sà', + 一暴十寒: 'yī pù shí hán', + 夜静更阑: 'yè jìng gēng lán', + 叶公好龙: 'yè gōng hào lóng', + 野调无腔: 'yě diào wú qiāng', + 咬血为盟: 'yǎo xuè wéi méng', + 瑶池女使: 'yáo shi nǚ shǐ', + 幺麽小丑: 'yāo mǒ xiǎo chǒu', + 养精畜锐: 'yǎng jīng xù ruì', + 仰屋着书: 'yǎng wū zhù shū', + 卬首信眉: 'áng shǒu shēn méi', + 洋洋纚纚: 'yáng yáng sǎ sǎ', + 羊羔美酒: 'yán gāo měi jiǔ', + 羊肠九曲: 'yáng cháng jiǔ qǔ', + 扬眉眴目: 'yáng méi shùn mù', + 扬厉铺张: 'yáng lì pù zhāng', + 扬风扢雅: 'yáng fēng bào yǎ', + 燕子衔食: 'yàn zǐ xián shí', + 燕昭市骏: 'yān zhāo shì jùn', + 燕昭好马: 'yān zhāo hǎo mǎ', + 燕石妄珍: 'yān shí wàng zhēn', + 燕雀处屋: 'yàn què chǔ wū', + 燕骏千金: 'yān jùn qiān jīn', + 燕金募秀: 'yān jīn mù xiù', + 燕驾越毂: 'yān jià yuè gū', + 燕歌赵舞: 'yān gē zhào wǔ', + 燕岱之石: 'yān dài zhī shí', + 燕处焚巢: 'yàn chǔ fén cháo', + 燕处危巢: 'yàn chǔ wēi cháo', + 燕巢幙上: 'yàn cháo yú shàng', + 掞藻飞声: 'shǎn zǎo fēi shēng', + 偃革为轩: 'yǎn gé wéi xuān', + 岩栖穴处: 'yán qī xué chǔ', + 岩居穴处: 'yán jū xué chǔ', + 妍蚩好恶: 'yán chī hǎo è', + 压良为贱: 'yā liáng wéi jiàn', + 搀行夺市: 'chān háng duó shì', + 三十六行: 'sān shí liù háng', + 泣数行下: 'qì shù háng xià', + 当行出色: 'dāng háng chū sè', + 目下十行: 'mù xià shí háng', + 秀出班行: 'xiù chū bān háng', + 儿女成行: 'ér nǚ chéng háng', + 大行大市: 'dà háng dà shì', + 十行俱下: 'shí háng jù xià', + 寻行数墨: 'xún háng shǔ mò', + 熏莸同器: 'xún yóu tóng qì', + 埙篪相和: 'xūn chí xiāng hè', + 血债累累: 'xuè zhài lěi lěi', + 雪鸿指爪: 'xuě hóng zhǐ zhǎo', + 衒玉贾石: 'zuì yù jiǎ shí', + 炫玉贾石: 'xuàn yù gǔ shí', + 炫石为玉: 'xuàn shí wéi yù', + 旋干转坤: 'xuán qián zhuǎn kūn', + 悬石程书: 'xuán dàn chéng shū', + 悬狟素飡: 'xuán huán sù kòu', + 悬龟系鱼: 'xuán guī jì yú', + 揎拳捰袖: 'xuān quán lǒng xiù', + 揎拳捋袖: 'xuān quán luō xiù', + 轩鹤冠猴: 'xuān hè guàn hóu', + 畜妻养子: 'xù qī yǎng zǐ', + 魆风骤雨: 'zhuō fēng zhòu yǔ', + 褎然冠首: 'yòu rán guàn shǒu', + 羞人答答: 'xiū rén dā dā', + 修鳞养爪: 'xiū lín yǎng zhǎo', + 熊据虎跱: 'xióng jù hǔ shēn', + 汹涌淜湃: 'xiōng yǒng péng pai', + 兄死弟及: 'xiōng féi dì jí', + 腥闻在上: 'xíng wén zài shàng', + 兴文匽武: 'xīng wén diào wǔ', + 兴如嚼蜡: 'xìng rú jiáo là', + 兴观群怨: 'xìng guān qún yuàn', + 兴高彩烈: 'xìng gāo cǎi liè', + 心瞻魏阙: 'xīn zhān wèi què', + 心在魏阙: 'xīn zài wèi què', + 心同止水: 'xīn rú zhǐ shuǐ', + 心手相应: 'xīn shǒu xiāng yìng', + 心手相忘: 'xīn shǒu xiāng wàng', + 心口相应: 'xīn kǒu xiāng yīng', + 心广体胖: 'xīn guǎng tǐ pán', + 心驰魏阙: 'xīn chí wèi què', + 心不应口: 'xīn bù yīng kǒu', + 挟势弄权: 'jiā shì nòng quán', + 胁肩累足: 'xié jiān lěi zú', + 邪魔外祟: 'xié mó wai suì', + 敩学相长: 'zuàn xué xiāng cháng', + 校短量长: 'jiào duǎn liáng cháng', + 小眼薄皮: 'xiǎo yǎn bó pí', + 小廉曲谨: 'xiǎo lián qǔ jǐn', + 硝云弹雨: 'xiāo yún dàn yǔ', + 鸮鸣鼠暴: 'zhāng míng shǔ bào', + 削株掘根: 'xuē zhū jué gēn', + 削铁无声: 'xuē tiě wú shēng', + 削职为民: 'xuē zhí wéi mín', + 削木为吏: 'xuē mù wéi lì', + 削草除根: 'xuē cǎo chú gēn', + 橡皮钉子: 'xiàng pí dìng zǐ', + 想望风褱: 'xiǎng wàng fēng shèng', + 香培玉琢: 'xiang pei yu zuo', + 相与为一: 'xiāng yǔ wéi yī', + 相鼠有皮: 'xiàng shǔ yǒu pí', + 相时而动: 'xiàng shí ér dòng', + 相切相磋: 'xiāng qiē xiāng cuō', + 相女配夫: 'xiàng nǚ pèi fū', + 相门有相: 'xiàng mén yǒu xiàng', + 挦章撦句: 'lóng zhāng zōng jù', + 先我着鞭: 'xiān wǒ zhuó biān', + 习焉不察: 'xī yān bù chá', + 歙漆阿胶: 'shè qī ē jiāo', + 晰毛辨发: 'xī máo biàn fà', + 悉索薄赋: 'xī suǒ bó fù', + 雾鳞云爪: 'wù lín yún zhǎo', + 误作非为: 'wù zuò fēi wéi', + 物稀为贵: 'wù xī wéi guì', + 舞爪张牙: 'wǔ zhǎo zhāng yá', + 碔砆混玉: 'zhì fū hùn yù', + 武断专横: 'wǔ duàn zhuān héng', + 五石六鹢: 'wǔ shí liù yī', + 五色相宣: 'wǔ sè xiāng xuān', + 五侯七贵: 'wǔ hòu qī guì', + 五侯蜡烛: 'wǔ hòu là zhú', + 五羖大夫: 'wǔ gǔ dà fū', + 吾自有处: 'wu zi you chu', + 无与为比: 'wú yǔ wéi bǐ', + 无下箸处: 'wú xià zhù chǔ', + 无適无莫: 'wú dí wú mò', + 无伤无臭: 'wú shēng wú xiù', + 无能为役: 'wú néng wéi yì', + 无寇暴死: 'wu kou bào shi', + 无孔不钻: 'wú kǒng bù zuān', + 无间可伺: 'wú jiān kě sì', + 无间可乘: 'wú jiān kě chéng', + 无间冬夏: 'wú jiān dōng xià', + 无缝天衣: 'wú féng tiān yī', + 无恶不为: 'wú è bù wéi', + 无动为大: 'wú dòng wéi dà', + 无地自处: 'wú dì zì chǔ', + 诬良为盗: 'wū liáng wéi dào', + 握粟出卜: 'wò sù chū bo', + 握拳透爪: 'wò quán tòu zhǎo', + 稳操左券: 'wén cāo zuǒ quàn', + 闻风响应: 'wén fēng xiǎng yīng', + 文武差事: 'wén wǔ chà shì', + 文身剪发: 'wén shēn jiǎn fā', + 文房四侯: 'wén fáng sì hòu', + 温枕扇席: 'wēn zhěn shān xí', + 温席扇枕: 'wēn xí shān zhěn', + 温凊定省: 'wēn qǐng dìng shěng', + 温衾扇枕: 'wēn qīn shān zhěn', + 亹亹不倦: 'tān wěi bù juàn', + 委委佗佗: 'wēi wēi tuó tuó', + 委曲成全: 'wěi qǔ chéng quán', + 尾大难掉: 'wěi dà nán diào', + 惟所欲为: 'wéi suǒ yù wéi', + 惟日为岁: 'wéi rì wéi suì', + 惟利是趋: 'wéi lì shì qú', + 帷薄不修: 'wéi bó bù xiū', + 唯唯否否: 'wěi wěi fǒu fǒu', + 唯所欲为: 'wéi suǒ yù wéi', + 为蛇添足: 'wéi shé tiān zú', + 为善最乐: 'wéi shàn zuì lè', + 为蛇画足: 'wéi shé huà zú', + 为山止篑: 'wéi shān zhǐ kuì', + 为仁不富: 'wéi rén bù fù', + 为裘为箕: 'wéi qiú wéi jī', + 为民父母: 'wéi mín fù mǔ', + 为虺弗摧: 'wéi huǐ fú cuī', + 为好成歉: 'wéi hǎo chéng qiàn', + 为鬼为蜮: 'wéi guǐ wéi yù', + 为法自弊: 'wéi fǎ zì bì', + 为恶不悛: 'wéi è bù quān', + 为德不终: 'wéi dé bù zhōng', + 煨干就湿: 'wēi gàn jiù shī', + 煨干避湿: 'wēi gàn bì shī', + 危于累卵: 'wēi yú lěi luǎn', + 望风响应: 'wàng fēng xiǎng yīng', + 望尘僄声: 'wàng chén bù shēng', + 枉曲直凑: 'wǎng qǔ zhí còu', + 往渚还汀: 'wǎng zhǔ huán tīng', + 王贡弹冠: 'wáng gòng dàn guàn', + 亡魂失魄: 'wáng hún shī hún', + 亡国大夫: 'wáng guó dà fū', + 万载千秋: 'wàn zài qiān qiū', + 万贯家私: 'wàn guàn ji sī', + 万夫不当: 'wàn fū bù dāng', + 万别千差: 'wàn bié qiān chā', + 晚食当肉: 'wǎn shí dàng ròu', + 晚节不保: 'wǎn jíe bù bǎo', + 玩岁愒月: 'wán suì yī yuè', + 玩岁愒时: 'wán suì yī shí', + 玩时愒日: 'wán shí ài rì', + 蛙蟆胜负: 'wā má shèng fù', + 吞言咽理: 'tūn yán yān lǐ', + 颓垣断堑: 'tuí yuán duàn piàn', + 推枯折腐: 'tuī kū shé fǔ', + 推干就湿: 'tuī gàn jiù shī', + 剸繁治剧: 'shí fán zhì jù', + 剸繁决剧: 'shí fán jué jù', + 团头聚面: 'tuàn tóu jù miàn', + 兔走鹘落: 'tù zǒu gǔ luò', + 兔丝燕麦: 'tù sī yàn mài', + 兔头麞脑: 'tù tóu suō nǎo', + 兔葵燕麦: 'tù kuí yàn mài', + 兔角龟毛: 'tu jiao gui mao', + 吐哺握发: 'tǔ bǔ wò fà', + 徒讬空言: 'tú tún kōng yán', + 投传而去: 'tóu zhuàn ér qù', + 头足异处: 'tóu zú yì chǔ', + 头上著头: 'tóu shàng zhuó tóu', + 头没杯案: 'tóu mò bēi àn', + 头昏脑闷: 'tóu hūn nǎo mèn', + 头会箕敛: 'tóu kuàn jī liǎn', + 头会箕赋: 'tóu kuài jī fù', + 头出头没: 'tóu chū tóu mò', + 痛自创艾: 'tòng zì chuāng yì', + 痛深恶绝: 'tòng shēn wù jué', + 同源异派: 'tóng yuán yì pai', + 同心僇力: 'tóng xīn jié lì', + 同工异曲: 'tóng gōng yì qǔ', + 同恶相助: 'tóng wù xiāng zhù', + 同恶相恤: 'tóng wù xiāng xù', + 痌瘝在抱: 'tōng guān zào bào', + 通文调武: 'tōng wén diào wǔ', + 通同一气: 'tōng tóng yī yì', + 铤鹿走险: 'dìng lù zǒu xiǎn', + 停留长智: 'tíng liú zhǎng zhì', + 铁树开华: 'tiě shù kāi huā', + 条贯部分: 'tiáo guàn bù fēn', + 挑牙料唇: 'tiǎo yá liào chún', + 挑么挑六: 'tiāo yāo tiāo liù', + 挑唇料嘴: 'tiǎo chún liào zuǐ', + 靦颜事仇: 'tiǎn yán shì chóu', + 恬不为意: 'tián bù wéi yì', + 恬不为怪: 'tián bù wéi guài', + 天下为笼: 'tiān xià wéi lóng', + 天台路迷: 'tiān tái lù mí', + 天年不遂: 'tiān nián bù suì', + 天宝当年: 'tian bao dang nian', + 桃蹊柳曲: 'táo qī liǔ qǔ', + 堂皇冠冕: 'táng huáng guàn miǎn', + 探囊胠箧: 'tàn náng wú qiè', + 谭言微中: 'tán yán wēi zhòng', + 谈言微中: 'tán yán wēi zhòng', + 贪夫狥财: 'tān fū huái cái', + 泰山盘石: 'tai shān pán shí', + 泰来否往: 'tài lái pǐ wǎng', + 泰来否极: 'tai lái fǒu jí', + 泰极而否: 'tài jí ér pǐ', + 狧穅及米: 'shì kǎn jí mǐ', + 损军折将: 'sǔn jūn zhé jiàng', + 遂心应手: 'suì xīn yīng shǒu', + 遂迷不窹: 'suí méi bù wù', + 岁月不居: 'suì yuè bù jú', + 岁聿其莫: 'suì yù qí mù', + 随物应机: 'suí wù yīng jī', + 随风而靡: 'suí fēng ér mǐ', + 宿雨餐风: 'xiǔ yǔ cān fēng', + 宿水飡风: 'xiǔ shuǐ cān fēng', + 宿水餐风: 'xiǔ shuǐ cān fēng', + 夙兴夜处: 'sù xīng yè chǔ', + 搜岩采干: 'sōu yán cǎi gàn', + 薮中荆曲: 'sǒu zhōng jí qǔ', + 宋斤鲁削: 'sòng jīn lǔ xuē', + 松筠之节: 'sōng jūn zhī jié', + 騃童钝夫: 'ái tóng dùn fū', + 騃女痴男: 'ái nǚ chī nán', + 四亭八当: 'sì tíng bā dàng', + 四马攒蹄: 'sì mǎ cuán tí', + 四不拗六: 'sì bù niù liù', + 斯事体大: 'ī shì tǐ dà', + 思所逐之: 'si shuo zhu zi', + 丝恩发怨: 'sī ēn fà yuàn', + 硕望宿德: 'shuò wàng xiǔ dé', + 铄古切今: 'shuò gǔ qiē jīn', + 顺天应时: 'shùn tiān yīng shí', + 顺风转舵: 'shǔn fēng zhuǎn duò', + 顺风驶船: 'shǔn fēng shǐ chuán', + 顺风使船: 'shǔn fēng shǐ chuán', + 顺风而呼: 'shǔn fēng ér hū', + 顺风吹火: 'shǔn fēng chuī huǒ', + 水中捉月: 'shui zhong zhuo yue', + 水中著盐: 'shuǐ zhōng zhuó yán', + 水宿风餐: 'shuǐ xiǔ fēng cān', + 水米无干: 'shuǐ mǐ wú gàn', + 水长船高: 'shuǐ zhǎng chuán gāo', + 双足重茧: 'shuāng zú chóng jiǎn', + 双柑斗酒: 'shuài gān dǒu jiǔ', + 数米而炊: 'shǔ mǐ ér chuī', + 数往知来: 'shǔ wǎng zhī lái', + 数米量柴: 'shǔ mǐ ér chái', + 数理逻辑: 'shù lǐ luó ji', + 数见不鲜: 'shuò jiàn bù xiān', + 数黄道黑: 'shu huang dao hei', + 数黑论黄: 'shǔ hēi lùn huáng', + 数短论长: 'shǔ duǎn lùn cháng', + 数白论黄: 'shǔ bái lùn huáng', + 束缊还妇: 'shù yūn huán fù', + 束缊举火: 'shù yūn jǔ huǒ', + 束身自好: 'shù shēn zì hào', + 束蒲为脯: 'shù pú wéi pú', + 束带结发: 'shù dài jié fā', + 束椽为柱: 'shù chuán wéi zhù', + 书缺有间: 'shū quē yǒu jiàn', + 瘦骨梭棱: 'shòu gǔ léng léng', + 首足异处: 'shǒu zú yì chǔ', + 手足重茧: 'shǒu zú chóng jiǎn', + 手足异处: 'shǒu zú yì chǔ', + 手脚干净: 'shǒu jiǎo gàn jìng', + 手不应心: 'shǒu bù yīng xīn', + 螫手解腕: 'shì shǒu jǐe wǎn', + 释知遗形: 'shì shì yí xíng', + 适时应务: 'shì shí yīng wù', + 适如其分: 'shì rú qí fèn', + 适情率意: 'shì qíng shuài yì', + 适居其反: 'shì jú qí fǎn', + 适当其时: 'shì dāng qí shí', + 适当其冲: 'shì dāng qí chōng', + 饰非遂过: 'shì fēi suí guò', + 视为知己: 'shì wéi zhī jǐ', + 视为儿戏: 'shì wéi ér xì', + 视微知著: 'shì wēi zhī zhuó', + 事与心违: 'shì yù xīn wéi', + 使羊将狼: 'shǐ yáng jiàng láng', + 食为民天: 'shí wéi mín tiān', + 食不重味: 'shí bù chóng wèi', + 食不重肉: 'shí bù zhóng ròu', + 拾掇无遗: 'shi duo wu yi', + 拾带重还: 'shí dài zhòng huán', + 实与有力: 'shí yù yǒu lì', + 实偪处此: 'shí bèng chǔ cǐ', + 识微知著: 'shí wēi zhī zhuó', + 时运不齐: 'shí yùn bù jì', + 时亨运泰: 'shí hēng yùn tai', + 石英玻璃: 'shí yīng bō li', + 石室金匮: 'shí shì jīn guì', + 什袭珍藏: 'shí xí zhēn cáng', + 什袭以藏: 'shí xí yǐ cáng', + 什伍东西: 'shí wǔ dōng xī', + 什袭而藏: 'shí xī ér cáng', + 什围伍攻: 'shí wéi wǔ gōng', + 十魔九难: 'shí mó jiǔ nàn', + 十夫楺椎: 'shí fū zhī zhuī', + 十不当一: 'shí bù huò yī', + 诗书发冢: 'shī shū fà zhǒng', + 虱处裈中: 'shī chǔ kūn zhōng', + 师直为壮: 'shī zhí wéi zhuàng', + 失马塞翁: 'shī mǎ sài wēng', + 尸居龙见: 'shī jū lóng xiàn', + 盛水不漏: 'chéng shuǐ bù lòu', + 圣经贤传: 'shèng jīng xián zhuàn', + 圣君贤相: 'shèng jīng xián xiàng', + 生拖死拽: 'shēng tuō sǐ zhuāi', + 审曲面埶: 'shěn qǔ miàn xīn', + 审己度人: 'shěn jǐ duó rén', + 沈博绝丽: 'chén bó jué lì', + 神武挂冠: 'shén wǔ guà guàn', + 神龙失埶: 'shén lóng shī zhì', + 神号鬼哭: 'shén háo guǐ kū', + 神不收舍: 'shén bù shōu shě', + 深文周内: 'shēn wén zhōu nà', + 深文曲折: 'shēn wén qǔ shé', + 深切着明: 'shēn qiē zhe míng', + 深切着白: 'shēn qiē zhe bái', + 深厉浅揭: 'shēn lì qiǎn qì', + 深谷为陵: 'shēn gǔ wéi líng', + 深恶痛疾: 'shēn wù tòng jí', + 深恶痛嫉: 'shēn wù tòng jí', + 深仇宿怨: 'shēn chóu xiǔ yuàn', + 设心处虑: 'shè xīn chǔ lǜ', + 舍近务远: 'shě jìn wù yuǎn', + 舍己为公: 'shě jǐ wèi gōng', + 舍近即远: 'shě jìn jí yuǎn', + 舍短取长: 'shě duǎn qǔ cháng', + 舍策追羊: 'shě cè zhuī yáng', + 蛇蝎为心: 'shé xiē wéi xīn', + 少年老诚: 'shǎo nián lǎo chéng', + 少成若性: 'shào chéng ruò xìng', + 少不经事: 'shào bù jīng shì', + 上当学乖: 'shàng dāng xué guāi', + 赏不当功: 'shǎng bù dāng gōng', + 善自为谋: 'shàn zì wéi móu', + 善为说辞: 'shàn wéi shuō cí', + 善善恶恶: 'shàn shàn wù è', + 善贾而沽: 'shàn jià ér gū', + 善财难舍: 'shàn cái nán shě', + 扇枕温席: 'shān zhěn wēn xí', + 扇枕温被: 'shān zhěn wēn chuáng', + 苫眼铺眉: 'shān yǎn pū méi', + 讪牙闲嗑: 'shàn yá xián kē', + 山峙渊渟: 'shān zhì yuān zī', + 山阴乘兴: 'shān yīn chéng xīng', + 山殽野湋: 'shān yāo yě fù', + 山溜穿石: 'shān liù chuān shí', + 山节藻棁: 'shān jié zǎo lì', + 沙鸥翔集: 'sha ou xiang ji', + 杀衣缩食: 'shài yī suō shí', + 杀鸡为黍: 'shā jī wéi shǔ', + 色厉胆薄: 'sè lì dǎn bó', + 丧胆销魂: 'sàng hún xiāo hún', + 桑荫未移: 'sāng yīn wèi yí', + 桑荫不徙: 'sāng yīn bù xǐ', + 桑土绸缪: 'sāng tǔ chóu miù', + 桑户棬枢: 'sāng hù juàn shū', + 三战三北: 'sān zhān sān běi', + 三占从二: 'sān zhān cóng èr', + 三瓦两舍: 'sān wǎ liǎng shě', + 三人为众: 'sān rén wèi zhòng', + 三差五错: 'sān chā wǔ cuò', + 三差两错: 'sān chā liǎng cuò', + 三不拗六: 'sān bù niù liù', + 塞翁之马: 'sài wēng zhī mǎ', + 塞翁得马: 'sài wēng dé mǎ', + 塞井焚舍: 'sāi jǐng fén shě', + 洒心更始: 'sǎ xīn gèng shǐ', + 洒扫应对: 'sǎ sào yìng duì', + 软红香土: 'ruǎn hóng xiāng yù', + 入孝出弟: 'rù xiào chū tì', + 入吾彀中: 'rù wǔ gòu zhōng', + 入铁主簿: 'rù tiě zhǔ bù', + 入理切情: 'rù lǐ qiē qíng', + 汝成人耶: 'nu cheng ren ye', + 如水投石: 'rú shǔ tóu shí', + 如切如磋: 'rú qiē rú cuō', + 如登春台: 'rú dé chūn tái', + 肉薄骨并: 'ròu bó gǔ bìng', + 柔情绰态: 'róu qíng chuō tai', + 戎马劻勷: 'róng mǎ dān xiào', + 日朘月削: 'rì juān yuè xuē', + 日中为市: 'rì zhōng wéi shì', + 日中必湲: 'rì zhōng bì tóng', + 日月参辰: 'rì yuè shēn chén', + 日省月修: 'rì xǐng yuè xiū', + 日削月割: 'rì xuē yuè gē', + 日削月朘: 'rì xuē yuè juān', + 日省月试: 'rì xǐng yuè shì', + 日省月课: 'rì xǐng yuè kè', + 日不暇给: 'rì bù xiá jǐ', + 认贼为父: 'rèn zéi wéi fù', + 任达不拘: 'rèn láo bù jū', + 认影为头: 'rèn yǐng wéi tóu', + 认贼为子: 'rèn zéi wéi zǐ', + 人足家给: 'rén zú jiā jǐ', + 人言藉藉: 'rén yán jí jí', + 人模狗样: 'rén mú gǒu yàng', + 人莫予毒: 'rén mò yú dú', + 人给家足: 'rén jǐ jiā zú', + 热熬翻饼: 'rě áo fān bǐng', + 群居穴处: 'qún jū xué chǔ', + 却老还童: 'què lǎo huán tóng', + 权倾中外: 'quán qīng zhōng wai', + 圈牢养物: 'juàn láo yǎng wù', + 去太去甚: 'qù tai qù shèn', + 取予有节: 'qǔ yù yǒu jié', + 诎要桡腘: 'qū yào ráo yù', + 曲终奏雅: 'qǔ zhōng zòu yǎ', + 曲意迎合: 'qǔ yì yíng hé', + 曲意奉迎: 'qǔ yì fèng yíng', + 曲意承迎: 'qǔ yì chéng yíng', + 曲学阿世: 'qǔ xué ā shì', + 曲突移薪: 'qǔ tū yí xīn', + 曲眉丰颊: 'qǔ méi fēng jiá', + 曲肱而枕: 'qǔ gōng ér zhěn', + 秋实春华: 'qiū shí chūn huā', + 穷形尽相: 'qióng xíng jìn xiàng', + 穷年累世: 'qióng nián lěi shì', + 情凄意切: 'qíng qī yì qiē', + 情见埶竭: 'qíng jiàn zhōu jié', + 情见势屈: 'qíng xiàn shì qū', + 情见力屈: 'qíng xiàn lì qū', + 情见乎辞: 'qíng xiàn hū cí', + 清风劲节: 'qīng fēng jìng jié', + 清都绛阙: 'qīng dōu jiàng què', + 清辞丽曲: 'qīng cí lì qǔ', + 倾肠倒肚: 'qīng cháng dào dǔ', + 轻嘴薄舌: 'qīng zuǐ bó shé', + 轻傜薄赋: 'qīng yāo báo fù', + 轻骑简从: 'qīng jì jiǎn cóng', + 轻财好义: 'qīng cái hào yì', + 轻薄无知: 'qīng báo wú zhī', + 轻才好施: 'qīng cái hào shī', + 轻薄无礼: 'qīng báo wú lǐ', + 青紫被体: 'qīng zǐ pī tǐ', + 青林黑塞: 'qīng lín hēi sài', + 青红皁白: 'qīng hóng tóu bái', + 寝苫枕干: 'qǐn shān zhěn gàn', + 螓首蛾眉: 'qín shǒu ér méi', + 擒奸擿伏: 'qín jiān fā fú', + 琴瑟之好: 'qí sè zhī hǎo', + 挈瓶之知: 'qiè píng zhī zhì', + 且住为佳: 'qiě zhù wéi jiā', + 切树倒根: 'qiē shù dǎo gēn', + 切理餍心: 'qiē lǐ yàn xīn', + 切理厌心: 'qiē lǐ yàn xīn', + 切理会心: 'qiē lǐ huì xīn', + 切近的当: 'qiē jìn de dāng', + 切瑳琢磨: 'qiē cùn zhuó mó', + 翘足引领: 'qiáo zú yǐn lǐng', + 翘足而待: 'qiáo zú ér dài', + 巧发奇中: 'qiǎo fā qí zhòng', + 抢地呼天: 'qiāng dì hū tiān', + 强嘴拗舌: 'jiàng zuǐ niù shé', + 强自取折: 'qiáng zì qǔ shé', + 强直自遂: 'qiáng zhí zì suí', + 强文浉醋: 'qiǎng wén jiǎ cù', + 强文假醋: 'qiǎng wén jiǎ cù', + 强死强活: 'qiǎng sǐ qiǎng huó', + 强死赖活: 'qiǎng sǐ lài huó', + 强食自爱: 'qiǎng shí zì ài', + 强食靡角: 'qiǎng shí mí jiǎo', + 强识博闻: 'qiǎng shí bó wén', + 强弓劲弩: 'qiáng gōng jìng nǔ', + 强聒不舍: 'qiǎng guō bù shě', + 强凫变鹤: 'qiǎng fú biàn hè', + 强而后可: 'qiǎng ér hòu kě', + 强词夺正: 'qiǎng cí duó zhèng', + 强得易贫: 'qiǎng dé yì pín', + 遣兴陶情: 'qiǎn xìng táo qíng', + 遣将调兵: 'qiǎn jiāng diào bīng', + 遣兵调将: 'qiǎn bīng diào jiàng', + 前跋后疐: 'qián bá hòu máo', + 搴旗斩将: 'qiān qí zhǎn jiàng', + 搴旗取将: 'qiān qí qǔ jiàng', + 牵羊担酒: 'qiān yáng dàn jiǔ', + 牵强附合: 'qiān qiáng fù hé', + 千姿万态: 'qiān zī wàn tai', + 千状万态: 'qiān zhuàng wàn tai', + 千载一合: 'qiān zài yī hé', + 千载一弹: 'qiān zǎi yī dàn', + 千态万状: 'qiān tai wàn zhuàng', + 千磨百折: 'qiān mó bǎi shé', + 千了万当: 'qiān le wàn dàng', + 千了百当: 'qiān liǎo bǎi dàng', + 千古绝调: 'qiān gǔ jué diào', + 泣下如雨: 'qǐ xià rú yǔ', + 弃之度外: 'qì zhī dù wai', + 气克斗牛: 'qì kè dǒu niú', + 起偃为竖: 'qǐ yǎn wéi shù', + 岂弟君子: 'kǎi tì jūn zǐ', + 綦溪利跂: 'qí xī lì guì', + 棋输先着: 'qí shū xiān zhāo', + 棋输先著: 'qí shū xiān zhuó', + 奇葩异卉: 'qí pā yì hùi', + 齐王舍牛: 'qí wáng shě niú', + 齐量等观: 'qí liàng děng guān', + 欺天诳地: 'qī tiān kuāng dì', + 栖风宿雨: 'qī fēng xiǔ yǔ', + 妻梅子鹤: 'qī mén zǐ hè', + 妻儿老少: 'qī ér lǎo shǎo', + 普天率土: 'pǔ tiān shuài tǔ', + 铺胸纳地: 'pū xiōng nà dì', + 铺眉苫眼: 'pū méi shàn yǎn', + 铺眉蒙眼: 'pū méi méng yǎn', + 铺锦列绣: 'pū jǐn liè xiù', + 破矩为圆: 'pò jǔ wéi yuán', + 破镜重合: 'pò jìng zhòng hé', + 破家为国: 'pò jiā wéi guó', + 破觚为圜: 'pò gū wéi yuán', + 破愁为笑: 'pò chóu wéi xiào', + 瓶坠簪折: 'píng zhùi zān zhé', + 萍飘蓬转: 'píng piāo péng zhuàn', + 帡天极地: 'jú tiān jí dì', + 屏声息气: 'bǐng shēng xī qì', + 屏气吞声: 'bǐng qì tūn shēng', + 凭几据杖: 'píng jī jù zhàng', + 娉婷婀娜: 'pīng tíng ē nà', + 品竹调弦: 'pǐn zhú diào xián', + 贫嘴薄舌: 'pín zuǐ bó shé', + 骈肩累足: 'pián jiān lěi zú', + 骈肩累迹: 'pián jiān lěi jì', + 翩翩年少: 'piān piān nián shǎo', + 片语只辞: 'piàn yán zhǐ cí', + 片鳞半爪: 'piàn lín bàn zhǎo', + 片甲不还: 'piàn jiǎ bù huán', + 披发缨冠: 'pī fā yīng guàn', + 披发文身: 'pī fà wén shēn', + 批砉导窾: 'pī huā dǎo táo', + 批隙导窾: 'pī xì dǎo yín', + 批吭捣虚: 'pī háng dǎo xū', + 批风抹月: 'pī fēng mò yuè', + 烹龙炮凤: 'pēng lóng páo fèng', + 炰鳖脍鲤: 'fèng biē kuài lǐ', + 炮凤烹龙: 'páo fèng pēng lóng', + 旁指曲谕: 'páng zhǐ qǔ yù', + 旁引曲证: 'páng yǐn qǔ zhèng', + 旁通曲畅: 'páng tōng qǔ chàng', + 庞眉皓发: 'páng méi hào fà', + 攀花折柳: 'pān huā shé liǔ', + 攀蟾折桂: 'pān chán shé guì', + 女大难留: 'nǚ dà nán liú', + 女长须嫁: 'nǚ zhǎng xū jià', + 女长当嫁: 'nǚ zhǎng dāng jià', + 弄竹弹丝: 'nòng zhú dàn sī', + 弄玉吹箫: 'nòng yù chuí xiāo', + 弄管调弦: 'nòng guǎn diào xián', + 弄粉调朱: 'nòng fěn diào zhū', + 弄兵潢池: 'nòng bīng huáng shi', + 浓装艳抹: 'nóng zhuāng yàn mò', + 浓抹淡妆: 'nóng mò dàn zhuāng', + 扭转干坤: 'niǔ zhuǎn gàn kūn', + 扭直作曲: 'niǔ zhí zuò qū', + 牛骥同皁: 'niú jì tóng wěn', + 宁缺勿滥: 'nìng quē wù làn', + 啮血为盟: 'niè xuè wéi méng', + 捻土为香: 'niǎn tǔ wéi xiāng', + 年谊世好: 'nián yì shì hào', + 年华垂暮: 'nián huá thuí mù', + 儗不于伦: 'lǐ bù yú lún', + 泥名失实: 'nì míng shī shí', + 泥而不滓: 'niè ér bù zǐ', + 能者为师: 'néng zhě wéi shī', + 能不称官: 'néng bù chèn guān', + 挠直为曲: 'náo zhí wéi qū', + 囊萤照读: 'náng yíng zhào shū', + 难进易退: 'nan jin yi tui', + 难乎为继: 'nán hū wéi jì', + 难乎为情: 'nán hū wéi qíng', + 难更仆数: 'nán gēng pú shǔ', + 难得糊涂: 'nán dé hú tú', + 南蛮鴂舌: 'nán mán xiāng shé', + 南贩北贾: 'nán fàn běi gǔ', + 内修外攘: 'nèi xiū wai rǎng', + 内柔外刚: 'nèi róu wai gāng', + 内峻外和: 'nèi jùn wai hé', + 拿腔作调: 'ná qiāng zuò diào', + 拿粗夹细: 'ná cū jiā xì', + 慕古薄今: 'mù gǔ bó jīn', + 牧猪奴戏: 'mù zhòu nú xì', + 沐猴衣冠: 'mù hóu yī guàn', + 目眢心忳: 'mù yuān xīn wǎng', + 目挑心招: 'mù tiǎo xīn zhāo', + 目空余子: 'mù kōng yú zǐ', + 目量意营: 'mù liàng yì yíng', + 目瞪舌彊: 'mù dèng shé jiàng', + 木头木脑: 'mù tóu mù nǎo', + 木干鸟栖: 'mù gàn niǎo qī', + 侔色揣称: 'móu sè chuǎi chèn', + 莫知所为: 'mò zhī suǒ wéi', + 莫予毒也: 'mò yù dú yě', + 莫为已甚: 'mò wéi yǐ shèn', + 抹月秕风: 'mǒ yuè pī fēng', + 抹粉施脂: 'mò fěn shī zhī', + 磨砻镌切: 'mó lóng juān qiē', + 磨棱刓角: 'mó léng liǎng jiǎo', + 摸头不着: 'mō tóu bù zháo', + 摸门不着: 'mō mén bù zháo', + 摸不着边: 'mō bù zhuó biān', + 命中注定: 'mìng zhōng zhù dìng', + 鸣鹤之应: 'míng hè zhī yīng', + 鸣凤朝阳: 'míng fèng zhāo yáng', + 明效大验: 'míng xiào dà yà', + 名我固当: 'ming wo gu dang', + 灭景追风: 'miè yǐng zhuī fēng', + 邈处欿视: 'miǎo chǔ jī shì', + 面折庭争: 'miàn shé tíng zhēng', + 俛拾地芥: 'bì shí dì jiè', + 俛首帖耳: 'mǎ shǒu tiē ěr', + 黾穴鸲巢: 'měng xué qú cháo', + 绵力薄材: 'mián lì bó cái', + 绵里薄材: 'mián lǐ bó cái', + 靡有孑遗: 'mǐ yǒu jié yí', + 靡衣媮食: 'mǐ yī tōu shí', + 靡衣偷食: 'mǐ yī tōu shí', + 靡然从风: 'mǐ rán cóng fēng', + 靡靡之乐: 'mǐ mǐ zhī yuè', + 迷恋骸骨: 'mí liàn hài gǔ', + 蒙头转向: 'mēng tóu zhuàn xiàng', + 闷海愁山: 'mèn hǎi chóu shān', + 扪参历井: 'mén shēn lì jǐng', + 门单户薄: 'mén dān hù bó', + 昧旦晨兴: 'mèi dàn chún xīng', + 没衷一是: 'mò zhōng yī shì', + 没金饮羽: 'mò jīn yǐn yǔ', + 冒名接脚: 'mào míng jiě jiǎo', + 毛头小子: 'máo tóu xiǎo zi', + 毛遂堕井: 'máo suí duò jǐng', + 毛发耸然: 'máo fā sǒng rán', + 毛发倒竖: 'máo fā dǎo shù', + 毛发不爽: 'máo fā bù shuǎng', + 猫鼠同处: 'māo shǔ tóng chǔ', + 尨眉皓发: 'máng méi hào fà', + 漫天遍地: 'màn shān biàn dì', + 脉脉相通: 'mài mài xiāng tōng', + 卖文为生: 'mài wén wéi shēn', + 卖李钻核: 'mài lǐ zuān hé', + 买椟还珠: 'mǎi dú huán zhū', + 埋天怨地: 'mán tiān yuàn dì', + 埋三怨四: 'mán sān yuàn sì', + 马上房子: 'mǎ shàng fáng zi', + 马入华山: 'mǎ rù huá shān', + 落魄江湖: 'luò pò jīng hú', + 落魄不偶: 'luo tuo bu ou', + 落魄不羁: 'luò pò bù jī', + 落落难合: 'luò luò nán hé', + 落草为寇: 'luò cǎo wéi kòu', + 裸裎袒裼: 'luǒ chéng tǎn xī', + 罗织构陷: 'luò zhī gòu xiàn', + 捋袖揎拳: 'luō xiù xuān quán', + 论黄数黑: 'lùn huáng shǔ hēi', + 乱作胡为: 'luàn zuò hú wéi', + 乱箭攒心: 'luàn jiàn cuán xīn', + 鸾凤和鸣: 'luán fèng hè míng', + 绿叶成荫: 'lǜ yè chéng yīn', + 绿女红男: 'lǜ nǚ hóng nán', + 率由旧章: 'shuài yóu jiù zhāng', + 率由旧则: 'shuài yóu jiù zé', + 率以为常: 'shuài yǐ wéi cháng', + 率土宅心: 'shuài tǔ zhái xīn', + 率土同庆: 'shuài tǔ tóng qìng', + 率兽食人: 'shuài shòu shí rén', + 率土归心: 'shuài tǔ guī xīn', + 率马以骥: 'shuài mǎ yǐ jì', + 率尔成章: 'shuài ěr chéng zhāng', + 履薄临深: 'lǚ bó lín shēn', + 鲁斤燕削: 'lǔ jīn yàn xuē', + 露面抛头: 'lù miàn pāo tóu', + 漏尽更阑: 'lòu jìn gēng lán', + 笼鸟槛猿: 'lóng niǎo jiàn yuán', + 笼鸟池鱼: 'lóng niǎo shi yú', + 龙游曲沼: 'long you qu zhao', + 龙血玄黄: 'lóng xuě xuán huáng', + 龙雕凤咀: 'lóng diāo fèng jǔ', + 六神不安: 'liù shén bǔ ān', + 六尺之讬: 'liù chǐ zhī quàn', + 柳巷花街: 'liǔ xiòng huā jiē', + 柳街花巷: 'liǔ jiē huā xiòng', + 柳骨颜筋: 'jiǔ gǔ yán jīn', + 流离颠疐: 'liú lí diān shǔ', + 令原之戚: 'líng yuán zhī qī', + 令人捧腹: 'lìng rén pěng fǔ', + 陵劲淬砺: 'líng jìng cuì lì', + 临难不惧: 'lín nàn bù jǔ', + 临敌易将: 'lín dí yì jiàng', + 裂裳衣疮: 'liè sháng yī chuāng', + 裂裳裹足: 'liè cháng guǒ zú', + 裂冠毁冕: 'liè guàn huǐ miǎn', + 埒才角妙: 'liè cái jué miào', + 了无惧色: 'liǎo wū jǔ sè', + 了身达命: 'liǎo shēn dá mìng', + 了然无闻: 'le rán wú wén', + 了不可见: 'liǎo bù kě jiàn', + 了不长进: 'liǎo bù zhǎng jǐn', + 燎如观火: 'liǎo rú guān huǒ', + 燎发摧枯: 'liǎo fà cuī kū', + 量小力微: 'liàng xiǎo lì wēi', + 量时度力: 'liàng shí dù lì', + 量枘制凿: 'liàng ruì zhì záo', + 量入计出: 'liàng rù jì chū', + 量如江海: 'liàng rú jiāng hǎi', + 量力度德: 'liàng lì duó dé', + 量金买赋: 'liàng jīn mǎi fù', + 量己审分: 'liàng jǐ shěn fēn', + 量材录用: 'liàng cái lù yòng', + 量才器使: 'liàng cái qì shǐ', + 量才而为: 'liàng cái ér wéi', + 梁孟相敬: 'liáng mèng xiāng jìn', + 恋恋难舍: 'liàn liàn nán shě', + 敛声屏息: 'liǎn shēng bǐng xī', + 敛骨吹魂: 'liǎn gǔ chuí hún', + 联篇累牍: 'lián piān lěi dú', + 连编累牍: 'lián biān lěi dú', + 詈夷为跖: 'lì yí wéi zhí', + 利令志惛: 'lì lìng zhì zào', + 历精为治: 'lì jīng wéi zhì', + 历精更始: 'lì jīng gèng shǐ', + 哩哩罗罗: 'li li luō luō', + 李广不侯: 'lǐ guǎng bù hòu', + 礼为情貌: 'lǐ wéi qíng mào', + 礼让为国: 'lǐ ràng wéi guó', + 礼坏乐崩: 'lǐ huài yuè bēng', + 犁庭扫闾: 'lí tíng sǎo lǚ', + 犁生骍角: 'lí shēng yuè jiǎo', + 犁牛骍角: 'lí niú mài jiǎo', + 离山调虎: 'lí shān diào hǔ', + 离本趣末: 'lí běn qū mò', + 离本徼末: 'lí běn yāo mò', + 楞眉横眼: 'lèng méi héng yǎn', + 擂天倒地: 'léi tiān dǎo dì', + 累足成步: 'lěi zú chéng bù', + 累月经年: 'lěi yuè jīng nián', + 累屋重架: 'lěi wū chóng jià', + 累瓦结绳: 'lěi wǎ jié shéng', + 累土至山: 'lěi tǔ zhì shān', + 累土聚沙: 'lěi tǔ jù shā', + 累苏积块: 'lěi sū jī kuài', + 累卵之危: 'lěi luǎn zhī wēi', + 累累如珠: 'lěi lěi rú zhū', + 累块积苏: 'lěi kuài jī sū', + 累教不改: 'lěi jiào bù gǎi', + 累牍连篇: 'lěi dú lián piān', + 乐山乐水: 'yào shān yào shuǐ', + 潦原浸天: 'lǎo yuán jìn tiān', + 老师宿儒: 'lǎo shī xiǔ rú', + 牢什古子: 'láo shí gǔ zi', + 琅嬛福地: 'láng huán fú dì', + 狼号鬼哭: 'láng háo guǐ kū', + 狼飡虎咽: 'láng cān hǔ yān', + 阑风长雨: 'lán fēng zhàng yǔ', + 拉枯折朽: 'lā kū shé xiǔ', + 揆情度理: 'kuí qíng duó lǐ', + 揆理度情: 'kuí lǐ duó qíng', + 窥间伺隙: 'kuī jiàn sì xì', + 旷日累时: 'kuàng rì lěi shí', + 匡救弥缝: 'kuāng jiù mí fèng', + 枯树生华: 'kū shù shēng huā', + 口轻舌薄: 'kǒu qīng shé bó', + 口角生风: 'kǒu jiǎo shēng fēng', + 口角春风: 'kǒu jiǎo chūn fēng', + 口角风情: 'kǒu jiǎo fēng qíng', + 口干舌焦: 'kǒu gàn shé jiāo', + 口腹之累: 'kǒu fù zhī lěi', + 口出大言: 'kǒu chū dā yán', + 空腹便便: 'kōng fù pián pián', + 嗑牙料嘴: 'kē yá liào zuǐ', + 刻木为吏: 'kè mù wéi lì', + 刻木为鹄: 'kè mù wéi hú', + 咳珠唾玉: 'ké zhū tuò yù', + 咳唾成珠: 'ké tuò chéng zhū', + 抗颜为师: 'kàng yán wéi shī', + 糠豆不赡: 'kang dou bu shan', + 开华结果: 'kāi huā jié guǒ', + 峻阪盐车: 'jùn bǎn yún chē', + 攫为己有: 'jué wéi jǐ yǒu', + 嚼铁咀金: 'jiáo tiě jǔ jīn', + 嚼墨喷纸: 'jué mò pēn zhǐ', + 倔头强脑: 'juè tóu jiàng nǎo', + 倔头倔脑: 'juè tou juè nǎo', + 倦鸟知还: 'juàn niǎo zhī huán', + 卷席而葬: 'juǎn xí ér zàng', + 卷旗息鼓: 'juǎn qí xī gǔ', + 卷甲倍道: 'juǎn jiǎ bèi dào', + 聚米为山: 'jù mǐ wéi shān', + 聚米为谷: 'jù mǐ wéi gǔ', + 锯牙钩爪: 'jù yá gōu zhǎo', + 举手相庆: 'jǔ shǒu xiāng qìng', + 举世混浊: 'jǔ shì hún zhuó', + 鞫为茂草: 'jū wéi mào cǎo', + 鞠为茂草: 'jū wéi mào cǎo', + 拘神遣将: 'jū shén qiǎn jiàng', + 居轴处中: 'jū zhóu chǔ zhōng', + 居下讪上: 'jú xià shàn shàng', + 居不重茵: 'jū bù chóng yīn', + 居不重席: 'jū bù chóng xí', + 旧事重提: 'jiù shì zhòng tí', + 旧调重弹: 'jiù diào chóng tán', + 灸艾分痛: 'jiù ài fēn tòng', + 久要不忘: 'jiǔ yāo bù wàng', + 九转功成: 'jiǔ zhuàn gōng chéng', + 九蒸三熯: 'jiǔ zhēng sān shēng', + 敬业乐群: 'jìng yè yào qún', + 井底虾蟆: 'jǐng dǐ xiā má', + 旌旗卷舒: 'jīng qí juǎn shū', + 惊魂落魄: 'jīng hún luò pò', + 荆棘载途: 'jīng jí zài tú', + 荆棘塞途: 'jīng jí sè tú', + 经纶济世: 'jing lun ji shi', + 禁舍开塞: 'jìn shě kāi sāi', + 祲威盛容: 'lóng wēi shèng róng', + 进退中度: 'jìn tuì zhòng dù', + 进退消长: 'jìn tuì xiāo cháng', + 进退应矩: 'jìn tuì yīng jǔ', + 进退触籓: 'jìn tuì chù zǔ', + 进退出处: 'jìn tuì chū chǔ', + 进退跋疐: 'jìn tuì bá zǔ', + 进寸退尺: 'jǐn cùn tuì chǐ', + 尽多尽少: 'jǐn duō jǐn shǎo', + 锦囊还矢: 'jǐn náng huán shǐ', + 矜名嫉能: 'jīn míng jì néng', + 矜己自饰: 'jīn jǐ zhì shì', + 矜功负气: 'jīn gōng fǔ qì', + 津关险塞: 'jīn guān xiǎn sài', + 金吾不禁: 'jīn wú bù jìn', + 金匮石室: 'jīn guì shí shì', + 金翅擘海: 'jīn chì bāi hǎi', + 戒奢宁俭: 'jiè shē nìng jiān', + 解衣衣人: 'jiè yī yī rén', + 解人难得: 'jiě rén nán dé', + 解铃系铃: 'jiě líng jì líng', + 解发佯狂: 'jiě fà yáng kuáng', + 截铁斩钉: 'jié tiě zhǎn dìng', + 诘屈謷牙: 'jié qū dà yá', + 诘屈磝碻: 'jié qū bìng zhòu', + 诘曲聱牙: 'jié qǔ áo yá', + 教一识百: 'jiāo yī shí bǎi', + 教猱升木: 'jiāo náo shēng mù', + 较瘦量肥: 'jiào shòu liàng féi', + 矫矫不群: 'jiǎo jiǎo bù qùn', + 矫国更俗: 'jiǎo guó gēng sú', + 皎阳似火: 'jiǎo yáng shì huǒ', + 挢抂过正: 'jiǎo kuāng guò zhèng', + 角立杰出: 'jiao li jie chu', + 焦沙烂石: 'jiāo shā shí làn', + 焦唇干舌: 'jiāo chún gàn shé', + 骄泰淫泆: 'jiāo tai yín zhuàng', + 骄奢淫泆: 'jiāo shē yín yí', + 骄儿騃女: 'jiāo ér bā nǚ', + 浇风薄俗: 'jiāo fēng bó sú', + 降妖捉怪: 'xiáng yāo zhuō guài', + 将遇良材: 'jiàng yù liáng cái', + 将取固予: 'jiāng qǔ gū yǔ', + 将门有将: 'jiàng mén yǒu jiàng', + 将功折过: 'jiāng gōng shé guò', + 将夺固与: 'jiāng duó gū yǔ', + 将伯之助: 'qiāng bó zhī zhù', + 将伯之呼: 'qiāng bó zhī hū', + 槛花笼鹤: 'jiàn huā lóng hè', + 鉴影度形: 'jiàn yǐng duó xíng', + 渐不可长: 'jiàn bù kě zhǎng', + 剑首一吷: 'jiàn shǒu yī guī', + 见义敢为: 'jiàn yì gǎn wéi', + 见义当为: 'jiàn yì dāng wéi', + 见义必为: 'jiàn yì bì wéi', + 见素抱朴: 'xiàn sù bào pǔ', + 见弃于人: 'jiàn qì yǔ rén', + 见几而作: 'jiàn jī ér zuò', + 见弹求鸮: 'jiàn dàn qiú háo', + 简丝数米: 'jiǎn sī shǔ mǐ', + 俭不中礼: 'jiǎn bù zhòng lǐ', + 间见层出: 'jiàn xiàn céng chū', + 间不容息: 'jiàn bù róng xī', + 间不容瞚: 'jiān bù róng xǐ', + 尖嘴薄舌: 'jiān zuǐ bó shé', + 假洋鬼子: 'jiǎ yáng guǐ zi', + 甲冠天下: 'jiǎ guàn tiān xià', + 葭莩之亲: 'jiā fú zhī qīn', + 家无担石: 'jiā wú dàn shí', + 家累千金: 'jiā lèi qiān jīn', + 家给人足: 'jiā jǐ rén zú', + 家给民足: 'jiā jǐ mín zú', + 家道从容: 'jiā dào cōng róng', + 家长礼短: 'jiā cháng lǐ duǎn', + 夹枪带棍: 'jiā qiāng dài gùn', + 夹袋人物: 'jiā dài rén wù', + 霁风朗月: 'jī fēng lǎng yuè', + 寄兴寓情: 'jì xìng yù qíng', + 纪纲人论: 'jì gāng rén lún', + 计深虑远: 'jì shēng lǜ yuǎn', + 计功量罪: 'jì gōng liàng zuì', + 掎裳连襼: 'jǐ shang lián zhēng', + 虮虱相吊: 'jǐ shī xiēng diào', + 几不欲生: 'jī bù yù shēng', + 集腋为裘: 'jí yè wéi qiú', + 疾不可为: 'jí bù kě wéi', + 急脉缓灸: 'jí mài huǎn jiù', + 急景凋年: 'jí yǐng diāo nián', + 急公好施: 'jí gōng hào shī', + 极深研几: 'jí shēn yán jī', + 及宾有鱼: 'jí bīn yoǔ yú', + 激薄停浇: 'jī bó tíng jiāo', + 稽古揆今: 'jī gǔ zhèn jīn', + 赍志而没: 'jī zhì ér mò', + 积铢累寸: 'jī zhū lěi cùn', + 积岁累月: 'jī suì lěi yuè', + 积素累旧: 'jī sù lěi jiù', + 积时累日: 'jī shí lěi rì', + 积日累岁: 'jī rì lěi suì', + 积日累月: 'jī rì lěi yuè', + 积日累久: 'jī rì lěi jiǔ', + 积年累岁: 'jī nián lěi suì', + 积露为波: 'jī lù wéi bō', + 积德累仁: 'jī dé lěi rén', + 积德累善: 'jī dé lěi shàn', + 积德累功: 'jī dé lěi gōng', + 积谗糜骨: 'jī chán méi gǔ', + 鸡皮鹤发: 'jī pí hè fà', + 饥寒交切: 'jī hán jiāo qiē', + 饥冻交切: 'jī dòng jiāo qiē', + 击排冒没: 'jī pái mào mò', + 祸为福先: 'huò wéi fú xiān', + 祸福相依: 'huò fú xiāng yī', + 祸福相生: 'huò fú xiāng shēng', + 获隽公车: 'huò jūn gōng chē', + 货而不售: 'huo er bu shou', + 混应滥应: 'hùn yīng làn yīng', + 魂飞魄丧: 'hún fēi pò sāng', + 魂不着体: 'hún bù zhuó tǐ', + 魂不著体: 'hún bù zhuó tǐ', + 浑抡吞枣: 'hún lún tūn zǎo', + 昏迷不省: 'hūn mí bù xǐng', + 昏镜重磨: 'hūn jìng chóng mó', + 昏镜重明: 'hūn jìng chóng míng', + 昏定晨省: 'hūn dìng chén xǐng', + 毁舟为杕: 'huǐ zhōu wéi duò', + 毁钟为铎: 'huǐ zhōng wéi duó', + 毁冠裂裳: 'huǐ guān liè cháng', + 晦盲否塞: 'huì máng pǐ sè', + 诲人不惓: 'huì rén bù tiě', + 悔过自责: 'huǐ guò zì zè', + 回船转舵: 'huí chuán zhǎn duò', + 潢池盗弄: 'huáng shi dào nòng', + 黄冠野服: 'huáng guàn yě fú', + 黄冠草履: 'huáng guàn cǎo lǚ', + 黄冠草服: 'huáng guàn cǎo fú', + 黄发儿齿: 'huáng fà ér chǐ', + 黄发垂髫: 'huáng fà chuí tiáo', + 还珠合浦: 'huán zhū hé pǔ', + 还珠返璧: 'huán zhū fǎn bì', + 还元返本: 'huán yuán fǎn běn', + 还朴反古: 'huán pǔ fǎn gǔ', + 还年驻色: 'huán nián zhù sè', + 还年却老: 'huán nián què lǎo', + 还年卻老: 'huán nián què lǎo', + 还醇返朴: 'huán chún fǎn pǔ', + 还淳返朴: 'huán chún fǎn pǔ', + 还淳反素: 'huán chún fǎn sù', + 还淳反朴: 'huán chún fǎn pǔ', + 还淳反古: 'huán chún fǎn gǔ', + 坏裳为裤: 'huài shang wéi kù', + 槐南一梦: 'huái nán yī mēng', + 画蛇著足: 'huà shé zhuó zú', + 画地为狱: 'huà dì wéi yù', + 画荻和丸: 'huà dí huò wán', + 化枭为鸠: 'huà xiāo wéi jiū', + 化零为整: 'huà líng wéi zhěng', + 化腐为奇: 'huà fǔ wéi qí', + 化鸱为凤: 'huà chī wéi fèng', + 华亭鹤唳: 'huà tíng hè lì', + 花攒锦聚: 'huā cuán jǐn jù', + 花攒锦簇: 'huā cuán jǐn cù', + 花簇锦攒: 'huā cù jǐn cuán', + 花不棱登: 'huā bù lēng dēng', + 户限为穿: 'hù xiàn wéi chuān', + 胡作乱为: 'hú zuò luàn wéi', + 胡作胡为: 'hú zuò hú wéi', + 胡思乱量: 'hú sī luàn liàng', + 呼天吁地: 'hū tiān yù dì', + 呼卢喝雉: 'hū lú hè zhì', + 呼来喝去: 'hū lái hè qù', + 呼不给吸: 'hū bù jǐ xī', + 厚味腊毒: 'hòu wèi xī dú', + 厚今薄古: 'hòu jīn bó gǔ', + 厚德载物: 'hòu dé zài wù', + 鸿泥雪爪: 'hóng ní xuě zhǎo', + 鸿渐于干: 'hóng jiàn yú gàn', + 鸿飞雪爪: 'hóng fēi xuě zhǎo', + 洪炉燎发: 'hóng lú liáo fà', + 红绳系足: 'hóng shéng jì zú', + 红不棱登: 'hóng bù lēng dēng', + 衡石量书: 'héng shí liàng shū', + 横征苛役: 'hèng zhēng kē yì', + 横征苛敛: 'hèng zhēng kē liǎn', + 横征暴赋: 'hèng zhēng bào fù', + 横灾飞祸: 'hèng zāi fēi huò', + 横殃飞祸: 'hèng yāng fēi huò', + 横无忌惮: 'hèng wú jì dàn', + 横拖倒拽: 'héng tuō dào zhuāi', + 横抢硬夺: 'hèng qiǎng yìng duó', + 横抢武夺: 'hèng qiǎng wǔ duó', + 横科暴敛: 'hèng kē bào liǎn', + 横恩滥赏: 'hèng ēn làn shǎng', + 恨海难填: 'hèn hǎi nán tián', + 黑更半夜: 'hēi gēng bàn yè', + 鹤发松姿: 'hè fà sōng zī', + 鹤发鸡皮: 'hè fà jī pí', + 鹤处鸡群: 'hè chǔ jī qún', + 涸思干虑: 'hé sī qián lǜ', + 河涸海干: 'hé hé hǎi qián', + 和颜说色: 'hé yán yuè sè', + 何所不为: 'hé suǒ bù wéi', + 合浦还珠: 'hé pǔ huán zhū', + 合两为一: 'hé liǎng wéi yī', + 合从连衡: 'hé zòng lián héng', + 浩浩汤汤: 'hào hào shāng shāng', + 号咷大哭: 'háo táo dà kū', + 号寒啼饥: 'háo hán tí jī', + 好勇斗狠: 'hào yǒng dòu hěn', + 好佚恶劳: 'hǎo yì wù láo', + 好问则裕: 'hào wèn zé yù', + 好为事端: 'hào wéi shì duān', + 好问决疑: 'hào wèn jué yí', + 好生之德: 'hào shēng zhī dé', + 好善乐施: 'hào shàn lè shī', + 好善恶恶: 'hǎo shàn wù è', + 好骑者堕: 'hào qí zhě duò', + 好奇尚异: 'hǎo qí shàng yì', + 好谋善断: 'hào móu shàn duàn', + 好恶不同: 'hǎo è bù tóng', + 好丹非素: 'hào dān fēi sù', + 豪干暴取: 'háo gàn bào qǔ', + 毫发不爽: 'háo fà bù shuǎng', + 寒酸落魄: 'hán suān luò pò', + 邯郸重步: 'hán dān zhóng bù', + 含英咀华: 'hán yīng jǔ huá', + 含商咀征: 'hán shāng jǔ zhēng', + 含菁咀华: 'hán jīng jǔ huá', + 含糊不明: 'hán hú bù míng', + 含垢藏疾: 'hán gǒu cáng jí', + 含宫咀征: 'hán gōng jǔ zhēng', + 过隙白驹: 'guò xī bái jū', + 过为已甚: 'guò wéi yǐ shèn', + 桂折一枝: 'guì shé yī zhī', + 桂折兰摧: 'guì shé lán cuī', + 规重矩叠: 'guī chóng jǔ dié', + 规旋矩折: 'guī xuán jǔ shé', + 广文先生: 'guǎng wén xiān sheng', + 广譬曲谕: 'guǎng pì qǔ yù', + 广陵散绝: 'guǎng líng sǎn jué', + 冠山戴粒: 'guàn shān dài lì', + 冠绝一时: 'guàn jué yī shí', + 冠屦倒施: 'guàn jù dǎo shī', + 官官相为: 'guān guān xiāng wéi', + 关情脉脉: 'guān qíng mài mài', + 挂席为门: 'guà xí wéi mén', + 寡见鲜闻: 'guǎ jiàn xiǎn wén', + 瓜葛相连: 'guā gě xiāng lián', + 顾曲周郎: 'gù qǔ zhōu láng', + 顾景惭形: 'gù yǐng cán xíng', + 故态复还: 'gù tài fù huán', + 鼓吻奋爪: 'gǔ wěn fèn zhǎo', + 鼓唇咋舌: 'gǔ chún zǎ shé', + 古调单弹: 'gǔ diào dān tán', + 古调不弹: 'gǔ diào bù tán', + 沽名干誉: 'gū míng gàn yù', + 孤独矜寡: 'gū dú guān guǎ', + 姑射神人: 'gū yè shén rén', + 苟合取容: 'gǒu hé qǔ ān', + 狗续侯冠: 'gǒu xù hòu guàn', + 钩爪锯牙: 'gōu zhǎo jù yá', + 共枝别干: 'gòng zhī bié gàn', + 共为唇齿: 'gòng wéi chún chǐ', + 拱手而降: 'gǒng shòu ér xiáng', + 拱肩缩背: 'gǒng jān suō bèi', + 功薄蝉翼: 'gōng bó chán yì', + 弓调马服: 'gōng diào mǎ fú', + 更姓改物: 'gēng xìng gǎi wù', + 更弦易辙: 'gēng xián yì zhé', + 更弦改辙: 'gēng xián gǎi zhé', + 更仆难终: 'gēng pú nán zhōng', + 更仆难数: 'gēng pú nán shǔ', + 更难仆数: 'gēng nán pú shù', + 更令明号: 'gēng lìng míng hào', + 更阑人静: 'gēng lán rén jǐng', + 更待干罢: 'gèng dài gàn bà', + 更唱叠和: 'gēng chàng dié hé', + 更唱迭和: 'gēng chàng dié hé', + 更长梦短: 'gēng cháng mèng duǎn', + 亘古奇闻: 'gèn gǔ qī wén', + 根生土长: 'gēn shēn tǔ zhǎng', + 各色名样: 'gè sè gè yàng', + 格格不纳: 'gē gē bù nà', + 格格不吐: 'gē gē bù tǔ', + 歌莺舞燕: 'gē yíng wǔ yàn', + 告朔饩羊: 'gù shuò xì yáng', + 告老还家: 'gào lǎo huán jiā', + 膏唇岐舌: 'gào chún qí shé', + 膏唇贩舌: 'gào chún fàn shé', + 膏车秣马: 'gào chē mò mǎ', + 高义薄云: 'gāo yì bó yún', + 高风劲节: 'gāo fēng jìng jié', + 岗头泽底: 'gāng tóu zé dǐ', + 敢为敢做: 'gǎn wéi gǎn zuò', + 竿头日上: 'gān tóu rí shàng', + 甘分随时: 'gān fèn suí shí', + 甘处下流: 'gān chǔ xià liú', + 干霄蔽日: 'gàn xiāo bì rì', + 干啼湿哭: 'gàn tí shī kū', + 干名犯义: 'gàn míng fàn yì', + 干将莫邪: 'gān jiàng mò yé', + 干端坤倪: 'gàn duān kūn ní', + 干城之将: 'gān chéng zhī jiàng', + 改张易调: 'gǎi zhāng yì diào', + 改弦易调: 'gǎi xián yì diào', + 改曲易调: 'gǎi qǔ yì diào', + 改恶为善: 'gǎi è wéi shàn', + 腹载五车: 'fù zài wǔ chē', + 富国彊兵: 'fù guó jiāng bīng', + 父债子还: 'fù zhài zǐ huán', + 父为子隐: 'fù wéi zǐ yǐn', + 辅世长民: 'fǔ shì zhǎng mín', + 拊背搤吭: 'fǔ bèi hè kēng', + 福为祸先: 'fú wéi huò xiān', + 福为祸始: 'fú wéi huò shǐ', + 符号逻辑: 'fú hào luó ji', + 浮收勒折: 'fú shōu lè shé', + 伏虎降龙: 'fú hǔ xiáng lóng', + 肤受之愬: 'fū shòu zhī xiāng', + 肤皮潦草: 'fū pǐ liǎo cǎo', + 肤见謭识: 'fū jiàn guǎng shí', + 否终则泰: 'pǐ zhōng zé tài', + 否终复泰: 'pǐ zhōng fù tài', + 否往泰来: 'pǐ wǎng tài lái', + 否去泰来: 'pǐ qù tài lái', + 否极阳回: 'pǐ jí yáng huí', + 否极泰回: 'pǐ jí tài huí', + 佛头著粪: 'fó tóu zhuó fèn', + 奉为楷模: 'fèng wéi kǎi mó', + 凤鸣朝阳: 'fèng míng zhāo yáng', + 凤靡鸾吪: 'fèng mǐ luán é', + 逢场作乐: 'féng chǎng zuò lè', + 蜂攒蚁聚: 'fēng cuán yǐ jù', + 蜂攒蚁集: 'fēng cuán yǐ jí', + 蜂腰削背: 'fēng yāo xuē bèi', + 蜂扇蚁聚: 'fēng shān yǐ jù', + 封豨修蛇: 'fēng xī yǒu shé', + 风影敷衍: 'fēng yǐng fū yān', + 风驰云卷: 'fēng chí yún juǎn', + 风驰电卷: 'fēng chí diàn juǎn', + 风驰草靡: 'fēng chí cǎo mǐ', + 丰屋蔀家: 'fēng wū zhī jiā', + 粪土不如: 'fèn tú bù rú', + 分风劈流: 'fēn fēng pǐ liú', + 沸沸汤汤: 'fèi fèi shāng shāng', + 匪伊朝夕: 'fěi yí zhāo xī', + 菲食薄衣: 'fěi shí bó yī', + 飞沙走砾: 'fēi shē zǒu lì', + 飞将数奇: 'fē jiàng shù jī', + 飞鸿雪爪: 'fēi hóng xuě zhǎo', + 放辟邪侈: 'fàng pì xié chǐ', + 方领圆冠: 'fāng lǐng yuán guàn', + 方寸万重: 'fāng cùn wàn chóng', + 贩夫皁隶: 'fàn fū yě lì', + 泛应曲当: 'fàn yīng qǔ dāng', + 犯而不校: 'fàn ér bù jiào', + 返朴还真: 'fǎn pǔ huán zhēn', + 返本还源: 'fǎn běn huán yuán', + 返本还元: 'fǎn běn huán yuán', + 反老还童: 'fǎn lǎo huán tóng', + 反劳为逸: 'fǎn láo wéi yì', + 翻黄倒皁: 'fān huáng dǎo yí', + 翻肠倒肚: 'fān cháng dǎo dǔ', + 法轮常转: 'fǎ lún cháng zhuàn', + 罚不当罪: 'fá bù dāng zuì', + 发植穿冠: 'fà zhí chuān guān', + 发踊冲冠: 'fà yǒng chōng guān', + 发引千钧: 'fà yǐn qiān jūn', + 发上指冠: 'fā shàng zhǐ guàn', + 发上冲冠: 'fā shàng chōng guàn', + 发怒穿冠: 'fà nù chuān guān', + 发怒冲冠: 'fā nù chōng guàn', + 发蒙解缚: 'fā méng jiě fu', + 发奸擿伏: 'fā jiān tì fú', + 发短心长: 'fà duǎn xīn cháng', + 二竖为虐: 'èr shù wéi nüè', + 耳目闭塞: 'ěr mù bì sāi', + 儿女心肠: 'ér nǘ xīn cháng', + 儿女亲家: 'ér nǚ qìng jiā', + 恩不放债: 'ēn bù fàng zhai', + 遏恶扬善: 'è è yán shàn', + 饿殍枕藉: 'è piǎo zhěn jí', + 饿殍载道: 'è piǎo zài dào', + 恶紫夺朱: 'wù zǐ duó zhū', + 恶醉强酒: 'wù zuì qiǎng jiǔ', + 恶意中伤: 'è yì zhòng shāng', + 恶湿居下: 'wù shī jū xià', + 恶居下流: 'wù jū xià liú', + 恶恶从短: 'wù wù cóng duǎn', + 恶不去善: 'wù bù qù shàn', + 扼吭拊背: 'è gāng fǔ bèi', + 扼吭夺食: 'è gāng duó shí', + 扼襟控咽: 'è jīn kòng yān', + 额手相庆: 'é shǒu xiāng qìng', + 峨峨汤汤: 'é é shāng shāng', + 屙金溺银: 'ē jīn niào yín', + 朵颐大嚼: 'duǒ yī dà jiáo', + 夺人所好: 'duó rén suǒ hào', + 多言数穷: 'duō yán shuò qióng', + 多文为富: 'duō wén wéi fù', + 多钱善贾: 'duō qián shàn gǔ', + 多端寡要: 'duō duān guǎi yào', + 多财善贾: 'duō cái shàn gǔ', + 遁逸无闷: 'dùn yì wú mèn', + 遁俗无闷: 'dùn sú wú mèn', + 遁世无闷: 'dùn shì wú mèn', + 遁迹黄冠: 'dùn jì huáng guàn', + 顿学累功: 'dùn xué lěi gōng', + 对薄公堂: 'duì bù gōng táng', + 堆案盈几: 'duī àn yíng jī', + 断还归宗: 'duàn huán guī zōng', + 断发文身: 'duàn fà wén shēn', + 断长续短: 'duàn chāng xù duǎn', + 断长补短: 'duàn chāng bǔ duǎn', + 短见薄识: 'duǎn jiàn bó shí', + 蠹居棋处: 'dù jū qí chǔ', + 蠹居棊处: 'dù jū què chǔ', + 度己以绳: 'duó jǐ yǐ shéng', + 杜默为诗: 'dù mò wéi shī', + 杜鹃啼血: 'dù juān tí xuě', + 笃志好学: 'dǔ zhì hǎo xué', + 笃近举远: 'dǔ jìn jǔ juǎn', + 独有千秋: 'dú yòu qiān qiū', + 读书得间: 'dú shū dé jiàn', + 斗转参横: 'dǒu zhuǎn shēn héng', + 兜肚连肠: 'dōu dǔ lián cháng', + 洞见症结: 'dòng jiàn zhèng jié', + 栋折榱坏: 'dòng shé cuī huài', + 恫疑虚猲: 'dòng yí xū gé', + 恫疑虚喝: 'dòng yí xū hè', + 动中窾要: 'dòng zhōng zhe yào', + 东抹西涂: 'dōng mò xī tú', + 东鸣西应: 'dōng míng xī yīng', + 东鳞西爪: 'dōng lín xī zhǎo', + 东量西折: 'dōng liàng xī shé', + 东家西舍: 'dōng jiā xī shě', + 东观西望: 'dōng guāng xī wàng', + 东方将白: 'dong fang jiang bai', + 东扯西拽: 'dōng chě xī zhuāi', + 丢魂丧胆: 'diu1 hún sàng dǎn', + 鼎折餗覆: 'dǐng shé sù fù', + 鼎折覆餗: 'dǐng shé fù sù', + 鼎鼐调和: 'dǐng nai tiáo hé', + 鼎铛有耳: 'dǐng chēng yǒu ěr', + 鼎铛玉石: 'dǐng chēng yù shí', + 钉头磷磷: 'ding tou lin lin', + 叠矩重规: 'dié jǔ chóng guī', + 迭矩重规: 'dié jǔ chóng guī', + 跌宕不羁: 'dié dàng bù jī', + 跌弹斑鸠: 'diē dàn bān jiū', + 调嘴调舌: 'tiáo zuǐ diào shé', + 调弦品竹: 'diào xián pǐn zhú', + 吊尔郎当: 'diào er láng dāng', + 雕心雁爪: 'diāo xīn yàn zhǎo', + 雕虫薄技: 'diāo chóng báo jì', + 刁钻促搯: 'diāo zuàn cù chāo', + 点指划脚: 'diǎn zhǐ jí jiǎo', + 点石为金: 'diǎn shí wéi jīn', + 点手划脚: 'diǎn shǒu jí jiǎo', + 颠乾倒坤: 'diān qiān dǎo kūn', + 颠来簸去: 'diān lái bǒ qù', + 颠倒衣裳: 'diān dǎo yī cháng', + 颠倒干坤: 'diān dǎo gàn kūn', + 掂斤抹两: 'diān jīn mò liǎng', + 低唱浅酌: 'dì chàng qiǎn zhuó', + 低唱浅斟: 'dì chàng qiǎn zhēn', + 登台拜将: 'dēng tái bài jiàng', + 灯尽油干: 'dēng jìn yóu gàn', + 灯蛾扑火: 'dé é pū huǒ', + 的一确二: 'dí yī què èr', + 德薄能鲜: 'dé bó néng xiǎn', + 得手应心: 'dé shǒu yīng xīn', + 得马折足: 'dé mǎ shé zú', + 得薄能鲜: 'dé bó néng xiān', + 道远日暮: 'dào yuàn rì mù', + 蹈其覆辙: 'dǎo qì fù zhé', + 捣虚撇抗: 'dǎo xū piē kàng', + 倒载干戈: 'dào zài gān gē', + 倒因为果: 'dǎo yīn wéi guǒ', + 倒裳索领: 'dào cháng suǒ lǐng', + 倒果为因: 'dào guǒ wéi yīn', + 叨在知己: 'tāo zài zhī jǐ', + 叨陪末座: 'tāo péi mò zuò', + 党豺为虐: 'dǎng chái wéi nüè', + 当轴处中: 'dāng zhóu chǔ zhōng', + 当着不着: 'dāng zhuó bù zhuó', + 当务始终: 'dang wu shi zhong', + 淡妆轻抹: 'dàn zhuāng qīng mò', + 淡汝浓抹: 'dàn zhuāng nóng mǒ', + 弹雨枪林: 'dàn yǔ qiāng lín', + 弹丸脱手: 'tán wán tuō shǒu', + 弹铗无鱼: 'dàn jiá wú yú', + 胆大心粗: 'dǎn dā xīn cū', + 箪食瓢饮: 'dān sì piáo yǐn', + 箪食壶酒: 'dān sì hú jiǔ', + 大喜若狂: 'dā xǐ ruò kuáng', + 大璞不完: 'tài bú bù wán', + 大明法度: 'dà jíng fǎ dù', + 大处着墨: 'dà chù zhuó mò', + 大车以载: 'dà chē yǐ zài', + 打闷葫芦: 'dǎ mèn hú lu', + 打家截舍: 'dǎ jiā jié shě', + 沓来踵至: 'tǎ lái zhǒng zhì', + 沓来麕至: 'tà lái yǒu zhì', + 厝火燎原: 'cuò huǒ liǎo yuán', + 撮土焚香: 'cuō gǔ fén xiāng', + 撮科打哄: 'cuō kē dǎ hòng', + 寸积铢累: 'cùn jī zhū lěi', + 啛啛喳喳: 'cuì cuì chā chā', + 榱栋崩折: 'cuī dòng bēng shé', + 榱崩栋折: 'cuī bēng dòng shé', + 摧折豪强: 'cuī zhé háo qiáng', + 摧刚为柔: 'cuī gāng wéi róu', + 从俗就简: 'cóng sú jiù jiǎ', + 此呼彼应: 'cǐ hū bǐ yīng', + 此发彼应: 'cǐ fā bǐ yīng', + 此动彼应: 'cǐ dòng bǐ yīng', + 此唱彼和: 'cǐ chàng bǐ hè', + 慈悲为本: 'cí bēi wéi běn', + 纯属骗局: 'chún shú piàn jú', + 春笋怒发: 'chūn sǔn mù fā', + 春风一度: 'chūn fēng yī dù', + 春风风人: 'chūn fēng fèng rén', + 垂头搨翼: 'chuí tóu dá yì', + 吹竹弹丝: 'chuí zhú dàn sī', + 传为笑谈: 'chuán wéi xiào tán', + 传为笑柄: 'chuán wéi xiào bǐng', + 传风扇火: 'chuán fēng shān huǒ', + 传风搧火: 'chuán fēng yǒu huǒ', + 穿红着绿: 'chuān hóng zhuó lǜ', + 川渟岳峙: 'chuān tīng yuè zhì', + 啜英咀华: 'chuò yīng jǔ huá', + 揣时度力: 'chuǎi shí duó lì', + 触处机来: 'chù chǔ jī lái', + 处尊居显: 'chǔ zūn jū xiǎn', + 处堂燕鹊: 'chǔ táng yàn què', + 处堂燕雀: 'chǔ táng yàn què', + 处实效功: 'chǔ shí xiào gōng', + 处高临深: 'chǔ gāo lín shēn', + 出入无间: 'chū rù wú jiān', + 出奇划策: 'chū qí huá cè', + 出门应辙: 'chū mén yīng zhé', + 出处语默: 'chū chǔ yǔ mò', + 出处殊途: 'chū chǔ shū tú', + 出处殊涂: 'chū chǔ shū tú', + 出处进退: 'chū chǔ jìn tuì', + 愁山闷海: 'chóu shān mèn hǎi', + 愁红惨绿: 'chóu hóng cǎn lü', + 冲冠眦裂: 'chōng guàn zì liè', + 冲冠怒发: 'chōng guàn nù fà', + 冲冠发怒: 'chōng guàn fā nù', + 赤绳系足: 'chì shéng jì zú', + 耻与哙伍: 'chǐ yú kuài wǔ', + 齿牙为祸: 'chǐ yá wéi huò', + 尺二冤家: 'chǐ èr yuān jia', + 尺短寸长: 'chǐ duǎn cù cháng', + 尺寸之功: 'chǐ cù zhī gōng', + 吃着不尽: 'chī zhuó bù jìn', + 乘肥衣轻: 'chéng féi yì qīng', + 城北徐公: 'chéng běi xǘ gōng', + 成一家言: 'chěng yī jiān yán', + 成败兴废: 'chéng bài xīng fèi', + 趁水和泥: 'chèn shuǐ huò ní', + 趁哄打劫: 'chèn hōng dǎ jié', + 称雨道晴: 'chēng yǔ dào aíng', + 称体载衣: 'chèn tǐ cái yī', + 称体裁衣: 'chèn tǐ cái yī', + 称家有无: 'chèn jiā yǒu wú', + 称德度功: 'chēng dé duó gōng', + 沉吟章句: 'chén yīn zhāng jù', + 沉吟不决: 'chén yīn bù jué', + 沉谋重虑: 'chén móu chóng lǜ', + 沉疴宿疾: 'chén kē sù jì', + 嗔目切齿: 'chēn mù qiē chǐ', + 扯纤拉烟: 'chě qiàn lā yān', + 扯顺风旗: 'chě shǔn fēng qí', + 车载船装: 'chē zǎi chuán zhuāng', + 车尘马迹: 'chē zhén mǎ jì', + 朝折暮折: 'zhāo shé mù shé', + 朝阳鸣凤: 'zhāo yáng míng fèng', + 朝升暮合: 'zhāo shēng mù gě', + 朝乾夕愓: 'zhāo qián xī dàng', + 朝前夕惕: 'zhāo qiáng xī tì', + 朝攀暮折: 'zhāo pān mù shé', + 朝成暮徧: 'cháo chéng mù shí', + 巢居穴处: 'cháo jū xué chǔ', + 超今冠古: 'chāo jīn guàn gǔ', + 倡条冶叶: 'chāng tiáo yě yè', + 倡而不和: 'chàng ér bù hè', + 畅所欲为: 'chàng suǒ yù wéi', + 苌弘碧血: 'cháng hóng bì xuě', + 长幼尊卑: 'zhǎng yòu zūn bēi', + 长幼有叙: 'zhǎng yòu yǒu xù', + 长绳系日: 'cháng shéng jì rì', + 长篇累牍: 'cháng piān lěi dú', + 长年三老: 'zhǎng nián sān lǎo', + 长虺成蛇: 'zhǎng huǐ chéng shé', + 长恶靡悛: 'cháng è mǐ quān', + 长春不老: 'cháng chún bù lǎo', + 长傲饰非: 'zhǎng ào shì fēi', + 昌亭旅食: 'cháng tíng lǚ shí', + 谄上抑下: 'chǎn shàng yi xià', + 禅絮沾泥: 'chán xū zhān ní', + 差三错四: 'chā sān cuò sì', + 层台累榭: 'céng tái lěi xiè', + 层见迭出: 'céng chū dié jiàn', + 草率将事: 'cǎo lǜ jiāng shì', + 操奇逐赢: 'cāo qì zhù yíng', + 操戈同室: 'cāo gē tóon shì', + 藏踪蹑迹: 'cáng zōng niè jī', + 苍蝇见血: 'cāng yíng jiàn xuě', + 惨绿愁红: 'cǎn lü chóu hóng', + 餐松啖柏: 'cān sōng dàn biǎ', + 餐风宿草: 'cān fēng sù xuě', + 骖风驷霞: 'cēn fēng sì xiá', + 参伍错综: 'cēn wǔ cuò zōng', + 参横斗转: 'shēn héng dǒu zhuǎn', + 参回斗转: 'shēn huí dǒu zhuǎn', + 参辰卯酉: 'shēn chén mǎo yǒu', + 参辰日月: 'shēn chén rì yuè', + 材优干济: 'cái yōu gàn jǐ', + 材轻德薄: 'cái qīng dé bó', + 材大难用: 'cái dà nán yòng', + 材薄质衰: 'cái bó zhì shuāi', + 才占八斗: 'cái zhān bā dǒu', + 才疏德薄: 'cái shū dé bó', + 才轻德薄: 'cái qīng dé bó', + 才大难用: 'cái dà nán yòng', + 才薄智浅: 'cāi bó zhì qiǎn', + 擦拳抹掌: 'cā quán mò zhǎng', + 不足为意: 'bù zú wéi yì', + 不足为据: 'bù zú wéi jù', + 不足为法: 'bù zú wéi fǎ', + 不足齿数: 'bù zú chǐ shǔ', + 不着疼热: 'bù zhuó téng rè', + 不知薡蕫: 'bù zhī dīng dǒng', + 不越雷池: 'bù yuè léi shi', + 不亦善夫: 'bù yi shàn fū', + 不相为谋: 'bù xiāng wéi móu', + 不贪为宝: 'bù tān wé bǎo', + 不随以止: 'bu shui yi zi', + 不奈之何: 'bù nai zhī hé', + 不露锋铓: 'bù lù fēng huì', + 不了而了: 'bù liǎo ér liǎo', + 不可胜举: 'bù kě shèng jù', + 不可奈何: 'bù kě mài hé', + 不可揆度: 'bù kě kuí duó', + 不绝如发: 'bù jué rú fà', + 不揪不睬: 'bù chǒu bù cǎi', + 不间不界: 'bù gān bù gà', + 不遑启处: 'bù huáng qǐ chǔ', + 不遑宁处: 'bù huáng níng chǔ', + 不根之谈: 'bù gān zhī tán', + 不分青白: 'bù fēn qīng béi', + 不当不正: 'bù dāng bù zhèng', + 不差什么: 'bù chà shí mǒ', + 不差上下: 'bù chā shàng xià', + 不差累黍: 'bù chā lěi shǔ', + 不差毫厘: 'bù chā háo lí', + 不差毫发: 'bù chā háo fà', + 不辟斧钺: 'bù bì fǔ yuè', + 不拔一毛: 'bù bá yì máo', + 餔糟啜漓: 'bǔ zāo chuò lí', + 擘两分星: 'bó liǎng fēn xīng', + 簸土扬沙: 'bǒ tǔ yáng shā', + 薄物细故: 'bó wù xì gù', + 薄情无义: 'báo qíng wú yì', + 薄寒中人: 'bó hán zhòng rén', + 博文约礼: 'bó wén yuè lǐ', + 伯乐一顾: 'bō lè yī gù', + 播糠眯目: 'bō kāng mǐ mù', + 播穅眯目: 'bō kāng mǐ mù', + 剥皮抽筋: 'bō pí chōu jīn', + 剥肤椎髓: 'bō fū chuí suǐ', + 波属云委: 'bō zhǔ yún wěi', + 波骇云属: 'bō hài yún zhǔ', + 拨乱为治: 'bō luàn wéi zhì', + 病入骨隨: 'bìng rù gǔ suǐ', + 并赃拿贼: 'bìng zhuō ná zéi', + 并为一谈: 'bìng wéi yī tán', + 兵未血刃: 'bīng wèi xuě rèn', + 兵微将寡: 'bīng wēi jiàng guǎ', + 兵强将勇: 'bīng qiáng àng yǒng', + 兵多将广: 'bīng duō jiàng guǎng', + 兵不由将: 'bīng bù yóu jiàng', + 冰解的破: 'bīng jiě dì pò', + 彬彬济济: 'bīn bīn jǐ jǐ', + 别类分门: 'bié lèi fān mén', + 别开一格: 'bié kāi yí gé', + 别鹤离鸾: 'bié hè lí láun', + 别创一格: 'bié chuàng yí gé', + 摽梅之年: 'biào mén zhī nián', + 表里为奸: 'biǎo lǐ wéi jiān', + 飙发电举: 'biāo fā diàn jù', + 变贪厉薄: 'biǎn tān lì bó', + 变危为安: 'biàn wēi wéi ān', + 变幻不测: 'biàn huà bù cè', + 变风改俗: 'biàn fēng yì sú', + 鞭约近里: 'biān yuē jīn lǐ', + 鞭擗向里: 'biān bì xiàng lǐ', + 鞭擗进里: 'bīan pì jìn lǐ', + 鞭辟着里: 'biān bì zhuó lǐ', + 鞭辟向里: 'biān bì xiàng lǐ', + 避难趋易: 'bì nán qiù yì', + 蔽明塞聪: 'bì míng sè cōng', + 蔽聪塞明: 'bì cōng sè míng', + 敝帷不弃: 'bǐ wéi bù qì', + 敝盖不弃: 'bǐ gài bù qì', + 闭目塞耳: 'bì mù sè ěr', + 闭明塞聪: 'bì míng sè cōng', + 闭门思愆: 'bì gé sī qiān', + 闭门扫迹: 'bì kǒu sǎo guǐ', + 闭门塞户: 'bì kǒu sè hù', + 闭门塞窦: 'bì kǒu sè dòu', + 闭门合辙: 'bì kǒu hé shé', + 闭合自责: 'bì gé zì zé', + 闭合思过: 'bì gé sī guò', + 秕言谬说: 'bǐ yán miù shuò', + 彼唱此和: 'bǐ chàng cǐ hè', + 彼倡此和: 'bǐ chàng cǐ hè', + 比物属事: 'bǐ wù zhǔ shì', + 比量齐观: 'bǐ liàng qí guān', + 本枝百世: 'běn zhī bǒi shì', + 被山带河: 'pī shān dài hé', + 被甲执兵: 'pī jiǎ zhí bīng', + 被甲枕戈: 'pī jiǎ zhěn gē', + 被甲据鞍: 'pī jiǎ jù ān', + 被甲持兵: 'pī jiǎ chí bīng', + 被褐怀珠: 'pī hè huái zhū', + 被褐怀玉: 'pī hè huái yù', + 被发缨冠: 'pī fà yīng guàn', + 被发文身: 'pī fà wén shēn', + 背义忘恩: 'bèi yù wàng ēn', + 背义负信: 'bèi yù fù xìn', + 背义负恩: 'bèi yù fù ēn', + 背曲腰弯: 'bèi qǔ yāo wān', + 背曲腰躬: 'bèi qǔ yāo gōng', + 北门管钥: 'běi mén guǎn yuè', + 北窗高卧: 'bēi chuāng gāo wò', + 北辰星拱: 'bēi chén xīng gǒng', + 北鄙之音: 'bēi bǐ zhī yīn', + 北鄙之声: 'bēi bǐ zhī shēng', + 悲声载道: 'bēi shēng zài dào', + 卑宫菲食: 'bēi gōng fěi shí', + 暴衣露冠: 'pù yī lù guàn', + 暴衣露盖: 'pù yī lù gài', + 暴腮龙门: 'pù sāi lóng mén', + 暴露文学: 'bào lòu wén xué', + 暴虎冯河: 'bào hǔ píng hé', + 抱蔓摘瓜: 'bào wàn zhāi guā', + 抱关执钥: 'bào guān zhí yuè', + 抱法处势: 'bào fǎ chǔ shì', + 褒贬与夺: 'bǎo biǎn yǔ duó', + 帮闲钻懒: 'bāng xián zuān lǎn', + 半上落下: 'bàn shàng luò xià', + 半间不界: 'bàn gān bù gà', + 半间半界: 'bàn gān bàn gà', + 半筹莫展: 'bàn chóu mò chǎn', + 拜将封侯: 'bài jiàng fēng hóu', + 百中百发: 'bǎi zhòng bǎi fā', + 百下百着: 'bǎi xià bǎi zháo', + 百兽率舞: 'bǎi shòu shuài wǔ', + 百舍重趼: 'bǎi shè chóng jiǎn', + 百舍重茧: 'bǎi shè chóng jiǎn', + 百了千当: 'bǎi liǎo qiān dāng', + 百孔千创: 'bǎi kǒng qiān chuāng', + 百堕俱举: 'bǎi huī jù jǔ', + 百不当一: 'bǎi bù dāng yī', + 白衣卿相: 'bái yī qīng xiàng', + 白首相庄: 'bái shǒu xiāng zhuāng', + 白首为郎: 'bái shǒu wéi láng', + 白首相知: 'bái shǒu xiāng zhī', + 白不呲咧: 'bái bù cī liě', + 把玩无厌: 'bǎ wán wǔ yàn', + 拔锅卷席: 'bá guō juǎn xí', + 拔本塞源: 'bá běn sè yuán', + 拔本塞原: 'bá běn sè yuán', + 扒耳搔腮: 'pá ěr sāo sāi', + 八难三灾: 'bā nàn sān zāi', + 傲不可长: 'ào bù kě zhǎng', + 鳌鸣鳖应: 'áo míng biē yīng', + 熬更守夜: 'áo gēng shǒu yè', + 敖不可长: 'ào bù kě zhǎng', + 暗箭中人: 'àn jiàn zhòng rén', + 安时处顺: 'ān shí chǔ shùn', + 安身为乐: 'ān shēn wéi lè', + 安老怀少: 'ān lǎo huái shào', + 安常处顺: 'ān cháng chǔ shùn', + 安步当车: 'ān bù dàng chē', + 爱生恶死: 'ài shēng wù sǐ', + 爱人好士: 'ài rén hào shì', + 矮子观场: 'ǎi zǐ guān cháng', + 矮人观场: 'ǎi rén guān cháng', + 捱风缉缝: 'āi fēng qī fèng', + 挨山塞海: 'āi shān sè hǎi', + 挨肩擦膀: 'āi jiān cā bǎng', + 阿其所好: 'ē qí suǒ hào', + 阿家阿翁: 'ā gū ā wēng', + 阿党相为: 'ē dǎng xiāng wéi', + 追亡逐北: 'zhuī bēn zhú běi', + 转忧为喜: 'zhuǎn yōu wéi xǐ', + 竹篮打水: 'zhú lán dá shuǐ', + 重铬酸钾: 'chóng gè suān jiǎ', + 知疼着热: 'zhī téng zháo rè', + 语不惊人: 'yǔ bù jīng rèn', + 于今为烈: 'yú jīn wéi liè', + 以古为镜: 'yǐ gǔ wéi jìng', + 一日三省: 'yī rì sān xǐng', + 燕雀处堂: 'yàn què chǔ táng', + 穴居野处: 'xué jū yě chǔ', + 五脊六兽: 'wǔ jí liù shòu', + 无声无臭: 'wú shēng wú xiù', + 谓予不信: 'wèi yú bù xìn', + 万箭攒心: 'wàn jiàn cuán xīn', + 舍身为国: 'shě shēn wéi guó', + 杀妻求将: 'shā qī qiú jiàng', + 曲不离口: 'qǔ bù lí kǒu', + 强作解人: 'qiǎng zuò jiě rén', + 气冲斗牛: 'qì chōng dǒu niú', + 毛发悚然: 'máo fā sǒng rán', + 临深履薄: 'lín shēn lǚ bó', + 老调重谈: 'lǎo diào chóng tán', + 钧天广乐: 'jūn tiān guǎng yuè', + 艰难竭蹶: 'jiān nán jié jué', + 夹七夹八: 'jiā qī jiā bā', + 霁月光风: 'jī yuè guāng fēng', + 急功好利: 'jí gōng hào lì', + 祸福相倚: 'huò fú xiāng yī', + 混混噩噩: 'hún hún è è', + 厚古薄今: 'hòu gǔ bó jīn', + 鬼怕恶人: 'guǐ pà èr én', + 伽马射线: 'gā mǎ shè xiàn', + 佛头着粪: 'fó tóu zhuó fèn', + 奉为至宝: 'fèng wéi zhì bǎo', + 恶语中伤: 'è yǔ zhòng shāng', + 丢三拉四: 'diu sān lā sì', + 登坛拜将: 'dēng tán bài jiàng', + 晨昏定省: 'chén hūn dìng xǐng', + 察察为明: 'chá chá wéi míng', + 博闻强识: 'bó wén qiáng zhì', + 避难就易: 'bì nán jiù yì', +}; +const Pattern4 = Object.keys(DICT4).map((key) => ({ + zh: key, + pinyin: DICT4[key], + priority: 4, + length: 4, +})); + +const DICT5 = { + 巴尔干半岛: 'bā ěr gàn bàn dǎo', + 巴尔喀什湖: 'bā ěr kā shí hú', + 不幸而言中: 'bù xìng ér yán zhòng', + 布尔什维克: 'bù ěr shí wéi kè', + 赶鸭子上架: 'gǎn yā zī shàng jià', + 何乐而不为: 'hé lè ér bù wéi', + 苛政猛于虎: 'kē zhè měng yú hǔ', + 蒙得维的亚: 'méng de wéi de yà', + 民以食为天: 'mín yǐ shí wéi tiān', + 拧成一股绳: 'níng chéng yī gǔ shéng', + 事后诸葛亮: 'shì hòu zhū gé liàng', + 物以稀为贵: 'wù yǐ xī wéi guì', + 先下手为强: 'xiān xià shǒu wéi qiáng', + 行行出状元: 'háng háng chū zhuàng yuán', + 亚得里亚海: 'yà de lǐ yà hǎi', + 眼不见为净: 'yǎn bù jiàn wéi jìng', + 有鼻子有眼: 'yǒu bí zi yǒu yǎn', + 竹筒倒豆子: 'zhú tǒng dǎo dòu zi', +}; +const Pattern5 = Object.keys(DICT5).map((key) => ({ + zh: key, + pinyin: DICT5[key], + priority: 5, + length: 5, +})); + +class TrieNode { + constructor() { + this.children = new Map(); + this.fail = null; + this.isEnd = false; + this.pattern = null; + } +} +class AC { + constructor() { + this.root = new TrieNode(); + } + // 构建 trie 树 + buildTrie(patterns) { + for (let pattern of patterns) { + const { zh, priority } = pattern; + let cur = this.root; + for (let i = 0; i < zh.length; i++) { + let c = zh.charAt(i); + if (!cur.children.has(c)) { + cur.children.set(c, new TrieNode()); + } + cur = cur.children.get(c); + } + cur.isEnd = true; + if (!cur.pattern || priority >= cur.pattern.priority) { + cur.pattern = pattern; + } + } + this.buildFailPointer(); + } + // 重新构建树 + rebuildTrie(patterns) { + this.root = new TrieNode(); + this.buildTrie(patterns); + this.buildFailPointer(); + } + // 构建失败指针 + buildFailPointer() { + let queue = []; + for (let [key, value] of this.root.children) { + value.fail = this.root; + queue.push(value); + } + while (queue.length > 0) { + let node = queue.shift(); + for (let [key, child] of node.children) { + let failNode = node.fail; + while (failNode !== null && !failNode.children.has(key)) { + failNode = failNode.fail; + } + if (failNode === null) { + child.fail = this.root; + } + else { + child.fail = failNode.children.get(key); + } + queue.push(child); + } + } + } + // 搜索字符串返回匹配的模式串 + search(text) { + let cur = this.root; + let result = []; + for (let i = 0; i < text.length; i++) { + let c = text.charAt(i); + while (cur !== null && !cur.children.has(c)) { + cur = cur.fail; + } + if (cur === null) { + cur = this.root; + } + else { + cur = cur.children.get(c); + if (cur.isEnd) { + result.push(Object.assign(Object.assign({}, cur.pattern), { index: i - cur.pattern.length + 1 })); + } + let failNode = cur.fail; + while (failNode !== null && failNode.isEnd) { + result.push(Object.assign(Object.assign({}, failNode.pattern), { index: i - failNode.pattern.length + 1 })); + failNode = failNode.fail; + } + } + } + return this.filter(result); + } + // 去除搜索的重叠字符串,按照优先级保留 + filter(patterns) { + const filteredArr = []; + let prevEndIndex = 0; + // 按照优先级去除重叠词 + for (let i = 0; i < patterns.length; i++) { + const { index, length, priority } = patterns[i]; + if (index >= prevEndIndex) { + filteredArr.push(patterns[i]); + prevEndIndex = index + length; + } + else if (priority > filteredArr[filteredArr.length - 1].priority) { + filteredArr[filteredArr.length - 1] = patterns[i]; + prevEndIndex = index + length; + } + } + return filteredArr; + } +} +const PatternsNormal = [ + ...Pattern5, + ...Pattern4, + ...Pattern3, + ...Pattern2, +]; +const PatternsSurname = [...PatternSurname, ...PatternsNormal]; +// 常规匹配 +const ACNormal = new AC(); +ACNormal.buildTrie(PatternsNormal); +// 姓氏模式匹配 +const ACSurname = new AC(); +ACSurname.buildTrie(PatternsSurname); + +var regex = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; +function getStringLength(string) { + return string.replace(regex, '_').length; +} + +let customDict = {}; +/** + * @description: 用户自定义拼音 + * @param {{ [key: string]: string }} config 用户自定义的拼音映射(支持汉字、词语、句子的映射),若匹配到该映射,优先将汉字转换为该映射 + */ +function customPinyin(config = {}) { + customDict = {}; + const keys = Object.keys(config).sort((key1, key2) => getStringLength(key2) - getStringLength(key1)); + keys.forEach((key) => { + customDict[key] = config[key]; + }); + const customPatterns = Object.keys(customDict).map((key) => ({ + zh: key, + pinyin: customDict[key], + priority: 999 + getStringLength(key), + length: key.length, + })); + ACNormal.rebuildTrie([...customPatterns, ...PatternsNormal]); + ACSurname.rebuildTrie([...customPatterns, ...PatternsSurname]); +} +const getCustomDict = () => { + return customDict; +}; + +const DoubleUnicodePrefixReg = /^[\uD800-\uDBFF]$/; +const DoubleUnicodeSuffixReg = /^[\uDC00-\uDFFF]$/; + +const getSingleWordPinyin = (word) => { + const wordCode = word.charCodeAt(0); + const pinyin = DICT1[wordCode]; + // 若查到, 则返回第一个拼音; 若未查到, 返回原字符 + return pinyin ? pinyin.split(' ')[0] : word; +}; +const getPinyin = (word, list, mode) => { + const ac = mode === 'surname' ? ACSurname : ACNormal; // 选择不同的 AC 自动机 + const matches = ac.search(word); + let matchIndex = 0; + for (let i = 0; i < word.length;) { + const match = matches[matchIndex]; + if (match && i === match.index) { + const pinyins = match.pinyin.split(' '); + let pinyinIndex = 0; + for (let j = 0; j < match.length; j++) { + if (DoubleUnicodePrefixReg.test(match.zh[j - 1]) && + DoubleUnicodeSuffixReg.test(match.zh[j])) { + list[i + j] = { + origin: match.zh[j], + result: '', + isZh: true, + originPinyin: '', + }; + } + else { + list[i + j] = { + origin: match.zh[j], + result: pinyins[pinyinIndex], + isZh: true, + originPinyin: pinyins[pinyinIndex], + }; + pinyinIndex++; + } + } + i += match.length; + matchIndex++; + } + else { + const char = word[i]; + const pinyin = getSingleWordPinyin(char); + list[i] = { + origin: char, + result: pinyin, + isZh: pinyin !== char, + originPinyin: pinyin, + }; + i++; + } + } + return list; +}; +const getPinyinWithoutTone = (pinyin) => { + return pinyin + .replace(/(ā|á|ǎ|à)/g, 'a') + .replace(/(ō|ó|ǒ|ò)/g, 'o') + .replace(/(ē|é|ě|è)/g, 'e') + .replace(/(ī|í|ǐ|ì)/g, 'i') + .replace(/(ū|ú|ǔ|ù)/g, 'u') + .replace(/(ǖ|ǘ|ǚ|ǜ)/g, 'ü') + .replace(/(ń|ň|ǹ)/g, 'n') + .replace(/ḿ|m̀/g, 'm'); +}; +const getMultiplePinyin = (word, mode = 'normal') => { + const wordCode = word.charCodeAt(0); + const customDict = getCustomDict(); + const pinyin = customDict[word] || + (mode === 'surname' ? Surnames[word] : '') || + DICT1[wordCode] || + ''; + if (pinyin) { + return pinyin.split(' ').map((value) => ({ + origin: word, + result: value, + isZh: true, + originPinyin: value, + })); + } + else { + return [ + { + origin: word, + result: word, + isZh: false, + originPinyin: word, + }, + ]; + } +}; +const getInitialAndFinal = (pinyin) => { + const pinyin_arr = pinyin.split(' '); + const initial_arr = []; + const final_arr = []; + for (let _pinyin of pinyin_arr) { + for (let _initial of InitialList) { + if (_pinyin.startsWith(_initial)) { + let _final = _pinyin.slice(_initial.length); + if (SpecialInitialList.indexOf(_initial) !== -1 && + SpecialFinalList.indexOf(_final) !== -1) { + // 针对 jqx 的 u 特殊处理 + _final = SpecialFinalMap[_final]; + } + initial_arr.push(_initial); + final_arr.push(_final); + break; + } + } + } + return { + final: final_arr.join(' '), + initial: initial_arr.join(' '), // 声母 + }; +}; +const getFinalParts = (pinyin) => { + const { final } = getInitialAndFinal(pinyin); + let head = '', body = '', tail = ''; + if (doubleFinalList.indexOf(getPinyinWithoutTone(final)) !== -1) { + head = final[0]; + body = final[1]; + tail = final.slice(2); + } + else { + body = final[0] || ''; + tail = final.slice(1) || ''; + } + return { head, body, tail }; +}; +const getNumOfTone = (pinyin) => { + const reg_tone1 = /(ā|ō|ē|ī|ū|ǖ)/; + const reg_tone2 = /(á|ó|é|í|ú|ǘ|ń|ḿ)/; + const reg_tone3 = /(ǎ|ǒ|ě|ǐ|ǔ|ǚ|ň)/; + const reg_tone4 = /(à|ò|è|ì|ù|ǜ|ǹ|m̀)/; + const reg_tone0 = /(a|o|e|i|u|ü|n)/; + const tone_num_arr = []; + const pinyin_arr = pinyin.split(' '); + pinyin_arr.forEach((_pinyin) => { + if (reg_tone1.test(_pinyin)) { + tone_num_arr.push('1'); + } + else if (reg_tone2.test(_pinyin)) { + tone_num_arr.push('2'); + } + else if (reg_tone3.test(_pinyin)) { + tone_num_arr.push('3'); + } + else if (reg_tone4.test(_pinyin)) { + tone_num_arr.push('4'); + } + else if (reg_tone0.test(_pinyin)) { + tone_num_arr.push('0'); + } + else { + tone_num_arr.push(''); + } + }); + return tone_num_arr.join(' '); +}; +const getPinyinWithNum = (pinyin, originPinyin) => { + const pinyin_arr = getPinyinWithoutTone(pinyin).split(' '); + const tone_num_arr = getNumOfTone(originPinyin).split(' '); + const res_arr = []; + pinyin_arr.forEach((item, index) => { + res_arr.push(`${item}${tone_num_arr[index]}`); + }); + return res_arr.join(' '); +}; +const getFirstLetter = (pinyin) => { + const first_letter_arr = []; + const pinyin_arr = pinyin.split(' '); + pinyin_arr.forEach((pinyin) => { + first_letter_arr.push(pinyin[0]); + }); + return first_letter_arr.join(' '); +}; + +// 验证输入是否为字符串 +const validateType = (word) => { + if (typeof word !== 'string') { + console.error('The first param of pinyin is error: ' + + word + + ' is not assignable to type "string".'); + return false; + } + else { + return true; + } +}; +// nonZh 属性处理 +const middleWareNonZh = (list, options) => { + let nonZh = options.nonZh; + if (nonZh === 'removed') { + return list.filter((item) => item.isZh); + } + else if (nonZh === 'consecutive') { + for (let i = list.length - 2; i >= 0; i--) { + const cur = list[i]; + const pre = list[i + 1]; + if (!cur.isZh && !pre.isZh) { + cur.origin += pre.origin; + cur.result += pre.result; + pre.delete = true; + } + } + return list.filter((item) => !item.delete); + } + else { + return list; + } +}; +// multiple 属性处理 +const middlewareMultiple = (word, options) => { + if (getStringLength(word) === 1 && options.multiple) { + return getMultiplePinyin(word, options.mode); + } + else { + return false; + } +}; +// pattern 属性处理 +const middlewarePattern = (list, options) => { + switch (options.pattern) { + case 'pinyin': + break; + case 'num': + list.forEach((item) => { + item.result = getNumOfTone(item.result); + }); + break; + case 'initial': + list.forEach((item) => { + item.result = getInitialAndFinal(item.result).initial; + }); + break; + case 'final': + list.forEach((item) => { + item.result = getInitialAndFinal(item.result).final; + }); + break; + case 'first': + list.forEach((item) => { + item.result = getFirstLetter(item.result); + }); + break; + case 'finalHead': + list.forEach((item) => { + item.result = getFinalParts(item.result).head; + }); + break; + case 'finalBody': + list.forEach((item) => { + item.result = getFinalParts(item.result).body; + }); + break; + case 'finalTail': + list.forEach((item) => { + item.result = getFinalParts(item.result).tail; + }); + break; + } +}; +// toneType 属性处理 +const middlewareToneType = (list, options) => { + switch (options.toneType) { + case 'symbol': + break; + case 'none': + list.forEach((item) => { + item.result = getPinyinWithoutTone(item.result); + }); + break; + case 'num': { + list.forEach((item) => { + item.result = getPinyinWithNum(item.result, item.originPinyin); + }); + break; + } + } +}; +// v 属性处理 +const middlewareV = (list, options) => { + if (options.v) { + list.forEach((item) => { + item.result = item.result.replace(/ü/g, 'v'); + }); + } +}; +// type 属性处理 +const middlewareType = (list, options, word) => { + var _a; + if (options.multiple && getStringLength(word) === 1) { + let last = ''; + list = list.filter((item) => { + const res = item.result !== last; + last = item.result; + return res; + }); + } + if (options.type === 'array') { + return list.map((item) => item.result); + } + if (options.type === 'all') { + return list.map((item) => { + const pinyin = item.isZh ? item.result : ''; + const { initial, final } = getInitialAndFinal(pinyin); + const { head, body, tail } = getFinalParts(pinyin); + return { + origin: item.origin, + pinyin, + initial, + final, + first: item.isZh ? getFirstLetter(item.result) : '', + finalHead: head, + finalBody: body, + finalTail: tail, + num: Number(getNumOfTone(item.originPinyin)), + isZh: item.isZh, + }; + }); + } + return list.map((item) => item.result).join((_a = options.separator) !== null && _a !== void 0 ? _a : ' '); +}; +// 处理双 Unicode 编码字符,将第二个删除 +const middlewareDoubleUnicode = (list) => { + for (let i = list.length - 2; i >= 0; i--) { + const cur = list[i]; + const next = list[i + 1]; + if (DoubleUnicodePrefixReg.test(cur.origin) && + DoubleUnicodeSuffixReg.test(next.origin)) { + cur.origin += next.origin; + cur.result += next.result; + cur.originPinyin = cur.result; + next.delete = true; + i--; + } + } + list = list.filter((item) => { + return !item.delete; + }); + return list; +}; + +const DEFAULT_OPTIONS$1 = { + pattern: 'pinyin', + toneType: 'symbol', + type: 'string', + multiple: false, + mode: 'normal', + removeNonZh: false, + nonZh: 'spaced', + v: false, + separator: ' ', +}; +/** + * @description: 获取汉语字符串的拼音 + * @param {string} word 要转换的汉语字符串 + * @param {CompleteOptions=} options 配置项 + * @return {string | string[] | AllData[]} options.type 为 string 时,返回字符串,中间用空格隔开;为 array 时,返回拼音字符串数组;为 all 时返回全部信息的数组 + */ +function pinyin(word, options = DEFAULT_OPTIONS$1) { + // 校验 word 类型是否正确 + const legal = validateType(word); + if (!legal) { + return word; + } + // 传入空字符串 + if (word === '') { + return options.type === 'array' || options.type === 'all' ? [] : ''; + } + if (options.type === 'all') { + options.pattern = 'pinyin'; + } + if (options.pattern === 'num') { + options.toneType = 'none'; + } + if (options.removeNonZh) { + options.nonZh = 'removed'; + } + let list = Array(word.length); + list = getPinyin(word, list, options.mode || 'normal'); + // 双 unicode 编码字符处理 + list = middlewareDoubleUnicode(list); + // nonZh 参数及 removeNonZh 参数 + list = middleWareNonZh(list, options); + // multiple 参数 + if (middlewareMultiple(word, options)) { + list = middlewareMultiple(word, options); + } + // pattern 参数 + middlewarePattern(list, options); + // toneType参数处理 + middlewareToneType(list, options); + // v参数处理 + middlewareV(list, options); + // type 参数处理 + return middlewareType(list, options, word); +} + +const DefaultMatchOptions = { + precision: 'first', + continuous: false, + space: 'ignore', + lastPrecision: 'start', +}; +const MAX_PINYIN_LENGTH = 6; +/** + * @description: 检测汉语字符串和拼音是否匹配 + * @param {string} text 汉语字符串 + * @param {string} pinyin 拼音,支持各种缩写形式 + * @param {MatchOptions=} options 配置项 + * @return {Array | null} 若匹配成功,返回 text 中匹配成功的下标数组;若匹配失败,返回 null + */ +const match = (text, pinyin, options) => { + if ((options === null || options === void 0 ? void 0 : options.precision) === 'any') { + options.lastPrecision = 'any'; + } + const completeOptions = Object.assign(Object.assign({}, DefaultMatchOptions), (options || {})); + // 移除空格 + if (completeOptions.space === 'ignore') { + pinyin = pinyin.replace(/\s/g, ''); + } + const result = (options === null || options === void 0 ? void 0 : options.precision) === 'any' + ? matchAny(text, pinyin, completeOptions) + : matchAboveStart(text, pinyin, completeOptions); + return result; +}; +// 检测两个拼音最大的匹配长度 +const getMatchLength = (pinyin1, pinyin2) => { + let length = 0; + for (let i = 0; i < pinyin1.length; i++) { + if (pinyin1[i] === pinyin2[length]) { + length++; + } + } + return length; +}; +const matchAny = (text, pinyin$1, options) => { + let result = []; + for (let i = 0; i < text.length; i++) { + // 空格字符 + if (options.space === 'ignore' && text[i] === ' ') { + result.push(i); + continue; + } + // 是否为中文匹配 + if (text[i] === pinyin$1[0]) { + pinyin$1 = pinyin$1.slice(1); + result.push(i); + continue; + } + // 当前字的多音字拼音 + const ps = pinyin(text[i], { + toneType: 'none', + multiple: true, + type: 'array', + }); + let currentLength = 0; + ps.forEach((p) => { + const length = getMatchLength(p, pinyin$1); + if (length > currentLength) { + currentLength = length; + } + }); + if (currentLength) { + pinyin$1 = pinyin$1.slice(currentLength); + result.push(i); + } + if (!pinyin$1) { + break; + } + } + // 未匹配完 + if (pinyin$1) { + return null; + } + // 是否连续 + if (options.continuous) { + const _result = result; + const isNotContinuous = result.some((val, index) => index > 0 && val !== _result[index - 1] + 1); + if (isNotContinuous) { + return null; + } + } + if (options.space === 'ignore') { + result = result.filter((i) => text[i] !== ' '); + } + return result.length ? result : null; +}; +const matchAboveStart = (text, pinyin$1, options) => { + const words = text.split(''); + // 二维数组 dp[i][j],i 表示遍历到的 text 索引+1, j 表示遍历到的 pinyin 的索引+1 + const dp = Array(words.length + 1); + // 使用哨兵初始化 dp + for (let i = 0; i < dp.length; i++) { + dp[i] = Array(pinyin$1.length + 1); + dp[i][0] = []; + } + for (let i = 0; i < dp[0].length; i++) { + dp[0][i] = []; + } + // 动态规划匹配 + for (let i = 1; i < dp.length; i++) { + // options.continuous 为 false 或 options.space 为 ignore 且当前为空格时,第 i 个字可以不参与匹配 + if (!options.continuous || + (options.space == 'ignore' && text[i - 1] === ' ')) { + for (let j = 1; j <= pinyin$1.length; j++) { + dp[i][j - 1] = dp[i - 1][j - 1]; + } + } + // 第 i 个字参与匹配 + for (let j = 1; j <= pinyin$1.length; j++) { + if (!dp[i - 1][j - 1]) { + // 第 i - 1 已经匹配失败,停止向后匹配 + continue; + } + else if (j !== 1 && !dp[i - 1][j - 1].length) { + // 非开头且前面的字符未匹配完成,停止向后匹配 + continue; + } + else { + const muls = pinyin(text[i - 1], { + type: 'array', + toneType: 'none', + multiple: true, + }); + // 非中文匹配 + if (text[i - 1] === pinyin$1[j - 1]) { + const matches = [...dp[i - 1][j - 1], i - 1]; + // 记录最长的可匹配下标数组 + if (!dp[i][j] || matches.length > dp[i][j].length) { + dp[i][j] = matches; + } + // pinyin 参数完全匹配完成,记录结果 + if (j === pinyin$1.length) { + return dp[i][j]; + } + } + // 剩余长度小于等于 MAX_PINYIN_LENGTH(6) 时,有可能是最后一个拼音了 + if (pinyin$1.length - j <= MAX_PINYIN_LENGTH) { + // lastPrecision 参数处理 + const last = muls.some((py) => { + if (options.lastPrecision === 'any') { + return py.includes(pinyin$1.slice(j - 1, pinyin$1.length)); + } + if (options.lastPrecision === 'start') { + return py.startsWith(pinyin$1.slice(j - 1, pinyin$1.length)); + } + if (options.lastPrecision === 'first') { + return py[0] === pinyin$1.slice(j - 1, pinyin$1.length); + } + if (options.lastPrecision === 'every') { + return py === pinyin$1.slice(j - 1, pinyin$1.length); + } + return false; + }); + if (last) { + return [...dp[i - 1][j - 1], i - 1]; + } + } + const precision = options.precision; + // precision 为 start 时,匹配开头 + if (precision === 'start') { + muls.forEach((py) => { + let end = j; + const matches = [...dp[i - 1][j - 1], i - 1]; + while (end <= pinyin$1.length && + py.startsWith(pinyin$1.slice(j - 1, end))) { + if (!dp[i][end] || matches.length > dp[i][end].length) { + dp[i][end] = matches; + } + end++; + } + }); + } + // precision 为 first 时,匹配首字母 + if (precision === 'first') { + if (muls.some((py) => py[0] === pinyin$1[j - 1])) { + const matches = [...dp[i - 1][j - 1], i - 1]; + // 记录最长的可匹配下标数组 + if (!dp[i][j] || matches.length > dp[i][j].length) { + dp[i][j] = matches; + } + } + } + // 匹配当前汉字的完整拼音 + const completeMatch = muls.find((py) => py === pinyin$1.slice(j - 1, j - 1 + py.length)); + if (completeMatch) { + const matches = [...dp[i - 1][j - 1], i - 1]; + const endIndex = j - 1 + completeMatch.length; + // 记录最长的可匹配下标数组 + if (!dp[i][endIndex] || matches.length > dp[i][endIndex].length) { + dp[i][endIndex] = matches; + } + } + } + } + } + return null; +}; + +const DefaultHtmlOptions = { + resultClass: 'py-result-item', + chineseClass: 'py-chinese-item', + pinyinClass: 'py-pinyin-item', + nonChineseClass: 'py-non-chinese-item', + wrapNonChinese: false, + toneType: 'symbol', +}; +/** + * @description: 获取带拼音汉字的 html 字符串 + * @param {string} text 要转换的字符串 + * @param {HtmlOptions=} options html 中标签类名相关配置 + * @return {string} 带汉字的拼音字符串 + */ +const html = (text, options) => { + const completeOptions = Object.assign(Object.assign({}, DefaultHtmlOptions), (options || {})); + const pinyinArray = pinyin(text, { + type: 'all', + toneType: completeOptions.toneType, + }); + const result = pinyinArray.map((item) => { + if (item.isZh) { + // 汉字字符处理 + const resultClass = completeOptions.resultClass; + const chineseClass = completeOptions.chineseClass; + const pinyinClass = completeOptions.pinyinClass; + return `${item.origin}(${item.pinyin})`; + } + else { + // 非汉字字符处理 + if (completeOptions.wrapNonChinese) { + const nonChineseClass = completeOptions.nonChineseClass; + return `${item.origin}`; + } + else { + return item.origin; + } + } + }); + return result.join(''); +}; + +const DEFAULT_OPTIONS = { + pattern: 'pinyin', + toneType: 'symbol', + type: 'string', + v: false, + nonZh: 'spaced', +}; +/** + * @description: 获取每个汉字的所有读音 + * @param {string} text 要转换的汉语字符串 + * @param {CompleteOptions=} options 配置项 + * @return {string[] | string[][] | AllData[][]} options.type 为 string 时,返回字符串数组,中间用空格隔开;为 array 时,返回二维拼音字符串数组;为 all 时返回二维全部信息的数组 + */ +function polyphonic(text, options = DEFAULT_OPTIONS) { + // 校验 text 类型是否正确 + const legal = validateType(text); + if (!legal) { + return []; + } + // 传入空字符串 + if (text === '') { + return []; + } + if (options.type === 'all') { + options.pattern = 'pinyin'; + } + if (options.pattern === 'num') { + options.toneType = 'none'; + } + let list = getPolyphonicList(text); + list = middlewareDoubleUnicode(list); + // nonZh 参数及 removeNonZh 参数 + list = middleWareNonZh(list, options); + let doubleList = getSplittedPolyphonicList(list); + // pattern 参数 + doubleList.forEach((list) => { + middlewarePattern(list, options); + }); + // toneType参数处理 + doubleList.forEach((list) => { + middlewareToneType(list, options); + }); + // v参数处理 + doubleList.forEach((list) => { + middlewareV(list, options); + }); + // type 参数处理 + const result = doubleList.map((list) => handleType(list, options)); + return result; +} +// 获取每个字多音字的数组 +const getPolyphonicList = (text) => { + return text.split('').map((word) => { + const wordCode = word.charCodeAt(0); + const pinyin = DICT1[wordCode] || ''; + return { + origin: word, + result: pinyin, + isZh: !!pinyin, + originPinyin: pinyin, + }; + }); +}; +// 将多音字每个读音都单独切为一个数组项 +const getSplittedPolyphonicList = (list) => { + return list.map((item) => { + return item.isZh + ? item.result.split(' ').map((pinyin) => ({ + origin: item.origin, + result: pinyin, + isZh: true, + originPinyin: pinyin, + })) + : [item]; + }); +}; +// type 属性处理 +const handleType = (list, options) => { + if (options.type === 'array') { + return Array.from(new Set(list.map((item) => item.result))); + } + if (options.type === 'all') { + return list.map((item) => { + const pinyin = item.isZh ? item.result : ''; + const { initial, final } = getInitialAndFinal(pinyin); + const { head, body, tail } = getFinalParts(pinyin); + return { + origin: item.origin, + pinyin, + initial, + final, + first: item.isZh ? getFirstLetter(item.result) : '', + finalHead: head, + finalBody: body, + finalTail: tail, + num: Number(getNumOfTone(item.originPinyin)), + isZh: item.isZh, + }; + }); + } + return Array.from(new Set(list.map((item) => item.result))).join(' '); +}; + +export { customPinyin, html, match, pinyin, polyphonic }; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/package.json b/npm-packages/mac-v3.4.+/pinyin-pro/package.json new file mode 100644 index 0000000..c89251f --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/package.json @@ -0,0 +1,82 @@ +{ + "name": "pinyin-pro", + "version": "3.16.0", + "description": "准确率和性能最优异的汉字转拼音库。获取中文拼音、韵母、声母、声调、首字母,支持拼音匹配", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "typings": "./types/index.d.ts", + "scripts": { + "test": "mocha", + "build": "rollup -c && rollup -c rollup.esm.config.js", + "commit": "git-cz", + "coverage": "istanbul cover _mocha -- -R spec --timeout 15000 --recursive", + "coverage:check": "istanbul check-coverage", + "cover": "istanbul cover --report lcov node_modules/mocha/bin/_mocha -- -R spec test/*.js", + "cover:local": "istanbul cover --report=html node_modules/mocha/bin/_mocha -- -R spec test/*.js", + "lint": "eslint ." + }, + "repository": { + "type": "git", + "url": "git+https://github.com/zh-lx/pinyin-pro.git" + }, + "files": [ + "dist", + "types" + ], + "keywords": [ + "拼音", + "pinyin", + "汉字", + "中文", + "首字母", + "韵母", + "声母", + "音调" + ], + "author": "zh-lx", + "license": "MIT", + "bugs": { + "url": "https://github.com/zh-lx/pinyin-pro/issues" + }, + "homepage": "https://pinyin-pro.cn", + "exports": { + ".": { + "import": { + "types": "./types/index.d.ts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./types/index.d.ts", + "default": "./dist/index.js" + } + } + }, + "devDependencies": { + "@commitlint/cli": "^11.0.0", + "@commitlint/config-conventional": "^11.0.0", + "@rollup/plugin-commonjs": "^17.1.0", + "@rollup/plugin-json": "^4.1.0", + "@rollup/plugin-node-resolve": "^11.2.0", + "@types/jest": "^26.0.20", + "@typescript-eslint/eslint-plugin": "^4.26.0", + "@typescript-eslint/parser": "^4.26.0", + "babel-eslint": "^10.1.0", + "chai": "^4.3.4", + "commitizen": "^4.2.2", + "coveralls": "^3.1.0", + "eslint": "^7.22.0", + "istanbul": "^0.4.5", + "mocha": "^8.3.2", + "rollup": "2.60.0", + "rollup-plugin-alias": "^2.2.0", + "rollup-plugin-cleanup": "^3.2.1", + "rollup-plugin-terser": "^7.0.2", + "rollup-plugin-typescript2": "^0.34.1", + "typescript": "^4.2.3" + }, + "config": { + "commitizen": { + "path": "node_modules/cz-conventional-changelog" + } + } +} diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/common/ac.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/common/ac.d.ts new file mode 100644 index 0000000..baaba66 --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/common/ac.d.ts @@ -0,0 +1,33 @@ +/** + * @description: AC 自动机 + */ +export interface Pattern { + zh: string; + pinyin: string; + priority: number; + length: number; +} +interface MatchPattern extends Pattern { + index: number; +} +declare class TrieNode { + children: Map; + fail: TrieNode | null; + isEnd: boolean; + pattern: Pattern | null; + constructor(); +} +export declare class AC { + root: TrieNode; + constructor(); + buildTrie(patterns: Pattern[]): void; + rebuildTrie(patterns: Pattern[]): void; + buildFailPointer(): void; + search(text: string): MatchPattern[]; + filter(patterns: MatchPattern[]): MatchPattern[]; +} +export declare const PatternsNormal: Pattern[]; +export declare const PatternsSurname: Pattern[]; +export declare const ACNormal: AC; +export declare const ACSurname: AC; +export {}; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/common/constant.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/common/constant.d.ts new file mode 100644 index 0000000..750d30d --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/common/constant.d.ts @@ -0,0 +1,2 @@ +export declare const DoubleUnicodePrefixReg: RegExp; +export declare const DoubleUnicodeSuffixReg: RegExp; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/common/type.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/common/type.d.ts new file mode 100644 index 0000000..17b2bff --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/common/type.d.ts @@ -0,0 +1,9 @@ +export interface SingleWordResult { + origin: string; + originPinyin: string; + result: string; + isZh: boolean; + delete?: boolean; +} +export declare type ToneType = 'symbol' | 'num' | 'none'; +export declare type PinyinMode = 'normal' | 'surname'; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/common/utils.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/common/utils.d.ts new file mode 100644 index 0000000..24062fb --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/common/utils.d.ts @@ -0,0 +1,3 @@ +export declare function getStringLength(string: string): number; +export declare function getSplittedWord(string: string): string[]; +export declare function isZhChar(char: string): boolean; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/core/custom/index.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/custom/index.d.ts new file mode 100644 index 0000000..ebd87c9 --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/custom/index.d.ts @@ -0,0 +1,11 @@ +/** + * @description: 用户自定义拼音 + * @param {{ [key: string]: string }} config 用户自定义的拼音映射(支持汉字、词语、句子的映射),若匹配到该映射,优先将汉字转换为该映射 + */ +export declare function customPinyin(config?: { + [key: string]: string; +}): void; +export declare const getCustomDict: () => { + [key: string]: string; +}; +export declare function hasCustomConfig(): boolean; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/core/html/index.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/html/index.d.ts new file mode 100644 index 0000000..843f004 --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/html/index.d.ts @@ -0,0 +1,34 @@ +interface HtmlOptions { + /** + * @description html 结果中每个字+拼音外层 span 标签的类名。默认为 py-result-item + */ + resultClass?: string; + /** + * @description html 结果中拼音 rt 标签的类名。默认为 py-pinyin-item + */ + pinyinClass?: string; + /** + * @description html 结果中汉字 span 标签的类名。默认为 py-chinese-item + */ + chineseClass?: string; + /** + * @description 是否用 span 标签包装非汉字字符的结果。默认为 false。建议输入的文本为纯文本时可以设置为 true;输入文本本身为 html 富文本字符串设置为 false + */ + wrapNonChinese?: boolean; + /** + * @description html 非汉字字符外层 span 标签的类名,仅当 wrapNonChinese 为 true 时生效。默认为 py-non-chinese-item + */ + nonChineseClass?: string; + /** + * @description 拼音上是否标注音调 + */ + toneType?: 'symbol' | 'num' | 'none'; +} +/** + * @description: 获取带拼音汉字的 html 字符串 + * @param {string} text 要转换的字符串 + * @param {HtmlOptions=} options html 中标签类名相关配置 + * @return {string} 带汉字的拼音字符串 + */ +export declare const html: (text: string, options?: HtmlOptions | undefined) => string; +export {}; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/core/match/index.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/match/index.d.ts new file mode 100644 index 0000000..ae1e082 --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/match/index.d.ts @@ -0,0 +1,27 @@ +interface MatchOptions { + /** + * @description 每个汉字和拼音需要遵从的匹配精度 + */ + precision?: 'first' | 'start' | 'every' | 'any'; + /** + * @description 匹配的汉字下标是否为连续的才算匹配成功 + */ + continuous?: boolean; + /** + * @description 匹配时对于空格的处理 + */ + space?: 'ignore' | 'preserve'; + /** + * @description 最后一个字的匹配精度 + */ + lastPrecision?: 'first' | 'start' | 'every' | 'any'; +} +/** + * @description: 检测汉语字符串和拼音是否匹配 + * @param {string} text 汉语字符串 + * @param {string} pinyin 拼音,支持各种缩写形式 + * @param {MatchOptions=} options 配置项 + * @return {Array | null} 若匹配成功,返回 text 中匹配成功的下标数组;若匹配失败,返回 null + */ +export declare const match: (text: string, pinyin: string, options?: MatchOptions | undefined) => any; +export {}; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/core/pinyin/handle.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/pinyin/handle.d.ts new file mode 100644 index 0000000..8ca7c1b --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/pinyin/handle.d.ts @@ -0,0 +1,60 @@ +import type { SingleWordResult, PinyinMode } from '../../common/type'; +export declare const getPinyin: (word: string, list: SingleWordResult[], mode: 'normal' | 'surname') => SingleWordResult[]; +/** + * @description: 将带音调符号拼音转换为不带音调拼音 + * @param {string} pinyin + * @return {string} + */ +declare type GetPinyinWithoutTone = (pinyin: string) => string; +declare const getPinyinWithoutTone: GetPinyinWithoutTone; +/** + * @description: 获取单字符的多音拼音 + * @param {string} word + * @return {WordResult[]} + */ +declare type GetMultiplePinyin = (word: string, mode?: PinyinMode) => SingleWordResult[]; +declare const getMultiplePinyin: GetMultiplePinyin; +/** + * @description: 获取拼音的声母和韵母 + * @param {string} pinyin + * @return {*} + */ +declare type GetInitialAndFinal = (pinyin: string) => { + final: string; + initial: string; +}; +declare const getInitialAndFinal: GetInitialAndFinal; +/** + * @description: 获取韵母的韵头、韵腹和韵尾 + * @param {string} pinyin + * @return {*} + */ +declare type GetFinalParts = (pinyin: string) => { + head: string; + body: string; + tail: string; +}; +declare const getFinalParts: GetFinalParts; +/** + * @description: 将带音调符号拼音转换为带音调数字 + * @param {string} pinyin + * @return {string} + */ +declare type GetNumOfTone = (pinyin: string) => string; +declare const getNumOfTone: GetNumOfTone; +/** + * @description: 将带音调符号拼音转换为带音调数字拼音 + * @param {string} pinyin + * @param {string} originPinyin + * @return {string} + */ +declare type GetPinyinWithNum = (pinyin: string, originPinyin: string) => string; +declare const getPinyinWithNum: GetPinyinWithNum; +/** + * @description: 获取拼音的首字母 + * @param {string} pinyin + * @return {string} + */ +declare type GetFirstLetter = (pinyin: string) => string; +declare const getFirstLetter: GetFirstLetter; +export { getPinyinWithoutTone, getInitialAndFinal, getMultiplePinyin, getNumOfTone, getPinyinWithNum, getFirstLetter, getFinalParts, }; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/core/pinyin/index.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/pinyin/index.d.ts new file mode 100644 index 0000000..4e0235f --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/pinyin/index.d.ts @@ -0,0 +1,130 @@ +interface BasicOptions { + /** + * @description 返回的拼音音调类型 + * @value symbol:在字母上加音调 (默认值) + * @value num:以数字格式展示音调,并跟在拼音后面 + * @value none:不展示音调 + */ + toneType?: 'symbol' | 'num' | 'none'; + /** + * @description 返回的拼音格式类型 + * @value pinyin:返回完整拼音 (默认值) + * @value initial:返回声母 + * @value final:返回韵母 + * @value num:返回音调对应的数字 + * @value first:返回首字母 + * @value finalHead:返回韵头(介音) + * @value finalBody:返回韵腹 + * @value finalTail:返回韵尾 + */ + pattern?: 'pinyin' | 'initial' | 'final' | 'num' | 'first' | 'finalHead' | 'finalBody' | 'finalTail'; + /** + * @description 是否返回单个汉字的所有多音,仅针对输入的 word 为单个汉字生效 + * @value false:返回最常用的一个拼音 (默认值) + * @value true:返回所有读音 + */ + multiple?: boolean; + /** + * @description 优先的拼音匹配模式 + * @value normal:正常匹配模式 (默认值) + * @value surname:姓氏模式,遇到姓氏表中的汉字时,优先匹配姓氏读音 + */ + mode?: 'normal' | 'surname'; + /** + * @description 是否移除非汉字字符(推荐使用 removeNonZh: removed 代替) + * @value false:返回结果保留非汉字字符 (默认值) + * @value true:返回结果移除非汉字字符 + */ + removeNonZh?: boolean; + /** + * @description 非汉字字符的间距格式 + * @value spaced:连续非汉字字符之间用空格隔开 (默认值) + * @value consecutive:连续非汉字字符无间距 + * @value removed:返回结果移除非汉字字符 + */ + nonZh?: 'spaced' | 'consecutive' | 'removed'; + /** + * @description 对于 ü 的返回是否转换成 v(仅在 toneType: none 启用时生效) + * @value false:返回值中保留 ü (默认值) + * @value true:返回值中 ü 转换成 v + */ + v?: boolean; +} +interface AllData { + origin: string; + pinyin: string; + initial: string; + final: string; + num: number; + first: string; + finalHead: string; + finalBody: string; + finalTail: string; + isZh: boolean; +} +interface OptionsReturnString extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type?: 'string'; + /** + * @description 拼音之间的分隔符,默认为空格,仅在 type 为 'string' 时生效 + */ + separator?: string; +} +interface OptionsReturnArray extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type: 'array'; +} +interface OptionsReturnAll extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type: 'all'; +} +export interface CompleteOptions extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type?: 'string' | 'array' | 'all'; + /** + * @description 拼音之间的分隔符,默认为空格,仅在 type 为 'string' 时生效 + */ + separator?: string; +} +/** + * @description: 获取汉语字符串的拼音 + * @param {string} word 要转换的汉语字符串 + * @param {OptionsReturnString=} options 配置项 + * @return {string | string[] | AllData[]} options.type 为 string 时,返回字符串,中间用空格隔开;为 array 时,返回拼音字符串数组;为 all 时返回全部信息的数组 + */ +declare function pinyin(word: string, options?: OptionsReturnString): string; +/** + * @description: 获取汉语字符串的拼音 + * @param {string} word 要转换的汉语字符串 + * @param {OptionsReturnArray=} options 配置项 + * @return {string | string[] | AllData[]} options.type 为 string 时,返回字符串,中间用空格隔开;为 array 时,返回拼音字符串数组;为 all 时返回全部信息的数组 + */ +declare function pinyin(word: string, options?: OptionsReturnArray): string[]; +/** + * @description: 获取汉语字符串的拼音 + * @param {string} word 要转换的汉语字符串 + * @param {OptionsReturnAll=} options 配置项 + * @return {string | string[] | AllData[]} options.type 为 string 时,返回字符串,中间用空格隔开;为 array 时,返回拼音字符串数组;为 all 时返回全部信息的数组 + */ +declare function pinyin(word: string, options?: OptionsReturnAll): AllData[]; +export { pinyin }; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/core/pinyin/middlewares.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/pinyin/middlewares.d.ts new file mode 100644 index 0000000..74285ca --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/pinyin/middlewares.d.ts @@ -0,0 +1,21 @@ +import type { SingleWordResult } from '../../common/type'; +import { CompleteOptions } from './index'; +export declare const validateType: (word: unknown) => boolean; +export declare const middleWareNonZh: (list: SingleWordResult[], options: CompleteOptions) => SingleWordResult[]; +export declare const middlewareMultiple: (word: string, options: CompleteOptions) => SingleWordResult[] | false; +export declare const middlewarePattern: (list: SingleWordResult[], options: CompleteOptions) => void; +export declare const middlewareToneType: (list: SingleWordResult[], options: CompleteOptions) => void; +export declare const middlewareV: (list: SingleWordResult[], options: CompleteOptions) => void; +export declare const middlewareType: (list: SingleWordResult[], options: CompleteOptions, word: string) => string | string[] | { + origin: string; + pinyin: string; + initial: string; + final: string; + first: string; + finalHead: string; + finalBody: string; + finalTail: string; + num: number; + isZh: boolean; +}[]; +export declare const middlewareDoubleUnicode: (list: SingleWordResult[]) => SingleWordResult[]; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/core/polyphonic/index.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/polyphonic/index.d.ts new file mode 100644 index 0000000..477ac63 --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/core/polyphonic/index.d.ts @@ -0,0 +1,117 @@ +import type { SingleWordResult } from '../../common/type'; +interface BasicOptions { + /** + * @description 返回的拼音音调类型 + * @value symbol:在字母上加音调 (默认值) + * @value num:以数字格式展示音调,并跟在拼音后面 + * @value none:不展示音调 + */ + toneType?: 'symbol' | 'num' | 'none'; + /** + * @description 返回的拼音格式类型 + * @value pinyin:返回完整拼音 (默认值) + * @value initial:返回声母 + * @value final:返回韵母 + * @value num:返回音调对应的数字 + * @value first:返回首字母 + * @value finalHead:返回韵头(介音) + * @value finalBody:返回韵腹 + * @value finalTail:返回韵尾 + */ + pattern?: 'pinyin' | 'initial' | 'final' | 'num' | 'first' | 'finalHead' | 'finalBody' | 'finalTail'; + /** + * @description 对于 ü 的返回是否转换成 v(仅在 toneType: none 启用时生效) + * @value false:返回值中保留 ü (默认值) + * @value true:返回值中 ü 转换成 v + */ + v?: boolean; + /** + * @description 非汉字字符的间距格式 + * @value spaced:连续非汉字字符之间用空格隔开 (默认值) + * @value consecutive:连续非汉字字符无间距 + * @value removed:返回结果移除非汉字字符 + */ + nonZh?: 'spaced' | 'consecutive' | 'removed'; +} +interface AllData { + origin: string; + pinyin: string; + initial: string; + final: string; + num: number; + first: string; + finalHead: string; + finalBody: string; + finalTail: string; + isZh: boolean; +} +interface OptionsReturnString extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type?: 'string'; +} +interface OptionsReturnArray extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type: 'array'; +} +interface OptionsReturnAll extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type: 'all'; +} +export interface CompleteOptions extends BasicOptions { + /** + * @description 返回结果的格式 + * @value string:以字符串格式返回,拼音之间用空格隔开 (默认值) + * @value array:以数组格式返回 + * @value array: 返回全部信息数组 + */ + type?: 'string' | 'array' | 'all'; +} +/** + * @description: 获取每个汉字的所有读音 + * @param {string} text 要转换的汉语字符串 + * @param {OptionsReturnString=} options 配置项 + * @return {string[] | string[][] | AllData[][]} options.type 为 string 时,返回字符串数组,中间用空格隔开;为 array 时,返回二维拼音字符串数组;为 all 时返回二维全部信息的数组 + */ +declare function polyphonic(text: string, options?: OptionsReturnString): string[]; +/** + * @description: 获取每个汉字的所有读音 + * @param {string} text 要转换的汉语字符串 + * @param {OptionsReturnArray=} options 配置项 + * @return {string[] | string[][] | AllData[][]} options.type 为 string 时,返回字符串数组,中间用空格隔开;为 array 时,返回二维拼音字符串数组;为 all 时返回二维全部信息的数组 + */ +declare function polyphonic(text: string, options?: OptionsReturnArray): string[][]; +/** + * @description: 获取每个汉字的所有读音 + * @param {string} text 要转换的汉语字符串 + * @param {OptionsReturnAll=} options 配置项 + * @return {string[] | string[][] | AllData[][]} options.type 为 string 时,返回字符串数组,中间用空格隔开;为 array 时,返回二维拼音字符串数组;为 all 时返回二维全部信息的数组 + */ +declare function polyphonic(text: string, options?: OptionsReturnAll): AllData[][]; +export declare const handleType: (list: SingleWordResult[], options: CompleteOptions) => string | string[] | { + origin: string; + pinyin: string; + initial: string; + final: string; + first: string; + finalHead: string; + finalBody: string; + finalTail: string; + num: number; + isZh: boolean; +}[]; +export { polyphonic }; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict1-pinyin.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict1-pinyin.d.ts new file mode 100644 index 0000000..5cfc665 --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict1-pinyin.d.ts @@ -0,0 +1,3 @@ +export declare const DICT1: { + [prop: string]: string; +}; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict1.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict1.d.ts new file mode 100644 index 0000000..0a6fc9b --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict1.d.ts @@ -0,0 +1,2 @@ +declare const DICT1: string[]; +export default DICT1; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict2.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict2.d.ts new file mode 100644 index 0000000..388e95b --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict2.d.ts @@ -0,0 +1,6 @@ +import type { Pattern } from '@/common/ac'; +declare const DICT2: { + [prop: string]: string; +}; +export default DICT2; +export declare const Pattern2: Pattern[]; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict3.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict3.d.ts new file mode 100644 index 0000000..4f5d2df --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict3.d.ts @@ -0,0 +1,6 @@ +import type { Pattern } from '@/common/ac'; +declare const DICT3: { + [prop: string]: string; +}; +export default DICT3; +export declare const Pattern3: Pattern[]; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict4.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict4.d.ts new file mode 100644 index 0000000..f6c2a87 --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict4.d.ts @@ -0,0 +1,6 @@ +import type { Pattern } from '@/common/ac'; +declare const DICT4: { + [prop: string]: string; +}; +export default DICT4; +export declare const Pattern4: Pattern[]; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict5.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict5.d.ts new file mode 100644 index 0000000..7d86cdf --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/dict5.d.ts @@ -0,0 +1,6 @@ +import type { Pattern } from '@/common/ac'; +declare const DICT5: { + [prop: string]: string; +}; +export default DICT5; +export declare const Pattern5: Pattern[]; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/data/special.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/special.d.ts new file mode 100644 index 0000000..3bd4305 --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/special.d.ts @@ -0,0 +1,26 @@ +export declare const InitialList: string[]; +export declare const SpecialInitialList: string[]; +export declare const SpecialFinalList: string[]; +export declare const SpecialFinalMap: { + uān: string; + uán: string; + uǎn: string; + uàn: string; + uan: string; + uē: string; + ué: string; + uě: string; + uè: string; + ue: string; + ūn: string; + ún: string; + ǔn: string; + ùn: string; + un: string; + ū: string; + ú: string; + ǔ: string; + ù: string; + u: string; +}; +export declare const doubleFinalList: string[]; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/data/surname.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/surname.d.ts new file mode 100644 index 0000000..ebc3e8e --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/data/surname.d.ts @@ -0,0 +1,6 @@ +import type { Pattern } from '@/common/ac'; +declare const Surnames: { + [key: string]: string; +}; +export default Surnames; +export declare const PatternSurname: Pattern[]; diff --git a/npm-packages/mac-v3.4.+/pinyin-pro/types/index.d.ts b/npm-packages/mac-v3.4.+/pinyin-pro/types/index.d.ts new file mode 100644 index 0000000..a3de977 --- /dev/null +++ b/npm-packages/mac-v3.4.+/pinyin-pro/types/index.d.ts @@ -0,0 +1,5 @@ +export { pinyin } from './core/pinyin'; +export { customPinyin } from './core/custom'; +export { match } from './core/match'; +export { html } from './core/html'; +export { polyphonic } from './core/polyphonic'; diff --git a/release/ccc-tnt-psd2ui-v3.4.+-mac.zip b/release/ccc-tnt-psd2ui-v3.4.+-mac.zip new file mode 100644 index 0000000..588c880 Binary files /dev/null and b/release/ccc-tnt-psd2ui-v3.4.+-mac.zip differ diff --git a/src/index.js b/src/index.js index ff9f5b6..4c7d897 100644 --- a/src/index.js +++ b/src/index.js @@ -164,6 +164,6 @@ function reWritePackage() { }) } -//version = "v3.4.+" - version = "v2.4.x" +version = "v3.4.+" +// version = "v2.4.x" taskStart(`${projectName}-${version}`);