@basemaps/lambda-tiler 6.41.0 → 6.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/build/__tests__/index.test.js +17 -5
- package/build/__tests__/index.test.js.map +1 -1
- package/build/cli/render.preview.d.ts +2 -0
- package/build/cli/render.preview.d.ts.map +1 -0
- package/build/cli/render.preview.js +38 -0
- package/build/cli/render.preview.js.map +1 -0
- package/build/cli/render.tile.js +25 -10
- package/build/cli/render.tile.js.map +1 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +6 -0
- package/build/index.js.map +1 -1
- package/build/routes/__tests__/preview.index.test.d.ts +2 -0
- package/build/routes/__tests__/preview.index.test.d.ts.map +1 -0
- package/build/routes/__tests__/preview.index.test.js +82 -0
- package/build/routes/__tests__/preview.index.test.js.map +1 -0
- package/build/routes/attribution.d.ts.map +1 -1
- package/build/routes/attribution.js +1 -3
- package/build/routes/attribution.js.map +1 -1
- package/build/routes/preview.d.ts +58 -0
- package/build/routes/preview.d.ts.map +1 -0
- package/build/routes/preview.index.d.ts +23 -0
- package/build/routes/preview.index.d.ts.map +1 -0
- package/build/routes/preview.index.js +98 -0
- package/build/routes/preview.index.js.map +1 -0
- package/build/routes/preview.js +159 -0
- package/build/routes/preview.js.map +1 -0
- package/build/routes/tile.xyz.raster.d.ts +15 -0
- package/build/routes/tile.xyz.raster.d.ts.map +1 -1
- package/build/routes/tile.xyz.raster.js +45 -26
- package/build/routes/tile.xyz.raster.js.map +1 -1
- package/build/routes/version.d.ts.map +1 -1
- package/build/routes/version.js +17 -1
- package/build/routes/version.js.map +1 -1
- package/build/util/validate.d.ts +3 -1
- package/build/util/validate.d.ts.map +1 -1
- package/build/util/validate.js +10 -0
- package/build/util/validate.js.map +1 -1
- package/bundle.sh +1 -1
- package/package.json +9 -9
- package/src/__tests__/index.test.ts +20 -5
- package/src/cli/render.preview.ts +44 -0
- package/src/cli/render.tile.ts +26 -10
- package/src/index.ts +7 -0
- package/src/routes/__tests__/preview.index.test.ts +94 -0
- package/src/routes/attribution.ts +1 -3
- package/src/routes/preview.index.ts +119 -0
- package/src/routes/preview.ts +234 -0
- package/src/routes/tile.xyz.raster.ts +53 -29
- package/src/routes/version.ts +17 -1
- package/src/util/validate.ts +10 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/index.js +0 -229
- package/dist/node_modules/.package-lock.json +0 -491
- package/dist/node_modules/base64-js/LICENSE +0 -21
- package/dist/node_modules/base64-js/README.md +0 -34
- package/dist/node_modules/base64-js/base64js.min.js +0 -1
- package/dist/node_modules/base64-js/index.d.ts +0 -3
- package/dist/node_modules/base64-js/index.js +0 -150
- package/dist/node_modules/base64-js/package.json +0 -47
- package/dist/node_modules/bl/.travis.yml +0 -17
- package/dist/node_modules/bl/BufferList.js +0 -396
- package/dist/node_modules/bl/LICENSE.md +0 -13
- package/dist/node_modules/bl/README.md +0 -247
- package/dist/node_modules/bl/bl.js +0 -84
- package/dist/node_modules/bl/package.json +0 -37
- package/dist/node_modules/bl/test/convert.js +0 -21
- package/dist/node_modules/bl/test/indexOf.js +0 -492
- package/dist/node_modules/bl/test/isBufferList.js +0 -32
- package/dist/node_modules/bl/test/test.js +0 -869
- package/dist/node_modules/buffer/AUTHORS.md +0 -70
- package/dist/node_modules/buffer/LICENSE +0 -21
- package/dist/node_modules/buffer/README.md +0 -410
- package/dist/node_modules/buffer/index.d.ts +0 -186
- package/dist/node_modules/buffer/index.js +0 -1817
- package/dist/node_modules/buffer/package.json +0 -96
- package/dist/node_modules/chownr/LICENSE +0 -15
- package/dist/node_modules/chownr/README.md +0 -3
- package/dist/node_modules/chownr/chownr.js +0 -167
- package/dist/node_modules/chownr/package.json +0 -29
- package/dist/node_modules/color/LICENSE +0 -21
- package/dist/node_modules/color/README.md +0 -123
- package/dist/node_modules/color/index.js +0 -496
- package/dist/node_modules/color/package.json +0 -47
- package/dist/node_modules/color-convert/CHANGELOG.md +0 -54
- package/dist/node_modules/color-convert/LICENSE +0 -21
- package/dist/node_modules/color-convert/README.md +0 -68
- package/dist/node_modules/color-convert/conversions.js +0 -839
- package/dist/node_modules/color-convert/index.js +0 -81
- package/dist/node_modules/color-convert/package.json +0 -48
- package/dist/node_modules/color-convert/route.js +0 -97
- package/dist/node_modules/color-name/LICENSE +0 -8
- package/dist/node_modules/color-name/README.md +0 -11
- package/dist/node_modules/color-name/index.js +0 -152
- package/dist/node_modules/color-name/package.json +0 -28
- package/dist/node_modules/color-string/LICENSE +0 -21
- package/dist/node_modules/color-string/README.md +0 -62
- package/dist/node_modules/color-string/index.js +0 -242
- package/dist/node_modules/color-string/package.json +0 -39
- package/dist/node_modules/decompress-response/index.d.ts +0 -22
- package/dist/node_modules/decompress-response/index.js +0 -58
- package/dist/node_modules/decompress-response/license +0 -9
- package/dist/node_modules/decompress-response/package.json +0 -56
- package/dist/node_modules/decompress-response/readme.md +0 -48
- package/dist/node_modules/deep-extend/CHANGELOG.md +0 -46
- package/dist/node_modules/deep-extend/LICENSE +0 -20
- package/dist/node_modules/deep-extend/README.md +0 -91
- package/dist/node_modules/deep-extend/index.js +0 -1
- package/dist/node_modules/deep-extend/lib/deep-extend.js +0 -150
- package/dist/node_modules/deep-extend/package.json +0 -62
- package/dist/node_modules/detect-libc/LICENSE +0 -201
- package/dist/node_modules/detect-libc/README.md +0 -163
- package/dist/node_modules/detect-libc/index.d.ts +0 -14
- package/dist/node_modules/detect-libc/lib/detect-libc.js +0 -279
- package/dist/node_modules/detect-libc/lib/filesystem.js +0 -41
- package/dist/node_modules/detect-libc/lib/process.js +0 -19
- package/dist/node_modules/detect-libc/package.json +0 -40
- package/dist/node_modules/end-of-stream/LICENSE +0 -21
- package/dist/node_modules/end-of-stream/README.md +0 -54
- package/dist/node_modules/end-of-stream/index.js +0 -94
- package/dist/node_modules/end-of-stream/package.json +0 -37
- package/dist/node_modules/expand-template/.travis.yml +0 -6
- package/dist/node_modules/expand-template/LICENSE +0 -21
- package/dist/node_modules/expand-template/README.md +0 -43
- package/dist/node_modules/expand-template/index.js +0 -26
- package/dist/node_modules/expand-template/package.json +0 -29
- package/dist/node_modules/expand-template/test.js +0 -67
- package/dist/node_modules/fs-constants/LICENSE +0 -21
- package/dist/node_modules/fs-constants/README.md +0 -26
- package/dist/node_modules/fs-constants/browser.js +0 -1
- package/dist/node_modules/fs-constants/index.js +0 -1
- package/dist/node_modules/fs-constants/package.json +0 -19
- package/dist/node_modules/github-from-package/.travis.yml +0 -4
- package/dist/node_modules/github-from-package/LICENSE +0 -18
- package/dist/node_modules/github-from-package/example/package.json +0 -8
- package/dist/node_modules/github-from-package/example/url.js +0 -3
- package/dist/node_modules/github-from-package/index.js +0 -17
- package/dist/node_modules/github-from-package/package.json +0 -30
- package/dist/node_modules/github-from-package/readme.markdown +0 -53
- package/dist/node_modules/github-from-package/test/a.json +0 -8
- package/dist/node_modules/github-from-package/test/b.json +0 -5
- package/dist/node_modules/github-from-package/test/c.json +0 -5
- package/dist/node_modules/github-from-package/test/d.json +0 -7
- package/dist/node_modules/github-from-package/test/e.json +0 -5
- package/dist/node_modules/github-from-package/test/url.js +0 -19
- package/dist/node_modules/ieee754/LICENSE +0 -11
- package/dist/node_modules/ieee754/README.md +0 -51
- package/dist/node_modules/ieee754/index.d.ts +0 -10
- package/dist/node_modules/ieee754/index.js +0 -85
- package/dist/node_modules/ieee754/package.json +0 -52
- package/dist/node_modules/inherits/LICENSE +0 -16
- package/dist/node_modules/inherits/README.md +0 -42
- package/dist/node_modules/inherits/inherits.js +0 -9
- package/dist/node_modules/inherits/inherits_browser.js +0 -27
- package/dist/node_modules/inherits/package.json +0 -29
- package/dist/node_modules/ini/LICENSE +0 -15
- package/dist/node_modules/ini/README.md +0 -102
- package/dist/node_modules/ini/ini.js +0 -206
- package/dist/node_modules/ini/package.json +0 -33
- package/dist/node_modules/is-arrayish/LICENSE +0 -21
- package/dist/node_modules/is-arrayish/README.md +0 -16
- package/dist/node_modules/is-arrayish/index.js +0 -9
- package/dist/node_modules/is-arrayish/package.json +0 -45
- package/dist/node_modules/is-arrayish/yarn-error.log +0 -1443
- package/dist/node_modules/lru-cache/LICENSE +0 -15
- package/dist/node_modules/lru-cache/README.md +0 -166
- package/dist/node_modules/lru-cache/index.js +0 -334
- package/dist/node_modules/lru-cache/package.json +0 -34
- package/dist/node_modules/mimic-response/index.d.ts +0 -17
- package/dist/node_modules/mimic-response/index.js +0 -77
- package/dist/node_modules/mimic-response/license +0 -9
- package/dist/node_modules/mimic-response/package.json +0 -42
- package/dist/node_modules/mimic-response/readme.md +0 -78
- package/dist/node_modules/minimist/.eslintrc +0 -29
- package/dist/node_modules/minimist/.github/FUNDING.yml +0 -12
- package/dist/node_modules/minimist/.nycrc +0 -14
- package/dist/node_modules/minimist/CHANGELOG.md +0 -298
- package/dist/node_modules/minimist/LICENSE +0 -18
- package/dist/node_modules/minimist/README.md +0 -121
- package/dist/node_modules/minimist/example/parse.js +0 -4
- package/dist/node_modules/minimist/index.js +0 -263
- package/dist/node_modules/minimist/package.json +0 -75
- package/dist/node_modules/minimist/test/all_bool.js +0 -34
- package/dist/node_modules/minimist/test/bool.js +0 -177
- package/dist/node_modules/minimist/test/dash.js +0 -43
- package/dist/node_modules/minimist/test/default_bool.js +0 -37
- package/dist/node_modules/minimist/test/dotted.js +0 -24
- package/dist/node_modules/minimist/test/kv_short.js +0 -32
- package/dist/node_modules/minimist/test/long.js +0 -33
- package/dist/node_modules/minimist/test/num.js +0 -38
- package/dist/node_modules/minimist/test/parse.js +0 -209
- package/dist/node_modules/minimist/test/parse_modified.js +0 -11
- package/dist/node_modules/minimist/test/proto.js +0 -64
- package/dist/node_modules/minimist/test/short.js +0 -69
- package/dist/node_modules/minimist/test/stop_early.js +0 -17
- package/dist/node_modules/minimist/test/unknown.js +0 -104
- package/dist/node_modules/minimist/test/whitespace.js +0 -10
- package/dist/node_modules/mkdirp-classic/LICENSE +0 -21
- package/dist/node_modules/mkdirp-classic/README.md +0 -18
- package/dist/node_modules/mkdirp-classic/index.js +0 -98
- package/dist/node_modules/mkdirp-classic/package.json +0 -18
- package/dist/node_modules/napi-build-utils/LICENSE +0 -21
- package/dist/node_modules/napi-build-utils/README.md +0 -48
- package/dist/node_modules/napi-build-utils/index.js +0 -213
- package/dist/node_modules/napi-build-utils/index.md +0 -81
- package/dist/node_modules/napi-build-utils/package.json +0 -41
- package/dist/node_modules/node-abi/.circleci/config.yml +0 -45
- package/dist/node_modules/node-abi/.github/CODEOWNERS +0 -1
- package/dist/node_modules/node-abi/.github/workflows/semantic.yml +0 -26
- package/dist/node_modules/node-abi/.github/workflows/update-abi.yml +0 -42
- package/dist/node_modules/node-abi/.releaserc.json +0 -9
- package/dist/node_modules/node-abi/CODE_OF_CONDUCT.md +0 -73
- package/dist/node_modules/node-abi/CONTRIBUTING.md +0 -62
- package/dist/node_modules/node-abi/LICENSE +0 -21
- package/dist/node_modules/node-abi/README.md +0 -52
- package/dist/node_modules/node-abi/abi_registry.json +0 -269
- package/dist/node_modules/node-abi/index.js +0 -179
- package/dist/node_modules/node-abi/package.json +0 -38
- package/dist/node_modules/node-abi/scripts/update-abi-registry.js +0 -119
- package/dist/node_modules/node-abi/test/index.js +0 -166
- package/dist/node_modules/node-addon-api/LICENSE.md +0 -13
- package/dist/node_modules/node-addon-api/README.md +0 -317
- package/dist/node_modules/node-addon-api/common.gypi +0 -21
- package/dist/node_modules/node-addon-api/except.gypi +0 -25
- package/dist/node_modules/node-addon-api/index.js +0 -11
- package/dist/node_modules/node-addon-api/napi-inl.deprecated.h +0 -186
- package/dist/node_modules/node-addon-api/napi-inl.h +0 -6303
- package/dist/node_modules/node-addon-api/napi.h +0 -3114
- package/dist/node_modules/node-addon-api/node_api.gyp +0 -9
- package/dist/node_modules/node-addon-api/noexcept.gypi +0 -26
- package/dist/node_modules/node-addon-api/nothing.c +0 -0
- package/dist/node_modules/node-addon-api/package-support.json +0 -21
- package/dist/node_modules/node-addon-api/package.json +0 -456
- package/dist/node_modules/node-addon-api/tools/README.md +0 -73
- package/dist/node_modules/node-addon-api/tools/check-napi.js +0 -99
- package/dist/node_modules/node-addon-api/tools/clang-format.js +0 -71
- package/dist/node_modules/node-addon-api/tools/conversion.js +0 -301
- package/dist/node_modules/node-addon-api/tools/eslint-format.js +0 -79
- package/dist/node_modules/once/LICENSE +0 -15
- package/dist/node_modules/once/README.md +0 -79
- package/dist/node_modules/once/once.js +0 -42
- package/dist/node_modules/once/package.json +0 -33
- package/dist/node_modules/prebuild-install/CHANGELOG.md +0 -116
- package/dist/node_modules/prebuild-install/CONTRIBUTING.md +0 -6
- package/dist/node_modules/prebuild-install/LICENSE +0 -21
- package/dist/node_modules/prebuild-install/README.md +0 -163
- package/dist/node_modules/prebuild-install/asset.js +0 -44
- package/dist/node_modules/prebuild-install/bin.js +0 -78
- package/dist/node_modules/prebuild-install/download.js +0 -142
- package/dist/node_modules/prebuild-install/error.js +0 -14
- package/dist/node_modules/prebuild-install/help.txt +0 -16
- package/dist/node_modules/prebuild-install/index.js +0 -1
- package/dist/node_modules/prebuild-install/log.js +0 -33
- package/dist/node_modules/prebuild-install/package.json +0 -67
- package/dist/node_modules/prebuild-install/proxy.js +0 -35
- package/dist/node_modules/prebuild-install/rc.js +0 -64
- package/dist/node_modules/prebuild-install/util.js +0 -143
- package/dist/node_modules/pump/.travis.yml +0 -5
- package/dist/node_modules/pump/LICENSE +0 -21
- package/dist/node_modules/pump/README.md +0 -65
- package/dist/node_modules/pump/index.js +0 -82
- package/dist/node_modules/pump/package.json +0 -24
- package/dist/node_modules/pump/test-browser.js +0 -66
- package/dist/node_modules/pump/test-node.js +0 -53
- package/dist/node_modules/rc/LICENSE.APACHE2 +0 -15
- package/dist/node_modules/rc/LICENSE.BSD +0 -26
- package/dist/node_modules/rc/LICENSE.MIT +0 -24
- package/dist/node_modules/rc/README.md +0 -227
- package/dist/node_modules/rc/browser.js +0 -7
- package/dist/node_modules/rc/cli.js +0 -4
- package/dist/node_modules/rc/index.js +0 -53
- package/dist/node_modules/rc/lib/utils.js +0 -104
- package/dist/node_modules/rc/package.json +0 -29
- package/dist/node_modules/rc/test/ini.js +0 -16
- package/dist/node_modules/rc/test/nested-env-vars.js +0 -50
- package/dist/node_modules/rc/test/test.js +0 -59
- package/dist/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/dist/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/dist/node_modules/readable-stream/LICENSE +0 -47
- package/dist/node_modules/readable-stream/README.md +0 -106
- package/dist/node_modules/readable-stream/errors-browser.js +0 -127
- package/dist/node_modules/readable-stream/errors.js +0 -116
- package/dist/node_modules/readable-stream/experimentalWarning.js +0 -17
- package/dist/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
- package/dist/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
- package/dist/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
- package/dist/node_modules/readable-stream/lib/_stream_transform.js +0 -190
- package/dist/node_modules/readable-stream/lib/_stream_writable.js +0 -641
- package/dist/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
- package/dist/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
- package/dist/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
- package/dist/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
- package/dist/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
- package/dist/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
- package/dist/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
- package/dist/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
- package/dist/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/dist/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/dist/node_modules/readable-stream/package.json +0 -68
- package/dist/node_modules/readable-stream/readable-browser.js +0 -9
- package/dist/node_modules/readable-stream/readable.js +0 -16
- package/dist/node_modules/safe-buffer/LICENSE +0 -21
- package/dist/node_modules/safe-buffer/README.md +0 -584
- package/dist/node_modules/safe-buffer/index.d.ts +0 -187
- package/dist/node_modules/safe-buffer/index.js +0 -65
- package/dist/node_modules/safe-buffer/package.json +0 -51
- package/dist/node_modules/semver/LICENSE +0 -15
- package/dist/node_modules/semver/README.md +0 -637
- package/dist/node_modules/semver/bin/semver.js +0 -197
- package/dist/node_modules/semver/classes/comparator.js +0 -141
- package/dist/node_modules/semver/classes/index.js +0 -5
- package/dist/node_modules/semver/classes/range.js +0 -539
- package/dist/node_modules/semver/classes/semver.js +0 -302
- package/dist/node_modules/semver/functions/clean.js +0 -6
- package/dist/node_modules/semver/functions/cmp.js +0 -52
- package/dist/node_modules/semver/functions/coerce.js +0 -52
- package/dist/node_modules/semver/functions/compare-build.js +0 -7
- package/dist/node_modules/semver/functions/compare-loose.js +0 -3
- package/dist/node_modules/semver/functions/compare.js +0 -5
- package/dist/node_modules/semver/functions/diff.js +0 -65
- package/dist/node_modules/semver/functions/eq.js +0 -3
- package/dist/node_modules/semver/functions/gt.js +0 -3
- package/dist/node_modules/semver/functions/gte.js +0 -3
- package/dist/node_modules/semver/functions/inc.js +0 -19
- package/dist/node_modules/semver/functions/lt.js +0 -3
- package/dist/node_modules/semver/functions/lte.js +0 -3
- package/dist/node_modules/semver/functions/major.js +0 -3
- package/dist/node_modules/semver/functions/minor.js +0 -3
- package/dist/node_modules/semver/functions/neq.js +0 -3
- package/dist/node_modules/semver/functions/parse.js +0 -16
- package/dist/node_modules/semver/functions/patch.js +0 -3
- package/dist/node_modules/semver/functions/prerelease.js +0 -6
- package/dist/node_modules/semver/functions/rcompare.js +0 -3
- package/dist/node_modules/semver/functions/rsort.js +0 -3
- package/dist/node_modules/semver/functions/satisfies.js +0 -10
- package/dist/node_modules/semver/functions/sort.js +0 -3
- package/dist/node_modules/semver/functions/valid.js +0 -6
- package/dist/node_modules/semver/index.js +0 -89
- package/dist/node_modules/semver/internal/constants.js +0 -35
- package/dist/node_modules/semver/internal/debug.js +0 -9
- package/dist/node_modules/semver/internal/identifiers.js +0 -23
- package/dist/node_modules/semver/internal/parse-options.js +0 -15
- package/dist/node_modules/semver/internal/re.js +0 -212
- package/dist/node_modules/semver/package.json +0 -87
- package/dist/node_modules/semver/preload.js +0 -2
- package/dist/node_modules/semver/range.bnf +0 -16
- package/dist/node_modules/semver/ranges/gtr.js +0 -4
- package/dist/node_modules/semver/ranges/intersects.js +0 -7
- package/dist/node_modules/semver/ranges/ltr.js +0 -4
- package/dist/node_modules/semver/ranges/max-satisfying.js +0 -25
- package/dist/node_modules/semver/ranges/min-satisfying.js +0 -24
- package/dist/node_modules/semver/ranges/min-version.js +0 -61
- package/dist/node_modules/semver/ranges/outside.js +0 -80
- package/dist/node_modules/semver/ranges/simplify.js +0 -47
- package/dist/node_modules/semver/ranges/subset.js +0 -247
- package/dist/node_modules/semver/ranges/to-comparators.js +0 -8
- package/dist/node_modules/semver/ranges/valid.js +0 -11
- package/dist/node_modules/sharp/LICENSE +0 -191
- package/dist/node_modules/sharp/README.md +0 -117
- package/dist/node_modules/sharp/binding.gyp +0 -233
- package/dist/node_modules/sharp/build/Release/sharp-linux-x64.node +0 -0
- package/dist/node_modules/sharp/install/can-compile.js +0 -11
- package/dist/node_modules/sharp/install/dll-copy.js +0 -37
- package/dist/node_modules/sharp/install/libvips.js +0 -215
- package/dist/node_modules/sharp/lib/agent.js +0 -40
- package/dist/node_modules/sharp/lib/channel.js +0 -171
- package/dist/node_modules/sharp/lib/colour.js +0 -180
- package/dist/node_modules/sharp/lib/composite.js +0 -193
- package/dist/node_modules/sharp/lib/constructor.js +0 -386
- package/dist/node_modules/sharp/lib/index.js +0 -13
- package/dist/node_modules/sharp/lib/input.js +0 -507
- package/dist/node_modules/sharp/lib/is.js +0 -143
- package/dist/node_modules/sharp/lib/libvips.js +0 -136
- package/dist/node_modules/sharp/lib/operation.js +0 -803
- package/dist/node_modules/sharp/lib/output.js +0 -1231
- package/dist/node_modules/sharp/lib/platform.js +0 -27
- package/dist/node_modules/sharp/lib/resize.js +0 -473
- package/dist/node_modules/sharp/lib/sharp.js +0 -35
- package/dist/node_modules/sharp/lib/utility.js +0 -211
- package/dist/node_modules/sharp/package.json +0 -196
- package/dist/node_modules/sharp/src/common.cc +0 -966
- package/dist/node_modules/sharp/src/common.h +0 -352
- package/dist/node_modules/sharp/src/libvips/cplusplus/VConnection.cpp +0 -152
- package/dist/node_modules/sharp/src/libvips/cplusplus/VError.cpp +0 -50
- package/dist/node_modules/sharp/src/libvips/cplusplus/VImage.cpp +0 -1523
- package/dist/node_modules/sharp/src/libvips/cplusplus/VInterpolate.cpp +0 -63
- package/dist/node_modules/sharp/src/libvips/cplusplus/vips-operators.cpp +0 -3738
- package/dist/node_modules/sharp/src/metadata.cc +0 -291
- package/dist/node_modules/sharp/src/metadata.h +0 -92
- package/dist/node_modules/sharp/src/operations.cc +0 -412
- package/dist/node_modules/sharp/src/operations.h +0 -126
- package/dist/node_modules/sharp/src/pipeline.cc +0 -1624
- package/dist/node_modules/sharp/src/pipeline.h +0 -349
- package/dist/node_modules/sharp/src/sharp.cc +0 -52
- package/dist/node_modules/sharp/src/stats.cc +0 -193
- package/dist/node_modules/sharp/src/stats.h +0 -70
- package/dist/node_modules/sharp/src/utilities.cc +0 -243
- package/dist/node_modules/sharp/src/utilities.h +0 -29
- package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/THIRD-PARTY-NOTICES.md +0 -43
- package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/lib/libvips-cpp.so.42 +0 -0
- package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/platform.json +0 -1
- package/dist/node_modules/sharp/vendor/8.12.2/linux-x64/versions.json +0 -31
- package/dist/node_modules/simple-concat/.travis.yml +0 -3
- package/dist/node_modules/simple-concat/LICENSE +0 -20
- package/dist/node_modules/simple-concat/README.md +0 -44
- package/dist/node_modules/simple-concat/index.js +0 -15
- package/dist/node_modules/simple-concat/package.json +0 -47
- package/dist/node_modules/simple-concat/test/basic.js +0 -41
- package/dist/node_modules/simple-get/.github/dependabot.yml +0 -15
- package/dist/node_modules/simple-get/.github/workflows/ci.yml +0 -23
- package/dist/node_modules/simple-get/LICENSE +0 -20
- package/dist/node_modules/simple-get/README.md +0 -333
- package/dist/node_modules/simple-get/index.js +0 -108
- package/dist/node_modules/simple-get/package.json +0 -67
- package/dist/node_modules/simple-swizzle/LICENSE +0 -21
- package/dist/node_modules/simple-swizzle/README.md +0 -39
- package/dist/node_modules/simple-swizzle/index.js +0 -29
- package/dist/node_modules/simple-swizzle/package.json +0 -36
- package/dist/node_modules/string_decoder/LICENSE +0 -48
- package/dist/node_modules/string_decoder/README.md +0 -47
- package/dist/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/dist/node_modules/string_decoder/package.json +0 -34
- package/dist/node_modules/strip-json-comments/index.js +0 -70
- package/dist/node_modules/strip-json-comments/license +0 -21
- package/dist/node_modules/strip-json-comments/package.json +0 -42
- package/dist/node_modules/strip-json-comments/readme.md +0 -64
- package/dist/node_modules/tar-fs/.travis.yml +0 -6
- package/dist/node_modules/tar-fs/LICENSE +0 -21
- package/dist/node_modules/tar-fs/README.md +0 -165
- package/dist/node_modules/tar-fs/index.js +0 -351
- package/dist/node_modules/tar-fs/package.json +0 -41
- package/dist/node_modules/tar-fs/test/fixtures/a/hello.txt +0 -1
- package/dist/node_modules/tar-fs/test/fixtures/b/a/test.txt +0 -1
- package/dist/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/e/file +0 -0
- package/dist/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
- package/dist/node_modules/tar-fs/test/index.js +0 -346
- package/dist/node_modules/tar-stream/LICENSE +0 -21
- package/dist/node_modules/tar-stream/README.md +0 -168
- package/dist/node_modules/tar-stream/extract.js +0 -257
- package/dist/node_modules/tar-stream/headers.js +0 -295
- package/dist/node_modules/tar-stream/index.js +0 -2
- package/dist/node_modules/tar-stream/pack.js +0 -255
- package/dist/node_modules/tar-stream/package.json +0 -58
- package/dist/node_modules/tar-stream/sandbox.js +0 -11
- package/dist/node_modules/tunnel-agent/LICENSE +0 -55
- package/dist/node_modules/tunnel-agent/README.md +0 -4
- package/dist/node_modules/tunnel-agent/index.js +0 -244
- package/dist/node_modules/tunnel-agent/package.json +0 -22
- package/dist/node_modules/util-deprecate/History.md +0 -16
- package/dist/node_modules/util-deprecate/LICENSE +0 -24
- package/dist/node_modules/util-deprecate/README.md +0 -53
- package/dist/node_modules/util-deprecate/browser.js +0 -67
- package/dist/node_modules/util-deprecate/node.js +0 -6
- package/dist/node_modules/util-deprecate/package.json +0 -27
- package/dist/node_modules/wrappy/LICENSE +0 -15
- package/dist/node_modules/wrappy/README.md +0 -36
- package/dist/node_modules/wrappy/package.json +0 -29
- package/dist/node_modules/wrappy/wrappy.js +0 -33
- package/dist/node_modules/yallist/LICENSE +0 -15
- package/dist/node_modules/yallist/README.md +0 -204
- package/dist/node_modules/yallist/iterator.js +0 -8
- package/dist/node_modules/yallist/package.json +0 -29
- package/dist/node_modules/yallist/yallist.js +0 -426
- package/dist/package-lock.json +0 -502
- package/dist/package.json +0 -38
- package/dist/static/expected_tile_2193_153_255_z7.png +0 -0
- package/dist/static/expected_tile_NZTM2000Quad_30_33_z6.png +0 -0
- package/dist/static/expected_tile_WebMercatorQuad_252_156_z8.png +0 -0
package/dist/index.js
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
"use strict";var C_=Object.create;var Wl=Object.defineProperty;var R_=Object.getOwnPropertyDescriptor;var T_=Object.getOwnPropertyNames;var N_=Object.getPrototypeOf,A_=Object.prototype.hasOwnProperty;var M_=(t,e,r)=>e in t?Wl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Gl=(t,e)=>()=>(t&&(e=t(t=0)),e);var U=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),N2=(t,e)=>{for(var r in e)Wl(t,r,{get:e[r],enumerable:!0})},A2=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of T_(e))!A_.call(t,n)&&n!==r&&Wl(t,n,{get:()=>e[n],enumerable:!(i=R_(e,n))||i.enumerable});return t};var ze=(t,e,r)=>(r=t!=null?C_(N_(t)):{},A2(e||!t||!t.__esModule?Wl(r,"default",{value:t,enumerable:!0}):r,t)),k_=t=>A2(Wl({},"__esModule",{value:!0}),t);var $p=(t,e,r)=>(M_(t,typeof e!="symbol"?e+"":e,r),r),M2=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var Ye=(t,e,r)=>(M2(t,e,"read from private field"),r?r.call(t):e.get(t)),fr=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},kt=(t,e,r,i)=>(M2(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r),Xp=(t,e,r,i)=>({set _(n){kt(t,e,n,r)},get _(){return Ye(t,e,i)}});var L2=U((PU,P2)=>{"use strict";var Jp=t=>{if(!t)return;let e=t.cause;if(typeof e=="function"){let r=t.cause();return r instanceof Error?r:void 0}else return e instanceof Error?e:void 0},k2=(t,e)=>{if(!(t instanceof Error))return"";let r=t.stack||"";if(e.has(t))return r+`
|
|
2
|
-
causes have become circular...`;let i=Jp(t);return i?(e.add(t),r+`
|
|
3
|
-
caused by: `+k2(i,e)):r},I_=t=>k2(t,new Set),I2=(t,e,r)=>{if(!(t instanceof Error))return"";let i=r?"":t.message||"";if(e.has(t))return i+": ...";let n=Jp(t);if(n){e.add(t);let s=typeof t.cause=="function";return i+(s?"":": ")+I2(n,e,s)}else return i},P_=t=>I2(t,new Set);P2.exports={getErrorCause:Jp,stackWithCauses:I_,messageWithCauses:P_}});var D2=U((LU,B2)=>{"use strict";B2.exports=Qp;var{messageWithCauses:L_,stackWithCauses:O_}=L2(),{toString:B_}=Object.prototype,Yp=Symbol("circular-ref-tag"),Zp=Symbol("pino-raw-err-ref"),O2=Object.create({},{type:{enumerable:!0,writable:!0,value:void 0},message:{enumerable:!0,writable:!0,value:void 0},stack:{enumerable:!0,writable:!0,value:void 0},aggregateErrors:{enumerable:!0,writable:!0,value:void 0},raw:{enumerable:!1,get:function(){return this[Zp]},set:function(t){this[Zp]=t}}});Object.defineProperty(O2,Zp,{writable:!0,value:{}});function Qp(t){if(!(t instanceof Error))return t;t[Yp]=void 0;let e=Object.create(O2);e.type=B_.call(t.constructor)==="[object Function]"?t.constructor.name:t.name,e.message=L_(t),e.stack=O_(t),global.AggregateError!==void 0&&t instanceof global.AggregateError&&Array.isArray(t.errors)&&(e.aggregateErrors=t.errors.map(r=>Qp(r)));for(let r in t)if(e[r]===void 0){let i=t[r];i instanceof Error?r!=="cause"&&!Object.prototype.hasOwnProperty.call(i,Yp)&&(e[r]=Qp(i)):e[r]=i}return delete t[Yp],e.raw=t,e}});var U2=U((OU,F2)=>{"use strict";F2.exports={mapHttpRequest:D_,reqSerializer:z2};var em=Symbol("pino-raw-req-ref"),q2=Object.create({},{id:{enumerable:!0,writable:!0,value:""},method:{enumerable:!0,writable:!0,value:""},url:{enumerable:!0,writable:!0,value:""},query:{enumerable:!0,writable:!0,value:""},params:{enumerable:!0,writable:!0,value:""},headers:{enumerable:!0,writable:!0,value:{}},remoteAddress:{enumerable:!0,writable:!0,value:""},remotePort:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[em]},set:function(t){this[em]=t}}});Object.defineProperty(q2,em,{writable:!0,value:{}});function z2(t){let e=t.info||t.socket,r=Object.create(q2);if(r.id=typeof t.id=="function"?t.id():t.id||(t.info?t.info.id:void 0),r.method=t.method,t.originalUrl)r.url=t.originalUrl;else{let i=t.path;r.url=typeof i=="string"?i:t.url?t.url.path||t.url:void 0}return t.query&&(r.query=t.query),t.params&&(r.params=t.params),r.headers=t.headers,r.remoteAddress=e&&e.remoteAddress,r.remotePort=e&&e.remotePort,r.raw=t.raw||t,r}function D_(t){return{req:z2(t)}}});var G2=U((BU,W2)=>{"use strict";W2.exports={mapHttpResponse:q_,resSerializer:H2};var tm=Symbol("pino-raw-res-ref"),j2=Object.create({},{statusCode:{enumerable:!0,writable:!0,value:0},headers:{enumerable:!0,writable:!0,value:""},raw:{enumerable:!1,get:function(){return this[tm]},set:function(t){this[tm]=t}}});Object.defineProperty(j2,tm,{writable:!0,value:{}});function H2(t){let e=Object.create(j2);return e.statusCode=t.headersSent?t.statusCode:null,e.headers=t.getHeaders?t.getHeaders():t._headers,e.raw=t,e}function q_(t){return{res:H2(t)}}});var Vl=U((DU,K2)=>{"use strict";var rm=D2(),ff=U2(),hf=G2();K2.exports={err:rm,mapHttpRequest:ff.mapHttpRequest,mapHttpResponse:hf.mapHttpResponse,req:ff.reqSerializer,res:hf.resSerializer,wrapErrorSerializer:function(e){return e===rm?e:function(i){return e(rm(i))}},wrapRequestSerializer:function(e){return e===ff.reqSerializer?e:function(i){return e(ff.reqSerializer(i))}},wrapResponseSerializer:function(e){return e===hf.resSerializer?e:function(i){return e(hf.resSerializer(i))}}}});var im=U((qU,V2)=>{"use strict";function z_(t,e){return e}V2.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=z_;let r=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(r))return;let i=r.slice(2),n=[];for(let s of i)!s||n.push(s.getFileName());return n}});var X2=U((zU,$2)=>{"use strict";var{createContext:F_,runInContext:U_}=require("vm");$2.exports=j_;function j_(t={}){let{ERR_PATHS_MUST_BE_STRINGS:e=()=>"fast-redact - Paths must be (non-empty) strings",ERR_INVALID_PATH:r=i=>`fast-redact \u2013 Invalid path (${i})`}=t;return function({paths:n}){n.forEach(s=>{if(typeof s!="string")throw Error(e());try{if(/〇/.test(s))throw Error();let o=new Proxy({},{get:()=>o,set:()=>{throw Error()}}),u=(s[0]==="["?"":".")+s.replace(/^\*/,"\u3007").replace(/\.\*/g,".\u3007").replace(/\[\*\]/g,"[\u3007]");if(/\n|\r|;/.test(u)||/\/\*/.test(u))throw Error();U_(`
|
|
4
|
-
(function () {
|
|
5
|
-
'use strict'
|
|
6
|
-
o${u}
|
|
7
|
-
if ([o${u}].length !== 1) throw Error()
|
|
8
|
-
})()
|
|
9
|
-
`,F_({o,"\u3007":null}),{codeGeneration:{strings:!1,wasm:!1}})}catch{throw Error(r(s))}})}}});var df=U((FU,J2)=>{"use strict";J2.exports=/[^.[\]]+|\[((?:.)*?)\]/g});var Z2=U((UU,Y2)=>{"use strict";var H_=df();Y2.exports=W_;function W_({paths:t}){let e=[];var r=0;let i=t.reduce(function(n,s,o){var u=s.match(H_).map(h=>h.replace(/'|"|`/g,""));let l=s[0]==="[";u=u.map(h=>h[0]==="["?h.substr(1,h.length-2):h);let d=u.indexOf("*");if(d>-1){let h=u.slice(0,d),m=h.join("."),b=u.slice(d+1,u.length),S=b.length>0;r++,e.push({before:h,beforeStr:m,after:b,nested:S})}else n[s]={path:u,val:void 0,precensored:!1,circle:"",escPath:JSON.stringify(s),leadingBracket:l};return n},{});return{wildcards:e,wcLen:r,secret:i}}});var e5=U((jU,Q2)=>{"use strict";var G_=df();Q2.exports=K_;function K_({secret:t,serialize:e,wcLen:r,strict:i,isCensorFct:n,censorFctTakesPath:s},o){let u=Function("o",`
|
|
10
|
-
if (typeof o !== 'object' || o == null) {
|
|
11
|
-
${J_(i,e)}
|
|
12
|
-
}
|
|
13
|
-
const { censor, secret } = this
|
|
14
|
-
${V_(t,n,s)}
|
|
15
|
-
this.compileRestore()
|
|
16
|
-
${$_(r>0,n,s)}
|
|
17
|
-
${X_(e)}
|
|
18
|
-
`).bind(o);return e===!1&&(u.restore=l=>o.restore(l)),u}function V_(t,e,r){return Object.keys(t).map(i=>{let{escPath:n,leadingBracket:s,path:o}=t[i],u=s?1:0,l=s?"":".",d=[];for(var h;(h=G_.exec(i))!==null;){let[,y]=h,{index:v,input:C}=h;v>u&&d.push(C.substring(0,v-(y?0:1)))}var m=d.map(y=>`o${l}${y}`).join(" && ");m.length===0?m+=`o${l}${i} != null`:m+=` && o${l}${i} != null`;let b=`
|
|
19
|
-
switch (true) {
|
|
20
|
-
${d.reverse().map(y=>`
|
|
21
|
-
case o${l}${y} === censor:
|
|
22
|
-
secret[${n}].circle = ${JSON.stringify(y)}
|
|
23
|
-
break
|
|
24
|
-
`).join(`
|
|
25
|
-
`)}
|
|
26
|
-
}
|
|
27
|
-
`,S=r?`val, ${JSON.stringify(o)}`:"val";return`
|
|
28
|
-
if (${m}) {
|
|
29
|
-
const val = o${l}${i}
|
|
30
|
-
if (val === censor) {
|
|
31
|
-
secret[${n}].precensored = true
|
|
32
|
-
} else {
|
|
33
|
-
secret[${n}].val = val
|
|
34
|
-
o${l}${i} = ${e?`censor(${S})`:"censor"}
|
|
35
|
-
${b}
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
`}).join(`
|
|
39
|
-
`)}function $_(t,e,r){return t===!0?`
|
|
40
|
-
{
|
|
41
|
-
const { wildcards, wcLen, groupRedact, nestedRedact } = this
|
|
42
|
-
for (var i = 0; i < wcLen; i++) {
|
|
43
|
-
const { before, beforeStr, after, nested } = wildcards[i]
|
|
44
|
-
if (nested === true) {
|
|
45
|
-
secret[beforeStr] = secret[beforeStr] || []
|
|
46
|
-
nestedRedact(secret[beforeStr], o, before, after, censor, ${e}, ${r})
|
|
47
|
-
} else secret[beforeStr] = groupRedact(o, before, censor, ${e}, ${r})
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
`:""}function X_(t){return t===!1?"return o":`
|
|
51
|
-
var s = this.serialize(o)
|
|
52
|
-
this.restore(o)
|
|
53
|
-
return s
|
|
54
|
-
`}function J_(t,e){return t===!0?"throw Error('fast-redact: primitives cannot be redacted')":e===!1?"return o":"return this.serialize(o)"}});var nm=U((HU,r5)=>{"use strict";r5.exports={groupRedact:Z_,groupRestore:Y_,nestedRedact:eC,nestedRestore:Q_};function Y_({keys:t,values:e,target:r}){if(r==null)return;let i=t.length;for(var n=0;n<i;n++){let s=t[n];r[s]=e[n]}}function Z_(t,e,r,i,n){let s=t5(t,e);if(s==null)return{keys:null,values:null,target:null,flat:!0};let o=Object.keys(s),u=o.length,l=e.length,d=n?[...e]:void 0,h=new Array(u);for(var m=0;m<u;m++){let b=o[m];h[m]=s[b],n?(d[l]=b,s[b]=r(s[b],d)):i?s[b]=r(s[b]):s[b]=r}return{keys:o,values:h,target:s,flat:!0}}function Q_(t){let e=t.length;for(var r=0;r<e;r++){let{key:n,target:s,value:o}=t[r];if(pf(s,n)&&(s[n]=o),typeof s=="object"){let u=Object.keys(s);for(var i=0;i<u.length;i++){let l=u[i],d=s[l];pf(d,n)&&(d[n]=o)}}}}function eC(t,e,r,i,n,s,o){let u=t5(e,r);if(u==null)return;let l=Object.keys(u),d=l.length;for(var h=0;h<d;h++){let m=l[h],{value:b,parent:S,exists:y}=tC(u,m,r,i,n,s,o);y===!0&&S!==null&&t.push({key:i[i.length-1],target:S,value:b})}return t}function pf(t,e){return t!=null?"hasOwn"in Object?Object.hasOwn(t,e):Object.prototype.hasOwnProperty.call(t,e):!1}function tC(t,e,r,i,n,s,o){let u=i.length,l=u-1,d=e;var h=-1,m,b,S,y=null,v=!0,C=null;if(S=m=t[e],typeof m!="object")return{value:null,parent:null,exists:v};for(;m!=null&&++h<u;){if(e=i[h],y=S,e!=="*"&&!C&&!(typeof m=="object"&&e in m)){v=!1;break}if(!(e==="*"&&(C=e,h!==l))){if(C){let x=Object.keys(m);for(var w=0;w<x.length;w++){let N=x[w],I=m[N],q=e==="*";(q||typeof I=="object"&&I!==null&&e in I)&&(q?S=I:S=I[e],b=h!==l?S:s?o?n(S,[...r,d,...i]):n(S):n,q?m[N]=b:I[e]=b===void 0&&n!==void 0||pf(I,e)&&b===S?I[e]:b)}C=null}else S=m[e],b=h!==l?S:s?o?n(S,[...r,d,...i]):n(S):n,m[e]=pf(m,e)&&b===S||b===void 0&&n!==void 0?m[e]:b,m=m[e];if(typeof m!="object")break}}return{value:S,parent:y,exists:v}}function t5(t,e){for(var r=-1,i=e.length,n=t;n!=null&&++r<i;)n=n[e[r]];return n}});var n5=U((WU,i5)=>{"use strict";var{groupRestore:rC,nestedRestore:iC}=nm();i5.exports=nC;function nC({secret:t,wcLen:e}){return function(){if(this.restore)return;let i=Object.keys(t),n=sC(t,i),s=e>0,o=s?{secret:t,groupRestore:rC,nestedRestore:iC}:{secret:t};this.restore=Function("o",oC(n,i,s)).bind(o)}}function sC(t,e){return e.map(r=>{let{circle:i,escPath:n,leadingBracket:s}=t[r],u=i?`o.${i} = secret[${n}].val`:`o${s?"":"."}${r} = secret[${n}].val`,l=`secret[${n}].val = undefined`;return`
|
|
55
|
-
if (secret[${n}].val !== undefined) {
|
|
56
|
-
try { ${u} } catch (e) {}
|
|
57
|
-
${l}
|
|
58
|
-
}
|
|
59
|
-
`}).join("")}function oC(t,e,r){return`
|
|
60
|
-
const secret = this.secret
|
|
61
|
-
${r===!0?`
|
|
62
|
-
const keys = Object.keys(secret)
|
|
63
|
-
const len = keys.length
|
|
64
|
-
for (var i = len - 1; i >= ${e.length}; i--) {
|
|
65
|
-
const k = keys[i]
|
|
66
|
-
const o = secret[k]
|
|
67
|
-
if (o.flat === true) this.groupRestore(o)
|
|
68
|
-
else this.nestedRestore(o)
|
|
69
|
-
secret[k] = null
|
|
70
|
-
}
|
|
71
|
-
`:""}
|
|
72
|
-
${t}
|
|
73
|
-
return o
|
|
74
|
-
`}});var o5=U((GU,s5)=>{"use strict";s5.exports=aC;function aC(t){let{secret:e,censor:r,compileRestore:i,serialize:n,groupRedact:s,nestedRedact:o,wildcards:u,wcLen:l}=t,d=[{secret:e,censor:r,compileRestore:i}];return n!==!1&&d.push({serialize:n}),l>0&&d.push({groupRedact:s,nestedRedact:o,wildcards:u,wcLen:l}),Object.assign(...d)}});var am=U((KU,u5)=>{"use strict";var a5=X2(),uC=Z2(),lC=e5(),cC=n5(),{groupRedact:fC,nestedRedact:hC}=nm(),dC=o5(),pC=df(),mC=a5(),sm=t=>t;sm.restore=sm;var yC="[REDACTED]";om.rx=pC;om.validator=a5;u5.exports=om;function om(t={}){let e=Array.from(new Set(t.paths||[])),r="serialize"in t&&(t.serialize===!1||typeof t.serialize=="function")?t.serialize:JSON.stringify,i=t.remove;if(i===!0&&r!==JSON.stringify)throw Error("fast-redact \u2013 remove option may only be set when serializer is JSON.stringify");let n=i===!0?void 0:"censor"in t?t.censor:yC,s=typeof n=="function",o=s&&n.length>1;if(e.length===0)return r||sm;mC({paths:e,serialize:r,censor:n});let{wildcards:u,wcLen:l,secret:d}=uC({paths:e,censor:n}),h=cC({secret:d,wcLen:l}),m="strict"in t?t.strict:!0;return lC({secret:d,wcLen:l,serialize:r,strict:m,isCensorFct:s,censorFctTakesPath:o},dC({secret:d,censor:n,compileRestore:h,serialize:r,groupRedact:fC,nestedRedact:hC,wildcards:u,wcLen:l}))}});var lu=U((VU,l5)=>{"use strict";var gC=Symbol("pino.setLevel"),vC=Symbol("pino.getLevel"),bC=Symbol("pino.levelVal"),SC=Symbol("pino.useLevelLabels"),xC=Symbol("pino.useOnlyCustomLevels"),wC=Symbol("pino.mixin"),EC=Symbol("pino.lsCache"),_C=Symbol("pino.chindings"),CC=Symbol("pino.asJson"),RC=Symbol("pino.write"),TC=Symbol("pino.redactFmt"),NC=Symbol("pino.time"),AC=Symbol("pino.timeSliceIndex"),MC=Symbol("pino.stream"),kC=Symbol("pino.stringify"),IC=Symbol("pino.stringifySafe"),PC=Symbol("pino.stringifiers"),LC=Symbol("pino.end"),OC=Symbol("pino.formatOpts"),BC=Symbol("pino.messageKey"),DC=Symbol("pino.errorKey"),qC=Symbol("pino.nestedKey"),zC=Symbol("pino.nestedKeyStr"),FC=Symbol("pino.mixinMergeStrategy"),UC=Symbol("pino.wildcardFirst"),jC=Symbol.for("pino.serializers"),HC=Symbol.for("pino.formatters"),WC=Symbol.for("pino.hooks"),GC=Symbol.for("pino.metadata");l5.exports={setLevelSym:gC,getLevelSym:vC,levelValSym:bC,useLevelLabelsSym:SC,mixinSym:wC,lsCacheSym:EC,chindingsSym:_C,asJsonSym:CC,writeSym:RC,serializersSym:jC,redactFmtSym:TC,timeSym:NC,timeSliceIndexSym:AC,streamSym:MC,stringifySym:kC,stringifySafeSym:IC,stringifiersSym:PC,endSym:LC,formatOptsSym:OC,messageKeySym:BC,errorKeySym:DC,nestedKeySym:qC,wildcardFirstSym:UC,needsMetadataGsym:GC,useOnlyCustomLevelsSym:xC,formattersSym:HC,hooksSym:WC,nestedKeyStrSym:zC,mixinMergeStrategySym:FC}});var cm=U(($U,d5)=>{"use strict";var lm=am(),{redactFmtSym:KC,wildcardFirstSym:mf}=lu(),{rx:um,validator:VC}=lm,c5=VC({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),f5="[Redacted]",h5=!1;function $C(t,e){let{paths:r,censor:i}=XC(t),n=r.reduce((u,l)=>{um.lastIndex=0;let d=um.exec(l),h=um.exec(l),m=d[1]!==void 0?d[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):d[0];if(m==="*"&&(m=mf),h===null)return u[m]=null,u;if(u[m]===null)return u;let{index:b}=h,S=`${l.substr(b,l.length-1)}`;return u[m]=u[m]||[],m!==mf&&u[m].length===0&&u[m].push(...u[mf]||[]),m===mf&&Object.keys(u).forEach(function(y){u[y]&&u[y].push(S)}),u[m].push(S),u},{}),s={[KC]:lm({paths:r,censor:i,serialize:e,strict:h5})},o=(...u)=>e(typeof i=="function"?i(...u):i);return[...Object.keys(n),...Object.getOwnPropertySymbols(n)].reduce((u,l)=>{if(n[l]===null)u[l]=d=>o(d,[l]);else{let d=typeof i=="function"?(h,m)=>i(h,[l,...m]):i;u[l]=lm({paths:n[l],censor:d,serialize:e,strict:h5})}return u},s)}function XC(t){if(Array.isArray(t))return t={paths:t,censor:f5},c5(t),t;let{paths:e,censor:r=f5,remove:i}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(r=void 0),c5({paths:e,censor:r}),{paths:e,censor:r}}d5.exports=$C});var m5=U((XU,p5)=>{"use strict";var JC=()=>"",YC=()=>`,"time":${Date.now()}`,ZC=()=>`,"time":${Math.round(Date.now()/1e3)}`,QC=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;p5.exports={nullTime:JC,epochTime:YC,unixTime:ZC,isoTime:QC}});var fm=U((JU,y5)=>{"use strict";function eR(t){try{return JSON.stringify(t)}catch{return'"[Circular]"'}}y5.exports=tR;function tR(t,e,r){var i=r&&r.stringify||eR,n=1;if(typeof t=="object"&&t!==null){var s=e.length+n;if(s===1)return t;var o=new Array(s);o[0]=i(t);for(var u=1;u<s;u++)o[u]=i(e[u]);return o.join(" ")}if(typeof t!="string")return t;var l=e.length;if(l===0)return t;for(var d="",h=1-n,m=-1,b=t&&t.length||0,S=0;S<b;){if(t.charCodeAt(S)===37&&S+1<b){switch(m=m>-1?m:0,t.charCodeAt(S+1)){case 100:case 102:if(h>=l||(m<S&&(d+=t.slice(m,S)),e[h]==null))break;d+=Number(e[h]),m=S=S+2;break;case 105:if(h>=l||(m<S&&(d+=t.slice(m,S)),e[h]==null))break;d+=Math.floor(Number(e[h])),m=S=S+2;break;case 79:case 111:case 106:if(h>=l||(m<S&&(d+=t.slice(m,S)),e[h]===void 0))break;var y=typeof e[h];if(y==="string"){d+="'"+e[h]+"'",m=S+2,S++;break}if(y==="function"){d+=e[h].name||"<anonymous>",m=S+2,S++;break}d+=i(e[h]),m=S+2,S++;break;case 115:if(h>=l)break;m<S&&(d+=t.slice(m,S)),d+=String(e[h]),m=S+2,S++;break;case 37:m<S&&(d+=t.slice(m,S)),d+="%",m=S+2,S++,h--;break}++h}++S}return m===-1?t:(m<b&&(d+=t.slice(m)),d)}});var yf=U((YU,hm)=>{"use strict";if(typeof SharedArrayBuffer<"u"&&typeof Atomics<"u"){let e=function(r){if((r>0&&r<1/0)===!1)throw typeof r!="number"&&typeof r!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");Atomics.wait(t,0,0,Number(r))},t=new Int32Array(new SharedArrayBuffer(4));hm.exports=e}else{let t=function(e){if((e>0&&e<1/0)===!1)throw typeof e!="number"&&typeof e!="bigint"?TypeError("sleep: ms must be a number"):RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity");let i=Date.now()+Number(e);for(;i>Date.now(););};hm.exports=t}});var pm=U((ZU,S5)=>{"use strict";var Zr=require("fs"),rR=require("events"),iR=require("util").inherits,g5=require("path"),v5=yf(),dm=100,nR=16*1024;function b5(t,e){e._opening=!0,e._writing=!0,e._asyncDrainScheduled=!1;function r(s,o){if(s){e._reopening=!1,e._writing=!1,e._opening=!1,e.sync?process.nextTick(()=>{e.listenerCount("error")>0&&e.emit("error",s)}):e.emit("error",s);return}e.fd=o,e.file=t,e._reopening=!1,e._opening=!1,e._writing=!1,e.sync?process.nextTick(()=>e.emit("ready")):e.emit("ready"),!e._reopening&&!e._writing&&e._len>e.minLength&&!e.destroyed&&cu(e)}let i=e.append?"a":"w",n=e.mode;if(e.sync)try{e.mkdir&&Zr.mkdirSync(g5.dirname(t),{recursive:!0});let s=Zr.openSync(t,i,n);r(null,s)}catch(s){throw r(s),s}else e.mkdir?Zr.mkdir(g5.dirname(t),{recursive:!0},s=>{if(s)return r(s);Zr.open(t,i,n,r)}):Zr.open(t,i,n,r)}function Qr(t){if(!(this instanceof Qr))return new Qr(t);let{fd:e,dest:r,minLength:i,maxLength:n,maxWrite:s,sync:o,append:u=!0,mode:l,mkdir:d,retryEAGAIN:h,fsync:m}=t||{};if(e=e||r,this._bufs=[],this._len=0,this.fd=-1,this._writing=!1,this._writingBuf="",this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._hwm=Math.max(i||0,16387),this.file=null,this.destroyed=!1,this.minLength=i||0,this.maxLength=n||0,this.maxWrite=s||nR,this.sync=o||!1,this._fsync=m||!1,this.append=u||!1,this.mode=l,this.retryEAGAIN=h||(()=>!0),this.mkdir=d||!1,typeof e=="number")this.fd=e,process.nextTick(()=>this.emit("ready"));else if(typeof e=="string")b5(e,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);this.release=(b,S)=>{if(b){if(b.code==="EAGAIN"&&this.retryEAGAIN(b,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{v5(dm),this.release(void 0,0)}catch(v){this.release(v)}else setTimeout(()=>{Zr.write(this.fd,this._writingBuf,"utf8",this.release)},dm);else this._writing=!1,this.emit("error",b);return}if(this.emit("write",S),this._len-=S,this._writingBuf=this._writingBuf.slice(S),this._writingBuf.length){if(!this.sync){Zr.write(this.fd,this._writingBuf,"utf8",this.release);return}try{do{let v=Zr.writeSync(this.fd,this._writingBuf,"utf8");this._len-=v,this._writingBuf=this._writingBuf.slice(v)}while(this._writingBuf)}catch(v){this.release(v);return}}this._fsync&&Zr.fsyncSync(this.fd);let y=this._len;this._reopening?(this._writing=!1,this._reopening=!1,this.reopen()):y>this.minLength?cu(this):this._ending?y>0?cu(this):(this._writing=!1,gf(this)):(this._writing=!1,this.sync?this._asyncDrainScheduled||(this._asyncDrainScheduled=!0,process.nextTick(sR,this)):this.emit("drain"))},this.on("newListener",function(b){b==="drain"&&(this._asyncDrainScheduled=!1)})}function sR(t){t.listenerCount("drain")>0&&(t._asyncDrainScheduled=!1,t.emit("drain"))}iR(Qr,rR);Qr.prototype.write=function(t){if(this.destroyed)throw new Error("SonicBoom destroyed");let e=this._len+t.length,r=this._bufs;return this.maxLength&&e>this.maxLength?(this.emit("drop",t),this._len<this._hwm):(r.length===0||r[r.length-1].length+t.length>this.maxWrite?r.push(""+t):r[r.length-1]+=t,this._len=e,!this._writing&&this._len>=this.minLength&&cu(this),this._len<this._hwm)};Qr.prototype.flush=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");this._writing||this.minLength<=0||(this._bufs.length===0&&this._bufs.push(""),cu(this))};Qr.prototype.reopen=function(t){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen(t)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if(this._reopening=!0,this._writing)return;let e=this.fd;this.once("ready",()=>{e!==this.fd&&Zr.close(e,r=>{if(r)return this.emit("error",r)})}),b5(t||this.file,this)};Qr.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}this._ending||(this._ending=!0,!this._writing&&(this._len>0&&this.fd>=0?cu(this):gf(this)))};Qr.prototype.flushSync=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");for(!this._writing&&this._writingBuf.length>0&&(this._bufs.unshift(this._writingBuf),this._writingBuf="");this._bufs.length;){let t=this._bufs[0];try{this._len-=Zr.writeSync(this.fd,t,"utf8"),this._bufs.shift()}catch(e){if(e.code!=="EAGAIN"||!this.retryEAGAIN(e,t.length,this._len-t.length))throw e;v5(dm)}}};Qr.prototype.destroy=function(){this.destroyed||gf(this)};function cu(t){let e=t.release;if(t._writing=!0,t._writingBuf=t._writingBuf||t._bufs.shift()||"",t.sync)try{let r=Zr.writeSync(t.fd,t._writingBuf,"utf8");e(null,r)}catch(r){e(r)}else Zr.write(t.fd,t._writingBuf,"utf8",e)}function gf(t){if(t.fd===-1){t.once("ready",gf.bind(null,t));return}t.destroyed=!0,t._bufs=[],t.fd!==1&&t.fd!==2?Zr.close(t.fd,e):setImmediate(e);function e(r){if(r){t.emit("error",r);return}t._ending&&!t._writing&&t.emit("finish"),t.emit("close")}}Qr.SonicBoom=Qr;Qr.default=Qr;S5.exports=Qr});var $l=U((QU,R5)=>{"use strict";var Fs={exit:[],beforeExit:[]},x5={exit:aR,beforeExit:uR},w5=new FinalizationRegistry(lR);function oR(t){Fs[t].length>0||process.on(t,x5[t])}function E5(t){Fs[t].length>0||process.removeListener(t,x5[t])}function aR(){_5("exit")}function uR(){_5("beforeExit")}function _5(t){for(let e of Fs[t]){let r=e.deref(),i=e.fn;r!==void 0&&i(r,t)}}function lR(t){for(let e of["exit","beforeExit"]){let r=Fs[e].indexOf(t);Fs[e].splice(r,r+1),E5(e)}}function C5(t,e,r){if(e===void 0)throw new Error("the object can't be undefined");oR(t);let i=new WeakRef(e);i.fn=r,w5.register(e,i),Fs[t].push(i)}function cR(t,e){C5("exit",t,e)}function fR(t,e){C5("beforeExit",t,e)}function hR(t){w5.unregister(t);for(let e of["exit","beforeExit"])Fs[e]=Fs[e].filter(r=>{let i=r.deref();return i&&i!==t}),E5(e)}R5.exports={register:cR,registerBeforeExit:fR,unregister:hR}});var N5=U((ej,T5)=>{"use strict";function dR(t,e,r,i,n){let s=Date.now()+i,o=Atomics.load(t,e);if(o===r){n(null,"ok");return}let u=o,l=d=>{Date.now()>s?n(null,"timed-out"):setTimeout(()=>{u=o,o=Atomics.load(t,e),o===u?l(d>=1e3?1e3:d*2):o===r?n(null,"ok"):n(null,"not-equal")},d)};l(1)}function pR(t,e,r,i,n){let s=Date.now()+i,o=Atomics.load(t,e);if(o!==r){n(null,"ok");return}let u=l=>{Date.now()>s?n(null,"timed-out"):setTimeout(()=>{o=Atomics.load(t,e),o!==r?n(null,"ok"):u(l>=1e3?1e3:l*2)},l)};u(1)}T5.exports={wait:dR,waitDiff:pR}});var M5=U((tj,A5)=>{"use strict";A5.exports={WRITE_INDEX:4,READ_INDEX:8}});var Sm=U((ij,L5)=>{"use strict";var{EventEmitter:mR}=require("events"),{Worker:yR}=require("worker_threads"),{join:gR}=require("path"),{pathToFileURL:vR}=require("url"),{wait:bR}=N5(),{WRITE_INDEX:ei,READ_INDEX:wn}=M5(),SR=require("buffer"),xR=require("assert"),ee=Symbol("kImpl"),wR=SR.constants.MAX_STRING_LENGTH,bf=class{constructor(e){this._value=e}deref(){return this._value}},ER=global.FinalizationRegistry||class{register(){}unregister(){}},_R=global.WeakRef||bf,k5=new ER(t=>{t.exited||t.terminate()});function CR(t,e){let{filename:r,workerData:i}=e,s=("__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{})["thread-stream-worker"]||gR(__dirname,"lib","worker.js"),o=new yR(s,{...e.workerOpts,workerData:{filename:r.indexOf("file://")===0?r:vR(r).href,dataBuf:t[ee].dataBuf,stateBuf:t[ee].stateBuf,workerData:i}});return o.stream=new bf(t),o.on("message",RR),o.on("exit",P5),k5.register(t,o),o}function I5(t){xR(!t[ee].sync),t[ee].needDrain&&(t[ee].needDrain=!1,t.emit("drain"))}function vf(t){let e=Atomics.load(t[ee].state,ei),r=t[ee].data.length-e;if(r>0){if(t[ee].buf.length===0){t[ee].flushing=!1,t[ee].ending?bm(t):t[ee].needDrain&&process.nextTick(I5,t);return}let i=t[ee].buf.slice(0,r),n=Buffer.byteLength(i);n<=r?(t[ee].buf=t[ee].buf.slice(r),Sf(t,i,vf.bind(null,t))):t.flush(()=>{if(!t.destroyed){for(Atomics.store(t[ee].state,wn,0),Atomics.store(t[ee].state,ei,0);n>t[ee].data.length;)r=r/2,i=t[ee].buf.slice(0,r),n=Buffer.byteLength(i);t[ee].buf=t[ee].buf.slice(r),Sf(t,i,vf.bind(null,t))}})}else if(r===0){if(e===0&&t[ee].buf.length===0)return;t.flush(()=>{Atomics.store(t[ee].state,wn,0),Atomics.store(t[ee].state,ei,0),vf(t)})}else En(t,new Error("overwritten"))}function RR(t){let e=this.stream.deref();if(e===void 0){this.exited=!0,this.terminate();return}switch(t.code){case"READY":this.stream=new _R(e),e.flush(()=>{e[ee].ready=!0,e.emit("ready")});break;case"ERROR":En(e,t.err);break;default:En(e,new Error("this should not happen: "+t.code))}}function P5(t){let e=this.stream.deref();e!==void 0&&(k5.unregister(e),e.worker.exited=!0,e.worker.off("exit",P5),En(e,t!==0?new Error("the worker thread exited"):null))}var ym=class extends mR{constructor(e={}){if(super(),e.bufferSize<4)throw new Error("bufferSize must at least fit a 4-byte utf-8 char");this[ee]={},this[ee].stateBuf=new SharedArrayBuffer(128),this[ee].state=new Int32Array(this[ee].stateBuf),this[ee].dataBuf=new SharedArrayBuffer(e.bufferSize||4*1024*1024),this[ee].data=Buffer.from(this[ee].dataBuf),this[ee].sync=e.sync||!1,this[ee].ending=!1,this[ee].ended=!1,this[ee].needDrain=!1,this[ee].destroyed=!1,this[ee].flushing=!1,this[ee].ready=!1,this[ee].finished=!1,this[ee].errored=null,this[ee].closed=!1,this[ee].buf="",this.worker=CR(this,e)}write(e){if(this[ee].destroyed)return gm(this,new Error("the worker has exited")),!1;if(this[ee].ending)return gm(this,new Error("the worker is ending")),!1;if(this[ee].flushing&&this[ee].buf.length+e.length>=wR)try{mm(this),this[ee].flushing=!0}catch(r){return En(this,r),!1}if(this[ee].buf+=e,this[ee].sync)try{return mm(this),!0}catch(r){return En(this,r),!1}return this[ee].flushing||(this[ee].flushing=!0,setImmediate(vf,this)),this[ee].needDrain=this[ee].data.length-this[ee].buf.length-Atomics.load(this[ee].state,ei)<=0,!this[ee].needDrain}end(){this[ee].destroyed||(this[ee].ending=!0,bm(this))}flush(e){if(this[ee].destroyed){typeof e=="function"&&process.nextTick(e,new Error("the worker has exited"));return}let r=Atomics.load(this[ee].state,ei);bR(this[ee].state,wn,r,1/0,(i,n)=>{if(i){En(this,i),process.nextTick(e,i);return}if(n==="not-equal"){this.flush(e);return}process.nextTick(e)})}flushSync(){this[ee].destroyed||(mm(this),vm(this))}unref(){this.worker.unref()}ref(){this.worker.ref()}get ready(){return this[ee].ready}get destroyed(){return this[ee].destroyed}get closed(){return this[ee].closed}get writable(){return!this[ee].destroyed&&!this[ee].ending}get writableEnded(){return this[ee].ending}get writableFinished(){return this[ee].finished}get writableNeedDrain(){return this[ee].needDrain}get writableObjectMode(){return!1}get writableErrored(){return this[ee].errored}};function gm(t,e){setImmediate(()=>{t.emit("error",e)})}function En(t,e){t[ee].destroyed||(t[ee].destroyed=!0,e&&(t[ee].errored=e,gm(t,e)),t.worker.exited?setImmediate(()=>{t[ee].closed=!0,t.emit("close")}):t.worker.terminate().catch(()=>{}).then(()=>{t[ee].closed=!0,t.emit("close")}))}function Sf(t,e,r){let i=Atomics.load(t[ee].state,ei),n=Buffer.byteLength(e);return t[ee].data.write(e,i),Atomics.store(t[ee].state,ei,i+n),Atomics.notify(t[ee].state,ei),r(),!0}function bm(t){if(!(t[ee].ended||!t[ee].ending||t[ee].flushing)){t[ee].ended=!0;try{t.flushSync();let e=Atomics.load(t[ee].state,wn);Atomics.store(t[ee].state,ei,-1),Atomics.notify(t[ee].state,ei);let r=0;for(;e!==-1;){if(Atomics.wait(t[ee].state,wn,e,1e3),e=Atomics.load(t[ee].state,wn),e===-2){En(t,new Error("end() failed"));return}if(++r===10){En(t,new Error("end() took too long (10s)"));return}}process.nextTick(()=>{t[ee].finished=!0,t.emit("finish")})}catch(e){En(t,e)}}}function mm(t){let e=()=>{t[ee].ending?bm(t):t[ee].needDrain&&process.nextTick(I5,t)};for(t[ee].flushing=!1;t[ee].buf.length!==0;){let r=Atomics.load(t[ee].state,ei),i=t[ee].data.length-r;if(i===0){vm(t),Atomics.store(t[ee].state,wn,0),Atomics.store(t[ee].state,ei,0);continue}else if(i<0)throw new Error("overwritten");let n=t[ee].buf.slice(0,i),s=Buffer.byteLength(n);if(s<=i)t[ee].buf=t[ee].buf.slice(i),Sf(t,n,e);else{for(vm(t),Atomics.store(t[ee].state,wn,0),Atomics.store(t[ee].state,ei,0);s>t[ee].buf.length;)i=i/2,n=t[ee].buf.slice(0,i),s=Buffer.byteLength(n);t[ee].buf=t[ee].buf.slice(i),Sf(t,n,e)}}}function vm(t){if(t[ee].flushing)throw new Error("unable to flush while flushing");let e=Atomics.load(t[ee].state,ei),r=0;for(;;){let i=Atomics.load(t[ee].state,wn);if(i===-2)throw Error("_flushSync failed");if(i!==e)Atomics.wait(t[ee].state,wn,i,1e3);else break;if(++r===10)throw new Error("_flushSync took too long (10s)")}}L5.exports=ym});var Em=U((nj,O5)=>{"use strict";var{createRequire:TR}=require("module"),NR=im(),{join:xm,isAbsolute:AR}=require("path"),MR=yf(),wm=$l(),kR=Sm();function IR(t){wm.register(t,LR),wm.registerBeforeExit(t,OR),t.on("close",function(){wm.unregister(t)})}function PR(t,e,r){let i=new kR({filename:t,workerData:e,workerOpts:r});i.on("ready",n),i.on("close",function(){process.removeListener("exit",s)}),process.on("exit",s);function n(){process.removeListener("exit",s),i.unref(),r.autoEnd!==!1&&IR(i)}function s(){i.closed||(i.flushSync(),MR(100),i.end())}return i}function LR(t){t.ref(),t.flushSync(),t.end(),t.once("close",function(){t.unref()})}function OR(t){t.flushSync()}function BR(t){let{pipeline:e,targets:r,levels:i,options:n={},worker:s={},caller:o=NR()}=t,u=typeof o=="string"?[o]:o,l="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},d=t.target;if(d&&r)throw new Error("only one of target or targets can be specified");return r?(d=l["pino-worker"]||xm(__dirname,"worker.js"),n.targets=r.map(m=>({...m,target:h(m.target)}))):e&&(d=l["pino-pipeline-worker"]||xm(__dirname,"worker-pipeline.js"),n.targets=e.map(m=>({...m,target:h(m.target)}))),i&&(n.levels=i),PR(h(d),n,s);function h(m){if(m=l[m]||m,AR(m)||m.indexOf("file://")===0)return m;if(m==="pino/file")return xm(__dirname,"..","file.js");let b;for(let S of u)try{b=TR(S).resolve(m);break}catch{continue}if(!b)throw new Error(`unable to determine transport target for "${m}"`);return b}}O5.exports=BR});var wf=U((sj,V5)=>{"use strict";var B5=fm(),{mapHttpRequest:DR,mapHttpResponse:qR}=Vl(),_m=pm(),D5=$l(),{lsCacheSym:zR,chindingsSym:U5,writeSym:q5,serializersSym:j5,formatOptsSym:z5,endSym:FR,stringifiersSym:H5,stringifySym:W5,stringifySafeSym:Cm,wildcardFirstSym:G5,nestedKeySym:UR,formattersSym:K5,messageKeySym:jR,nestedKeyStrSym:HR}=lu(),{isMainThread:WR}=require("worker_threads"),GR=Em();function fu(){}function KR(t,e){if(!e)return r;return function(...n){e.call(this,n,r,t)};function r(i,...n){if(typeof i=="object"){let s=i;i!==null&&(i.method&&i.headers&&i.socket?i=DR(i):typeof i.setHeader=="function"&&(i=qR(i)));let o;s===null&&n.length===0?o=[null]:(s=n.shift(),o=n),this[q5](i,B5(s,o,this[z5]),t)}else this[q5](null,B5(i===void 0?n.shift():i,n,this[z5]),t)}}function F5(t){let e="",r=0,i=!1,n=255,s=t.length;if(s>100)return JSON.stringify(t);for(var o=0;o<s&&n>=32;o++)n=t.charCodeAt(o),(n===34||n===92)&&(e+=t.slice(r,o)+"\\",r=o,i=!0);return i?e+=t.slice(r):e=t,n<32?JSON.stringify(t):'"'+e+'"'}function VR(t,e,r,i){let n=this[W5],s=this[Cm],o=this[H5],u=this[FR],l=this[U5],d=this[j5],h=this[K5],m=this[jR],b=this[zR][r]+i;b=b+l;let S;h.log&&(t=h.log(t));let y=o[G5],v="";for(let w in t)if(S=t[w],Object.prototype.hasOwnProperty.call(t,w)&&S!==void 0){S=d[w]?d[w](S):S;let x=o[w]||y;switch(typeof S){case"undefined":case"function":continue;case"number":Number.isFinite(S)===!1&&(S=null);case"boolean":x&&(S=x(S));break;case"string":S=(x||F5)(S);break;default:S=(x||n)(S,s)}if(S===void 0)continue;v+=',"'+w+'":'+S}let C="";if(e!==void 0){S=d[m]?d[m](e):e;let w=o[m]||y;switch(typeof S){case"function":break;case"number":Number.isFinite(S)===!1&&(S=null);case"boolean":w&&(S=w(S)),C=',"'+m+'":'+S;break;case"string":S=(w||F5)(S),C=',"'+m+'":'+S;break;default:S=(w||n)(S,s),C=',"'+m+'":'+S}}return this[UR]&&v?b+this[HR]+v.slice(1)+"}"+C+u:b+v+C+u}function $R(t,e){let r,i=t[U5],n=t[W5],s=t[Cm],o=t[H5],u=o[G5],l=t[j5],d=t[K5].bindings;e=d(e);for(let h in e)if(r=e[h],(h!=="level"&&h!=="serializers"&&h!=="formatters"&&h!=="customLevels"&&e.hasOwnProperty(h)&&r!==void 0)===!0){if(r=l[h]?l[h](r):r,r=(o[h]||u||n)(r,s),r===void 0)continue;i+=',"'+h+'":'+r}return i}function XR(t){return t.write!==t.constructor.prototype.write}function xf(t){let e=new _m(t);return e.on("error",r),!t.sync&&WR&&(D5.register(e,JR),e.on("close",function(){D5.unregister(e)})),e;function r(i){if(i.code==="EPIPE"){e.write=fu,e.end=fu,e.flushSync=fu,e.destroy=fu;return}e.removeListener("error",r),e.emit("error",i)}}function JR(t,e){t.destroyed||(e==="beforeExit"?(t.flush(),t.on("drain",function(){t.end()})):t.flushSync())}function YR(t){return function(r,i,n={},s){if(typeof n=="string")s=xf({dest:n}),n={};else if(typeof s=="string"){if(n&&n.transport)throw Error("only one of option.transport or stream can be specified");s=xf({dest:s})}else if(n instanceof _m||n.writable||n._writableState)s=n,n={};else if(n.transport){if(n.transport instanceof _m||n.transport.writable||n.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(n.transport.targets&&n.transport.targets.length&&n.formatters&&typeof n.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let l;n.customLevels&&(l=n.useOnlyCustomLevels?n.customLevels:Object.assign({},n.levels,n.customLevels)),s=GR({caller:i,...n.transport,levels:l})}if(n=Object.assign({},t,n),n.serializers=Object.assign({},t.serializers,n.serializers),n.formatters=Object.assign({},t.formatters,n.formatters),n.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");let{enabled:o,onChild:u}=n;return o===!1&&(n.level="silent"),u||(n.onChild=fu),s||(XR(process.stdout)?s=process.stdout:s=xf({fd:process.stdout.fd||1})),{opts:n,stream:s}}}function ZR(t,e){try{return JSON.stringify(t)}catch{try{return(e||this[Cm])(t)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function QR(t,e,r){return{level:t,bindings:e,log:r}}function eT(t){let e=Number(t);return typeof t=="string"&&Number.isFinite(e)?e:t===void 0?1:t}V5.exports={noop:fu,buildSafeSonicBoom:xf,asChindings:$R,asJson:VR,genLog:KR,createArgsNormalizer:YR,stringify:ZR,buildFormatters:QR,normalizeDestFileDescriptor:eT}});var Ef=U((oj,X5)=>{"use strict";var{lsCacheSym:tT,levelValSym:Rm,useOnlyCustomLevelsSym:rT,streamSym:iT,formattersSym:nT,hooksSym:sT}=lu(),{noop:oT,genLog:Fo}=wf(),Zi={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},$5={fatal:t=>{let e=Fo(Zi.fatal,t);return function(...r){let i=this[iT];if(e.call(this,...r),typeof i.flushSync=="function")try{i.flushSync()}catch{}}},error:t=>Fo(Zi.error,t),warn:t=>Fo(Zi.warn,t),info:t=>Fo(Zi.info,t),debug:t=>Fo(Zi.debug,t),trace:t=>Fo(Zi.trace,t)},Tm=Object.keys(Zi).reduce((t,e)=>(t[Zi[e]]=e,t),{}),aT=Object.keys(Tm).reduce((t,e)=>(t[e]='{"level":'+Number(e),t),{});function uT(t){let e=t[nT].level,{labels:r}=t.levels,i={};for(let n in r){let s=e(r[n],Number(n));i[n]=JSON.stringify(s).slice(0,-1)}return t[tT]=i,t}function lT(t,e){if(e)return!1;switch(t){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function cT(t){let{labels:e,values:r}=this.levels;if(typeof t=="number"){if(e[t]===void 0)throw Error("unknown level value"+t);t=e[t]}if(r[t]===void 0)throw Error("unknown level "+t);let i=this[Rm],n=this[Rm]=r[t],s=this[rT],o=this[sT].logMethod;for(let u in r){if(n>r[u]){this[u]=oT;continue}this[u]=lT(u,s)?$5[u](o):Fo(r[u],o)}this.emit("level-change",t,n,e[i],i)}function fT(t){let{levels:e,levelVal:r}=this;return e&&e.labels?e.labels[r]:""}function hT(t){let{values:e}=this.levels,r=e[t];return r!==void 0&&r>=this[Rm]}function dT(t=null,e=!1){let r=t?Object.keys(t).reduce((s,o)=>(s[t[o]]=o,s),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),e?null:Tm,r),n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),e?null:Zi,t);return{labels:i,values:n}}function pT(t,e,r){if(typeof t=="number"){if(![].concat(Object.keys(e||{}).map(s=>e[s]),r?[]:Object.keys(Tm).map(s=>+s),1/0).includes(t))throw Error(`default level:${t} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:Zi,e);if(!(t in i))throw Error(`default level:${t} must be included in custom levels`)}function mT(t,e){let{labels:r,values:i}=t;for(let n in e){if(n in i)throw Error("levels cannot be overridden");if(e[n]in r)throw Error("pre-existing level values cannot be used for new levels")}}X5.exports={initialLsCache:aT,genLsCache:uT,levelMethods:$5,getLevel:fT,setLevel:cT,isLevelEnabled:hT,mappings:dT,levels:Zi,assertNoLevelCollisions:mT,assertDefaultLevelFound:pT}});var Nm=U((aj,J5)=>{"use strict";J5.exports={version:"8.6.1"}});var ov=U((lj,sv)=>{"use strict";var{EventEmitter:yT}=require("events"),{lsCacheSym:gT,levelValSym:vT,setLevelSym:Mm,getLevelSym:Y5,chindingsSym:km,parsedChindingsSym:bT,mixinSym:ST,asJsonSym:tv,writeSym:xT,mixinMergeStrategySym:wT,timeSym:ET,timeSliceIndexSym:_T,streamSym:rv,serializersSym:Uo,formattersSym:Am,errorKeySym:CT,useOnlyCustomLevelsSym:RT,needsMetadataGsym:TT,redactFmtSym:NT,stringifySym:AT,formatOptsSym:MT,stringifiersSym:kT}=lu(),{getLevel:IT,setLevel:PT,isLevelEnabled:LT,mappings:OT,initialLsCache:BT,genLsCache:DT,assertNoLevelCollisions:qT}=Ef(),{asChindings:iv,asJson:zT,buildFormatters:Z5,stringify:Q5}=wf(),{version:FT}=Nm(),UT=cm(),jT=class{},nv={constructor:jT,child:HT,bindings:WT,setBindings:GT,flush:XT,isLevelEnabled:LT,version:FT,get level(){return this[Y5]()},set level(t){this[Mm](t)},get levelVal(){return this[vT]},set levelVal(t){throw Error("levelVal is read-only")},[gT]:BT,[xT]:VT,[tv]:zT,[Y5]:IT,[Mm]:PT};Object.setPrototypeOf(nv,yT.prototype);sv.exports=function(){return Object.create(nv)};var ev=t=>t;function HT(t,e){if(!t)throw Error("missing bindings for child Pino");e=e||{};let r=this[Uo],i=this[Am],n=Object.create(this);if(e.hasOwnProperty("serializers")===!0){n[Uo]=Object.create(null);for(let h in r)n[Uo][h]=r[h];let l=Object.getOwnPropertySymbols(r);for(var s=0;s<l.length;s++){let h=l[s];n[Uo][h]=r[h]}for(let h in e.serializers)n[Uo][h]=e.serializers[h];let d=Object.getOwnPropertySymbols(e.serializers);for(var o=0;o<d.length;o++){let h=d[o];n[Uo][h]=e.serializers[h]}}else n[Uo]=r;if(e.hasOwnProperty("formatters")){let{level:l,bindings:d,log:h}=e.formatters;n[Am]=Z5(l||i.level,d||ev,h||i.log)}else n[Am]=Z5(i.level,ev,i.log);if(e.hasOwnProperty("customLevels")===!0&&(qT(this.levels,e.customLevels),n.levels=OT(e.customLevels,n[RT]),DT(n)),typeof e.redact=="object"&&e.redact!==null||Array.isArray(e.redact)){n.redact=e.redact;let l=UT(n.redact,Q5),d={stringify:l[NT]};n[AT]=Q5,n[kT]=l,n[MT]=d}n[km]=iv(n,t);let u=e.level||this.level;return n[Mm](u),this.onChild(n),n}function WT(){let e=`{${this[km].substr(1)}}`,r=JSON.parse(e);return delete r.pid,delete r.hostname,r}function GT(t){let e=iv(this,t);this[km]=e,delete this[bT]}function KT(t,e){return Object.assign(e,t)}function VT(t,e,r){let i=this[ET](),n=this[ST],s=this[CT],o=this[wT]||KT,u;t==null?u={}:t instanceof Error?(u={[s]:t},e===void 0&&(e=t.message)):(u=t,e===void 0&&t[s]&&(e=t[s].message)),n&&(u=o(u,n(u,r)));let l=this[tv](u,e,r,i),d=this[rv];d[TT]===!0&&(d.lastLevel=r,d.lastObj=u,d.lastMsg=e,d.lastTime=i.slice(this[_T]),d.lastLogger=this),d.write(l)}function $T(){}function XT(){let t=this[rv];"flush"in t&&t.flush($T)}});var qm=U((Dm,lv)=>{"use strict";var Ho=Bm();Ho.configure=Bm;Ho.stringify=Ho;Ho.default=Ho;Dm.stringify=Ho;Dm.configure=Bm;lv.exports=Ho;var JT=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/,YT=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/g,Om=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000b","\\f","\\r","\\u000e","\\u000f","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001a","\\u001b","\\u001c","\\u001d","\\u001e","\\u001f","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\"];function ZT(t){if(t.length===2){let r=t.charCodeAt(1);return`${t[0]}\\u${r.toString(16)}`}let e=t.charCodeAt(0);return Om.length>e?Om[e]:`\\u${e.toString(16)}`}function Us(t){if(t.length<5e3&&!JT.test(t))return t;if(t.length>100)return t.replace(YT,ZT);let e="",r=0;for(let i=0;i<t.length;i++){let n=t.charCodeAt(i);if(n===34||n===92||n<32)e+=`${t.slice(r,i)}${Om[n]}`,r=i+1;else if(n>=55296&&n<=57343){if(n<=56319&&i+1<t.length){let s=t.charCodeAt(i+1);if(s>=56320&&s<=57343){i++;continue}}e+=`${t.slice(r,i)}${`\\u${n.toString(16)}`}`,r=i+1}}return e+=t.slice(r),e}function Im(t){if(t.length>200)return t.sort();for(let e=1;e<t.length;e++){let r=t[e],i=e;for(;i!==0&&t[i-1]>r;)t[i]=t[i-1],i--;t[i]=r}return t}var QT=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Uint8Array)),Symbol.toStringTag).get;function Pm(t){return QT.call(t)!==void 0&&t.length!==0}function Lm(t,e,r){t.length<r&&(r=t.length);let i=e===","?"":" ",n=`"0":${i}${t[0]}`;for(let s=1;s<r;s++)n+=`${e}"${s}":${i}${t[s]}`;return n}function eN(t){if(t&&Object.prototype.hasOwnProperty.call(t,"circularValue")){var e=t.circularValue;if(typeof e=="string")return`"${e}"`;if(e==null)return e;if(e===Error||e===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}function av(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e)){var r=t[e];if(typeof r!="boolean")throw new TypeError(`The "${e}" argument must be of type boolean`)}return r===void 0?!0:r}function uv(t,e){if(t&&Object.prototype.hasOwnProperty.call(t,e)){var r=t[e];if(typeof r!="number")throw new TypeError(`The "${e}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${e}" argument must be an integer`);if(r<1)throw new RangeError(`The "${e}" argument must be >= 1`)}return r===void 0?1/0:r}function jo(t){return t===1?"1 item":`${t} items`}function tN(t){let e=new Set;for(let r of t)typeof r=="string"?e.add(r):typeof r=="number"&&e.add(String(r));return e}function Bm(t){let e=eN(t),r=av(t,"bigint"),i=av(t,"deterministic"),n=uv(t,"maximumDepth"),s=uv(t,"maximumBreadth");function o(m,b,S,y,v,C){let w=b[m];switch(typeof w=="object"&&w!==null&&typeof w.toJSON=="function"&&(w=w.toJSON(m)),w=y.call(b,m,w),typeof w){case"string":return`"${Us(w)}"`;case"object":{if(w===null)return"null";if(S.indexOf(w)!==-1)return e;let x="",N=",",I=C;if(Array.isArray(w)){if(w.length===0)return"[]";if(n<S.length+1)return'"[Array]"';S.push(w),v!==""&&(C+=v,x+=`
|
|
75
|
-
${C}`,N=`,
|
|
76
|
-
${C}`);let le=Math.min(w.length,s),te=0;for(;te<le-1;te++){let qe=o(te,w,S,y,v,C);x+=qe!==void 0?qe:"null",x+=N}let ve=o(te,w,S,y,v,C);if(x+=ve!==void 0?ve:"null",w.length-1>s){let qe=w.length-s-1;x+=`${N}"... ${jo(qe)} not stringified"`}return v!==""&&(x+=`
|
|
77
|
-
${I}`),S.pop(),`[${x}]`}let q=Object.keys(w),B=q.length;if(B===0)return"{}";if(n<S.length+1)return'"[Object]"';let z="",D="";v!==""&&(C+=v,N=`,
|
|
78
|
-
${C}`,z=" ");let se=Math.min(B,s);Pm(w)&&(x+=Lm(w,N,s),q=q.slice(w.length),se-=w.length,D=N),i&&(q=Im(q)),S.push(w);for(let le=0;le<se;le++){let te=q[le],ve=o(te,w,S,y,v,C);ve!==void 0&&(x+=`${D}"${Us(te)}":${z}${ve}`,D=N)}if(B>s){let le=B-s;x+=`${D}"...":${z}"${jo(le)} not stringified"`,D=N}return v!==""&&D.length>1&&(x=`
|
|
79
|
-
${C}${x}
|
|
80
|
-
${I}`),S.pop(),`{${x}}`}case"number":return isFinite(w)?String(w):"null";case"boolean":return w===!0?"true":"false";case"bigint":return r?String(w):void 0}}function u(m,b,S,y,v,C){switch(typeof b=="object"&&b!==null&&typeof b.toJSON=="function"&&(b=b.toJSON(m)),typeof b){case"string":return`"${Us(b)}"`;case"object":{if(b===null)return"null";if(S.indexOf(b)!==-1)return e;let w=C,x="",N=",";if(Array.isArray(b)){if(b.length===0)return"[]";if(n<S.length+1)return'"[Array]"';S.push(b),v!==""&&(C+=v,x+=`
|
|
81
|
-
${C}`,N=`,
|
|
82
|
-
${C}`);let B=Math.min(b.length,s),z=0;for(;z<B-1;z++){let se=u(z,b[z],S,y,v,C);x+=se!==void 0?se:"null",x+=N}let D=u(z,b[z],S,y,v,C);if(x+=D!==void 0?D:"null",b.length-1>s){let se=b.length-s-1;x+=`${N}"... ${jo(se)} not stringified"`}return v!==""&&(x+=`
|
|
83
|
-
${w}`),S.pop(),`[${x}]`}if(y.size===0)return"{}";S.push(b);let I="";v!==""&&(C+=v,N=`,
|
|
84
|
-
${C}`,I=" ");let q="";for(let B of y){let z=u(B,b[B],S,y,v,C);z!==void 0&&(x+=`${q}"${Us(B)}":${I}${z}`,q=N)}return v!==""&&q.length>1&&(x=`
|
|
85
|
-
${C}${x}
|
|
86
|
-
${w}`),S.pop(),`{${x}}`}case"number":return isFinite(b)?String(b):"null";case"boolean":return b===!0?"true":"false";case"bigint":return r?String(b):void 0}}function l(m,b,S,y,v){switch(typeof b){case"string":return`"${Us(b)}"`;case"object":{if(b===null)return"null";if(typeof b.toJSON=="function"){if(b=b.toJSON(m),typeof b!="object")return l(m,b,S,y,v);if(b===null)return"null"}if(S.indexOf(b)!==-1)return e;let C=v;if(Array.isArray(b)){if(b.length===0)return"[]";if(n<S.length+1)return'"[Array]"';S.push(b),v+=y;let z=`
|
|
87
|
-
${v}`,D=`,
|
|
88
|
-
${v}`,se=Math.min(b.length,s),le=0;for(;le<se-1;le++){let ve=l(le,b[le],S,y,v);z+=ve!==void 0?ve:"null",z+=D}let te=l(le,b[le],S,y,v);if(z+=te!==void 0?te:"null",b.length-1>s){let ve=b.length-s-1;z+=`${D}"... ${jo(ve)} not stringified"`}return z+=`
|
|
89
|
-
${C}`,S.pop(),`[${z}]`}let w=Object.keys(b),x=w.length;if(x===0)return"{}";if(n<S.length+1)return'"[Object]"';v+=y;let N=`,
|
|
90
|
-
${v}`,I="",q="",B=Math.min(x,s);Pm(b)&&(I+=Lm(b,N,s),w=w.slice(b.length),B-=b.length,q=N),i&&(w=Im(w)),S.push(b);for(let z=0;z<B;z++){let D=w[z],se=l(D,b[D],S,y,v);se!==void 0&&(I+=`${q}"${Us(D)}": ${se}`,q=N)}if(x>s){let z=x-s;I+=`${q}"...": "${jo(z)} not stringified"`,q=N}return q!==""&&(I=`
|
|
91
|
-
${v}${I}
|
|
92
|
-
${C}`),S.pop(),`{${I}}`}case"number":return isFinite(b)?String(b):"null";case"boolean":return b===!0?"true":"false";case"bigint":return r?String(b):void 0}}function d(m,b,S){switch(typeof b){case"string":return`"${Us(b)}"`;case"object":{if(b===null)return"null";if(typeof b.toJSON=="function"){if(b=b.toJSON(m),typeof b!="object")return d(m,b,S);if(b===null)return"null"}if(S.indexOf(b)!==-1)return e;let y="";if(Array.isArray(b)){if(b.length===0)return"[]";if(n<S.length+1)return'"[Array]"';S.push(b);let N=Math.min(b.length,s),I=0;for(;I<N-1;I++){let B=d(I,b[I],S);y+=B!==void 0?B:"null",y+=","}let q=d(I,b[I],S);if(y+=q!==void 0?q:"null",b.length-1>s){let B=b.length-s-1;y+=`,"... ${jo(B)} not stringified"`}return S.pop(),`[${y}]`}let v=Object.keys(b),C=v.length;if(C===0)return"{}";if(n<S.length+1)return'"[Object]"';let w="",x=Math.min(C,s);Pm(b)&&(y+=Lm(b,",",s),v=v.slice(b.length),x-=b.length,w=","),i&&(v=Im(v)),S.push(b);for(let N=0;N<x;N++){let I=v[N],q=d(I,b[I],S);q!==void 0&&(y+=`${w}"${Us(I)}":${q}`,w=",")}if(C>s){let N=C-s;y+=`${w}"...":"${jo(N)} not stringified"`}return S.pop(),`{${y}}`}case"number":return isFinite(b)?String(b):"null";case"boolean":return b===!0?"true":"false";case"bigint":return r?String(b):void 0}}function h(m,b,S){if(arguments.length>1){let y="";if(typeof S=="number"?y=" ".repeat(Math.min(S,10)):typeof S=="string"&&(y=S.slice(0,10)),b!=null){if(typeof b=="function")return o("",{"":m},[],b,y,"");if(Array.isArray(b))return u("",m,[],tN(b),y,"")}if(y.length!==0)return l("",m,[],y,"")}return d("",m,[])}return h}});var dv=U((cj,hv)=>{"use strict";var zm=Symbol.for("pino.metadata"),{levels:cv}=Ef(),fv=Object.create(cv);fv.silent=1/0;var rN=cv.info;function iN(t,e){let r=0;t=t||[],e=e||{dedupe:!1};let i=fv;e.levels&&typeof e.levels=="object"&&(i=e.levels);let n={write:s,add:u,flushSync:o,end:l,minLevel:0,streams:[],clone:d,[zm]:!0};return Array.isArray(t)?t.forEach(u,n):u.call(n,t),t=null,n;function s(h){let m,b=this.lastLevel,{streams:S}=this,y=0,v;for(let C=sN(S.length,e.dedupe);aN(C,S.length,e.dedupe);C=oN(C,e.dedupe))if(m=S[C],m.level<=b){if(y!==0&&y!==m.level)break;if(v=m.stream,v[zm]){let{lastTime:w,lastMsg:x,lastObj:N,lastLogger:I}=this;v.lastLevel=b,v.lastTime=w,v.lastMsg=x,v.lastObj=N,v.lastLogger=I}v.write(h),e.dedupe&&(y=m.level)}else if(!e.dedupe)break}function o(){for(let{stream:h}of this.streams)typeof h.flushSync=="function"&&h.flushSync()}function u(h){if(!h)return n;let m=typeof h.write=="function"||h.stream,b=h.write?h:h.stream;if(!m)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:S}=this,y;typeof h.levelVal=="number"?y=h.levelVal:typeof h.level=="string"?y=i[h.level]:typeof h.level=="number"?y=h.level:y=rN;let v={stream:b,level:y,levelVal:void 0,id:r++};return S.unshift(v),S.sort(nN),this.minLevel=S[0].level,n}function l(){for(let{stream:h}of this.streams)typeof h.flushSync=="function"&&h.flushSync(),h.end()}function d(h){let m=new Array(this.streams.length);for(let b=0;b<m.length;b++)m[b]={level:h,stream:this.streams[b].stream};return{write:s,add:u,minLevel:h,streams:m,clone:d,flushSync:o,[zm]:!0}}}function nN(t,e){return t.level-e.level}function sN(t,e){return e?t-1:0}function oN(t,e){return e?t-1:t+1}function aN(t,e,r){return r?t>=0:t<e}hv.exports=iN});var Rv=U((fj,Ai)=>{"use strict";var uN=require("os"),xv=Vl(),lN=im(),cN=cm(),wv=m5(),fN=ov(),Ev=lu(),{configure:hN}=qm(),{assertDefaultLevelFound:dN,mappings:_v,genLsCache:pN,levels:mN}=Ef(),{createArgsNormalizer:yN,asChindings:gN,buildSafeSonicBoom:pv,buildFormatters:vN,stringify:_f,normalizeDestFileDescriptor:mv,noop:bN}=wf(),{version:SN}=Nm(),{chindingsSym:yv,redactFmtSym:xN,serializersSym:gv,timeSym:wN,timeSliceIndexSym:EN,streamSym:_N,stringifySym:vv,stringifySafeSym:Fm,stringifiersSym:bv,setLevelSym:CN,endSym:RN,formatOptsSym:TN,messageKeySym:NN,errorKeySym:AN,nestedKeySym:MN,mixinSym:kN,useOnlyCustomLevelsSym:IN,formattersSym:Sv,hooksSym:PN,nestedKeyStrSym:LN,mixinMergeStrategySym:ON}=Ev,{epochTime:Cv,nullTime:BN}=wv,{pid:DN}=process,qN=uN.hostname(),zN=xv.err,FN={level:"info",levels:mN,messageKey:"msg",errorKey:"err",nestedKey:null,enabled:!0,base:{pid:DN,hostname:qN},serializers:Object.assign(Object.create(null),{err:zN}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:Cv,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},UN=yN(FN),jN=Object.assign(Object.create(null),xv);function Um(...t){let e={},{opts:r,stream:i}=UN(e,lN(),...t),{redact:n,crlf:s,serializers:o,timestamp:u,messageKey:l,errorKey:d,nestedKey:h,base:m,name:b,level:S,customLevels:y,mixin:v,mixinMergeStrategy:C,useOnlyCustomLevels:w,formatters:x,hooks:N,depthLimit:I,edgeLimit:q,onChild:B}=r,z=hN({maximumDepth:I,maximumBreadth:q}),D=vN(x.level,x.bindings,x.log),se=n?cN(n,_f):{},le=_f.bind({[Fm]:z}),te=n?{stringify:se[xN]}:{stringify:le},ve="}"+(s?`\r
|
|
93
|
-
`:`
|
|
94
|
-
`),qe=gN.bind(null,{[yv]:"",[gv]:o,[bv]:se,[vv]:_f,[Fm]:z,[Sv]:D}),Je="";m!==null&&(b===void 0?Je=qe(m):Je=qe(Object.assign({},m,{name:b})));let Mt=u instanceof Function?u:u?Cv:BN,Pe=Mt().indexOf(":")+1;if(w&&!y)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(v&&typeof v!="function")throw Error(`Unknown mixin type "${typeof v}" - expected "function"`);dN(S,y,w);let Wr=_v(y,w);return Object.assign(e,{levels:Wr,[IN]:w,[_N]:i,[wN]:Mt,[EN]:Pe,[vv]:_f,[Fm]:z,[bv]:se,[RN]:ve,[TN]:te,[NN]:l,[AN]:d,[MN]:h,[LN]:h?`,${JSON.stringify(h)}:{`:"",[gv]:o,[kN]:v,[ON]:C,[yv]:Je,[Sv]:D,[PN]:N,silent:bN,onChild:B}),Object.setPrototypeOf(e,fN()),pN(e),e[CN](S),e}Ai.exports=Um;Ai.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=mv(t.dest||process.stdout.fd),pv(t)):pv({dest:mv(t),minLength:0});Ai.exports.transport=Em();Ai.exports.multistream=dv();Ai.exports.levels=_v();Ai.exports.stdSerializers=jN;Ai.exports.stdTimeFunctions=Object.assign({},wv);Ai.exports.symbols=Ev;Ai.exports.version=SN;Ai.exports.default=Um;Ai.exports.pino=Um});var Mv=U((hj,Xl)=>{"use strict";var HN=process.env.TERM_PROGRAM==="Hyper",WN=process.platform==="win32",Tv=process.platform==="linux",jm={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},Nv=Object.assign({},jm,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),Av=Object.assign({},jm,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",question:"?",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:Tv?"\u25B8":"\u276F",pointerSmall:Tv?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});Xl.exports=WN&&!HN?Nv:Av;Reflect.defineProperty(Xl.exports,"common",{enumerable:!1,value:jm});Reflect.defineProperty(Xl.exports,"windows",{enumerable:!1,value:Nv});Reflect.defineProperty(Xl.exports,"other",{enumerable:!1,value:Av})});var Iv=U((dj,Hm)=>{"use strict";var GN=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),KN=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,kv=()=>{let t={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(t.enabled=process.env.FORCE_COLOR!=="0");let e=s=>{let o=s.open=`\x1B[${s.codes[0]}m`,u=s.close=`\x1B[${s.codes[1]}m`,l=s.regex=new RegExp(`\\u001b\\[${s.codes[1]}m`,"g");return s.wrap=(d,h)=>{d.includes(u)&&(d=d.replace(l,u+o));let m=o+d+u;return h?m.replace(/\r*\n/g,`${u}$&${o}`):m},s},r=(s,o,u)=>typeof s=="function"?s(o):s.wrap(o,u),i=(s,o)=>{if(s===""||s==null)return"";if(t.enabled===!1)return s;if(t.visible===!1)return"";let u=""+s,l=u.includes(`
|
|
95
|
-
`),d=o.length;for(d>0&&o.includes("unstyle")&&(o=[...new Set(["unstyle",...o])].reverse());d-- >0;)u=r(t.styles[o[d]],u,l);return u},n=(s,o,u)=>{t.styles[s]=e({name:s,codes:o}),(t.keys[u]||(t.keys[u]=[])).push(s),Reflect.defineProperty(t,s,{configurable:!0,enumerable:!0,set(d){t.alias(s,d)},get(){let d=h=>i(h,d.stack);return Reflect.setPrototypeOf(d,t),d.stack=this.stack?this.stack.concat(s):[s],d}})};return n("reset",[0,0],"modifier"),n("bold",[1,22],"modifier"),n("dim",[2,22],"modifier"),n("italic",[3,23],"modifier"),n("underline",[4,24],"modifier"),n("inverse",[7,27],"modifier"),n("hidden",[8,28],"modifier"),n("strikethrough",[9,29],"modifier"),n("black",[30,39],"color"),n("red",[31,39],"color"),n("green",[32,39],"color"),n("yellow",[33,39],"color"),n("blue",[34,39],"color"),n("magenta",[35,39],"color"),n("cyan",[36,39],"color"),n("white",[37,39],"color"),n("gray",[90,39],"color"),n("grey",[90,39],"color"),n("bgBlack",[40,49],"bg"),n("bgRed",[41,49],"bg"),n("bgGreen",[42,49],"bg"),n("bgYellow",[43,49],"bg"),n("bgBlue",[44,49],"bg"),n("bgMagenta",[45,49],"bg"),n("bgCyan",[46,49],"bg"),n("bgWhite",[47,49],"bg"),n("blackBright",[90,39],"bright"),n("redBright",[91,39],"bright"),n("greenBright",[92,39],"bright"),n("yellowBright",[93,39],"bright"),n("blueBright",[94,39],"bright"),n("magentaBright",[95,39],"bright"),n("cyanBright",[96,39],"bright"),n("whiteBright",[97,39],"bright"),n("bgBlackBright",[100,49],"bgBright"),n("bgRedBright",[101,49],"bgBright"),n("bgGreenBright",[102,49],"bgBright"),n("bgYellowBright",[103,49],"bgBright"),n("bgBlueBright",[104,49],"bgBright"),n("bgMagentaBright",[105,49],"bgBright"),n("bgCyanBright",[106,49],"bgBright"),n("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=KN,t.hasColor=t.hasAnsi=s=>(t.ansiRegex.lastIndex=0,typeof s=="string"&&s!==""&&t.ansiRegex.test(s)),t.alias=(s,o)=>{let u=typeof o=="string"?t[o]:o;if(typeof u!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");u.stack||(Reflect.defineProperty(u,"name",{value:s}),t.styles[s]=u,u.stack=[s]),Reflect.defineProperty(t,s,{configurable:!0,enumerable:!0,set(l){t.alias(s,l)},get(){let l=d=>i(d,l.stack);return Reflect.setPrototypeOf(l,t),l.stack=this.stack?this.stack.concat(u.stack):u.stack,l}})},t.theme=s=>{if(!GN(s))throw new TypeError("Expected theme to be an object");for(let o of Object.keys(s))t.alias(o,s[o]);return t},t.alias("unstyle",s=>typeof s=="string"&&s!==""?(t.ansiRegex.lastIndex=0,s.replace(t.ansiRegex,"")):""),t.alias("noop",s=>s),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=Mv(),t.define=n,t};Hm.exports=kv();Hm.exports.create=kv});var Wm=U((mj,Pv)=>{Pv.exports=require("stream")});var Dv=U((yj,Bv)=>{"use strict";function Lv(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function $N(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lv(Object(r),!0).forEach(function(i){XN(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lv(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function XN(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function JN(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ov(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function YN(t,e,r){return e&&Ov(t.prototype,e),r&&Ov(t,r),t}var ZN=require("buffer"),Cf=ZN.Buffer,QN=require("util"),Gm=QN.inspect,eA=Gm&&Gm.custom||"inspect";function tA(t,e,r){Cf.prototype.copy.call(t,e,r)}Bv.exports=function(){function t(){JN(this,t),this.head=null,this.tail=null,this.length=0}return YN(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Cf.alloc(0);for(var i=Cf.allocUnsafe(r>>>0),n=this.head,s=0;n;)tA(n.data,i,s),s+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,s=i.data;for(r-=s.length;i=i.next;){var o=i.data,u=r>o.length?o.length:r;if(u===o.length?s+=o:s+=o.slice(0,r),r-=u,r===0){u===o.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(u));break}++n}return this.length-=n,s}},{key:"_getBuffer",value:function(r){var i=Cf.allocUnsafe(r),n=this.head,s=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var o=n.data,u=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,u),r-=u,r===0){u===o.length?(++s,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(u));break}++s}return this.length-=s,i}},{key:eA,value:function(r,i){return Gm(this,$N({},i,{depth:0,customInspect:!1}))}}]),t}()});var Vm=U((gj,zv)=>{"use strict";function rA(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Km,this,t)):process.nextTick(Km,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!e&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(Rf,r):(r._writableState.errorEmitted=!0,process.nextTick(qv,r,s)):process.nextTick(qv,r,s):e?(process.nextTick(Rf,r),e(s)):process.nextTick(Rf,r)}),this)}function qv(t,e){Km(t,e),Rf(t)}function Rf(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function iA(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function Km(t,e){t.emit("error",e)}function nA(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}zv.exports={destroy:rA,undestroy:iA,errorOrDestroy:nA}});var js=U((vj,jv)=>{"use strict";var Uv={};function Mi(t,e,r){r||(r=Error);function i(s,o,u){return typeof e=="string"?e:e(s,o,u)}class n extends r{constructor(o,u,l){super(i(o,u,l))}}n.prototype.name=r.name,n.prototype.code=t,Uv[t]=n}function Fv(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function sA(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function oA(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function aA(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}Mi("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);Mi("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&sA(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let n;if(oA(t," argument"))n=`The ${t} ${i} ${Fv(e,"type")}`;else{let s=aA(t,".")?"property":"argument";n=`The "${t}" ${s} ${i} ${Fv(e,"type")}`}return n+=`. Received type ${typeof r}`,n},TypeError);Mi("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Mi("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});Mi("ERR_STREAM_PREMATURE_CLOSE","Premature close");Mi("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});Mi("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Mi("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Mi("ERR_STREAM_WRITE_AFTER_END","write after end");Mi("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Mi("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);Mi("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");jv.exports.codes=Uv});var $m=U((bj,Hv)=>{"use strict";var uA=js().codes.ERR_INVALID_OPT_VALUE;function lA(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function cA(t,e,r,i){var n=lA(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var s=i?r:"highWaterMark";throw new uA(s,n)}return Math.floor(n)}return t.objectMode?16:16*1024}Hv.exports={getHighWaterMark:cA}});var Wv=U((Sj,Xm)=>{typeof Object.create=="function"?Xm.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Xm.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var hu=U((xj,Ym)=>{try{if(Jm=require("util"),typeof Jm.inherits!="function")throw"";Ym.exports=Jm.inherits}catch{Ym.exports=Wv()}var Jm});var Kv=U((wj,Gv)=>{Gv.exports=require("util").deprecate});var e0=U((Ej,Zv)=>{"use strict";Zv.exports=Vt;function $v(t){var e=this;this.next=null,this.entry=null,this.finish=function(){DA(e,t)}}var du;Vt.WritableState=Yl;var fA={deprecate:Kv()},Xv=Wm(),Nf=require("buffer").Buffer,hA=global.Uint8Array||function(){};function dA(t){return Nf.from(t)}function pA(t){return Nf.isBuffer(t)||t instanceof hA}var Qm=Vm(),mA=$m(),yA=mA.getHighWaterMark,Hs=js().codes,gA=Hs.ERR_INVALID_ARG_TYPE,vA=Hs.ERR_METHOD_NOT_IMPLEMENTED,bA=Hs.ERR_MULTIPLE_CALLBACK,SA=Hs.ERR_STREAM_CANNOT_PIPE,xA=Hs.ERR_STREAM_DESTROYED,wA=Hs.ERR_STREAM_NULL_VALUES,EA=Hs.ERR_STREAM_WRITE_AFTER_END,_A=Hs.ERR_UNKNOWN_ENCODING,pu=Qm.errorOrDestroy;hu()(Vt,Xv);function CA(){}function Yl(t,e,r){du=du||Wo(),t=t||{},typeof r!="boolean"&&(r=e instanceof du),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=yA(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){IA(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new $v(this)}Yl.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(Yl.prototype,"buffer",{get:fA.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Tf;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Tf=Function.prototype[Symbol.hasInstance],Object.defineProperty(Vt,Symbol.hasInstance,{value:function(e){return Tf.call(this,e)?!0:this!==Vt?!1:e&&e._writableState instanceof Yl}})):Tf=function(e){return e instanceof this};function Vt(t){du=du||Wo();var e=this instanceof du;if(!e&&!Tf.call(Vt,this))return new Vt(t);this._writableState=new Yl(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Xv.call(this)}Vt.prototype.pipe=function(){pu(this,new SA)};function RA(t,e){var r=new EA;pu(t,r),process.nextTick(e,r)}function TA(t,e,r,i){var n;return r===null?n=new wA:typeof r!="string"&&!e.objectMode&&(n=new gA("chunk",["string","Buffer"],r)),n?(pu(t,n),process.nextTick(i,n),!1):!0}Vt.prototype.write=function(t,e,r){var i=this._writableState,n=!1,s=!i.objectMode&&pA(t);return s&&!Nf.isBuffer(t)&&(t=dA(t)),typeof e=="function"&&(r=e,e=null),s?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=CA),i.ending?RA(this,r):(s||TA(this,i,t,r))&&(i.pendingcb++,n=AA(this,i,s,t,e,r)),n};Vt.prototype.cork=function(){this._writableState.corked++};Vt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&Jv(this,t))};Vt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new _A(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Vt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function NA(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Nf.from(e,r)),e}Object.defineProperty(Vt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function AA(t,e,r,i,n,s){if(!r){var o=NA(e,i,n);i!==o&&(r=!0,n="buffer",i=o)}var u=e.objectMode?1:i.length;e.length+=u;var l=e.length<e.highWaterMark;if(l||(e.needDrain=!0),e.writing||e.corked){var d=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:s,next:null},d?d.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Zm(t,e,!1,u,i,n,s);return l}function Zm(t,e,r,i,n,s,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new xA("write")):r?t._writev(n,e.onwrite):t._write(n,s,e.onwrite),e.sync=!1}function MA(t,e,r,i,n){--e.pendingcb,r?(process.nextTick(n,i),process.nextTick(Jl,t,e),t._writableState.errorEmitted=!0,pu(t,i)):(n(i),t._writableState.errorEmitted=!0,pu(t,i),Jl(t,e))}function kA(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function IA(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new bA;if(kA(r),e)MA(t,r,i,e,n);else{var s=Yv(r)||t.destroyed;!s&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&Jv(t,r),i?process.nextTick(Vv,t,r,s,n):Vv(t,r,s,n)}}function Vv(t,e,r,i){r||PA(t,e),e.pendingcb--,i(),Jl(t,e)}function PA(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function Jv(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),s=e.corkedRequestsFree;s.entry=r;for(var o=0,u=!0;r;)n[o]=r,r.isBuf||(u=!1),r=r.next,o+=1;n.allBuffers=u,Zm(t,e,!0,e.length,n,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new $v(e),e.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,d=r.encoding,h=r.callback,m=e.objectMode?1:l.length;if(Zm(t,e,!1,m,l,d,h),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Vt.prototype._write=function(t,e,r){r(new vA("_write()"))};Vt.prototype._writev=null;Vt.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||BA(this,i,r),this};Object.defineProperty(Vt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Yv(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function LA(t,e){t._final(function(r){e.pendingcb--,r&&pu(t,r),e.prefinished=!0,t.emit("prefinish"),Jl(t,e)})}function OA(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(LA,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function Jl(t,e){var r=Yv(e);if(r&&(OA(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function BA(t,e,r){e.ending=!0,Jl(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function DA(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Vt.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){!this._writableState||(this._writableState.destroyed=e)}});Vt.prototype.destroy=Qm.destroy;Vt.prototype._undestroy=Qm.undestroy;Vt.prototype._destroy=function(t,e){e(t)}});var Wo=U((_j,e9)=>{"use strict";var qA=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e9.exports=_n;var Qv=i0(),r0=e0();hu()(_n,Qv);for(t0=qA(r0.prototype),Af=0;Af<t0.length;Af++)Mf=t0[Af],_n.prototype[Mf]||(_n.prototype[Mf]=r0.prototype[Mf]);var t0,Mf,Af;function _n(t){if(!(this instanceof _n))return new _n(t);Qv.call(this,t),r0.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",zA)))}Object.defineProperty(_n.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(_n.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(_n.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function zA(){this._writableState.ended||process.nextTick(FA,this)}function FA(t){t.end()}Object.defineProperty(_n.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var i9=U((n0,r9)=>{var kf=require("buffer"),Cn=kf.Buffer;function t9(t,e){for(var r in t)e[r]=t[r]}Cn.from&&Cn.alloc&&Cn.allocUnsafe&&Cn.allocUnsafeSlow?r9.exports=kf:(t9(kf,n0),n0.Buffer=Go);function Go(t,e,r){return Cn(t,e,r)}Go.prototype=Object.create(Cn.prototype);t9(Cn,Go);Go.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Cn(t,e,r)};Go.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Cn(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};Go.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Cn(t)};Go.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return kf.SlowBuffer(t)}});var a0=U(s9=>{"use strict";var o0=i9().Buffer,n9=o0.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function UA(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function jA(t){var e=UA(t);if(typeof e!="string"&&(o0.isEncoding===n9||!n9(t)))throw new Error("Unknown encoding: "+t);return e||t}s9.StringDecoder=Zl;function Zl(t){this.encoding=jA(t);var e;switch(this.encoding){case"utf16le":this.text=$A,this.end=XA,e=4;break;case"utf8":this.fillLast=GA,e=4;break;case"base64":this.text=JA,this.end=YA,e=3;break;default:this.write=ZA,this.end=QA;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=o0.allocUnsafe(e)}Zl.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Zl.prototype.end=VA;Zl.prototype.text=KA;Zl.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function s0(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function HA(t,e,r){var i=e.length-1;if(i<r)return 0;var n=s0(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=s0(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=s0(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function WA(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function GA(t){var e=this.lastTotal-this.lastNeed,r=WA(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function KA(t,e){var r=HA(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function VA(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function $A(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function XA(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function JA(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function YA(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function ZA(t){return t.toString(this.encoding)}function QA(t){return t&&t.length?this.write(t):""}});var If=U((Rj,u9)=>{"use strict";var o9=js().codes.ERR_STREAM_PREMATURE_CLOSE;function eM(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function tM(){}function rM(t){return t.setHeader&&typeof t.abort=="function"}function a9(t,e,r){if(typeof e=="function")return a9(t,null,e);e||(e={}),r=eM(r||tM);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,s=function(){t.writable||u()},o=t._writableState&&t._writableState.finished,u=function(){n=!1,o=!0,i||r.call(t)},l=t._readableState&&t._readableState.endEmitted,d=function(){i=!1,l=!0,n||r.call(t)},h=function(y){r.call(t,y)},m=function(){var y;if(i&&!l)return(!t._readableState||!t._readableState.ended)&&(y=new o9),r.call(t,y);if(n&&!o)return(!t._writableState||!t._writableState.ended)&&(y=new o9),r.call(t,y)},b=function(){t.req.on("finish",u)};return rM(t)?(t.on("complete",u),t.on("abort",m),t.req?b():t.on("request",b)):n&&!t._writableState&&(t.on("end",s),t.on("close",s)),t.on("end",d),t.on("finish",u),e.error!==!1&&t.on("error",h),t.on("close",m),function(){t.removeListener("complete",u),t.removeListener("abort",m),t.removeListener("request",b),t.req&&t.req.removeListener("finish",u),t.removeListener("end",s),t.removeListener("close",s),t.removeListener("finish",u),t.removeListener("end",d),t.removeListener("error",h),t.removeListener("close",m)}}u9.exports=a9});var c9=U((Tj,l9)=>{"use strict";var Pf;function Ws(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var iM=If(),Gs=Symbol("lastResolve"),Ko=Symbol("lastReject"),Ql=Symbol("error"),Lf=Symbol("ended"),Vo=Symbol("lastPromise"),u0=Symbol("handlePromise"),$o=Symbol("stream");function Ks(t,e){return{value:t,done:e}}function nM(t){var e=t[Gs];if(e!==null){var r=t[$o].read();r!==null&&(t[Vo]=null,t[Gs]=null,t[Ko]=null,e(Ks(r,!1)))}}function sM(t){process.nextTick(nM,t)}function oM(t,e){return function(r,i){t.then(function(){if(e[Lf]){r(Ks(void 0,!0));return}e[u0](r,i)},i)}}var aM=Object.getPrototypeOf(function(){}),uM=Object.setPrototypeOf((Pf={get stream(){return this[$o]},next:function(){var e=this,r=this[Ql];if(r!==null)return Promise.reject(r);if(this[Lf])return Promise.resolve(Ks(void 0,!0));if(this[$o].destroyed)return new Promise(function(o,u){process.nextTick(function(){e[Ql]?u(e[Ql]):o(Ks(void 0,!0))})});var i=this[Vo],n;if(i)n=new Promise(oM(i,this));else{var s=this[$o].read();if(s!==null)return Promise.resolve(Ks(s,!1));n=new Promise(this[u0])}return this[Vo]=n,n}},Ws(Pf,Symbol.asyncIterator,function(){return this}),Ws(Pf,"return",function(){var e=this;return new Promise(function(r,i){e[$o].destroy(null,function(n){if(n){i(n);return}r(Ks(void 0,!0))})})}),Pf),aM),lM=function(e){var r,i=Object.create(uM,(r={},Ws(r,$o,{value:e,writable:!0}),Ws(r,Gs,{value:null,writable:!0}),Ws(r,Ko,{value:null,writable:!0}),Ws(r,Ql,{value:null,writable:!0}),Ws(r,Lf,{value:e._readableState.endEmitted,writable:!0}),Ws(r,u0,{value:function(s,o){var u=i[$o].read();u?(i[Vo]=null,i[Gs]=null,i[Ko]=null,s(Ks(u,!1))):(i[Gs]=s,i[Ko]=o)},writable:!0}),r));return i[Vo]=null,iM(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var s=i[Ko];s!==null&&(i[Vo]=null,i[Gs]=null,i[Ko]=null,s(n)),i[Ql]=n;return}var o=i[Gs];o!==null&&(i[Vo]=null,i[Gs]=null,i[Ko]=null,o(Ks(void 0,!0))),i[Lf]=!0}),e.on("readable",sM.bind(null,i)),i};l9.exports=lM});var p9=U((Nj,d9)=>{"use strict";function f9(t,e,r,i,n,s,o){try{var u=t[s](o),l=u.value}catch(d){r(d);return}u.done?e(l):Promise.resolve(l).then(i,n)}function cM(t){return function(){var e=this,r=arguments;return new Promise(function(i,n){var s=t.apply(e,r);function o(l){f9(s,i,n,o,u,"next",l)}function u(l){f9(s,i,n,o,u,"throw",l)}o(void 0)})}}function h9(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function fM(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?h9(Object(r),!0).forEach(function(i){hM(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):h9(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function hM(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var dM=js().codes.ERR_INVALID_ARG_TYPE;function pM(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new dM("iterable",["Iterable"],e);var n=new t(fM({objectMode:!0},r)),s=!1;n._read=function(){s||(s=!0,o())};function o(){return u.apply(this,arguments)}function u(){return u=cM(function*(){try{var l=yield i.next(),d=l.value,h=l.done;h?n.push(null):n.push(yield d)?o():s=!1}catch(m){n.destroy(m)}}),u.apply(this,arguments)}return n}d9.exports=pM});var i0=U((Mj,_9)=>{"use strict";_9.exports=rt;var mu;rt.ReadableState=v9;var Aj=require("events").EventEmitter,g9=function(e,r){return e.listeners(r).length},tc=Wm(),Of=require("buffer").Buffer,mM=global.Uint8Array||function(){};function yM(t){return Of.from(t)}function gM(t){return Of.isBuffer(t)||t instanceof mM}var l0=require("util"),Ge;l0&&l0.debuglog?Ge=l0.debuglog("stream"):Ge=function(){};var vM=Dv(),y0=Vm(),bM=$m(),SM=bM.getHighWaterMark,Bf=js().codes,xM=Bf.ERR_INVALID_ARG_TYPE,wM=Bf.ERR_STREAM_PUSH_AFTER_EOF,EM=Bf.ERR_METHOD_NOT_IMPLEMENTED,_M=Bf.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,yu,c0,f0;hu()(rt,tc);var ec=y0.errorOrDestroy,h0=["error","close","destroy","pause","resume"];function CM(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function v9(t,e,r){mu=mu||Wo(),t=t||{},typeof r!="boolean"&&(r=e instanceof mu),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=SM(this,t,"readableHighWaterMark",r),this.buffer=new vM,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(yu||(yu=a0().StringDecoder),this.decoder=new yu(t.encoding),this.encoding=t.encoding)}function rt(t){if(mu=mu||Wo(),!(this instanceof rt))return new rt(t);var e=this instanceof mu;this._readableState=new v9(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),tc.call(this)}Object.defineProperty(rt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){!this._readableState||(this._readableState.destroyed=e)}});rt.prototype.destroy=y0.destroy;rt.prototype._undestroy=y0.undestroy;rt.prototype._destroy=function(t,e){e(t)};rt.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=Of.from(t,e),e=""),i=!0),b9(this,t,e,!1,i)};rt.prototype.unshift=function(t){return b9(this,t,null,!0,!1)};function b9(t,e,r,i,n){Ge("readableAddChunk",e);var s=t._readableState;if(e===null)s.reading=!1,NM(t,s);else{var o;if(n||(o=RM(s,e)),o)ec(t,o);else if(s.objectMode||e&&e.length>0)if(typeof e!="string"&&!s.objectMode&&Object.getPrototypeOf(e)!==Of.prototype&&(e=yM(e)),i)s.endEmitted?ec(t,new _M):d0(t,s,e,!0);else if(s.ended)ec(t,new wM);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||e.length!==0?d0(t,s,e,!1):m0(t,s)):d0(t,s,e,!1)}else i||(s.reading=!1,m0(t,s))}return!s.ended&&(s.length<s.highWaterMark||s.length===0)}function d0(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Df(t)),m0(t,e)}function RM(t,e){var r;return!gM(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new xM("chunk",["string","Buffer","Uint8Array"],e)),r}rt.prototype.isPaused=function(){return this._readableState.flowing===!1};rt.prototype.setEncoding=function(t){yu||(yu=a0().StringDecoder);var e=new yu(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var m9=1073741824;function TM(t){return t>=m9?t=m9:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function y9(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=TM(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}rt.prototype.read=function(t){Ge("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Ge("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?p0(this):Df(this),null;if(t=y9(t,e),t===0&&e.ended)return e.length===0&&p0(this),null;var i=e.needReadable;Ge("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Ge("length less than watermark",i)),e.ended||e.reading?(i=!1,Ge("reading or ended",i)):i&&(Ge("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=y9(r,e)));var n;return t>0?n=w9(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&p0(this)),n!==null&&this.emit("data",n),n};function NM(t,e){if(Ge("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Df(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,S9(t)))}}function Df(t){var e=t._readableState;Ge("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Ge("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(S9,t))}function S9(t){var e=t._readableState;Ge("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,g0(t)}function m0(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(AM,t,e))}function AM(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Ge("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}rt.prototype._read=function(t){ec(this,new EM("_read()"))};rt.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Ge("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,s=n?u:v;i.endEmitted?process.nextTick(s):r.once("end",s),t.on("unpipe",o);function o(C,w){Ge("onunpipe"),C===r&&w&&w.hasUnpiped===!1&&(w.hasUnpiped=!0,h())}function u(){Ge("onend"),t.end()}var l=MM(r);t.on("drain",l);var d=!1;function h(){Ge("cleanup"),t.removeListener("close",S),t.removeListener("finish",y),t.removeListener("drain",l),t.removeListener("error",b),t.removeListener("unpipe",o),r.removeListener("end",u),r.removeListener("end",v),r.removeListener("data",m),d=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&l()}r.on("data",m);function m(C){Ge("ondata");var w=t.write(C);Ge("dest.write",w),w===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&E9(i.pipes,t)!==-1)&&!d&&(Ge("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function b(C){Ge("onerror",C),v(),t.removeListener("error",b),g9(t,"error")===0&&ec(t,C)}CM(t,"error",b);function S(){t.removeListener("finish",y),v()}t.once("close",S);function y(){Ge("onfinish"),t.removeListener("close",S),v()}t.once("finish",y);function v(){Ge("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Ge("pipe resume"),r.resume()),t};function MM(t){return function(){var r=t._readableState;Ge("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&g9(t,"data")&&(r.flowing=!0,g0(t))}}rt.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var s=0;s<n;s++)i[s].emit("unpipe",this,{hasUnpiped:!1});return this}var o=E9(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};rt.prototype.on=function(t,e){var r=tc.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,Ge("on readable",i.length,i.reading),i.length?Df(this):i.reading||process.nextTick(kM,this)),r};rt.prototype.addListener=rt.prototype.on;rt.prototype.removeListener=function(t,e){var r=tc.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(x9,this),r};rt.prototype.removeAllListeners=function(t){var e=tc.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(x9,this),e};function x9(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function kM(t){Ge("readable nexttick read 0"),t.read(0)}rt.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ge("resume"),t.flowing=!t.readableListening,IM(this,t)),t.paused=!1,this};function IM(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(PM,t,e))}function PM(t,e){Ge("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),g0(t),e.flowing&&!e.reading&&t.read(0)}rt.prototype.pause=function(){return Ge("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ge("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function g0(t){var e=t._readableState;for(Ge("flow",e.flowing);e.flowing&&t.read()!==null;);}rt.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Ge("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o)}e.push(null)}),t.on("data",function(o){if(Ge("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var u=e.push(o);u||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=function(u){return function(){return t[u].apply(t,arguments)}}(n));for(var s=0;s<h0.length;s++)t.on(h0[s],this.emit.bind(this,h0[s]));return this._read=function(o){Ge("wrapped _read",o),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(rt.prototype[Symbol.asyncIterator]=function(){return c0===void 0&&(c0=c9()),c0(this)});Object.defineProperty(rt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(rt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(rt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});rt._fromList=w9;Object.defineProperty(rt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function w9(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function p0(t){var e=t._readableState;Ge("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(LM,e,t))}function LM(t,e){if(Ge("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(rt.from=function(t,e){return f0===void 0&&(f0=p9()),f0(rt,t,e)});function E9(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var v0=U((kj,R9)=>{"use strict";R9.exports=$n;var qf=js().codes,OM=qf.ERR_METHOD_NOT_IMPLEMENTED,BM=qf.ERR_MULTIPLE_CALLBACK,DM=qf.ERR_TRANSFORM_ALREADY_TRANSFORMING,qM=qf.ERR_TRANSFORM_WITH_LENGTH_0,zf=Wo();hu()($n,zf);function zM(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new BM);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function $n(t){if(!(this instanceof $n))return new $n(t);zf.call(this,t),this._transformState={afterTransform:zM.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",FM)}function FM(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){C9(t,e,r)}):C9(this,null,null)}$n.prototype.push=function(t,e){return this._transformState.needTransform=!1,zf.prototype.push.call(this,t,e)};$n.prototype._transform=function(t,e,r){r(new OM("_transform()"))};$n.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};$n.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};$n.prototype._destroy=function(t,e){zf.prototype._destroy.call(this,t,function(r){e(r)})};function C9(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new qM;if(t._transformState.transforming)throw new DM;return t.push(null)}});var A9=U((Ij,N9)=>{"use strict";N9.exports=rc;var T9=v0();hu()(rc,T9);function rc(t){if(!(this instanceof rc))return new rc(t);T9.call(this,t)}rc.prototype._transform=function(t,e,r){r(null,t)}});var L9=U((Pj,P9)=>{"use strict";var b0;function UM(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var I9=js().codes,jM=I9.ERR_MISSING_ARGS,HM=I9.ERR_STREAM_DESTROYED;function M9(t){if(t)throw t}function WM(t){return t.setHeader&&typeof t.abort=="function"}function GM(t,e,r,i){i=UM(i);var n=!1;t.on("close",function(){n=!0}),b0===void 0&&(b0=If()),b0(t,{readable:e,writable:r},function(o){if(o)return i(o);n=!0,i()});var s=!1;return function(o){if(!n&&!s){if(s=!0,WM(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(o||new HM("pipe"))}}}function k9(t){t()}function KM(t,e){return t.pipe(e)}function VM(t){return!t.length||typeof t[t.length-1]!="function"?M9:t.pop()}function $M(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=VM(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new jM("streams");var n,s=e.map(function(o,u){var l=u<e.length-1,d=u>0;return GM(o,l,d,function(h){n||(n=h),h&&s.forEach(k9),!l&&(s.forEach(k9),i(n))})});return e.reduce(KM)}P9.exports=$M});var O9=U((ki,nc)=>{var ic=require("stream");process.env.READABLE_STREAM==="disable"&&ic?(nc.exports=ic.Readable,Object.assign(nc.exports,ic),nc.exports.Stream=ic):(ki=nc.exports=i0(),ki.Stream=ic||ki,ki.Readable=ki,ki.Writable=e0(),ki.Duplex=Wo(),ki.Transform=v0(),ki.PassThrough=A9(),ki.finished=If(),ki.pipeline=L9())});var z9=U((Lj,q9)=>{"use strict";var{Transform:XM}=O9(),{StringDecoder:JM}=require("string_decoder"),Vs=Symbol("last"),Ff=Symbol("decoder");function YM(t,e,r){var i;if(this.overflow){var n=this[Ff].write(t);if(i=n.split(this.matcher),i.length===1)return r();i.shift(),this.overflow=!1}else this[Vs]+=this[Ff].write(t),i=this[Vs].split(this.matcher);this[Vs]=i.pop();for(var s=0;s<i.length;s++)D9(this,this.mapper(i[s]));if(this.overflow=this[Vs].length>this.maxLength,this.overflow&&!this.skipOverflow)return r(new Error("maximum buffer reached"));r()}function ZM(t){this[Vs]+=this[Ff].end(),this[Vs]&&D9(this,this.mapper(this[Vs])),t()}function D9(t,e){e!==void 0&&t.push(e)}function B9(t){return t}function QM(t,e,r){switch(t=t||/\r?\n/,e=e||B9,r=r||{},arguments.length){case 1:typeof t=="function"?(e=t,t=/\r?\n/):typeof t=="object"&&!(t instanceof RegExp)&&(r=t,t=/\r?\n/);break;case 2:typeof t=="function"?(r=e,e=t,t=/\r?\n/):typeof e=="object"&&(r=e,e=B9)}r=Object.assign({},r),r.transform=YM,r.flush=ZM,r.readableObjectMode=!0;let i=new XM(r);return i[Vs]="",i[Ff]=new JM("utf8"),i.matcher=t,i.mapper=e,i.maxLength=r.maxLength,i.skipOverflow=r.skipOverflow,i.overflow=!1,i}q9.exports=QM});var bu=U((jf,H9)=>{(function(t,e){typeof jf=="object"&&typeof H9<"u"?e(jf):typeof define=="function"&&define.amd?define(["exports"],e):e(t.ULID={})})(jf,function(t){"use strict";function e(w){var x=new Error(w);return x.source="ulid",x}var r="0123456789ABCDEFGHJKMNPQRSTVWXYZ",i=r.length,n=Math.pow(2,48)-1,s=10,o=16;function u(w,x,N){return x>w.length-1?w:w.substr(0,x)+N+w.substr(x+1)}function l(w){for(var x=void 0,N=w.length,I=void 0,q=void 0,B=i-1;!x&&N-->=0;){if(I=w[N],q=r.indexOf(I),q===-1)throw e("incorrectly encoded string");if(q===B){w=u(w,N,r[0]);continue}x=u(w,N,r[q+1])}if(typeof x=="string")return x;throw e("cannot increment this string")}function d(w){var x=Math.floor(w()*i);return x===i&&(x=i-1),r.charAt(x)}function h(w,x){if(isNaN(w))throw new Error(w+" must be a number");if(w>n)throw e("cannot encode time greater than "+n);if(w<0)throw e("time must be positive");if(Number.isInteger(w)===!1)throw e("time must be an integer");for(var N=void 0,I="";x>0;x--)N=w%i,I=r.charAt(N)+I,w=(w-N)/i;return I}function m(w,x){for(var N="";w>0;w--)N=d(x)+N;return N}function b(w){if(w.length!==s+o)throw e("malformed ulid");var x=w.substr(0,s).split("").reverse().reduce(function(N,I,q){var B=r.indexOf(I);if(B===-1)throw e("invalid character found: "+I);return N+=B*Math.pow(i,q)},0);if(x>n)throw e("malformed ulid, timestamp too large");return x}function S(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,x=arguments[1];x||(x=typeof window<"u"?window:null);var N=x&&(x.crypto||x.msCrypto);if(N)return function(){var q=new Uint8Array(1);return N.getRandomValues(q),q[0]/255};try{var I=require("crypto");return function(){return I.randomBytes(1).readUInt8()/255}}catch{}if(w){try{console.error("secure crypto unusable, falling back to insecure Math.random()!")}catch{}return function(){return Math.random()}}throw e("secure crypto unusable, insecure Math.random not allowed")}function y(w){return w||(w=S()),function(N){return isNaN(N)&&(N=Date.now()),h(N,s)+m(o,w)}}function v(w){w||(w=S());var x=0,N=void 0;return function(q){if(isNaN(q)&&(q=Date.now()),q<=x){var B=N=l(N);return h(x,s)+B}x=q;var z=N=m(o,w);return h(q,s)+z}}var C=y();t.replaceCharAt=u,t.incrementBase32=l,t.randomChar=d,t.encodeTime=h,t.encodeRandom=m,t.decodeTime=b,t.detectPrng=S,t.factory=y,t.monotonicFactory=v,t.ulid=C,Object.defineProperty(t,"__esModule",{value:!0})})});var Gf=U((wH,ob)=>{var N0=Yt();function sb(){}sb.prototype.build=function(t,e){return JSON.stringify(Wf(t,e))};function Wf(t,e){if(!(!e||t===void 0||t===null))switch(e.type){case"structure":return ck(t,e);case"map":return hk(t,e);case"list":return fk(t,e);default:return dk(t,e)}}function ck(t,e){var r={};return N0.each(t,function(i,n){var s=e.members[i];if(s){if(s.location!=="body")return;var o=s.isLocationName?s.name:i,u=Wf(n,s);u!==void 0&&(r[o]=u)}}),r}function fk(t,e){var r=[];return N0.arrayEach(t,function(i){var n=Wf(i,e.member);n!==void 0&&r.push(n)}),r}function hk(t,e){var r={};return N0.each(t,function(i,n){var s=Wf(n,e.value);s!==void 0&&(r[i]=s)}),r}function dk(t,e){return e.toWireFormat(t)}ob.exports=sb});var Vf=U((EH,ub)=>{var A0=Yt();function ab(){}ab.prototype.parse=function(t,e){return Kf(JSON.parse(t),e)};function Kf(t,e){if(!(!e||t===void 0))switch(e.type){case"structure":return pk(t,e);case"map":return yk(t,e);case"list":return mk(t,e);default:return gk(t,e)}}function pk(t,e){if(t!=null){var r={},i=e.members;return A0.each(i,function(n,s){var o=s.isLocationName?s.name:n;if(Object.prototype.hasOwnProperty.call(t,o)){var u=t[o],l=Kf(u,s);l!==void 0&&(r[n]=l)}}),r}}function mk(t,e){if(t!=null){var r=[];return A0.arrayEach(t,function(i){var n=Kf(i,e.member);n===void 0?r.push(null):r.push(n)}),r}}function yk(t,e){if(t!=null){var r={};return A0.each(t,function(i,n){var s=Kf(n,e.value);s===void 0?r[i]=null:r[i]=s}),r}}function gk(t,e){return e.toType(t)}ub.exports=ab});var $f=U((_H,lb)=>{var ac=Yt(),vk=me();function bk(t){var e=t.service.config.hostPrefixEnabled;if(!e)return t;var r=t.service.api.operations[t.operation];if(Sk(t))return t;if(r.endpoint&&r.endpoint.hostPrefix){var i=r.endpoint.hostPrefix,n=xk(i,t.params,r.input);wk(t.httpRequest.endpoint,n),Ek(t.httpRequest.endpoint.hostname)}return t}function Sk(t){var e=t.service.api,r=e.operations[t.operation],i=e.endpointOperation&&e.endpointOperation===ac.string.lowerFirst(r.name);return r.endpointDiscoveryRequired!=="NULL"||i===!0}function xk(t,e,r){return ac.each(r.members,function(i,n){if(n.hostLabel===!0){if(typeof e[i]!="string"||e[i]==="")throw ac.error(new Error,{message:"Parameter "+i+" should be a non-empty string.",code:"InvalidParameter"});var s=new RegExp("\\{"+i+"\\}","g");t=t.replace(s,e[i])}}),t}function wk(t,e){t.host&&(t.host=e+t.host),t.hostname&&(t.hostname=e+t.hostname)}function Ek(t){var e=t.split("."),r=/^[a-zA-Z0-9]{1}$|^[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]$/;ac.arrayEach(e,function(i){if(!i.length||i.length<1||i.length>63)throw ac.error(new Error,{code:"ValidationError",message:"Hostname label length should be between 1 to 63 characters, inclusive."});if(!r.test(i))throw vk.util.error(new Error,{code:"ValidationError",message:i+" is not hostname compatible."})})}lb.exports={populateHostPrefix:bk}});var Xf=U((CH,cb)=>{var _k=Yt(),Ck=Gf(),Rk=Vf(),Tk=$f().populateHostPrefix;function Nk(t){var e=t.httpRequest,r=t.service.api,i=r.targetPrefix+"."+r.operations[t.operation].name,n=r.jsonVersion||"1.0",s=r.operations[t.operation].input,o=new Ck;n===1&&(n="1.0"),e.body=o.build(t.params||{},s),e.headers["Content-Type"]="application/x-amz-json-"+n,e.headers["X-Amz-Target"]=i,Tk(t)}function Ak(t){var e={},r=t.httpResponse;if(e.code=r.headers["x-amzn-errortype"]||"UnknownError",typeof e.code=="string"&&(e.code=e.code.split(":")[0]),r.body.length>0)try{var i=JSON.parse(r.body.toString()),n=i.__type||i.code||i.Code;n&&(e.code=n.split("#").pop()),e.code==="RequestEntityTooLarge"?e.message="Request body must be less than 1 MB":e.message=i.message||i.Message||null}catch{e.statusCode=r.statusCode,e.message=r.statusMessage}else e.statusCode=r.statusCode,e.message=r.statusCode.toString();t.error=_k.error(new Error,e)}function Mk(t){var e=t.httpResponse.body.toString()||"{}";if(t.request.service.config.convertResponseTypes===!1)t.data=JSON.parse(e);else{var r=t.request.service.api.operations[t.request.operation],i=r.output||{},n=new Rk;t.data=n.parse(e,i)}}cb.exports={buildRequest:Nk,extractError:Ak,extractData:Mk}});var mb=U((RH,pb)=>{var M0=Yt();function fb(){}fb.prototype.serialize=function(t,e,r){db("",t,e,r)};function hb(t){return t.isQueryName||t.api.protocol!=="ec2"?t.name:t.name[0].toUpperCase()+t.name.substr(1)}function db(t,e,r,i){M0.each(r.members,function(n,s){var o=e[n];if(o!=null){var u=hb(s);u=t?t+"."+u:u,Jf(u,o,s,i)}})}function kk(t,e,r,i){var n=1;M0.each(e,function(s,o){var u=r.flattened?".":".entry.",l=u+n+++".",d=l+(r.key.name||"key"),h=l+(r.value.name||"value");Jf(t+d,s,r.key,i),Jf(t+h,o,r.value,i)})}function Ik(t,e,r,i){var n=r.member||{};if(e.length===0){i.call(this,t,null);return}M0.arrayEach(e,function(s,o){var u="."+(o+1);if(r.api.protocol==="ec2")u=u+"";else if(r.flattened){if(n.name){var l=t.split(".");l.pop(),l.push(hb(n)),t=l.join(".")}}else u="."+(n.name?n.name:"member")+u;Jf(t+u,s,n,i)})}function Jf(t,e,r,i){e!=null&&(r.type==="structure"?db(t,e,r,i):r.type==="list"?Ik(t,e,r,i):r.type==="map"?kk(t,e,r,i):i(t,r.toWireFormat(e).toString()))}pb.exports=fb});var k0=U((TH,yb)=>{var Pk=Yt().memoizedProperty;function Lk(t,e,r,i){Pk(this,i(t),function(){return r(t,e)})}function Ok(t,e,r,i,n){i=i||String;var s=this;for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(Lk.call(s,o,t[o],r,i),n&&n(o,t[o]))}yb.exports=Ok});var uc=U((NH,_b)=>{var Bk=k0(),Xn=Yt();function Ce(t,e,r){r!=null&&Xn.property.apply(this,arguments)}function ea(t,e){t.constructor.prototype[e]||Xn.memoizedProperty.apply(this,arguments)}function It(t,e,r){e=e||{},Ce(this,"shape",t.shape),Ce(this,"api",e.api,!1),Ce(this,"type",t.type),Ce(this,"enum",t.enum),Ce(this,"min",t.min),Ce(this,"max",t.max),Ce(this,"pattern",t.pattern),Ce(this,"location",t.location||this.location||"body"),Ce(this,"name",this.name||t.xmlName||t.queryName||t.locationName||r),Ce(this,"isStreaming",t.streaming||this.isStreaming||!1),Ce(this,"requiresLength",t.requiresLength,!1),Ce(this,"isComposite",t.isComposite||!1),Ce(this,"isShape",!0,!1),Ce(this,"isQueryName",Boolean(t.queryName),!1),Ce(this,"isLocationName",Boolean(t.locationName),!1),Ce(this,"isIdempotent",t.idempotencyToken===!0),Ce(this,"isJsonValue",t.jsonvalue===!0),Ce(this,"isSensitive",t.sensitive===!0||t.prototype&&t.prototype.sensitive===!0),Ce(this,"isEventStream",Boolean(t.eventstream),!1),Ce(this,"isEvent",Boolean(t.event),!1),Ce(this,"isEventPayload",Boolean(t.eventpayload),!1),Ce(this,"isEventHeader",Boolean(t.eventheader),!1),Ce(this,"isTimestampFormatSet",Boolean(t.timestampFormat)||t.prototype&&t.prototype.isTimestampFormatSet===!0,!1),Ce(this,"endpointDiscoveryId",Boolean(t.endpointdiscoveryid),!1),Ce(this,"hostLabel",Boolean(t.hostLabel),!1),e.documentation&&(Ce(this,"documentation",t.documentation),Ce(this,"documentationUrl",t.documentationUrl)),t.xmlAttribute&&Ce(this,"isXmlAttribute",t.xmlAttribute||!1),Ce(this,"defaultValue",null),this.toWireFormat=function(i){return i??""},this.toType=function(i){return i}}It.normalizedTypes={character:"string",double:"float",long:"integer",short:"integer",biginteger:"integer",bigdecimal:"float",blob:"binary"};It.types={structure:gb,list:vb,map:bb,boolean:Eb,timestamp:Dk,float:qk,integer:zk,string:Sb,base64:wb,binary:xb};It.resolve=function(e,r){if(e.shape){var i=r.api.shapes[e.shape];if(!i)throw new Error("Cannot find shape reference: "+e.shape);return i}else return null};It.create=function(e,r,i){if(e.isShape)return e;var n=It.resolve(e,r);if(n){var s=Object.keys(e);r.documentation||(s=s.filter(function(l){return!l.match(/documentation/)}));var o=function(){n.constructor.call(this,e,r,i)};return o.prototype=n,new o}else{e.type||(e.members?e.type="structure":e.member?e.type="list":e.key?e.type="map":e.type="string");var u=e.type;if(It.normalizedTypes[e.type]&&(e.type=It.normalizedTypes[e.type]),It.types[e.type])return new It.types[e.type](e,r,i);throw new Error("Unrecognized shape type: "+u)}};function I0(t){It.apply(this,arguments),Ce(this,"isComposite",!0),t.flattened&&Ce(this,"flattened",t.flattened||!1)}function gb(t,e){var r=this,i=null,n=!this.isShape;I0.apply(this,arguments),n&&(Ce(this,"defaultValue",function(){return{}}),Ce(this,"members",{}),Ce(this,"memberNames",[]),Ce(this,"required",[]),Ce(this,"isRequired",function(){return!1})),t.members&&(Ce(this,"members",new Bk(t.members,e,function(s,o){return It.create(o,e,s)})),ea(this,"memberNames",function(){return t.xmlOrder||Object.keys(t.members)}),t.event&&(ea(this,"eventPayloadMemberName",function(){for(var s=r.members,o=r.memberNames,u=0,l=o.length;u<l;u++)if(s[o[u]].isEventPayload)return o[u]}),ea(this,"eventHeaderMemberNames",function(){for(var s=r.members,o=r.memberNames,u=[],l=0,d=o.length;l<d;l++)s[o[l]].isEventHeader&&u.push(o[l]);return u}))),t.required&&(Ce(this,"required",t.required),Ce(this,"isRequired",function(s){if(!i){i={};for(var o=0;o<t.required.length;o++)i[t.required[o]]=!0}return i[s]},!1,!0)),Ce(this,"resultWrapper",t.resultWrapper||null),t.payload&&Ce(this,"payload",t.payload),typeof t.xmlNamespace=="string"?Ce(this,"xmlNamespaceUri",t.xmlNamespace):typeof t.xmlNamespace=="object"&&(Ce(this,"xmlNamespacePrefix",t.xmlNamespace.prefix),Ce(this,"xmlNamespaceUri",t.xmlNamespace.uri))}function vb(t,e){var r=this,i=!this.isShape;if(I0.apply(this,arguments),i&&Ce(this,"defaultValue",function(){return[]}),t.member&&ea(this,"member",function(){return It.create(t.member,e)}),this.flattened){var n=this.name;ea(this,"name",function(){return r.member.name||n})}}function bb(t,e){var r=!this.isShape;I0.apply(this,arguments),r&&(Ce(this,"defaultValue",function(){return{}}),Ce(this,"key",It.create({type:"string"},e)),Ce(this,"value",It.create({type:"string"},e))),t.key&&ea(this,"key",function(){return It.create(t.key,e)}),t.value&&ea(this,"value",function(){return It.create(t.value,e)})}function Dk(t){var e=this;if(It.apply(this,arguments),t.timestampFormat)Ce(this,"timestampFormat",t.timestampFormat);else if(e.isTimestampFormatSet&&this.timestampFormat)Ce(this,"timestampFormat",this.timestampFormat);else if(this.location==="header")Ce(this,"timestampFormat","rfc822");else if(this.location==="querystring")Ce(this,"timestampFormat","iso8601");else if(this.api)switch(this.api.protocol){case"json":case"rest-json":Ce(this,"timestampFormat","unixTimestamp");break;case"rest-xml":case"query":case"ec2":Ce(this,"timestampFormat","iso8601");break}this.toType=function(r){return r==null?null:typeof r.toUTCString=="function"?r:typeof r=="string"||typeof r=="number"?Xn.date.parseTimestamp(r):null},this.toWireFormat=function(r){return Xn.date.format(r,e.timestampFormat)}}function Sb(){It.apply(this,arguments);var t=["rest-xml","query","ec2"];this.toType=function(e){return e=this.api&&t.indexOf(this.api.protocol)>-1?e||"":e,this.isJsonValue?JSON.parse(e):e&&typeof e.toString=="function"?e.toString():e},this.toWireFormat=function(e){return this.isJsonValue?JSON.stringify(e):e}}function qk(){It.apply(this,arguments),this.toType=function(t){return t==null?null:parseFloat(t)},this.toWireFormat=this.toType}function zk(){It.apply(this,arguments),this.toType=function(t){return t==null?null:parseInt(t,10)},this.toWireFormat=this.toType}function xb(){It.apply(this,arguments),this.toType=function(t){var e=Xn.base64.decode(t);if(this.isSensitive&&Xn.isNode()&&typeof Xn.Buffer.alloc=="function"){var r=Xn.Buffer.alloc(e.length,e);e.fill(0),e=r}return e},this.toWireFormat=Xn.base64.encode}function wb(){xb.apply(this,arguments)}function Eb(){It.apply(this,arguments),this.toType=function(t){return typeof t=="boolean"?t:t==null?null:t==="true"}}It.shapes={StructureShape:gb,ListShape:vb,MapShape:bb,StringShape:Sb,BooleanShape:Eb,Base64Shape:wb};_b.exports=It});var P0=U((AH,Tb)=>{var Rb=me(),lc=Yt(),Fk=mb(),Cb=uc(),Uk=$f().populateHostPrefix;function jk(t){var e=t.service.api.operations[t.operation],r=t.httpRequest;r.headers["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8",r.params={Version:t.service.api.apiVersion,Action:e.name};var i=new Fk;i.serialize(t.params,e.input,function(n,s){r.params[n]=s}),r.body=lc.queryParamsToString(r.params),Uk(t)}function Hk(t){var e,r=t.httpResponse.body.toString();if(r.match("<UnknownOperationException"))e={Code:"UnknownOperation",Message:"Unknown operation "+t.request.operation};else try{e=new Rb.XML.Parser().parse(r)}catch{e={Code:t.httpResponse.statusCode,Message:t.httpResponse.statusMessage}}e.requestId&&!t.requestId&&(t.requestId=e.requestId),e.Errors&&(e=e.Errors),e.Error&&(e=e.Error),e.Code?t.error=lc.error(new Error,{code:e.Code,message:e.Message}):t.error=lc.error(new Error,{code:t.httpResponse.statusCode,message:null})}function Wk(t){var e=t.request,r=e.service.api.operations[e.operation],i=r.output||{},n=i;if(n.resultWrapper){var s=Cb.create({type:"structure"});s.members[n.resultWrapper]=i,s.memberNames=[n.resultWrapper],lc.property(i,"name",i.resultWrapper),i=s}var o=new Rb.XML.Parser;if(i&&i.members&&!i.members._XAMZRequestId){var u=Cb.create({type:"string"},{api:{protocol:"query"}},"requestId");i.members._XAMZRequestId=u}var l=o.parse(t.httpResponse.body.toString(),i);t.requestId=l._XAMZRequestId||l.requestId,l._XAMZRequestId&&delete l._XAMZRequestId,n.resultWrapper&&l[n.resultWrapper]&&(lc.update(l,l[n.resultWrapper]),delete l[n.resultWrapper]),t.data=l}Tb.exports={buildRequest:jk,extractError:Hk,extractData:Wk}});var cc=U((MH,Ab)=>{var hr=Yt(),Gk=$f().populateHostPrefix;function Kk(t){t.httpRequest.method=t.service.api.operations[t.operation].httpMethod}function Nb(t,e,r,i){var n=[t,e].join("/");n=n.replace(/\/+/g,"/");var s={},o=!1;if(hr.each(r.members,function(l,d){var h=i[l];if(h!=null)if(d.location==="uri"){var m=new RegExp("\\{"+d.name+"(\\+)?\\}");n=n.replace(m,function(b,S){var y=S?hr.uriEscapePath:hr.uriEscape;return y(String(h))})}else d.location==="querystring"&&(o=!0,d.type==="list"?s[d.name]=h.map(function(b){return hr.uriEscape(d.member.toWireFormat(b).toString())}):d.type==="map"?hr.each(h,function(b,S){Array.isArray(S)?s[b]=S.map(function(y){return hr.uriEscape(String(y))}):s[b]=hr.uriEscape(String(S))}):s[d.name]=hr.uriEscape(d.toWireFormat(h).toString()))}),o){n+=n.indexOf("?")>=0?"&":"?";var u=[];hr.arrayEach(Object.keys(s).sort(),function(l){Array.isArray(s[l])||(s[l]=[s[l]]);for(var d=0;d<s[l].length;d++)u.push(hr.uriEscape(String(l))+"="+s[l][d])}),n+=u.join("&")}return n}function Vk(t){var e=t.service.api.operations[t.operation],r=e.input,i=Nb(t.httpRequest.endpoint.path,e.httpPath,r,t.params);t.httpRequest.path=i}function $k(t){var e=t.service.api.operations[t.operation];hr.each(e.input.members,function(r,i){var n=t.params[r];n!=null&&(i.location==="headers"&&i.type==="map"?hr.each(n,function(s,o){t.httpRequest.headers[i.name+s]=o}):i.location==="header"&&(n=i.toWireFormat(n).toString(),i.isJsonValue&&(n=hr.base64.encode(n)),t.httpRequest.headers[i.name]=n))})}function Xk(t){Kk(t),Vk(t),$k(t),Gk(t)}function Jk(){}function Yk(t){var e=t.request,r={},i=t.httpResponse,n=e.service.api.operations[e.operation],s=n.output,o={};hr.each(i.headers,function(u,l){o[u.toLowerCase()]=l}),hr.each(s.members,function(u,l){var d=(l.name||u).toLowerCase();if(l.location==="headers"&&l.type==="map"){r[u]={};var h=l.isLocationName?l.name:"",m=new RegExp("^"+h+"(.+)","i");hr.each(i.headers,function(S,y){var v=S.match(m);v!==null&&(r[u][v[1]]=y)})}else if(l.location==="header"){if(o[d]!==void 0){var b=l.isJsonValue?hr.base64.decode(o[d]):o[d];r[u]=l.toType(b)}}else l.location==="statusCode"&&(r[u]=parseInt(i.statusCode,10))}),t.data=r}Ab.exports={buildRequest:Xk,extractError:Jk,extractData:Yk,generateURI:Nb}});var O0=U((kH,Lb)=>{var Mb=Yt(),Ib=cc(),Pb=Xf(),Zk=Gf(),kb=Vf();function Qk(t){var e=new Zk,r=t.service.api.operations[t.operation].input;if(r.payload){var i={},n=r.members[r.payload];if(i=t.params[r.payload],i===void 0)return;n.type==="structure"?(t.httpRequest.body=e.build(i,n),L0(t)):(t.httpRequest.body=i,(n.type==="binary"||n.isStreaming)&&L0(t,!0))}else{var s=e.build(t.params,r);(s!=="{}"||t.httpRequest.method!=="GET")&&(t.httpRequest.body=s),L0(t)}}function L0(t,e){var r=t.service.api.operations[t.operation],i=r.input;if(!t.httpRequest.headers["Content-Type"]){var n=e?"binary/octet-stream":"application/json";t.httpRequest.headers["Content-Type"]=n}}function eI(t){Ib.buildRequest(t),["HEAD","DELETE"].indexOf(t.httpRequest.method)<0&&Qk(t)}function tI(t){Pb.extractError(t)}function rI(t){Ib.extractData(t);var e=t.request,r=e.service.api.operations[e.operation],i=e.service.api.operations[e.operation].output||{},n,s=r.hasEventOutput;if(i.payload){var o=i.members[i.payload],u=t.httpResponse.body;if(o.isEventStream)n=new kb,t.data[payload]=Mb.createEventStream(AWS.HttpClient.streamsApiVersion===2?t.httpResponse.stream:u,n,o);else if(o.type==="structure"||o.type==="list"){var n=new kb;t.data[i.payload]=n.parse(u,o)}else o.type==="binary"||o.isStreaming?t.data[i.payload]=u:t.data[i.payload]=o.toType(u)}else{var l=t.data;Pb.extractData(t),t.data=Mb.merge(l,t.data)}}Lb.exports={buildRequest:eI,extractError:tI,extractData:rI}});var D0=U((IH,Ob)=>{var xu=me(),fc=Yt(),B0=cc();function iI(t){var e=t.service.api.operations[t.operation].input,r=new xu.XML.Builder,i=t.params,n=e.payload;if(n){var s=e.members[n];if(i=i[n],i===void 0)return;if(s.type==="structure"){var o=s.name;t.httpRequest.body=r.toXML(i,s,o,!0)}else t.httpRequest.body=i}else t.httpRequest.body=r.toXML(i,e,e.name||e.shape||fc.string.upperFirst(t.operation)+"Request")}function nI(t){B0.buildRequest(t),["GET","HEAD"].indexOf(t.httpRequest.method)<0&&iI(t)}function sI(t){B0.extractError(t);var e;try{e=new xu.XML.Parser().parse(t.httpResponse.body.toString())}catch{e={Code:t.httpResponse.statusCode,Message:t.httpResponse.statusMessage}}e.Errors&&(e=e.Errors),e.Error&&(e=e.Error),e.Code?t.error=fc.error(new Error,{code:e.Code,message:e.Message}):t.error=fc.error(new Error,{code:t.httpResponse.statusCode,message:null})}function oI(t){B0.extractData(t);var e,r=t.request,i=t.httpResponse.body,n=r.service.api.operations[r.operation],s=n.output,o=n.hasEventOutput,u=s.payload;if(u){var l=s.members[u];l.isEventStream?(e=new xu.XML.Parser,t.data[u]=fc.createEventStream(xu.HttpClient.streamsApiVersion===2?t.httpResponse.stream:t.httpResponse.body,e,l)):l.type==="structure"?(e=new xu.XML.Parser,t.data[u]=e.parse(i.toString(),l)):l.type==="binary"||l.isStreaming?t.data[u]=i:t.data[u]=l.toType(i)}else if(i.length>0){e=new xu.XML.Parser;var d=e.parse(i.toString(),s);fc.update(t.data,d)}}Ob.exports={buildRequest:nI,extractError:sI,extractData:oI}});var Db=U((PH,Bb)=>{function aI(t){return t.replace(/&/g,"&").replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}Bb.exports={escapeAttribute:aI}});var zb=U((LH,qb)=>{var uI=Db().escapeAttribute;function hc(t,e){e===void 0&&(e=[]),this.name=t,this.children=e,this.attributes={}}hc.prototype.addAttribute=function(t,e){return this.attributes[t]=e,this};hc.prototype.addChildNode=function(t){return this.children.push(t),this};hc.prototype.removeAttribute=function(t){return delete this.attributes[t],this};hc.prototype.toString=function(){for(var t=Boolean(this.children.length),e="<"+this.name,r=this.attributes,i=0,n=Object.keys(r);i<n.length;i++){var s=n[i],o=r[s];typeof o<"u"&&o!==null&&(e+=" "+s+'="'+uI(""+o)+'"')}return e+=t?">"+this.children.map(function(u){return u.toString()}).join("")+"</"+this.name+">":"/>"};qb.exports={XmlNode:hc}});var Ub=U((OH,Fb)=>{function lI(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}Fb.exports={escapeElement:lI}});var Wb=U((BH,Hb)=>{var cI=Ub().escapeElement;function jb(t){this.value=t}jb.prototype.toString=function(){return cI(""+this.value)};Hb.exports={XmlText:jb}});var $b=U((DH,Vb)=>{var Yf=Yt(),ta=zb().XmlNode,fI=Wb().XmlText;function Gb(){}Gb.prototype.toXML=function(t,e,r,i){var n=new ta(r);return Kb(n,e,!0),ra(n,t,e),n.children.length>0||i?n.toString():""};function ra(t,e,r){switch(r.type){case"structure":return hI(t,e,r);case"map":return dI(t,e,r);case"list":return pI(t,e,r);default:return mI(t,e,r)}}function hI(t,e,r){Yf.arrayEach(r.memberNames,function(i){var n=r.members[i];if(n.location==="body"){var s=e[i],o=n.name;if(s!=null)if(n.isXmlAttribute)t.addAttribute(o,s);else if(n.flattened)ra(t,s,n);else{var u=new ta(o);t.addChildNode(u),Kb(u,n),ra(u,s,n)}}})}function dI(t,e,r){var i=r.key.name||"key",n=r.value.name||"value";Yf.each(e,function(s,o){var u=new ta(r.flattened?r.name:"entry");t.addChildNode(u);var l=new ta(i),d=new ta(n);u.addChildNode(l),u.addChildNode(d),ra(l,s,r.key),ra(d,o,r.value)})}function pI(t,e,r){r.flattened?Yf.arrayEach(e,function(i){var n=r.member.name||r.name,s=new ta(n);t.addChildNode(s),ra(s,i,r.member)}):Yf.arrayEach(e,function(i){var n=r.member.name||"member",s=new ta(n);t.addChildNode(s),ra(s,i,r.member)})}function mI(t,e,r){t.addChildNode(new fI(r.toWireFormat(e)))}function Kb(t,e,r){var i,n="xmlns";e.xmlNamespaceUri?(i=e.xmlNamespaceUri,e.xmlNamespacePrefix&&(n+=":"+e.xmlNamespacePrefix)):r&&e.api.xmlNamespaceUri&&(i=e.api.xmlNamespaceUri),i&&t.addAttribute(n,i)}Vb.exports=Gb});var q0=U((qH,Jb)=>{var dc=uc(),Xb=Yt(),Jn=Xb.property,wu=Xb.memoizedProperty;function yI(t,e,r){var i=this;r=r||{},Jn(this,"name",e.name||t),Jn(this,"api",r.api,!1),e.http=e.http||{},Jn(this,"endpoint",e.endpoint),Jn(this,"httpMethod",e.http.method||"POST"),Jn(this,"httpPath",e.http.requestUri||"/"),Jn(this,"authtype",e.authtype||""),Jn(this,"endpointDiscoveryRequired",e.endpointdiscovery?e.endpointdiscovery.required?"REQUIRED":"OPTIONAL":"NULL"),wu(this,"input",function(){return e.input?dc.create(e.input,r):new dc.create({type:"structure"},r)}),wu(this,"output",function(){return e.output?dc.create(e.output,r):new dc.create({type:"structure"},r)}),wu(this,"errors",function(){var n=[];if(!e.errors)return null;for(var s=0;s<e.errors.length;s++)n.push(dc.create(e.errors[s],r));return n}),wu(this,"paginator",function(){return r.api.paginators[t]}),r.documentation&&(Jn(this,"documentation",e.documentation),Jn(this,"documentationUrl",e.documentationUrl)),wu(this,"idempotentMembers",function(){var n=[],s=i.input,o=s.members;if(!s.members)return n;for(var u in o)!o.hasOwnProperty(u)||o[u].isIdempotent===!0&&n.push(u);return n}),wu(this,"hasEventOutput",function(){var n=i.output;return gI(n)})}function gI(t){var e=t.members,r=t.payload;if(!t.members)return!1;if(r){var i=e[r];return i.isEventStream}for(var n in e)if(!e.hasOwnProperty(n)&&e[n].isEventStream===!0)return!0;return!1}Jb.exports=yI});var z0=U((zH,Yb)=>{var pc=Yt().property;function vI(t,e){pc(this,"inputToken",e.input_token),pc(this,"limitKey",e.limit_key),pc(this,"moreResults",e.more_results),pc(this,"outputToken",e.output_token),pc(this,"resultKey",e.result_key)}Yb.exports=vI});var F0=U((FH,Qb)=>{var Zb=Yt(),Zf=Zb.property;function bI(t,e,r){r=r||{},Zf(this,"name",t),Zf(this,"api",r.api,!1),e.operation&&Zf(this,"operation",Zb.string.lowerFirst(e.operation));var i=this,n=["type","description","delay","maxAttempts","acceptors"];n.forEach(function(s){var o=e[s];o&&Zf(i,s,o)})}Qb.exports=bI});var U0=U((UH,SI)=>{SI.exports={acm:{name:"ACM",cors:!0},apigateway:{name:"APIGateway",cors:!0},applicationautoscaling:{prefix:"application-autoscaling",name:"ApplicationAutoScaling",cors:!0},appstream:{name:"AppStream"},autoscaling:{name:"AutoScaling",cors:!0},batch:{name:"Batch"},budgets:{name:"Budgets"},clouddirectory:{name:"CloudDirectory",versions:["2016-05-10*"]},cloudformation:{name:"CloudFormation",cors:!0},cloudfront:{name:"CloudFront",versions:["2013-05-12*","2013-11-11*","2014-05-31*","2014-10-21*","2014-11-06*","2015-04-17*","2015-07-27*","2015-09-17*","2016-01-13*","2016-01-28*","2016-08-01*","2016-08-20*","2016-09-07*","2016-09-29*","2016-11-25*","2017-03-25*","2017-10-30*","2018-06-18*","2018-11-05*","2019-03-26*"],cors:!0},cloudhsm:{name:"CloudHSM",cors:!0},cloudsearch:{name:"CloudSearch"},cloudsearchdomain:{name:"CloudSearchDomain"},cloudtrail:{name:"CloudTrail",cors:!0},cloudwatch:{prefix:"monitoring",name:"CloudWatch",cors:!0},cloudwatchevents:{prefix:"events",name:"CloudWatchEvents",versions:["2014-02-03*"],cors:!0},cloudwatchlogs:{prefix:"logs",name:"CloudWatchLogs",cors:!0},codebuild:{name:"CodeBuild",cors:!0},codecommit:{name:"CodeCommit",cors:!0},codedeploy:{name:"CodeDeploy",cors:!0},codepipeline:{name:"CodePipeline",cors:!0},cognitoidentity:{prefix:"cognito-identity",name:"CognitoIdentity",cors:!0},cognitoidentityserviceprovider:{prefix:"cognito-idp",name:"CognitoIdentityServiceProvider",cors:!0},cognitosync:{prefix:"cognito-sync",name:"CognitoSync",cors:!0},configservice:{prefix:"config",name:"ConfigService",cors:!0},cur:{name:"CUR",cors:!0},datapipeline:{name:"DataPipeline"},devicefarm:{name:"DeviceFarm",cors:!0},directconnect:{name:"DirectConnect",cors:!0},directoryservice:{prefix:"ds",name:"DirectoryService"},discovery:{name:"Discovery"},dms:{name:"DMS"},dynamodb:{name:"DynamoDB",cors:!0},dynamodbstreams:{prefix:"streams.dynamodb",name:"DynamoDBStreams",cors:!0},ec2:{name:"EC2",versions:["2013-06-15*","2013-10-15*","2014-02-01*","2014-05-01*","2014-06-15*","2014-09-01*","2014-10-01*","2015-03-01*","2015-04-15*","2015-10-01*","2016-04-01*","2016-09-15*"],cors:!0},ecr:{name:"ECR",cors:!0},ecs:{name:"ECS",cors:!0},efs:{prefix:"elasticfilesystem",name:"EFS",cors:!0},elasticache:{name:"ElastiCache",versions:["2012-11-15*","2014-03-24*","2014-07-15*","2014-09-30*"],cors:!0},elasticbeanstalk:{name:"ElasticBeanstalk",cors:!0},elb:{prefix:"elasticloadbalancing",name:"ELB",cors:!0},elbv2:{prefix:"elasticloadbalancingv2",name:"ELBv2",cors:!0},emr:{prefix:"elasticmapreduce",name:"EMR",cors:!0},es:{name:"ES"},elastictranscoder:{name:"ElasticTranscoder",cors:!0},firehose:{name:"Firehose",cors:!0},gamelift:{name:"GameLift",cors:!0},glacier:{name:"Glacier"},health:{name:"Health"},iam:{name:"IAM",cors:!0},importexport:{name:"ImportExport"},inspector:{name:"Inspector",versions:["2015-08-18*"],cors:!0},iot:{name:"Iot",cors:!0},iotdata:{prefix:"iot-data",name:"IotData",cors:!0},kinesis:{name:"Kinesis",cors:!0},kinesisanalytics:{name:"KinesisAnalytics"},kms:{name:"KMS",cors:!0},lambda:{name:"Lambda",cors:!0},lexruntime:{prefix:"runtime.lex",name:"LexRuntime",cors:!0},lightsail:{name:"Lightsail"},machinelearning:{name:"MachineLearning",cors:!0},marketplacecommerceanalytics:{name:"MarketplaceCommerceAnalytics",cors:!0},marketplacemetering:{prefix:"meteringmarketplace",name:"MarketplaceMetering"},mturk:{prefix:"mturk-requester",name:"MTurk",cors:!0},mobileanalytics:{name:"MobileAnalytics",cors:!0},opsworks:{name:"OpsWorks",cors:!0},opsworkscm:{name:"OpsWorksCM"},organizations:{name:"Organizations"},pinpoint:{name:"Pinpoint"},polly:{name:"Polly",cors:!0},rds:{name:"RDS",versions:["2014-09-01*"],cors:!0},redshift:{name:"Redshift",cors:!0},rekognition:{name:"Rekognition",cors:!0},resourcegroupstaggingapi:{name:"ResourceGroupsTaggingAPI"},route53:{name:"Route53",cors:!0},route53domains:{name:"Route53Domains",cors:!0},s3:{name:"S3",dualstackAvailable:!0,cors:!0},s3control:{name:"S3Control",dualstackAvailable:!0,xmlNoDefaultLists:!0},servicecatalog:{name:"ServiceCatalog",cors:!0},ses:{prefix:"email",name:"SES",cors:!0},shield:{name:"Shield"},simpledb:{prefix:"sdb",name:"SimpleDB"},sms:{name:"SMS"},snowball:{name:"Snowball"},sns:{name:"SNS",cors:!0},sqs:{name:"SQS",cors:!0},ssm:{name:"SSM",cors:!0},storagegateway:{name:"StorageGateway",cors:!0},stepfunctions:{prefix:"states",name:"StepFunctions"},sts:{name:"STS",cors:!0},support:{name:"Support"},swf:{name:"SWF"},xray:{name:"XRay",cors:!0},waf:{name:"WAF",cors:!0},wafregional:{prefix:"waf-regional",name:"WAFRegional"},workdocs:{name:"WorkDocs",cors:!0},workspaces:{name:"WorkSpaces"},codestar:{name:"CodeStar"},lexmodelbuildingservice:{prefix:"lex-models",name:"LexModelBuildingService",cors:!0},marketplaceentitlementservice:{prefix:"entitlement.marketplace",name:"MarketplaceEntitlementService"},athena:{name:"Athena"},greengrass:{name:"Greengrass"},dax:{name:"DAX"},migrationhub:{prefix:"AWSMigrationHub",name:"MigrationHub"},cloudhsmv2:{name:"CloudHSMV2"},glue:{name:"Glue"},mobile:{name:"Mobile"},pricing:{name:"Pricing",cors:!0},costexplorer:{prefix:"ce",name:"CostExplorer",cors:!0},mediaconvert:{name:"MediaConvert"},medialive:{name:"MediaLive"},mediapackage:{name:"MediaPackage"},mediastore:{name:"MediaStore"},mediastoredata:{prefix:"mediastore-data",name:"MediaStoreData",cors:!0},appsync:{name:"AppSync"},guardduty:{name:"GuardDuty"},mq:{name:"MQ"},comprehend:{name:"Comprehend",cors:!0},iotjobsdataplane:{prefix:"iot-jobs-data",name:"IoTJobsDataPlane"},kinesisvideoarchivedmedia:{prefix:"kinesis-video-archived-media",name:"KinesisVideoArchivedMedia",cors:!0},kinesisvideomedia:{prefix:"kinesis-video-media",name:"KinesisVideoMedia",cors:!0},kinesisvideo:{name:"KinesisVideo",cors:!0},sagemakerruntime:{prefix:"runtime.sagemaker",name:"SageMakerRuntime"},sagemaker:{name:"SageMaker"},translate:{name:"Translate",cors:!0},resourcegroups:{prefix:"resource-groups",name:"ResourceGroups",cors:!0},alexaforbusiness:{name:"AlexaForBusiness"},cloud9:{name:"Cloud9"},serverlessapplicationrepository:{prefix:"serverlessrepo",name:"ServerlessApplicationRepository"},servicediscovery:{name:"ServiceDiscovery"},workmail:{name:"WorkMail"},autoscalingplans:{prefix:"autoscaling-plans",name:"AutoScalingPlans"},transcribeservice:{prefix:"transcribe",name:"TranscribeService"},connect:{name:"Connect",cors:!0},acmpca:{prefix:"acm-pca",name:"ACMPCA"},fms:{name:"FMS"},secretsmanager:{name:"SecretsManager",cors:!0},iotanalytics:{name:"IoTAnalytics",cors:!0},iot1clickdevicesservice:{prefix:"iot1click-devices",name:"IoT1ClickDevicesService"},iot1clickprojects:{prefix:"iot1click-projects",name:"IoT1ClickProjects"},pi:{name:"PI"},neptune:{name:"Neptune"},mediatailor:{name:"MediaTailor"},eks:{name:"EKS"},macie:{name:"Macie"},dlm:{name:"DLM"},signer:{name:"Signer"},chime:{name:"Chime"},pinpointemail:{prefix:"pinpoint-email",name:"PinpointEmail"},ram:{name:"RAM"},route53resolver:{name:"Route53Resolver"},pinpointsmsvoice:{prefix:"sms-voice",name:"PinpointSMSVoice"},quicksight:{name:"QuickSight"},rdsdataservice:{prefix:"rds-data",name:"RDSDataService"},amplify:{name:"Amplify"},datasync:{name:"DataSync"},robomaker:{name:"RoboMaker"},transfer:{name:"Transfer"},globalaccelerator:{name:"GlobalAccelerator"},comprehendmedical:{name:"ComprehendMedical",cors:!0},kinesisanalyticsv2:{name:"KinesisAnalyticsV2"},mediaconnect:{name:"MediaConnect"},fsx:{name:"FSx"},securityhub:{name:"SecurityHub"},appmesh:{name:"AppMesh",versions:["2018-10-01*"]},licensemanager:{prefix:"license-manager",name:"LicenseManager"},kafka:{name:"Kafka"},apigatewaymanagementapi:{name:"ApiGatewayManagementApi"},apigatewayv2:{name:"ApiGatewayV2"},docdb:{name:"DocDB"},backup:{name:"Backup"},worklink:{name:"WorkLink"},textract:{name:"Textract"},managedblockchain:{name:"ManagedBlockchain"},mediapackagevod:{prefix:"mediapackage-vod",name:"MediaPackageVod"},groundstation:{name:"GroundStation"},iotthingsgraph:{name:"IoTThingsGraph"},iotevents:{name:"IoTEvents"},ioteventsdata:{prefix:"iotevents-data",name:"IoTEventsData"},personalize:{name:"Personalize",cors:!0},personalizeevents:{prefix:"personalize-events",name:"PersonalizeEvents",cors:!0},personalizeruntime:{prefix:"personalize-runtime",name:"PersonalizeRuntime",cors:!0},applicationinsights:{prefix:"application-insights",name:"ApplicationInsights"},servicequotas:{prefix:"service-quotas",name:"ServiceQuotas"},ec2instanceconnect:{prefix:"ec2-instance-connect",name:"EC2InstanceConnect"},eventbridge:{name:"EventBridge"},lakeformation:{name:"LakeFormation"},forecastservice:{prefix:"forecast",name:"ForecastService",cors:!0},forecastqueryservice:{prefix:"forecastquery",name:"ForecastQueryService",cors:!0},qldb:{name:"QLDB"},qldbsession:{prefix:"qldb-session",name:"QLDBSession"},workmailmessageflow:{name:"WorkMailMessageFlow"},codestarnotifications:{prefix:"codestar-notifications",name:"CodeStarNotifications"},savingsplans:{name:"SavingsPlans"},sso:{name:"SSO"},ssooidc:{prefix:"sso-oidc",name:"SSOOIDC"},marketplacecatalog:{prefix:"marketplace-catalog",name:"MarketplaceCatalog"},dataexchange:{name:"DataExchange"},sesv2:{name:"SESV2"},migrationhubconfig:{prefix:"migrationhub-config",name:"MigrationHubConfig"},connectparticipant:{name:"ConnectParticipant"},appconfig:{name:"AppConfig"},iotsecuretunneling:{name:"IoTSecureTunneling"},wafv2:{name:"WAFV2"},elasticinference:{prefix:"elastic-inference",name:"ElasticInference"},imagebuilder:{name:"Imagebuilder"},schemas:{name:"Schemas"},accessanalyzer:{name:"AccessAnalyzer"},codegurureviewer:{prefix:"codeguru-reviewer",name:"CodeGuruReviewer"},codeguruprofiler:{name:"CodeGuruProfiler"},computeoptimizer:{prefix:"compute-optimizer",name:"ComputeOptimizer"},frauddetector:{name:"FraudDetector"},kendra:{name:"Kendra"},networkmanager:{name:"NetworkManager"},outposts:{name:"Outposts"},augmentedairuntime:{prefix:"sagemaker-a2i-runtime",name:"AugmentedAIRuntime"},ebs:{name:"EBS"},kinesisvideosignalingchannels:{prefix:"kinesis-video-signaling",name:"KinesisVideoSignalingChannels",cors:!0},detective:{name:"Detective"},codestarconnections:{prefix:"codestar-connections",name:"CodeStarconnections"},synthetics:{name:"Synthetics"},iotsitewise:{name:"IoTSiteWise"},macie2:{name:"Macie2"},codeartifact:{name:"CodeArtifact"},honeycode:{name:"Honeycode"},ivs:{name:"IVS"},braket:{name:"Braket"},identitystore:{name:"IdentityStore"},appflow:{name:"Appflow"},redshiftdata:{prefix:"redshift-data",name:"RedshiftData"},ssoadmin:{prefix:"sso-admin",name:"SSOAdmin"},timestreamquery:{prefix:"timestream-query",name:"TimestreamQuery"},timestreamwrite:{prefix:"timestream-write",name:"TimestreamWrite"},s3outposts:{name:"S3Outposts"},databrew:{name:"DataBrew"},servicecatalogappregistry:{prefix:"servicecatalog-appregistry",name:"ServiceCatalogAppRegistry"},networkfirewall:{prefix:"network-firewall",name:"NetworkFirewall"},mwaa:{name:"MWAA"},amplifybackend:{name:"AmplifyBackend"},appintegrations:{name:"AppIntegrations"},connectcontactlens:{prefix:"connect-contact-lens",name:"ConnectContactLens"},devopsguru:{prefix:"devops-guru",name:"DevOpsGuru"},ecrpublic:{prefix:"ecr-public",name:"ECRPUBLIC"},lookoutvision:{name:"LookoutVision"},sagemakerfeaturestoreruntime:{prefix:"sagemaker-featurestore-runtime",name:"SageMakerFeatureStoreRuntime"},customerprofiles:{prefix:"customer-profiles",name:"CustomerProfiles"},auditmanager:{name:"AuditManager"},emrcontainers:{prefix:"emr-containers",name:"EMRcontainers"},healthlake:{name:"HealthLake"},sagemakeredge:{prefix:"sagemaker-edge",name:"SagemakerEdge"},amp:{name:"Amp"},greengrassv2:{name:"GreengrassV2"},iotdeviceadvisor:{name:"IotDeviceAdvisor"},iotfleethub:{name:"IoTFleetHub"},iotwireless:{name:"IoTWireless"},location:{name:"Location"},wellarchitected:{name:"WellArchitected"},lexmodelsv2:{prefix:"models.lex.v2",name:"LexModelsV2"},lexruntimev2:{prefix:"runtime.lex.v2",name:"LexRuntimeV2",cors:!0},fis:{name:"Fis"},lookoutmetrics:{name:"LookoutMetrics"},mgn:{name:"Mgn"},lookoutequipment:{name:"LookoutEquipment"}}});var j0=U((jH,t6)=>{var Qf=k0(),xI=q0(),wI=uc(),EI=z0(),_I=F0(),e6=U0(),mc=Yt(),qt=mc.property,CI=mc.memoizedProperty;function RI(t,e){var r=this;t=t||{},e=e||{},e.api=this,t.metadata=t.metadata||{};var i=e.serviceIdentifier;delete e.serviceIdentifier,qt(this,"isApi",!0,!1),qt(this,"apiVersion",t.metadata.apiVersion),qt(this,"endpointPrefix",t.metadata.endpointPrefix),qt(this,"signingName",t.metadata.signingName),qt(this,"globalEndpoint",t.metadata.globalEndpoint),qt(this,"signatureVersion",t.metadata.signatureVersion),qt(this,"jsonVersion",t.metadata.jsonVersion),qt(this,"targetPrefix",t.metadata.targetPrefix),qt(this,"protocol",t.metadata.protocol),qt(this,"timestampFormat",t.metadata.timestampFormat),qt(this,"xmlNamespaceUri",t.metadata.xmlNamespace),qt(this,"abbreviation",t.metadata.serviceAbbreviation),qt(this,"fullName",t.metadata.serviceFullName),qt(this,"serviceId",t.metadata.serviceId),i&&e6[i]&&qt(this,"xmlNoDefaultLists",e6[i].xmlNoDefaultLists,!1),CI(this,"className",function(){var s=t.metadata.serviceAbbreviation||t.metadata.serviceFullName;return s?(s=s.replace(/^Amazon|AWS\s*|\(.*|\s+|\W+/g,""),s==="ElasticLoadBalancing"&&(s="ELB"),s):null});function n(s,o){o.endpointoperation===!0&&qt(r,"endpointOperation",mc.string.lowerFirst(s)),o.endpointdiscovery&&!r.hasRequiredEndpointDiscovery&&qt(r,"hasRequiredEndpointDiscovery",o.endpointdiscovery.required===!0)}qt(this,"operations",new Qf(t.operations,e,function(s,o){return new xI(s,o,e)},mc.string.lowerFirst,n)),qt(this,"shapes",new Qf(t.shapes,e,function(s,o){return wI.create(o,e)})),qt(this,"paginators",new Qf(t.paginators,e,function(s,o){return new EI(s,o,e)})),qt(this,"waiters",new Qf(t.waiters,e,function(s,o){return new _I(s,o,e)},mc.string.lowerFirst)),e.documentation&&(qt(this,"documentation",t.documentation),qt(this,"documentationUrl",t.documentationUrl))}t6.exports=RI});var i6=U((HH,r6)=>{function eh(t,e){if(!eh.services.hasOwnProperty(t))throw new Error("InvalidService: Failed to load api for "+t);return eh.services[t][e]}eh.services={};r6.exports=eh});var n6=U(H0=>{"use strict";Object.defineProperty(H0,"__esModule",{value:!0});var TI=function(){function t(e,r){this.key=e,this.value=r}return t}(),NI=function(){function t(e){if(this.nodeMap={},this.size=0,typeof e!="number"||e<1)throw new Error("Cache size can only be positive number");this.sizeLimit=e}return Object.defineProperty(t.prototype,"length",{get:function(){return this.size},enumerable:!0,configurable:!0}),t.prototype.prependToList=function(e){this.headerNode?(this.headerNode.prev=e,e.next=this.headerNode):this.tailNode=e,this.headerNode=e,this.size++},t.prototype.removeFromTail=function(){if(!!this.tailNode){var e=this.tailNode,r=e.prev;return r&&(r.next=void 0),e.prev=void 0,this.tailNode=r,this.size--,e}},t.prototype.detachFromList=function(e){this.headerNode===e&&(this.headerNode=e.next),this.tailNode===e&&(this.tailNode=e.prev),e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.next=void 0,e.prev=void 0,this.size--},t.prototype.get=function(e){if(this.nodeMap[e]){var r=this.nodeMap[e];return this.detachFromList(r),this.prependToList(r),r.value}},t.prototype.remove=function(e){if(this.nodeMap[e]){var r=this.nodeMap[e];this.detachFromList(r),delete this.nodeMap[e]}},t.prototype.put=function(e,r){if(this.nodeMap[e])this.remove(e);else if(this.size===this.sizeLimit){var i=this.removeFromTail(),n=i.key;delete this.nodeMap[n]}var s=new TI(e,r);this.nodeMap[e]=s,this.prependToList(s)},t.prototype.empty=function(){for(var e=Object.keys(this.nodeMap),r=0;r<e.length;r++){var i=e[r],n=this.nodeMap[i];this.detachFromList(n),delete this.nodeMap[i]}},t}();H0.LRUCache=NI});var s6=U(W0=>{"use strict";Object.defineProperty(W0,"__esModule",{value:!0});var AI=n6(),MI=1e3,kI=function(){function t(e){e===void 0&&(e=MI),this.maxSize=e,this.cache=new AI.LRUCache(e)}return Object.defineProperty(t.prototype,"size",{get:function(){return this.cache.length},enumerable:!0,configurable:!0}),t.prototype.put=function(e,r){var i=typeof e!="string"?t.getKeyString(e):e,n=this.populateValue(r);this.cache.put(i,n)},t.prototype.get=function(e){var r=typeof e!="string"?t.getKeyString(e):e,i=Date.now(),n=this.cache.get(r);if(n)for(var s=0;s<n.length;s++){var o=n[s];if(o.Expire<i){this.cache.remove(r);return}}return n},t.getKeyString=function(e){for(var r=[],i=Object.keys(e).sort(),n=0;n<i.length;n++){var s=i[n];e[s]!==void 0&&r.push(e[s])}return r.join(" ")},t.prototype.populateValue=function(e){var r=Date.now();return e.map(function(i){return{Address:i.Address||"",Expire:r+(i.CachePeriodInMinutes||1)*60*1e3}})},t.prototype.empty=function(){this.cache.empty()},t.prototype.remove=function(e){var r=typeof e!="string"?t.getKeyString(e):e;this.cache.remove(r)},t}();W0.EndpointCache=kI});var G0=U((KH,o6)=>{var Yn=me();Yn.SequentialExecutor=Yn.util.inherit({constructor:function(){this._events={}},listeners:function(e){return this._events[e]?this._events[e].slice(0):[]},on:function(e,r,i){return this._events[e]?i?this._events[e].unshift(r):this._events[e].push(r):this._events[e]=[r],this},onAsync:function(e,r,i){return r._isAsync=!0,this.on(e,r,i)},removeListener:function(e,r){var i=this._events[e];if(i){for(var n=i.length,s=-1,o=0;o<n;++o)i[o]===r&&(s=o);s>-1&&i.splice(s,1)}return this},removeAllListeners:function(e){return e?delete this._events[e]:this._events={},this},emit:function(e,r,i){i||(i=function(){});var n=this.listeners(e),s=n.length;return this.callListeners(n,r,i),s>0},callListeners:function(e,r,i,n){var s=this,o=n||null;function u(d){if(d&&(o=Yn.util.error(o||new Error,d),s._haltHandlersOnError))return i.call(s,o);s.callListeners(e,r,i,o)}for(;e.length>0;){var l=e.shift();if(l._isAsync){l.apply(s,r.concat([u]));return}else{try{l.apply(s,r)}catch(d){o=Yn.util.error(o||new Error,d)}if(o&&s._haltHandlersOnError){i.call(s,o);return}}}i.call(s,o)},addListeners:function(e){var r=this;return e._events&&(e=e._events),Yn.util.each(e,function(i,n){typeof n=="function"&&(n=[n]),Yn.util.arrayEach(n,function(s){r.on(i,s)})}),r},addNamedListener:function(e,r,i,n){return this[e]=i,this.addListener(r,i,n),this},addNamedAsyncListener:function(e,r,i,n){return i._isAsync=!0,this.addNamedListener(e,r,i,n)},addNamedListeners:function(e){var r=this;return e(function(){r.addNamedListener.apply(r,arguments)},function(){r.addNamedAsyncListener.apply(r,arguments)}),this}});Yn.SequentialExecutor.prototype.addListener=Yn.SequentialExecutor.prototype.on;o6.exports=Yn.SequentialExecutor});var a6=U((VH,II)=>{II.exports={rules:{"*/*":{endpoint:"{service}.{region}.amazonaws.com"},"cn-*/*":{endpoint:"{service}.{region}.amazonaws.com.cn"},"us-iso-*/*":{endpoint:"{service}.{region}.c2s.ic.gov"},"us-isob-*/*":{endpoint:"{service}.{region}.sc2s.sgov.gov"},"*/budgets":"globalSSL","*/cloudfront":"globalSSL","*/sts":"globalSSL","*/importexport":{endpoint:"{service}.amazonaws.com",signatureVersion:"v2",globalEndpoint:!0},"*/route53":"globalSSL","cn-*/route53":{endpoint:"{service}.amazonaws.com.cn",globalEndpoint:!0,signingRegion:"cn-northwest-1"},"us-gov-*/route53":"globalGovCloud","*/waf":"globalSSL","*/iam":"globalSSL","cn-*/iam":{endpoint:"{service}.cn-north-1.amazonaws.com.cn",globalEndpoint:!0,signingRegion:"cn-north-1"},"us-gov-*/iam":"globalGovCloud","us-gov-*/sts":{endpoint:"{service}.{region}.amazonaws.com"},"us-gov-west-1/s3":"s3signature","us-west-1/s3":"s3signature","us-west-2/s3":"s3signature","eu-west-1/s3":"s3signature","ap-southeast-1/s3":"s3signature","ap-southeast-2/s3":"s3signature","ap-northeast-1/s3":"s3signature","sa-east-1/s3":"s3signature","us-east-1/s3":{endpoint:"{service}.amazonaws.com",signatureVersion:"s3"},"us-east-1/sdb":{endpoint:"{service}.amazonaws.com",signatureVersion:"v2"},"*/sdb":{endpoint:"{service}.{region}.amazonaws.com",signatureVersion:"v2"}},patterns:{globalSSL:{endpoint:"https://{service}.amazonaws.com",globalEndpoint:!0,signingRegion:"us-east-1"},globalGovCloud:{endpoint:"{service}.us-gov.amazonaws.com",globalEndpoint:!0,signingRegion:"us-gov-west-1"},s3signature:{endpoint:"{service}.{region}.amazonaws.com",signatureVersion:"s3"}}}});var th=U(($H,u6)=>{var V0=Yt(),K0=a6();function PI(t){if(!t)return null;var e=t.split("-");return e.length<3?null:e.slice(0,e.length-2).join("-")+"-*"}function LI(t){var e=t.config.region,r=PI(e),i=t.api.endpointPrefix;return[[e,i],[r,i],[e,"*"],[r,"*"],["*",i],["*","*"]].map(function(n){return n[0]&&n[1]?n.join("/"):null})}function OI(t,e){V0.each(e,function(r,i){r!=="globalEndpoint"&&(t.config[r]===void 0||t.config[r]===null)&&(t.config[r]=i)})}function BI(t){for(var e=LI(t),r=0;r<e.length;r++){var i=e[r];if(!!i&&Object.prototype.hasOwnProperty.call(K0.rules,i)){var n=K0.rules[i];typeof n=="string"&&(n=K0.patterns[n]),t.config.useDualstack&&V0.isDualstackAvailable(t)&&(n=V0.copy(n),n.endpoint=n.endpoint.replace(/{service}\.({region}\.)?/,"{service}.dualstack.{region}.")),t.isGlobalEndpoint=!!n.globalEndpoint,n.signingRegion&&(t.signingRegion=n.signingRegion),n.signatureVersion||(n.signatureVersion="v4"),OI(t,n);return}}}function DI(t){for(var e={"^(us|eu|ap|sa|ca|me)\\-\\w+\\-\\d+$":"amazonaws.com","^cn\\-\\w+\\-\\d+$":"amazonaws.com.cn","^us\\-gov\\-\\w+\\-\\d+$":"amazonaws.com","^us\\-iso\\-\\w+\\-\\d+$":"c2s.ic.gov","^us\\-isob\\-\\w+\\-\\d+$":"sc2s.sgov.gov"},r="amazonaws.com",i=Object.keys(e),n=0;n<i.length;n++){var s=RegExp(i[n]),o=e[i[n]];if(s.test(t))return o}return r}u6.exports={configureEndpoint:BI,getEndpointSuffix:DI}});var c6=U((XH,l6)=>{var be=me(),qI=j0(),zI=th(),$0=be.util.inherit,FI=0;be.Service=$0({constructor:function(e){if(!this.loadServiceClass)throw be.util.error(new Error,"Service must be constructed with `new' operator");var r=this.loadServiceClass(e||{});if(r){var i=be.util.copy(e),n=new r(e);return Object.defineProperty(n,"_originalConfig",{get:function(){return i},enumerable:!1,configurable:!0}),n._clientId=++FI,n}this.initialize(e)},initialize:function(e){var r=be.config[this.serviceIdentifier];if(this.config=new be.Config(be.config),r&&this.config.update(r,!0),e&&this.config.update(e,!0),this.validateService(),this.config.endpoint||zI.configureEndpoint(this),this.config.endpoint=this.endpointFromTemplate(this.config.endpoint),this.setEndpoint(this.config.endpoint),be.SequentialExecutor.call(this),be.Service.addDefaultMonitoringListeners(this),(this.config.clientSideMonitoring||be.Service._clientSideMonitoring)&&this.publisher){var i=this.publisher;this.addNamedListener("PUBLISH_API_CALL","apiCall",function(s){process.nextTick(function(){i.eventHandler(s)})}),this.addNamedListener("PUBLISH_API_ATTEMPT","apiCallAttempt",function(s){process.nextTick(function(){i.eventHandler(s)})})}},validateService:function(){},loadServiceClass:function(e){var r=e;if(be.util.isEmpty(this.api)){if(r.apiConfig)return be.Service.defineServiceApi(this.constructor,r.apiConfig);if(this.constructor.services){r=new be.Config(be.config),r.update(e,!0);var i=r.apiVersions[this.constructor.serviceIdentifier];return i=i||r.apiVersion,this.getLatestServiceClass(i)}else return null}else return null},getLatestServiceClass:function(e){return e=this.getLatestServiceVersion(e),this.constructor.services[e]===null&&be.Service.defineServiceApi(this.constructor,e),this.constructor.services[e]},getLatestServiceVersion:function(e){if(!this.constructor.services||this.constructor.services.length===0)throw new Error("No services defined on "+this.constructor.serviceIdentifier);if(e?be.util.isType(e,Date)&&(e=be.util.date.iso8601(e).split("T")[0]):e="latest",Object.hasOwnProperty(this.constructor.services,e))return e;for(var r=Object.keys(this.constructor.services).sort(),i=null,n=r.length-1;n>=0;n--)if(r[n][r[n].length-1]!=="*"&&(i=r[n]),r[n].substr(0,10)<=e)return i;throw new Error("Could not find "+this.constructor.serviceIdentifier+" API to satisfy version constraint `"+e+"'")},api:{},defaultRetryCount:3,customizeRequests:function(e){if(!e)this.customRequestHandler=null;else if(typeof e=="function")this.customRequestHandler=e;else throw new Error("Invalid callback type '"+typeof e+"' provided in customizeRequests")},makeRequest:function(e,r,i){if(typeof r=="function"&&(i=r,r=null),r=r||{},this.config.params){var n=this.api.operations[e];n&&(r=be.util.copy(r),be.util.each(this.config.params,function(o,u){n.input.members[o]&&(r[o]===void 0||r[o]===null)&&(r[o]=u)}))}var s=new be.Request(this,e,r);return this.addAllRequestListeners(s),this.attachMonitoringEmitter(s),i&&s.send(i),s},makeUnauthenticatedRequest:function(e,r,i){typeof r=="function"&&(i=r,r={});var n=this.makeRequest(e,r).toUnauthenticated();return i?n.send(i):n},waitFor:function(e,r,i){var n=new be.ResourceWaiter(this,e);return n.wait(r,i)},addAllRequestListeners:function(e){for(var r=[be.events,be.EventListeners.Core,this.serviceInterface(),be.EventListeners.CorePost],i=0;i<r.length;i++)r[i]&&e.addListeners(r[i]);this.config.paramValidation||e.removeListener("validate",be.EventListeners.Core.VALIDATE_PARAMETERS),this.config.logger&&e.addListeners(be.EventListeners.Logger),this.setupRequestListeners(e),typeof this.constructor.prototype.customRequestHandler=="function"&&this.constructor.prototype.customRequestHandler(e),Object.prototype.hasOwnProperty.call(this,"customRequestHandler")&&typeof this.customRequestHandler=="function"&&this.customRequestHandler(e)},apiCallEvent:function(e){var r=e.service.api.operations[e.operation],i={Type:"ApiCall",Api:r?r.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Region:e.httpRequest.region,MaxRetriesExceeded:0,UserAgent:e.httpRequest.getUserAgent()},n=e.response;if(n.httpResponse.statusCode&&(i.FinalHttpStatusCode=n.httpResponse.statusCode),n.error){var s=n.error,o=n.httpResponse.statusCode;o>299?(s.code&&(i.FinalAwsException=s.code),s.message&&(i.FinalAwsExceptionMessage=s.message)):((s.code||s.name)&&(i.FinalSdkException=s.code||s.name),s.message&&(i.FinalSdkExceptionMessage=s.message))}return i},apiAttemptEvent:function(e){var r=e.service.api.operations[e.operation],i={Type:"ApiCallAttempt",Api:r?r.name:e.operation,Version:1,Service:e.service.api.serviceId||e.service.api.endpointPrefix,Fqdn:e.httpRequest.endpoint.hostname,UserAgent:e.httpRequest.getUserAgent()},n=e.response;return n.httpResponse.statusCode&&(i.HttpStatusCode=n.httpResponse.statusCode),!e._unAuthenticated&&e.service.config.credentials&&e.service.config.credentials.accessKeyId&&(i.AccessKey=e.service.config.credentials.accessKeyId),n.httpResponse.headers&&(e.httpRequest.headers["x-amz-security-token"]&&(i.SessionToken=e.httpRequest.headers["x-amz-security-token"]),n.httpResponse.headers["x-amzn-requestid"]&&(i.XAmznRequestId=n.httpResponse.headers["x-amzn-requestid"]),n.httpResponse.headers["x-amz-request-id"]&&(i.XAmzRequestId=n.httpResponse.headers["x-amz-request-id"]),n.httpResponse.headers["x-amz-id-2"]&&(i.XAmzId2=n.httpResponse.headers["x-amz-id-2"])),i},attemptFailEvent:function(e){var r=this.apiAttemptEvent(e),i=e.response,n=i.error;return i.httpResponse.statusCode>299?(n.code&&(r.AwsException=n.code),n.message&&(r.AwsExceptionMessage=n.message)):((n.code||n.name)&&(r.SdkException=n.code||n.name),n.message&&(r.SdkExceptionMessage=n.message)),r},attachMonitoringEmitter:function(e){var r,i,n,s,o=0,u,l,d=this,h=!0;e.on("validate",function(){s=be.util.realClock.now(),l=Date.now()},h),e.on("sign",function(){i=be.util.realClock.now(),r=Date.now(),u=e.httpRequest.region,o++},h),e.on("validateResponse",function(){n=Math.round(be.util.realClock.now()-i)}),e.addNamedListener("API_CALL_ATTEMPT","success",function(){var b=d.apiAttemptEvent(e);b.Timestamp=r,b.AttemptLatency=n>=0?n:0,b.Region=u,d.emit("apiCallAttempt",[b])}),e.addNamedListener("API_CALL_ATTEMPT_RETRY","retry",function(){var b=d.attemptFailEvent(e);b.Timestamp=r,n=n||Math.round(be.util.realClock.now()-i),b.AttemptLatency=n>=0?n:0,b.Region=u,d.emit("apiCallAttempt",[b])}),e.addNamedListener("API_CALL","complete",function(){var b=d.apiCallEvent(e);if(b.AttemptCount=o,!(b.AttemptCount<=0)){b.Timestamp=l;var S=Math.round(be.util.realClock.now()-s);b.Latency=S>=0?S:0;var y=e.response;y.error&&y.error.retryable&&typeof y.retryCount=="number"&&typeof y.maxRetries=="number"&&y.retryCount>=y.maxRetries&&(b.MaxRetriesExceeded=1),d.emit("apiCall",[b])}})},setupRequestListeners:function(e){},getSigningName:function(){return this.api.signingName||this.api.endpointPrefix},getSignerClass:function(e){var r,i=null,n="";if(e){var s=e.service.api.operations||{};i=s[e.operation]||null,n=i?i.authtype:""}return this.config.signatureVersion?r=this.config.signatureVersion:n==="v4"||n==="v4-unsigned-body"?r="v4":r=this.api.signatureVersion,be.Signers.RequestSigner.getVersion(r)},serviceInterface:function(){switch(this.api.protocol){case"ec2":return be.EventListeners.Query;case"query":return be.EventListeners.Query;case"json":return be.EventListeners.Json;case"rest-json":return be.EventListeners.RestJson;case"rest-xml":return be.EventListeners.RestXml}if(this.api.protocol)throw new Error("Invalid service `protocol' "+this.api.protocol+" in API config")},successfulResponse:function(e){return e.httpResponse.statusCode<300},numRetries:function(){return this.config.maxRetries!==void 0?this.config.maxRetries:this.defaultRetryCount},retryDelays:function(e,r){return be.util.calculateRetryDelay(e,this.config.retryDelayOptions,r)},retryableError:function(e){return!!(this.timeoutError(e)||this.networkingError(e)||this.expiredCredentialsError(e)||this.throttledError(e)||e.statusCode>=500)},networkingError:function(e){return e.code==="NetworkingError"},timeoutError:function(e){return e.code==="TimeoutError"},expiredCredentialsError:function(e){return e.code==="ExpiredTokenException"},clockSkewError:function(e){switch(e.code){case"RequestTimeTooSkewed":case"RequestExpired":case"InvalidSignatureException":case"SignatureDoesNotMatch":case"AuthFailure":case"RequestInTheFuture":return!0;default:return!1}},getSkewCorrectedDate:function(){return new Date(Date.now()+this.config.systemClockOffset)},applyClockOffset:function(e){e&&(this.config.systemClockOffset=e-Date.now())},isClockSkewed:function(e){if(e)return Math.abs(this.getSkewCorrectedDate().getTime()-e)>=3e5},throttledError:function(e){if(e.statusCode===429)return!0;switch(e.code){case"ProvisionedThroughputExceededException":case"Throttling":case"ThrottlingException":case"RequestLimitExceeded":case"RequestThrottled":case"RequestThrottledException":case"TooManyRequestsException":case"TransactionInProgressException":case"EC2ThrottledException":return!0;default:return!1}},endpointFromTemplate:function(e){if(typeof e!="string")return e;var r=e;return r=r.replace(/\{service\}/g,this.api.endpointPrefix),r=r.replace(/\{region\}/g,this.config.region),r=r.replace(/\{scheme\}/g,this.config.sslEnabled?"https":"http"),r},setEndpoint:function(e){this.endpoint=new be.Endpoint(e,this.config)},paginationConfig:function(e,r){var i=this.api.operations[e].paginator;if(!i){if(r){var n=new Error;throw be.util.error(n,"No pagination configuration for "+e)}return null}return i}});be.util.update(be.Service,{defineMethods:function(e){be.util.each(e.prototype.api.operations,function(i){if(!e.prototype[i]){var n=e.prototype.api.operations[i];n.authtype==="none"?e.prototype[i]=function(s,o){return this.makeUnauthenticatedRequest(i,s,o)}:e.prototype[i]=function(s,o){return this.makeRequest(i,s,o)}}})},defineService:function(e,r,i){be.Service._serviceMap[e]=!0,Array.isArray(r)||(i=r,r=[]);var n=$0(be.Service,i||{});if(typeof e=="string"){be.Service.addVersions(n,r);var s=n.serviceIdentifier||e;n.serviceIdentifier=s}else n.prototype.api=e,be.Service.defineMethods(n);if(be.SequentialExecutor.call(this.prototype),!this.prototype.publisher&&be.util.clientSideMonitoring){var o=be.util.clientSideMonitoring.Publisher,u=be.util.clientSideMonitoring.configProvider,l=u();this.prototype.publisher=new o(l),l.enabled&&(be.Service._clientSideMonitoring=!0)}return be.SequentialExecutor.call(n.prototype),be.Service.addDefaultMonitoringListeners(n.prototype),n},addVersions:function(e,r){Array.isArray(r)||(r=[r]),e.services=e.services||{};for(var i=0;i<r.length;i++)e.services[r[i]]===void 0&&(e.services[r[i]]=null);e.apiVersions=Object.keys(e.services).sort()},defineServiceApi:function(e,r,i){var n=$0(e,{serviceIdentifier:e.serviceIdentifier});function s(o){o.isApi?n.prototype.api=o:n.prototype.api=new qI(o,{serviceIdentifier:e.serviceIdentifier})}if(typeof r=="string"){if(i)s(i);else try{s(be.apiLoader(e.serviceIdentifier,r))}catch(o){throw be.util.error(o,{message:"Could not find API configuration "+e.serviceIdentifier+"-"+r})}Object.prototype.hasOwnProperty.call(e.services,r)||(e.apiVersions=e.apiVersions.concat(r).sort()),e.services[r]=n}else s(r);return be.Service.defineMethods(n),n},hasService:function(t){return Object.prototype.hasOwnProperty.call(be.Service._serviceMap,t)},addDefaultMonitoringListeners:function(e){e.addNamedListener("MONITOR_EVENTS_BUBBLE","apiCallAttempt",function(i){var n=Object.getPrototypeOf(e);n._events&&n.emit("apiCallAttempt",[i])}),e.addNamedListener("CALL_EVENTS_BUBBLE","apiCall",function(i){var n=Object.getPrototypeOf(e);n._events&&n.emit("apiCall",[i])})},_serviceMap:{}});be.util.mixin(be.Service,be.SequentialExecutor);l6.exports=be.Service});var X0=U(()=>{var Pi=me();Pi.Credentials=Pi.util.inherit({constructor:function(){if(Pi.util.hideProperties(this,["secretAccessKey"]),this.expired=!1,this.expireTime=null,this.refreshCallbacks=[],arguments.length===1&&typeof arguments[0]=="object"){var e=arguments[0].credentials||arguments[0];this.accessKeyId=e.accessKeyId,this.secretAccessKey=e.secretAccessKey,this.sessionToken=e.sessionToken}else this.accessKeyId=arguments[0],this.secretAccessKey=arguments[1],this.sessionToken=arguments[2]},expiryWindow:15,needsRefresh:function(){var e=Pi.util.date.getDate().getTime(),r=new Date(e+this.expiryWindow*1e3);return this.expireTime&&r>this.expireTime?!0:this.expired||!this.accessKeyId||!this.secretAccessKey},get:function(e){var r=this;this.needsRefresh()?this.refresh(function(i){i||(r.expired=!1),e&&e(i)}):e&&e()},refresh:function(e){this.expired=!1,e()},coalesceRefresh:function(e,r){var i=this;i.refreshCallbacks.push(e)===1&&i.load(function(s){Pi.util.arrayEach(i.refreshCallbacks,function(o){r?o(s):Pi.util.defer(function(){o(s)})}),i.refreshCallbacks.length=0})},load:function(e){e()}});Pi.Credentials.addPromisesToClass=function(e){this.prototype.getPromise=Pi.util.promisifyMethod("get",e),this.prototype.refreshPromise=Pi.util.promisifyMethod("refresh",e)};Pi.Credentials.deletePromisesFromClass=function(){delete this.prototype.getPromise,delete this.prototype.refreshPromise};Pi.util.addPromises(Pi.Credentials)});var J0=U(()=>{var en=me();en.CredentialProviderChain=en.util.inherit(en.Credentials,{constructor:function(e){e?this.providers=e:this.providers=en.CredentialProviderChain.defaultProviders.slice(0),this.resolveCallbacks=[]},resolve:function(e){var r=this;if(r.providers.length===0)return e(new Error("No providers")),r;if(r.resolveCallbacks.push(e)===1){let o=function(u,l){if(!u&&l||i===n.length){en.util.arrayEach(r.resolveCallbacks,function(h){h(u,l)}),r.resolveCallbacks.length=0;return}var d=n[i++];typeof d=="function"?l=d.call():l=d,l.get?l.get(function(h){o(h,h?null:l)}):o(null,l)};var s=o,i=0,n=r.providers.slice(0);o()}return r}});en.CredentialProviderChain.defaultProviders=[];en.CredentialProviderChain.addPromisesToClass=function(e){this.prototype.resolvePromise=en.util.promisifyMethod("resolve",e)};en.CredentialProviderChain.deletePromisesFromClass=function(){delete this.prototype.resolvePromise};en.util.addPromises(en.CredentialProviderChain)});var f6=U(()=>{var zt=me();X0();J0();var rh;zt.Config=zt.util.inherit({constructor:function(e){e===void 0&&(e={}),e=this.extractCredentials(e),zt.util.each.call(this,this.keys,function(r,i){this.set(r,e[r],i)})},getCredentials:function(e){var r=this;function i(u){e(u,u?null:r.credentials)}function n(u,l){return new zt.util.error(l||new Error,{code:"CredentialsError",message:u,name:"CredentialsError"})}function s(){r.credentials.get(function(u){if(u){var l="Could not load credentials from "+r.credentials.constructor.name;u=n(l,u)}i(u)})}function o(){var u=null;(!r.credentials.accessKeyId||!r.credentials.secretAccessKey)&&(u=n("Missing credentials")),i(u)}r.credentials?typeof r.credentials.get=="function"?s():o():r.credentialProvider?r.credentialProvider.resolve(function(u,l){u&&(u=n("Could not load credentials from any providers",u)),r.credentials=l,i(u)}):i(n("No credentials to load"))},update:function(e,r){r=r||!1,e=this.extractCredentials(e),zt.util.each.call(this,e,function(i,n){(r||Object.prototype.hasOwnProperty.call(this.keys,i)||zt.Service.hasService(i))&&this.set(i,n)})},loadFromPath:function(e){this.clear();var r=JSON.parse(zt.util.readFileSync(e)),i=new zt.FileSystemCredentials(e),n=new zt.CredentialProviderChain;return n.providers.unshift(i),n.resolve(function(s,o){if(s)throw s;r.credentials=o}),this.constructor(r),this},clear:function(){zt.util.each.call(this,this.keys,function(e){delete this[e]}),this.set("credentials",void 0),this.set("credentialProvider",void 0)},set:function(e,r,i){r===void 0?(i===void 0&&(i=this.keys[e]),typeof i=="function"?this[e]=i.call(this):this[e]=i):e==="httpOptions"&&this[e]?this[e]=zt.util.merge(this[e],r):this[e]=r},keys:{credentials:null,credentialProvider:null,region:null,logger:null,apiVersions:{},apiVersion:null,endpoint:void 0,httpOptions:{timeout:12e4},maxRetries:void 0,maxRedirects:10,paramValidation:!0,sslEnabled:!0,s3ForcePathStyle:!1,s3BucketEndpoint:!1,s3DisableBodySigning:!0,s3UsEast1RegionalEndpoint:"legacy",s3UseArnRegion:void 0,computeChecksums:!0,convertResponseTypes:!0,correctClockSkew:!1,customUserAgent:null,dynamoDbCrc32:!0,systemClockOffset:0,signatureVersion:null,signatureCache:!0,retryDelayOptions:{},useAccelerateEndpoint:!1,clientSideMonitoring:!1,endpointDiscoveryEnabled:void 0,endpointCacheSize:1e3,hostPrefixEnabled:!0,stsRegionalEndpoints:"legacy"},extractCredentials:function(e){return e.accessKeyId&&e.secretAccessKey&&(e=zt.util.copy(e),e.credentials=new zt.Credentials(e)),e},setPromisesDependency:function(e){rh=e,e===null&&typeof Promise=="function"&&(rh=Promise);var r=[zt.Request,zt.Credentials,zt.CredentialProviderChain];zt.S3&&(r.push(zt.S3),zt.S3.ManagedUpload&&r.push(zt.S3.ManagedUpload)),zt.util.addPromises(r,rh)},getPromisesDependency:function(){return rh}});zt.config=new zt.Config});var nh=U(()=>{var dr=me(),ih=dr.util.inherit;dr.Endpoint=ih({constructor:function(e,r){if(dr.util.hideProperties(this,["slashes","auth","hash","search","query"]),typeof e>"u"||e===null)throw new Error("Invalid endpoint: "+e);if(typeof e!="string")return dr.util.copy(e);if(!e.match(/^http/)){var i=r&&r.sslEnabled!==void 0?r.sslEnabled:dr.config.sslEnabled;e=(i?"https":"http")+"://"+e}dr.util.update(this,dr.util.urlParse(e)),this.port?this.port=parseInt(this.port,10):this.port=this.protocol==="https:"?443:80}});dr.HttpRequest=ih({constructor:function(e,r){e=new dr.Endpoint(e),this.method="POST",this.path=e.path||"/",this.headers={},this.body="",this.endpoint=e,this.region=r,this._userAgent="",this.setUserAgent()},setUserAgent:function(){this._userAgent=this.headers[this.getUserAgentHeaderName()]=dr.util.userAgent()},getUserAgentHeaderName:function(){var e=dr.util.isBrowser()?"X-Amz-":"";return e+"User-Agent"},appendToUserAgent:function(e){typeof e=="string"&&e&&(this._userAgent+=" "+e),this.headers[this.getUserAgentHeaderName()]=this._userAgent},getUserAgent:function(){return this._userAgent},pathname:function(){return this.path.split("?",1)[0]},search:function(){var e=this.path.split("?",2)[1];return e?(e=dr.util.queryStringParse(e),dr.util.queryParamsToString(e)):""},updateEndpoint:function(e){var r=new dr.Endpoint(e);this.endpoint=r,this.path=r.path||"/",this.headers.Host&&(this.headers.Host=r.host)}});dr.HttpResponse=ih({constructor:function(){this.statusCode=void 0,this.headers={},this.body=void 0,this.streaming=!1,this.stream=null},createUnbufferedStream:function(){return this.streaming=!0,this.stream}});dr.HttpClient=ih({});dr.HttpClient.getInstance=function(){return this.singleton===void 0&&(this.singleton=new this),this.singleton}});var b6=U((nW,v6)=>{var tr=me(),mi=Yt(),h6=["AWS_ENABLE_ENDPOINT_DISCOVERY","AWS_ENDPOINT_DISCOVERY_ENABLED"];function sh(t){var e=t.service,r=e.api||{},i=r.operations,n={};return e.config.region&&(n.region=e.config.region),r.serviceId&&(n.serviceId=r.serviceId),e.config.credentials.accessKeyId&&(n.accessKeyId=e.config.credentials.accessKeyId),n}function p6(t,e,r){!r||e===void 0||e===null||r.type==="structure"&&r.required&&r.required.length>0&&mi.arrayEach(r.required,function(i){var n=r.members[i];if(n.endpointDiscoveryId===!0){var s=n.isLocationName?n.name:i;t[s]=String(e[i])}else p6(t,e[i],n)})}function oh(t,e){var r={};return p6(r,t.params,e),r}function m6(t){var e=t.service,r=e.api,i=r.operations?r.operations[t.operation]:void 0,n=i?i.input:void 0,s=oh(t,n),o=sh(t);Object.keys(s).length>0&&(o=mi.update(o,s),i&&(o.operation=i.name));var u=tr.endpointCache.get(o);if(!(u&&u.length===1&&u[0].Address===""))if(u&&u.length>0)t.httpRequest.updateEndpoint(u[0].Address);else{var l=e.makeRequest(r.endpointOperation,{Operation:i.name,Identifiers:s});g6(l),l.removeListener("validate",tr.EventListeners.Core.VALIDATE_PARAMETERS),l.removeListener("retry",tr.EventListeners.Core.RETRY_CHECK),tr.endpointCache.put(o,[{Address:"",CachePeriodInMinutes:1}]),l.send(function(d,h){h&&h.Endpoints?tr.endpointCache.put(o,h.Endpoints):d&&tr.endpointCache.put(o,[{Address:"",CachePeriodInMinutes:1}])})}}var Zn={};function y6(t,e){var r=t.service,i=r.api,n=i.operations?i.operations[t.operation]:void 0,s=n?n.input:void 0,o=oh(t,s),u=sh(t);Object.keys(o).length>0&&(u=mi.update(u,o),n&&(u.operation=n.name));var l=tr.EndpointCache.getKeyString(u),d=tr.endpointCache.get(l);if(d&&d.length===1&&d[0].Address===""){Zn[l]||(Zn[l]=[]),Zn[l].push({request:t,callback:e});return}else if(d&&d.length>0)t.httpRequest.updateEndpoint(d[0].Address),e();else{var h=r.makeRequest(i.endpointOperation,{Operation:n.name,Identifiers:o});h.removeListener("validate",tr.EventListeners.Core.VALIDATE_PARAMETERS),g6(h),tr.endpointCache.put(l,[{Address:"",CachePeriodInMinutes:60}]),h.send(function(m,b){if(m){if(t.response.error=mi.error(m,{retryable:!1}),tr.endpointCache.remove(u),Zn[l]){var S=Zn[l];mi.arrayEach(S,function(y){y.request.response.error=mi.error(m,{retryable:!1}),y.callback()}),delete Zn[l]}}else if(b&&(tr.endpointCache.put(l,b.Endpoints),t.httpRequest.updateEndpoint(b.Endpoints[0].Address),Zn[l])){var S=Zn[l];mi.arrayEach(S,function(v){v.request.httpRequest.updateEndpoint(b.Endpoints[0].Address),v.callback()}),delete Zn[l]}e()})}}function g6(t){var e=t.service.api,r=e.apiVersion;r&&!t.httpRequest.headers["x-amz-api-version"]&&(t.httpRequest.headers["x-amz-api-version"]=r)}function Y0(t){var e=t.error,r=t.httpResponse;if(e&&(e.code==="InvalidEndpointException"||r.statusCode===421)){var i=t.request,n=i.service.api.operations||{},s=n[i.operation]?n[i.operation].input:void 0,o=oh(i,s),u=sh(i);Object.keys(o).length>0&&(u=mi.update(u,o),n[i.operation]&&(u.operation=n[i.operation].name)),tr.endpointCache.remove(u)}}function UI(t){if(t._originalConfig&&t._originalConfig.endpoint&&t._originalConfig.endpointDiscoveryEnabled===!0)throw mi.error(new Error,{code:"ConfigurationException",message:"Custom endpoint is supplied; endpointDiscoveryEnabled must not be true."});var e=tr.config[t.serviceIdentifier]||{};return Boolean(tr.config.endpoint||e.endpoint||t._originalConfig&&t._originalConfig.endpoint)}function d6(t){return["false","0"].indexOf(t)>=0}function jI(t){var e=t.service||{};if(e.config.endpointDiscoveryEnabled!==void 0)return e.config.endpointDiscoveryEnabled;if(!mi.isBrowser()){for(var r=0;r<h6.length;r++){var i=h6[r];if(Object.prototype.hasOwnProperty.call(process.env,i)){if(process.env[i]===""||process.env[i]===void 0)throw mi.error(new Error,{code:"ConfigurationException",message:"environmental variable "+i+" cannot be set to nothing"});return!d6(process.env[i])}}var n={};try{n=tr.util.iniLoader?tr.util.iniLoader.loadFrom({isConfig:!0,filename:process.env[tr.util.sharedConfigFileEnv]}):{}}catch{}var s=n[process.env.AWS_PROFILE||tr.util.defaultProfile]||{};if(Object.prototype.hasOwnProperty.call(s,"endpoint_discovery_enabled")){if(s.endpoint_discovery_enabled===void 0)throw mi.error(new Error,{code:"ConfigurationException",message:"config file entry 'endpoint_discovery_enabled' cannot be set to nothing"});return!d6(s.endpoint_discovery_enabled)}}}function HI(t,e){var r=t.service||{};if(UI(r)||t.isPresigned())return e();var i=r.api.operations||{},n=i[t.operation],s=n?n.endpointDiscoveryRequired:"NULL",o=jI(t),u=r.api.hasRequiredEndpointDiscovery;switch((o||u)&&t.httpRequest.appendToUserAgent("endpoint-discovery"),s){case"OPTIONAL":(o||u)&&(m6(t),t.addNamedListener("INVALIDATE_CACHED_ENDPOINTS","extractError",Y0)),e();break;case"REQUIRED":if(o===!1){t.response.error=mi.error(new Error,{code:"ConfigurationException",message:"Endpoint Discovery is disabled but "+r.api.className+"."+t.operation+"() requires it. Please check your configurations."}),e();break}t.addNamedListener("INVALIDATE_CACHED_ENDPOINTS","extractError",Y0),y6(t,e);break;case"NULL":default:e();break}}v6.exports={discoverEndpoint:HI,requiredDiscoverEndpoint:y6,optionalDiscoverEndpoint:m6,marshallCustomIdentifiers:oh,getCacheKey:sh,invalidateCachedEndpoint:Y0}});var S6=U(()=>{var st=me(),Xs=G0(),WI=b6().discoverEndpoint;st.EventListeners={Core:{}};function GI(t){if(!t.service.api.operations)return"";var e=t.service.api.operations[t.operation];return e?e.authtype:""}st.EventListeners={Core:new Xs().addNamedListeners(function(t,e){e("VALIDATE_CREDENTIALS","validate",function(n,s){if(!n.service.api.signatureVersion&&!n.service.config.signatureVersion)return s();n.service.config.getCredentials(function(o){o&&(n.response.error=st.util.error(o,{code:"CredentialsError",message:"Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1"})),s()})}),t("VALIDATE_REGION","validate",function(n){if(!n.service.isGlobalEndpoint){var s=new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);n.service.config.region?s.test(n.service.config.region)||(n.response.error=st.util.error(new Error,{code:"ConfigError",message:"Invalid region in config"})):n.response.error=st.util.error(new Error,{code:"ConfigError",message:"Missing region in config"})}}),t("BUILD_IDEMPOTENCY_TOKENS","validate",function(n){if(!!n.service.api.operations){var s=n.service.api.operations[n.operation];if(!!s){var o=s.idempotentMembers;if(!!o.length){for(var u=st.util.copy(n.params),l=0,d=o.length;l<d;l++)u[o[l]]||(u[o[l]]=st.util.uuid.v4());n.params=u}}}}),t("VALIDATE_PARAMETERS","validate",function(n){if(!!n.service.api.operations){var s=n.service.api.operations[n.operation].input,o=n.service.config.paramValidation;new st.ParamValidator(o).validate(s,n.params)}}),e("COMPUTE_SHA256","afterBuild",function(n,s){if(n.haltHandlersOnError(),!!n.service.api.operations){var o=n.service.api.operations[n.operation],u=o?o.authtype:"";if(!n.service.api.signatureVersion&&!u&&!n.service.config.signatureVersion)return s();if(n.service.getSignerClass(n)===st.Signers.V4){var l=n.httpRequest.body||"";if(u.indexOf("unsigned-body")>=0)return n.httpRequest.headers["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD",s();st.util.computeSha256(l,function(d,h){d?s(d):(n.httpRequest.headers["X-Amz-Content-Sha256"]=h,s())})}else s()}}),t("SET_CONTENT_LENGTH","afterBuild",function(n){var s=GI(n),o=st.util.getRequestPayloadShape(n);if(n.httpRequest.headers["Content-Length"]===void 0)try{var u=st.util.string.byteLength(n.httpRequest.body);n.httpRequest.headers["Content-Length"]=u}catch(l){if(o&&o.isStreaming){if(o.requiresLength)throw l;if(s.indexOf("unsigned-body")>=0){n.httpRequest.headers["Transfer-Encoding"]="chunked";return}else throw l}throw l}}),t("SET_HTTP_HOST","afterBuild",function(n){n.httpRequest.headers.Host=n.httpRequest.endpoint.host}),t("RESTART","restart",function(){var n=this.response.error;!n||!n.retryable||(this.httpRequest=new st.HttpRequest(this.service.endpoint,this.service.region),this.response.retryCount<this.service.config.maxRetries?this.response.retryCount++:this.response.error=null)});var r=!0;e("DISCOVER_ENDPOINT","sign",WI,r),e("SIGN","sign",function(n,s){var o=n.service,u=n.service.api.operations||{},l=u[n.operation],d=l?l.authtype:"";if(!o.api.signatureVersion&&!d&&!o.config.signatureVersion)return s();o.config.getCredentials(function(h,m){if(h)return n.response.error=h,s();try{var b=o.getSkewCorrectedDate(),S=o.getSignerClass(n),y=new S(n.httpRequest,o.getSigningName(n),{signatureCache:o.config.signatureCache,operation:l,signatureVersion:o.api.signatureVersion});y.setServiceClientId(o._clientId),delete n.httpRequest.headers.Authorization,delete n.httpRequest.headers.Date,delete n.httpRequest.headers["X-Amz-Date"],y.addAuthorization(m,b),n.signedAt=b}catch(v){n.response.error=v}s()})}),t("VALIDATE_RESPONSE","validateResponse",function(n){this.service.successfulResponse(n,this)?(n.data={},n.error=null):(n.data=null,n.error=st.util.error(new Error,{code:"UnknownError",message:"An unknown error occurred."}))}),e("SEND","send",function(n,s){n.httpResponse._abortCallback=s,n.error=null,n.data=null;function o(m){n.httpResponse.stream=m;var b=n.request.httpRequest.stream,S=n.request.service,y=S.api,v=n.request.operation,C=y.operations[v]||{};m.on("headers",function(x,N,I){if(n.request.emit("httpHeaders",[x,N,n,I]),!n.httpResponse.streaming)if(st.HttpClient.streamsApiVersion===2){if(C.hasEventOutput&&S.successfulResponse(n)){n.request.emit("httpDone"),s();return}m.on("readable",function(){var B=m.read();B!==null&&n.request.emit("httpData",[B,n])})}else m.on("data",function(B){n.request.emit("httpData",[B,n])})}),m.on("end",function(){if(!b||!b.didCallback){if(st.HttpClient.streamsApiVersion===2&&C.hasEventOutput&&S.successfulResponse(n))return;n.request.emit("httpDone"),s()}})}function u(m){m.on("sendProgress",function(S){n.request.emit("httpUploadProgress",[S,n])}),m.on("receiveProgress",function(S){n.request.emit("httpDownloadProgress",[S,n])})}function l(m){if(m.code!=="RequestAbortedError"){var b=m.code==="TimeoutError"?m.code:"NetworkingError";m=st.util.error(m,{code:b,region:n.request.httpRequest.region,hostname:n.request.httpRequest.endpoint.hostname,retryable:!0})}n.error=m,n.request.emit("httpError",[n.error,n],function(){s()})}function d(){var m=st.HttpClient.getInstance(),b=n.request.service.config.httpOptions||{};try{var S=m.handleRequest(n.request.httpRequest,b,o,l);u(S)}catch(y){l(y)}}var h=(n.request.service.getSkewCorrectedDate()-this.signedAt)/1e3;h>=60*10?this.emit("sign",[this],function(m){m?s(m):d()}):d()}),t("HTTP_HEADERS","httpHeaders",function(n,s,o,u){o.httpResponse.statusCode=n,o.httpResponse.statusMessage=u,o.httpResponse.headers=s,o.httpResponse.body=st.util.buffer.toBuffer(""),o.httpResponse.buffers=[],o.httpResponse.numBytes=0;var l=s.date||s.Date,d=o.request.service;if(l){var h=Date.parse(l);d.config.correctClockSkew&&d.isClockSkewed(h)&&d.applyClockOffset(h)}}),t("HTTP_DATA","httpData",function(n,s){if(n){if(st.util.isNode()){s.httpResponse.numBytes+=n.length;var o=s.httpResponse.headers["content-length"],u={loaded:s.httpResponse.numBytes,total:o};s.request.emit("httpDownloadProgress",[u,s])}s.httpResponse.buffers.push(st.util.buffer.toBuffer(n))}}),t("HTTP_DONE","httpDone",function(n){if(n.httpResponse.buffers&&n.httpResponse.buffers.length>0){var s=st.util.buffer.concat(n.httpResponse.buffers);n.httpResponse.body=s}delete n.httpResponse.numBytes,delete n.httpResponse.buffers}),t("FINALIZE_ERROR","retry",function(n){n.httpResponse.statusCode&&(n.error.statusCode=n.httpResponse.statusCode,n.error.retryable===void 0&&(n.error.retryable=this.service.retryableError(n.error,this)))}),t("INVALIDATE_CREDENTIALS","retry",function(n){if(!!n.error)switch(n.error.code){case"RequestExpired":case"ExpiredTokenException":case"ExpiredToken":n.error.retryable=!0,n.request.service.config.credentials.expired=!0}}),t("EXPIRED_SIGNATURE","retry",function(n){var s=n.error;!s||typeof s.code=="string"&&typeof s.message=="string"&&s.code.match(/Signature/)&&s.message.match(/expired/)&&(n.error.retryable=!0)}),t("CLOCK_SKEWED","retry",function(n){!n.error||this.service.clockSkewError(n.error)&&this.service.config.correctClockSkew&&(n.error.retryable=!0)}),t("REDIRECT","retry",function(n){n.error&&n.error.statusCode>=300&&n.error.statusCode<400&&n.httpResponse.headers.location&&(this.httpRequest.endpoint=new st.Endpoint(n.httpResponse.headers.location),this.httpRequest.headers.Host=this.httpRequest.endpoint.host,n.error.redirect=!0,n.error.retryable=!0)}),t("RETRY_CHECK","retry",function(n){n.error&&(n.error.redirect&&n.redirectCount<n.maxRedirects?n.error.retryDelay=0:n.retryCount<n.maxRetries&&(n.error.retryDelay=this.service.retryDelays(n.retryCount,n.error)||0))}),e("RESET_RETRY_STATE","afterRetry",function(n,s){var o,u=!1;n.error&&(o=n.error.retryDelay||0,n.error.retryable&&n.retryCount<n.maxRetries?(n.retryCount++,u=!0):n.error.redirect&&n.redirectCount<n.maxRedirects&&(n.redirectCount++,u=!0)),u&&o>=0?(n.error=null,setTimeout(s,o)):s()})}),CorePost:new Xs().addNamedListeners(function(t){t("EXTRACT_REQUEST_ID","extractData",st.util.extractRequestId),t("EXTRACT_REQUEST_ID","extractError",st.util.extractRequestId),t("ENOTFOUND_ERROR","httpError",function(r){function i(s){return s.errno==="ENOTFOUND"||typeof s.errno=="number"&&typeof st.util.getSystemErrorName=="function"&&["EAI_NONAME","EAI_NODATA"].indexOf(st.util.getSystemErrorName(s.errno)>=0)}if(r.code==="NetworkingError"&&i(r)){var n="Inaccessible host: `"+r.hostname+"'. This service may not be available in the `"+r.region+"' region.";this.response.error=st.util.error(new Error(n),{code:"UnknownEndpoint",region:r.region,hostname:r.hostname,retryable:!0,originalError:r})}})}),Logger:new Xs().addNamedListeners(function(t){t("LOG_REQUEST","complete",function(r){var i=r.request,n=i.service.config.logger;if(!n)return;function s(l,d){if(!d)return d;if(l.isSensitive)return"***SensitiveInformation***";switch(l.type){case"structure":var h={};return st.util.each(d,function(S,y){Object.prototype.hasOwnProperty.call(l.members,S)?h[S]=s(l.members[S],y):h[S]=y}),h;case"list":var m=[];return st.util.arrayEach(d,function(S,y){m.push(s(l.member,S))}),m;case"map":var b={};return st.util.each(d,function(S,y){b[S]=s(l.value,y)}),b;default:return d}}function o(){var l=r.request.service.getSkewCorrectedDate().getTime(),d=(l-i.startTime.getTime())/1e3,h=!!n.isTTY,m=r.httpResponse.statusCode,b=i.params;if(i.service.api.operations&&i.service.api.operations[i.operation]&&i.service.api.operations[i.operation].input){var S=i.service.api.operations[i.operation].input;b=s(S,i.params)}var y=require("util").inspect(b,!0,null),v="";return h&&(v+="\x1B[33m"),v+="[AWS "+i.service.serviceIdentifier+" "+m,v+=" "+d.toString()+"s "+r.retryCount+" retries]",h&&(v+="\x1B[0;1m"),v+=" "+st.util.string.lowerFirst(i.operation),v+="("+y+")",h&&(v+="\x1B[0m"),v}var u=o();typeof n.log=="function"?n.log(u):typeof n.write=="function"&&n.write(u+`
|
|
96
|
-
`)})}),Json:new Xs().addNamedListeners(function(t){var e=Xf();t("BUILD","build",e.buildRequest),t("EXTRACT_DATA","extractData",e.extractData),t("EXTRACT_ERROR","extractError",e.extractError)}),Rest:new Xs().addNamedListeners(function(t){var e=cc();t("BUILD","build",e.buildRequest),t("EXTRACT_DATA","extractData",e.extractData),t("EXTRACT_ERROR","extractError",e.extractError)}),RestJson:new Xs().addNamedListeners(function(t){var e=O0();t("BUILD","build",e.buildRequest),t("EXTRACT_DATA","extractData",e.extractData),t("EXTRACT_ERROR","extractError",e.extractError)}),RestXml:new Xs().addNamedListeners(function(t){var e=D0();t("BUILD","build",e.buildRequest),t("EXTRACT_DATA","extractData",e.extractData),t("EXTRACT_ERROR","extractError",e.extractError)}),Query:new Xs().addNamedListeners(function(t){var e=P0();t("BUILD","build",e.buildRequest),t("EXTRACT_DATA","extractData",e.extractData),t("EXTRACT_ERROR","extractError",e.extractError)})}});var w6=U((aW,x6)=>{function Z0(t,e){this.currentState=e||null,this.states=t||{}}Z0.prototype.runTo=function(e,r,i,n){typeof e=="function"&&(n=i,i=r,r=e,e=null);var s=this,o=s.states[s.currentState];o.fn.call(i||s,n,function(u){if(u)if(o.fail)s.currentState=o.fail;else return r?r.call(i,u):null;else if(o.accept)s.currentState=o.accept;else return r?r.call(i):null;if(s.currentState===e)return r?r.call(i,u):null;s.runTo(e,r,i,u)})};Z0.prototype.addState=function(e,r,i,n){return typeof r=="function"?(n=r,r=null,i=null):typeof i=="function"&&(n=i,i=null),this.currentState||(this.currentState=e),this.states[e]={accept:r,fail:i,fn:n},this};x6.exports=Z0});var uh=U(ah=>{(function(t){"use strict";function e(P){return P!==null?Object.prototype.toString.call(P)==="[object Array]":!1}function r(P){return P!==null?Object.prototype.toString.call(P)==="[object Object]":!1}function i(P,j){if(P===j)return!0;var W=Object.prototype.toString.call(P);if(W!==Object.prototype.toString.call(j))return!1;if(e(P)===!0){if(P.length!==j.length)return!1;for(var X=0;X<P.length;X++)if(i(P[X],j[X])===!1)return!1;return!0}if(r(P)===!0){var Q={};for(var he in P)if(hasOwnProperty.call(P,he)){if(i(P[he],j[he])===!1)return!1;Q[he]=!0}for(var Ie in j)if(hasOwnProperty.call(j,Ie)&&Q[Ie]!==!0)return!1;return!0}return!1}function n(P){if(P===""||P===!1||P===null)return!0;if(e(P)&&P.length===0)return!0;if(r(P)){for(var j in P)if(P.hasOwnProperty(j))return!1;return!0}else return!1}function s(P){for(var j=Object.keys(P),W=[],X=0;X<j.length;X++)W.push(P[j[X]]);return W}function o(P,j){var W={};for(var X in P)W[X]=P[X];for(var Q in j)W[Q]=j[Q];return W}var u;typeof String.prototype.trimLeft=="function"?u=function(P){return P.trimLeft()}:u=function(P){return P.match(/^\s*(.*)/)[1]};var l=0,d=1,h=2,m=3,b=4,S=5,y=6,v=7,C=8,w=9,x="EOF",N="UnquotedIdentifier",I="QuotedIdentifier",q="Rbracket",B="Rparen",z="Comma",D="Colon",se="Rbrace",le="Number",te="Current",ve="Expref",qe="Pipe",Je="Or",Mt="And",Pe="EQ",Wr="GT",vr="LT",Gr="GTE",Rt="LTE",Kr="NE",or="Flatten",er="Star",wi="Filter",Vi="Dot",L="Not",k="Lbrace",J="Lbracket",G="Lparen",Le="Literal",bt={".":Vi,"*":er,",":z,":":D,"{":k,"}":se,"]":q,"(":G,")":B,"@":te},Et={"<":!0,">":!0,"=":!0,"!":!0},Jt={" ":!0," ":!0,"\n":!0};function br(P){return P>="a"&&P<="z"||P>="A"&&P<="Z"||P==="_"}function Vr(P){return P>="0"&&P<="9"||P==="-"}function Tt(P){return P>="a"&&P<="z"||P>="A"&&P<="Z"||P>="0"&&P<="9"||P==="_"}function Ut(){}Ut.prototype={tokenize:function(P){var j=[];this._current=0;for(var W,X,Q;this._current<P.length;)if(br(P[this._current]))W=this._current,X=this._consumeUnquotedIdentifier(P),j.push({type:N,value:X,start:W});else if(bt[P[this._current]]!==void 0)j.push({type:bt[P[this._current]],value:P[this._current],start:this._current}),this._current++;else if(Vr(P[this._current]))Q=this._consumeNumber(P),j.push(Q);else if(P[this._current]==="[")Q=this._consumeLBracket(P),j.push(Q);else if(P[this._current]==='"')W=this._current,X=this._consumeQuotedIdentifier(P),j.push({type:I,value:X,start:W});else if(P[this._current]==="'")W=this._current,X=this._consumeRawStringLiteral(P),j.push({type:Le,value:X,start:W});else if(P[this._current]==="`"){W=this._current;var he=this._consumeLiteral(P);j.push({type:Le,value:he,start:W})}else if(Et[P[this._current]]!==void 0)j.push(this._consumeOperator(P));else if(Jt[P[this._current]]!==void 0)this._current++;else if(P[this._current]==="&")W=this._current,this._current++,P[this._current]==="&"?(this._current++,j.push({type:Mt,value:"&&",start:W})):j.push({type:ve,value:"&",start:W});else if(P[this._current]==="|")W=this._current,this._current++,P[this._current]==="|"?(this._current++,j.push({type:Je,value:"||",start:W})):j.push({type:qe,value:"|",start:W});else{var Ie=new Error("Unknown character:"+P[this._current]);throw Ie.name="LexerError",Ie}return j},_consumeUnquotedIdentifier:function(P){var j=this._current;for(this._current++;this._current<P.length&&Tt(P[this._current]);)this._current++;return P.slice(j,this._current)},_consumeQuotedIdentifier:function(P){var j=this._current;this._current++;for(var W=P.length;P[this._current]!=='"'&&this._current<W;){var X=this._current;P[X]==="\\"&&(P[X+1]==="\\"||P[X+1]==='"')?X+=2:X++,this._current=X}return this._current++,JSON.parse(P.slice(j,this._current))},_consumeRawStringLiteral:function(P){var j=this._current;this._current++;for(var W=P.length;P[this._current]!=="'"&&this._current<W;){var X=this._current;P[X]==="\\"&&(P[X+1]==="\\"||P[X+1]==="'")?X+=2:X++,this._current=X}this._current++;var Q=P.slice(j+1,this._current-1);return Q.replace("\\'","'")},_consumeNumber:function(P){var j=this._current;this._current++;for(var W=P.length;Vr(P[this._current])&&this._current<W;)this._current++;var X=parseInt(P.slice(j,this._current));return{type:le,value:X,start:j}},_consumeLBracket:function(P){var j=this._current;return this._current++,P[this._current]==="?"?(this._current++,{type:wi,value:"[?",start:j}):P[this._current]==="]"?(this._current++,{type:or,value:"[]",start:j}):{type:J,value:"[",start:j}},_consumeOperator:function(P){var j=this._current,W=P[j];if(this._current++,W==="!")return P[this._current]==="="?(this._current++,{type:Kr,value:"!=",start:j}):{type:L,value:"!",start:j};if(W==="<")return P[this._current]==="="?(this._current++,{type:Rt,value:"<=",start:j}):{type:vr,value:"<",start:j};if(W===">")return P[this._current]==="="?(this._current++,{type:Gr,value:">=",start:j}):{type:Wr,value:">",start:j};if(W==="="&&P[this._current]==="=")return this._current++,{type:Pe,value:"==",start:j}},_consumeLiteral:function(P){this._current++;for(var j=this._current,W=P.length,X;P[this._current]!=="`"&&this._current<W;){var Q=this._current;P[Q]==="\\"&&(P[Q+1]==="\\"||P[Q+1]==="`")?Q+=2:Q++,this._current=Q}var he=u(P.slice(j,this._current));return he=he.replace("\\`","`"),this._looksLikeJSON(he)?X=JSON.parse(he):X=JSON.parse('"'+he+'"'),this._current++,X},_looksLikeJSON:function(P){var j='[{"',W=["true","false","null"],X="-0123456789";if(P==="")return!1;if(j.indexOf(P[0])>=0)return!0;if(W.indexOf(P)>=0)return!0;if(X.indexOf(P[0])>=0)try{return JSON.parse(P),!0}catch{return!1}else return!1}};var Ne={};Ne[x]=0,Ne[N]=0,Ne[I]=0,Ne[q]=0,Ne[B]=0,Ne[z]=0,Ne[se]=0,Ne[le]=0,Ne[te]=0,Ne[ve]=0,Ne[qe]=1,Ne[Je]=2,Ne[Mt]=3,Ne[Pe]=5,Ne[Wr]=5,Ne[vr]=5,Ne[Gr]=5,Ne[Rt]=5,Ne[Kr]=5,Ne[or]=9,Ne[er]=20,Ne[wi]=21,Ne[Vi]=40,Ne[L]=45,Ne[k]=50,Ne[J]=55,Ne[G]=60;function ui(){}ui.prototype={parse:function(P){this._loadTokens(P),this.index=0;var j=this.expression(0);if(this._lookahead(0)!==x){var W=this._lookaheadToken(0),X=new Error("Unexpected token type: "+W.type+", value: "+W.value);throw X.name="ParserError",X}return j},_loadTokens:function(P){var j=new Ut,W=j.tokenize(P);W.push({type:x,value:"",start:P.length}),this.tokens=W},expression:function(P){var j=this._lookaheadToken(0);this._advance();for(var W=this.nud(j),X=this._lookahead(0);P<Ne[X];)this._advance(),W=this.led(X,W),X=this._lookahead(0);return W},_lookahead:function(P){return this.tokens[this.index+P].type},_lookaheadToken:function(P){return this.tokens[this.index+P]},_advance:function(){this.index++},nud:function(P){var j,W,X;switch(P.type){case Le:return{type:"Literal",value:P.value};case N:return{type:"Field",name:P.value};case I:var Q={type:"Field",name:P.value};if(this._lookahead(0)===G)throw new Error("Quoted identifier not allowed for function names.");return Q;case L:return W=this.expression(Ne.Not),{type:"NotExpression",children:[W]};case er:return j={type:"Identity"},W=null,this._lookahead(0)===q?W={type:"Identity"}:W=this._parseProjectionRHS(Ne.Star),{type:"ValueProjection",children:[j,W]};case wi:return this.led(P.type,{type:"Identity"});case k:return this._parseMultiselectHash();case or:return j={type:or,children:[{type:"Identity"}]},W=this._parseProjectionRHS(Ne.Flatten),{type:"Projection",children:[j,W]};case J:return this._lookahead(0)===le||this._lookahead(0)===D?(W=this._parseIndexExpression(),this._projectIfSlice({type:"Identity"},W)):this._lookahead(0)===er&&this._lookahead(1)===q?(this._advance(),this._advance(),W=this._parseProjectionRHS(Ne.Star),{type:"Projection",children:[{type:"Identity"},W]}):this._parseMultiselectList();case te:return{type:te};case ve:return X=this.expression(Ne.Expref),{type:"ExpressionReference",children:[X]};case G:for(var he=[];this._lookahead(0)!==B;)this._lookahead(0)===te?(X={type:te},this._advance()):X=this.expression(0),he.push(X);return this._match(B),he[0];default:this._errorToken(P)}},led:function(P,j){var W;switch(P){case Vi:var X=Ne.Dot;return this._lookahead(0)!==er?(W=this._parseDotRHS(X),{type:"Subexpression",children:[j,W]}):(this._advance(),W=this._parseProjectionRHS(X),{type:"ValueProjection",children:[j,W]});case qe:return W=this.expression(Ne.Pipe),{type:qe,children:[j,W]};case Je:return W=this.expression(Ne.Or),{type:"OrExpression",children:[j,W]};case Mt:return W=this.expression(Ne.And),{type:"AndExpression",children:[j,W]};case G:for(var Q=j.name,he=[],Ie,je;this._lookahead(0)!==B;)this._lookahead(0)===te?(Ie={type:te},this._advance()):Ie=this.expression(0),this._lookahead(0)===z&&this._match(z),he.push(Ie);return this._match(B),je={type:"Function",name:Q,children:he},je;case wi:var Lt=this.expression(0);return this._match(q),this._lookahead(0)===or?W={type:"Identity"}:W=this._parseProjectionRHS(Ne.Filter),{type:"FilterProjection",children:[j,W,Lt]};case or:var Ei={type:or,children:[j]},Ot=this._parseProjectionRHS(Ne.Flatten);return{type:"Projection",children:[Ei,Ot]};case Pe:case Kr:case Wr:case Gr:case vr:case Rt:return this._parseComparator(j,P);case J:var we=this._lookaheadToken(0);return we.type===le||we.type===D?(W=this._parseIndexExpression(),this._projectIfSlice(j,W)):(this._match(er),this._match(q),W=this._parseProjectionRHS(Ne.Star),{type:"Projection",children:[j,W]});default:this._errorToken(this._lookaheadToken(0))}},_match:function(P){if(this._lookahead(0)===P)this._advance();else{var j=this._lookaheadToken(0),W=new Error("Expected "+P+", got: "+j.type);throw W.name="ParserError",W}},_errorToken:function(P){var j=new Error("Invalid token ("+P.type+'): "'+P.value+'"');throw j.name="ParserError",j},_parseIndexExpression:function(){if(this._lookahead(0)===D||this._lookahead(1)===D)return this._parseSliceExpression();var P={type:"Index",value:this._lookaheadToken(0).value};return this._advance(),this._match(q),P},_projectIfSlice:function(P,j){var W={type:"IndexExpression",children:[P,j]};return j.type==="Slice"?{type:"Projection",children:[W,this._parseProjectionRHS(Ne.Star)]}:W},_parseSliceExpression:function(){for(var P=[null,null,null],j=0,W=this._lookahead(0);W!==q&&j<3;){if(W===D)j++,this._advance();else if(W===le)P[j]=this._lookaheadToken(0).value,this._advance();else{var X=this._lookahead(0),Q=new Error("Syntax error, unexpected token: "+X.value+"("+X.type+")");throw Q.name="Parsererror",Q}W=this._lookahead(0)}return this._match(q),{type:"Slice",children:P}},_parseComparator:function(P,j){var W=this.expression(Ne[j]);return{type:"Comparator",name:j,children:[P,W]}},_parseDotRHS:function(P){var j=this._lookahead(0),W=[N,I,er];if(W.indexOf(j)>=0)return this.expression(P);if(j===J)return this._match(J),this._parseMultiselectList();if(j===k)return this._match(k),this._parseMultiselectHash()},_parseProjectionRHS:function(P){var j;if(Ne[this._lookahead(0)]<10)j={type:"Identity"};else if(this._lookahead(0)===J)j=this.expression(P);else if(this._lookahead(0)===wi)j=this.expression(P);else if(this._lookahead(0)===Vi)this._match(Vi),j=this._parseDotRHS(P);else{var W=this._lookaheadToken(0),X=new Error("Sytanx error, unexpected token: "+W.value+"("+W.type+")");throw X.name="ParserError",X}return j},_parseMultiselectList:function(){for(var P=[];this._lookahead(0)!==q;){var j=this.expression(0);if(P.push(j),this._lookahead(0)===z&&(this._match(z),this._lookahead(0)===q))throw new Error("Unexpected token Rbracket")}return this._match(q),{type:"MultiSelectList",children:P}},_parseMultiselectHash:function(){for(var P=[],j=[N,I],W,X,Q,he;;){if(W=this._lookaheadToken(0),j.indexOf(W.type)<0)throw new Error("Expecting an identifier token, got: "+W.type);if(X=W.value,this._advance(),this._match(D),Q=this.expression(0),he={type:"KeyValuePair",name:X,value:Q},P.push(he),this._lookahead(0)===z)this._match(z);else if(this._lookahead(0)===se){this._match(se);break}}return{type:"MultiSelectHash",children:P}}};function jt(P){this.runtime=P}jt.prototype={search:function(P,j){return this.visit(P,j)},visit:function(P,j){var W,X,Q,he,Ie,je,Lt,Ei,Ot,we;switch(P.type){case"Field":return j===null?null:r(j)?(je=j[P.name],je===void 0?null:je):null;case"Subexpression":for(Q=this.visit(P.children[0],j),we=1;we<P.children.length;we++)if(Q=this.visit(P.children[1],Q),Q===null)return null;return Q;case"IndexExpression":return Lt=this.visit(P.children[0],j),Ei=this.visit(P.children[1],Lt),Ei;case"Index":if(!e(j))return null;var Mr=P.value;return Mr<0&&(Mr=j.length+Mr),Q=j[Mr],Q===void 0&&(Q=null),Q;case"Slice":if(!e(j))return null;var wl=P.children.slice(0),xs=this.computeSliceParams(j.length,wl),ws=xs[0],Te=xs[1],wo=xs[2];if(Q=[],wo>0)for(we=ws;we<Te;we+=wo)Q.push(j[we]);else for(we=ws;we>Te;we+=wo)Q.push(j[we]);return Q;case"Projection":var Wt=this.visit(P.children[0],j);if(!e(Wt))return null;for(Ot=[],we=0;we<Wt.length;we++)X=this.visit(P.children[1],Wt[we]),X!==null&&Ot.push(X);return Ot;case"ValueProjection":if(Wt=this.visit(P.children[0],j),!r(Wt))return null;Ot=[];var fn=s(Wt);for(we=0;we<fn.length;we++)X=this.visit(P.children[1],fn[we]),X!==null&&Ot.push(X);return Ot;case"FilterProjection":if(Wt=this.visit(P.children[0],j),!e(Wt))return null;var mt=[],_i=[];for(we=0;we<Wt.length;we++)W=this.visit(P.children[2],Wt[we]),n(W)||mt.push(Wt[we]);for(var hn=0;hn<mt.length;hn++)X=this.visit(P.children[1],mt[hn]),X!==null&&_i.push(X);return _i;case"Comparator":switch(he=this.visit(P.children[0],j),Ie=this.visit(P.children[1],j),P.name){case Pe:Q=i(he,Ie);break;case Kr:Q=!i(he,Ie);break;case Wr:Q=he>Ie;break;case Gr:Q=he>=Ie;break;case vr:Q=he<Ie;break;case Rt:Q=he<=Ie;break;default:throw new Error("Unknown comparator: "+P.name)}return Q;case or:var ci=this.visit(P.children[0],j);if(!e(ci))return null;var zn=[];for(we=0;we<ci.length;we++)X=ci[we],e(X)?zn.push.apply(zn,X):zn.push(X);return zn;case"Identity":return j;case"MultiSelectList":if(j===null)return null;for(Ot=[],we=0;we<P.children.length;we++)Ot.push(this.visit(P.children[we],j));return Ot;case"MultiSelectHash":if(j===null)return null;Ot={};var Fn;for(we=0;we<P.children.length;we++)Fn=P.children[we],Ot[Fn.name]=this.visit(Fn.value,j);return Ot;case"OrExpression":return W=this.visit(P.children[0],j),n(W)&&(W=this.visit(P.children[1],j)),W;case"AndExpression":return he=this.visit(P.children[0],j),n(he)===!0?he:this.visit(P.children[1],j);case"NotExpression":return he=this.visit(P.children[0],j),n(he);case"Literal":return P.value;case qe:return Lt=this.visit(P.children[0],j),this.visit(P.children[1],Lt);case te:return j;case"Function":var Ci=[];for(we=0;we<P.children.length;we++)Ci.push(this.visit(P.children[we],j));return this.runtime.callFunction(P.name,Ci);case"ExpressionReference":var Un=P.children[0];return Un.jmespathType=ve,Un;default:throw new Error("Unknown node type: "+P.type)}},computeSliceParams:function(P,j){var W=j[0],X=j[1],Q=j[2],he=[null,null,null];if(Q===null)Q=1;else if(Q===0){var Ie=new Error("Invalid slice, step cannot be 0");throw Ie.name="RuntimeError",Ie}var je=Q<0;return W===null?W=je?P-1:0:W=this.capSliceRange(P,W,Q),X===null?X=je?-1:P:X=this.capSliceRange(P,X,Q),he[0]=W,he[1]=X,he[2]=Q,he},capSliceRange:function(P,j,W){return j<0?(j+=P,j<0&&(j=W<0?-1:0)):j>=P&&(j=W<0?P-1:P),j}};function $r(P){this._interpreter=P,this.functionTable={abs:{_func:this._functionAbs,_signature:[{types:[l]}]},avg:{_func:this._functionAvg,_signature:[{types:[C]}]},ceil:{_func:this._functionCeil,_signature:[{types:[l]}]},contains:{_func:this._functionContains,_signature:[{types:[h,m]},{types:[d]}]},ends_with:{_func:this._functionEndsWith,_signature:[{types:[h]},{types:[h]}]},floor:{_func:this._functionFloor,_signature:[{types:[l]}]},length:{_func:this._functionLength,_signature:[{types:[h,m,b]}]},map:{_func:this._functionMap,_signature:[{types:[y]},{types:[m]}]},max:{_func:this._functionMax,_signature:[{types:[C,w]}]},merge:{_func:this._functionMerge,_signature:[{types:[b],variadic:!0}]},max_by:{_func:this._functionMaxBy,_signature:[{types:[m]},{types:[y]}]},sum:{_func:this._functionSum,_signature:[{types:[C]}]},starts_with:{_func:this._functionStartsWith,_signature:[{types:[h]},{types:[h]}]},min:{_func:this._functionMin,_signature:[{types:[C,w]}]},min_by:{_func:this._functionMinBy,_signature:[{types:[m]},{types:[y]}]},type:{_func:this._functionType,_signature:[{types:[d]}]},keys:{_func:this._functionKeys,_signature:[{types:[b]}]},values:{_func:this._functionValues,_signature:[{types:[b]}]},sort:{_func:this._functionSort,_signature:[{types:[w,C]}]},sort_by:{_func:this._functionSortBy,_signature:[{types:[m]},{types:[y]}]},join:{_func:this._functionJoin,_signature:[{types:[h]},{types:[w]}]},reverse:{_func:this._functionReverse,_signature:[{types:[h,m]}]},to_array:{_func:this._functionToArray,_signature:[{types:[d]}]},to_string:{_func:this._functionToString,_signature:[{types:[d]}]},to_number:{_func:this._functionToNumber,_signature:[{types:[d]}]},not_null:{_func:this._functionNotNull,_signature:[{types:[d],variadic:!0}]}}}$r.prototype={callFunction:function(P,j){var W=this.functionTable[P];if(W===void 0)throw new Error("Unknown function: "+P+"()");return this._validateArgs(P,j,W._signature),W._func.call(this,j)},_validateArgs:function(P,j,W){var X;if(W[W.length-1].variadic){if(j.length<W.length)throw X=W.length===1?" argument":" arguments",new Error("ArgumentError: "+P+"() takes at least"+W.length+X+" but received "+j.length)}else if(j.length!==W.length)throw X=W.length===1?" argument":" arguments",new Error("ArgumentError: "+P+"() takes "+W.length+X+" but received "+j.length);for(var Q,he,Ie,je=0;je<W.length;je++){Ie=!1,Q=W[je].types,he=this._getTypeName(j[je]);for(var Lt=0;Lt<Q.length;Lt++)if(this._typeMatches(he,Q[Lt],j[je])){Ie=!0;break}if(!Ie)throw new Error("TypeError: "+P+"() expected argument "+(je+1)+" to be type "+Q+" but received type "+he+" instead.")}},_typeMatches:function(P,j,W){if(j===d)return!0;if(j===w||j===C||j===m){if(j===m)return P===m;if(P===m){var X;j===C?X=l:j===w&&(X=h);for(var Q=0;Q<W.length;Q++)if(!this._typeMatches(this._getTypeName(W[Q]),X,W[Q]))return!1;return!0}}else return P===j},_getTypeName:function(P){switch(Object.prototype.toString.call(P)){case"[object String]":return h;case"[object Number]":return l;case"[object Array]":return m;case"[object Boolean]":return S;case"[object Null]":return v;case"[object Object]":return P.jmespathType===ve?y:b}},_functionStartsWith:function(P){return P[0].lastIndexOf(P[1])===0},_functionEndsWith:function(P){var j=P[0],W=P[1];return j.indexOf(W,j.length-W.length)!==-1},_functionReverse:function(P){var j=this._getTypeName(P[0]);if(j===h){for(var W=P[0],X="",Q=W.length-1;Q>=0;Q--)X+=W[Q];return X}else{var he=P[0].slice(0);return he.reverse(),he}},_functionAbs:function(P){return Math.abs(P[0])},_functionCeil:function(P){return Math.ceil(P[0])},_functionAvg:function(P){for(var j=0,W=P[0],X=0;X<W.length;X++)j+=W[X];return j/W.length},_functionContains:function(P){return P[0].indexOf(P[1])>=0},_functionFloor:function(P){return Math.floor(P[0])},_functionLength:function(P){return r(P[0])?Object.keys(P[0]).length:P[0].length},_functionMap:function(P){for(var j=[],W=this._interpreter,X=P[0],Q=P[1],he=0;he<Q.length;he++)j.push(W.visit(X,Q[he]));return j},_functionMerge:function(P){for(var j={},W=0;W<P.length;W++){var X=P[W];for(var Q in X)j[Q]=X[Q]}return j},_functionMax:function(P){if(P[0].length>0){var j=this._getTypeName(P[0][0]);if(j===l)return Math.max.apply(Math,P[0]);for(var W=P[0],X=W[0],Q=1;Q<W.length;Q++)X.localeCompare(W[Q])<0&&(X=W[Q]);return X}else return null},_functionMin:function(P){if(P[0].length>0){var j=this._getTypeName(P[0][0]);if(j===l)return Math.min.apply(Math,P[0]);for(var W=P[0],X=W[0],Q=1;Q<W.length;Q++)W[Q].localeCompare(X)<0&&(X=W[Q]);return X}else return null},_functionSum:function(P){for(var j=0,W=P[0],X=0;X<W.length;X++)j+=W[X];return j},_functionType:function(P){switch(this._getTypeName(P[0])){case l:return"number";case h:return"string";case m:return"array";case b:return"object";case S:return"boolean";case y:return"expref";case v:return"null"}},_functionKeys:function(P){return Object.keys(P[0])},_functionValues:function(P){for(var j=P[0],W=Object.keys(j),X=[],Q=0;Q<W.length;Q++)X.push(j[W[Q]]);return X},_functionJoin:function(P){var j=P[0],W=P[1];return W.join(j)},_functionToArray:function(P){return this._getTypeName(P[0])===m?P[0]:[P[0]]},_functionToString:function(P){return this._getTypeName(P[0])===h?P[0]:JSON.stringify(P[0])},_functionToNumber:function(P){var j=this._getTypeName(P[0]),W;return j===l?P[0]:j===h&&(W=+P[0],!isNaN(W))?W:null},_functionNotNull:function(P){for(var j=0;j<P.length;j++)if(this._getTypeName(P[j])!==v)return P[j];return null},_functionSort:function(P){var j=P[0].slice(0);return j.sort(),j},_functionSortBy:function(P){var j=P[0].slice(0);if(j.length===0)return j;var W=this._interpreter,X=P[1],Q=this._getTypeName(W.visit(X,j[0]));if([l,h].indexOf(Q)<0)throw new Error("TypeError");for(var he=this,Ie=[],je=0;je<j.length;je++)Ie.push([je,j[je]]);Ie.sort(function(Ei,Ot){var we=W.visit(X,Ei[1]),Mr=W.visit(X,Ot[1]);if(he._getTypeName(we)!==Q)throw new Error("TypeError: expected "+Q+", received "+he._getTypeName(we));if(he._getTypeName(Mr)!==Q)throw new Error("TypeError: expected "+Q+", received "+he._getTypeName(Mr));return we>Mr?1:we<Mr?-1:Ei[0]-Ot[0]});for(var Lt=0;Lt<Ie.length;Lt++)j[Lt]=Ie[Lt][1];return j},_functionMaxBy:function(P){for(var j=P[1],W=P[0],X=this.createKeyFunction(j,[l,h]),Q=-1/0,he,Ie,je=0;je<W.length;je++)Ie=X(W[je]),Ie>Q&&(Q=Ie,he=W[je]);return he},_functionMinBy:function(P){for(var j=P[1],W=P[0],X=this.createKeyFunction(j,[l,h]),Q=1/0,he,Ie,je=0;je<W.length;je++)Ie=X(W[je]),Ie<Q&&(Q=Ie,he=W[je]);return he},createKeyFunction:function(P,j){var W=this,X=this._interpreter,Q=function(he){var Ie=X.visit(P,he);if(j.indexOf(W._getTypeName(Ie))<0){var je="TypeError: expected one of "+j+", received "+W._getTypeName(Ie);throw new Error(je)}return Ie};return Q}};function fe(P){var j=new ui,W=j.parse(P);return W}function Ht(P){var j=new Ut;return j.tokenize(P)}function li(P,j){var W=new ui,X=new $r,Q=new jt(X);X._interpreter=Q;var he=W.parse(j);return Q.search(he,P)}t.tokenize=Ht,t.compile=fe,t.search=li,t.strictDeepEqual=i})(typeof ah>"u"?ah.jmespath={}:ah)});var _6=U(()=>{var yt=me(),E6=w6(),KI=yt.util.inherit,lh=yt.util.domain,VI=uh(),$I={success:1,error:1,complete:1};function XI(t){return Object.prototype.hasOwnProperty.call($I,t._asm.currentState)}var Q0=new E6;Q0.setupStates=function(){var t=function(e,r){var i=this;i._haltHandlersOnError=!1,i.emit(i._asm.currentState,function(n){if(n)if(XI(i))if(lh&&i.domain instanceof lh.Domain)n.domainEmitter=i,n.domain=i.domain,n.domainThrown=!1,i.domain.emit("error",n);else throw n;else i.response.error=n,r(n);else r(i.response.error)})};this.addState("validate","build","error",t),this.addState("build","afterBuild","restart",t),this.addState("afterBuild","sign","restart",t),this.addState("sign","send","retry",t),this.addState("retry","afterRetry","afterRetry",t),this.addState("afterRetry","sign","error",t),this.addState("send","validateResponse","retry",t),this.addState("validateResponse","extractData","extractError",t),this.addState("extractError","extractData","retry",t),this.addState("extractData","success","retry",t),this.addState("restart","build","error",t),this.addState("success","complete","complete",t),this.addState("error","complete","complete",t),this.addState("complete",null,null,t)};Q0.setupStates();yt.Request=KI({constructor:function(e,r,i){var n=e.endpoint,s=e.config.region,o=e.config.customUserAgent;e.isGlobalEndpoint&&(e.signingRegion?s=e.signingRegion:s="us-east-1"),this.domain=lh&&lh.active,this.service=e,this.operation=r,this.params=i||{},this.httpRequest=new yt.HttpRequest(n,s),this.httpRequest.appendToUserAgent(o),this.startTime=e.getSkewCorrectedDate(),this.response=new yt.Response(this),this._asm=new E6(Q0.states,"validate"),this._haltHandlersOnError=!1,yt.SequentialExecutor.call(this),this.emit=this.emitEvent},send:function(e){return e&&(this.httpRequest.appendToUserAgent("callback"),this.on("complete",function(r){e.call(r,r.error,r.data)})),this.runTo(),this.response},build:function(e){return this.runTo("send",e)},runTo:function(e,r){return this._asm.runTo(e,r,this),this},abort:function(){return this.removeAllListeners("validateResponse"),this.removeAllListeners("extractError"),this.on("validateResponse",function(r){r.error=yt.util.error(new Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1})}),this.httpRequest.stream&&!this.httpRequest.stream.didCallback&&(this.httpRequest.stream.abort(),this.httpRequest._abortCallback?this.httpRequest._abortCallback():this.removeAllListeners("send")),this},eachPage:function(e){e=yt.util.fn.makeAsync(e,3);function r(i){e.call(i,i.error,i.data,function(n){n!==!1&&(i.hasNextPage()?i.nextPage().on("complete",r).send():e.call(i,null,null,yt.util.fn.noop))})}this.on("complete",r).send()},eachItem:function(e){var r=this;function i(n,s){if(n)return e(n,null);if(s===null)return e(null,null);var o=r.service.paginationConfig(r.operation),u=o.resultKey;Array.isArray(u)&&(u=u[0]);var l=VI.search(s,u),d=!0;return yt.util.arrayEach(l,function(h){if(d=e(null,h),d===!1)return yt.util.abort}),d}this.eachPage(i)},isPageable:function(){return!!this.service.paginationConfig(this.operation)},createReadStream:function(){var e=yt.util.stream,r=this,i=null;return yt.HttpClient.streamsApiVersion===2?(i=new e.PassThrough,process.nextTick(function(){r.send()})):(i=new e.Stream,i.readable=!0,i.sent=!1,i.on("newListener",function(n){!i.sent&&n==="data"&&(i.sent=!0,process.nextTick(function(){r.send()}))})),this.on("error",function(n){i.emit("error",n)}),this.on("httpHeaders",function(s,o,u){if(s<300){r.removeListener("httpData",yt.EventListeners.Core.HTTP_DATA),r.removeListener("httpError",yt.EventListeners.Core.HTTP_ERROR),r.on("httpError",function(v){u.error=v,u.error.retryable=!1});var l=!1,d;if(r.httpRequest.method!=="HEAD"&&(d=parseInt(o["content-length"],10)),d!==void 0&&!isNaN(d)&&d>=0){l=!0;var h=0}var m=function(){l&&h!==d?i.emit("error",yt.util.error(new Error("Stream content length mismatch. Received "+h+" of "+d+" bytes."),{code:"StreamContentLengthMismatch"})):yt.HttpClient.streamsApiVersion===2?i.end():i.emit("end")},b=u.httpResponse.createUnbufferedStream();if(yt.HttpClient.streamsApiVersion===2)if(l){var S=new e.PassThrough;S._write=function(y){return y&&y.length&&(h+=y.length),e.PassThrough.prototype._write.apply(this,arguments)},S.on("end",m),i.on("error",function(y){l=!1,b.unpipe(S),S.emit("end"),S.end()}),b.pipe(S).pipe(i,{end:!1})}else b.pipe(i);else l&&b.on("data",function(y){y&&y.length&&(h+=y.length)}),b.on("data",function(y){i.emit("data",y)}),b.on("end",m);b.on("error",function(y){l=!1,i.emit("error",y)})}}),i},emitEvent:function(e,r,i){typeof r=="function"&&(i=r,r=null),i||(i=function(){}),r||(r=this.eventParameters(e,this.response));var n=yt.SequentialExecutor.prototype.emit;n.call(this,e,r,function(s){s&&(this.response.error=s),i.call(this,s)})},eventParameters:function(e){switch(e){case"restart":case"validate":case"sign":case"build":case"afterValidate":case"afterBuild":return[this];case"error":return[this.response.error,this.response];default:return[this.response]}},presign:function(e,r){return!r&&typeof e=="function"&&(r=e,e=null),new yt.Signers.Presign().sign(this.toGet(),e,r)},isPresigned:function(){return Object.prototype.hasOwnProperty.call(this.httpRequest.headers,"presigned-expires")},toUnauthenticated:function(){return this._unAuthenticated=!0,this.removeListener("validate",yt.EventListeners.Core.VALIDATE_CREDENTIALS),this.removeListener("sign",yt.EventListeners.Core.SIGN),this},toGet:function(){return(this.service.api.protocol==="query"||this.service.api.protocol==="ec2")&&(this.removeListener("build",this.buildAsGet),this.addListener("build",this.buildAsGet)),this},buildAsGet:function(e){e.httpRequest.method="GET",e.httpRequest.path=e.service.endpoint.path+"?"+e.httpRequest.body,e.httpRequest.body="",delete e.httpRequest.headers["Content-Length"],delete e.httpRequest.headers["Content-Type"]},haltHandlersOnError:function(){this._haltHandlersOnError=!0}});yt.Request.addPromisesToClass=function(e){this.prototype.promise=function(){var i=this;return this.httpRequest.appendToUserAgent("promise"),new e(function(n,s){i.on("complete",function(o){o.error?s(o.error):n(Object.defineProperty(o.data||{},"$response",{value:o}))}),i.runTo()})}};yt.Request.deletePromisesFromClass=function(){delete this.prototype.promise};yt.util.addPromises(yt.Request);yt.util.mixin(yt.Request,yt.SequentialExecutor)});var R6=U(()=>{var yc=me(),JI=yc.util.inherit,C6=uh();yc.Response=JI({constructor:function(e){this.request=e,this.data=null,this.error=null,this.retryCount=0,this.redirectCount=0,this.httpResponse=new yc.HttpResponse,e&&(this.maxRetries=e.service.numRetries(),this.maxRedirects=e.service.config.maxRedirects)},nextPage:function(e){var r,i=this.request.service,n=this.request.operation;try{r=i.paginationConfig(n,!0)}catch(l){this.error=l}if(!this.hasNextPage()){if(e)e(this.error,null);else if(this.error)throw this.error;return null}var s=yc.util.copy(this.request.params);if(this.nextPageTokens){var o=r.inputToken;typeof o=="string"&&(o=[o]);for(var u=0;u<o.length;u++)s[o[u]]=this.nextPageTokens[u];return i.makeRequest(this.request.operation,s,e)}else return e?e(null,null):null},hasNextPage:function(){if(this.cacheNextPageTokens(),this.nextPageTokens)return!0;if(this.nextPageTokens!==void 0)return!1},cacheNextPageTokens:function(){if(Object.prototype.hasOwnProperty.call(this,"nextPageTokens"))return this.nextPageTokens;this.nextPageTokens=void 0;var e=this.request.service.paginationConfig(this.request.operation);if(!e)return this.nextPageTokens;if(this.nextPageTokens=null,e.moreResults&&!C6.search(this.data,e.moreResults))return this.nextPageTokens;var r=e.outputToken;return typeof r=="string"&&(r=[r]),yc.util.arrayEach.call(this,r,function(i){var n=C6.search(this.data,i);n&&(this.nextPageTokens=this.nextPageTokens||[],this.nextPageTokens.push(n))}),this.nextPageTokens}})});var N6=U(()=>{var ia=me(),YI=ia.util.inherit,Eu=uh();function T6(t){var e=t.request._waiter,r=e.config.acceptors,i=!1,n="retry";r.forEach(function(s){if(!i){var o=e.matchers[s.matcher];o&&o(t,s.expected,s.argument)&&(i=!0,n=s.state)}}),!i&&t.error&&(n="failure"),n==="success"?e.setSuccess(t):e.setError(t,n==="retry")}ia.ResourceWaiter=YI({constructor:function(e,r){this.service=e,this.state=r,this.loadWaiterConfig(this.state)},service:null,state:null,config:null,matchers:{path:function(t,e,r){try{var i=Eu.search(t.data,r)}catch{return!1}return Eu.strictDeepEqual(i,e)},pathAll:function(t,e,r){try{var i=Eu.search(t.data,r)}catch{return!1}Array.isArray(i)||(i=[i]);var n=i.length;if(!n)return!1;for(var s=0;s<n;s++)if(!Eu.strictDeepEqual(i[s],e))return!1;return!0},pathAny:function(t,e,r){try{var i=Eu.search(t.data,r)}catch{return!1}Array.isArray(i)||(i=[i]);for(var n=i.length,s=0;s<n;s++)if(Eu.strictDeepEqual(i[s],e))return!0;return!1},status:function(t,e){var r=t.httpResponse.statusCode;return typeof r=="number"&&r===e},error:function(t,e){return typeof e=="string"&&t.error?e===t.error.code:e===!!t.error}},listeners:new ia.SequentialExecutor().addNamedListeners(function(t){t("RETRY_CHECK","retry",function(e){var r=e.request._waiter;e.error&&e.error.code==="ResourceNotReady"&&(e.error.retryDelay=(r.config.delay||0)*1e3)}),t("CHECK_OUTPUT","extractData",T6),t("CHECK_ERROR","extractError",T6)}),wait:function(e,r){typeof e=="function"&&(r=e,e=void 0),e&&e.$waiter&&(e=ia.util.copy(e),typeof e.$waiter.delay=="number"&&(this.config.delay=e.$waiter.delay),typeof e.$waiter.maxAttempts=="number"&&(this.config.maxAttempts=e.$waiter.maxAttempts),delete e.$waiter);var i=this.service.makeRequest(this.config.operation,e);return i._waiter=this,i.response.maxRetries=this.config.maxAttempts,i.addListeners(this.listeners),r&&i.send(r),i},setSuccess:function(e){e.error=null,e.data=e.data||{},e.request.removeAllListeners("extractData")},setError:function(e,r){e.data=null,e.error=ia.util.error(e.error||new Error,{code:"ResourceNotReady",message:"Resource is not in the state "+this.state,retryable:r})},loadWaiterConfig:function(e){if(!this.service.api.waiters[e])throw new ia.util.error(new Error,{code:"StateNotFoundError",message:"State "+e+" not found."});this.config=ia.util.copy(this.service.api.waiters[e])}})});var M6=U((mW,A6)=>{var Qn=me(),ZI=Qn.util.inherit;Qn.Signers.V2=ZI(Qn.Signers.RequestSigner,{addAuthorization:function(e,r){r||(r=Qn.util.date.getDate());var i=this.request;i.params.Timestamp=Qn.util.date.iso8601(r),i.params.SignatureVersion="2",i.params.SignatureMethod="HmacSHA256",i.params.AWSAccessKeyId=e.accessKeyId,e.sessionToken&&(i.params.SecurityToken=e.sessionToken),delete i.params.Signature,i.params.Signature=this.signature(e),i.body=Qn.util.queryParamsToString(i.params),i.headers["Content-Length"]=i.body.length},signature:function(e){return Qn.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push(this.request.endpoint.host.toLowerCase()),e.push(this.request.pathname()),e.push(Qn.util.queryParamsToString(this.request.params)),e.join(`
|
|
97
|
-
`)}});A6.exports=Qn.Signers.V2});var ey=U((yW,k6)=>{var Rn=me(),QI=Rn.util.inherit;Rn.Signers.V3=QI(Rn.Signers.RequestSigner,{addAuthorization:function(e,r){var i=Rn.util.date.rfc822(r);this.request.headers["X-Amz-Date"]=i,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken),this.request.headers["X-Amzn-Authorization"]=this.authorization(e,i)},authorization:function(e){return"AWS3 AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,SignedHeaders="+this.signedHeaders()+",Signature="+this.signature(e)},signedHeaders:function(){var e=[];return Rn.util.arrayEach(this.headersToSign(),function(i){e.push(i.toLowerCase())}),e.sort().join(";")},canonicalHeaders:function(){var e=this.request.headers,r=[];return Rn.util.arrayEach(this.headersToSign(),function(n){r.push(n.toLowerCase().trim()+":"+String(e[n]).trim())}),r.sort().join(`
|
|
98
|
-
`)+`
|
|
99
|
-
`},headersToSign:function(){var e=[];return Rn.util.each(this.request.headers,function(i){(i==="Host"||i==="Content-Encoding"||i.match(/^X-Amz/i))&&e.push(i)}),e},signature:function(e){return Rn.util.crypto.hmac(e.secretAccessKey,this.stringToSign(),"base64")},stringToSign:function(){var e=[];return e.push(this.request.method),e.push("/"),e.push(""),e.push(this.canonicalHeaders()),e.push(this.request.body),Rn.util.crypto.sha256(e.join(`
|
|
100
|
-
`))}});k6.exports=Rn.Signers.V3});var P6=U((gW,I6)=>{var ch=me(),eP=ch.util.inherit;ey();ch.Signers.V3Https=eP(ch.Signers.V3,{authorization:function(e){return"AWS3-HTTPS AWSAccessKeyId="+e.accessKeyId+",Algorithm=HmacSHA256,Signature="+this.signature(e)},stringToSign:function(){return this.request.headers["X-Amz-Date"]}});I6.exports=ch.Signers.V3Https});var ty=U((vW,O6)=>{var gc=me(),vc={},fh=[],tP=50,L6="aws4_request";O6.exports={createScope:function(e,r,i){return[e.substr(0,8),r,i,L6].join("/")},getSigningKey:function(e,r,i,n,s){var o=gc.util.crypto.hmac(e.secretAccessKey,e.accessKeyId,"base64"),u=[o,r,i,n].join("_");if(s=s!==!1,s&&u in vc)return vc[u];var l=gc.util.crypto.hmac("AWS4"+e.secretAccessKey,r,"buffer"),d=gc.util.crypto.hmac(l,i,"buffer"),h=gc.util.crypto.hmac(d,n,"buffer"),m=gc.util.crypto.hmac(h,L6,"buffer");return s&&(vc[u]=m,fh.push(u),fh.length>tP&&delete vc[fh.shift()]),m},emptyCache:function(){vc={},fh=[]}}});var q6=U((bW,D6)=>{var Pr=me(),B6=ty(),rP=Pr.util.inherit,hh="presigned-expires";Pr.Signers.V4=rP(Pr.Signers.RequestSigner,{constructor:function(e,r,i){Pr.Signers.RequestSigner.call(this,e),this.serviceName=r,i=i||{},this.signatureCache=typeof i.signatureCache=="boolean"?i.signatureCache:!0,this.operation=i.operation,this.signatureVersion=i.signatureVersion},algorithm:"AWS4-HMAC-SHA256",addAuthorization:function(e,r){var i=Pr.util.date.iso8601(r).replace(/[:\-]|\.\d{3}/g,"");this.isPresigned()?this.updateForPresigned(e,i):this.addHeaders(e,i),this.request.headers.Authorization=this.authorization(e,i)},addHeaders:function(e,r){this.request.headers["X-Amz-Date"]=r,e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken)},updateForPresigned:function(e,r){var i=this.credentialString(r),n={"X-Amz-Date":r,"X-Amz-Algorithm":this.algorithm,"X-Amz-Credential":e.accessKeyId+"/"+i,"X-Amz-Expires":this.request.headers[hh],"X-Amz-SignedHeaders":this.signedHeaders()};e.sessionToken&&(n["X-Amz-Security-Token"]=e.sessionToken),this.request.headers["Content-Type"]&&(n["Content-Type"]=this.request.headers["Content-Type"]),this.request.headers["Content-MD5"]&&(n["Content-MD5"]=this.request.headers["Content-MD5"]),this.request.headers["Cache-Control"]&&(n["Cache-Control"]=this.request.headers["Cache-Control"]),Pr.util.each.call(this,this.request.headers,function(o,u){if(o!==hh&&this.isSignableHeader(o)){var l=o.toLowerCase();l.indexOf("x-amz-meta-")===0?n[l]=u:l.indexOf("x-amz-")===0&&(n[o]=u)}});var s=this.request.path.indexOf("?")>=0?"&":"?";this.request.path+=s+Pr.util.queryParamsToString(n)},authorization:function(e,r){var i=[],n=this.credentialString(r);return i.push(this.algorithm+" Credential="+e.accessKeyId+"/"+n),i.push("SignedHeaders="+this.signedHeaders()),i.push("Signature="+this.signature(e,r)),i.join(", ")},signature:function(e,r){var i=B6.getSigningKey(e,r.substr(0,8),this.request.region,this.serviceName,this.signatureCache);return Pr.util.crypto.hmac(i,this.stringToSign(r),"hex")},stringToSign:function(e){var r=[];return r.push("AWS4-HMAC-SHA256"),r.push(e),r.push(this.credentialString(e)),r.push(this.hexEncodedHash(this.canonicalString())),r.join(`
|
|
101
|
-
`)},canonicalString:function(){var e=[],r=this.request.pathname();return this.serviceName!=="s3"&&this.signatureVersion!=="s3v4"&&(r=Pr.util.uriEscapePath(r)),e.push(this.request.method),e.push(r),e.push(this.request.search()),e.push(this.canonicalHeaders()+`
|
|
102
|
-
`),e.push(this.signedHeaders()),e.push(this.hexEncodedBodyHash()),e.join(`
|
|
103
|
-
`)},canonicalHeaders:function(){var e=[];Pr.util.each.call(this,this.request.headers,function(i,n){e.push([i,n])}),e.sort(function(i,n){return i[0].toLowerCase()<n[0].toLowerCase()?-1:1});var r=[];return Pr.util.arrayEach.call(this,e,function(i){var n=i[0].toLowerCase();if(this.isSignableHeader(n)){var s=i[1];if(typeof s>"u"||s===null||typeof s.toString!="function")throw Pr.util.error(new Error("Header "+n+" contains invalid value"),{code:"InvalidHeader"});r.push(n+":"+this.canonicalHeaderValues(s.toString()))}}),r.join(`
|
|
104
|
-
`)},canonicalHeaderValues:function(e){return e.replace(/\s+/g," ").replace(/^\s+|\s+$/g,"")},signedHeaders:function(){var e=[];return Pr.util.each.call(this,this.request.headers,function(r){r=r.toLowerCase(),this.isSignableHeader(r)&&e.push(r)}),e.sort().join(";")},credentialString:function(e){return B6.createScope(e.substr(0,8),this.request.region,this.serviceName)},hexEncodedHash:function(e){return Pr.util.crypto.sha256(e,"hex")},hexEncodedBodyHash:function(){var e=this.request;return this.isPresigned()&&this.serviceName==="s3"&&!e.body?"UNSIGNED-PAYLOAD":e.headers["X-Amz-Content-Sha256"]?e.headers["X-Amz-Content-Sha256"]:this.hexEncodedHash(this.request.body||"")},unsignableHeaders:["authorization","content-type","content-length","user-agent",hh,"expect","x-amzn-trace-id"],isSignableHeader:function(e){return e.toLowerCase().indexOf("x-amz-")===0?!0:this.unsignableHeaders.indexOf(e)<0},isPresigned:function(){return!!this.request.headers[hh]}});D6.exports=Pr.Signers.V4});var F6=U((SW,z6)=>{var Tn=me(),iP=Tn.util.inherit;Tn.Signers.S3=iP(Tn.Signers.RequestSigner,{subResources:{acl:1,accelerate:1,analytics:1,cors:1,lifecycle:1,delete:1,inventory:1,location:1,logging:1,metrics:1,notification:1,partNumber:1,policy:1,requestPayment:1,replication:1,restore:1,tagging:1,torrent:1,uploadId:1,uploads:1,versionId:1,versioning:1,versions:1,website:1},responseHeaders:{"response-content-type":1,"response-content-language":1,"response-expires":1,"response-cache-control":1,"response-content-disposition":1,"response-content-encoding":1},addAuthorization:function(e,r){this.request.headers["presigned-expires"]||(this.request.headers["X-Amz-Date"]=Tn.util.date.rfc822(r)),e.sessionToken&&(this.request.headers["x-amz-security-token"]=e.sessionToken);var i=this.sign(e.secretAccessKey,this.stringToSign()),n="AWS "+e.accessKeyId+":"+i;this.request.headers.Authorization=n},stringToSign:function(){var e=this.request,r=[];r.push(e.method),r.push(e.headers["Content-MD5"]||""),r.push(e.headers["Content-Type"]||""),r.push(e.headers["presigned-expires"]||"");var i=this.canonicalizedAmzHeaders();return i&&r.push(i),r.push(this.canonicalizedResource()),r.join(`
|
|
105
|
-
`)},canonicalizedAmzHeaders:function(){var e=[];Tn.util.each(this.request.headers,function(i){i.match(/^x-amz-/i)&&e.push(i)}),e.sort(function(i,n){return i.toLowerCase()<n.toLowerCase()?-1:1});var r=[];return Tn.util.arrayEach.call(this,e,function(i){r.push(i.toLowerCase()+":"+String(this.request.headers[i]))}),r.join(`
|
|
106
|
-
`)},canonicalizedResource:function(){var e=this.request,r=e.path.split("?"),i=r[0],n=r[1],s="";if(e.virtualHostedBucket&&(s+="/"+e.virtualHostedBucket),s+=i,n){var o=[];Tn.util.arrayEach.call(this,n.split("&"),function(u){var l=u.split("=")[0],d=u.split("=")[1];if(this.subResources[l]||this.responseHeaders[l]){var h={name:l};d!==void 0&&(this.subResources[l]?h.value=d:h.value=decodeURIComponent(d)),o.push(h)}}),o.sort(function(u,l){return u.name<l.name?-1:1}),o.length&&(n=[],Tn.util.arrayEach(o,function(u){u.value===void 0?n.push(u.name):n.push(u.name+"="+u.value)}),s+="?"+n.join("&"))}return s},sign:function(e,r){return Tn.util.crypto.hmac(e,r,"base64","sha1")}});z6.exports=Tn.Signers.S3});var j6=U((xW,U6)=>{var pr=me(),nP=pr.util.inherit,_u="presigned-expires";function sP(t){var e=t.httpRequest.headers[_u],r=t.service.getSignerClass(t);if(delete t.httpRequest.headers["User-Agent"],delete t.httpRequest.headers["X-Amz-User-Agent"],r===pr.Signers.V4){if(e>604800){var i="Presigning does not support expiry time greater than a week with SigV4 signing.";throw pr.util.error(new Error,{code:"InvalidExpiryTime",message:i,retryable:!1})}t.httpRequest.headers[_u]=e}else if(r===pr.Signers.S3){var n=t.service?t.service.getSkewCorrectedDate():pr.util.date.getDate();t.httpRequest.headers[_u]=parseInt(pr.util.date.unixTimestamp(n)+e,10).toString()}else throw pr.util.error(new Error,{message:"Presigning only supports S3 or SigV4 signing.",code:"UnsupportedSigner",retryable:!1})}function oP(t){var e=t.httpRequest.endpoint,r=pr.util.urlParse(t.httpRequest.path),i={};r.search&&(i=pr.util.queryStringParse(r.search.substr(1)));var n=t.httpRequest.headers.Authorization.split(" ");if(n[0]==="AWS")n=n[1].split(":"),i.Signature=n.pop(),i.AWSAccessKeyId=n.join(":"),pr.util.each(t.httpRequest.headers,function(u,l){u===_u&&(u="Expires"),u.indexOf("x-amz-meta-")===0&&(delete i[u],u=u.toLowerCase()),i[u]=l}),delete t.httpRequest.headers[_u],delete i.Authorization,delete i.Host;else if(n[0]==="AWS4-HMAC-SHA256"){n.shift();var s=n.join(" "),o=s.match(/Signature=(.*?)(?:,|\s|\r?\n|$)/)[1];i["X-Amz-Signature"]=o,delete i.Expires}e.pathname=r.pathname,e.search=pr.util.queryParamsToString(i)}pr.Signers.Presign=nP({sign:function(e,r,i){if(e.httpRequest.headers[_u]=r||3600,e.on("build",sP),e.on("sign",oP),e.removeListener("afterBuild",pr.EventListeners.Core.SET_CONTENT_LENGTH),e.removeListener("afterBuild",pr.EventListeners.Core.COMPUTE_SHA256),e.emit("beforePresign",[e]),i)e.build(function(){this.response.error?i(this.response.error):i(null,pr.util.urlFormat(e.httpRequest.endpoint))});else{if(e.build(),e.response.error)throw e.response.error;return pr.util.urlFormat(e.httpRequest.endpoint)}}});U6.exports=pr.Signers.Presign});var H6=U(()=>{var es=me(),aP=es.util.inherit;es.Signers.RequestSigner=aP({constructor:function(e){this.request=e},setServiceClientId:function(e){this.serviceClientId=e},getServiceClientId:function(){return this.serviceClientId}});es.Signers.RequestSigner.getVersion=function(e){switch(e){case"v2":return es.Signers.V2;case"v3":return es.Signers.V3;case"s3v4":return es.Signers.V4;case"v4":return es.Signers.V4;case"s3":return es.Signers.S3;case"v3https":return es.Signers.V3Https}throw new Error("Unknown signing version "+e)};M6();ey();P6();q6();F6();j6()});var W6=U(()=>{var tn=me();tn.ParamValidator=tn.util.inherit({constructor:function(e){(e===!0||e===void 0)&&(e={min:!0}),this.validation=e},validate:function(e,r,i){if(this.errors=[],this.validateMember(e,r||{},i||"params"),this.errors.length>1){var n=this.errors.join(`
|
|
107
|
-
* `);throw n="There were "+this.errors.length+` validation errors:
|
|
108
|
-
* `+n,tn.util.error(new Error(n),{code:"MultipleValidationErrors",errors:this.errors})}else{if(this.errors.length===1)throw this.errors[0];return!0}},fail:function(e,r){this.errors.push(tn.util.error(new Error(r),{code:e}))},validateStructure:function(e,r,i){this.validateType(r,i,["object"],"structure");for(var n,s=0;e.required&&s<e.required.length;s++){n=e.required[s];var o=r[n];o==null&&this.fail("MissingRequiredParameter","Missing required key '"+n+"' in "+i)}for(n in r)if(!!Object.prototype.hasOwnProperty.call(r,n)){var u=r[n],l=e.members[n];if(l!==void 0){var d=[i,n].join(".");this.validateMember(l,u,d)}else u!=null&&this.fail("UnexpectedParameter","Unexpected key '"+n+"' found in "+i)}return!0},validateMember:function(e,r,i){switch(e.type){case"structure":return this.validateStructure(e,r,i);case"list":return this.validateList(e,r,i);case"map":return this.validateMap(e,r,i);default:return this.validateScalar(e,r,i)}},validateList:function(e,r,i){if(this.validateType(r,i,[Array])){this.validateRange(e,r.length,i,"list member count");for(var n=0;n<r.length;n++)this.validateMember(e.member,r[n],i+"["+n+"]")}},validateMap:function(e,r,i){if(this.validateType(r,i,["object"],"map")){var n=0;for(var s in r)!Object.prototype.hasOwnProperty.call(r,s)||(this.validateMember(e.key,s,i+"[key='"+s+"']"),this.validateMember(e.value,r[s],i+"['"+s+"']"),n++);this.validateRange(e,n,i,"map member count")}},validateScalar:function(e,r,i){switch(e.type){case null:case void 0:case"string":return this.validateString(e,r,i);case"base64":case"binary":return this.validatePayload(r,i);case"integer":case"float":return this.validateNumber(e,r,i);case"boolean":return this.validateType(r,i,["boolean"]);case"timestamp":return this.validateType(r,i,[Date,/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?Z$/,"number"],"Date object, ISO-8601 string, or a UNIX timestamp");default:return this.fail("UnkownType","Unhandled type "+e.type+" for "+i)}},validateString:function(e,r,i){var n=["string"];e.isJsonValue&&(n=n.concat(["number","object","boolean"])),r!==null&&this.validateType(r,i,n)&&(this.validateEnum(e,r,i),this.validateRange(e,r.length,i,"string length"),this.validatePattern(e,r,i),this.validateUri(e,r,i))},validateUri:function(e,r,i){e.location==="uri"&&r.length===0&&this.fail("UriParameterError",'Expected uri parameter to have length >= 1, but found "'+r+'" for '+i)},validatePattern:function(e,r,i){this.validation.pattern&&e.pattern!==void 0&&(new RegExp(e.pattern).test(r)||this.fail("PatternMatchError",'Provided value "'+r+'" does not match regex pattern /'+e.pattern+"/ for "+i))},validateRange:function(e,r,i,n){this.validation.min&&e.min!==void 0&&r<e.min&&this.fail("MinRangeError","Expected "+n+" >= "+e.min+", but found "+r+" for "+i),this.validation.max&&e.max!==void 0&&r>e.max&&this.fail("MaxRangeError","Expected "+n+" <= "+e.max+", but found "+r+" for "+i)},validateEnum:function(e,r,i){this.validation.enum&&e.enum!==void 0&&e.enum.indexOf(r)===-1&&this.fail("EnumError","Found string value of "+r+", but expected "+e.enum.join("|")+" for "+i)},validateType:function(e,r,i,n){if(e==null)return!1;for(var s=!1,o=0;o<i.length;o++){if(typeof i[o]=="string"){if(typeof e===i[o])return!0}else if(i[o]instanceof RegExp){if((e||"").toString().match(i[o]))return!0}else{if(e instanceof i[o]||tn.util.isType(e,i[o]))return!0;!n&&!s&&(i=i.slice()),i[o]=tn.util.typeName(i[o])}s=!0}var u=n;u||(u=i.join(", ").replace(/,([^,]+)$/,", or$1"));var l=u.match(/^[aeiou]/i)?"n":"";return this.fail("InvalidParameterType","Expected "+r+" to be a"+l+" "+u),!1},validateNumber:function(e,r,i){if(r!=null){if(typeof r=="string"){var n=parseFloat(r);n.toString()===r&&(r=n)}this.validateType(r,i,["number"])&&this.validateRange(e,r,i,"numeric value")}},validatePayload:function(e,r){if(e!=null&&typeof e!="string"&&!(e&&typeof e.byteLength=="number")){if(tn.util.isNode()){var i=tn.util.stream.Stream;if(tn.util.Buffer.isBuffer(e)||e instanceof i)return}else if(typeof Blob!==void 0&&e instanceof Blob)return;var n=["Buffer","Stream","File","Blob","ArrayBuffer","DataView"];if(e){for(var s=0;s<n.length;s++)if(tn.util.isType(e,n[s])||tn.util.typeName(e.constructor)===n[s])return}this.fail("InvalidParameterType","Expected "+r+" to be a string, Buffer, Stream, Blob, or typed array object")}}})});var me=U((RW,G6)=>{var ts={util:Yt()},uP={};uP.toString();G6.exports=ts;ts.util.update(ts,{VERSION:"2.890.0",Signers:{},Protocol:{Json:Xf(),Query:P0(),Rest:cc(),RestJson:O0(),RestXml:D0()},XML:{Builder:$b(),Parser:null},JSON:{Builder:Gf(),Parser:Vf()},Model:{Api:j0(),Operation:q0(),Shape:uc(),Paginator:z0(),ResourceWaiter:F0()},apiLoader:i6(),EndpointCache:s6().EndpointCache});G0();c6();f6();nh();S6();_6();R6();N6();H6();W6();ts.events=new ts.SequentialExecutor;ts.util.memoizedProperty(ts,"endpointCache",function(){return new ts.EndpointCache(ts.config.endpointCacheSize)},!0)});var ry=U((TW,K6)=>{var lP=require("crypto");K6.exports=function(){return lP.randomBytes(16)}});var iy=U((NW,$6)=>{var V6=[];for(bc=0;bc<256;++bc)V6[bc]=(bc+256).toString(16).substr(1);var bc;function cP(t,e){var r=e||0,i=V6;return[i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],"-",i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]],i[t[r++]]].join("")}$6.exports=cP});var Y6=U((AW,J6)=>{var fP=ry(),hP=iy(),X6,ny,sy=0,oy=0;function dP(t,e,r){var i=e&&r||0,n=e||[];t=t||{};var s=t.node||X6,o=t.clockseq!==void 0?t.clockseq:ny;if(s==null||o==null){var u=fP();s==null&&(s=X6=[u[0]|1,u[1],u[2],u[3],u[4],u[5]]),o==null&&(o=ny=(u[6]<<8|u[7])&16383)}var l=t.msecs!==void 0?t.msecs:new Date().getTime(),d=t.nsecs!==void 0?t.nsecs:oy+1,h=l-sy+(d-oy)/1e4;if(h<0&&t.clockseq===void 0&&(o=o+1&16383),(h<0||l>sy)&&t.nsecs===void 0&&(d=0),d>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");sy=l,oy=d,ny=o,l+=122192928e5;var m=((l&268435455)*1e4+d)%4294967296;n[i++]=m>>>24&255,n[i++]=m>>>16&255,n[i++]=m>>>8&255,n[i++]=m&255;var b=l/4294967296*1e4&268435455;n[i++]=b>>>8&255,n[i++]=b&255,n[i++]=b>>>24&15|16,n[i++]=b>>>16&255,n[i++]=o>>>8|128,n[i++]=o&255;for(var S=0;S<6;++S)n[i+S]=s[S];return e||hP(n)}J6.exports=dP});var Q6=U((MW,Z6)=>{var pP=ry(),mP=iy();function yP(t,e,r){var i=e&&r||0;typeof t=="string"&&(e=t==="binary"?new Array(16):null,t=null),t=t||{};var n=t.random||(t.rng||pP)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e)for(var s=0;s<16;++s)e[i+s]=n[s];return e||mP(n)}Z6.exports=yP});var r4=U((kW,t4)=>{var gP=Y6(),e4=Q6(),ay=e4;ay.v1=gP;ay.v4=e4;t4.exports=ay});var Yt=U((IW,i4)=>{var Li,ce={environment:"nodejs",engine:function(){if(ce.isBrowser()&&typeof navigator<"u")return navigator.userAgent;var e=process.platform+"/"+process.version;return process.env.AWS_EXECUTION_ENV&&(e+=" exec-env/"+process.env.AWS_EXECUTION_ENV),e},userAgent:function(){var e=ce.environment,r="aws-sdk-"+e+"/"+me().VERSION;return e==="nodejs"&&(r+=" "+ce.engine()),r},uriEscape:function(e){var r=encodeURIComponent(e);return r=r.replace(/[^A-Za-z0-9_.~\-%]+/g,escape),r=r.replace(/[*]/g,function(i){return"%"+i.charCodeAt(0).toString(16).toUpperCase()}),r},uriEscapePath:function(e){var r=[];return ce.arrayEach(e.split("/"),function(i){r.push(ce.uriEscape(i))}),r.join("/")},urlParse:function(e){return ce.url.parse(e)},urlFormat:function(e){return ce.url.format(e)},queryStringParse:function(e){return ce.querystring.parse(e)},queryParamsToString:function(e){var r=[],i=ce.uriEscape,n=Object.keys(e).sort();return ce.arrayEach(n,function(s){var o=e[s],u=i(s),l=u+"=";if(Array.isArray(o)){var d=[];ce.arrayEach(o,function(h){d.push(i(h))}),l=u+"="+d.sort().join("&"+u+"=")}else o!=null&&(l=u+"="+i(o));r.push(l)}),r.join("&")},readFileSync:function(e){return ce.isBrowser()?null:require("fs").readFileSync(e,"utf-8")},base64:{encode:function(e){if(typeof e=="number")throw ce.error(new Error("Cannot base64 encode number "+e));if(e===null||typeof e>"u")return e;var r=ce.buffer.toBuffer(e);return r.toString("base64")},decode:function(e){if(typeof e=="number")throw ce.error(new Error("Cannot base64 decode number "+e));return e===null||typeof e>"u"?e:ce.buffer.toBuffer(e,"base64")}},buffer:{toBuffer:function(t,e){return typeof ce.Buffer.from=="function"&&ce.Buffer.from!==Uint8Array.from?ce.Buffer.from(t,e):new ce.Buffer(t,e)},alloc:function(t,e,r){if(typeof t!="number")throw new Error("size passed to alloc must be a number.");if(typeof ce.Buffer.alloc=="function")return ce.Buffer.alloc(t,e,r);var i=new ce.Buffer(t);return e!==void 0&&typeof i.fill=="function"&&i.fill(e,void 0,void 0,r),i},toStream:function(e){ce.Buffer.isBuffer(e)||(e=ce.buffer.toBuffer(e));var r=new ce.stream.Readable,i=0;return r._read=function(n){if(i>=e.length)return r.push(null);var s=i+n;s>e.length&&(s=e.length),r.push(e.slice(i,s)),i=s},r},concat:function(t){var e=0,r=0,i=null,n;for(n=0;n<t.length;n++)e+=t[n].length;for(i=ce.buffer.alloc(e),n=0;n<t.length;n++)t[n].copy(i,r),r+=t[n].length;return i}},string:{byteLength:function(e){if(e==null)return 0;if(typeof e=="string"&&(e=ce.buffer.toBuffer(e)),typeof e.byteLength=="number")return e.byteLength;if(typeof e.length=="number")return e.length;if(typeof e.size=="number")return e.size;if(typeof e.path=="string")return require("fs").lstatSync(e.path).size;throw ce.error(new Error("Cannot determine length of "+e),{object:e})},upperFirst:function(e){return e[0].toUpperCase()+e.substr(1)},lowerFirst:function(e){return e[0].toLowerCase()+e.substr(1)}},ini:{parse:function(e){var r,i={};return ce.arrayEach(e.split(/\r?\n/),function(n){n=n.split(/(^|\s)[;#]/)[0];var s=n.match(/^\s*\[([^\[\]]+)\]\s*$/);if(s){if(r=s[1],r==="__proto__"||r.split(/\s/)[1]==="__proto__")throw ce.error(new Error("Cannot load profile name '"+r+"' from shared ini file."))}else if(r){var o=n.match(/^\s*(.+?)\s*=\s*(.+?)\s*$/);o&&(i[r]=i[r]||{},i[r][o[1]]=o[2])}}),i}},fn:{noop:function(){},callback:function(t){if(t)throw t},makeAsync:function(e,r){return r&&r<=e.length?e:function(){var i=Array.prototype.slice.call(arguments,0),n=i.pop(),s=e.apply(null,i);n(s)}}},date:{getDate:function(){return Li||(Li=me()),Li.config.systemClockOffset?new Date(new Date().getTime()+Li.config.systemClockOffset):new Date},iso8601:function(e){return e===void 0&&(e=ce.date.getDate()),e.toISOString().replace(/\.\d{3}Z$/,"Z")},rfc822:function(e){return e===void 0&&(e=ce.date.getDate()),e.toUTCString()},unixTimestamp:function(e){return e===void 0&&(e=ce.date.getDate()),e.getTime()/1e3},from:function(e){return typeof e=="number"?new Date(e*1e3):new Date(e)},format:function(e,r){return r||(r="iso8601"),ce.date[r](ce.date.from(e))},parseTimestamp:function(e){if(typeof e=="number")return new Date(e*1e3);if(e.match(/^\d+$/))return new Date(e*1e3);if(e.match(/^\d{4}/))return new Date(e);if(e.match(/^\w{3},/))return new Date(e);throw ce.error(new Error("unhandled timestamp format: "+e),{code:"TimestampParserError"})}},crypto:{crc32Table:[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],crc32:function(e){var r=ce.crypto.crc32Table,i=-1;typeof e=="string"&&(e=ce.buffer.toBuffer(e));for(var n=0;n<e.length;n++){var s=e.readUInt8(n);i=i>>>8^r[(i^s)&255]}return(i^-1)>>>0},hmac:function(e,r,i,n){return i||(i="binary"),i==="buffer"&&(i=void 0),n||(n="sha256"),typeof r=="string"&&(r=ce.buffer.toBuffer(r)),ce.crypto.lib.createHmac(n,e).update(r).digest(i)},md5:function(e,r,i){return ce.crypto.hash("md5",e,r,i)},sha256:function(e,r,i){return ce.crypto.hash("sha256",e,r,i)},hash:function(t,e,r,i){var n=ce.crypto.createHash(t);r||(r="binary"),r==="buffer"&&(r=void 0),typeof e=="string"&&(e=ce.buffer.toBuffer(e));var s=ce.arraySliceFn(e),o=ce.Buffer.isBuffer(e);if(ce.isBrowser()&&typeof ArrayBuffer<"u"&&e&&e.buffer instanceof ArrayBuffer&&(o=!0),i&&typeof e=="object"&&typeof e.on=="function"&&!o)e.on("data",function(m){n.update(m)}),e.on("error",function(m){i(m)}),e.on("end",function(){i(null,n.digest(r))});else if(i&&s&&!o&&typeof FileReader<"u"){var u=0,l=1024*512,d=new FileReader;d.onerror=function(){i(new Error("Failed to read data."))},d.onload=function(){var m=new ce.Buffer(new Uint8Array(d.result));n.update(m),u+=m.length,d._continueReading()},d._continueReading=function(){if(u>=e.size){i(null,n.digest(r));return}var m=u+l;m>e.size&&(m=e.size),d.readAsArrayBuffer(s.call(e,u,m))},d._continueReading()}else{ce.isBrowser()&&typeof e=="object"&&!o&&(e=new ce.Buffer(new Uint8Array(e)));var h=n.update(e).digest(r);return i&&i(null,h),h}},toHex:function(e){for(var r=[],i=0;i<e.length;i++)r.push(("0"+e.charCodeAt(i).toString(16)).substr(-2,2));return r.join("")},createHash:function(e){return ce.crypto.lib.createHash(e)}},abort:{},each:function(e,r){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=r.call(this,i,e[i]);if(n===ce.abort)break}},arrayEach:function(e,r){for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=r.call(this,e[i],parseInt(i,10));if(n===ce.abort)break}},update:function(e,r){return ce.each(r,function(n,s){e[n]=s}),e},merge:function(e,r){return ce.update(ce.copy(e),r)},copy:function(e){if(e==null)return e;var r={};for(var i in e)r[i]=e[i];return r},isEmpty:function(e){for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))return!1;return!0},arraySliceFn:function(e){var r=e.slice||e.webkitSlice||e.mozSlice;return typeof r=="function"?r:null},isType:function(e,r){return typeof r=="function"&&(r=ce.typeName(r)),Object.prototype.toString.call(e)==="[object "+r+"]"},typeName:function(e){if(Object.prototype.hasOwnProperty.call(e,"name"))return e.name;var r=e.toString(),i=r.match(/^\s*function (.+)\(/);return i?i[1]:r},error:function(e,r){var i=null;return typeof e.message=="string"&&e.message!==""&&(typeof r=="string"||r&&r.message)&&(i=ce.copy(e),i.message=e.message),e.message=e.message||null,typeof r=="string"?e.message=r:typeof r=="object"&&r!==null&&(ce.update(e,r),r.message&&(e.message=r.message),(r.code||r.name)&&(e.code=r.code||r.name),r.stack&&(e.stack=r.stack)),typeof Object.defineProperty=="function"&&(Object.defineProperty(e,"name",{writable:!0,enumerable:!1}),Object.defineProperty(e,"message",{enumerable:!0})),e.name=String(r&&r.name||e.name||e.code||"Error"),e.time=new Date,i&&(e.originalError=i),e},inherit:function(e,r){var i=null;if(r===void 0)r=e,e=Object,i={};else{var n=function(){};n.prototype=e.prototype,i=new n}return r.constructor===Object&&(r.constructor=function(){if(e!==Object)return e.apply(this,arguments)}),r.constructor.prototype=i,ce.update(r.constructor.prototype,r),r.constructor.__super__=e,r.constructor},mixin:function(){for(var e=arguments[0],r=1;r<arguments.length;r++)for(var i in arguments[r].prototype){var n=arguments[r].prototype[i];i!=="constructor"&&(e.prototype[i]=n)}return e},hideProperties:function(e,r){typeof Object.defineProperty=="function"&&ce.arrayEach(r,function(i){Object.defineProperty(e,i,{enumerable:!1,writable:!0,configurable:!0})})},property:function(e,r,i,n,s){var o={configurable:!0,enumerable:n!==void 0?n:!0};typeof i=="function"&&!s?o.get=i:(o.value=i,o.writable=!0),Object.defineProperty(e,r,o)},memoizedProperty:function(e,r,i,n){var s=null;ce.property(e,r,function(){return s===null&&(s=i()),s},n)},hoistPayloadMember:function(e){var r=e.request,i=r.operation,n=r.service.api.operations[i],s=n.output;if(s.payload&&!n.hasEventOutput){var o=s.members[s.payload],u=e.data[s.payload];o.type==="structure"&&ce.each(u,function(l,d){ce.property(e.data,l,d,!1)})}},computeSha256:function(e,r){if(ce.isNode()){var i=ce.stream.Stream,n=require("fs");if(typeof i=="function"&&e instanceof i)if(typeof e.path=="string"){var s={};typeof e.start=="number"&&(s.start=e.start),typeof e.end=="number"&&(s.end=e.end),e=n.createReadStream(e.path,s)}else return r(new Error("Non-file stream objects are not supported with SigV4"))}ce.crypto.sha256(e,"hex",function(o,u){o?r(o):r(null,u)})},isClockSkewed:function(e){if(e)return ce.property(Li.config,"isClockSkewed",Math.abs(new Date().getTime()-e)>=3e5,!1),Li.config.isClockSkewed},applyClockOffset:function(e){e&&(Li.config.systemClockOffset=e-new Date().getTime())},extractRequestId:function(e){var r=e.httpResponse.headers["x-amz-request-id"]||e.httpResponse.headers["x-amzn-requestid"];!r&&e.data&&e.data.ResponseMetadata&&(r=e.data.ResponseMetadata.RequestId),r&&(e.requestId=r),e.error&&(e.error.requestId=r)},addPromises:function(e,r){var i=!1;r===void 0&&Li&&Li.config&&(r=Li.config.getPromisesDependency()),r===void 0&&typeof Promise<"u"&&(r=Promise),typeof r!="function"&&(i=!0),Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++){var s=e[n];i?s.deletePromisesFromClass&&s.deletePromisesFromClass():s.addPromisesToClass&&s.addPromisesToClass(r)}},promisifyMethod:function(e,r){return function(){var n=this,s=Array.prototype.slice.call(arguments);return new r(function(o,u){s.push(function(l,d){l?u(l):o(d)}),n[e].apply(n,s)})}},isDualstackAvailable:function(e){if(!e)return!1;var r=U0();return typeof e!="string"&&(e=e.serviceIdentifier),typeof e!="string"||!r.hasOwnProperty(e)?!1:!!r[e].dualstackAvailable},calculateRetryDelay:function(e,r,i){r||(r={});var n=r.customBackoff||null;if(typeof n=="function")return n(e,i);var s=typeof r.base=="number"?r.base:100,o=Math.random()*(Math.pow(2,e)*s);return o},handleRequestWithRetries:function(e,r,i){r||(r={});var n=Li.HttpClient.getInstance(),s=r.httpOptions||{},o=0,u=function(d){var h=r.maxRetries||0;if(d&&d.code==="TimeoutError"&&(d.retryable=!0),d&&d.retryable&&o<h){var m=ce.calculateRetryDelay(o,r.retryDelayOptions,d);if(m>=0){o++,setTimeout(l,m+(d.retryAfter||0));return}}i(d)},l=function(){var d="";n.handleRequest(e,s,function(h){h.on("data",function(m){d+=m.toString()}),h.on("end",function(){var m=h.statusCode;if(m<300)i(null,d);else{var b=parseInt(h.headers["retry-after"],10)*1e3||0,S=ce.error(new Error,{statusCode:m,retryable:m>=500||m===429});b&&S.retryable&&(S.retryAfter=b),u(S)}})},u)};Li.util.defer(l)},uuid:{v4:function(){return r4().v4()}},convertPayloadToString:function(e){var r=e.request,i=r.operation,n=r.service.api.operations[i].output||{};n.payload&&e.data[n.payload]&&(e.data[n.payload]=e.data[n.payload].toString())},defer:function(e){typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick(e):typeof setImmediate=="function"?setImmediate(e):setTimeout(e,0)},getRequestPayloadShape:function(e){var r=e.service.api.operations;if(!!r){var i=(r||{})[e.operation];if(!(!i||!i.input||!i.input.payload))return i.input.members[i.input.payload]}},getProfilesFromSharedConfig:function(e,r){var i={},n={};if(process.env[ce.configOptInEnv])var n=e.loadFrom({isConfig:!0,filename:process.env[ce.sharedConfigFileEnv]});var s={};try{var s=e.loadFrom({filename:r||process.env[ce.configOptInEnv]&&process.env[ce.sharedCredentialsFileEnv]})}catch(d){if(!process.env[ce.configOptInEnv])throw d}for(var o=0,u=Object.keys(n);o<u.length;o++)i[u[o]]=l(i[u[o]]||{},n[u[o]]);for(var o=0,u=Object.keys(s);o<u.length;o++)i[u[o]]=l(i[u[o]]||{},s[u[o]]);return i;function l(d,h){for(var m=0,b=Object.keys(h);m<b.length;m++)d[b[m]]=h[b[m]];return d}},ARN:{validate:function(e){return e&&e.indexOf("arn:")===0&&e.split(":").length>=6},parse:function(e){var r=e.split(":");return{partition:r[1],service:r[2],region:r[3],accountId:r[4],resource:r.slice(5).join(":")}},build:function(e){if(e.service===void 0||e.region===void 0||e.accountId===void 0||e.resource===void 0)throw ce.error(new Error("Input ARN object is invalid"));return"arn:"+(e.partition||"aws")+":"+e.service+":"+e.region+":"+e.accountId+":"+e.resource}},defaultProfile:"default",configOptInEnv:"AWS_SDK_LOAD_CONFIG",sharedCredentialsFileEnv:"AWS_SHARED_CREDENTIALS_FILE",sharedConfigFileEnv:"AWS_CONFIG_FILE",imdsDisabledEnv:"AWS_EC2_METADATA_DISABLED"};i4.exports=ce});var a4=U((PW,o4)=>{var vP=me().util,n4=require("stream").Transform,s4=vP.buffer.alloc;function Sc(t){n4.call(this,t),this.currentMessageTotalLength=0,this.currentMessagePendingLength=0,this.currentMessage=null,this.messageLengthBuffer=null}Sc.prototype=Object.create(n4.prototype);Sc.prototype._transform=function(t,e,r){for(var i=t.length,n=0;n<i;){if(!this.currentMessage){var s=i-n;this.messageLengthBuffer||(this.messageLengthBuffer=s4(4));var o=Math.min(4-this.currentMessagePendingLength,s);if(t.copy(this.messageLengthBuffer,this.currentMessagePendingLength,n,n+o),this.currentMessagePendingLength+=o,n+=o,this.currentMessagePendingLength<4)break;this.allocateMessage(this.messageLengthBuffer.readUInt32BE(0)),this.messageLengthBuffer=null}var u=Math.min(this.currentMessageTotalLength-this.currentMessagePendingLength,i-n);t.copy(this.currentMessage,this.currentMessagePendingLength,n,n+u),this.currentMessagePendingLength+=u,n+=u,this.currentMessageTotalLength&&this.currentMessageTotalLength===this.currentMessagePendingLength&&(this.push(this.currentMessage),this.currentMessage=null,this.currentMessageTotalLength=0,this.currentMessagePendingLength=0)}r()};Sc.prototype._flush=function(t){this.currentMessageTotalLength?this.currentMessageTotalLength===this.currentMessagePendingLength?t(null,this.currentMessage):t(new Error("Truncated event message received.")):t()};Sc.prototype.allocateMessage=function(t){if(typeof t!="number")throw new Error("Attempted to allocate an event message where size was not a number: "+t);this.currentMessageTotalLength=t,this.currentMessagePendingLength=4,this.currentMessage=s4(t),this.currentMessage.writeUInt32BE(t,0)};o4.exports={EventMessageChunkerStream:Sc}});var f4=U((LW,c4)=>{var u4=me().util,bP=u4.buffer.toBuffer;function xc(t){if(t.length!==8)throw new Error("Int64 buffers must be exactly 8 bytes");u4.Buffer.isBuffer(t)||(t=bP(t)),this.bytes=t}xc.fromNumber=function(t){if(t>9223372036854776e3||t<-9223372036854776e3)throw new Error(t+" is too large (or, if negative, too small) to represent as an Int64");for(var e=new Uint8Array(8),r=7,i=Math.abs(Math.round(t));r>-1&&i>0;r--,i/=256)e[r]=i;return t<0&&l4(e),new xc(e)};xc.prototype.valueOf=function(){var t=this.bytes.slice(0),e=t[0]&128;return e&&l4(t),parseInt(t.toString("hex"),16)*(e?-1:1)};xc.prototype.toString=function(){return String(this.valueOf())};function l4(t){for(var e=0;e<8;e++)t[e]^=255;for(var e=7;e>-1&&(t[e]++,t[e]===0);e--);}c4.exports={Int64:xc}});var p4=U((OW,d4)=>{var dh=me().util,SP=dh.buffer.toBuffer,h4=4,ph=h4*2,wc=4,xP=ph+wc*2;function wP(t){if(dh.Buffer.isBuffer(t)||(t=SP(t)),t.length<xP)throw new Error("Provided message too short to accommodate event stream message overhead");if(t.length!==t.readUInt32BE(0))throw new Error("Reported message length does not match received message length");var e=t.readUInt32BE(ph);if(e!==dh.crypto.crc32(t.slice(0,ph)))throw new Error("The prelude checksum specified in the message ("+e+") does not match the calculated CRC32 checksum.");var r=t.readUInt32BE(t.length-wc);if(r!==dh.crypto.crc32(t.slice(0,t.length-wc)))throw new Error("The message checksum did not match the expected value of "+r);var i=ph+wc,n=i+t.readUInt32BE(h4);return{headers:t.slice(i,n),body:t.slice(n,t.length-wc)}}d4.exports={splitMessage:wP}});var v4=U((BW,g4)=>{var m4=f4().Int64,EP=p4().splitMessage,y4="boolean",_P="byte",CP="short",RP="integer",TP="long",NP="binary",AP="string",MP="timestamp",kP="uuid";function IP(t){for(var e={},r=0;r<t.length;){var i=t.readUInt8(r++),n=t.slice(r,r+i).toString();switch(r+=i,t.readUInt8(r++)){case 0:e[n]={type:y4,value:!0};break;case 1:e[n]={type:y4,value:!1};break;case 2:e[n]={type:_P,value:t.readInt8(r++)};break;case 3:e[n]={type:CP,value:t.readInt16BE(r)},r+=2;break;case 4:e[n]={type:RP,value:t.readInt32BE(r)},r+=4;break;case 5:e[n]={type:TP,value:new m4(t.slice(r,r+8))},r+=8;break;case 6:var s=t.readUInt16BE(r);r+=2,e[n]={type:NP,value:t.slice(r,r+s)},r+=s;break;case 7:var o=t.readUInt16BE(r);r+=2,e[n]={type:AP,value:t.slice(r,r+o).toString()},r+=o;break;case 8:e[n]={type:MP,value:new Date(new m4(t.slice(r,r+8)).valueOf())},r+=8;break;case 9:var u=t.slice(r,r+16).toString("hex");r+=16,e[n]={type:kP,value:u.substr(0,8)+"-"+u.substr(8,4)+"-"+u.substr(12,4)+"-"+u.substr(16,4)+"-"+u.substr(20)};break;default:throw new Error("Unrecognized header type tag")}}return e}function PP(t){var e=EP(t);return{headers:IP(e.headers),body:e.body}}g4.exports={parseMessage:PP}});var uy=U((DW,b4)=>{var LP=v4().parseMessage;function OP(t,e,r){var i=LP(e),n=i.headers[":message-type"];if(n){if(n.value==="error")throw BP(i);if(n.value!=="event")return}var s=i.headers[":event-type"],o=r.members[s.value];if(!!o){var u={},l=o.eventPayloadMemberName;if(l){var d=o.members[l];d.type==="binary"?u[l]=i.body:u[l]=t.parse(i.body.toString(),d)}for(var h=o.eventHeaderMemberNames,m=0;m<h.length;m++){var b=h[m];i.headers[b]&&(u[b]=o.members[b].toType(i.headers[b].value))}var S={};return S[s.value]=u,S}}function BP(t){var e=t.headers[":error-code"],r=t.headers[":error-message"],i=new Error(r.value||r);return i.code=i.name=e.value||e,i}b4.exports={parseEvent:OP}});var w4=U((qW,x4)=>{var S4=require("stream").Transform,DP=uy().parseEvent;function ly(t){t=t||{},t.readableObjectMode=!0,S4.call(this,t),this._readableState.objectMode=!0,this.parser=t.parser,this.eventStreamModel=t.eventStreamModel}ly.prototype=Object.create(S4.prototype);ly.prototype._transform=function(t,e,r){try{var i=DP(this.parser,t,this.eventStreamModel);return this.push(i),r()}catch(n){r(n)}};x4.exports={EventUnmarshallerStream:ly}});var _4=U((zW,E4)=>{var qP=a4().EventMessageChunkerStream,zP=w4().EventUnmarshallerStream;function FP(t,e,r){var i=new zP({parser:e,eventStreamModel:r}),n=new qP;return t.pipe(n).pipe(i),t.on("error",function(s){n.emit("error",s)}),n.on("error",function(s){i.emit("error",s)}),i}E4.exports={createEventStream:FP}});var R4=U((FW,C4)=>{function UP(t){for(var e=[],r=0;r<t.length;){var i=t.readInt32BE(r),n=t.slice(r,i+r);r+=i,e.push(n)}return e}C4.exports={eventMessageChunker:UP}});var N4=U((UW,T4)=>{var jP=R4().eventMessageChunker,HP=uy().parseEvent;function WP(t,e,r){for(var i=jP(t),n=[],s=0;s<i.length;s++)n.push(HP(e,i[s],r));return n}T4.exports={createEventStream:WP}});var M4=U((jW,A4)=>{A4.exports={now:function(){var e=process.hrtime();return e[0]*1e3+e[1]/1e6}}});var I4=U((HW,k4)=>{var GP=me().util,KP=require("dgram"),VP=GP.buffer.toBuffer,$P=1024*8;function na(t){t=t||{},this.enabled=t.enabled||!1,this.port=t.port||31e3,this.clientId=t.clientId||"",this.address=t.host||"127.0.0.1",this.clientId.length>255&&(this.clientId=this.clientId.substr(0,255)),this.messagesInFlight=0}na.prototype.fieldsToTrim={UserAgent:256,SdkException:128,SdkExceptionMessage:512,AwsException:128,AwsExceptionMessage:512,FinalSdkException:128,FinalSdkExceptionMessage:512,FinalAwsException:128,FinalAwsExceptionMessage:512};na.prototype.trimFields=function(t){for(var e=Object.keys(this.fieldsToTrim),r=0,i=e.length;r<i;r++){var n=e[r];if(t.hasOwnProperty(n)){var s=this.fieldsToTrim[n],o=t[n];o&&o.length>s&&(t[n]=o.substr(0,s))}}return t};na.prototype.eventHandler=function(t){t.ClientId=this.clientId,this.trimFields(t);var e=VP(JSON.stringify(t));!this.enabled||e.length>$P||this.publishDatagram(e)};na.prototype.publishDatagram=function(t){var e=this,r=this.getClient();this.messagesInFlight++,this.client.send(t,0,t.length,this.port,this.address,function(i,n){--e.messagesInFlight<=0&&e.destroyClient()})};na.prototype.getClient=function(){return this.client||(this.client=KP.createSocket("udp4")),this.client};na.prototype.destroyClient=function(){this.client&&(this.client.close(),this.client=void 0)};k4.exports={Publisher:na}});var O4=U((WW,L4)=>{var cy=me();function XP(){var t={port:void 0,clientId:void 0,enabled:void 0,host:void 0};return JP(t)||YP(t),P4(t)}function JP(t){return t.port=t.port||process.env.AWS_CSM_PORT,t.enabled=t.enabled||process.env.AWS_CSM_ENABLED,t.clientId=t.clientId||process.env.AWS_CSM_CLIENT_ID,t.host=t.host||process.env.AWS_CSM_HOST,t.port&&t.enabled&&t.clientId&&t.host||["false","0"].indexOf(t.enabled)>=0}function YP(t){var e;try{var r=cy.util.iniLoader.loadFrom({isConfig:!0,filename:process.env[cy.util.sharedConfigFileEnv]}),e=r[process.env.AWS_PROFILE||cy.util.defaultProfile]}catch{return!1}return e?(t.port=t.port||e.csm_port,t.enabled=t.enabled||e.csm_enabled,t.clientId=t.clientId||e.csm_client_id,t.host=t.host||e.csm_host,t.port&&t.enabled&&t.clientId&&t.host):t}function P4(t){var e=["false","0",void 0];return!t.enabled||e.indexOf(t.enabled.toLowerCase())>=0?t.enabled=!1:t.enabled=!0,t.port=t.port?parseInt(t.port,10):void 0,t}L4.exports=XP});var fy=U((GW,q4)=>{var Cu=me(),B4=require("os"),ZP=require("path");function D4(t,e){var r=Cu.util.ini.parse(Cu.util.readFileSync(t)),i={};return Object.keys(r).forEach(function(n){var s=r[n];n=e?n.replace(/^profile\s/,""):n,Object.defineProperty(i,n,{value:s,enumerable:!0})}),i}Cu.IniLoader=Cu.util.inherit({constructor:function(){this.resolvedProfiles={}},clearCachedFiles:function(){this.resolvedProfiles={}},loadFrom:function(e){e=e||{};var r=e.isConfig===!0,i=e.filename||this.getDefaultFilePath(r);if(!this.resolvedProfiles[i]){var n=this.parseFile(i,r);Object.defineProperty(this.resolvedProfiles,i,{value:n})}return this.resolvedProfiles[i]},parseFile:D4,getDefaultFilePath:function(e){return ZP.join(this.getHomeDir(),".aws",e?"config":"credentials")},getHomeDir:function(){var e=process.env,r=e.HOME||e.USERPROFILE||(e.HOMEPATH?(e.HOMEDRIVE||"C:/")+e.HOMEPATH:null);if(r)return r;if(typeof B4.homedir=="function")return B4.homedir();throw Cu.util.error(new Error("Cannot load credentials, HOME path not set"))}});var QP=Cu.IniLoader;q4.exports={IniLoader:QP,parseFile:D4}});var F4=U((KW,z4)=>{var eL=fy().IniLoader;z4.exports.iniLoader=new eL});var dy=U((VW,U4)=>{var Ec=me();function hy(t,e){if(typeof t=="string"){if(["legacy","regional"].indexOf(t.toLowerCase())>=0)return t.toLowerCase();throw Ec.util.error(new Error,e)}}function tL(t,e){t=t||{};var r;if(t[e.clientConfig]&&(r=hy(t[e.clientConfig],{code:"InvalidConfiguration",message:'invalid "'+e.clientConfig+'" configuration. Expect "legacy" or "regional". Got "'+t[e.clientConfig]+'".'}),r)||!Ec.util.isNode())return r;if(Object.prototype.hasOwnProperty.call(process.env,e.env)){var i=process.env[e.env];if(r=hy(i,{code:"InvalidEnvironmentalVariable",message:"invalid "+e.env+' environmental variable. Expect "legacy" or "regional". Got "'+process.env[e.env]+'".'}),r)return r}var n={};try{var s=Ec.util.getProfilesFromSharedConfig(Ec.util.iniLoader);n=s[process.env.AWS_PROFILE||Ec.util.defaultProfile]}catch{}if(n&&Object.prototype.hasOwnProperty.call(n,e.sharedConfig)){var o=n[e.sharedConfig];if(r=hy(o,{code:"InvalidConfiguration",message:"invalid "+e.sharedConfig+' profile config. Expect "legacy" or "regional". Got "'+n[e.sharedConfig]+'".'}),r)return r}return r}U4.exports=tL});var j4=U(()=>{var mh=me(),rL=dy(),iL="AWS_STS_REGIONAL_ENDPOINTS",nL="sts_regional_endpoints";mh.util.update(mh.STS.prototype,{credentialsFrom:function(e,r){return e?(r||(r=new mh.TemporaryCredentials),r.expired=!1,r.accessKeyId=e.Credentials.AccessKeyId,r.secretAccessKey=e.Credentials.SecretAccessKey,r.sessionToken=e.Credentials.SessionToken,r.expireTime=e.Credentials.Expiration,r):null},assumeRoleWithWebIdentity:function(e,r){return this.makeUnauthenticatedRequest("assumeRoleWithWebIdentity",e,r)},assumeRoleWithSAML:function(e,r){return this.makeUnauthenticatedRequest("assumeRoleWithSAML",e,r)},setupRequestListeners:function(e){e.addListener("validate",this.optInRegionalEndpoint,!0)},optInRegionalEndpoint:function(e){var r=e.service,i=r.config;if(i.stsRegionalEndpoints=rL(r._originalConfig,{env:iL,sharedConfig:nL,clientConfig:"stsRegionalEndpoints"}),i.stsRegionalEndpoints==="regional"&&r.isGlobalEndpoint){if(!i.region)throw mh.util.error(new Error,{code:"ConfigError",message:"Missing region in config"});var n=i.endpoint.indexOf(".amazonaws.com"),s=i.endpoint.substring(0,n)+"."+i.region+i.endpoint.substring(n);e.httpRequest.updateEndpoint(s),e.httpRequest.region=i.region}}})});var H4=U((JW,sL)=>{sL.exports={version:"2.0",metadata:{apiVersion:"2011-06-15",endpointPrefix:"sts",globalEndpoint:"sts.amazonaws.com",protocol:"query",serviceAbbreviation:"AWS STS",serviceFullName:"AWS Security Token Service",serviceId:"STS",signatureVersion:"v4",uid:"sts-2011-06-15",xmlNamespace:"https://sts.amazonaws.com/doc/2011-06-15/"},operations:{AssumeRole:{input:{type:"structure",required:["RoleArn","RoleSessionName"],members:{RoleArn:{},RoleSessionName:{},PolicyArns:{shape:"S4"},Policy:{},DurationSeconds:{type:"integer"},Tags:{shape:"S8"},TransitiveTagKeys:{type:"list",member:{}},ExternalId:{},SerialNumber:{},TokenCode:{},SourceIdentity:{}}},output:{resultWrapper:"AssumeRoleResult",type:"structure",members:{Credentials:{shape:"Si"},AssumedRoleUser:{shape:"Sn"},PackedPolicySize:{type:"integer"},SourceIdentity:{}}}},AssumeRoleWithSAML:{input:{type:"structure",required:["RoleArn","PrincipalArn","SAMLAssertion"],members:{RoleArn:{},PrincipalArn:{},SAMLAssertion:{},PolicyArns:{shape:"S4"},Policy:{},DurationSeconds:{type:"integer"}}},output:{resultWrapper:"AssumeRoleWithSAMLResult",type:"structure",members:{Credentials:{shape:"Si"},AssumedRoleUser:{shape:"Sn"},PackedPolicySize:{type:"integer"},Subject:{},SubjectType:{},Issuer:{},Audience:{},NameQualifier:{},SourceIdentity:{}}}},AssumeRoleWithWebIdentity:{input:{type:"structure",required:["RoleArn","RoleSessionName","WebIdentityToken"],members:{RoleArn:{},RoleSessionName:{},WebIdentityToken:{},ProviderId:{},PolicyArns:{shape:"S4"},Policy:{},DurationSeconds:{type:"integer"}}},output:{resultWrapper:"AssumeRoleWithWebIdentityResult",type:"structure",members:{Credentials:{shape:"Si"},SubjectFromWebIdentityToken:{},AssumedRoleUser:{shape:"Sn"},PackedPolicySize:{type:"integer"},Provider:{},Audience:{},SourceIdentity:{}}}},DecodeAuthorizationMessage:{input:{type:"structure",required:["EncodedMessage"],members:{EncodedMessage:{}}},output:{resultWrapper:"DecodeAuthorizationMessageResult",type:"structure",members:{DecodedMessage:{}}}},GetAccessKeyInfo:{input:{type:"structure",required:["AccessKeyId"],members:{AccessKeyId:{}}},output:{resultWrapper:"GetAccessKeyInfoResult",type:"structure",members:{Account:{}}}},GetCallerIdentity:{input:{type:"structure",members:{}},output:{resultWrapper:"GetCallerIdentityResult",type:"structure",members:{UserId:{},Account:{},Arn:{}}}},GetFederationToken:{input:{type:"structure",required:["Name"],members:{Name:{},Policy:{},PolicyArns:{shape:"S4"},DurationSeconds:{type:"integer"},Tags:{shape:"S8"}}},output:{resultWrapper:"GetFederationTokenResult",type:"structure",members:{Credentials:{shape:"Si"},FederatedUser:{type:"structure",required:["FederatedUserId","Arn"],members:{FederatedUserId:{},Arn:{}}},PackedPolicySize:{type:"integer"}}}},GetSessionToken:{input:{type:"structure",members:{DurationSeconds:{type:"integer"},SerialNumber:{},TokenCode:{}}},output:{resultWrapper:"GetSessionTokenResult",type:"structure",members:{Credentials:{shape:"Si"}}}}},shapes:{S4:{type:"list",member:{type:"structure",members:{arn:{}}}},S8:{type:"list",member:{type:"structure",required:["Key","Value"],members:{Key:{},Value:{}}}},Si:{type:"structure",required:["AccessKeyId","SecretAccessKey","SessionToken","Expiration"],members:{AccessKeyId:{},SecretAccessKey:{},SessionToken:{},Expiration:{type:"timestamp"}}},Sn:{type:"structure",required:["AssumedRoleId","Arn"],members:{AssumedRoleId:{},Arn:{}}}}}});var W4=U((YW,oL)=>{oL.exports={pagination:{}}});var Js=U((ZW,K4)=>{_c();var yh=me(),aL=yh.Service,G4=yh.apiLoader;G4.services.sts={};yh.STS=aL.defineService("sts",["2011-06-15"]);j4();Object.defineProperty(G4.services.sts,"2011-06-15",{get:function(){var e=H4();return e.paginators=W4().pagination,e},enumerable:!0,configurable:!0});K4.exports=yh.STS});var V4=U(()=>{var sa=me(),uL=Js();sa.TemporaryCredentials=sa.util.inherit(sa.Credentials,{constructor:function(e,r){sa.Credentials.call(this),this.loadMasterCredentials(r),this.expired=!0,this.params=e||{},this.params.RoleArn&&(this.params.RoleSessionName=this.params.RoleSessionName||"temporary-credentials")},refresh:function(e){this.coalesceRefresh(e||sa.util.fn.callback)},load:function(e){var r=this;r.createClients(),r.masterCredentials.get(function(){r.service.config.credentials=r.masterCredentials;var i=r.params.RoleArn?r.service.assumeRole:r.service.getSessionToken;i.call(r.service,function(n,s){n||r.service.credentialsFrom(s,r),e(n)})})},loadMasterCredentials:function(e){for(this.masterCredentials=e||sa.config.credentials;this.masterCredentials.masterCredentials;)this.masterCredentials=this.masterCredentials.masterCredentials;typeof this.masterCredentials.get!="function"&&(this.masterCredentials=new sa.Credentials(this.masterCredentials))},createClients:function(){this.service=this.service||new uL({params:this.params})}})});var $4=U(()=>{var Nn=me(),lL=Js();Nn.ChainableTemporaryCredentials=Nn.util.inherit(Nn.Credentials,{constructor:function(e){Nn.Credentials.call(this),e=e||{},this.errorCode="ChainableTemporaryCredentialsProviderFailure",this.expired=!0,this.tokenCodeFn=null;var r=Nn.util.copy(e.params)||{};if(r.RoleArn&&(r.RoleSessionName=r.RoleSessionName||"temporary-credentials"),r.SerialNumber){if(!e.tokenCodeFn||typeof e.tokenCodeFn!="function")throw new Nn.util.error(new Error("tokenCodeFn must be a function when params.SerialNumber is given"),{code:this.errorCode});this.tokenCodeFn=e.tokenCodeFn}var i=Nn.util.merge({params:r,credentials:e.masterCredentials||Nn.config.credentials},e.stsConfig||{});this.service=new lL(i)},refresh:function(e){this.coalesceRefresh(e||Nn.util.fn.callback)},load:function(e){var r=this,i=r.service.config.params.RoleArn?"assumeRole":"getSessionToken";this.getTokenCode(function(n,s){var o={};if(n){e(n);return}s&&(o.TokenCode=s),r.service[i](o,function(u,l){u||r.service.credentialsFrom(l,r),e(u)})})},getTokenCode:function(e){var r=this;this.tokenCodeFn?this.tokenCodeFn(this.service.config.params.SerialNumber,function(i,n){if(i){var s=i;i instanceof Error&&(s=i.message),e(Nn.util.error(new Error("Error fetching MFA token: "+s),{code:r.errorCode}));return}e(null,n)}):e(null)}})});var X4=U(()=>{var oa=me(),cL=Js();oa.WebIdentityCredentials=oa.util.inherit(oa.Credentials,{constructor:function(e,r){oa.Credentials.call(this),this.expired=!0,this.params=e,this.params.RoleSessionName=this.params.RoleSessionName||"web-identity",this.data=null,this._clientConfig=oa.util.copy(r||{})},refresh:function(e){this.coalesceRefresh(e||oa.util.fn.callback)},load:function(e){var r=this;r.createClients(),r.service.assumeRoleWithWebIdentity(function(i,n){r.data=null,i||(r.data=n,r.service.credentialsFrom(n,r)),e(i)})},createClients:function(){if(!this.service){var t=oa.util.merge({},this._clientConfig);t.params=this.params,this.service=new cL(t)}}})});var J4=U((sG,fL)=>{fL.exports={version:"2.0",metadata:{apiVersion:"2014-06-30",endpointPrefix:"cognito-identity",jsonVersion:"1.1",protocol:"json",serviceFullName:"Amazon Cognito Identity",serviceId:"Cognito Identity",signatureVersion:"v4",targetPrefix:"AWSCognitoIdentityService",uid:"cognito-identity-2014-06-30"},operations:{CreateIdentityPool:{input:{type:"structure",required:["IdentityPoolName","AllowUnauthenticatedIdentities"],members:{IdentityPoolName:{},AllowUnauthenticatedIdentities:{type:"boolean"},AllowClassicFlow:{type:"boolean"},SupportedLoginProviders:{shape:"S5"},DeveloperProviderName:{},OpenIdConnectProviderARNs:{shape:"S9"},CognitoIdentityProviders:{shape:"Sb"},SamlProviderARNs:{shape:"Sg"},IdentityPoolTags:{shape:"Sh"}}},output:{shape:"Sk"}},DeleteIdentities:{input:{type:"structure",required:["IdentityIdsToDelete"],members:{IdentityIdsToDelete:{type:"list",member:{}}}},output:{type:"structure",members:{UnprocessedIdentityIds:{type:"list",member:{type:"structure",members:{IdentityId:{},ErrorCode:{}}}}}}},DeleteIdentityPool:{input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{}}}},DescribeIdentity:{input:{type:"structure",required:["IdentityId"],members:{IdentityId:{}}},output:{shape:"Sv"}},DescribeIdentityPool:{input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{}}},output:{shape:"Sk"}},GetCredentialsForIdentity:{input:{type:"structure",required:["IdentityId"],members:{IdentityId:{},Logins:{shape:"S10"},CustomRoleArn:{}}},output:{type:"structure",members:{IdentityId:{},Credentials:{type:"structure",members:{AccessKeyId:{},SecretKey:{},SessionToken:{},Expiration:{type:"timestamp"}}}}},authtype:"none"},GetId:{input:{type:"structure",required:["IdentityPoolId"],members:{AccountId:{},IdentityPoolId:{},Logins:{shape:"S10"}}},output:{type:"structure",members:{IdentityId:{}}},authtype:"none"},GetIdentityPoolRoles:{input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{}}},output:{type:"structure",members:{IdentityPoolId:{},Roles:{shape:"S1c"},RoleMappings:{shape:"S1e"}}}},GetOpenIdToken:{input:{type:"structure",required:["IdentityId"],members:{IdentityId:{},Logins:{shape:"S10"}}},output:{type:"structure",members:{IdentityId:{},Token:{}}},authtype:"none"},GetOpenIdTokenForDeveloperIdentity:{input:{type:"structure",required:["IdentityPoolId","Logins"],members:{IdentityPoolId:{},IdentityId:{},Logins:{shape:"S10"},PrincipalTags:{shape:"S1s"},TokenDuration:{type:"long"}}},output:{type:"structure",members:{IdentityId:{},Token:{}}}},GetPrincipalTagAttributeMap:{input:{type:"structure",required:["IdentityPoolId","IdentityProviderName"],members:{IdentityPoolId:{},IdentityProviderName:{}}},output:{type:"structure",members:{IdentityPoolId:{},IdentityProviderName:{},UseDefaults:{type:"boolean"},PrincipalTags:{shape:"S1s"}}}},ListIdentities:{input:{type:"structure",required:["IdentityPoolId","MaxResults"],members:{IdentityPoolId:{},MaxResults:{type:"integer"},NextToken:{},HideDisabled:{type:"boolean"}}},output:{type:"structure",members:{IdentityPoolId:{},Identities:{type:"list",member:{shape:"Sv"}},NextToken:{}}}},ListIdentityPools:{input:{type:"structure",required:["MaxResults"],members:{MaxResults:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{IdentityPools:{type:"list",member:{type:"structure",members:{IdentityPoolId:{},IdentityPoolName:{}}}},NextToken:{}}}},ListTagsForResource:{input:{type:"structure",required:["ResourceArn"],members:{ResourceArn:{}}},output:{type:"structure",members:{Tags:{shape:"Sh"}}}},LookupDeveloperIdentity:{input:{type:"structure",required:["IdentityPoolId"],members:{IdentityPoolId:{},IdentityId:{},DeveloperUserIdentifier:{},MaxResults:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{IdentityId:{},DeveloperUserIdentifierList:{type:"list",member:{}},NextToken:{}}}},MergeDeveloperIdentities:{input:{type:"structure",required:["SourceUserIdentifier","DestinationUserIdentifier","DeveloperProviderName","IdentityPoolId"],members:{SourceUserIdentifier:{},DestinationUserIdentifier:{},DeveloperProviderName:{},IdentityPoolId:{}}},output:{type:"structure",members:{IdentityId:{}}}},SetIdentityPoolRoles:{input:{type:"structure",required:["IdentityPoolId","Roles"],members:{IdentityPoolId:{},Roles:{shape:"S1c"},RoleMappings:{shape:"S1e"}}}},SetPrincipalTagAttributeMap:{input:{type:"structure",required:["IdentityPoolId","IdentityProviderName"],members:{IdentityPoolId:{},IdentityProviderName:{},UseDefaults:{type:"boolean"},PrincipalTags:{shape:"S1s"}}},output:{type:"structure",members:{IdentityPoolId:{},IdentityProviderName:{},UseDefaults:{type:"boolean"},PrincipalTags:{shape:"S1s"}}}},TagResource:{input:{type:"structure",required:["ResourceArn","Tags"],members:{ResourceArn:{},Tags:{shape:"Sh"}}},output:{type:"structure",members:{}}},UnlinkDeveloperIdentity:{input:{type:"structure",required:["IdentityId","IdentityPoolId","DeveloperProviderName","DeveloperUserIdentifier"],members:{IdentityId:{},IdentityPoolId:{},DeveloperProviderName:{},DeveloperUserIdentifier:{}}}},UnlinkIdentity:{input:{type:"structure",required:["IdentityId","Logins","LoginsToRemove"],members:{IdentityId:{},Logins:{shape:"S10"},LoginsToRemove:{shape:"Sw"}}},authtype:"none"},UntagResource:{input:{type:"structure",required:["ResourceArn","TagKeys"],members:{ResourceArn:{},TagKeys:{type:"list",member:{}}}},output:{type:"structure",members:{}}},UpdateIdentityPool:{input:{shape:"Sk"},output:{shape:"Sk"}}},shapes:{S5:{type:"map",key:{},value:{}},S9:{type:"list",member:{}},Sb:{type:"list",member:{type:"structure",members:{ProviderName:{},ClientId:{},ServerSideTokenCheck:{type:"boolean"}}}},Sg:{type:"list",member:{}},Sh:{type:"map",key:{},value:{}},Sk:{type:"structure",required:["IdentityPoolId","IdentityPoolName","AllowUnauthenticatedIdentities"],members:{IdentityPoolId:{},IdentityPoolName:{},AllowUnauthenticatedIdentities:{type:"boolean"},AllowClassicFlow:{type:"boolean"},SupportedLoginProviders:{shape:"S5"},DeveloperProviderName:{},OpenIdConnectProviderARNs:{shape:"S9"},CognitoIdentityProviders:{shape:"Sb"},SamlProviderARNs:{shape:"Sg"},IdentityPoolTags:{shape:"Sh"}}},Sv:{type:"structure",members:{IdentityId:{},Logins:{shape:"Sw"},CreationDate:{type:"timestamp"},LastModifiedDate:{type:"timestamp"}}},Sw:{type:"list",member:{}},S10:{type:"map",key:{},value:{}},S1c:{type:"map",key:{},value:{}},S1e:{type:"map",key:{},value:{type:"structure",required:["Type"],members:{Type:{},AmbiguousRoleResolution:{},RulesConfiguration:{type:"structure",required:["Rules"],members:{Rules:{type:"list",member:{type:"structure",required:["Claim","MatchType","Value","RoleARN"],members:{Claim:{},MatchType:{},Value:{},RoleARN:{}}}}}}}}},S1s:{type:"map",key:{},value:{}}}}});var Y4=U((oG,hL)=>{hL.exports={pagination:{ListIdentityPools:{input_token:"NextToken",limit_key:"MaxResults",output_token:"NextToken",result_key:"IdentityPools"}}}});var eS=U((aG,Q4)=>{_c();var gh=me(),dL=gh.Service,Z4=gh.apiLoader;Z4.services.cognitoidentity={};gh.CognitoIdentity=dL.defineService("cognitoidentity",["2014-06-30"]);Object.defineProperty(Z4.services.cognitoidentity,"2014-06-30",{get:function(){var e=J4();return e.paginators=Y4().pagination,e},enumerable:!0,configurable:!0});Q4.exports=gh.CognitoIdentity});var tS=U(()=>{var rn=me(),pL=eS(),mL=Js();rn.CognitoIdentityCredentials=rn.util.inherit(rn.Credentials,{localStorageKey:{id:"aws.cognito.identity-id.",providers:"aws.cognito.identity-providers."},constructor:function(e,r){rn.Credentials.call(this),this.expired=!0,this.params=e,this.data=null,this._identityId=null,this._clientConfig=rn.util.copy(r||{}),this.loadCachedId();var i=this;Object.defineProperty(this,"identityId",{get:function(){return i.loadCachedId(),i._identityId||i.params.IdentityId},set:function(n){i._identityId=n}})},refresh:function(e){this.coalesceRefresh(e||rn.util.fn.callback)},load:function(e){var r=this;r.createClients(),r.data=null,r._identityId=null,r.getId(function(i){i?(r.clearIdOnNotAuthorized(i),e(i)):r.params.RoleArn?r.getCredentialsFromSTS(e):r.getCredentialsForIdentity(e)})},clearCachedId:function(){this._identityId=null,delete this.params.IdentityId;var e=this.params.IdentityPoolId,r=this.params.LoginId||"";delete this.storage[this.localStorageKey.id+e+r],delete this.storage[this.localStorageKey.providers+e+r]},clearIdOnNotAuthorized:function(e){var r=this;e.code=="NotAuthorizedException"&&r.clearCachedId()},getId:function(e){var r=this;if(typeof r.params.IdentityId=="string")return e(null,r.params.IdentityId);r.cognito.getId(function(i,n){!i&&n.IdentityId?(r.params.IdentityId=n.IdentityId,e(null,n.IdentityId)):e(i)})},loadCredentials:function(e,r){!e||!r||(r.expired=!1,r.accessKeyId=e.Credentials.AccessKeyId,r.secretAccessKey=e.Credentials.SecretKey,r.sessionToken=e.Credentials.SessionToken,r.expireTime=e.Credentials.Expiration)},getCredentialsForIdentity:function(e){var r=this;r.cognito.getCredentialsForIdentity(function(i,n){i?r.clearIdOnNotAuthorized(i):(r.cacheId(n),r.data=n,r.loadCredentials(r.data,r)),e(i)})},getCredentialsFromSTS:function(e){var r=this;r.cognito.getOpenIdToken(function(i,n){i?(r.clearIdOnNotAuthorized(i),e(i)):(r.cacheId(n),r.params.WebIdentityToken=n.Token,r.webIdentityCredentials.refresh(function(s){s||(r.data=r.webIdentityCredentials.data,r.sts.credentialsFrom(r.data,r)),e(s)}))})},loadCachedId:function(){var e=this;if(rn.util.isBrowser()&&!e.params.IdentityId){var r=e.getStorage("id");if(r&&e.params.Logins){var i=Object.keys(e.params.Logins),n=(e.getStorage("providers")||"").split(","),s=n.filter(function(o){return i.indexOf(o)!==-1});s.length!==0&&(e.params.IdentityId=r)}else r&&(e.params.IdentityId=r)}},createClients:function(){var t=this._clientConfig;if(this.webIdentityCredentials=this.webIdentityCredentials||new rn.WebIdentityCredentials(this.params,t),!this.cognito){var e=rn.util.merge({},t);e.params=this.params,this.cognito=new pL(e)}this.sts=this.sts||new mL(t)},cacheId:function(e){this._identityId=e.IdentityId,this.params.IdentityId=this._identityId,rn.util.isBrowser()&&(this.setStorage("id",e.IdentityId),this.params.Logins&&this.setStorage("providers",Object.keys(this.params.Logins).join(",")))},getStorage:function(e){return this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]},setStorage:function(e,r){try{this.storage[this.localStorageKey[e]+this.params.IdentityPoolId+(this.params.LoginId||"")]=r}catch{}},storage:function(){try{var t=rn.util.isBrowser()&&window.localStorage!==null&&typeof window.localStorage=="object"?window.localStorage:{};return t["aws.test-storage"]="foobar",delete t["aws.test-storage"],t}catch{return{}}}()})});var rS=U(()=>{var Cc=me(),yL=Js();Cc.SAMLCredentials=Cc.util.inherit(Cc.Credentials,{constructor:function(e){Cc.Credentials.call(this),this.expired=!0,this.params=e},refresh:function(e){this.coalesceRefresh(e||Cc.util.fn.callback)},load:function(e){var r=this;r.createClients(),r.service.assumeRoleWithSAML(function(i,n){i||r.service.credentialsFrom(n,r),e(i)})},createClients:function(){this.service=this.service||new yL({params:this.params})}})});var py=U(()=>{var ti=me(),gL=require("child_process"),iS=ti.util.iniLoader;ti.ProcessCredentials=ti.util.inherit(ti.Credentials,{constructor:function(e){ti.Credentials.call(this),e=e||{},this.filename=e.filename,this.profile=e.profile||process.env.AWS_PROFILE||ti.util.defaultProfile,this.get(e.callback||ti.util.fn.noop)},load:function(e){var r=this;try{var i=ti.util.getProfilesFromSharedConfig(iS,this.filename),n=i[this.profile]||{};if(Object.keys(n).length===0)throw ti.util.error(new Error("Profile "+this.profile+" not found"),{code:"ProcessCredentialsProviderFailure"});if(n.credential_process)this.loadViaCredentialProcess(n,function(s,o){s?e(s,null):(r.expired=!1,r.accessKeyId=o.AccessKeyId,r.secretAccessKey=o.SecretAccessKey,r.sessionToken=o.SessionToken,o.Expiration&&(r.expireTime=new Date(o.Expiration)),e(null))});else throw ti.util.error(new Error("Profile "+this.profile+" did not include credential process"),{code:"ProcessCredentialsProviderFailure"})}catch(s){e(s)}},loadViaCredentialProcess:function(e,r){gL.exec(e.credential_process,function(i,n,s){if(i)r(ti.util.error(new Error("credential_process returned error"),{code:"ProcessCredentialsProviderFailure"}),null);else try{var o=JSON.parse(n);if(o.Expiration){var u=ti.util.date.getDate(),l=new Date(o.Expiration);if(l<u)throw Error("credential_process returned expired credentials")}if(o.Version!==1)throw Error("credential_process does not return Version == 1");r(null,o)}catch(d){r(ti.util.error(new Error(d.message),{code:"ProcessCredentialsProviderFailure"}),null)}})},refresh:function(e){iS.clearCachedFiles(),this.coalesceRefresh(e||ti.util.fn.callback)}})});var vh=U(my=>{(function(){my.defaults={"0.1":{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},"0.2":{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
109
|
-
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(my)});var rs=U((nS,aa)=>{(function(){var t,e,r,i,n,s,o=[].slice,u={}.hasOwnProperty;t=function(){var l,d,h,m,b,S;if(S=arguments[0],b=2<=arguments.length?o.call(arguments,1):[],i(Object.assign))Object.assign.apply(null,arguments);else for(l=0,h=b.length;l<h;l++)if(m=b[l],m!=null)for(d in m)!u.call(m,d)||(S[d]=m[d]);return S},i=function(l){return!!l&&Object.prototype.toString.call(l)==="[object Function]"},n=function(l){var d;return!!l&&((d=typeof l)=="function"||d==="object")},e=function(l){return i(Array.isArray)?Array.isArray(l):Object.prototype.toString.call(l)==="[object Array]"},r=function(l){var d;if(e(l))return!l.length;for(d in l)if(!!u.call(l,d))return!1;return!0},s=function(l){var d,h;return n(l)&&(h=Object.getPrototypeOf(l))&&(d=h.constructor)&&typeof d=="function"&&d instanceof d&&Function.prototype.toString.call(d)===Function.prototype.toString.call(Object)},aa.exports.assign=t,aa.exports.isFunction=i,aa.exports.isObject=n,aa.exports.isArray=e,aa.exports.isEmpty=r,aa.exports.isPlainObject=s}).call(nS)});var yy=U((sS,oS)=>{(function(){var t;oS.exports=t=function(){function e(r,i,n){if(this.options=r.options,this.stringify=r.stringify,i==null)throw new Error("Missing attribute name of element "+r.name);if(n==null)throw new Error("Missing attribute value for attribute "+i+" of element "+r.name);this.name=this.stringify.attName(i),this.value=this.stringify.attValue(n)}return e.prototype.clone=function(){return Object.create(this)},e.prototype.toString=function(r){return this.options.writer.set(r).attribute(this)},e}()}).call(sS)});var Rc=U((aS,uS)=>{(function(){var t,e,r,i,n,s,o=function(l,d){for(var h in d)u.call(d,h)&&(l[h]=d[h]);function m(){this.constructor=l}return m.prototype=d.prototype,l.prototype=new m,l.__super__=d.prototype,l},u={}.hasOwnProperty;s=rs(),n=s.isObject,i=s.isFunction,r=ri(),t=yy(),uS.exports=e=function(l){o(d,l);function d(h,m,b){if(d.__super__.constructor.call(this,h),m==null)throw new Error("Missing element name");this.name=this.stringify.eleName(m),this.attributes={},b!=null&&this.attribute(b),h.isDocument&&(this.isRoot=!0,this.documentObject=h,h.rootObject=this)}return d.prototype.clone=function(){var h,m,b,S;b=Object.create(this),b.isRoot&&(b.documentObject=null),b.attributes={},S=this.attributes;for(m in S)!u.call(S,m)||(h=S[m],b.attributes[m]=h.clone());return b.children=[],this.children.forEach(function(y){var v;return v=y.clone(),v.parent=b,b.children.push(v)}),b},d.prototype.attribute=function(h,m){var b,S;if(h!=null&&(h=h.valueOf()),n(h))for(b in h)!u.call(h,b)||(S=h[b],this.attribute(b,S));else i(m)&&(m=m.apply()),(!this.options.skipNullAttributes||m!=null)&&(this.attributes[h]=new t(this,h,m));return this},d.prototype.removeAttribute=function(h){var m,b,S;if(h==null)throw new Error("Missing attribute name");if(h=h.valueOf(),Array.isArray(h))for(b=0,S=h.length;b<S;b++)m=h[b],delete this.attributes[m];else delete this.attributes[h];return this},d.prototype.toString=function(h){return this.options.writer.set(h).element(this)},d.prototype.att=function(h,m){return this.attribute(h,m)},d.prototype.a=function(h,m){return this.attribute(h,m)},d}(r)}).call(aS)});var Tc=U((lS,cS)=>{(function(){var t,e,r=function(n,s){for(var o in s)i.call(s,o)&&(n[o]=s[o]);function u(){this.constructor=n}return u.prototype=s.prototype,n.prototype=new u,n.__super__=s.prototype,n},i={}.hasOwnProperty;e=ri(),cS.exports=t=function(n){r(s,n);function s(o,u){if(s.__super__.constructor.call(this,o),u==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(u)}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(o){return this.options.writer.set(o).cdata(this)},s}(e)}).call(lS)});var Nc=U((fS,hS)=>{(function(){var t,e,r=function(n,s){for(var o in s)i.call(s,o)&&(n[o]=s[o]);function u(){this.constructor=n}return u.prototype=s.prototype,n.prototype=new u,n.__super__=s.prototype,n},i={}.hasOwnProperty;e=ri(),hS.exports=t=function(n){r(s,n);function s(o,u){if(s.__super__.constructor.call(this,o),u==null)throw new Error("Missing comment text");this.text=this.stringify.comment(u)}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(o){return this.options.writer.set(o).comment(this)},s}(e)}).call(fS)});var Ac=U((dS,pS)=>{(function(){var t,e,r,i=function(s,o){for(var u in o)n.call(o,u)&&(s[u]=o[u]);function l(){this.constructor=s}return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},n={}.hasOwnProperty;r=rs().isObject,e=ri(),pS.exports=t=function(s){i(o,s);function o(u,l,d,h){var m;o.__super__.constructor.call(this,u),r(l)&&(m=l,l=m.version,d=m.encoding,h=m.standalone),l||(l="1.0"),this.version=this.stringify.xmlVersion(l),d!=null&&(this.encoding=this.stringify.xmlEncoding(d)),h!=null&&(this.standalone=this.stringify.xmlStandalone(h))}return o.prototype.toString=function(u){return this.options.writer.set(u).declaration(this)},o}(e)}).call(dS)});var Mc=U((mS,yS)=>{(function(){var t,e,r=function(n,s){for(var o in s)i.call(s,o)&&(n[o]=s[o]);function u(){this.constructor=n}return u.prototype=s.prototype,n.prototype=new u,n.__super__=s.prototype,n},i={}.hasOwnProperty;e=ri(),yS.exports=t=function(n){r(s,n);function s(o,u,l,d,h,m){if(s.__super__.constructor.call(this,o),u==null)throw new Error("Missing DTD element name");if(l==null)throw new Error("Missing DTD attribute name");if(!d)throw new Error("Missing DTD attribute type");if(!h)throw new Error("Missing DTD attribute default");if(h.indexOf("#")!==0&&(h="#"+h),!h.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(m&&!h.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(u),this.attributeName=this.stringify.attName(l),this.attributeType=this.stringify.dtdAttType(d),this.defaultValue=this.stringify.dtdAttDefault(m),this.defaultValueType=h}return s.prototype.toString=function(o){return this.options.writer.set(o).dtdAttList(this)},s}(e)}).call(mS)});var kc=U((gS,vS)=>{(function(){var t,e,r,i=function(s,o){for(var u in o)n.call(o,u)&&(s[u]=o[u]);function l(){this.constructor=s}return l.prototype=o.prototype,s.prototype=new l,s.__super__=o.prototype,s},n={}.hasOwnProperty;r=rs().isObject,e=ri(),vS.exports=t=function(s){i(o,s);function o(u,l,d,h){if(o.__super__.constructor.call(this,u),d==null)throw new Error("Missing entity name");if(h==null)throw new Error("Missing entity value");if(this.pe=!!l,this.name=this.stringify.eleName(d),!r(h))this.value=this.stringify.dtdEntityValue(h);else{if(!h.pubID&&!h.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(h.pubID&&!h.sysID)throw new Error("System identifier is required for a public external entity");if(h.pubID!=null&&(this.pubID=this.stringify.dtdPubID(h.pubID)),h.sysID!=null&&(this.sysID=this.stringify.dtdSysID(h.sysID)),h.nData!=null&&(this.nData=this.stringify.dtdNData(h.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}}return o.prototype.toString=function(u){return this.options.writer.set(u).dtdEntity(this)},o}(e)}).call(gS)});var Ic=U((bS,SS)=>{(function(){var t,e,r=function(n,s){for(var o in s)i.call(s,o)&&(n[o]=s[o]);function u(){this.constructor=n}return u.prototype=s.prototype,n.prototype=new u,n.__super__=s.prototype,n},i={}.hasOwnProperty;e=ri(),SS.exports=t=function(n){r(s,n);function s(o,u,l){if(s.__super__.constructor.call(this,o),u==null)throw new Error("Missing DTD element name");l||(l="(#PCDATA)"),Array.isArray(l)&&(l="("+l.join(",")+")"),this.name=this.stringify.eleName(u),this.value=this.stringify.dtdElementValue(l)}return s.prototype.toString=function(o){return this.options.writer.set(o).dtdElement(this)},s}(e)}).call(bS)});var Pc=U((xS,wS)=>{(function(){var t,e,r=function(n,s){for(var o in s)i.call(s,o)&&(n[o]=s[o]);function u(){this.constructor=n}return u.prototype=s.prototype,n.prototype=new u,n.__super__=s.prototype,n},i={}.hasOwnProperty;e=ri(),wS.exports=t=function(n){r(s,n);function s(o,u,l){if(s.__super__.constructor.call(this,o),u==null)throw new Error("Missing notation name");if(!l.pubID&&!l.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(u),l.pubID!=null&&(this.pubID=this.stringify.dtdPubID(l.pubID)),l.sysID!=null&&(this.sysID=this.stringify.dtdSysID(l.sysID))}return s.prototype.toString=function(o){return this.options.writer.set(o).dtdNotation(this)},s}(e)}).call(xS)});var Lc=U((ES,_S)=>{(function(){var t,e,r,i,n,s,o,u=function(d,h){for(var m in h)l.call(h,m)&&(d[m]=h[m]);function b(){this.constructor=d}return b.prototype=h.prototype,d.prototype=new b,d.__super__=h.prototype,d},l={}.hasOwnProperty;o=rs().isObject,s=ri(),t=Mc(),r=kc(),e=Ic(),i=Pc(),_S.exports=n=function(d){u(h,d);function h(m,b,S){var y,v;h.__super__.constructor.call(this,m),this.documentObject=m,o(b)&&(y=b,b=y.pubID,S=y.sysID),S==null&&(v=[b,S],S=v[0],b=v[1]),b!=null&&(this.pubID=this.stringify.dtdPubID(b)),S!=null&&(this.sysID=this.stringify.dtdSysID(S))}return h.prototype.element=function(m,b){var S;return S=new e(this,m,b),this.children.push(S),this},h.prototype.attList=function(m,b,S,y,v){var C;return C=new t(this,m,b,S,y,v),this.children.push(C),this},h.prototype.entity=function(m,b){var S;return S=new r(this,!1,m,b),this.children.push(S),this},h.prototype.pEntity=function(m,b){var S;return S=new r(this,!0,m,b),this.children.push(S),this},h.prototype.notation=function(m,b){var S;return S=new i(this,m,b),this.children.push(S),this},h.prototype.toString=function(m){return this.options.writer.set(m).docType(this)},h.prototype.ele=function(m,b){return this.element(m,b)},h.prototype.att=function(m,b,S,y,v){return this.attList(m,b,S,y,v)},h.prototype.ent=function(m,b){return this.entity(m,b)},h.prototype.pent=function(m,b){return this.pEntity(m,b)},h.prototype.not=function(m,b){return this.notation(m,b)},h.prototype.up=function(){return this.root()||this.documentObject},h}(s)}).call(ES)});var Oc=U((CS,RS)=>{(function(){var t,e,r=function(n,s){for(var o in s)i.call(s,o)&&(n[o]=s[o]);function u(){this.constructor=n}return u.prototype=s.prototype,n.prototype=new u,n.__super__=s.prototype,n},i={}.hasOwnProperty;t=ri(),RS.exports=e=function(n){r(s,n);function s(o,u){if(s.__super__.constructor.call(this,o),u==null)throw new Error("Missing raw text");this.value=this.stringify.raw(u)}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(o){return this.options.writer.set(o).raw(this)},s}(t)}).call(CS)});var Bc=U((TS,NS)=>{(function(){var t,e,r=function(n,s){for(var o in s)i.call(s,o)&&(n[o]=s[o]);function u(){this.constructor=n}return u.prototype=s.prototype,n.prototype=new u,n.__super__=s.prototype,n},i={}.hasOwnProperty;t=ri(),NS.exports=e=function(n){r(s,n);function s(o,u){if(s.__super__.constructor.call(this,o),u==null)throw new Error("Missing element text");this.value=this.stringify.eleText(u)}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(o){return this.options.writer.set(o).text(this)},s}(t)}).call(TS)});var Dc=U((AS,MS)=>{(function(){var t,e,r=function(n,s){for(var o in s)i.call(s,o)&&(n[o]=s[o]);function u(){this.constructor=n}return u.prototype=s.prototype,n.prototype=new u,n.__super__=s.prototype,n},i={}.hasOwnProperty;t=ri(),MS.exports=e=function(n){r(s,n);function s(o,u,l){if(s.__super__.constructor.call(this,o),u==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(u),l&&(this.value=this.stringify.insValue(l))}return s.prototype.clone=function(){return Object.create(this)},s.prototype.toString=function(o){return this.options.writer.set(o).processingInstruction(this)},s}(t)}).call(AS)});var ri=U((kS,IS)=>{(function(){var t,e,r,i,n,s,o,u,l,d,h,m,b,S={}.hasOwnProperty;b=rs(),m=b.isObject,h=b.isFunction,d=b.isEmpty,n=null,t=null,e=null,r=null,i=null,u=null,l=null,o=null,IS.exports=s=function(){function y(v){this.parent=v,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],n||(n=Rc(),t=Tc(),e=Nc(),r=Ac(),i=Lc(),u=Oc(),l=Bc(),o=Dc())}return y.prototype.element=function(v,C,w){var x,N,I,q,B,z,D,se,le,te;if(z=null,C==null&&(C={}),C=C.valueOf(),m(C)||(le=[C,w],w=le[0],C=le[1]),v!=null&&(v=v.valueOf()),Array.isArray(v))for(I=0,D=v.length;I<D;I++)N=v[I],z=this.element(N);else if(h(v))z=this.element(v.apply());else if(m(v)){for(B in v)if(!!S.call(v,B))if(te=v[B],h(te)&&(te=te.apply()),m(te)&&d(te)&&(te=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&B.indexOf(this.stringify.convertAttKey)===0)z=this.attribute(B.substr(this.stringify.convertAttKey.length),te);else if(!this.options.separateArrayItems&&Array.isArray(te))for(q=0,se=te.length;q<se;q++)N=te[q],x={},x[B]=N,z=this.element(x);else m(te)?(z=this.element(B),z.element(te)):z=this.element(B,te)}else!this.options.ignoreDecorators&&this.stringify.convertTextKey&&v.indexOf(this.stringify.convertTextKey)===0?z=this.text(w):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&v.indexOf(this.stringify.convertCDataKey)===0?z=this.cdata(w):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&v.indexOf(this.stringify.convertCommentKey)===0?z=this.comment(w):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&v.indexOf(this.stringify.convertRawKey)===0?z=this.raw(w):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&v.indexOf(this.stringify.convertPIKey)===0?z=this.instruction(v.substr(this.stringify.convertPIKey.length),w):z=this.node(v,C,w);if(z==null)throw new Error("Could not create any elements with: "+v);return z},y.prototype.insertBefore=function(v,C,w){var x,N,I;if(this.isRoot)throw new Error("Cannot insert elements at root level");return N=this.parent.children.indexOf(this),I=this.parent.children.splice(N),x=this.parent.element(v,C,w),Array.prototype.push.apply(this.parent.children,I),x},y.prototype.insertAfter=function(v,C,w){var x,N,I;if(this.isRoot)throw new Error("Cannot insert elements at root level");return N=this.parent.children.indexOf(this),I=this.parent.children.splice(N+1),x=this.parent.element(v,C,w),Array.prototype.push.apply(this.parent.children,I),x},y.prototype.remove=function(){var v,C;if(this.isRoot)throw new Error("Cannot remove the root element");return v=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[v,v-v+1].concat(C=[])),this.parent},y.prototype.node=function(v,C,w){var x,N;return v!=null&&(v=v.valueOf()),C||(C={}),C=C.valueOf(),m(C)||(N=[C,w],w=N[0],C=N[1]),x=new n(this,v,C),w!=null&&x.text(w),this.children.push(x),x},y.prototype.text=function(v){var C;return C=new l(this,v),this.children.push(C),this},y.prototype.cdata=function(v){var C;return C=new t(this,v),this.children.push(C),this},y.prototype.comment=function(v){var C;return C=new e(this,v),this.children.push(C),this},y.prototype.commentBefore=function(v){var C,w,x;return w=this.parent.children.indexOf(this),x=this.parent.children.splice(w),C=this.parent.comment(v),Array.prototype.push.apply(this.parent.children,x),this},y.prototype.commentAfter=function(v){var C,w,x;return w=this.parent.children.indexOf(this),x=this.parent.children.splice(w+1),C=this.parent.comment(v),Array.prototype.push.apply(this.parent.children,x),this},y.prototype.raw=function(v){var C;return C=new u(this,v),this.children.push(C),this},y.prototype.instruction=function(v,C){var w,x,N,I,q;if(v!=null&&(v=v.valueOf()),C!=null&&(C=C.valueOf()),Array.isArray(v))for(I=0,q=v.length;I<q;I++)w=v[I],this.instruction(w);else if(m(v))for(w in v)!S.call(v,w)||(x=v[w],this.instruction(w,x));else h(C)&&(C=C.apply()),N=new o(this,v,C),this.children.push(N);return this},y.prototype.instructionBefore=function(v,C){var w,x,N;return x=this.parent.children.indexOf(this),N=this.parent.children.splice(x),w=this.parent.instruction(v,C),Array.prototype.push.apply(this.parent.children,N),this},y.prototype.instructionAfter=function(v,C){var w,x,N;return x=this.parent.children.indexOf(this),N=this.parent.children.splice(x+1),w=this.parent.instruction(v,C),Array.prototype.push.apply(this.parent.children,N),this},y.prototype.declaration=function(v,C,w){var x,N;return x=this.document(),N=new r(x,v,C,w),x.children[0]instanceof r?x.children[0]=N:x.children.unshift(N),x.root()||x},y.prototype.doctype=function(v,C){var w,x,N,I,q,B,z,D,se,le;for(x=this.document(),N=new i(x,v,C),se=x.children,I=q=0,z=se.length;q<z;I=++q)if(w=se[I],w instanceof i)return x.children[I]=N,N;for(le=x.children,I=B=0,D=le.length;B<D;I=++B)if(w=le[I],w.isRoot)return x.children.splice(I,0,N),N;return x.children.push(N),N},y.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},y.prototype.root=function(){var v;for(v=this;v;){if(v.isDocument)return v.rootObject;if(v.isRoot)return v;v=v.parent}},y.prototype.document=function(){var v;for(v=this;v;){if(v.isDocument)return v;v=v.parent}},y.prototype.end=function(v){return this.document().end(v)},y.prototype.prev=function(){var v;if(v=this.parent.children.indexOf(this),v<1)throw new Error("Already at the first node");return this.parent.children[v-1]},y.prototype.next=function(){var v;if(v=this.parent.children.indexOf(this),v===-1||v===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[v+1]},y.prototype.importDocument=function(v){var C;return C=v.root().clone(),C.parent=this,C.isRoot=!1,this.children.push(C),this},y.prototype.ele=function(v,C,w){return this.element(v,C,w)},y.prototype.nod=function(v,C,w){return this.node(v,C,w)},y.prototype.txt=function(v){return this.text(v)},y.prototype.dat=function(v){return this.cdata(v)},y.prototype.com=function(v){return this.comment(v)},y.prototype.ins=function(v,C){return this.instruction(v,C)},y.prototype.doc=function(){return this.document()},y.prototype.dec=function(v,C,w){return this.declaration(v,C,w)},y.prototype.dtd=function(v,C){return this.doctype(v,C)},y.prototype.e=function(v,C,w){return this.element(v,C,w)},y.prototype.n=function(v,C,w){return this.node(v,C,w)},y.prototype.t=function(v){return this.text(v)},y.prototype.d=function(v){return this.cdata(v)},y.prototype.c=function(v){return this.comment(v)},y.prototype.r=function(v){return this.raw(v)},y.prototype.i=function(v,C){return this.instruction(v,C)},y.prototype.u=function(){return this.up()},y.prototype.importXMLBuilder=function(v){return this.importDocument(v)},y}()}).call(kS)});var gy=U((PS,LS)=>{(function(){var t,e=function(i,n){return function(){return i.apply(n,arguments)}},r={}.hasOwnProperty;LS.exports=t=function(){function i(n){this.assertLegalChar=e(this.assertLegalChar,this);var s,o,u;n||(n={}),this.noDoubleEncoding=n.noDoubleEncoding,o=n.stringify||{};for(s in o)!r.call(o,s)||(u=o[s],this[s]=u)}return i.prototype.eleName=function(n){return n=""+n||"",this.assertLegalChar(n)},i.prototype.eleText=function(n){return n=""+n||"",this.assertLegalChar(this.elEscape(n))},i.prototype.cdata=function(n){return n=""+n||"",n=n.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(n)},i.prototype.comment=function(n){if(n=""+n||"",n.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+n);return this.assertLegalChar(n)},i.prototype.raw=function(n){return""+n||""},i.prototype.attName=function(n){return n=""+n||""},i.prototype.attValue=function(n){return n=""+n||"",this.attEscape(n)},i.prototype.insTarget=function(n){return""+n||""},i.prototype.insValue=function(n){if(n=""+n||"",n.match(/\?>/))throw new Error("Invalid processing instruction value: "+n);return n},i.prototype.xmlVersion=function(n){if(n=""+n||"",!n.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+n);return n},i.prototype.xmlEncoding=function(n){if(n=""+n||"",!n.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+n);return n},i.prototype.xmlStandalone=function(n){return n?"yes":"no"},i.prototype.dtdPubID=function(n){return""+n||""},i.prototype.dtdSysID=function(n){return""+n||""},i.prototype.dtdElementValue=function(n){return""+n||""},i.prototype.dtdAttType=function(n){return""+n||""},i.prototype.dtdAttDefault=function(n){return n!=null?""+n||"":n},i.prototype.dtdEntityValue=function(n){return""+n||""},i.prototype.dtdNData=function(n){return""+n||""},i.prototype.convertAttKey="@",i.prototype.convertPIKey="?",i.prototype.convertTextKey="#text",i.prototype.convertCDataKey="#cdata",i.prototype.convertCommentKey="#comment",i.prototype.convertRawKey="#raw",i.prototype.assertLegalChar=function(n){var s;if(s=n.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),s)throw new Error("Invalid character in string: "+n+" at index "+s.index);return n},i.prototype.elEscape=function(n){var s;return s=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,n.replace(s,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},i.prototype.attEscape=function(n){var s;return s=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,n.replace(s,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},i}()}).call(PS)});var vy=U((OS,BS)=>{(function(){var t,e={}.hasOwnProperty;BS.exports=t=function(){function r(i){var n,s,o,u,l,d,h,m,b;i||(i={}),this.pretty=i.pretty||!1,this.allowEmpty=(s=i.allowEmpty)!=null?s:!1,this.pretty?(this.indent=(o=i.indent)!=null?o:" ",this.newline=(u=i.newline)!=null?u:`
|
|
110
|
-
`,this.offset=(l=i.offset)!=null?l:0,this.dontprettytextnodes=(d=i.dontprettytextnodes)!=null?d:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(h=i.spacebeforeslash)!=null?h:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,m=i.writer||{};for(n in m)!e.call(m,n)||(b=m[n],this[n]=b)}return r.prototype.set=function(i){var n,s,o;i||(i={}),"pretty"in i&&(this.pretty=i.pretty),"allowEmpty"in i&&(this.allowEmpty=i.allowEmpty),this.pretty?(this.indent="indent"in i?i.indent:" ",this.newline="newline"in i?i.newline:`
|
|
111
|
-
`,this.offset="offset"in i?i.offset:0,this.dontprettytextnodes="dontprettytextnodes"in i?i.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in i?i.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,s=i.writer||{};for(n in s)!e.call(s,n)||(o=s[n],this[n]=o);return this},r.prototype.space=function(i){var n;return this.pretty?(n=(i||0)+this.offset+1,n>0?new Array(n).join(this.indent):""):""},r}()}).call(OS)});var bh=U((DS,qS)=>{(function(){var t,e,r,i,n,s,o,u,l,d,h,m,b,S,y=function(C,w){for(var x in w)v.call(w,x)&&(C[x]=w[x]);function N(){this.constructor=C}return N.prototype=w.prototype,C.prototype=new N,C.__super__=w.prototype,C},v={}.hasOwnProperty;o=Ac(),u=Lc(),t=Tc(),e=Nc(),l=Rc(),h=Oc(),b=Bc(),d=Dc(),r=Mc(),i=Ic(),n=kc(),s=Pc(),S=vy(),qS.exports=m=function(C){y(w,C);function w(x){w.__super__.constructor.call(this,x)}return w.prototype.document=function(x){var N,I,q,B,z;for(this.textispresent=!1,B="",z=x.children,I=0,q=z.length;I<q;I++)N=z[I],B+=function(){switch(!1){case!(N instanceof o):return this.declaration(N);case!(N instanceof u):return this.docType(N);case!(N instanceof e):return this.comment(N);case!(N instanceof d):return this.processingInstruction(N);default:return this.element(N,0)}}.call(this);return this.pretty&&B.slice(-this.newline.length)===this.newline&&(B=B.slice(0,-this.newline.length)),B},w.prototype.attribute=function(x){return" "+x.name+'="'+x.value+'"'},w.prototype.cdata=function(x,N){return this.space(N)+"<![CDATA["+x.text+"]]>"+this.newline},w.prototype.comment=function(x,N){return this.space(N)+"<!-- "+x.text+" -->"+this.newline},w.prototype.declaration=function(x,N){var I;return I=this.space(N),I+='<?xml version="'+x.version+'"',x.encoding!=null&&(I+=' encoding="'+x.encoding+'"'),x.standalone!=null&&(I+=' standalone="'+x.standalone+'"'),I+=this.spacebeforeslash+"?>",I+=this.newline,I},w.prototype.docType=function(x,N){var I,q,B,z,D;if(N||(N=0),z=this.space(N),z+="<!DOCTYPE "+x.root().name,x.pubID&&x.sysID?z+=' PUBLIC "'+x.pubID+'" "'+x.sysID+'"':x.sysID&&(z+=' SYSTEM "'+x.sysID+'"'),x.children.length>0){for(z+=" [",z+=this.newline,D=x.children,q=0,B=D.length;q<B;q++)I=D[q],z+=function(){switch(!1){case!(I instanceof r):return this.dtdAttList(I,N+1);case!(I instanceof i):return this.dtdElement(I,N+1);case!(I instanceof n):return this.dtdEntity(I,N+1);case!(I instanceof s):return this.dtdNotation(I,N+1);case!(I instanceof t):return this.cdata(I,N+1);case!(I instanceof e):return this.comment(I,N+1);case!(I instanceof d):return this.processingInstruction(I,N+1);default:throw new Error("Unknown DTD node type: "+I.constructor.name)}}.call(this);z+="]"}return z+=this.spacebeforeslash+">",z+=this.newline,z},w.prototype.element=function(x,N){var I,q,B,z,D,se,le,te,ve,qe,Je,Mt,Pe;N||(N=0),Pe=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),Mt=this.space(N),te="",te+=Mt+"<"+x.name,ve=x.attributes;for(le in ve)!v.call(ve,le)||(I=ve[le],te+=this.attribute(I));if(x.children.length===0||x.children.every(function(Wr){return Wr.value===""}))this.allowEmpty?te+="></"+x.name+">"+this.newline:te+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&x.children.length===1&&x.children[0].value!=null)te+=">",te+=x.children[0].value,te+="</"+x.name+">"+this.newline;else{if(this.dontprettytextnodes){for(qe=x.children,B=0,D=qe.length;B<D;B++)if(q=qe[B],q.value!=null){this.textispresent++,Pe=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,Mt=this.space(N)),te+=">"+this.newline,Je=x.children,z=0,se=Je.length;z<se;z++)q=Je[z],te+=function(){switch(!1){case!(q instanceof t):return this.cdata(q,N+1);case!(q instanceof e):return this.comment(q,N+1);case!(q instanceof l):return this.element(q,N+1);case!(q instanceof h):return this.raw(q,N+1);case!(q instanceof b):return this.text(q,N+1);case!(q instanceof d):return this.processingInstruction(q,N+1);default:throw new Error("Unknown XML node type: "+q.constructor.name)}}.call(this);Pe&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),te+=Mt+"</"+x.name+">"+this.newline}return te},w.prototype.processingInstruction=function(x,N){var I;return I=this.space(N)+"<?"+x.target,x.value&&(I+=" "+x.value),I+=this.spacebeforeslash+"?>"+this.newline,I},w.prototype.raw=function(x,N){return this.space(N)+x.value+this.newline},w.prototype.text=function(x,N){return this.space(N)+x.value+this.newline},w.prototype.dtdAttList=function(x,N){var I;return I=this.space(N)+"<!ATTLIST "+x.elementName+" "+x.attributeName+" "+x.attributeType,x.defaultValueType!=="#DEFAULT"&&(I+=" "+x.defaultValueType),x.defaultValue&&(I+=' "'+x.defaultValue+'"'),I+=this.spacebeforeslash+">"+this.newline,I},w.prototype.dtdElement=function(x,N){return this.space(N)+"<!ELEMENT "+x.name+" "+x.value+this.spacebeforeslash+">"+this.newline},w.prototype.dtdEntity=function(x,N){var I;return I=this.space(N)+"<!ENTITY",x.pe&&(I+=" %"),I+=" "+x.name,x.value?I+=' "'+x.value+'"':(x.pubID&&x.sysID?I+=' PUBLIC "'+x.pubID+'" "'+x.sysID+'"':x.sysID&&(I+=' SYSTEM "'+x.sysID+'"'),x.nData&&(I+=" NDATA "+x.nData)),I+=this.spacebeforeslash+">"+this.newline,I},w.prototype.dtdNotation=function(x,N){var I;return I=this.space(N)+"<!NOTATION "+x.name,x.pubID&&x.sysID?I+=' PUBLIC "'+x.pubID+'" "'+x.sysID+'"':x.pubID?I+=' PUBLIC "'+x.pubID+'"':x.sysID&&(I+=' SYSTEM "'+x.sysID+'"'),I+=this.spacebeforeslash+">"+this.newline,I},w.prototype.openNode=function(x,N){var I,q,B,z;if(N||(N=0),x instanceof l){B=this.space(N)+"<"+x.name,z=x.attributes;for(q in z)!v.call(z,q)||(I=z[q],B+=this.attribute(I));return B+=(x.children?">":"/>")+this.newline,B}else return B=this.space(N)+"<!DOCTYPE "+x.rootNodeName,x.pubID&&x.sysID?B+=' PUBLIC "'+x.pubID+'" "'+x.sysID+'"':x.sysID&&(B+=' SYSTEM "'+x.sysID+'"'),B+=(x.children?" [":">")+this.newline,B},w.prototype.closeNode=function(x,N){switch(N||(N=0),!1){case!(x instanceof l):return this.space(N)+"</"+x.name+">"+this.newline;case!(x instanceof u):return this.space(N)+"]>"+this.newline}},w}(S)}).call(DS)});var US=U((zS,FS)=>{(function(){var t,e,r,i,n,s=function(u,l){for(var d in l)o.call(l,d)&&(u[d]=l[d]);function h(){this.constructor=u}return h.prototype=l.prototype,u.prototype=new h,u.__super__=l.prototype,u},o={}.hasOwnProperty;n=rs().isPlainObject,e=ri(),i=gy(),r=bh(),FS.exports=t=function(u){s(l,u);function l(d){l.__super__.constructor.call(this,null),d||(d={}),d.writer||(d.writer=new r),this.options=d,this.stringify=new i(d),this.isDocument=!0}return l.prototype.end=function(d){var h;return d?n(d)&&(h=d,d=this.options.writer.set(h)):d=this.options.writer,d.document(this)},l.prototype.toString=function(d){return this.options.writer.set(d).document(this)},l}(e)}).call(zS)});var WS=U((jS,HS)=>{(function(){var t,e,r,i,n,s,o,u,l,d,h,m,b,S,y,v,C,w,x,N,I={}.hasOwnProperty;N=rs(),w=N.isObject,C=N.isFunction,x=N.isPlainObject,h=Rc(),e=Tc(),r=Nc(),b=Oc(),v=Bc(),m=Dc(),u=Ac(),l=Lc(),i=Mc(),s=kc(),n=Ic(),o=Pc(),t=yy(),y=gy(),S=bh(),HS.exports=d=function(){function q(B,z,D){var se;B||(B={}),B.writer?x(B.writer)&&(se=B.writer,B.writer=new S(se)):B.writer=new S(B),this.options=B,this.writer=B.writer,this.stringify=new y(B),this.onDataCallback=z||function(){},this.onEndCallback=D||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return q.prototype.node=function(B,z,D){var se;if(B==null)throw new Error("Missing node name");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),B=B.valueOf(),z==null&&(z={}),z=z.valueOf(),w(z)||(se=[z,D],D=se[0],z=se[1]),this.currentNode=new h(this,B,z),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,D!=null&&this.text(D),this},q.prototype.element=function(B,z,D){return this.currentNode&&this.currentNode instanceof l?this.dtdElement.apply(this,arguments):this.node(B,z,D)},q.prototype.attribute=function(B,z){var D,se;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(B!=null&&(B=B.valueOf()),w(B))for(D in B)!I.call(B,D)||(se=B[D],this.attribute(D,se));else C(z)&&(z=z.apply()),(!this.options.skipNullAttributes||z!=null)&&(this.currentNode.attributes[B]=new t(this,B,z));return this},q.prototype.text=function(B){var z;return this.openCurrent(),z=new v(this,B),this.onData(this.writer.text(z,this.currentLevel+1)),this},q.prototype.cdata=function(B){var z;return this.openCurrent(),z=new e(this,B),this.onData(this.writer.cdata(z,this.currentLevel+1)),this},q.prototype.comment=function(B){var z;return this.openCurrent(),z=new r(this,B),this.onData(this.writer.comment(z,this.currentLevel+1)),this},q.prototype.raw=function(B){var z;return this.openCurrent(),z=new b(this,B),this.onData(this.writer.raw(z,this.currentLevel+1)),this},q.prototype.instruction=function(B,z){var D,se,le,te,ve;if(this.openCurrent(),B!=null&&(B=B.valueOf()),z!=null&&(z=z.valueOf()),Array.isArray(B))for(D=0,te=B.length;D<te;D++)se=B[D],this.instruction(se);else if(w(B))for(se in B)!I.call(B,se)||(le=B[se],this.instruction(se,le));else C(z)&&(z=z.apply()),ve=new m(this,B,z),this.onData(this.writer.processingInstruction(ve,this.currentLevel+1));return this},q.prototype.declaration=function(B,z,D){var se;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return se=new u(this,B,z,D),this.onData(this.writer.declaration(se,this.currentLevel+1)),this},q.prototype.doctype=function(B,z,D){if(this.openCurrent(),B==null)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new l(this,z,D),this.currentNode.rootNodeName=B,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},q.prototype.dtdElement=function(B,z){var D;return this.openCurrent(),D=new n(this,B,z),this.onData(this.writer.dtdElement(D,this.currentLevel+1)),this},q.prototype.attList=function(B,z,D,se,le){var te;return this.openCurrent(),te=new i(this,B,z,D,se,le),this.onData(this.writer.dtdAttList(te,this.currentLevel+1)),this},q.prototype.entity=function(B,z){var D;return this.openCurrent(),D=new s(this,!1,B,z),this.onData(this.writer.dtdEntity(D,this.currentLevel+1)),this},q.prototype.pEntity=function(B,z){var D;return this.openCurrent(),D=new s(this,!0,B,z),this.onData(this.writer.dtdEntity(D,this.currentLevel+1)),this},q.prototype.notation=function(B,z){var D;return this.openCurrent(),D=new o(this,B,z),this.onData(this.writer.dtdNotation(D,this.currentLevel+1)),this},q.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},q.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},q.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},q.prototype.openNode=function(B){if(!B.isOpen)return!this.root&&this.currentLevel===0&&B instanceof h&&(this.root=B),this.onData(this.writer.openNode(B,this.currentLevel)),B.isOpen=!0},q.prototype.closeNode=function(B){if(!B.isClosed)return this.onData(this.writer.closeNode(B,this.currentLevel)),B.isClosed=!0},q.prototype.onData=function(B){return this.documentStarted=!0,this.onDataCallback(B)},q.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},q.prototype.ele=function(){return this.element.apply(this,arguments)},q.prototype.nod=function(B,z,D){return this.node(B,z,D)},q.prototype.txt=function(B){return this.text(B)},q.prototype.dat=function(B){return this.cdata(B)},q.prototype.com=function(B){return this.comment(B)},q.prototype.ins=function(B,z){return this.instruction(B,z)},q.prototype.dec=function(B,z,D){return this.declaration(B,z,D)},q.prototype.dtd=function(B,z,D){return this.doctype(B,z,D)},q.prototype.e=function(B,z,D){return this.element(B,z,D)},q.prototype.n=function(B,z,D){return this.node(B,z,D)},q.prototype.t=function(B){return this.text(B)},q.prototype.d=function(B){return this.cdata(B)},q.prototype.c=function(B){return this.comment(B)},q.prototype.r=function(B){return this.raw(B)},q.prototype.i=function(B,z){return this.instruction(B,z)},q.prototype.att=function(){return this.currentNode&&this.currentNode instanceof l?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},q.prototype.a=function(){return this.currentNode&&this.currentNode instanceof l?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},q.prototype.ent=function(B,z){return this.entity(B,z)},q.prototype.pent=function(B,z){return this.pEntity(B,z)},q.prototype.not=function(B,z){return this.notation(B,z)},q}()}).call(jS)});var VS=U((GS,KS)=>{(function(){var t,e,r,i,n,s,o,u,l,d,h,m,b,S,y=function(C,w){for(var x in w)v.call(w,x)&&(C[x]=w[x]);function N(){this.constructor=C}return N.prototype=w.prototype,C.prototype=new N,C.__super__=w.prototype,C},v={}.hasOwnProperty;o=Ac(),u=Lc(),t=Tc(),e=Nc(),l=Rc(),h=Oc(),b=Bc(),d=Dc(),r=Mc(),i=Ic(),n=kc(),s=Pc(),S=vy(),KS.exports=m=function(C){y(w,C);function w(x,N){w.__super__.constructor.call(this,N),this.stream=x}return w.prototype.document=function(x){var N,I,q,B,z,D,se,le;for(D=x.children,I=0,B=D.length;I<B;I++)N=D[I],N.isLastRootNode=!1;for(x.children[x.children.length-1].isLastRootNode=!0,se=x.children,le=[],q=0,z=se.length;q<z;q++)switch(N=se[q],!1){case!(N instanceof o):le.push(this.declaration(N));break;case!(N instanceof u):le.push(this.docType(N));break;case!(N instanceof e):le.push(this.comment(N));break;case!(N instanceof d):le.push(this.processingInstruction(N));break;default:le.push(this.element(N))}return le},w.prototype.attribute=function(x){return this.stream.write(" "+x.name+'="'+x.value+'"')},w.prototype.cdata=function(x,N){return this.stream.write(this.space(N)+"<![CDATA["+x.text+"]]>"+this.endline(x))},w.prototype.comment=function(x,N){return this.stream.write(this.space(N)+"<!-- "+x.text+" -->"+this.endline(x))},w.prototype.declaration=function(x,N){return this.stream.write(this.space(N)),this.stream.write('<?xml version="'+x.version+'"'),x.encoding!=null&&this.stream.write(' encoding="'+x.encoding+'"'),x.standalone!=null&&this.stream.write(' standalone="'+x.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(x))},w.prototype.docType=function(x,N){var I,q,B,z;if(N||(N=0),this.stream.write(this.space(N)),this.stream.write("<!DOCTYPE "+x.root().name),x.pubID&&x.sysID?this.stream.write(' PUBLIC "'+x.pubID+'" "'+x.sysID+'"'):x.sysID&&this.stream.write(' SYSTEM "'+x.sysID+'"'),x.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(x)),z=x.children,q=0,B=z.length;q<B;q++)switch(I=z[q],!1){case!(I instanceof r):this.dtdAttList(I,N+1);break;case!(I instanceof i):this.dtdElement(I,N+1);break;case!(I instanceof n):this.dtdEntity(I,N+1);break;case!(I instanceof s):this.dtdNotation(I,N+1);break;case!(I instanceof t):this.cdata(I,N+1);break;case!(I instanceof e):this.comment(I,N+1);break;case!(I instanceof d):this.processingInstruction(I,N+1);break;default:throw new Error("Unknown DTD node type: "+I.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(x))},w.prototype.element=function(x,N){var I,q,B,z,D,se,le,te;N||(N=0),te=this.space(N),this.stream.write(te+"<"+x.name),se=x.attributes;for(D in se)!v.call(se,D)||(I=se[D],this.attribute(I));if(x.children.length===0||x.children.every(function(ve){return ve.value===""}))this.allowEmpty?this.stream.write("></"+x.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&x.children.length===1&&x.children[0].value!=null)this.stream.write(">"),this.stream.write(x.children[0].value),this.stream.write("</"+x.name+">");else{for(this.stream.write(">"+this.newline),le=x.children,B=0,z=le.length;B<z;B++)switch(q=le[B],!1){case!(q instanceof t):this.cdata(q,N+1);break;case!(q instanceof e):this.comment(q,N+1);break;case!(q instanceof l):this.element(q,N+1);break;case!(q instanceof h):this.raw(q,N+1);break;case!(q instanceof b):this.text(q,N+1);break;case!(q instanceof d):this.processingInstruction(q,N+1);break;default:throw new Error("Unknown XML node type: "+q.constructor.name)}this.stream.write(te+"</"+x.name+">")}return this.stream.write(this.endline(x))},w.prototype.processingInstruction=function(x,N){return this.stream.write(this.space(N)+"<?"+x.target),x.value&&this.stream.write(" "+x.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(x))},w.prototype.raw=function(x,N){return this.stream.write(this.space(N)+x.value+this.endline(x))},w.prototype.text=function(x,N){return this.stream.write(this.space(N)+x.value+this.endline(x))},w.prototype.dtdAttList=function(x,N){return this.stream.write(this.space(N)+"<!ATTLIST "+x.elementName+" "+x.attributeName+" "+x.attributeType),x.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+x.defaultValueType),x.defaultValue&&this.stream.write(' "'+x.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(x))},w.prototype.dtdElement=function(x,N){return this.stream.write(this.space(N)+"<!ELEMENT "+x.name+" "+x.value),this.stream.write(this.spacebeforeslash+">"+this.endline(x))},w.prototype.dtdEntity=function(x,N){return this.stream.write(this.space(N)+"<!ENTITY"),x.pe&&this.stream.write(" %"),this.stream.write(" "+x.name),x.value?this.stream.write(' "'+x.value+'"'):(x.pubID&&x.sysID?this.stream.write(' PUBLIC "'+x.pubID+'" "'+x.sysID+'"'):x.sysID&&this.stream.write(' SYSTEM "'+x.sysID+'"'),x.nData&&this.stream.write(" NDATA "+x.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(x))},w.prototype.dtdNotation=function(x,N){return this.stream.write(this.space(N)+"<!NOTATION "+x.name),x.pubID&&x.sysID?this.stream.write(' PUBLIC "'+x.pubID+'" "'+x.sysID+'"'):x.pubID?this.stream.write(' PUBLIC "'+x.pubID+'"'):x.sysID&&this.stream.write(' SYSTEM "'+x.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(x))},w.prototype.endline=function(x){return x.isLastRootNode?"":this.newline},w}(S)}).call(GS)});var XS=U(($S,qc)=>{(function(){var t,e,r,i,n,s,o;o=rs(),n=o.assign,s=o.isFunction,t=US(),e=WS(),i=bh(),r=VS(),qc.exports.create=function(u,l,d,h){var m,b;if(u==null)throw new Error("Root element needs a name");return h=n({},l,d,h),m=new t(h),b=m.element(u),h.headless||(m.declaration(h),(h.pubID!=null||h.sysID!=null)&&m.doctype(h)),b},qc.exports.begin=function(u,l,d){var h;return s(u)&&(h=[u,l],l=h[0],d=h[1],u={}),l?new e(u,l,d):new t(u)},qc.exports.stringWriter=function(u){return new i(u)},qc.exports.streamWriter=function(u,l){return new r(u,l)}}).call($S)});var JS=U(by=>{(function(){"use strict";var t,e,r,i,n,s={}.hasOwnProperty;t=XS(),e=vh().defaults,i=function(o){return typeof o=="string"&&(o.indexOf("&")>=0||o.indexOf(">")>=0||o.indexOf("<")>=0)},n=function(o){return"<![CDATA["+r(o)+"]]>"},r=function(o){return o.replace("]]>","]]]]><![CDATA[>")},by.Builder=function(){function o(u){var l,d,h;this.options={},d=e["0.2"];for(l in d)!s.call(d,l)||(h=d[l],this.options[l]=h);for(l in u)!s.call(u,l)||(h=u[l],this.options[l]=h)}return o.prototype.buildObject=function(u){var l,d,h,m,b;return l=this.options.attrkey,d=this.options.charkey,Object.keys(u).length===1&&this.options.rootName===e["0.2"].rootName?(b=Object.keys(u)[0],u=u[b]):b=this.options.rootName,h=function(S){return function(y,v){var C,w,x,N,I,q;if(typeof v!="object")S.options.cdata&&i(v)?y.raw(n(v)):y.txt(v);else if(Array.isArray(v)){for(N in v)if(!!s.call(v,N)){w=v[N];for(I in w)x=w[I],y=h(y.ele(I),x).up()}}else for(I in v)if(!!s.call(v,I))if(w=v[I],I===l){if(typeof w=="object")for(C in w)q=w[C],y=y.att(C,q)}else if(I===d)S.options.cdata&&i(w)?y=y.raw(n(w)):y=y.txt(w);else if(Array.isArray(w))for(N in w)!s.call(w,N)||(x=w[N],typeof x=="string"?S.options.cdata&&i(x)?y=y.ele(I).raw(n(x)).up():y=y.ele(I,x).up():y=h(y.ele(I),x).up());else typeof w=="object"?y=h(y.ele(I),w).up():typeof w=="string"&&S.options.cdata&&i(w)?y=y.ele(I).raw(n(w)).up():(w==null&&(w=""),y=y.ele(I,w.toString()).up());return y}}(this),m=t.create(b,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),h(m,u).end(this.options.renderOpts)},o}()}).call(by)});var YS=U(Sh=>{(function(t){t.parser=function(L,k){return new r(L,k)},t.SAXParser=r,t.SAXStream=d,t.createStream=l,t.MAX_BUFFER_LENGTH=64*1024;var e=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function r(L,k){if(!(this instanceof r))return new r(L,k);var J=this;n(J),J.q=J.c="",J.bufferCheckPosition=t.MAX_BUFFER_LENGTH,J.opt=k||{},J.opt.lowercase=J.opt.lowercase||J.opt.lowercasetags,J.looseCase=J.opt.lowercase?"toLowerCase":"toUpperCase",J.tags=[],J.closed=J.closedRoot=J.sawRoot=!1,J.tag=J.error=null,J.strict=!!L,J.noscript=!!(L||J.opt.noscript),J.state=D.BEGIN,J.strictEntities=J.opt.strictEntities,J.ENTITIES=J.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),J.attribList=[],J.opt.xmlns&&(J.ns=Object.create(y)),J.trackPosition=J.opt.position!==!1,J.trackPosition&&(J.position=J.line=J.column=0),le(J,"onready")}Object.create||(Object.create=function(L){function k(){}k.prototype=L;var J=new k;return J}),Object.keys||(Object.keys=function(L){var k=[];for(var J in L)L.hasOwnProperty(J)&&k.push(J);return k});function i(L){for(var k=Math.max(t.MAX_BUFFER_LENGTH,10),J=0,G=0,Le=e.length;G<Le;G++){var bt=L[e[G]].length;if(bt>k)switch(e[G]){case"textNode":ve(L);break;case"cdata":te(L,"oncdata",L.cdata),L.cdata="";break;case"script":te(L,"onscript",L.script),L.script="";break;default:Je(L,"Max buffer length exceeded: "+e[G])}J=Math.max(J,bt)}var Et=t.MAX_BUFFER_LENGTH-J;L.bufferCheckPosition=Et+L.position}function n(L){for(var k=0,J=e.length;k<J;k++)L[e[k]]=""}function s(L){ve(L),L.cdata!==""&&(te(L,"oncdata",L.cdata),L.cdata=""),L.script!==""&&(te(L,"onscript",L.script),L.script="")}r.prototype={end:function(){Mt(this)},write:Vi,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){s(this)}};var o;try{o=require("stream").Stream}catch{o=function(){}}var u=t.EVENTS.filter(function(L){return L!=="error"&&L!=="end"});function l(L,k){return new d(L,k)}function d(L,k){if(!(this instanceof d))return new d(L,k);o.apply(this),this._parser=new r(L,k),this.writable=!0,this.readable=!0;var J=this;this._parser.onend=function(){J.emit("end")},this._parser.onerror=function(G){J.emit("error",G),J._parser.error=null},this._decoder=null,u.forEach(function(G){Object.defineProperty(J,"on"+G,{get:function(){return J._parser["on"+G]},set:function(Le){if(!Le)return J.removeAllListeners(G),J._parser["on"+G]=Le,Le;J.on(G,Le)},enumerable:!0,configurable:!1})})}d.prototype=Object.create(o.prototype,{constructor:{value:d}}),d.prototype.write=function(L){if(typeof Buffer=="function"&&typeof Buffer.isBuffer=="function"&&Buffer.isBuffer(L)){if(!this._decoder){var k=require("string_decoder").StringDecoder;this._decoder=new k("utf8")}L=this._decoder.write(L)}return this._parser.write(L.toString()),this.emit("data",L),!0},d.prototype.end=function(L){return L&&L.length&&this.write(L),this._parser.end(),!0},d.prototype.on=function(L,k){var J=this;return!J._parser["on"+L]&&u.indexOf(L)!==-1&&(J._parser["on"+L]=function(){var G=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);G.splice(0,0,L),J.emit.apply(J,G)}),o.prototype.on.call(J,L,k)};var h="[CDATA[",m="DOCTYPE",b="http://www.w3.org/XML/1998/namespace",S="http://www.w3.org/2000/xmlns/",y={xml:b,xmlns:S},v=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,C=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,w=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,x=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function N(L){return L===" "||L===`
|
|
112
|
-
`||L==="\r"||L===" "}function I(L){return L==='"'||L==="'"}function q(L){return L===">"||N(L)}function B(L,k){return L.test(k)}function z(L,k){return!B(L,k)}var D=0;t.STATE={BEGIN:D++,BEGIN_WHITESPACE:D++,TEXT:D++,TEXT_ENTITY:D++,OPEN_WAKA:D++,SGML_DECL:D++,SGML_DECL_QUOTED:D++,DOCTYPE:D++,DOCTYPE_QUOTED:D++,DOCTYPE_DTD:D++,DOCTYPE_DTD_QUOTED:D++,COMMENT_STARTING:D++,COMMENT:D++,COMMENT_ENDING:D++,COMMENT_ENDED:D++,CDATA:D++,CDATA_ENDING:D++,CDATA_ENDING_2:D++,PROC_INST:D++,PROC_INST_BODY:D++,PROC_INST_ENDING:D++,OPEN_TAG:D++,OPEN_TAG_SLASH:D++,ATTRIB:D++,ATTRIB_NAME:D++,ATTRIB_NAME_SAW_WHITE:D++,ATTRIB_VALUE:D++,ATTRIB_VALUE_QUOTED:D++,ATTRIB_VALUE_CLOSED:D++,ATTRIB_VALUE_UNQUOTED:D++,ATTRIB_VALUE_ENTITY_Q:D++,ATTRIB_VALUE_ENTITY_U:D++,CLOSE_TAG:D++,CLOSE_TAG_SAW_WHITE:D++,SCRIPT:D++,SCRIPT_ENDING:D++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(L){var k=t.ENTITIES[L],J=typeof k=="number"?String.fromCharCode(k):k;t.ENTITIES[L]=J});for(var se in t.STATE)t.STATE[t.STATE[se]]=se;D=t.STATE;function le(L,k,J){L[k]&&L[k](J)}function te(L,k,J){L.textNode&&ve(L),le(L,k,J)}function ve(L){L.textNode=qe(L.opt,L.textNode),L.textNode&&le(L,"ontext",L.textNode),L.textNode=""}function qe(L,k){return L.trim&&(k=k.trim()),L.normalize&&(k=k.replace(/\s+/g," ")),k}function Je(L,k){return ve(L),L.trackPosition&&(k+=`
|
|
113
|
-
Line: `+L.line+`
|
|
114
|
-
Column: `+L.column+`
|
|
115
|
-
Char: `+L.c),k=new Error(k),L.error=k,le(L,"onerror",k),L}function Mt(L){return L.sawRoot&&!L.closedRoot&&Pe(L,"Unclosed root tag"),L.state!==D.BEGIN&&L.state!==D.BEGIN_WHITESPACE&&L.state!==D.TEXT&&Je(L,"Unexpected end"),ve(L),L.c="",L.closed=!0,le(L,"onend"),r.call(L,L.strict,L.opt),L}function Pe(L,k){if(typeof L!="object"||!(L instanceof r))throw new Error("bad call to strictFail");L.strict&&Je(L,k)}function Wr(L){L.strict||(L.tagName=L.tagName[L.looseCase]());var k=L.tags[L.tags.length-1]||L,J=L.tag={name:L.tagName,attributes:{}};L.opt.xmlns&&(J.ns=k.ns),L.attribList.length=0,te(L,"onopentagstart",J)}function vr(L,k){var J=L.indexOf(":"),G=J<0?["",L]:L.split(":"),Le=G[0],bt=G[1];return k&&L==="xmlns"&&(Le="xmlns",bt=""),{prefix:Le,local:bt}}function Gr(L){if(L.strict||(L.attribName=L.attribName[L.looseCase]()),L.attribList.indexOf(L.attribName)!==-1||L.tag.attributes.hasOwnProperty(L.attribName)){L.attribName=L.attribValue="";return}if(L.opt.xmlns){var k=vr(L.attribName,!0),J=k.prefix,G=k.local;if(J==="xmlns")if(G==="xml"&&L.attribValue!==b)Pe(L,"xml: prefix must be bound to "+b+`
|
|
116
|
-
Actual: `+L.attribValue);else if(G==="xmlns"&&L.attribValue!==S)Pe(L,"xmlns: prefix must be bound to "+S+`
|
|
117
|
-
Actual: `+L.attribValue);else{var Le=L.tag,bt=L.tags[L.tags.length-1]||L;Le.ns===bt.ns&&(Le.ns=Object.create(bt.ns)),Le.ns[G]=L.attribValue}L.attribList.push([L.attribName,L.attribValue])}else L.tag.attributes[L.attribName]=L.attribValue,te(L,"onattribute",{name:L.attribName,value:L.attribValue});L.attribName=L.attribValue=""}function Rt(L,k){if(L.opt.xmlns){var J=L.tag,G=vr(L.tagName);J.prefix=G.prefix,J.local=G.local,J.uri=J.ns[G.prefix]||"",J.prefix&&!J.uri&&(Pe(L,"Unbound namespace prefix: "+JSON.stringify(L.tagName)),J.uri=G.prefix);var Le=L.tags[L.tags.length-1]||L;J.ns&&Le.ns!==J.ns&&Object.keys(J.ns).forEach(function($r){te(L,"onopennamespace",{prefix:$r,uri:J.ns[$r]})});for(var bt=0,Et=L.attribList.length;bt<Et;bt++){var Jt=L.attribList[bt],br=Jt[0],Vr=Jt[1],Tt=vr(br,!0),Ut=Tt.prefix,Ne=Tt.local,ui=Ut===""?"":J.ns[Ut]||"",jt={name:br,value:Vr,prefix:Ut,local:Ne,uri:ui};Ut&&Ut!=="xmlns"&&!ui&&(Pe(L,"Unbound namespace prefix: "+JSON.stringify(Ut)),jt.uri=Ut),L.tag.attributes[br]=jt,te(L,"onattribute",jt)}L.attribList.length=0}L.tag.isSelfClosing=!!k,L.sawRoot=!0,L.tags.push(L.tag),te(L,"onopentag",L.tag),k||(!L.noscript&&L.tagName.toLowerCase()==="script"?L.state=D.SCRIPT:L.state=D.TEXT,L.tag=null,L.tagName=""),L.attribName=L.attribValue="",L.attribList.length=0}function Kr(L){if(!L.tagName){Pe(L,"Weird empty close tag."),L.textNode+="</>",L.state=D.TEXT;return}if(L.script){if(L.tagName!=="script"){L.script+="</"+L.tagName+">",L.tagName="",L.state=D.SCRIPT;return}te(L,"onscript",L.script),L.script=""}var k=L.tags.length,J=L.tagName;L.strict||(J=J[L.looseCase]());for(var G=J;k--;){var Le=L.tags[k];if(Le.name!==G)Pe(L,"Unexpected close tag");else break}if(k<0){Pe(L,"Unmatched closing tag: "+L.tagName),L.textNode+="</"+L.tagName+">",L.state=D.TEXT;return}L.tagName=J;for(var bt=L.tags.length;bt-- >k;){var Et=L.tag=L.tags.pop();L.tagName=L.tag.name,te(L,"onclosetag",L.tagName);var Jt={};for(var br in Et.ns)Jt[br]=Et.ns[br];var Vr=L.tags[L.tags.length-1]||L;L.opt.xmlns&&Et.ns!==Vr.ns&&Object.keys(Et.ns).forEach(function(Tt){var Ut=Et.ns[Tt];te(L,"onclosenamespace",{prefix:Tt,uri:Ut})})}k===0&&(L.closedRoot=!0),L.tagName=L.attribValue=L.attribName="",L.attribList.length=0,L.state=D.TEXT}function or(L){var k=L.entity,J=k.toLowerCase(),G,Le="";return L.ENTITIES[k]?L.ENTITIES[k]:L.ENTITIES[J]?L.ENTITIES[J]:(k=J,k.charAt(0)==="#"&&(k.charAt(1)==="x"?(k=k.slice(2),G=parseInt(k,16),Le=G.toString(16)):(k=k.slice(1),G=parseInt(k,10),Le=G.toString(10))),k=k.replace(/^0+/,""),isNaN(G)||Le.toLowerCase()!==k?(Pe(L,"Invalid character entity"),"&"+L.entity+";"):String.fromCodePoint(G))}function er(L,k){k==="<"?(L.state=D.OPEN_WAKA,L.startTagPosition=L.position):N(k)||(Pe(L,"Non-whitespace before first tag."),L.textNode=k,L.state=D.TEXT)}function wi(L,k){var J="";return k<L.length&&(J=L.charAt(k)),J}function Vi(L){var k=this;if(this.error)throw this.error;if(k.closed)return Je(k,"Cannot write after close. Assign an onready handler.");if(L===null)return Mt(k);typeof L=="object"&&(L=L.toString());for(var J=0,G="";G=wi(L,J++),k.c=G,!!G;)switch(k.trackPosition&&(k.position++,G===`
|
|
118
|
-
`?(k.line++,k.column=0):k.column++),k.state){case D.BEGIN:if(k.state=D.BEGIN_WHITESPACE,G==="\uFEFF")continue;er(k,G);continue;case D.BEGIN_WHITESPACE:er(k,G);continue;case D.TEXT:if(k.sawRoot&&!k.closedRoot){for(var Le=J-1;G&&G!=="<"&&G!=="&";)G=wi(L,J++),G&&k.trackPosition&&(k.position++,G===`
|
|
119
|
-
`?(k.line++,k.column=0):k.column++);k.textNode+=L.substring(Le,J-1)}G==="<"&&!(k.sawRoot&&k.closedRoot&&!k.strict)?(k.state=D.OPEN_WAKA,k.startTagPosition=k.position):(!N(G)&&(!k.sawRoot||k.closedRoot)&&Pe(k,"Text data outside of root node."),G==="&"?k.state=D.TEXT_ENTITY:k.textNode+=G);continue;case D.SCRIPT:G==="<"?k.state=D.SCRIPT_ENDING:k.script+=G;continue;case D.SCRIPT_ENDING:G==="/"?k.state=D.CLOSE_TAG:(k.script+="<"+G,k.state=D.SCRIPT);continue;case D.OPEN_WAKA:if(G==="!")k.state=D.SGML_DECL,k.sgmlDecl="";else if(!N(G))if(B(v,G))k.state=D.OPEN_TAG,k.tagName=G;else if(G==="/")k.state=D.CLOSE_TAG,k.tagName="";else if(G==="?")k.state=D.PROC_INST,k.procInstName=k.procInstBody="";else{if(Pe(k,"Unencoded <"),k.startTagPosition+1<k.position){var bt=k.position-k.startTagPosition;G=new Array(bt).join(" ")+G}k.textNode+="<"+G,k.state=D.TEXT}continue;case D.SGML_DECL:(k.sgmlDecl+G).toUpperCase()===h?(te(k,"onopencdata"),k.state=D.CDATA,k.sgmlDecl="",k.cdata=""):k.sgmlDecl+G==="--"?(k.state=D.COMMENT,k.comment="",k.sgmlDecl=""):(k.sgmlDecl+G).toUpperCase()===m?(k.state=D.DOCTYPE,(k.doctype||k.sawRoot)&&Pe(k,"Inappropriately located doctype declaration"),k.doctype="",k.sgmlDecl=""):G===">"?(te(k,"onsgmldeclaration",k.sgmlDecl),k.sgmlDecl="",k.state=D.TEXT):(I(G)&&(k.state=D.SGML_DECL_QUOTED),k.sgmlDecl+=G);continue;case D.SGML_DECL_QUOTED:G===k.q&&(k.state=D.SGML_DECL,k.q=""),k.sgmlDecl+=G;continue;case D.DOCTYPE:G===">"?(k.state=D.TEXT,te(k,"ondoctype",k.doctype),k.doctype=!0):(k.doctype+=G,G==="["?k.state=D.DOCTYPE_DTD:I(G)&&(k.state=D.DOCTYPE_QUOTED,k.q=G));continue;case D.DOCTYPE_QUOTED:k.doctype+=G,G===k.q&&(k.q="",k.state=D.DOCTYPE);continue;case D.DOCTYPE_DTD:k.doctype+=G,G==="]"?k.state=D.DOCTYPE:I(G)&&(k.state=D.DOCTYPE_DTD_QUOTED,k.q=G);continue;case D.DOCTYPE_DTD_QUOTED:k.doctype+=G,G===k.q&&(k.state=D.DOCTYPE_DTD,k.q="");continue;case D.COMMENT:G==="-"?k.state=D.COMMENT_ENDING:k.comment+=G;continue;case D.COMMENT_ENDING:G==="-"?(k.state=D.COMMENT_ENDED,k.comment=qe(k.opt,k.comment),k.comment&&te(k,"oncomment",k.comment),k.comment=""):(k.comment+="-"+G,k.state=D.COMMENT);continue;case D.COMMENT_ENDED:G!==">"?(Pe(k,"Malformed comment"),k.comment+="--"+G,k.state=D.COMMENT):k.state=D.TEXT;continue;case D.CDATA:G==="]"?k.state=D.CDATA_ENDING:k.cdata+=G;continue;case D.CDATA_ENDING:G==="]"?k.state=D.CDATA_ENDING_2:(k.cdata+="]"+G,k.state=D.CDATA);continue;case D.CDATA_ENDING_2:G===">"?(k.cdata&&te(k,"oncdata",k.cdata),te(k,"onclosecdata"),k.cdata="",k.state=D.TEXT):G==="]"?k.cdata+="]":(k.cdata+="]]"+G,k.state=D.CDATA);continue;case D.PROC_INST:G==="?"?k.state=D.PROC_INST_ENDING:N(G)?k.state=D.PROC_INST_BODY:k.procInstName+=G;continue;case D.PROC_INST_BODY:if(!k.procInstBody&&N(G))continue;G==="?"?k.state=D.PROC_INST_ENDING:k.procInstBody+=G;continue;case D.PROC_INST_ENDING:G===">"?(te(k,"onprocessinginstruction",{name:k.procInstName,body:k.procInstBody}),k.procInstName=k.procInstBody="",k.state=D.TEXT):(k.procInstBody+="?"+G,k.state=D.PROC_INST_BODY);continue;case D.OPEN_TAG:B(C,G)?k.tagName+=G:(Wr(k),G===">"?Rt(k):G==="/"?k.state=D.OPEN_TAG_SLASH:(N(G)||Pe(k,"Invalid character in tag name"),k.state=D.ATTRIB));continue;case D.OPEN_TAG_SLASH:G===">"?(Rt(k,!0),Kr(k)):(Pe(k,"Forward-slash in opening tag not followed by >"),k.state=D.ATTRIB);continue;case D.ATTRIB:if(N(G))continue;G===">"?Rt(k):G==="/"?k.state=D.OPEN_TAG_SLASH:B(v,G)?(k.attribName=G,k.attribValue="",k.state=D.ATTRIB_NAME):Pe(k,"Invalid attribute name");continue;case D.ATTRIB_NAME:G==="="?k.state=D.ATTRIB_VALUE:G===">"?(Pe(k,"Attribute without value"),k.attribValue=k.attribName,Gr(k),Rt(k)):N(G)?k.state=D.ATTRIB_NAME_SAW_WHITE:B(C,G)?k.attribName+=G:Pe(k,"Invalid attribute name");continue;case D.ATTRIB_NAME_SAW_WHITE:if(G==="=")k.state=D.ATTRIB_VALUE;else{if(N(G))continue;Pe(k,"Attribute without value"),k.tag.attributes[k.attribName]="",k.attribValue="",te(k,"onattribute",{name:k.attribName,value:""}),k.attribName="",G===">"?Rt(k):B(v,G)?(k.attribName=G,k.state=D.ATTRIB_NAME):(Pe(k,"Invalid attribute name"),k.state=D.ATTRIB)}continue;case D.ATTRIB_VALUE:if(N(G))continue;I(G)?(k.q=G,k.state=D.ATTRIB_VALUE_QUOTED):(Pe(k,"Unquoted attribute value"),k.state=D.ATTRIB_VALUE_UNQUOTED,k.attribValue=G);continue;case D.ATTRIB_VALUE_QUOTED:if(G!==k.q){G==="&"?k.state=D.ATTRIB_VALUE_ENTITY_Q:k.attribValue+=G;continue}Gr(k),k.q="",k.state=D.ATTRIB_VALUE_CLOSED;continue;case D.ATTRIB_VALUE_CLOSED:N(G)?k.state=D.ATTRIB:G===">"?Rt(k):G==="/"?k.state=D.OPEN_TAG_SLASH:B(v,G)?(Pe(k,"No whitespace between attributes"),k.attribName=G,k.attribValue="",k.state=D.ATTRIB_NAME):Pe(k,"Invalid attribute name");continue;case D.ATTRIB_VALUE_UNQUOTED:if(!q(G)){G==="&"?k.state=D.ATTRIB_VALUE_ENTITY_U:k.attribValue+=G;continue}Gr(k),G===">"?Rt(k):k.state=D.ATTRIB;continue;case D.CLOSE_TAG:if(k.tagName)G===">"?Kr(k):B(C,G)?k.tagName+=G:k.script?(k.script+="</"+k.tagName,k.tagName="",k.state=D.SCRIPT):(N(G)||Pe(k,"Invalid tagname in closing tag"),k.state=D.CLOSE_TAG_SAW_WHITE);else{if(N(G))continue;z(v,G)?k.script?(k.script+="</"+G,k.state=D.SCRIPT):Pe(k,"Invalid tagname in closing tag."):k.tagName=G}continue;case D.CLOSE_TAG_SAW_WHITE:if(N(G))continue;G===">"?Kr(k):Pe(k,"Invalid characters in closing tag");continue;case D.TEXT_ENTITY:case D.ATTRIB_VALUE_ENTITY_Q:case D.ATTRIB_VALUE_ENTITY_U:var Et,Jt;switch(k.state){case D.TEXT_ENTITY:Et=D.TEXT,Jt="textNode";break;case D.ATTRIB_VALUE_ENTITY_Q:Et=D.ATTRIB_VALUE_QUOTED,Jt="attribValue";break;case D.ATTRIB_VALUE_ENTITY_U:Et=D.ATTRIB_VALUE_UNQUOTED,Jt="attribValue";break}G===";"?(k[Jt]+=or(k),k.entity="",k.state=Et):B(k.entity.length?x:w,G)?k.entity+=G:(Pe(k,"Invalid character in entity name"),k[Jt]+="&"+k.entity+G,k.entity="",k.state=Et);continue;default:throw new Error(k,"Unknown state: "+k.state)}return k.position>=k.bufferCheckPosition&&i(k),k}String.fromCodePoint||function(){var L=String.fromCharCode,k=Math.floor,J=function(){var G=16384,Le=[],bt,Et,Jt=-1,br=arguments.length;if(!br)return"";for(var Vr="";++Jt<br;){var Tt=Number(arguments[Jt]);if(!isFinite(Tt)||Tt<0||Tt>1114111||k(Tt)!==Tt)throw RangeError("Invalid code point: "+Tt);Tt<=65535?Le.push(Tt):(Tt-=65536,bt=(Tt>>10)+55296,Et=Tt%1024+56320,Le.push(bt,Et)),(Jt+1===br||Le.length>G)&&(Vr+=L.apply(null,Le),Le.length=0)}return Vr};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:J,configurable:!0,writable:!0}):String.fromCodePoint=J}()})(typeof Sh>"u"?Sh.sax={}:Sh)});var ZS=U(Sy=>{(function(){"use strict";Sy.stripBOM=function(t){return t[0]==="\uFEFF"?t.substring(1):t}}).call(Sy)});var xy=U(ua=>{(function(){"use strict";var t;t=new RegExp(/(?!xmlns)^.*:/),ua.normalize=function(e){return e.toLowerCase()},ua.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},ua.stripPrefix=function(e){return e.replace(t,"")},ua.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},ua.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e=e.toLowerCase()==="true"),e}}).call(ua)});var QS=U(la=>{(function(){"use strict";var t,e,r,i,n,s,o,u,l=function(m,b){return function(){return m.apply(b,arguments)}},d=function(m,b){for(var S in b)h.call(b,S)&&(m[S]=b[S]);function y(){this.constructor=m}return y.prototype=b.prototype,m.prototype=new y,m.__super__=b.prototype,m},h={}.hasOwnProperty;o=YS(),r=require("events"),t=ZS(),s=xy(),u=require("timers").setImmediate,e=vh().defaults,i=function(m){return typeof m=="object"&&m!=null&&Object.keys(m).length===0},n=function(m,b,S){var y,v,C;for(y=0,v=m.length;y<v;y++)C=m[y],b=C(b,S);return b},la.Parser=function(m){d(b,m);function b(S){this.parseString=l(this.parseString,this),this.reset=l(this.reset,this),this.assignOrPush=l(this.assignOrPush,this),this.processAsync=l(this.processAsync,this);var y,v,C;if(!(this instanceof la.Parser))return new la.Parser(S);this.options={},v=e["0.2"];for(y in v)!h.call(v,y)||(C=v[y],this.options[y]=C);for(y in S)!h.call(S,y)||(C=S[y],this.options[y]=C);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(s.normalize)),this.reset()}return b.prototype.processAsync=function(){var S,y;try{return this.remaining.length<=this.options.chunkSize?(S=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(S),this.saxParser.close()):(S=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(S),u(this.processAsync))}catch(v){if(y=v,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(y)}},b.prototype.assignOrPush=function(S,y,v){return y in S?(S[y]instanceof Array||(S[y]=[S[y]]),S[y].push(v)):this.options.explicitArray?S[y]=[v]:S[y]=v},b.prototype.reset=function(){var S,y,v,C;return this.removeAllListeners(),this.saxParser=o.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(w){return function(x){if(w.saxParser.resume(),!w.saxParser.errThrown)return w.saxParser.errThrown=!0,w.emit("error",x)}}(this),this.saxParser.onend=function(w){return function(){if(!w.saxParser.ended)return w.saxParser.ended=!0,w.emit("end",w.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,C=[],S=this.options.attrkey,y=this.options.charkey,this.saxParser.onopentag=function(w){return function(x){var N,I,q,B,z;if(q={},q[y]="",!w.options.ignoreAttrs){z=x.attributes;for(N in z)!h.call(z,N)||(!(S in q)&&!w.options.mergeAttrs&&(q[S]={}),I=w.options.attrValueProcessors?n(w.options.attrValueProcessors,x.attributes[N],N):x.attributes[N],B=w.options.attrNameProcessors?n(w.options.attrNameProcessors,N):N,w.options.mergeAttrs?w.assignOrPush(q,B,I):q[S][B]=I)}return q["#name"]=w.options.tagNameProcessors?n(w.options.tagNameProcessors,x.name):x.name,w.options.xmlns&&(q[w.options.xmlnskey]={uri:x.uri,local:x.local}),C.push(q)}}(this),this.saxParser.onclosetag=function(w){return function(){var x,N,I,q,B,z,D,se,le,te;if(z=C.pop(),B=z["#name"],(!w.options.explicitChildren||!w.options.preserveChildrenOrder)&&delete z["#name"],z.cdata===!0&&(x=z.cdata,delete z.cdata),le=C[C.length-1],z[y].match(/^\s*$/)&&!x?(N=z[y],delete z[y]):(w.options.trim&&(z[y]=z[y].trim()),w.options.normalize&&(z[y]=z[y].replace(/\s{2,}/g," ").trim()),z[y]=w.options.valueProcessors?n(w.options.valueProcessors,z[y],B):z[y],Object.keys(z).length===1&&y in z&&!w.EXPLICIT_CHARKEY&&(z=z[y])),i(z)&&(z=w.options.emptyTag!==""?w.options.emptyTag:N),w.options.validator!=null&&(te="/"+function(){var ve,qe,Je;for(Je=[],ve=0,qe=C.length;ve<qe;ve++)q=C[ve],Je.push(q["#name"]);return Je}().concat(B).join("/"),function(){var ve;try{return z=w.options.validator(te,le&&le[B],z)}catch(qe){return ve=qe,w.emit("error",ve)}}()),w.options.explicitChildren&&!w.options.mergeAttrs&&typeof z=="object"){if(!w.options.preserveChildrenOrder)q={},w.options.attrkey in z&&(q[w.options.attrkey]=z[w.options.attrkey],delete z[w.options.attrkey]),!w.options.charsAsChildren&&w.options.charkey in z&&(q[w.options.charkey]=z[w.options.charkey],delete z[w.options.charkey]),Object.getOwnPropertyNames(z).length>0&&(q[w.options.childkey]=z),z=q;else if(le){le[w.options.childkey]=le[w.options.childkey]||[],D={};for(I in z)!h.call(z,I)||(D[I]=z[I]);le[w.options.childkey].push(D),delete z["#name"],Object.keys(z).length===1&&y in z&&!w.EXPLICIT_CHARKEY&&(z=z[y])}}return C.length>0?w.assignOrPush(le,B,z):(w.options.explicitRoot&&(se=z,z={},z[B]=se),w.resultObject=z,w.saxParser.ended=!0,w.emit("end",w.resultObject))}}(this),v=function(w){return function(x){var N,I;if(I=C[C.length-1],I)return I[y]+=x,w.options.explicitChildren&&w.options.preserveChildrenOrder&&w.options.charsAsChildren&&(w.options.includeWhiteChars||x.replace(/\\n/g,"").trim()!=="")&&(I[w.options.childkey]=I[w.options.childkey]||[],N={"#name":"__text__"},N[y]=x,w.options.normalize&&(N[y]=N[y].replace(/\s{2,}/g," ").trim()),I[w.options.childkey].push(N)),I}}(this),this.saxParser.ontext=v,this.saxParser.oncdata=function(w){return function(x){var N;if(N=v(x),N)return N.cdata=!0}}(this)},b.prototype.parseString=function(S,y){var v;y!=null&&typeof y=="function"&&(this.on("end",function(C){return this.reset(),y(null,C)}),this.on("error",function(C){return this.reset(),y(C)}));try{return S=S.toString(),S.trim()===""?(this.emit("end",null),!0):(S=t.stripBOM(S),this.options.async?(this.remaining=S,u(this.processAsync),this.saxParser):this.saxParser.write(S).close())}catch(C){if(v=C,this.saxParser.errThrown||this.saxParser.ended){if(this.saxParser.ended)throw v}else return this.emit("error",v),this.saxParser.errThrown=!0}},b}(r.EventEmitter),la.parseString=function(m,b,S){var y,v,C;return S!=null?(typeof S=="function"&&(y=S),typeof b=="object"&&(v=b)):(typeof b=="function"&&(y=b),v={}),C=new la.Parser(v),C.parseString(m,y)}}).call(la)});var e8=U(Ys=>{(function(){"use strict";var t,e,r,i,n=function(o,u){for(var l in u)s.call(u,l)&&(o[l]=u[l]);function d(){this.constructor=o}return d.prototype=u.prototype,o.prototype=new d,o.__super__=u.prototype,o},s={}.hasOwnProperty;e=vh(),t=JS(),r=QS(),i=xy(),Ys.defaults=e.defaults,Ys.processors=i,Ys.ValidationError=function(o){n(u,o);function u(l){this.message=l}return u}(Error),Ys.Builder=t.Builder,Ys.Parser=r.Parser,Ys.parseString=r.parseString}).call(Ys)});var o8=U((xG,s8)=>{var t8=me(),zc=t8.util,vL=t8.Model.Shape,bL=e8(),SL={explicitCharkey:!1,trim:!1,normalize:!1,explicitRoot:!1,emptyTag:null,explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,validator:null};function r8(){}r8.prototype.parse=function(t,e){e=e||{};var r=null,i=null,n=new bL.Parser(SL);if(n.parseString(t,function(o,u){i=o,r=u}),r){var s=is(r,e);return r.ResponseMetadata&&(s.ResponseMetadata=is(r.ResponseMetadata[0],{})),s}else{if(i)throw zc.error(i,{code:"XMLParserError",retryable:!0});return is({},e)}};function is(t,e){switch(e.type){case"structure":return xL(t,e);case"map":return wL(t,e);case"list":return i8(t,e);case void 0:case null:return EL(t);default:return n8(t,e)}}function xL(t,e){var r={};return t===null||zc.each(e.members,function(i,n){var s=n.name;if(Object.prototype.hasOwnProperty.call(t,s)&&Array.isArray(t[s])){var o=t[s];n.flattened||(o=o[0]),r[i]=is(o,n)}else n.isXmlAttribute&&t.$&&Object.prototype.hasOwnProperty.call(t.$,s)?r[i]=n8(t.$[s],n):n.type==="list"&&!e.api.xmlNoDefaultLists&&(r[i]=n.defaultValue)}),r}function wL(t,e){var r={};if(t===null)return r;var i=e.key.name||"key",n=e.value.name||"value",s=e.flattened?t:t.entry;return Array.isArray(s)&&zc.arrayEach(s,function(o){r[o[i][0]]=is(o[n][0],e.value)}),r}function i8(t,e){var r=[],i=e.member.name||"member";return e.flattened?zc.arrayEach(t,function(n){r.push(is(n,e.member))}):t&&Array.isArray(t[i])&&zc.arrayEach(t[i],function(n){r.push(is(n,e.member))}),r}function n8(t,e){return t&&t.$&&t.$.encoding==="base64"&&(e=new vL.create({type:t.$.encoding})),t&&t._&&(t=t._),typeof e.toType=="function"?e.toType(t):t}function EL(t){if(t==null)return"";if(typeof t=="string")return t;if(Array.isArray(t)){var e=[];for(i=0;i<t.length;i++)e.push(is(t[i],{}));return e}var r=Object.keys(t),i;if(r.length===0||r.length===1&&r[0]==="$")return{};var n={};for(i=0;i<r.length;i++){var s=r[i],o=t[s];s!=="$"&&(o.length>1?n[s]=i8(o,{member:{}}):n[s]=is(o[0],{}))}return n}s8.exports=r8});var u8=U(()=>{var Zt=me(),_L=Zt.util.stream.Stream,a8=Zt.util.stream.Transform,CL=Zt.util.stream.Readable;nh();var RL="AWS_NODEJS_CONNECTION_REUSE_ENABLED";Zt.NodeHttpClient=Zt.util.inherit({handleRequest:function(e,r,i,n){var s=this,o=e.endpoint,u="";r||(r={}),r.proxy&&(u=o.protocol+"//"+o.hostname,o.port!==80&&o.port!==443&&(u+=":"+o.port),o=new Zt.Endpoint(r.proxy));var l=o.protocol==="https:",d=l?require("https"):require("http"),h={host:o.hostname,port:o.port,method:e.method,headers:e.headers,path:u+e.path};r.agent||(h.agent=this.getAgent(l,{keepAlive:process.env[RL]==="1"})),Zt.util.update(h,r),delete h.proxy,delete h.timeout;var m=d.request(h,function(y){m.didCallback||(i(y),y.emit("headers",y.statusCode,y.headers,y.statusMessage))});if(e.stream=m,m.didCallback=!1,r.connectTimeout){var b;m.on("socket",function(y){y.connecting&&(b=setTimeout(function(){m.didCallback||(m.didCallback=!0,m.abort(),n(Zt.util.error(new Error("Socket timed out without establishing a connection"),{code:"TimeoutError"})))},r.connectTimeout),y.on("connect",function(){clearTimeout(b),b=null}))})}m.setTimeout(r.timeout||0,function(){if(!m.didCallback){m.didCallback=!0;var y="Connection timed out after "+r.timeout+"ms";n(Zt.util.error(new Error(y),{code:"TimeoutError"})),m.abort()}}),m.on("error",function(){b&&(clearTimeout(b),b=null),!m.didCallback&&(m.didCallback=!0,n.apply(m,arguments))});var S=e.headers.Expect||e.headers.expect;return S==="100-continue"?m.once("continue",function(){s.writeBody(m,e)}):this.writeBody(m,e),m},writeBody:function(e,r){var i=r.body,n=parseInt(r.headers["Content-Length"],10);if(i instanceof _L){var s=this.progressStream(e,n);s?i.pipe(s).pipe(e):i.pipe(e)}else i?(e.once("finish",function(){e.emit("sendProgress",{loaded:n,total:n})}),e.end(i)):e.end()},getAgent:function(e,r){var i=e?require("https"):require("http");return e?(Zt.NodeHttpClient.sslAgent||(Zt.NodeHttpClient.sslAgent=new i.Agent(Zt.util.merge({rejectUnauthorized:process.env.NODE_TLS_REJECT_UNAUTHORIZED!=="0"},r||{})),Zt.NodeHttpClient.sslAgent.setMaxListeners(0),Object.defineProperty(Zt.NodeHttpClient.sslAgent,"maxSockets",{enumerable:!0,get:function(){var n=50,s=i.globalAgent;return s&&s.maxSockets!==1/0&&typeof s.maxSockets=="number"?s.maxSockets:n}})),Zt.NodeHttpClient.sslAgent):(Zt.NodeHttpClient.agent||(Zt.NodeHttpClient.agent=new i.Agent(r)),Zt.NodeHttpClient.agent)},progressStream:function(e,r){if(!(typeof a8>"u")){var i=0,n=new a8;return n._transform=function(s,o,u){s&&(i+=s.length,e.emit("sendProgress",{loaded:i,total:r})),u(null,s)},n}},emitter:null});Zt.HttpClient.prototype=Zt.NodeHttpClient.prototype;Zt.HttpClient.streamsApiVersion=CL?2:1});var l8=U(()=>{var Oi=me(),TL=require("fs"),NL=Js(),AL=Oi.util.iniLoader;Oi.TokenFileWebIdentityCredentials=Oi.util.inherit(Oi.Credentials,{constructor:function(e){Oi.Credentials.call(this),this.data=null,this.clientConfig=Oi.util.copy(e||{})},getParamsFromEnv:function(){var e="AWS_WEB_IDENTITY_TOKEN_FILE",r="AWS_ROLE_ARN";if(process.env[e]&&process.env[r])return[{envTokenFile:process.env[e],roleArn:process.env[r],roleSessionName:process.env.AWS_ROLE_SESSION_NAME}]},getParamsFromSharedConfig:function(){var e=Oi.util.getProfilesFromSharedConfig(AL),r=process.env.AWS_PROFILE||Oi.util.defaultProfile,i=e[r]||{};if(Object.keys(i).length===0)throw Oi.util.error(new Error("Profile "+r+" not found"),{code:"TokenFileWebIdentityCredentialsProviderFailure"});for(var n=[];!i.web_identity_token_file&&i.source_profile;){n.unshift({roleArn:i.role_arn,roleSessionName:i.role_session_name});var s=i.source_profile;i=e[s]}return n.unshift({envTokenFile:i.web_identity_token_file,roleArn:i.role_arn,roleSessionName:i.role_session_name}),n},refresh:function(e){this.coalesceRefresh(e||Oi.util.fn.callback)},assumeRoleChaining:function(e,r){var i=this;if(e.length===0)i.service.credentialsFrom(i.data,i),r();else{var n=e.shift();i.service.config.credentials=i.service.credentialsFrom(i.data,i),i.service.assumeRole({RoleArn:n.roleArn,RoleSessionName:n.roleSessionName||"token-file-web-identity"},function(s,o){i.data=null,s?r(s):(i.data=o,i.assumeRoleChaining(e,r))})}},load:function(e){var r=this;try{var i=r.getParamsFromEnv();if(i||(i=r.getParamsFromSharedConfig()),i){var n=i.shift(),s=TL.readFileSync(n.envTokenFile,{encoding:"ascii"});r.service||r.createClients(),r.service.assumeRoleWithWebIdentity({WebIdentityToken:s,RoleArn:n.roleArn,RoleSessionName:n.roleSessionName||"token-file-web-identity"},function(o,u){r.data=null,o?e(o):(r.data=u,r.assumeRoleChaining(i,e))})}}catch(o){e(o)}},createClients:function(){if(!this.service){var t=Oi.util.merge({},this.clientConfig);this.service=new NL(t),this.service.retryableError=function(e){return e.code==="IDPCommunicationErrorException"||e.code==="InvalidIdentityToken"?!0:Oi.Service.prototype.retryableError.call(this,e)}}}})});var f8=U((RG,c8)=>{var nn=me();nh();var ML=nn.util.inherit;nn.MetadataService=ML({host:"169.254.169.254",httpOptions:{timeout:0},disableFetchToken:!1,constructor:function(e){nn.util.update(this,e)},request:function(e,r,i){if(arguments.length===2&&(i=r,r={}),process.env[nn.util.imdsDisabledEnv]){i(new Error("EC2 Instance Metadata Service access disabled"));return}e=e||"/";var n=new nn.HttpRequest("http://"+this.host+e);n.method=r.method||"GET",r.headers&&(n.headers=r.headers),nn.util.handleRequestWithRetries(n,this,i)},loadCredentialsCallbacks:[],fetchMetadataToken:function(e){var r=this,i="/latest/api/token";r.request(i,{method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}},e)},fetchCredentials:function(e,r){var i=this,n="/latest/meta-data/iam/security-credentials/";i.request(n,e,function(s,o){if(s){i.disableFetchToken=s.statusCode!==401,r(nn.util.error(s,{message:"EC2 Metadata roleName request returned error"}));return}o=o.split(`
|
|
120
|
-
`)[0],i.request(n+o,e,function(u,l){if(u){i.disableFetchToken=u.statusCode!==401,r(nn.util.error(u,{message:"EC2 Metadata creds request returned error"}));return}try{var d=JSON.parse(l);r(null,d)}catch(h){r(h)}})})},loadCredentials:function(e){var r=this;if(r.loadCredentialsCallbacks.push(e),r.loadCredentialsCallbacks.length>1)return;function i(n,s){for(var o;(o=r.loadCredentialsCallbacks.shift())!==void 0;)o(n,s)}r.disableFetchToken?r.fetchCredentials({},i):r.fetchMetadataToken(function(n,s){if(n){if(n.code==="TimeoutError")r.disableFetchToken=!0;else if(n.retryable===!0){i(nn.util.error(n,{message:"EC2 Metadata token request returned error"}));return}else if(n.statusCode===400){i(nn.util.error(n,{message:"EC2 Metadata token request returned 400"}));return}}var o={};s&&(o.headers={"x-aws-ec2-metadata-token":s}),r.fetchCredentials(o,i)})}});c8.exports=nn.MetadataService});var h8=U(()=>{var sn=me();f8();sn.EC2MetadataCredentials=sn.util.inherit(sn.Credentials,{constructor:function(e){sn.Credentials.call(this),e=e?sn.util.copy(e):{},e=sn.util.merge({maxRetries:this.defaultMaxRetries},e),e.httpOptions||(e.httpOptions={}),e.httpOptions=sn.util.merge({timeout:this.defaultTimeout,connectTimeout:this.defaultConnectTimeout},e.httpOptions),this.metadataService=new sn.MetadataService(e),this.metadata={}},defaultTimeout:1e3,defaultConnectTimeout:1e3,defaultMaxRetries:3,refresh:function(e){this.coalesceRefresh(e||sn.util.fn.callback)},load:function(e){var r=this;r.metadataService.loadCredentials(function(i,n){if(!i){var s=sn.util.date.getDate(),o=new Date(n.Expiration);o<s?i=sn.util.error(new Error("EC2 Instance Metadata Serivce provided expired credentials"),{code:"EC2MetadataCredentialsProviderFailure"}):(r.expired=!1,r.metadata=n,r.accessKeyId=n.AccessKeyId,r.secretAccessKey=n.SecretAccessKey,r.sessionToken=n.Token,r.expireTime=o)}e(i)})}})});var m8=U(()=>{var mr=me(),wy="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",xh="AWS_CONTAINER_CREDENTIALS_FULL_URI",kL="AWS_CONTAINER_AUTHORIZATION_TOKEN",IL=["https:"],d8=["http:","https:"],p8=["localhost","127.0.0.1"],PL="169.254.170.2";mr.RemoteCredentials=mr.util.inherit(mr.Credentials,{constructor:function(e){mr.Credentials.call(this),e=e?mr.util.copy(e):{},e.httpOptions||(e.httpOptions={}),e.httpOptions=mr.util.merge(this.httpOptions,e.httpOptions),mr.util.update(this,e)},httpOptions:{timeout:1e3},maxRetries:3,isConfiguredForEcsCredentials:function(){return Boolean(process&&process.env&&(process.env[wy]||process.env[xh]))},getECSFullUri:function(){if(process&&process.env){var e=process.env[wy],r=process.env[xh];if(e)return"http://"+PL+e;if(r){var i=mr.util.urlParse(r);if(d8.indexOf(i.protocol)<0)throw mr.util.error(new Error("Unsupported protocol: AWS.RemoteCredentials supports "+d8.join(",")+" only; "+i.protocol+" requested."),{code:"ECSCredentialsProviderFailure"});if(IL.indexOf(i.protocol)<0&&p8.indexOf(i.hostname)<0)throw mr.util.error(new Error("Unsupported hostname: AWS.RemoteCredentials only supports "+p8.join(",")+" for "+i.protocol+"; "+i.protocol+"//"+i.hostname+" requested."),{code:"ECSCredentialsProviderFailure"});return r}else throw mr.util.error(new Error("Variable "+wy+" or "+xh+" must be set to use AWS.RemoteCredentials."),{code:"ECSCredentialsProviderFailure"})}else throw mr.util.error(new Error("No process info available"),{code:"ECSCredentialsProviderFailure"})},getECSAuthToken:function(){if(process&&process.env&&process.env[xh])return process.env[kL]},credsFormatIsValid:function(e){return!!e.accessKeyId&&!!e.secretAccessKey&&!!e.sessionToken&&!!e.expireTime},formatCreds:function(e){return e.credentials&&(e=e.credentials),{expired:!1,accessKeyId:e.accessKeyId||e.AccessKeyId,secretAccessKey:e.secretAccessKey||e.SecretAccessKey,sessionToken:e.sessionToken||e.Token,expireTime:new Date(e.expiration||e.Expiration)}},request:function(e,r){var i=new mr.HttpRequest(e);i.method="GET",i.headers.Accept="application/json";var n=this.getECSAuthToken();n&&(i.headers.Authorization=n),mr.util.handleRequestWithRetries(i,this,r)},refresh:function(e){this.coalesceRefresh(e||mr.util.fn.callback)},load:function(e){var r=this,i;try{i=this.getECSFullUri()}catch(n){e(n);return}this.request(i,function(n,s){if(!n)try{s=JSON.parse(s);var o=r.formatCreds(s);if(!r.credsFormatIsValid(o))throw mr.util.error(new Error("Response data is not in valid format"),{code:"ECSCredentialsProviderFailure"});mr.util.update(r,o)}catch(u){n=u}e(n,o)})}})});var g8=U(()=>{var y8=me();y8.ECSCredentials=y8.RemoteCredentials});var v8=U(()=>{var Zs=me();Zs.EnvironmentCredentials=Zs.util.inherit(Zs.Credentials,{constructor:function(e){Zs.Credentials.call(this),this.envPrefix=e,this.get(function(){})},refresh:function(e){if(e||(e=Zs.util.fn.callback),!process||!process.env){e(Zs.util.error(new Error("No process info or environment variables available"),{code:"EnvironmentCredentialsProviderFailure"}));return}for(var r=["ACCESS_KEY_ID","SECRET_ACCESS_KEY","SESSION_TOKEN"],i=[],n=0;n<r.length;n++){var s="";if(this.envPrefix&&(s=this.envPrefix+"_"),i[n]=process.env[s+r[n]],!i[n]&&r[n]!=="SESSION_TOKEN"){e(Zs.util.error(new Error("Variable "+s+r[n]+" not set."),{code:"EnvironmentCredentialsProviderFailure"}));return}}this.expired=!1,Zs.Credentials.apply(this,i),e()}})});var b8=U(()=>{var Qs=me();Qs.FileSystemCredentials=Qs.util.inherit(Qs.Credentials,{constructor:function(e){Qs.Credentials.call(this),this.filename=e,this.get(function(){})},refresh:function(e){e||(e=Qs.util.fn.callback);try{var r=JSON.parse(Qs.util.readFileSync(this.filename));if(Qs.Credentials.call(this,r),!this.accessKeyId||!this.secretAccessKey)throw Qs.util.error(new Error("Credentials not set in "+this.filename),{code:"FileSystemCredentialsProviderFailure"});this.expired=!1,e()}catch(i){e(i)}}})});var x8=U(()=>{var yr=me(),LL=Js(),S8=yr.util.iniLoader,OL="us-east-1";yr.SharedIniFileCredentials=yr.util.inherit(yr.Credentials,{constructor:function(e){yr.Credentials.call(this),e=e||{},this.filename=e.filename,this.profile=e.profile||process.env.AWS_PROFILE||yr.util.defaultProfile,this.disableAssumeRole=Boolean(e.disableAssumeRole),this.preferStaticCredentials=Boolean(e.preferStaticCredentials),this.tokenCodeFn=e.tokenCodeFn||null,this.httpOptions=e.httpOptions||null,this.get(e.callback||yr.util.fn.noop)},load:function(e){var r=this;try{var i=yr.util.getProfilesFromSharedConfig(S8,this.filename),n=i[this.profile]||{};if(Object.keys(n).length===0)throw yr.util.error(new Error("Profile "+this.profile+" not found"),{code:"SharedIniFileCredentialsProviderFailure"});var s=Boolean(this.preferStaticCredentials&&n.aws_access_key_id&&n.aws_secret_access_key);if(n.role_arn&&!s){this.loadRoleProfile(i,n,function(o,u){o?e(o):(r.expired=!1,r.accessKeyId=u.Credentials.AccessKeyId,r.secretAccessKey=u.Credentials.SecretAccessKey,r.sessionToken=u.Credentials.SessionToken,r.expireTime=u.Credentials.Expiration,e(null))});return}if(this.accessKeyId=n.aws_access_key_id,this.secretAccessKey=n.aws_secret_access_key,this.sessionToken=n.aws_session_token,!this.accessKeyId||!this.secretAccessKey)throw yr.util.error(new Error("Credentials not set for profile "+this.profile),{code:"SharedIniFileCredentialsProviderFailure"});this.expired=!1,e(null)}catch(o){e(o)}},refresh:function(e){S8.clearCachedFiles(),this.coalesceRefresh(e||yr.util.fn.callback,this.disableAssumeRole)},loadRoleProfile:function(e,r,i){if(this.disableAssumeRole)throw yr.util.error(new Error("Role assumption profiles are disabled. Failed to load profile "+this.profile+" from "+e.filename),{code:"SharedIniFileCredentialsProviderFailure"});var n=this,s=r.role_arn,o=r.role_session_name,u=r.external_id,l=r.mfa_serial,d=r.source_profile,h=r.region||OL;if(!d)throw yr.util.error(new Error("source_profile is not set using profile "+this.profile),{code:"SharedIniFileCredentialsProviderFailure"});var m=e[d];if(typeof m!="object")throw yr.util.error(new Error("source_profile "+d+" using profile "+this.profile+" does not exist"),{code:"SharedIniFileCredentialsProviderFailure"});var b=new yr.SharedIniFileCredentials(yr.util.merge(this.options||{},{profile:d,preferStaticCredentials:!0}));this.roleArn=s;var S=new LL({credentials:b,region:h,httpOptions:this.httpOptions}),y={RoleArn:s,RoleSessionName:o||"aws-sdk-js-"+Date.now()};if(u&&(y.ExternalId=u),l&&n.tokenCodeFn){y.SerialNumber=l,n.tokenCodeFn(l,function(v,C){if(v){var w;v instanceof Error?w=v.message:w=v,i(yr.util.error(new Error("Error fetching MFA token: "+w),{code:"SharedIniFileCredentialsProviderFailure"}));return}y.TokenCode=C,S.assumeRole(y,i)});return}S.assumeRole(y,i)}})});var _c=U((zG,w8)=>{var Lr=Yt();Lr.isBrowser=function(){return!1};Lr.isNode=function(){return!0};Lr.crypto.lib=require("crypto");Lr.Buffer=require("buffer").Buffer;Lr.domain=require("domain");Lr.stream=require("stream");Lr.url=require("url");Lr.querystring=require("querystring");Lr.environment="nodejs";Lr.createEventStream=Lr.stream.Readable?_4().createEventStream:N4().createEventStream;Lr.realClock=M4();Lr.clientSideMonitoring={Publisher:I4().Publisher,configProvider:O4()};Lr.iniLoader=F4().iniLoader;Lr.getSystemErrorName=require("util").getSystemErrorName;var Pt;w8.exports=Pt=me();X0();J0();V4();$4();X4();tS();rS();py();Pt.XML.Parser=o8();u8();fy();l8();h8();m8();g8();v8();b8();x8();py();Pt.CredentialProviderChain.defaultProviders=[function(){return new Pt.EnvironmentCredentials("AWS")},function(){return new Pt.EnvironmentCredentials("AMAZON")},function(){return new Pt.SharedIniFileCredentials},function(){return new Pt.ECSCredentials},function(){return new Pt.ProcessCredentials},function(){return new Pt.TokenFileWebIdentityCredentials},function(){return new Pt.EC2MetadataCredentials}];Pt.util.update(Pt.Config.prototype.keys,{credentials:function(){var t=null;return new Pt.CredentialProviderChain([function(){return new Pt.EnvironmentCredentials("AWS")},function(){return new Pt.EnvironmentCredentials("AMAZON")},function(){return new Pt.SharedIniFileCredentials({disableAssumeRole:!0})}]).resolve(function(e,r){e||(t=r)}),t},credentialProvider:function(){return new Pt.CredentialProviderChain},logger:function(){return process.env.AWSJS_DEBUG?console:null},region:function(){var t=process.env,e=t.AWS_REGION||t.AMAZON_REGION;if(t[Pt.util.configOptInEnv])for(var r=[{filename:t[Pt.util.sharedCredentialsFileEnv]},{isConfig:!0,filename:t[Pt.util.sharedConfigFileEnv]}],i=Pt.util.iniLoader;!e&&r.length;){var n={},s=r.shift();try{n=i.loadFrom(s)}catch(u){if(s.isConfig)throw u}var o=n[t.AWS_PROFILE||Pt.util.defaultProfile];e=o&&o.region}return e}});Pt.config=new Pt.Config});var Ey=U((FG,_8)=>{var Ru=me().util;function BL(t){return t===null&&typeof t=="object"?"null":t!==void 0&&E8(t)?"Binary":t!==void 0&&t.constructor?t.wrapperName||Ru.typeName(t.constructor):t!==void 0&&typeof t=="object"?"Object":"undefined"}function E8(t){var e=["Buffer","File","Blob","ArrayBuffer","DataView","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array"];if(Ru.isNode()){var r=Ru.stream.Stream;if(Ru.Buffer.isBuffer(t)||t instanceof r)return!0}for(var i=0;i<e.length;i++)if(t!==void 0&&t.constructor&&(Ru.isType(t,e[i])||Ru.typeName(t.constructor)===e[i]))return!0;return!1}_8.exports={typeOf:BL,isBinary:E8}});var Ry=U((UG,R8)=>{var _y=me().util,Cy=Ey().typeOf,C8={String:"String",Number:"Number",NumberValue:"Number",Binary:"Binary"},DL=_y.inherit({constructor:function(e,r){r=r||{},this.wrapperName="Set",this.initialize(e,r.validate)},initialize:function(t,e){var r=this;r.values=[].concat(t),r.detectType(),e&&r.validate()},detectType:function(){if(this.type=C8[Cy(this.values[0])],!this.type)throw _y.error(new Error,{code:"InvalidSetType",message:"Sets can contain string, number, or binary values"})},validate:function(){for(var t=this,e=t.values.length,r=t.values,i=0;i<e;i++)if(C8[Cy(r[i])]!==t.type)throw _y.error(new Error,{code:"InvalidType",message:t.type+" Set contains "+Cy(r[i])+" value"})},toJSON:function(){var t=this;return t.values}});R8.exports=DL});var N8=U((jG,T8)=>{var qL=me().util,zL=qL.inherit({constructor:function(e){this.wrapperName="NumberValue",this.value=e.toString()},toJSON:function(){return this.toNumber()},toNumber:function(){return Number(this.value)},toString:function(){return this.value}});T8.exports=zL});var I8=U((HG,k8)=>{var ns=me(),FL=ns.util,UL=Ey().typeOf,Ty=Ry(),jL=N8();ns.DynamoDB.Converter={input:function t(e,r){r=r||{};var i=UL(e);if(i==="Object")return M8(e,r);if(i==="Array")return HL(e,r);if(i==="Set")return WL(e,r);if(i==="String")return e.length===0&&r.convertEmptyValues?t(null):{S:e};if(i==="Number"||i==="NumberValue")return{N:e.toString()};if(i==="Binary")return e.length===0&&r.convertEmptyValues?t(null):{B:e};if(i==="Boolean")return{BOOL:e};if(i==="null")return{NULL:!0};if(i!=="undefined"&&i!=="Function")return M8(e,r)},marshall:function(e,r){return ns.DynamoDB.Converter.input(e,r).M},output:function t(e,r){r=r||{};var i,n,s;for(var o in e){var u=e[o];if(o==="M"){n={};for(var l in u)n[l]=t(u[l],r);return n}else if(o==="L"){for(i=[],s=0;s<u.length;s++)i.push(t(u[s],r));return i}else if(o==="SS"){for(i=[],s=0;s<u.length;s++)i.push(u[s]+"");return new Ty(i)}else if(o==="NS"){for(i=[],s=0;s<u.length;s++)i.push(A8(u[s],r.wrapNumbers));return new Ty(i)}else if(o==="BS"){for(i=[],s=0;s<u.length;s++)i.push(ns.util.buffer.toBuffer(u[s]));return new Ty(i)}else{if(o==="S")return u+"";if(o==="N")return A8(u,r.wrapNumbers);if(o==="B")return FL.buffer.toBuffer(u);if(o==="BOOL")return u==="true"||u==="TRUE"||u===!0;if(o==="NULL")return null}}},unmarshall:function(e,r){return ns.DynamoDB.Converter.output({M:e},r)}};function HL(t,e){for(var r={L:[]},i=0;i<t.length;i++)r.L.push(ns.DynamoDB.Converter.input(t[i],e));return r}function A8(t,e){return e?new jL(t):Number(t)}function M8(t,e){var r={M:{}};for(var i in t){var n=ns.DynamoDB.Converter.input(t[i],e);n!==void 0&&(r.M[i]=n)}return r}function WL(t,e){e=e||{};var r=t.values;if(e.convertEmptyValues&&(r=GL(t),r.length===0))return ns.DynamoDB.Converter.input(null);var i={};switch(t.type){case"String":i.SS=r;break;case"Binary":i.BS=r;break;case"Number":i.NS=r.map(function(n){return n.toString()})}return i}function GL(t){var e=[],r={String:!0,Binary:!0,Number:!1};if(r[t.type]){for(var i=0;i<t.values.length;i++)t.values[i].length!==0&&e.push(t.values[i]);return e}return t.values}k8.exports=ns.DynamoDB.Converter});var L8=U((WG,P8)=>{var Ny=me().util,KL=I8(),eo=function(t){t=t||{},this.attrValue=t.attrValue,this.convertEmptyValues=Boolean(t.convertEmptyValues),this.wrapNumbers=Boolean(t.wrapNumbers)};eo.prototype.translateInput=function(t,e){return this.mode="input",this.translate(t,e)};eo.prototype.translateOutput=function(t,e){return this.mode="output",this.translate(t,e)};eo.prototype.translate=function(t,e){var r=this;if(!(!e||t===void 0)){if(e.shape===r.attrValue)return KL[r.mode](t,{convertEmptyValues:r.convertEmptyValues,wrapNumbers:r.wrapNumbers});switch(e.type){case"structure":return r.translateStructure(t,e);case"map":return r.translateMap(t,e);case"list":return r.translateList(t,e);default:return r.translateScalar(t,e)}}};eo.prototype.translateStructure=function(t,e){var r=this;if(t!=null){var i={};return Ny.each(t,function(n,s){var o=e.members[n];if(o){var u=r.translate(s,o);u!==void 0&&(i[n]=u)}}),i}};eo.prototype.translateList=function(t,e){var r=this;if(t!=null){var i=[];return Ny.arrayEach(t,function(n){var s=r.translate(n,e.member);s===void 0?i.push(null):i.push(s)}),i}};eo.prototype.translateMap=function(t,e){var r=this;if(t!=null){var i={};return Ny.each(t,function(n,s){var o=r.translate(s,e.value);o===void 0?i[n]=null:i[n]=o}),i}};eo.prototype.translateScalar=function(t,e){return e.toType(t)};P8.exports=eo});var B8=U((GG,O8)=>{var to=me(),VL=L8(),$L=Ry();to.DynamoDB.DocumentClient=to.util.inherit({constructor:function(e){var r=this;r.options=e||{},r.configure(r.options)},configure:function(e){var r=this;r.service=e.service,r.bindServiceObject(e),r.attrValue=e.attrValue=r.service.api.operations.putItem.input.members.Item.value.shape},bindServiceObject:function(e){var r=this;if(e=e||{},!r.service)r.service=new to.DynamoDB(e);else{var i=to.util.copy(r.service.config);r.service=new r.service.constructor.__super__(i),r.service.config.params=to.util.merge(r.service.config.params||{},e.params)}},makeServiceRequest:function(t,e,r){var i=this,n=i.service[t](e);return i.setupRequest(n),i.setupResponse(n),typeof r=="function"&&n.send(r),n},serviceClientOperationsMap:{batchGet:"batchGetItem",batchWrite:"batchWriteItem",delete:"deleteItem",get:"getItem",put:"putItem",query:"query",scan:"scan",update:"updateItem",transactGet:"transactGetItems",transactWrite:"transactWriteItems"},batchGet:function(t,e){var r=this.serviceClientOperationsMap.batchGet;return this.makeServiceRequest(r,t,e)},batchWrite:function(t,e){var r=this.serviceClientOperationsMap.batchWrite;return this.makeServiceRequest(r,t,e)},delete:function(t,e){var r=this.serviceClientOperationsMap.delete;return this.makeServiceRequest(r,t,e)},get:function(t,e){var r=this.serviceClientOperationsMap.get;return this.makeServiceRequest(r,t,e)},put:function(t,e){var r=this.serviceClientOperationsMap.put;return this.makeServiceRequest(r,t,e)},update:function(t,e){var r=this.serviceClientOperationsMap.update;return this.makeServiceRequest(r,t,e)},scan:function(t,e){var r=this.serviceClientOperationsMap.scan;return this.makeServiceRequest(r,t,e)},query:function(t,e){var r=this.serviceClientOperationsMap.query;return this.makeServiceRequest(r,t,e)},transactWrite:function(t,e){var r=this.serviceClientOperationsMap.transactWrite;return this.makeServiceRequest(r,t,e)},transactGet:function(t,e){var r=this.serviceClientOperationsMap.transactGet;return this.makeServiceRequest(r,t,e)},createSet:function(t,e){return e=e||{},new $L(t,e)},getTranslator:function(){return new VL(this.options)},setupRequest:function(e){var r=this,i=r.getTranslator(),n=e.operation,s=e.service.api.operations[n].input;e._events.validate.unshift(function(o){o.rawParams=to.util.copy(o.params),o.params=i.translateInput(o.rawParams,s)})},setupResponse:function(e){var r=this,i=r.getTranslator(),n=r.service.api.operations[e.operation].output;e.on("extractData",function(o){o.data=i.translateOutput(o.data,n)});var s=e.response;s.nextPage=function(o){var u=this,l=u.request,d,h=l.service,m=l.operation;try{d=h.paginationConfig(m,!0)}catch(v){u.error=v}if(!u.hasNextPage()){if(o)o(u.error,null);else if(u.error)throw u.error;return null}var b=to.util.copy(l.rawParams);if(u.nextPageTokens){var S=d.inputToken;typeof S=="string"&&(S=[S]);for(var y=0;y<S.length;y++)b[S[y]]=u.nextPageTokens[y];return r[m](b,o)}else return o?o(null,null):null}}});O8.exports=to.DynamoDB.DocumentClient});var D8=U(()=>{var ro=me();B8();ro.util.update(ro.DynamoDB.prototype,{setupRequestListeners:function(e){e.service.config.dynamoDbCrc32&&(e.removeListener("extractData",ro.EventListeners.Json.EXTRACT_DATA),e.addListener("extractData",this.checkCrc32),e.addListener("extractData",ro.EventListeners.Json.EXTRACT_DATA))},checkCrc32:function(e){if(!e.httpResponse.streaming&&!e.request.service.crc32IsValid(e))throw e.data=null,e.error=ro.util.error(new Error,{code:"CRC32CheckFailed",message:"CRC32 integrity check failed",retryable:!0}),e.request.haltHandlersOnError(),e.error},crc32IsValid:function(e){var r=e.httpResponse.headers["x-amz-crc32"];return r?parseInt(r,10)===ro.util.crypto.crc32(e.httpResponse.body):!0},defaultRetryCount:10,retryDelays:function(e,r){var i=ro.util.copy(this.config.retryDelayOptions);typeof i.base!="number"&&(i.base=50);var n=ro.util.calculateRetryDelay(e,i,r);return n}})});var q8=U(($G,XL)=>{XL.exports={version:"2.0",metadata:{apiVersion:"2011-12-05",endpointPrefix:"dynamodb",jsonVersion:"1.0",protocol:"json",serviceAbbreviation:"DynamoDB",serviceFullName:"Amazon DynamoDB",serviceId:"DynamoDB",signatureVersion:"v4",targetPrefix:"DynamoDB_20111205",uid:"dynamodb-2011-12-05"},operations:{BatchGetItem:{input:{type:"structure",required:["RequestItems"],members:{RequestItems:{shape:"S2"}}},output:{type:"structure",members:{Responses:{type:"map",key:{},value:{type:"structure",members:{Items:{shape:"Sk"},ConsumedCapacityUnits:{type:"double"}}}},UnprocessedKeys:{shape:"S2"}}}},BatchWriteItem:{input:{type:"structure",required:["RequestItems"],members:{RequestItems:{shape:"So"}}},output:{type:"structure",members:{Responses:{type:"map",key:{},value:{type:"structure",members:{ConsumedCapacityUnits:{type:"double"}}}},UnprocessedItems:{shape:"So"}}}},CreateTable:{input:{type:"structure",required:["TableName","KeySchema","ProvisionedThroughput"],members:{TableName:{},KeySchema:{shape:"Sy"},ProvisionedThroughput:{shape:"S12"}}},output:{type:"structure",members:{TableDescription:{shape:"S15"}}}},DeleteItem:{input:{type:"structure",required:["TableName","Key"],members:{TableName:{},Key:{shape:"S6"},Expected:{shape:"S1b"},ReturnValues:{}}},output:{type:"structure",members:{Attributes:{shape:"Sl"},ConsumedCapacityUnits:{type:"double"}}}},DeleteTable:{input:{type:"structure",required:["TableName"],members:{TableName:{}}},output:{type:"structure",members:{TableDescription:{shape:"S15"}}}},DescribeTable:{input:{type:"structure",required:["TableName"],members:{TableName:{}}},output:{type:"structure",members:{Table:{shape:"S15"}}}},GetItem:{input:{type:"structure",required:["TableName","Key"],members:{TableName:{},Key:{shape:"S6"},AttributesToGet:{shape:"Se"},ConsistentRead:{type:"boolean"}}},output:{type:"structure",members:{Item:{shape:"Sl"},ConsumedCapacityUnits:{type:"double"}}}},ListTables:{input:{type:"structure",members:{ExclusiveStartTableName:{},Limit:{type:"integer"}}},output:{type:"structure",members:{TableNames:{type:"list",member:{}},LastEvaluatedTableName:{}}}},PutItem:{input:{type:"structure",required:["TableName","Item"],members:{TableName:{},Item:{shape:"Ss"},Expected:{shape:"S1b"},ReturnValues:{}}},output:{type:"structure",members:{Attributes:{shape:"Sl"},ConsumedCapacityUnits:{type:"double"}}}},Query:{input:{type:"structure",required:["TableName","HashKeyValue"],members:{TableName:{},AttributesToGet:{shape:"Se"},Limit:{type:"integer"},ConsistentRead:{type:"boolean"},Count:{type:"boolean"},HashKeyValue:{shape:"S7"},RangeKeyCondition:{shape:"S1u"},ScanIndexForward:{type:"boolean"},ExclusiveStartKey:{shape:"S6"}}},output:{type:"structure",members:{Items:{shape:"Sk"},Count:{type:"integer"},LastEvaluatedKey:{shape:"S6"},ConsumedCapacityUnits:{type:"double"}}}},Scan:{input:{type:"structure",required:["TableName"],members:{TableName:{},AttributesToGet:{shape:"Se"},Limit:{type:"integer"},Count:{type:"boolean"},ScanFilter:{type:"map",key:{},value:{shape:"S1u"}},ExclusiveStartKey:{shape:"S6"}}},output:{type:"structure",members:{Items:{shape:"Sk"},Count:{type:"integer"},ScannedCount:{type:"integer"},LastEvaluatedKey:{shape:"S6"},ConsumedCapacityUnits:{type:"double"}}}},UpdateItem:{input:{type:"structure",required:["TableName","Key","AttributeUpdates"],members:{TableName:{},Key:{shape:"S6"},AttributeUpdates:{type:"map",key:{},value:{type:"structure",members:{Value:{shape:"S7"},Action:{}}}},Expected:{shape:"S1b"},ReturnValues:{}}},output:{type:"structure",members:{Attributes:{shape:"Sl"},ConsumedCapacityUnits:{type:"double"}}}},UpdateTable:{input:{type:"structure",required:["TableName","ProvisionedThroughput"],members:{TableName:{},ProvisionedThroughput:{shape:"S12"}}},output:{type:"structure",members:{TableDescription:{shape:"S15"}}}}},shapes:{S2:{type:"map",key:{},value:{type:"structure",required:["Keys"],members:{Keys:{type:"list",member:{shape:"S6"}},AttributesToGet:{shape:"Se"},ConsistentRead:{type:"boolean"}}}},S6:{type:"structure",required:["HashKeyElement"],members:{HashKeyElement:{shape:"S7"},RangeKeyElement:{shape:"S7"}}},S7:{type:"structure",members:{S:{},N:{},B:{type:"blob"},SS:{type:"list",member:{}},NS:{type:"list",member:{}},BS:{type:"list",member:{type:"blob"}}}},Se:{type:"list",member:{}},Sk:{type:"list",member:{shape:"Sl"}},Sl:{type:"map",key:{},value:{shape:"S7"}},So:{type:"map",key:{},value:{type:"list",member:{type:"structure",members:{PutRequest:{type:"structure",required:["Item"],members:{Item:{shape:"Ss"}}},DeleteRequest:{type:"structure",required:["Key"],members:{Key:{shape:"S6"}}}}}}},Ss:{type:"map",key:{},value:{shape:"S7"}},Sy:{type:"structure",required:["HashKeyElement"],members:{HashKeyElement:{shape:"Sz"},RangeKeyElement:{shape:"Sz"}}},Sz:{type:"structure",required:["AttributeName","AttributeType"],members:{AttributeName:{},AttributeType:{}}},S12:{type:"structure",required:["ReadCapacityUnits","WriteCapacityUnits"],members:{ReadCapacityUnits:{type:"long"},WriteCapacityUnits:{type:"long"}}},S15:{type:"structure",members:{TableName:{},KeySchema:{shape:"Sy"},TableStatus:{},CreationDateTime:{type:"timestamp"},ProvisionedThroughput:{type:"structure",members:{LastIncreaseDateTime:{type:"timestamp"},LastDecreaseDateTime:{type:"timestamp"},NumberOfDecreasesToday:{type:"long"},ReadCapacityUnits:{type:"long"},WriteCapacityUnits:{type:"long"}}},TableSizeBytes:{type:"long"},ItemCount:{type:"long"}}},S1b:{type:"map",key:{},value:{type:"structure",members:{Value:{shape:"S7"},Exists:{type:"boolean"}}}},S1u:{type:"structure",required:["ComparisonOperator"],members:{AttributeValueList:{type:"list",member:{shape:"S7"}},ComparisonOperator:{}}}}}});var z8=U((XG,JL)=>{JL.exports={pagination:{BatchGetItem:{input_token:"RequestItems",output_token:"UnprocessedKeys"},ListTables:{input_token:"ExclusiveStartTableName",limit_key:"Limit",output_token:"LastEvaluatedTableName",result_key:"TableNames"},Query:{input_token:"ExclusiveStartKey",limit_key:"Limit",output_token:"LastEvaluatedKey",result_key:"Items"},Scan:{input_token:"ExclusiveStartKey",limit_key:"Limit",output_token:"LastEvaluatedKey",result_key:"Items"}}}});var F8=U((JG,YL)=>{YL.exports={version:2,waiters:{TableExists:{delay:20,operation:"DescribeTable",maxAttempts:25,acceptors:[{expected:"ACTIVE",matcher:"path",state:"success",argument:"Table.TableStatus"},{expected:"ResourceNotFoundException",matcher:"error",state:"retry"}]},TableNotExists:{delay:20,operation:"DescribeTable",maxAttempts:25,acceptors:[{expected:"ResourceNotFoundException",matcher:"error",state:"success"}]}}}});var U8=U((YG,ZL)=>{ZL.exports={version:"2.0",metadata:{apiVersion:"2012-08-10",endpointPrefix:"dynamodb",jsonVersion:"1.0",protocol:"json",serviceAbbreviation:"DynamoDB",serviceFullName:"Amazon DynamoDB",serviceId:"DynamoDB",signatureVersion:"v4",targetPrefix:"DynamoDB_20120810",uid:"dynamodb-2012-08-10"},operations:{BatchExecuteStatement:{input:{type:"structure",required:["Statements"],members:{Statements:{type:"list",member:{type:"structure",required:["Statement"],members:{Statement:{},Parameters:{shape:"S5"},ConsistentRead:{type:"boolean"}}}}}},output:{type:"structure",members:{Responses:{type:"list",member:{type:"structure",members:{Error:{type:"structure",members:{Code:{},Message:{}}},TableName:{},Item:{shape:"Sq"}}}}}}},BatchGetItem:{input:{type:"structure",required:["RequestItems"],members:{RequestItems:{shape:"Ss"},ReturnConsumedCapacity:{}}},output:{type:"structure",members:{Responses:{type:"map",key:{},value:{shape:"S13"}},UnprocessedKeys:{shape:"Ss"},ConsumedCapacity:{shape:"S14"}}},endpointdiscovery:{}},BatchWriteItem:{input:{type:"structure",required:["RequestItems"],members:{RequestItems:{shape:"S1b"},ReturnConsumedCapacity:{},ReturnItemCollectionMetrics:{}}},output:{type:"structure",members:{UnprocessedItems:{shape:"S1b"},ItemCollectionMetrics:{shape:"S1j"},ConsumedCapacity:{shape:"S14"}}},endpointdiscovery:{}},CreateBackup:{input:{type:"structure",required:["TableName","BackupName"],members:{TableName:{},BackupName:{}}},output:{type:"structure",members:{BackupDetails:{shape:"S1s"}}},endpointdiscovery:{}},CreateGlobalTable:{input:{type:"structure",required:["GlobalTableName","ReplicationGroup"],members:{GlobalTableName:{},ReplicationGroup:{shape:"S20"}}},output:{type:"structure",members:{GlobalTableDescription:{shape:"S24"}}},endpointdiscovery:{}},CreateTable:{input:{type:"structure",required:["AttributeDefinitions","TableName","KeySchema"],members:{AttributeDefinitions:{shape:"S2i"},TableName:{},KeySchema:{shape:"S2m"},LocalSecondaryIndexes:{shape:"S2p"},GlobalSecondaryIndexes:{shape:"S2v"},BillingMode:{},ProvisionedThroughput:{shape:"S2x"},StreamSpecification:{shape:"S2z"},SSESpecification:{shape:"S32"},Tags:{shape:"S35"}}},output:{type:"structure",members:{TableDescription:{shape:"S3a"}}},endpointdiscovery:{}},DeleteBackup:{input:{type:"structure",required:["BackupArn"],members:{BackupArn:{}}},output:{type:"structure",members:{BackupDescription:{shape:"S3y"}}},endpointdiscovery:{}},DeleteItem:{input:{type:"structure",required:["TableName","Key"],members:{TableName:{},Key:{shape:"Sv"},Expected:{shape:"S4b"},ConditionalOperator:{},ReturnValues:{},ReturnConsumedCapacity:{},ReturnItemCollectionMetrics:{},ConditionExpression:{},ExpressionAttributeNames:{shape:"Sy"},ExpressionAttributeValues:{shape:"S4j"}}},output:{type:"structure",members:{Attributes:{shape:"Sq"},ConsumedCapacity:{shape:"S15"},ItemCollectionMetrics:{shape:"S1l"}}},endpointdiscovery:{}},DeleteTable:{input:{type:"structure",required:["TableName"],members:{TableName:{}}},output:{type:"structure",members:{TableDescription:{shape:"S3a"}}},endpointdiscovery:{}},DescribeBackup:{input:{type:"structure",required:["BackupArn"],members:{BackupArn:{}}},output:{type:"structure",members:{BackupDescription:{shape:"S3y"}}},endpointdiscovery:{}},DescribeContinuousBackups:{input:{type:"structure",required:["TableName"],members:{TableName:{}}},output:{type:"structure",members:{ContinuousBackupsDescription:{shape:"S4s"}}},endpointdiscovery:{}},DescribeContributorInsights:{input:{type:"structure",required:["TableName"],members:{TableName:{},IndexName:{}}},output:{type:"structure",members:{TableName:{},IndexName:{},ContributorInsightsRuleList:{type:"list",member:{}},ContributorInsightsStatus:{},LastUpdateDateTime:{type:"timestamp"},FailureException:{type:"structure",members:{ExceptionName:{},ExceptionDescription:{}}}}}},DescribeEndpoints:{input:{type:"structure",members:{}},output:{type:"structure",required:["Endpoints"],members:{Endpoints:{type:"list",member:{type:"structure",required:["Address","CachePeriodInMinutes"],members:{Address:{},CachePeriodInMinutes:{type:"long"}}}}}},endpointoperation:!0},DescribeExport:{input:{type:"structure",required:["ExportArn"],members:{ExportArn:{}}},output:{type:"structure",members:{ExportDescription:{shape:"S5c"}}}},DescribeGlobalTable:{input:{type:"structure",required:["GlobalTableName"],members:{GlobalTableName:{}}},output:{type:"structure",members:{GlobalTableDescription:{shape:"S24"}}},endpointdiscovery:{}},DescribeGlobalTableSettings:{input:{type:"structure",required:["GlobalTableName"],members:{GlobalTableName:{}}},output:{type:"structure",members:{GlobalTableName:{},ReplicaSettings:{shape:"S5w"}}},endpointdiscovery:{}},DescribeKinesisStreamingDestination:{input:{type:"structure",required:["TableName"],members:{TableName:{}}},output:{type:"structure",members:{TableName:{},KinesisDataStreamDestinations:{type:"list",member:{type:"structure",members:{StreamArn:{},DestinationStatus:{},DestinationStatusDescription:{}}}}}},endpointdiscovery:{}},DescribeLimits:{input:{type:"structure",members:{}},output:{type:"structure",members:{AccountMaxReadCapacityUnits:{type:"long"},AccountMaxWriteCapacityUnits:{type:"long"},TableMaxReadCapacityUnits:{type:"long"},TableMaxWriteCapacityUnits:{type:"long"}}},endpointdiscovery:{}},DescribeTable:{input:{type:"structure",required:["TableName"],members:{TableName:{}}},output:{type:"structure",members:{Table:{shape:"S3a"}}},endpointdiscovery:{}},DescribeTableReplicaAutoScaling:{input:{type:"structure",required:["TableName"],members:{TableName:{}}},output:{type:"structure",members:{TableAutoScalingDescription:{shape:"S6i"}}}},DescribeTimeToLive:{input:{type:"structure",required:["TableName"],members:{TableName:{}}},output:{type:"structure",members:{TimeToLiveDescription:{shape:"S47"}}},endpointdiscovery:{}},DisableKinesisStreamingDestination:{input:{shape:"S6p"},output:{shape:"S6q"},endpointdiscovery:{}},EnableKinesisStreamingDestination:{input:{shape:"S6p"},output:{shape:"S6q"},endpointdiscovery:{}},ExecuteStatement:{input:{type:"structure",required:["Statement"],members:{Statement:{},Parameters:{shape:"S5"},ConsistentRead:{type:"boolean"},NextToken:{}}},output:{type:"structure",members:{Items:{shape:"S13"},NextToken:{}}}},ExecuteTransaction:{input:{type:"structure",required:["TransactStatements"],members:{TransactStatements:{type:"list",member:{type:"structure",required:["Statement"],members:{Statement:{},Parameters:{shape:"S5"}}}},ClientRequestToken:{idempotencyToken:!0}}},output:{type:"structure",members:{Responses:{shape:"S6z"}}}},ExportTableToPointInTime:{input:{type:"structure",required:["TableArn","S3Bucket"],members:{TableArn:{},ExportTime:{type:"timestamp"},ClientToken:{idempotencyToken:!0},S3Bucket:{},S3BucketOwner:{},S3Prefix:{},S3SseAlgorithm:{},S3SseKmsKeyId:{},ExportFormat:{}}},output:{type:"structure",members:{ExportDescription:{shape:"S5c"}}}},GetItem:{input:{type:"structure",required:["TableName","Key"],members:{TableName:{},Key:{shape:"Sv"},AttributesToGet:{shape:"Sw"},ConsistentRead:{type:"boolean"},ReturnConsumedCapacity:{},ProjectionExpression:{},ExpressionAttributeNames:{shape:"Sy"}}},output:{type:"structure",members:{Item:{shape:"Sq"},ConsumedCapacity:{shape:"S15"}}},endpointdiscovery:{}},ListBackups:{input:{type:"structure",members:{TableName:{},Limit:{type:"integer"},TimeRangeLowerBound:{type:"timestamp"},TimeRangeUpperBound:{type:"timestamp"},ExclusiveStartBackupArn:{},BackupType:{}}},output:{type:"structure",members:{BackupSummaries:{type:"list",member:{type:"structure",members:{TableName:{},TableId:{},TableArn:{},BackupArn:{},BackupName:{},BackupCreationDateTime:{type:"timestamp"},BackupExpiryDateTime:{type:"timestamp"},BackupStatus:{},BackupType:{},BackupSizeBytes:{type:"long"}}}},LastEvaluatedBackupArn:{}}},endpointdiscovery:{}},ListContributorInsights:{input:{type:"structure",members:{TableName:{},NextToken:{},MaxResults:{type:"integer"}}},output:{type:"structure",members:{ContributorInsightsSummaries:{type:"list",member:{type:"structure",members:{TableName:{},IndexName:{},ContributorInsightsStatus:{}}}},NextToken:{}}}},ListExports:{input:{type:"structure",members:{TableArn:{},MaxResults:{type:"integer"},NextToken:{}}},output:{type:"structure",members:{ExportSummaries:{type:"list",member:{type:"structure",members:{ExportArn:{},ExportStatus:{}}}},NextToken:{}}}},ListGlobalTables:{input:{type:"structure",members:{ExclusiveStartGlobalTableName:{},Limit:{type:"integer"},RegionName:{}}},output:{type:"structure",members:{GlobalTables:{type:"list",member:{type:"structure",members:{GlobalTableName:{},ReplicationGroup:{shape:"S20"}}}},LastEvaluatedGlobalTableName:{}}},endpointdiscovery:{}},ListTables:{input:{type:"structure",members:{ExclusiveStartTableName:{},Limit:{type:"integer"}}},output:{type:"structure",members:{TableNames:{type:"list",member:{}},LastEvaluatedTableName:{}}},endpointdiscovery:{}},ListTagsOfResource:{input:{type:"structure",required:["ResourceArn"],members:{ResourceArn:{},NextToken:{}}},output:{type:"structure",members:{Tags:{shape:"S35"},NextToken:{}}},endpointdiscovery:{}},PutItem:{input:{type:"structure",required:["TableName","Item"],members:{TableName:{},Item:{shape:"S1f"},Expected:{shape:"S4b"},ReturnValues:{},ReturnConsumedCapacity:{},ReturnItemCollectionMetrics:{},ConditionalOperator:{},ConditionExpression:{},ExpressionAttributeNames:{shape:"Sy"},ExpressionAttributeValues:{shape:"S4j"}}},output:{type:"structure",members:{Attributes:{shape:"Sq"},ConsumedCapacity:{shape:"S15"},ItemCollectionMetrics:{shape:"S1l"}}},endpointdiscovery:{}},Query:{input:{type:"structure",required:["TableName"],members:{TableName:{},IndexName:{},Select:{},AttributesToGet:{shape:"Sw"},Limit:{type:"integer"},ConsistentRead:{type:"boolean"},KeyConditions:{type:"map",key:{},value:{shape:"S86"}},QueryFilter:{shape:"S87"},ConditionalOperator:{},ScanIndexForward:{type:"boolean"},ExclusiveStartKey:{shape:"Sv"},ReturnConsumedCapacity:{},ProjectionExpression:{},FilterExpression:{},KeyConditionExpression:{},ExpressionAttributeNames:{shape:"Sy"},ExpressionAttributeValues:{shape:"S4j"}}},output:{type:"structure",members:{Items:{shape:"S13"},Count:{type:"integer"},ScannedCount:{type:"integer"},LastEvaluatedKey:{shape:"Sv"},ConsumedCapacity:{shape:"S15"}}},endpointdiscovery:{}},RestoreTableFromBackup:{input:{type:"structure",required:["TargetTableName","BackupArn"],members:{TargetTableName:{},BackupArn:{},BillingModeOverride:{},GlobalSecondaryIndexOverride:{shape:"S2v"},LocalSecondaryIndexOverride:{shape:"S2p"},ProvisionedThroughputOverride:{shape:"S2x"},SSESpecificationOverride:{shape:"S32"}}},output:{type:"structure",members:{TableDescription:{shape:"S3a"}}},endpointdiscovery:{}},RestoreTableToPointInTime:{input:{type:"structure",required:["TargetTableName"],members:{SourceTableArn:{},SourceTableName:{},TargetTableName:{},UseLatestRestorableTime:{type:"boolean"},RestoreDateTime:{type:"timestamp"},BillingModeOverride:{},GlobalSecondaryIndexOverride:{shape:"S2v"},LocalSecondaryIndexOverride:{shape:"S2p"},ProvisionedThroughputOverride:{shape:"S2x"},SSESpecificationOverride:{shape:"S32"}}},output:{type:"structure",members:{TableDescription:{shape:"S3a"}}},endpointdiscovery:{}},Scan:{input:{type:"structure",required:["TableName"],members:{TableName:{},IndexName:{},AttributesToGet:{shape:"Sw"},Limit:{type:"integer"},Select:{},ScanFilter:{shape:"S87"},ConditionalOperator:{},ExclusiveStartKey:{shape:"Sv"},ReturnConsumedCapacity:{},TotalSegments:{type:"integer"},Segment:{type:"integer"},ProjectionExpression:{},FilterExpression:{},ExpressionAttributeNames:{shape:"Sy"},ExpressionAttributeValues:{shape:"S4j"},ConsistentRead:{type:"boolean"}}},output:{type:"structure",members:{Items:{shape:"S13"},Count:{type:"integer"},ScannedCount:{type:"integer"},LastEvaluatedKey:{shape:"Sv"},ConsumedCapacity:{shape:"S15"}}},endpointdiscovery:{}},TagResource:{input:{type:"structure",required:["ResourceArn","Tags"],members:{ResourceArn:{},Tags:{shape:"S35"}}},endpointdiscovery:{}},TransactGetItems:{input:{type:"structure",required:["TransactItems"],members:{TransactItems:{type:"list",member:{type:"structure",required:["Get"],members:{Get:{type:"structure",required:["Key","TableName"],members:{Key:{shape:"Sv"},TableName:{},ProjectionExpression:{},ExpressionAttributeNames:{shape:"Sy"}}}}}},ReturnConsumedCapacity:{}}},output:{type:"structure",members:{ConsumedCapacity:{shape:"S14"},Responses:{shape:"S6z"}}},endpointdiscovery:{}},TransactWriteItems:{input:{type:"structure",required:["TransactItems"],members:{TransactItems:{type:"list",member:{type:"structure",members:{ConditionCheck:{type:"structure",required:["Key","TableName","ConditionExpression"],members:{Key:{shape:"Sv"},TableName:{},ConditionExpression:{},ExpressionAttributeNames:{shape:"Sy"},ExpressionAttributeValues:{shape:"S4j"},ReturnValuesOnConditionCheckFailure:{}}},Put:{type:"structure",required:["Item","TableName"],members:{Item:{shape:"S1f"},TableName:{},ConditionExpression:{},ExpressionAttributeNames:{shape:"Sy"},ExpressionAttributeValues:{shape:"S4j"},ReturnValuesOnConditionCheckFailure:{}}},Delete:{type:"structure",required:["Key","TableName"],members:{Key:{shape:"Sv"},TableName:{},ConditionExpression:{},ExpressionAttributeNames:{shape:"Sy"},ExpressionAttributeValues:{shape:"S4j"},ReturnValuesOnConditionCheckFailure:{}}},Update:{type:"structure",required:["Key","UpdateExpression","TableName"],members:{Key:{shape:"Sv"},UpdateExpression:{},TableName:{},ConditionExpression:{},ExpressionAttributeNames:{shape:"Sy"},ExpressionAttributeValues:{shape:"S4j"},ReturnValuesOnConditionCheckFailure:{}}}}}},ReturnConsumedCapacity:{},ReturnItemCollectionMetrics:{},ClientRequestToken:{idempotencyToken:!0}}},output:{type:"structure",members:{ConsumedCapacity:{shape:"S14"},ItemCollectionMetrics:{shape:"S1j"}}},endpointdiscovery:{}},UntagResource:{input:{type:"structure",required:["ResourceArn","TagKeys"],members:{ResourceArn:{},TagKeys:{type:"list",member:{}}}},endpointdiscovery:{}},UpdateContinuousBackups:{input:{type:"structure",required:["TableName","PointInTimeRecoverySpecification"],members:{TableName:{},PointInTimeRecoverySpecification:{type:"structure",required:["PointInTimeRecoveryEnabled"],members:{PointInTimeRecoveryEnabled:{type:"boolean"}}}}},output:{type:"structure",members:{ContinuousBackupsDescription:{shape:"S4s"}}},endpointdiscovery:{}},UpdateContributorInsights:{input:{type:"structure",required:["TableName","ContributorInsightsAction"],members:{TableName:{},IndexName:{},ContributorInsightsAction:{}}},output:{type:"structure",members:{TableName:{},IndexName:{},ContributorInsightsStatus:{}}}},UpdateGlobalTable:{input:{type:"structure",required:["GlobalTableName","ReplicaUpdates"],members:{GlobalTableName:{},ReplicaUpdates:{type:"list",member:{type:"structure",members:{Create:{type:"structure",required:["RegionName"],members:{RegionName:{}}},Delete:{type:"structure",required:["RegionName"],members:{RegionName:{}}}}}}}},output:{type:"structure",members:{GlobalTableDescription:{shape:"S24"}}},endpointdiscovery:{}},UpdateGlobalTableSettings:{input:{type:"structure",required:["GlobalTableName"],members:{GlobalTableName:{},GlobalTableBillingMode:{},GlobalTableProvisionedWriteCapacityUnits:{type:"long"},GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate:{shape:"S9e"},GlobalTableGlobalSecondaryIndexSettingsUpdate:{type:"list",member:{type:"structure",required:["IndexName"],members:{IndexName:{},ProvisionedWriteCapacityUnits:{type:"long"},ProvisionedWriteCapacityAutoScalingSettingsUpdate:{shape:"S9e"}}}},ReplicaSettingsUpdate:{type:"list",member:{type:"structure",required:["RegionName"],members:{RegionName:{},ReplicaProvisionedReadCapacityUnits:{type:"long"},ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate:{shape:"S9e"},ReplicaGlobalSecondaryIndexSettingsUpdate:{type:"list",member:{type:"structure",required:["IndexName"],members:{IndexName:{},ProvisionedReadCapacityUnits:{type:"long"},ProvisionedReadCapacityAutoScalingSettingsUpdate:{shape:"S9e"}}}}}}}}},output:{type:"structure",members:{GlobalTableName:{},ReplicaSettings:{shape:"S5w"}}},endpointdiscovery:{}},UpdateItem:{input:{type:"structure",required:["TableName","Key"],members:{TableName:{},Key:{shape:"Sv"},AttributeUpdates:{type:"map",key:{},value:{type:"structure",members:{Value:{shape:"S6"},Action:{}}}},Expected:{shape:"S4b"},ConditionalOperator:{},ReturnValues:{},ReturnConsumedCapacity:{},ReturnItemCollectionMetrics:{},UpdateExpression:{},ConditionExpression:{},ExpressionAttributeNames:{shape:"Sy"},ExpressionAttributeValues:{shape:"S4j"}}},output:{type:"structure",members:{Attributes:{shape:"Sq"},ConsumedCapacity:{shape:"S15"},ItemCollectionMetrics:{shape:"S1l"}}},endpointdiscovery:{}},UpdateTable:{input:{type:"structure",required:["TableName"],members:{AttributeDefinitions:{shape:"S2i"},TableName:{},BillingMode:{},ProvisionedThroughput:{shape:"S2x"},GlobalSecondaryIndexUpdates:{type:"list",member:{type:"structure",members:{Update:{type:"structure",required:["IndexName","ProvisionedThroughput"],members:{IndexName:{},ProvisionedThroughput:{shape:"S2x"}}},Create:{type:"structure",required:["IndexName","KeySchema","Projection"],members:{IndexName:{},KeySchema:{shape:"S2m"},Projection:{shape:"S2r"},ProvisionedThroughput:{shape:"S2x"}}},Delete:{type:"structure",required:["IndexName"],members:{IndexName:{}}}}}},StreamSpecification:{shape:"S2z"},SSESpecification:{shape:"S32"},ReplicaUpdates:{type:"list",member:{type:"structure",members:{Create:{type:"structure",required:["RegionName"],members:{RegionName:{},KMSMasterKeyId:{},ProvisionedThroughputOverride:{shape:"S2b"},GlobalSecondaryIndexes:{shape:"Sa3"}}},Update:{type:"structure",required:["RegionName"],members:{RegionName:{},KMSMasterKeyId:{},ProvisionedThroughputOverride:{shape:"S2b"},GlobalSecondaryIndexes:{shape:"Sa3"}}},Delete:{type:"structure",required:["RegionName"],members:{RegionName:{}}}}}}}},output:{type:"structure",members:{TableDescription:{shape:"S3a"}}},endpointdiscovery:{}},UpdateTableReplicaAutoScaling:{input:{type:"structure",required:["TableName"],members:{GlobalSecondaryIndexUpdates:{type:"list",member:{type:"structure",members:{IndexName:{},ProvisionedWriteCapacityAutoScalingUpdate:{shape:"S9e"}}}},TableName:{},ProvisionedWriteCapacityAutoScalingUpdate:{shape:"S9e"},ReplicaUpdates:{type:"list",member:{type:"structure",required:["RegionName"],members:{RegionName:{},ReplicaGlobalSecondaryIndexUpdates:{type:"list",member:{type:"structure",members:{IndexName:{},ProvisionedReadCapacityAutoScalingUpdate:{shape:"S9e"}}}},ReplicaProvisionedReadCapacityAutoScalingUpdate:{shape:"S9e"}}}}}},output:{type:"structure",members:{TableAutoScalingDescription:{shape:"S6i"}}}},UpdateTimeToLive:{input:{type:"structure",required:["TableName","TimeToLiveSpecification"],members:{TableName:{},TimeToLiveSpecification:{shape:"Sah"}}},output:{type:"structure",members:{TimeToLiveSpecification:{shape:"Sah"}}},endpointdiscovery:{}}},shapes:{S5:{type:"list",member:{shape:"S6"}},S6:{type:"structure",members:{S:{},N:{},B:{type:"blob"},SS:{type:"list",member:{}},NS:{type:"list",member:{}},BS:{type:"list",member:{type:"blob"}},M:{type:"map",key:{},value:{shape:"S6"}},L:{type:"list",member:{shape:"S6"}},NULL:{type:"boolean"},BOOL:{type:"boolean"}}},Sq:{type:"map",key:{},value:{shape:"S6"}},Ss:{type:"map",key:{},value:{type:"structure",required:["Keys"],members:{Keys:{type:"list",member:{shape:"Sv"}},AttributesToGet:{shape:"Sw"},ConsistentRead:{type:"boolean"},ProjectionExpression:{},ExpressionAttributeNames:{shape:"Sy"}}}},Sv:{type:"map",key:{},value:{shape:"S6"}},Sw:{type:"list",member:{}},Sy:{type:"map",key:{},value:{}},S13:{type:"list",member:{shape:"Sq"}},S14:{type:"list",member:{shape:"S15"}},S15:{type:"structure",members:{TableName:{},CapacityUnits:{type:"double"},ReadCapacityUnits:{type:"double"},WriteCapacityUnits:{type:"double"},Table:{shape:"S17"},LocalSecondaryIndexes:{shape:"S18"},GlobalSecondaryIndexes:{shape:"S18"}}},S17:{type:"structure",members:{ReadCapacityUnits:{type:"double"},WriteCapacityUnits:{type:"double"},CapacityUnits:{type:"double"}}},S18:{type:"map",key:{},value:{shape:"S17"}},S1b:{type:"map",key:{},value:{type:"list",member:{type:"structure",members:{PutRequest:{type:"structure",required:["Item"],members:{Item:{shape:"S1f"}}},DeleteRequest:{type:"structure",required:["Key"],members:{Key:{shape:"Sv"}}}}}}},S1f:{type:"map",key:{},value:{shape:"S6"}},S1j:{type:"map",key:{},value:{type:"list",member:{shape:"S1l"}}},S1l:{type:"structure",members:{ItemCollectionKey:{type:"map",key:{},value:{shape:"S6"}},SizeEstimateRangeGB:{type:"list",member:{type:"double"}}}},S1s:{type:"structure",required:["BackupArn","BackupName","BackupStatus","BackupType","BackupCreationDateTime"],members:{BackupArn:{},BackupName:{},BackupSizeBytes:{type:"long"},BackupStatus:{},BackupType:{},BackupCreationDateTime:{type:"timestamp"},BackupExpiryDateTime:{type:"timestamp"}}},S20:{type:"list",member:{type:"structure",members:{RegionName:{}}}},S24:{type:"structure",members:{ReplicationGroup:{shape:"S25"},GlobalTableArn:{},CreationDateTime:{type:"timestamp"},GlobalTableStatus:{},GlobalTableName:{}}},S25:{type:"list",member:{type:"structure",members:{RegionName:{},ReplicaStatus:{},ReplicaStatusDescription:{},ReplicaStatusPercentProgress:{},KMSMasterKeyId:{},ProvisionedThroughputOverride:{shape:"S2b"},GlobalSecondaryIndexes:{type:"list",member:{type:"structure",members:{IndexName:{},ProvisionedThroughputOverride:{shape:"S2b"}}}},ReplicaInaccessibleDateTime:{type:"timestamp"}}}},S2b:{type:"structure",members:{ReadCapacityUnits:{type:"long"}}},S2i:{type:"list",member:{type:"structure",required:["AttributeName","AttributeType"],members:{AttributeName:{},AttributeType:{}}}},S2m:{type:"list",member:{type:"structure",required:["AttributeName","KeyType"],members:{AttributeName:{},KeyType:{}}}},S2p:{type:"list",member:{type:"structure",required:["IndexName","KeySchema","Projection"],members:{IndexName:{},KeySchema:{shape:"S2m"},Projection:{shape:"S2r"}}}},S2r:{type:"structure",members:{ProjectionType:{},NonKeyAttributes:{type:"list",member:{}}}},S2v:{type:"list",member:{type:"structure",required:["IndexName","KeySchema","Projection"],members:{IndexName:{},KeySchema:{shape:"S2m"},Projection:{shape:"S2r"},ProvisionedThroughput:{shape:"S2x"}}}},S2x:{type:"structure",required:["ReadCapacityUnits","WriteCapacityUnits"],members:{ReadCapacityUnits:{type:"long"},WriteCapacityUnits:{type:"long"}}},S2z:{type:"structure",required:["StreamEnabled"],members:{StreamEnabled:{type:"boolean"},StreamViewType:{}}},S32:{type:"structure",members:{Enabled:{type:"boolean"},SSEType:{},KMSMasterKeyId:{}}},S35:{type:"list",member:{type:"structure",required:["Key","Value"],members:{Key:{},Value:{}}}},S3a:{type:"structure",members:{AttributeDefinitions:{shape:"S2i"},TableName:{},KeySchema:{shape:"S2m"},TableStatus:{},CreationDateTime:{type:"timestamp"},ProvisionedThroughput:{shape:"S3c"},TableSizeBytes:{type:"long"},ItemCount:{type:"long"},TableArn:{},TableId:{},BillingModeSummary:{shape:"S3g"},LocalSecondaryIndexes:{type:"list",member:{type:"structure",members:{IndexName:{},KeySchema:{shape:"S2m"},Projection:{shape:"S2r"},IndexSizeBytes:{type:"long"},ItemCount:{type:"long"},IndexArn:{}}}},GlobalSecondaryIndexes:{type:"list",member:{type:"structure",members:{IndexName:{},KeySchema:{shape:"S2m"},Projection:{shape:"S2r"},IndexStatus:{},Backfilling:{type:"boolean"},ProvisionedThroughput:{shape:"S3c"},IndexSizeBytes:{type:"long"},ItemCount:{type:"long"},IndexArn:{}}}},StreamSpecification:{shape:"S2z"},LatestStreamLabel:{},LatestStreamArn:{},GlobalTableVersion:{},Replicas:{shape:"S25"},RestoreSummary:{type:"structure",required:["RestoreDateTime","RestoreInProgress"],members:{SourceBackupArn:{},SourceTableArn:{},RestoreDateTime:{type:"timestamp"},RestoreInProgress:{type:"boolean"}}},SSEDescription:{shape:"S3r"},ArchivalSummary:{type:"structure",members:{ArchivalDateTime:{type:"timestamp"},ArchivalReason:{},ArchivalBackupArn:{}}}}},S3c:{type:"structure",members:{LastIncreaseDateTime:{type:"timestamp"},LastDecreaseDateTime:{type:"timestamp"},NumberOfDecreasesToday:{type:"long"},ReadCapacityUnits:{type:"long"},WriteCapacityUnits:{type:"long"}}},S3g:{type:"structure",members:{BillingMode:{},LastUpdateToPayPerRequestDateTime:{type:"timestamp"}}},S3r:{type:"structure",members:{Status:{},SSEType:{},KMSMasterKeyArn:{},InaccessibleEncryptionDateTime:{type:"timestamp"}}},S3y:{type:"structure",members:{BackupDetails:{shape:"S1s"},SourceTableDetails:{type:"structure",required:["TableName","TableId","KeySchema","TableCreationDateTime","ProvisionedThroughput"],members:{TableName:{},TableId:{},TableArn:{},TableSizeBytes:{type:"long"},KeySchema:{shape:"S2m"},TableCreationDateTime:{type:"timestamp"},ProvisionedThroughput:{shape:"S2x"},ItemCount:{type:"long"},BillingMode:{}}},SourceTableFeatureDetails:{type:"structure",members:{LocalSecondaryIndexes:{type:"list",member:{type:"structure",members:{IndexName:{},KeySchema:{shape:"S2m"},Projection:{shape:"S2r"}}}},GlobalSecondaryIndexes:{type:"list",member:{type:"structure",members:{IndexName:{},KeySchema:{shape:"S2m"},Projection:{shape:"S2r"},ProvisionedThroughput:{shape:"S2x"}}}},StreamDescription:{shape:"S2z"},TimeToLiveDescription:{shape:"S47"},SSEDescription:{shape:"S3r"}}}}},S47:{type:"structure",members:{TimeToLiveStatus:{},AttributeName:{}}},S4b:{type:"map",key:{},value:{type:"structure",members:{Value:{shape:"S6"},Exists:{type:"boolean"},ComparisonOperator:{},AttributeValueList:{shape:"S4f"}}}},S4f:{type:"list",member:{shape:"S6"}},S4j:{type:"map",key:{},value:{shape:"S6"}},S4s:{type:"structure",required:["ContinuousBackupsStatus"],members:{ContinuousBackupsStatus:{},PointInTimeRecoveryDescription:{type:"structure",members:{PointInTimeRecoveryStatus:{},EarliestRestorableDateTime:{type:"timestamp"},LatestRestorableDateTime:{type:"timestamp"}}}}},S5c:{type:"structure",members:{ExportArn:{},ExportStatus:{},StartTime:{type:"timestamp"},EndTime:{type:"timestamp"},ExportManifest:{},TableArn:{},TableId:{},ExportTime:{type:"timestamp"},ClientToken:{},S3Bucket:{},S3BucketOwner:{},S3Prefix:{},S3SseAlgorithm:{},S3SseKmsKeyId:{},FailureCode:{},FailureMessage:{},ExportFormat:{},BilledSizeBytes:{type:"long"},ItemCount:{type:"long"}}},S5w:{type:"list",member:{type:"structure",required:["RegionName"],members:{RegionName:{},ReplicaStatus:{},ReplicaBillingModeSummary:{shape:"S3g"},ReplicaProvisionedReadCapacityUnits:{type:"long"},ReplicaProvisionedReadCapacityAutoScalingSettings:{shape:"S5y"},ReplicaProvisionedWriteCapacityUnits:{type:"long"},ReplicaProvisionedWriteCapacityAutoScalingSettings:{shape:"S5y"},ReplicaGlobalSecondaryIndexSettings:{type:"list",member:{type:"structure",required:["IndexName"],members:{IndexName:{},IndexStatus:{},ProvisionedReadCapacityUnits:{type:"long"},ProvisionedReadCapacityAutoScalingSettings:{shape:"S5y"},ProvisionedWriteCapacityUnits:{type:"long"},ProvisionedWriteCapacityAutoScalingSettings:{shape:"S5y"}}}}}}},S5y:{type:"structure",members:{MinimumUnits:{type:"long"},MaximumUnits:{type:"long"},AutoScalingDisabled:{type:"boolean"},AutoScalingRoleArn:{},ScalingPolicies:{type:"list",member:{type:"structure",members:{PolicyName:{},TargetTrackingScalingPolicyConfiguration:{type:"structure",required:["TargetValue"],members:{DisableScaleIn:{type:"boolean"},ScaleInCooldown:{type:"integer"},ScaleOutCooldown:{type:"integer"},TargetValue:{type:"double"}}}}}}}},S6i:{type:"structure",members:{TableName:{},TableStatus:{},Replicas:{type:"list",member:{type:"structure",members:{RegionName:{},GlobalSecondaryIndexes:{type:"list",member:{type:"structure",members:{IndexName:{},IndexStatus:{},ProvisionedReadCapacityAutoScalingSettings:{shape:"S5y"},ProvisionedWriteCapacityAutoScalingSettings:{shape:"S5y"}}}},ReplicaProvisionedReadCapacityAutoScalingSettings:{shape:"S5y"},ReplicaProvisionedWriteCapacityAutoScalingSettings:{shape:"S5y"},ReplicaStatus:{}}}}}},S6p:{type:"structure",required:["TableName","StreamArn"],members:{TableName:{},StreamArn:{}}},S6q:{type:"structure",members:{TableName:{},StreamArn:{},DestinationStatus:{}}},S6z:{type:"list",member:{type:"structure",members:{Item:{shape:"Sq"}}}},S86:{type:"structure",required:["ComparisonOperator"],members:{AttributeValueList:{shape:"S4f"},ComparisonOperator:{}}},S87:{type:"map",key:{},value:{shape:"S86"}},S9e:{type:"structure",members:{MinimumUnits:{type:"long"},MaximumUnits:{type:"long"},AutoScalingDisabled:{type:"boolean"},AutoScalingRoleArn:{},ScalingPolicyUpdate:{type:"structure",required:["TargetTrackingScalingPolicyConfiguration"],members:{PolicyName:{},TargetTrackingScalingPolicyConfiguration:{type:"structure",required:["TargetValue"],members:{DisableScaleIn:{type:"boolean"},ScaleInCooldown:{type:"integer"},ScaleOutCooldown:{type:"integer"},TargetValue:{type:"double"}}}}}}},Sa3:{type:"list",member:{type:"structure",required:["IndexName"],members:{IndexName:{},ProvisionedThroughputOverride:{shape:"S2b"}}}},Sah:{type:"structure",required:["Enabled","AttributeName"],members:{Enabled:{type:"boolean"},AttributeName:{}}}}}});var j8=U((ZG,QL)=>{QL.exports={pagination:{BatchGetItem:{input_token:"RequestItems",output_token:"UnprocessedKeys"},ListContributorInsights:{input_token:"NextToken",limit_key:"MaxResults",output_token:"NextToken"},ListExports:{input_token:"NextToken",limit_key:"MaxResults",output_token:"NextToken"},ListTables:{input_token:"ExclusiveStartTableName",limit_key:"Limit",output_token:"LastEvaluatedTableName",result_key:"TableNames"},Query:{input_token:"ExclusiveStartKey",limit_key:"Limit",output_token:"LastEvaluatedKey",result_key:"Items"},Scan:{input_token:"ExclusiveStartKey",limit_key:"Limit",output_token:"LastEvaluatedKey",result_key:"Items"}}}});var H8=U((QG,eO)=>{eO.exports={version:2,waiters:{TableExists:{delay:20,operation:"DescribeTable",maxAttempts:25,acceptors:[{expected:"ACTIVE",matcher:"path",state:"success",argument:"Table.TableStatus"},{expected:"ResourceNotFoundException",matcher:"error",state:"retry"}]},TableNotExists:{delay:20,operation:"DescribeTable",maxAttempts:25,acceptors:[{expected:"ResourceNotFoundException",matcher:"error",state:"success"}]}}}});var My=U((eK,W8)=>{_c();var wh=me(),tO=wh.Service,Ay=wh.apiLoader;Ay.services.dynamodb={};wh.DynamoDB=tO.defineService("dynamodb",["2011-12-05","2012-08-10"]);D8();Object.defineProperty(Ay.services.dynamodb,"2011-12-05",{get:function(){var e=q8();return e.paginators=z8().pagination,e.waiters=F8().waiters,e},enumerable:!0,configurable:!0});Object.defineProperty(Ay.services.dynamodb,"2012-08-10",{get:function(){var e=U8();return e.paginators=j8().pagination,e.waiters=H8().waiters,e},enumerable:!0,configurable:!0});W8.exports=wh.DynamoDB});var V8=U(Eh=>{"use strict";Object.defineProperty(Eh,"__esModule",{value:!0});Eh.Nztm2000Quad=void 0;Eh.Nztm2000Quad={type:"TileMatrixSetType",title:"LINZ NZTM2000 Map Tile Grid V2",abstract:"",identifier:"NZTM2000Quad",supportedCRS:"https://www.opengis.net/def/crs/EPSG/0/2193",boundingBox:{type:"BoundingBoxType",crs:"https://www.opengis.net/def/crs/EPSG/0/2193",lowerCorner:[419435.9938,-32605867284e-4],upperCorner:[104381901652e-4,6758167443e-3]},tileMatrix:[{type:"TileMatrixType",identifier:"0",scaleDenominator:139770566007179e-6,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:1,matrixHeight:1},{type:"TileMatrixType",identifier:"1",scaleDenominator:698852830035895e-7,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:2,matrixHeight:2},{type:"TileMatrixType",identifier:"2",scaleDenominator:3494264150179475e-8,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:4,matrixHeight:4},{type:"TileMatrixType",identifier:"3",scaleDenominator:17471320750897374e-9,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:8,matrixHeight:8},{type:"TileMatrixType",identifier:"4",scaleDenominator:8735660375448687e-9,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:16,matrixHeight:16},{type:"TileMatrixType",identifier:"5",scaleDenominator:4.3678301877243435e6,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:32,matrixHeight:32},{type:"TileMatrixType",identifier:"6",scaleDenominator:2.1839150938621718e6,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:64,matrixHeight:64},{type:"TileMatrixType",identifier:"7",scaleDenominator:1.0919575469310859e6,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:128,matrixHeight:128},{type:"TileMatrixType",identifier:"8",scaleDenominator:545978.7734655429,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:256,matrixHeight:256},{type:"TileMatrixType",identifier:"9",scaleDenominator:272989.38673277147,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:512,matrixHeight:512},{type:"TileMatrixType",identifier:"10",scaleDenominator:136494.69336638573,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:1024,matrixHeight:1024},{type:"TileMatrixType",identifier:"11",scaleDenominator:68247.34668319287,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:2048,matrixHeight:2048},{type:"TileMatrixType",identifier:"12",scaleDenominator:34123.67334159643,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:4096,matrixHeight:4096},{type:"TileMatrixType",identifier:"13",scaleDenominator:17061.836670798217,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:8192,matrixHeight:8192},{type:"TileMatrixType",identifier:"14",scaleDenominator:8530.918335399108,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:16384,matrixHeight:16384},{type:"TileMatrixType",identifier:"15",scaleDenominator:4265.459167699554,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:32768,matrixHeight:32768},{type:"TileMatrixType",identifier:"16",scaleDenominator:2132.729583849777,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:65536,matrixHeight:65536},{type:"TileMatrixType",identifier:"17",scaleDenominator:1066.3647919248886,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:131072,matrixHeight:131072},{type:"TileMatrixType",identifier:"18",scaleDenominator:533.1823959624443,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:262144,matrixHeight:262144},{type:"TileMatrixType",identifier:"19",scaleDenominator:266.59119798122214,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:524288,matrixHeight:524288},{type:"TileMatrixType",identifier:"20",scaleDenominator:133.29559899061107,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:1048576,matrixHeight:1048576},{type:"TileMatrixType",identifier:"21",scaleDenominator:66.64779949530553,topLeftCorner:[104381901652e-4,-32605867284e-4],tileWidth:256,tileHeight:256,matrixWidth:2097152,matrixHeight:2097152}]}});var $8=U(_h=>{"use strict";Object.defineProperty(_h,"__esModule",{value:!0});_h.Nztm2000=void 0;_h.Nztm2000={type:"TileMatrixSetType",title:"LINZ NZTM2000 Map Tile Grid",abstract:"See https://www.linz.govt.nz/data/linz-data-service/guides-and-documentation/nztm2000-map-tile-service-schema",identifier:"NZTM2000",supportedCRS:"https://www.opengis.net/def/crs/EPSG/0/2193",boundingBox:{type:"BoundingBoxType",crs:"https://www.opengis.net/def/crs/EPSG/0/2193",lowerCorner:[3087e3,274e3],upperCorner:[7173e3,3327e3]},tileMatrix:[{type:"TileMatrixType",identifier:"0",scaleDenominator:32e6,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:2,matrixHeight:4},{type:"TileMatrixType",identifier:"1",scaleDenominator:16e6,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:4,matrixHeight:8},{type:"TileMatrixType",identifier:"2",scaleDenominator:8e6,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:8,matrixHeight:16},{type:"TileMatrixType",identifier:"3",scaleDenominator:4e6,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:16,matrixHeight:32},{type:"TileMatrixType",identifier:"4",scaleDenominator:2e6,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:32,matrixHeight:64},{type:"TileMatrixType",identifier:"5",scaleDenominator:1e6,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:64,matrixHeight:128},{type:"TileMatrixType",identifier:"6",scaleDenominator:5e5,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:128,matrixHeight:256},{type:"TileMatrixType",identifier:"7",scaleDenominator:25e4,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:256,matrixHeight:512},{type:"TileMatrixType",identifier:"8",scaleDenominator:1e5,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:640,matrixHeight:1280},{type:"TileMatrixType",identifier:"9",scaleDenominator:5e4,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:1280,matrixHeight:2560},{type:"TileMatrixType",identifier:"10",scaleDenominator:25e3,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:2560,matrixHeight:5120},{type:"TileMatrixType",identifier:"11",scaleDenominator:1e4,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:6400,matrixHeight:12800},{type:"TileMatrixType",identifier:"12",scaleDenominator:5e3,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:12800,matrixHeight:25600},{type:"TileMatrixType",identifier:"13",scaleDenominator:2500,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:25600,matrixHeight:51200},{type:"TileMatrixType",identifier:"14",scaleDenominator:1e3,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:64e3,matrixHeight:128e3},{type:"TileMatrixType",identifier:"15",scaleDenominator:500,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:128e3,matrixHeight:256e3},{type:"TileMatrixType",identifier:"16",scaleDenominator:250,topLeftCorner:[1e7,-1e6],tileWidth:256,tileHeight:256,matrixWidth:256e3,matrixHeight:512e3}]}});var X8=U(Mu=>{"use strict";Object.defineProperty(Mu,"__esModule",{value:!0});Mu.Nztm2000=Mu.Nztm2000Quad=void 0;var sO=V8();Object.defineProperty(Mu,"Nztm2000Quad",{enumerable:!0,get:function(){return sO.Nztm2000Quad}});var oO=$8();Object.defineProperty(Mu,"Nztm2000",{enumerable:!0,get:function(){return oO.Nztm2000}})});var Y8=U((qK,J8)=>{"use strict";J8.exports=Th;Th.polyline=Th;Th.polygon=aO;function Th(t,e,r){var i=t.length,n=ku(t[0],e),s=[],o,u,l,d,h;for(r||(r=[]),o=1;o<i;o++){for(u=t[o-1],l=t[o],d=h=ku(l,e);;)if(n|d){if(n&d)break;n?(u=Py(u,l,n,e),n=ku(u,e)):(l=Py(u,l,d,e),d=ku(l,e))}else{s.push(u),d!==h?(s.push(l),o<i-1&&(r.push(s),s=[])):o===i-1&&s.push(l);break}n=h}return s.length&&r.push(s),r}function aO(t,e){var r,i,n,s,o,u,l;for(i=1;i<=8;i*=2){for(r=[],n=t[t.length-1],s=!(ku(n,e)&i),o=0;o<t.length;o++)u=t[o],l=!(ku(u,e)&i),l!==s&&r.push(Py(n,u,i,e)),l&&r.push(u),n=u,s=l;if(t=r,!t.length)break}return r}function Py(t,e,r,i){return r&8?[t[0]+(e[0]-t[0])*(i[3]-t[1])/(e[1]-t[1]),i[3]]:r&4?[t[0]+(e[0]-t[0])*(i[1]-t[1])/(e[1]-t[1]),i[1]]:r&2?[i[2],t[1]+(e[1]-t[1])*(i[2]-t[0])/(e[0]-t[0])]:r&1?[i[0],t[1]+(e[1]-t[1])*(i[0]-t[0])/(e[0]-t[0])]:null}function ku(t,e){var r=0;return t[0]<e[0]?r|=1:t[0]>e[2]&&(r|=2),t[1]<e[1]?r|=4:t[1]>e[3]&&(r|=8),r}});var Z8=U((Ly,Oy)=>{(function(t,e){typeof Ly=="object"&&typeof Oy<"u"?Oy.exports=e():typeof define=="function"&&define.amd?define(e):t.SplayTree=e()})(Ly,function(){"use strict";var t=function(){function y(v,C){this.next=null,this.key=v,this.data=C,this.left=null,this.right=null}return y}();function e(y,v){return y>v?1:y<v?-1:0}function r(y,v,C){for(var w=new t(null,null),x=w,N=w;;){var I=C(y,v.key);if(I<0){if(v.left===null)break;if(C(y,v.left.key)<0){var q=v.left;if(v.left=q.right,q.right=v,v=q,v.left===null)break}N.left=v,N=v,v=v.left}else if(I>0){if(v.right===null)break;if(C(y,v.right.key)>0){var q=v.right;if(v.right=q.left,q.left=v,v=q,v.right===null)break}x.right=v,x=v,v=v.right}else break}return x.right=v.left,N.left=v.right,v.left=w.right,v.right=w.left,v}function i(y,v,C,w){var x=new t(y,v);if(C===null)return x.left=x.right=null,x;C=r(y,C,w);var N=w(y,C.key);return N<0?(x.left=C.left,x.right=C,C.left=null):N>=0&&(x.right=C.right,x.left=C,C.right=null),x}function n(y,v,C){var w=null,x=null;if(v){v=r(y,v,C);var N=C(v.key,y);N===0?(w=v.left,x=v.right):N<0?(x=v.right,v.right=null,w=v):(w=v.left,v.left=null,x=v)}return{left:w,right:x}}function s(y,v,C){return v===null?y:(y===null||(v=r(y.key,v,C),v.left=y),v)}function o(y,v,C,w,x){if(y){w(""+v+(C?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ")+x(y)+`
|
|
121
|
-
`);var N=v+(C?" ":"\u2502 ");y.left&&o(y.left,N,!1,w,x),y.right&&o(y.right,N,!0,w,x)}}var u=function(){function y(v){v===void 0&&(v=e),this._root=null,this._size=0,this._comparator=v}return y.prototype.insert=function(v,C){return this._size++,this._root=i(v,C,this._root,this._comparator)},y.prototype.add=function(v,C){var w=new t(v,C);this._root===null&&(w.left=w.right=null,this._size++,this._root=w);var x=this._comparator,N=r(v,this._root,x),I=x(v,N.key);return I===0?this._root=N:(I<0?(w.left=N.left,w.right=N,N.left=null):I>0&&(w.right=N.right,w.left=N,N.right=null),this._size++,this._root=w),this._root},y.prototype.remove=function(v){this._root=this._remove(v,this._root,this._comparator)},y.prototype._remove=function(v,C,w){var x;if(C===null)return null;C=r(v,C,w);var N=w(v,C.key);return N===0?(C.left===null?x=C.right:(x=r(v,C.left,w),x.right=C.right),this._size--,x):C},y.prototype.pop=function(){var v=this._root;if(v){for(;v.left;)v=v.left;return this._root=r(v.key,this._root,this._comparator),this._root=this._remove(v.key,this._root,this._comparator),{key:v.key,data:v.data}}return null},y.prototype.findStatic=function(v){for(var C=this._root,w=this._comparator;C;){var x=w(v,C.key);if(x===0)return C;x<0?C=C.left:C=C.right}return null},y.prototype.find=function(v){return this._root&&(this._root=r(v,this._root,this._comparator),this._comparator(v,this._root.key)!==0)?null:this._root},y.prototype.contains=function(v){for(var C=this._root,w=this._comparator;C;){var x=w(v,C.key);if(x===0)return!0;x<0?C=C.left:C=C.right}return!1},y.prototype.forEach=function(v,C){for(var w=this._root,x=[],N=!1;!N;)w!==null?(x.push(w),w=w.left):x.length!==0?(w=x.pop(),v.call(C,w),w=w.right):N=!0;return this},y.prototype.range=function(v,C,w,x){for(var N=[],I=this._comparator,q=this._root,B;N.length!==0||q;)if(q)N.push(q),q=q.left;else{if(q=N.pop(),B=I(q.key,C),B>0)break;if(I(q.key,v)>=0&&w.call(x,q))return this;q=q.right}return this},y.prototype.keys=function(){var v=[];return this.forEach(function(C){var w=C.key;return v.push(w)}),v},y.prototype.values=function(){var v=[];return this.forEach(function(C){var w=C.data;return v.push(w)}),v},y.prototype.min=function(){return this._root?this.minNode(this._root).key:null},y.prototype.max=function(){return this._root?this.maxNode(this._root).key:null},y.prototype.minNode=function(v){if(v===void 0&&(v=this._root),v)for(;v.left;)v=v.left;return v},y.prototype.maxNode=function(v){if(v===void 0&&(v=this._root),v)for(;v.right;)v=v.right;return v},y.prototype.at=function(v){for(var C=this._root,w=!1,x=0,N=[];!w;)if(C)N.push(C),C=C.left;else if(N.length>0){if(C=N.pop(),x===v)return C;x++,C=C.right}else w=!0;return null},y.prototype.next=function(v){var C=this._root,w=null;if(v.right){for(w=v.right;w.left;)w=w.left;return w}for(var x=this._comparator;C;){var N=x(v.key,C.key);if(N===0)break;N<0?(w=C,C=C.left):C=C.right}return w},y.prototype.prev=function(v){var C=this._root,w=null;if(v.left!==null){for(w=v.left;w.right;)w=w.right;return w}for(var x=this._comparator;C;){var N=x(v.key,C.key);if(N===0)break;N<0?C=C.left:(w=C,C=C.right)}return w},y.prototype.clear=function(){return this._root=null,this._size=0,this},y.prototype.toList=function(){return h(this._root)},y.prototype.load=function(v,C,w){C===void 0&&(C=[]),w===void 0&&(w=!1);var x=v.length,N=this._comparator;if(w&&S(v,C,0,x-1,N),this._root===null)this._root=l(v,C,0,x),this._size=x;else{var I=b(this.toList(),d(v,C),N);x=this._size+x,this._root=m({head:I},0,x)}return this},y.prototype.isEmpty=function(){return this._root===null},Object.defineProperty(y.prototype,"size",{get:function(){return this._size},enumerable:!0,configurable:!0}),Object.defineProperty(y.prototype,"root",{get:function(){return this._root},enumerable:!0,configurable:!0}),y.prototype.toString=function(v){v===void 0&&(v=function(w){return String(w.key)});var C=[];return o(this._root,"",!0,function(w){return C.push(w)},v),C.join("")},y.prototype.update=function(v,C,w){var x=this._comparator,N=n(v,this._root,x),I=N.left,q=N.right;x(v,C)<0?q=i(C,w,q,x):I=i(C,w,I,x),this._root=s(I,q,x)},y.prototype.split=function(v){return n(v,this._root,this._comparator)},y}();function l(y,v,C,w){var x=w-C;if(x>0){var N=C+Math.floor(x/2),I=y[N],q=v[N],B=new t(I,q);return B.left=l(y,v,C,N),B.right=l(y,v,N+1,w),B}return null}function d(y,v){for(var C=new t(null,null),w=C,x=0;x<y.length;x++)w=w.next=new t(y[x],v[x]);return w.next=null,C.next}function h(y){for(var v=y,C=[],w=!1,x=new t(null,null),N=x;!w;)v?(C.push(v),v=v.left):C.length>0?(v=N=N.next=C.pop(),v=v.right):w=!0;return N.next=null,x.next}function m(y,v,C){var w=C-v;if(w>0){var x=v+Math.floor(w/2),N=m(y,v,x),I=y.head;return I.left=N,y.head=y.head.next,I.right=m(y,x+1,C),I}return null}function b(y,v,C){for(var w=new t(null,null),x=w,N=y,I=v;N!==null&&I!==null;)C(N.key,I.key)<0?(x.next=N,N=N.next):(x.next=I,I=I.next),x=x.next;return N!==null?x.next=N:I!==null&&(x.next=I),w.next}function S(y,v,C,w,x){if(!(C>=w)){for(var N=y[C+w>>1],I=C-1,q=w+1;;){do I++;while(x(y[I],N)<0);do q--;while(x(y[q],N)>0);if(I>=q)break;var B=y[I];y[I]=y[q],y[q]=B,B=v[I],v[I]=v[q],v[q]=B}S(y,v,C,q,x),S(y,v,q+1,w,x)}}return u})});var c3=U((zK,l3)=>{"use strict";var uO=Z8();function lO(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var qy=lO(uO);function Bi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Q8(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Or(t,e,r){return e&&Q8(t.prototype,e),r&&Q8(t,r),t}var jc=function(e,r){return e.ll.x<=r.x&&r.x<=e.ur.x&&e.ll.y<=r.y&&r.y<=e.ur.y},By=function(e,r){if(r.ur.x<e.ll.x||e.ur.x<r.ll.x||r.ur.y<e.ll.y||e.ur.y<r.ll.y)return null;var i=e.ll.x<r.ll.x?r.ll.x:e.ll.x,n=e.ur.x<r.ur.x?e.ur.x:r.ur.x,s=e.ll.y<r.ll.y?r.ll.y:e.ll.y,o=e.ur.y<r.ur.y?e.ur.y:r.ur.y;return{ll:{x:i,y:s},ur:{x:n,y:o}}},so=Number.EPSILON;so===void 0&&(so=Math.pow(2,-52));var cO=so*so,Dy=function(e,r){if(-so<e&&e<so&&-so<r&&r<so)return 0;var i=e-r;return i*i<cO*e*r?0:e<r?-1:1},fO=function(){function t(){Bi(this,t),this.reset()}return Or(t,[{key:"reset",value:function(){this.xRounder=new e3,this.yRounder=new e3}},{key:"round",value:function(r,i){return{x:this.xRounder.round(r),y:this.yRounder.round(i)}}}]),t}(),e3=function(){function t(){Bi(this,t),this.tree=new qy.default,this.round(0)}return Or(t,[{key:"round",value:function(r){var i=this.tree.add(r),n=this.tree.prev(i);if(n!==null&&Dy(i.key,n.key)===0)return this.tree.remove(r),n.key;var s=this.tree.next(i);return s!==null&&Dy(i.key,s.key)===0?(this.tree.remove(r),s.key):r}}]),t}(),Wc=new fO,Hc=function(e,r){return e.x*r.y-e.y*r.x},u3=function(e,r){return e.x*r.x+e.y*r.y},t3=function(e,r,i){var n={x:r.x-e.x,y:r.y-e.y},s={x:i.x-e.x,y:i.y-e.y},o=Hc(n,s);return Dy(o,0)},Nh=function(e){return Math.sqrt(u3(e,e))},hO=function(e,r,i){var n={x:r.x-e.x,y:r.y-e.y},s={x:i.x-e.x,y:i.y-e.y};return Hc(s,n)/Nh(s)/Nh(n)},dO=function(e,r,i){var n={x:r.x-e.x,y:r.y-e.y},s={x:i.x-e.x,y:i.y-e.y};return u3(s,n)/Nh(s)/Nh(n)},r3=function(e,r,i){return r.y===0?null:{x:e.x+r.x/r.y*(i-e.y),y:i}},i3=function(e,r,i){return r.x===0?null:{x:i,y:e.y+r.y/r.x*(i-e.x)}},pO=function(e,r,i,n){if(r.x===0)return i3(i,n,e.x);if(n.x===0)return i3(e,r,i.x);if(r.y===0)return r3(i,n,e.y);if(n.y===0)return r3(e,r,i.y);var s=Hc(r,n);if(s==0)return null;var o={x:i.x-e.x,y:i.y-e.y},u=Hc(o,r)/s,l=Hc(o,n)/s,d=e.x+l*r.x,h=i.x+u*n.x,m=e.y+l*r.y,b=i.y+u*n.y,S=(d+h)/2,y=(m+b)/2;return{x:S,y}},An=function(){Or(t,null,[{key:"compare",value:function(r,i){var n=t.comparePoints(r.point,i.point);return n!==0?n:(r.point!==i.point&&r.link(i),r.isLeft!==i.isLeft?r.isLeft?1:-1:Ah.compare(r.segment,i.segment))}},{key:"comparePoints",value:function(r,i){return r.x<i.x?-1:r.x>i.x?1:r.y<i.y?-1:r.y>i.y?1:0}}]);function t(e,r){Bi(this,t),e.events===void 0?e.events=[this]:e.events.push(this),this.point=e,this.isLeft=r}return Or(t,[{key:"link",value:function(r){if(r.point===this.point)throw new Error("Tried to link already linked events");for(var i=r.point.events,n=0,s=i.length;n<s;n++){var o=i[n];this.point.events.push(o),o.point=this.point}this.checkForConsuming()}},{key:"checkForConsuming",value:function(){for(var r=this.point.events.length,i=0;i<r;i++){var n=this.point.events[i];if(n.segment.consumedBy===void 0)for(var s=i+1;s<r;s++){var o=this.point.events[s];o.consumedBy===void 0&&n.otherSE.point.events===o.otherSE.point.events&&n.segment.consume(o.segment)}}}},{key:"getAvailableLinkedEvents",value:function(){for(var r=[],i=0,n=this.point.events.length;i<n;i++){var s=this.point.events[i];s!==this&&!s.segment.ringOut&&s.segment.isInResult()&&r.push(s)}return r}},{key:"getLeftmostComparator",value:function(r){var i=this,n=new Map,s=function(u){var l=u.otherSE;n.set(u,{sine:hO(i.point,r.point,l.point),cosine:dO(i.point,r.point,l.point)})};return function(o,u){n.has(o)||s(o),n.has(u)||s(u);var l=n.get(o),d=l.sine,h=l.cosine,m=n.get(u),b=m.sine,S=m.cosine;return d>=0&&b>=0?h<S?1:h>S?-1:0:d<0&&b<0?h<S?-1:h>S?1:0:b<d?-1:b>d?1:0}}}]),t}(),mO=0,Ah=function(){Or(t,null,[{key:"compare",value:function(r,i){var n=r.leftSE.point.x,s=i.leftSE.point.x,o=r.rightSE.point.x,u=i.rightSE.point.x;if(u<n)return 1;if(o<s)return-1;var l=r.leftSE.point.y,d=i.leftSE.point.y,h=r.rightSE.point.y,m=i.rightSE.point.y;if(n<s){if(d<l&&d<h)return 1;if(d>l&&d>h)return-1;var b=r.comparePoint(i.leftSE.point);if(b<0)return 1;if(b>0)return-1;var S=i.comparePoint(r.rightSE.point);return S!==0?S:-1}if(n>s){if(l<d&&l<m)return-1;if(l>d&&l>m)return 1;var y=i.comparePoint(r.leftSE.point);if(y!==0)return y;var v=r.comparePoint(i.rightSE.point);return v<0?1:v>0?-1:1}if(l<d)return-1;if(l>d)return 1;if(o<u){var C=i.comparePoint(r.rightSE.point);if(C!==0)return C}if(o>u){var w=r.comparePoint(i.rightSE.point);if(w<0)return 1;if(w>0)return-1}if(o!==u){var x=h-l,N=o-n,I=m-d,q=u-s;if(x>N&&I<q)return 1;if(x<N&&I>q)return-1}return o>u?1:o<u||h<m?-1:h>m?1:r.id<i.id?-1:r.id>i.id?1:0}}]);function t(e,r,i,n){Bi(this,t),this.id=++mO,this.leftSE=e,e.segment=this,e.otherSE=r,this.rightSE=r,r.segment=this,r.otherSE=e,this.rings=i,this.windings=n}return Or(t,[{key:"replaceRightSE",value:function(r){this.rightSE=r,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}},{key:"bbox",value:function(){var r=this.leftSE.point.y,i=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:r<i?r:i},ur:{x:this.rightSE.point.x,y:r>i?r:i}}}},{key:"vector",value:function(){return{x:this.rightSE.point.x-this.leftSE.point.x,y:this.rightSE.point.y-this.leftSE.point.y}}},{key:"isAnEndpoint",value:function(r){return r.x===this.leftSE.point.x&&r.y===this.leftSE.point.y||r.x===this.rightSE.point.x&&r.y===this.rightSE.point.y}},{key:"comparePoint",value:function(r){if(this.isAnEndpoint(r))return 0;var i=this.leftSE.point,n=this.rightSE.point,s=this.vector();if(i.x===n.x)return r.x===i.x?0:r.x<i.x?1:-1;var o=(r.y-i.y)/s.y,u=i.x+o*s.x;if(r.x===u)return 0;var l=(r.x-i.x)/s.x,d=i.y+l*s.y;return r.y===d?0:r.y<d?-1:1}},{key:"getIntersection",value:function(r){var i=this.bbox(),n=r.bbox(),s=By(i,n);if(s===null)return null;var o=this.leftSE.point,u=this.rightSE.point,l=r.leftSE.point,d=r.rightSE.point,h=jc(i,l)&&this.comparePoint(l)===0,m=jc(n,o)&&r.comparePoint(o)===0,b=jc(i,d)&&this.comparePoint(d)===0,S=jc(n,u)&&r.comparePoint(u)===0;if(m&&h)return S&&!b?u:!S&&b?d:null;if(m)return b&&o.x===d.x&&o.y===d.y?null:o;if(h)return S&&u.x===l.x&&u.y===l.y?null:l;if(S&&b)return null;if(S)return u;if(b)return d;var y=pO(o,this.vector(),l,r.vector());return y===null||!jc(s,y)?null:Wc.round(y.x,y.y)}},{key:"split",value:function(r){var i=[],n=r.events!==void 0,s=new An(r,!0),o=new An(r,!1),u=this.rightSE;this.replaceRightSE(o),i.push(o),i.push(s);var l=new t(s,u,this.rings.slice(),this.windings.slice());return An.comparePoints(l.leftSE.point,l.rightSE.point)>0&&l.swapEvents(),An.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(s.checkForConsuming(),o.checkForConsuming()),i}},{key:"swapEvents",value:function(){var r=this.rightSE;this.rightSE=this.leftSE,this.leftSE=r,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(var i=0,n=this.windings.length;i<n;i++)this.windings[i]*=-1}},{key:"consume",value:function(r){for(var i=this,n=r;i.consumedBy;)i=i.consumedBy;for(;n.consumedBy;)n=n.consumedBy;var s=t.compare(i,n);if(s!==0){if(s>0){var o=i;i=n,n=o}if(i.prev===n){var u=i;i=n,n=u}for(var l=0,d=n.rings.length;l<d;l++){var h=n.rings[l],m=n.windings[l],b=i.rings.indexOf(h);b===-1?(i.rings.push(h),i.windings.push(m)):i.windings[b]+=m}n.rings=null,n.windings=null,n.consumedBy=i,n.leftSE.consumedBy=i.leftSE,n.rightSE.consumedBy=i.rightSE}}},{key:"prevInResult",value:function(){return this._prevInResult!==void 0?this._prevInResult:(this.prev?this.prev.isInResult()?this._prevInResult=this.prev:this._prevInResult=this.prev.prevInResult():this._prevInResult=null,this._prevInResult)}},{key:"beforeState",value:function(){if(this._beforeState!==void 0)return this._beforeState;if(!this.prev)this._beforeState={rings:[],windings:[],multiPolys:[]};else{var r=this.prev.consumedBy||this.prev;this._beforeState=r.afterState()}return this._beforeState}},{key:"afterState",value:function(){if(this._afterState!==void 0)return this._afterState;var r=this.beforeState();this._afterState={rings:r.rings.slice(0),windings:r.windings.slice(0),multiPolys:[]};for(var i=this._afterState.rings,n=this._afterState.windings,s=this._afterState.multiPolys,o=0,u=this.rings.length;o<u;o++){var l=this.rings[o],d=this.windings[o],h=i.indexOf(l);h===-1?(i.push(l),n.push(d)):n[h]+=d}for(var m=[],b=[],S=0,y=i.length;S<y;S++)if(n[S]!==0){var v=i[S],C=v.poly;if(b.indexOf(C)===-1)if(v.isExterior)m.push(C);else{b.indexOf(C)===-1&&b.push(C);var w=m.indexOf(v.poly);w!==-1&&m.splice(w,1)}}for(var x=0,N=m.length;x<N;x++){var I=m[x].multiPoly;s.indexOf(I)===-1&&s.push(I)}return this._afterState}},{key:"isInResult",value:function(){if(this.consumedBy)return!1;if(this._isInResult!==void 0)return this._isInResult;var r=this.beforeState().multiPolys,i=this.afterState().multiPolys;switch(on.type){case"union":{var n=r.length===0,s=i.length===0;this._isInResult=n!==s;break}case"intersection":{var o,u;r.length<i.length?(o=r.length,u=i.length):(o=i.length,u=r.length),this._isInResult=u===on.numMultiPolys&&o<u;break}case"xor":{var l=Math.abs(r.length-i.length);this._isInResult=l%2===1;break}case"difference":{var d=function(m){return m.length===1&&m[0].isSubject};this._isInResult=d(r)!==d(i);break}default:throw new Error("Unrecognized operation type found ".concat(on.type))}return this._isInResult}}],[{key:"fromRing",value:function(r,i,n){var s,o,u,l=An.comparePoints(r,i);if(l<0)s=r,o=i,u=1;else if(l>0)s=i,o=r,u=-1;else throw new Error("Tried to create degenerate segment at [".concat(r.x,", ").concat(r.y,"]"));var d=new An(s,!0),h=new An(o,!1);return new t(d,h,[n],[u])}}]),t}(),n3=function(){function t(e,r,i){if(Bi(this,t),!Array.isArray(e)||e.length===0)throw new Error("Input geometry is not a valid Polygon or MultiPolygon");if(this.poly=r,this.isExterior=i,this.segments=[],typeof e[0][0]!="number"||typeof e[0][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var n=Wc.round(e[0][0],e[0][1]);this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};for(var s=n,o=1,u=e.length;o<u;o++){if(typeof e[o][0]!="number"||typeof e[o][1]!="number")throw new Error("Input geometry is not a valid Polygon or MultiPolygon");var l=Wc.round(e[o][0],e[o][1]);l.x===s.x&&l.y===s.y||(this.segments.push(Ah.fromRing(s,l,this)),l.x<this.bbox.ll.x&&(this.bbox.ll.x=l.x),l.y<this.bbox.ll.y&&(this.bbox.ll.y=l.y),l.x>this.bbox.ur.x&&(this.bbox.ur.x=l.x),l.y>this.bbox.ur.y&&(this.bbox.ur.y=l.y),s=l)}(n.x!==s.x||n.y!==s.y)&&this.segments.push(Ah.fromRing(s,n,this))}return Or(t,[{key:"getSweepEvents",value:function(){for(var r=[],i=0,n=this.segments.length;i<n;i++){var s=this.segments[i];r.push(s.leftSE),r.push(s.rightSE)}return r}}]),t}(),yO=function(){function t(e,r){if(Bi(this,t),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");this.exteriorRing=new n3(e[0],this,!0),this.bbox={ll:{x:this.exteriorRing.bbox.ll.x,y:this.exteriorRing.bbox.ll.y},ur:{x:this.exteriorRing.bbox.ur.x,y:this.exteriorRing.bbox.ur.y}},this.interiorRings=[];for(var i=1,n=e.length;i<n;i++){var s=new n3(e[i],this,!1);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.interiorRings.push(s)}this.multiPoly=r}return Or(t,[{key:"getSweepEvents",value:function(){for(var r=this.exteriorRing.getSweepEvents(),i=0,n=this.interiorRings.length;i<n;i++)for(var s=this.interiorRings[i].getSweepEvents(),o=0,u=s.length;o<u;o++)r.push(s[o]);return r}}]),t}(),s3=function(){function t(e,r){if(Bi(this,t),!Array.isArray(e))throw new Error("Input geometry is not a valid Polygon or MultiPolygon");try{typeof e[0][0][0]=="number"&&(e=[e])}catch{}this.polys=[],this.bbox={ll:{x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY},ur:{x:Number.NEGATIVE_INFINITY,y:Number.NEGATIVE_INFINITY}};for(var i=0,n=e.length;i<n;i++){var s=new yO(e[i],this);s.bbox.ll.x<this.bbox.ll.x&&(this.bbox.ll.x=s.bbox.ll.x),s.bbox.ll.y<this.bbox.ll.y&&(this.bbox.ll.y=s.bbox.ll.y),s.bbox.ur.x>this.bbox.ur.x&&(this.bbox.ur.x=s.bbox.ur.x),s.bbox.ur.y>this.bbox.ur.y&&(this.bbox.ur.y=s.bbox.ur.y),this.polys.push(s)}this.isSubject=r}return Or(t,[{key:"getSweepEvents",value:function(){for(var r=[],i=0,n=this.polys.length;i<n;i++)for(var s=this.polys[i].getSweepEvents(),o=0,u=s.length;o<u;o++)r.push(s[o]);return r}}]),t}(),gO=function(){Or(t,null,[{key:"factory",value:function(r){for(var i=[],n=0,s=r.length;n<s;n++){var o=r[n];if(!(!o.isInResult()||o.ringOut)){for(var u=null,l=o.leftSE,d=o.rightSE,h=[l],m=l.point,b=[];u=l,l=d,h.push(l),l.point!==m;)for(;;){var S=l.getAvailableLinkedEvents();if(S.length===0){var y=h[0].point,v=h[h.length-1].point;throw new Error("Unable to complete output ring starting at [".concat(y.x,",")+" ".concat(y.y,"]. Last matching segment found ends at")+" [".concat(v.x,", ").concat(v.y,"]."))}if(S.length===1){d=S[0].otherSE;break}for(var C=null,w=0,x=b.length;w<x;w++)if(b[w].point===l.point){C=w;break}if(C!==null){var N=b.splice(C)[0],I=h.splice(N.index);I.unshift(I[0].otherSE),i.push(new t(I.reverse()));continue}b.push({index:h.length,point:l.point});var q=l.getLeftmostComparator(u);d=S.sort(q)[0].otherSE;break}i.push(new t(h))}}return i}}]);function t(e){Bi(this,t),this.events=e;for(var r=0,i=e.length;r<i;r++)e[r].segment.ringOut=this;this.poly=null}return Or(t,[{key:"getGeom",value:function(){for(var r=this.events[0].point,i=[r],n=1,s=this.events.length-1;n<s;n++){var o=this.events[n].point,u=this.events[n+1].point;t3(o,r,u)!==0&&(i.push(o),r=o)}if(i.length===1)return null;var l=i[0],d=i[1];t3(l,r,d)===0&&i.shift(),i.push(i[0]);for(var h=this.isExteriorRing()?1:-1,m=this.isExteriorRing()?0:i.length-1,b=this.isExteriorRing()?i.length:-1,S=[],y=m;y!=b;y+=h)S.push([i[y].x,i[y].y]);return S}},{key:"isExteriorRing",value:function(){if(this._isExteriorRing===void 0){var r=this.enclosingRing();this._isExteriorRing=r?!r.isExteriorRing():!0}return this._isExteriorRing}},{key:"enclosingRing",value:function(){return this._enclosingRing===void 0&&(this._enclosingRing=this._calcEnclosingRing()),this._enclosingRing}},{key:"_calcEnclosingRing",value:function(){for(var r=this.events[0],i=1,n=this.events.length;i<n;i++){var s=this.events[i];An.compare(r,s)>0&&(r=s)}for(var o=r.segment.prevInResult(),u=o?o.prevInResult():null;;){if(!o)return null;if(!u)return o.ringOut;if(u.ringOut!==o.ringOut)return u.ringOut.enclosingRing()!==o.ringOut?o.ringOut:o.ringOut.enclosingRing();o=u.prevInResult(),u=o?o.prevInResult():null}}}]),t}(),o3=function(){function t(e){Bi(this,t),this.exteriorRing=e,e.poly=this,this.interiorRings=[]}return Or(t,[{key:"addInterior",value:function(r){this.interiorRings.push(r),r.poly=this}},{key:"getGeom",value:function(){var r=[this.exteriorRing.getGeom()];if(r[0]===null)return null;for(var i=0,n=this.interiorRings.length;i<n;i++){var s=this.interiorRings[i].getGeom();s!==null&&r.push(s)}return r}}]),t}(),vO=function(){function t(e){Bi(this,t),this.rings=e,this.polys=this._composePolys(e)}return Or(t,[{key:"getGeom",value:function(){for(var r=[],i=0,n=this.polys.length;i<n;i++){var s=this.polys[i].getGeom();s!==null&&r.push(s)}return r}},{key:"_composePolys",value:function(r){for(var i=[],n=0,s=r.length;n<s;n++){var o=r[n];if(!o.poly)if(o.isExteriorRing())i.push(new o3(o));else{var u=o.enclosingRing();u.poly||i.push(new o3(u)),u.poly.addInterior(o)}}return i}}]),t}(),bO=function(){function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ah.compare;Bi(this,t),this.queue=e,this.tree=new qy.default(r),this.segments=[]}return Or(t,[{key:"process",value:function(r){var i=r.segment,n=[];if(r.consumedBy)return r.isLeft?this.queue.remove(r.otherSE):this.tree.remove(i),n;var s=r.isLeft?this.tree.insert(i):this.tree.find(i);if(!s)throw new Error("Unable to find segment #".concat(i.id," ")+"[".concat(i.leftSE.point.x,", ").concat(i.leftSE.point.y,"] -> ")+"[".concat(i.rightSE.point.x,", ").concat(i.rightSE.point.y,"] ")+"in SweepLine tree. Please submit a bug report.");for(var o=s,u=s,l=void 0,d=void 0;l===void 0;)o=this.tree.prev(o),o===null?l=null:o.key.consumedBy===void 0&&(l=o.key);for(;d===void 0;)u=this.tree.next(u),u===null?d=null:u.key.consumedBy===void 0&&(d=u.key);if(r.isLeft){var h=null;if(l){var m=l.getIntersection(i);if(m!==null&&(i.isAnEndpoint(m)||(h=m),!l.isAnEndpoint(m)))for(var b=this._splitSafely(l,m),S=0,y=b.length;S<y;S++)n.push(b[S])}var v=null;if(d){var C=d.getIntersection(i);if(C!==null&&(i.isAnEndpoint(C)||(v=C),!d.isAnEndpoint(C)))for(var w=this._splitSafely(d,C),x=0,N=w.length;x<N;x++)n.push(w[x])}if(h!==null||v!==null){var I=null;if(h===null)I=v;else if(v===null)I=h;else{var q=An.comparePoints(h,v);I=q<=0?h:v}this.queue.remove(i.rightSE),n.push(i.rightSE);for(var B=i.split(I),z=0,D=B.length;z<D;z++)n.push(B[z])}n.length>0?(this.tree.remove(i),n.push(r)):(this.segments.push(i),i.prev=l)}else{if(l&&d){var se=l.getIntersection(d);if(se!==null){if(!l.isAnEndpoint(se))for(var le=this._splitSafely(l,se),te=0,ve=le.length;te<ve;te++)n.push(le[te]);if(!d.isAnEndpoint(se))for(var qe=this._splitSafely(d,se),Je=0,Mt=qe.length;Je<Mt;Je++)n.push(qe[Je])}}this.tree.remove(i)}return n}},{key:"_splitSafely",value:function(r,i){this.tree.remove(r);var n=r.rightSE;this.queue.remove(n);var s=r.split(i);return s.push(n),r.consumedBy===void 0&&this.tree.insert(r),s}}]),t}(),a3=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_QUEUE_SIZE||1e6,SO=typeof process<"u"&&process.env.POLYGON_CLIPPING_MAX_SWEEPLINE_SEGMENTS||1e6,xO=function(){function t(){Bi(this,t)}return Or(t,[{key:"run",value:function(r,i,n){on.type=r,Wc.reset();for(var s=[new s3(i,!0)],o=0,u=n.length;o<u;o++)s.push(new s3(n[o],!1));if(on.numMultiPolys=s.length,on.type==="difference")for(var l=s[0],d=1;d<s.length;)By(s[d].bbox,l.bbox)!==null?d++:s.splice(d,1);if(on.type==="intersection"){for(var h=0,m=s.length;h<m;h++)for(var b=s[h],S=h+1,y=s.length;S<y;S++)if(By(b.bbox,s[S].bbox)===null)return[]}for(var v=new qy.default(An.compare),C=0,w=s.length;C<w;C++)for(var x=s[C].getSweepEvents(),N=0,I=x.length;N<I;N++)if(v.insert(x[N]),v.size>a3)throw new Error("Infinite loop when putting segment endpoints in a priority queue (queue size too big). Please file a bug report.");for(var q=new bO(v),B=v.size,z=v.pop();z;){var D=z.key;if(v.size===B){var se=D.segment;throw new Error("Unable to pop() ".concat(D.isLeft?"left":"right"," SweepEvent ")+"[".concat(D.point.x,", ").concat(D.point.y,"] from segment #").concat(se.id," ")+"[".concat(se.leftSE.point.x,", ").concat(se.leftSE.point.y,"] -> ")+"[".concat(se.rightSE.point.x,", ").concat(se.rightSE.point.y,"] from queue. ")+"Please file a bug report.")}if(v.size>a3)throw new Error("Infinite loop when passing sweep line over endpoints (queue size too big). Please file a bug report.");if(q.segments.length>SO)throw new Error("Infinite loop when passing sweep line over endpoints (too many sweep line segments). Please file a bug report.");for(var le=q.process(D),te=0,ve=le.length;te<ve;te++){var qe=le[te];qe.consumedBy===void 0&&v.insert(qe)}B=v.size,z=v.pop()}Wc.reset();var Je=gO.factory(q.segments),Mt=new vO(Je);return Mt.getGeom()}}]),t}(),on=new xO,wO=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return on.run("union",e,i)},EO=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return on.run("intersection",e,i)},_O=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return on.run("xor",e,i)},CO=function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return on.run("difference",e,i)},RO={union:wO,intersection:EO,xor:_O,difference:CO};l3.exports=RO});var g3=U((Fy,Uy)=>{(function(t,e){typeof Fy=="object"&&typeof Uy<"u"?Uy.exports=e():typeof define=="function"&&define.amd?define(e):t.proj4=e()})(Fy,function(){"use strict";var t=function(a){a("EPSG:4326","+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"),a("EPSG:4269","+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"),a("EPSG:3857","+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"),a.WGS84=a["EPSG:4326"],a["EPSG:3785"]=a["EPSG:3857"],a.GOOGLE=a["EPSG:3857"],a["EPSG:900913"]=a["EPSG:3857"],a["EPSG:102113"]=a["EPSG:3857"]},e=1,r=2,i=3,n=4,s=5,o=6378137,u=6356752314e-3,l=.0066943799901413165,d=484813681109536e-20,h=Math.PI/2,m=.16666666666666666,b=.04722222222222222,S=.022156084656084655,y=1e-10,v=.017453292519943295,C=57.29577951308232,w=Math.PI/4,x=Math.PI*2,N=3.14159265359,I={};I.greenwich=0,I.lisbon=-9.131906111111,I.paris=2.337229166667,I.bogota=-74.080916666667,I.madrid=-3.687938888889,I.rome=12.452333333333,I.bern=7.439583333333,I.jakarta=106.807719444444,I.ferro=-17.666666666667,I.brussels=4.367975,I.stockholm=18.058277777778,I.athens=23.7163375,I.oslo=10.722916666667;var q={ft:{to_meter:.3048},"us-ft":{to_meter:1200/3937}},B=/[\s_\-\/\(\)]/g;function z(a,c){if(a[c])return a[c];for(var p=Object.keys(a),_=c.toLowerCase().replace(B,""),E=-1,T,M;++E<p.length;)if(T=p[E],M=T.toLowerCase().replace(B,""),M===_)return a[T]}var D=function(a){var c={},p=a.split("+").map(function(R){return R.trim()}).filter(function(R){return R}).reduce(function(R,O){var H=O.split("=");return H.push(!0),R[H[0].toLowerCase()]=H[1],R},{}),_,E,T,M={proj:"projName",datum:"datumCode",rf:function(R){c.rf=parseFloat(R)},lat_0:function(R){c.lat0=R*v},lat_1:function(R){c.lat1=R*v},lat_2:function(R){c.lat2=R*v},lat_ts:function(R){c.lat_ts=R*v},lon_0:function(R){c.long0=R*v},lon_1:function(R){c.long1=R*v},lon_2:function(R){c.long2=R*v},alpha:function(R){c.alpha=parseFloat(R)*v},gamma:function(R){c.rectified_grid_angle=parseFloat(R)},lonc:function(R){c.longc=R*v},x_0:function(R){c.x0=parseFloat(R)},y_0:function(R){c.y0=parseFloat(R)},k_0:function(R){c.k0=parseFloat(R)},k:function(R){c.k0=parseFloat(R)},a:function(R){c.a=parseFloat(R)},b:function(R){c.b=parseFloat(R)},r_a:function(){c.R_A=!0},zone:function(R){c.zone=parseInt(R,10)},south:function(){c.utmSouth=!0},towgs84:function(R){c.datum_params=R.split(",").map(function(O){return parseFloat(O)})},to_meter:function(R){c.to_meter=parseFloat(R)},units:function(R){c.units=R;var O=z(q,R);O&&(c.to_meter=O.to_meter)},from_greenwich:function(R){c.from_greenwich=R*v},pm:function(R){var O=z(I,R);c.from_greenwich=(O||parseFloat(R))*v},nadgrids:function(R){R==="@null"?c.datumCode="none":c.nadgrids=R},axis:function(R){var O="ewnsud";R.length===3&&O.indexOf(R.substr(0,1))!==-1&&O.indexOf(R.substr(1,1))!==-1&&O.indexOf(R.substr(2,1))!==-1&&(c.axis=R)},approx:function(){c.approx=!0}};for(_ in p)E=p[_],_ in M?(T=M[_],typeof T=="function"?T(E):c[T]=E):c[_]=E;return typeof c.datumCode=="string"&&c.datumCode!=="WGS84"&&(c.datumCode=c.datumCode.toLowerCase()),c},se=1,le=2,te=3,ve=4,qe=5,Je=-1,Mt=/\s/,Pe=/[A-Za-z]/,Wr=/[A-Za-z84]/,vr=/[,\]]/,Gr=/[\d\.E\-\+]/;function Rt(a){if(typeof a!="string")throw new Error("not a string");this.text=a.trim(),this.level=0,this.place=0,this.root=null,this.stack=[],this.currentObject=null,this.state=se}Rt.prototype.readCharicter=function(){var a=this.text[this.place++];if(this.state!==ve)for(;Mt.test(a);){if(this.place>=this.text.length)return;a=this.text[this.place++]}switch(this.state){case se:return this.neutral(a);case le:return this.keyword(a);case ve:return this.quoted(a);case qe:return this.afterquote(a);case te:return this.number(a);case Je:return}},Rt.prototype.afterquote=function(a){if(a==='"'){this.word+='"',this.state=ve;return}if(vr.test(a)){this.word=this.word.trim(),this.afterItem(a);return}throw new Error(`havn't handled "`+a+'" in afterquote yet, index '+this.place)},Rt.prototype.afterItem=function(a){if(a===","){this.word!==null&&this.currentObject.push(this.word),this.word=null,this.state=se;return}if(a==="]"){this.level--,this.word!==null&&(this.currentObject.push(this.word),this.word=null),this.state=se,this.currentObject=this.stack.pop(),this.currentObject||(this.state=Je);return}},Rt.prototype.number=function(a){if(Gr.test(a)){this.word+=a;return}if(vr.test(a)){this.word=parseFloat(this.word),this.afterItem(a);return}throw new Error(`havn't handled "`+a+'" in number yet, index '+this.place)},Rt.prototype.quoted=function(a){if(a==='"'){this.state=qe;return}this.word+=a},Rt.prototype.keyword=function(a){if(Wr.test(a)){this.word+=a;return}if(a==="["){var c=[];c.push(this.word),this.level++,this.root===null?this.root=c:this.currentObject.push(c),this.stack.push(this.currentObject),this.currentObject=c,this.state=se;return}if(vr.test(a)){this.afterItem(a);return}throw new Error(`havn't handled "`+a+'" in keyword yet, index '+this.place)},Rt.prototype.neutral=function(a){if(Pe.test(a)){this.word=a,this.state=le;return}if(a==='"'){this.word="",this.state=ve;return}if(Gr.test(a)){this.word=a,this.state=te;return}if(vr.test(a)){this.afterItem(a);return}throw new Error(`havn't handled "`+a+'" in neutral yet, index '+this.place)},Rt.prototype.output=function(){for(;this.place<this.text.length;)this.readCharicter();if(this.state===Je)return this.root;throw new Error('unable to parse string "'+this.text+'". State is '+this.state)};function Kr(a){var c=new Rt(a);return c.output()}function or(a,c,p){Array.isArray(c)&&(p.unshift(c),c=null);var _=c?{}:a,E=p.reduce(function(T,M){return er(M,T),T},_);c&&(a[c]=E)}function er(a,c){if(!Array.isArray(a)){c[a]=!0;return}var p=a.shift();if(p==="PARAMETER"&&(p=a.shift()),a.length===1){if(Array.isArray(a[0])){c[p]={},er(a[0],c[p]);return}c[p]=a[0];return}if(!a.length){c[p]=!0;return}if(p==="TOWGS84"){c[p]=a;return}if(p==="AXIS"){p in c||(c[p]=[]),c[p].push(a);return}Array.isArray(p)||(c[p]={});var _;switch(p){case"UNIT":case"PRIMEM":case"VERT_DATUM":c[p]={name:a[0].toLowerCase(),convert:a[1]},a.length===3&&er(a[2],c[p]);return;case"SPHEROID":case"ELLIPSOID":c[p]={name:a[0],a:a[1],rf:a[2]},a.length===4&&er(a[3],c[p]);return;case"PROJECTEDCRS":case"PROJCRS":case"GEOGCS":case"GEOCCS":case"PROJCS":case"LOCAL_CS":case"GEODCRS":case"GEODETICCRS":case"GEODETICDATUM":case"EDATUM":case"ENGINEERINGDATUM":case"VERT_CS":case"VERTCRS":case"VERTICALCRS":case"COMPD_CS":case"COMPOUNDCRS":case"ENGINEERINGCRS":case"ENGCRS":case"FITTED_CS":case"LOCAL_DATUM":case"DATUM":a[0]=["name",a[0]],or(c,p,a);return;default:for(_=-1;++_<a.length;)if(!Array.isArray(a[_]))return er(a,c[p]);return or(c,p,a)}}var wi=.017453292519943295;function Vi(a,c){var p=c[0],_=c[1];!(p in a)&&_ in a&&(a[p]=a[_],c.length===3&&(a[p]=c[2](a[p])))}function L(a){return a*wi}function k(a){if(a.type==="GEOGCS"?a.projName="longlat":a.type==="LOCAL_CS"?(a.projName="identity",a.local=!0):typeof a.PROJECTION=="object"?a.projName=Object.keys(a.PROJECTION)[0]:a.projName=a.PROJECTION,a.AXIS){for(var c="",p=0,_=a.AXIS.length;p<_;++p){var E=[a.AXIS[p][0].toLowerCase(),a.AXIS[p][1].toLowerCase()];E[0].indexOf("north")!==-1||(E[0]==="y"||E[0]==="lat")&&E[1]==="north"?c+="n":E[0].indexOf("south")!==-1||(E[0]==="y"||E[0]==="lat")&&E[1]==="south"?c+="s":E[0].indexOf("east")!==-1||(E[0]==="x"||E[0]==="lon")&&E[1]==="east"?c+="e":(E[0].indexOf("west")!==-1||(E[0]==="x"||E[0]==="lon")&&E[1]==="west")&&(c+="w")}c.length===2&&(c+="u"),c.length===3&&(a.axis=c)}a.UNIT&&(a.units=a.UNIT.name.toLowerCase(),a.units==="metre"&&(a.units="meter"),a.UNIT.convert&&(a.type==="GEOGCS"?a.DATUM&&a.DATUM.SPHEROID&&(a.to_meter=a.UNIT.convert*a.DATUM.SPHEROID.a):a.to_meter=a.UNIT.convert));var T=a.GEOGCS;a.type==="GEOGCS"&&(T=a),T&&(T.DATUM?a.datumCode=T.DATUM.name.toLowerCase():a.datumCode=T.name.toLowerCase(),a.datumCode.slice(0,2)==="d_"&&(a.datumCode=a.datumCode.slice(2)),(a.datumCode==="new_zealand_geodetic_datum_1949"||a.datumCode==="new_zealand_1949")&&(a.datumCode="nzgd49"),(a.datumCode==="wgs_1984"||a.datumCode==="world_geodetic_system_1984")&&(a.PROJECTION==="Mercator_Auxiliary_Sphere"&&(a.sphere=!0),a.datumCode="wgs84"),a.datumCode.slice(-6)==="_ferro"&&(a.datumCode=a.datumCode.slice(0,-6)),a.datumCode.slice(-8)==="_jakarta"&&(a.datumCode=a.datumCode.slice(0,-8)),~a.datumCode.indexOf("belge")&&(a.datumCode="rnb72"),T.DATUM&&T.DATUM.SPHEROID&&(a.ellps=T.DATUM.SPHEROID.name.replace("_19","").replace(/[Cc]larke\_18/,"clrk"),a.ellps.toLowerCase().slice(0,13)==="international"&&(a.ellps="intl"),a.a=T.DATUM.SPHEROID.a,a.rf=parseFloat(T.DATUM.SPHEROID.rf,10)),T.DATUM&&T.DATUM.TOWGS84&&(a.datum_params=T.DATUM.TOWGS84),~a.datumCode.indexOf("osgb_1936")&&(a.datumCode="osgb36"),~a.datumCode.indexOf("osni_1952")&&(a.datumCode="osni52"),(~a.datumCode.indexOf("tm65")||~a.datumCode.indexOf("geodetic_datum_of_1965"))&&(a.datumCode="ire65"),a.datumCode==="ch1903+"&&(a.datumCode="ch1903"),~a.datumCode.indexOf("israel")&&(a.datumCode="isr93")),a.b&&!isFinite(a.b)&&(a.b=a.a);function M(H){var $=a.to_meter||1;return H*$}var R=function(H){return Vi(a,H)},O=[["standard_parallel_1","Standard_Parallel_1"],["standard_parallel_1","Latitude of 1st standard parallel"],["standard_parallel_2","Standard_Parallel_2"],["standard_parallel_2","Latitude of 2nd standard parallel"],["false_easting","False_Easting"],["false_easting","False easting"],["false-easting","Easting at false origin"],["false_northing","False_Northing"],["false_northing","False northing"],["false_northing","Northing at false origin"],["central_meridian","Central_Meridian"],["central_meridian","Longitude of natural origin"],["central_meridian","Longitude of false origin"],["latitude_of_origin","Latitude_Of_Origin"],["latitude_of_origin","Central_Parallel"],["latitude_of_origin","Latitude of natural origin"],["latitude_of_origin","Latitude of false origin"],["scale_factor","Scale_Factor"],["k0","scale_factor"],["latitude_of_center","Latitude_Of_Center"],["latitude_of_center","Latitude_of_center"],["lat0","latitude_of_center",L],["longitude_of_center","Longitude_Of_Center"],["longitude_of_center","Longitude_of_center"],["longc","longitude_of_center",L],["x0","false_easting",M],["y0","false_northing",M],["long0","central_meridian",L],["lat0","latitude_of_origin",L],["lat0","standard_parallel_1",L],["lat1","standard_parallel_1",L],["lat2","standard_parallel_2",L],["azimuth","Azimuth"],["alpha","azimuth",L],["srsCode","name"]];O.forEach(R),!a.long0&&a.longc&&(a.projName==="Albers_Conic_Equal_Area"||a.projName==="Lambert_Azimuthal_Equal_Area")&&(a.long0=a.longc),!a.lat_ts&&a.lat1&&(a.projName==="Stereographic_South_Pole"||a.projName==="Polar Stereographic (variant B)")&&(a.lat0=L(a.lat1>0?90:-90),a.lat_ts=a.lat1)}var J=function(a){var c=Kr(a),p=c.shift(),_=c.shift();c.unshift(["name",_]),c.unshift(["type",p]);var E={};return er(c,E),k(E),E};function G(a){var c=this;if(arguments.length===2){var p=arguments[1];typeof p=="string"?p.charAt(0)==="+"?G[a]=D(arguments[1]):G[a]=J(arguments[1]):G[a]=p}else if(arguments.length===1){if(Array.isArray(a))return a.map(function(_){Array.isArray(_)?G.apply(c,_):G(_)});if(typeof a=="string"){if(a in G)return G[a]}else"EPSG"in a?G["EPSG:"+a.EPSG]=a:"ESRI"in a?G["ESRI:"+a.ESRI]=a:"IAU2000"in a?G["IAU2000:"+a.IAU2000]=a:console.log(a);return}}t(G);function Le(a){return typeof a=="string"}function bt(a){return a in G}var Et=["PROJECTEDCRS","PROJCRS","GEOGCS","GEOCCS","PROJCS","LOCAL_CS","GEODCRS","GEODETICCRS","GEODETICDATUM","ENGCRS","ENGINEERINGCRS"];function Jt(a){return Et.some(function(c){return a.indexOf(c)>-1})}var br=["3857","900913","3785","102113"];function Vr(a){var c=z(a,"authority");if(!!c){var p=z(c,"epsg");return p&&br.indexOf(p)>-1}}function Tt(a){var c=z(a,"extension");if(!!c)return z(c,"proj4")}function Ut(a){return a[0]==="+"}function Ne(a){if(Le(a)){if(bt(a))return G[a];if(Jt(a)){var c=J(a);if(Vr(c))return G["EPSG:3857"];var p=Tt(c);return p?D(p):c}if(Ut(a))return D(a)}else return a}var ui=function(a,c){a=a||{};var p,_;if(!c)return a;for(_ in c)p=c[_],p!==void 0&&(a[_]=p);return a},jt=function(a,c,p){var _=a*c;return p/Math.sqrt(1-_*_)},$r=function(a){return a<0?-1:1},fe=function(a){return Math.abs(a)<=N?a:a-$r(a)*x},Ht=function(a,c,p){var _=a*p,E=.5*a;return _=Math.pow((1-_)/(1+_),E),Math.tan(.5*(h-c))/_},li=function(a,c){for(var p=.5*a,_,E,T=h-2*Math.atan(c),M=0;M<=15;M++)if(_=a*Math.sin(T),E=h-2*Math.atan(c*Math.pow((1-_)/(1+_),p))-T,T+=E,Math.abs(E)<=1e-10)return T;return-9999};function P(){var a=this.b/this.a;this.es=1-a*a,"x0"in this||(this.x0=0),"y0"in this||(this.y0=0),this.e=Math.sqrt(this.es),this.lat_ts?this.sphere?this.k0=Math.cos(this.lat_ts):this.k0=jt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)):this.k0||(this.k?this.k0=this.k:this.k0=1)}function j(a){var c=a.x,p=a.y;if(p*C>90&&p*C<-90&&c*C>180&&c*C<-180)return null;var _,E;if(Math.abs(Math.abs(p)-h)<=y)return null;if(this.sphere)_=this.x0+this.a*this.k0*fe(c-this.long0),E=this.y0+this.a*this.k0*Math.log(Math.tan(w+.5*p));else{var T=Math.sin(p),M=Ht(this.e,p,T);_=this.x0+this.a*this.k0*fe(c-this.long0),E=this.y0-this.a*this.k0*Math.log(M)}return a.x=_,a.y=E,a}function W(a){var c=a.x-this.x0,p=a.y-this.y0,_,E;if(this.sphere)E=h-2*Math.atan(Math.exp(-p/(this.a*this.k0)));else{var T=Math.exp(-p/(this.a*this.k0));if(E=li(this.e,T),E===-9999)return null}return _=fe(this.long0+c/(this.a*this.k0)),a.x=_,a.y=E,a}var X=["Mercator","Popular Visualisation Pseudo Mercator","Mercator_1SP","Mercator_Auxiliary_Sphere","merc"],Q={init:P,forward:j,inverse:W,names:X};function he(){}function Ie(a){return a}var je=["longlat","identity"],Lt={init:he,forward:Ie,inverse:Ie,names:je},Ei=[Q,Lt],Ot={},we=[];function Mr(a,c){var p=we.length;return a.names?(we[p]=a,a.names.forEach(function(_){Ot[_.toLowerCase()]=p}),this):(console.log(c),!0)}function wl(a){if(!a)return!1;var c=a.toLowerCase();if(typeof Ot[c]<"u"&&we[Ot[c]])return we[Ot[c]]}function xs(){Ei.forEach(Mr)}var ws={start:xs,add:Mr,get:wl},Te={};Te.MERIT={a:6378137,rf:298.257,ellipseName:"MERIT 1983"},Te.SGS85={a:6378136,rf:298.257,ellipseName:"Soviet Geodetic System 85"},Te.GRS80={a:6378137,rf:298.257222101,ellipseName:"GRS 1980(IUGG, 1980)"},Te.IAU76={a:6378140,rf:298.257,ellipseName:"IAU 1976"},Te.airy={a:6377563396e-3,b:635625691e-2,ellipseName:"Airy 1830"},Te.APL4={a:6378137,rf:298.25,ellipseName:"Appl. Physics. 1965"},Te.NWL9D={a:6378145,rf:298.25,ellipseName:"Naval Weapons Lab., 1965"},Te.mod_airy={a:6377340189e-3,b:6356034446e-3,ellipseName:"Modified Airy"},Te.andrae={a:637710443e-2,rf:300,ellipseName:"Andrae 1876 (Den., Iclnd.)"},Te.aust_SA={a:6378160,rf:298.25,ellipseName:"Australian Natl & S. Amer. 1969"},Te.GRS67={a:6378160,rf:298.247167427,ellipseName:"GRS 67(IUGG 1967)"},Te.bessel={a:6377397155e-3,rf:299.1528128,ellipseName:"Bessel 1841"},Te.bess_nam={a:6377483865e-3,rf:299.1528128,ellipseName:"Bessel 1841 (Namibia)"},Te.clrk66={a:63782064e-1,b:63565838e-1,ellipseName:"Clarke 1866"},Te.clrk80={a:6378249145e-3,rf:293.4663,ellipseName:"Clarke 1880 mod."},Te.clrk58={a:6378293645208759e-9,rf:294.2606763692654,ellipseName:"Clarke 1858"},Te.CPM={a:63757387e-1,rf:334.29,ellipseName:"Comm. des Poids et Mesures 1799"},Te.delmbr={a:6376428,rf:311.5,ellipseName:"Delambre 1810 (Belgium)"},Te.engelis={a:637813605e-2,rf:298.2566,ellipseName:"Engelis 1985"},Te.evrst30={a:6377276345e-3,rf:300.8017,ellipseName:"Everest 1830"},Te.evrst48={a:6377304063e-3,rf:300.8017,ellipseName:"Everest 1948"},Te.evrst56={a:6377301243e-3,rf:300.8017,ellipseName:"Everest 1956"},Te.evrst69={a:6377295664e-3,rf:300.8017,ellipseName:"Everest 1969"},Te.evrstSS={a:6377298556e-3,rf:300.8017,ellipseName:"Everest (Sabah & Sarawak)"},Te.fschr60={a:6378166,rf:298.3,ellipseName:"Fischer (Mercury Datum) 1960"},Te.fschr60m={a:6378155,rf:298.3,ellipseName:"Fischer 1960"},Te.fschr68={a:6378150,rf:298.3,ellipseName:"Fischer 1968"},Te.helmert={a:6378200,rf:298.3,ellipseName:"Helmert 1906"},Te.hough={a:6378270,rf:297,ellipseName:"Hough"},Te.intl={a:6378388,rf:297,ellipseName:"International 1909 (Hayford)"},Te.kaula={a:6378163,rf:298.24,ellipseName:"Kaula 1961"},Te.lerch={a:6378139,rf:298.257,ellipseName:"Lerch 1979"},Te.mprts={a:6397300,rf:191,ellipseName:"Maupertius 1738"},Te.new_intl={a:63781575e-1,b:63567722e-1,ellipseName:"New International 1967"},Te.plessis={a:6376523,rf:6355863,ellipseName:"Plessis 1817 (France)"},Te.krass={a:6378245,rf:298.3,ellipseName:"Krassovsky, 1942"},Te.SEasia={a:6378155,b:63567733205e-4,ellipseName:"Southeast Asia"},Te.walbeck={a:6376896,b:63558348467e-4,ellipseName:"Walbeck"},Te.WGS60={a:6378165,rf:298.3,ellipseName:"WGS 60"},Te.WGS66={a:6378145,rf:298.25,ellipseName:"WGS 66"},Te.WGS7={a:6378135,rf:298.26,ellipseName:"WGS 72"};var wo=Te.WGS84={a:6378137,rf:298.257223563,ellipseName:"WGS 84"};Te.sphere={a:6370997,b:6370997,ellipseName:"Normal Sphere (r=6370997)"};function Wt(a,c,p,_){var E=a*a,T=c*c,M=(E-T)/E,R=0;_?(a*=1-M*(m+M*(b+M*S)),E=a*a,M=0):R=Math.sqrt(M);var O=(E-T)/T;return{es:M,e:R,ep2:O}}function fn(a,c,p,_,E){if(!a){var T=z(Te,_);T||(T=wo),a=T.a,c=T.b,p=T.rf}return p&&!c&&(c=(1-1/p)*a),(p===0||Math.abs(a-c)<y)&&(E=!0,c=a),{a,b:c,rf:p,sphere:E}}var mt={};mt.wgs84={towgs84:"0,0,0",ellipse:"WGS84",datumName:"WGS84"},mt.ch1903={towgs84:"674.374,15.056,405.346",ellipse:"bessel",datumName:"swiss"},mt.ggrs87={towgs84:"-199.87,74.79,246.62",ellipse:"GRS80",datumName:"Greek_Geodetic_Reference_System_1987"},mt.nad83={towgs84:"0,0,0",ellipse:"GRS80",datumName:"North_American_Datum_1983"},mt.nad27={nadgrids:"@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat",ellipse:"clrk66",datumName:"North_American_Datum_1927"},mt.potsdam={towgs84:"598.1,73.7,418.2,0.202,0.045,-2.455,6.7",ellipse:"bessel",datumName:"Potsdam Rauenberg 1950 DHDN"},mt.carthage={towgs84:"-263.0,6.0,431.0",ellipse:"clark80",datumName:"Carthage 1934 Tunisia"},mt.hermannskogel={towgs84:"577.326,90.129,463.919,5.137,1.474,5.297,2.4232",ellipse:"bessel",datumName:"Hermannskogel"},mt.osni52={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"airy",datumName:"Irish National"},mt.ire65={towgs84:"482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15",ellipse:"mod_airy",datumName:"Ireland 1965"},mt.rassadiran={towgs84:"-133.63,-157.5,-158.62",ellipse:"intl",datumName:"Rassadiran"},mt.nzgd49={towgs84:"59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993",ellipse:"intl",datumName:"New Zealand Geodetic Datum 1949"},mt.osgb36={towgs84:"446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894",ellipse:"airy",datumName:"Airy 1830"},mt.s_jtsk={towgs84:"589,76,480",ellipse:"bessel",datumName:"S-JTSK (Ferro)"},mt.beduaram={towgs84:"-106,-87,188",ellipse:"clrk80",datumName:"Beduaram"},mt.gunung_segara={towgs84:"-403,684,41",ellipse:"bessel",datumName:"Gunung Segara Jakarta"},mt.rnb72={towgs84:"106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1",ellipse:"intl",datumName:"Reseau National Belge 1972"};function _i(a,c,p,_,E,T,M){var R={};return a===void 0||a==="none"?R.datum_type=s:R.datum_type=n,c&&(R.datum_params=c.map(parseFloat),(R.datum_params[0]!==0||R.datum_params[1]!==0||R.datum_params[2]!==0)&&(R.datum_type=e),R.datum_params.length>3&&(R.datum_params[3]!==0||R.datum_params[4]!==0||R.datum_params[5]!==0||R.datum_params[6]!==0)&&(R.datum_type=r,R.datum_params[3]*=d,R.datum_params[4]*=d,R.datum_params[5]*=d,R.datum_params[6]=R.datum_params[6]/1e6+1)),M&&(R.datum_type=i,R.grids=M),R.a=p,R.b=_,R.es=E,R.ep2=T,R}var hn={};function ci(a,c){var p=new DataView(c),_=Un(p),E=x1(p,_);E.nSubgrids>1&&console.log("Only single NTv2 subgrids are currently supported, subsequent sub grids are ignored");var T=w1(p,E,_),M={header:E,subgrids:T};return hn[a]=M,M}function zn(a){if(a===void 0)return null;var c=a.split(",");return c.map(Fn)}function Fn(a){if(a.length===0)return null;var c=a[0]==="@";return c&&(a=a.slice(1)),a==="null"?{name:"null",mandatory:!c,grid:null,isNull:!0}:{name:a,mandatory:!c,grid:hn[a]||null,isNull:!1}}function Ci(a){return a/3600*Math.PI/180}function Un(a){var c=a.getInt32(8,!1);return c===11?!1:(c=a.getInt32(8,!0),c!==11&&console.warn("Failed to detect nadgrid endian-ness, defaulting to little-endian"),!0)}function x1(a,c){return{nFields:a.getInt32(8,c),nSubgridFields:a.getInt32(24,c),nSubgrids:a.getInt32(40,c),shiftType:Ia(a,56,56+8).trim(),fromSemiMajorAxis:a.getFloat64(120,c),fromSemiMinorAxis:a.getFloat64(136,c),toSemiMajorAxis:a.getFloat64(152,c),toSemiMinorAxis:a.getFloat64(168,c)}}function Ia(a,c,p){return String.fromCharCode.apply(null,new Uint8Array(a.buffer.slice(c,p)))}function w1(a,c,p){for(var _=176,E=[],T=0;T<c.nSubgrids;T++){var M=E1(a,_,p),R=Yd(a,_,M,p),O=Math.round(1+(M.upperLongitude-M.lowerLongitude)/M.longitudeInterval),H=Math.round(1+(M.upperLatitude-M.lowerLatitude)/M.latitudeInterval);E.push({ll:[Ci(M.lowerLongitude),Ci(M.lowerLatitude)],del:[Ci(M.longitudeInterval),Ci(M.latitudeInterval)],lim:[O,H],count:M.gridNodeCount,cvs:El(R)})}return E}function El(a){return a.map(function(c){return[Ci(c.longitudeShift),Ci(c.latitudeShift)]})}function E1(a,c,p){return{name:Ia(a,c+8,c+16).trim(),parent:Ia(a,c+24,c+24+8).trim(),lowerLatitude:a.getFloat64(c+72,p),upperLatitude:a.getFloat64(c+88,p),lowerLongitude:a.getFloat64(c+104,p),upperLongitude:a.getFloat64(c+120,p),latitudeInterval:a.getFloat64(c+136,p),longitudeInterval:a.getFloat64(c+152,p),gridNodeCount:a.getInt32(c+168,p)}}function Yd(a,c,p,_){for(var E=c+176,T=16,M=[],R=0;R<p.gridNodeCount;R++){var O={latitudeShift:a.getFloat32(E+R*T,_),longitudeShift:a.getFloat32(E+R*T+4,_),latitudeAccuracy:a.getFloat32(E+R*T+8,_),longitudeAccuracy:a.getFloat32(E+R*T+12,_)};M.push(O)}return M}function Ri(a,c){if(!(this instanceof Ri))return new Ri(a);c=c||function(H){if(H)throw H};var p=Ne(a);if(typeof p!="object"){c(a);return}var _=Ri.projections.get(p.projName);if(!_){c(a);return}if(p.datumCode&&p.datumCode!=="none"){var E=z(mt,p.datumCode);E&&(p.datum_params=p.datum_params||(E.towgs84?E.towgs84.split(","):null),p.ellps=E.ellipse,p.datumName=E.datumName?E.datumName:p.datumCode)}p.k0=p.k0||1,p.axis=p.axis||"enu",p.ellps=p.ellps||"wgs84",p.lat1=p.lat1||p.lat0;var T=fn(p.a,p.b,p.rf,p.ellps,p.sphere),M=Wt(T.a,T.b,T.rf,p.R_A),R=zn(p.nadgrids),O=p.datum||_i(p.datumCode,p.datum_params,T.a,T.b,M.es,M.ep2,R);ui(this,p),ui(this,_),this.a=T.a,this.b=T.b,this.rf=T.rf,this.sphere=T.sphere,this.es=M.es,this.e=M.e,this.ep2=M.ep2,this.datum=O,this.init(),c(null,this)}Ri.projections=ws,Ri.projections.start();function Zd(a,c){return a.datum_type!==c.datum_type||a.a!==c.a||Math.abs(a.es-c.es)>5e-11?!1:a.datum_type===e?a.datum_params[0]===c.datum_params[0]&&a.datum_params[1]===c.datum_params[1]&&a.datum_params[2]===c.datum_params[2]:a.datum_type===r?a.datum_params[0]===c.datum_params[0]&&a.datum_params[1]===c.datum_params[1]&&a.datum_params[2]===c.datum_params[2]&&a.datum_params[3]===c.datum_params[3]&&a.datum_params[4]===c.datum_params[4]&&a.datum_params[5]===c.datum_params[5]&&a.datum_params[6]===c.datum_params[6]:!0}function _l(a,c,p){var _=a.x,E=a.y,T=a.z?a.z:0,M,R,O,H;if(E<-h&&E>-1.001*h)E=-h;else if(E>h&&E<1.001*h)E=h;else{if(E<-h)return{x:-1/0,y:-1/0,z:a.z};if(E>h)return{x:1/0,y:1/0,z:a.z}}return _>Math.PI&&(_-=2*Math.PI),R=Math.sin(E),H=Math.cos(E),O=R*R,M=p/Math.sqrt(1-c*O),{x:(M+T)*H*Math.cos(_),y:(M+T)*H*Math.sin(_),z:(M*(1-c)+T)*R}}function Eo(a,c,p,_){var E=1e-12,T=E*E,M=30,R,O,H,$,K,Y,ne,ie,oe,ue,Ee,Oe,We,wt=a.x,ut=a.y,dt=a.z?a.z:0,wr,Kt,xn;if(R=Math.sqrt(wt*wt+ut*ut),O=Math.sqrt(wt*wt+ut*ut+dt*dt),R/p<E){if(wr=0,O/p<E)return Kt=h,xn=-_,{x:a.x,y:a.y,z:a.z}}else wr=Math.atan2(ut,wt);H=dt/O,$=R/O,K=1/Math.sqrt(1-c*(2-c)*$*$),ie=$*(1-c)*K,oe=H*K,We=0;do We++,ne=p/Math.sqrt(1-c*oe*oe),xn=R*ie+dt*oe-ne*(1-c*oe*oe),Y=c*ne/(ne+xn),K=1/Math.sqrt(1-Y*(2-Y)*$*$),ue=$*(1-Y)*K,Ee=H*K,Oe=Ee*ie-ue*oe,ie=ue,oe=Ee;while(Oe*Oe>T&&We<M);return Kt=Math.atan(Ee/Math.abs(ue)),{x:wr,y:Kt,z:xn}}function Qd(a,c,p){if(c===e)return{x:a.x+p[0],y:a.y+p[1],z:a.z+p[2]};if(c===r){var _=p[0],E=p[1],T=p[2],M=p[3],R=p[4],O=p[5],H=p[6];return{x:H*(a.x-O*a.y+R*a.z)+_,y:H*(O*a.x+a.y-M*a.z)+E,z:H*(-R*a.x+M*a.y+a.z)+T}}}function Pa(a,c,p){if(c===e)return{x:a.x-p[0],y:a.y-p[1],z:a.z-p[2]};if(c===r){var _=p[0],E=p[1],T=p[2],M=p[3],R=p[4],O=p[5],H=p[6],$=(a.x-_)/H,K=(a.y-E)/H,Y=(a.z-T)/H;return{x:$+O*K-R*Y,y:-O*$+K+M*Y,z:R*$-M*K+Y}}}function dn(a){return a===e||a===r}var La=function(a,c,p){if(Zd(a,c)||a.datum_type===s||c.datum_type===s)return p;var _=a.a,E=a.es;if(a.datum_type===i){var T=Xr(a,!1,p);if(T!==0)return;_=o,E=l}var M=c.a,R=c.b,O=c.es;if(c.datum_type===i&&(M=o,R=u,O=l),E===O&&_===M&&!dn(a.datum_type)&&!dn(c.datum_type))return p;if(p=_l(p,E,_),dn(a.datum_type)&&(p=Qd(p,a.datum_type,a.datum_params)),dn(c.datum_type)&&(p=Pa(p,c.datum_type,c.datum_params)),p=Eo(p,O,M,R),c.datum_type===i){var H=Xr(c,!0,p);if(H!==0)return}return p};function Xr(a,c,p){if(a.grids===null||a.grids.length===0)return console.log("Grid shift grids not found"),-1;for(var _={x:-p.x,y:p.y},E={x:Number.NaN,y:Number.NaN},T=[],M=0;M<a.grids.length;M++){var R=a.grids[M];if(T.push(R.name),R.isNull){E=_;break}if(R.grid===null){if(R.mandatory)return console.log("Unable to find mandatory grid '"+R.name+"'"),-1;continue}var O=R.grid.subgrids[0],H=(Math.abs(O.del[1])+Math.abs(O.del[0]))/1e4,$=O.ll[0]-H,K=O.ll[1]-H,Y=O.ll[0]+(O.lim[0]-1)*O.del[0]+H,ne=O.ll[1]+(O.lim[1]-1)*O.del[1]+H;if(!(K>_.y||$>_.x||ne<_.y||Y<_.x)&&(E=Cl(_,c,O),!isNaN(E.x)))break}return isNaN(E.x)?(console.log("Failed to find a grid shift table for location '"+-_.x*C+" "+_.y*C+" tried: '"+T+"'"),-1):(p.x=-E.x,p.y=E.y,0)}function Cl(a,c,p){var _={x:Number.NaN,y:Number.NaN};if(isNaN(a.x))return _;var E={x:a.x,y:a.y};E.x-=p.ll[0],E.y-=p.ll[1],E.x=fe(E.x-Math.PI)+Math.PI;var T=Rl(E,p);if(c){if(isNaN(T.x))return _;T.x=E.x-T.x,T.y=E.y-T.y;var M=9,R=1e-12,O,H;do{if(H=Rl(T,p),isNaN(H.x)){console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");break}O={x:E.x-(H.x+T.x),y:E.y-(H.y+T.y)},T.x+=O.x,T.y+=O.y}while(M--&&Math.abs(O.x)>R&&Math.abs(O.y)>R);if(M<0)return console.log("Inverse grid shift iterator failed to converge."),_;_.x=fe(T.x+p.ll[0]),_.y=T.y+p.ll[1]}else isNaN(T.x)||(_.x=a.x+T.x,_.y=a.y+T.y);return _}function Rl(a,c){var p={x:a.x/c.del[0],y:a.y/c.del[1]},_={x:Math.floor(p.x),y:Math.floor(p.y)},E={x:p.x-1*_.x,y:p.y-1*_.y},T={x:Number.NaN,y:Number.NaN},M;if(_.x<0||_.x>=c.lim[0]||_.y<0||_.y>=c.lim[1])return T;M=_.y*c.lim[0]+_.x;var R={x:c.cvs[M][0],y:c.cvs[M][1]};M++;var O={x:c.cvs[M][0],y:c.cvs[M][1]};M+=c.lim[0];var H={x:c.cvs[M][0],y:c.cvs[M][1]};M--;var $={x:c.cvs[M][0],y:c.cvs[M][1]},K=E.x*E.y,Y=E.x*(1-E.y),ne=(1-E.x)*(1-E.y),ie=(1-E.x)*E.y;return T.x=ne*R.x+Y*O.x+ie*$.x+K*H.x,T.y=ne*R.y+Y*O.y+ie*$.y+K*H.y,T}var _o=function(a,c,p){var _=p.x,E=p.y,T=p.z||0,M,R,O,H={};for(O=0;O<3;O++)if(!(c&&O===2&&p.z===void 0))switch(O===0?(M=_,"ew".indexOf(a.axis[O])!==-1?R="x":R="y"):O===1?(M=E,"ns".indexOf(a.axis[O])!==-1?R="y":R="x"):(M=T,R="z"),a.axis[O]){case"e":H[R]=M;break;case"w":H[R]=-M;break;case"n":H[R]=M;break;case"s":H[R]=-M;break;case"u":p[R]!==void 0&&(H.z=M);break;case"d":p[R]!==void 0&&(H.z=-M);break;default:return null}return H},Co=function(a){var c={x:a[0],y:a[1]};return a.length>2&&(c.z=a[2]),a.length>3&&(c.m=a[3]),c},_1=function(a){C1(a.x),C1(a.y)};function C1(a){if(typeof Number.isFinite=="function"){if(Number.isFinite(a))return;throw new TypeError("coordinates must be finite numbers")}if(typeof a!="number"||a!==a||!isFinite(a))throw new TypeError("coordinates must be finite numbers")}function ep(a,c){return(a.datum.datum_type===e||a.datum.datum_type===r)&&c.datumCode!=="WGS84"||(c.datum.datum_type===e||c.datum.datum_type===r)&&a.datumCode!=="WGS84"}function Es(a,c,p,_){var E;if(Array.isArray(p)&&(p=Co(p)),_1(p),a.datum&&c.datum&&ep(a,c)&&(E=new Ri("WGS84"),p=Es(a,E,p,_),a=E),_&&a.axis!=="enu"&&(p=_o(a,!1,p)),a.projName==="longlat")p={x:p.x*v,y:p.y*v,z:p.z||0};else if(a.to_meter&&(p={x:p.x*a.to_meter,y:p.y*a.to_meter,z:p.z||0}),p=a.inverse(p),!p)return;if(a.from_greenwich&&(p.x+=a.from_greenwich),p=La(a.datum,c.datum,p),!!p)return c.from_greenwich&&(p={x:p.x-c.from_greenwich,y:p.y,z:p.z||0}),c.projName==="longlat"?p={x:p.x*C,y:p.y*C,z:p.z||0}:(p=c.forward(p),c.to_meter&&(p={x:p.x/c.to_meter,y:p.y/c.to_meter,z:p.z||0})),_&&c.axis!=="enu"?_o(c,!0,p):p}var _s=Ri("WGS84");function Oa(a,c,p,_){var E,T,M;return Array.isArray(p)?(E=Es(a,c,p,_)||{x:NaN,y:NaN},p.length>2?typeof a.name<"u"&&a.name==="geocent"||typeof c.name<"u"&&c.name==="geocent"?typeof E.z=="number"?[E.x,E.y,E.z].concat(p.splice(3)):[E.x,E.y,p[2]].concat(p.splice(3)):[E.x,E.y].concat(p.splice(2)):[E.x,E.y]):(T=Es(a,c,p,_),M=Object.keys(p),M.length===2||M.forEach(function(R){if(typeof a.name<"u"&&a.name==="geocent"||typeof c.name<"u"&&c.name==="geocent"){if(R==="x"||R==="y"||R==="z")return}else if(R==="x"||R==="y")return;T[R]=p[R]}),T)}function Tl(a){return a instanceof Ri?a:a.oProj?a.oProj:Ri(a)}function kr(a,c,p){a=Tl(a);var _=!1,E;return typeof c>"u"?(c=a,a=_s,_=!0):(typeof c.x<"u"||Array.isArray(c))&&(p=c,c=a,a=_s,_=!0),c=Tl(c),p?Oa(a,c,p):(E={forward:function(T,M){return Oa(a,c,T,M)},inverse:function(T,M){return Oa(c,a,T,M)}},_&&(E.oProj=c),E)}var Nl=6,Ba="AJSAJS",Cs="AFAFAF",Jr=65,ar=73,ur=79,$i=86,pn=90,Da={forward:R1,inverse:tp,toPoint:T1};function R1(a,c){return c=c||5,np(rp({lat:a[1],lon:a[0]}),c)}function tp(a){var c=qa(M1(a.toUpperCase()));return c.lat&&c.lon?[c.lon,c.lat,c.lon,c.lat]:[c.left,c.bottom,c.right,c.top]}function T1(a){var c=qa(M1(a.toUpperCase()));return c.lat&&c.lon?[c.lon,c.lat]:[(c.left+c.right)/2,(c.top+c.bottom)/2]}function Al(a){return a*(Math.PI/180)}function N1(a){return 180*(a/Math.PI)}function rp(a){var c=a.lat,p=a.lon,_=6378137,E=.00669438,T=.9996,M,R,O,H,$,K,Y,ne=Al(c),ie=Al(p),oe,ue;ue=Math.floor((p+180)/6)+1,p===180&&(ue=60),c>=56&&c<64&&p>=3&&p<12&&(ue=32),c>=72&&c<84&&(p>=0&&p<9?ue=31:p>=9&&p<21?ue=33:p>=21&&p<33?ue=35:p>=33&&p<42&&(ue=37)),M=(ue-1)*6-180+3,oe=Al(M),R=E/(1-E),O=_/Math.sqrt(1-E*Math.sin(ne)*Math.sin(ne)),H=Math.tan(ne)*Math.tan(ne),$=R*Math.cos(ne)*Math.cos(ne),K=Math.cos(ne)*(ie-oe),Y=_*((1-E/4-3*E*E/64-5*E*E*E/256)*ne-(3*E/8+3*E*E/32+45*E*E*E/1024)*Math.sin(2*ne)+(15*E*E/256+45*E*E*E/1024)*Math.sin(4*ne)-35*E*E*E/3072*Math.sin(6*ne));var Ee=T*O*(K+(1-H+$)*K*K*K/6+(5-18*H+H*H+72*$-58*R)*K*K*K*K*K/120)+5e5,Oe=T*(Y+O*Math.tan(ne)*(K*K/2+(5-H+9*$+4*$*$)*K*K*K*K/24+(61-58*H+H*H+600*$-330*R)*K*K*K*K*K*K/720));return c<0&&(Oe+=1e7),{northing:Math.round(Oe),easting:Math.round(Ee),zoneNumber:ue,zoneLetter:ip(c)}}function qa(a){var c=a.northing,p=a.easting,_=a.zoneLetter,E=a.zoneNumber;if(E<0||E>60)return null;var T=.9996,M=6378137,R=.00669438,O,H=(1-Math.sqrt(1-R))/(1+Math.sqrt(1-R)),$,K,Y,ne,ie,oe,ue,Ee,Oe,We=p-5e5,wt=c;_<"N"&&(wt-=1e7),ue=(E-1)*6-180+3,O=R/(1-R),oe=wt/T,Ee=oe/(M*(1-R/4-3*R*R/64-5*R*R*R/256)),Oe=Ee+(3*H/2-27*H*H*H/32)*Math.sin(2*Ee)+(21*H*H/16-55*H*H*H*H/32)*Math.sin(4*Ee)+151*H*H*H/96*Math.sin(6*Ee),$=M/Math.sqrt(1-R*Math.sin(Oe)*Math.sin(Oe)),K=Math.tan(Oe)*Math.tan(Oe),Y=O*Math.cos(Oe)*Math.cos(Oe),ne=M*(1-R)/Math.pow(1-R*Math.sin(Oe)*Math.sin(Oe),1.5),ie=We/($*T);var ut=Oe-$*Math.tan(Oe)/ne*(ie*ie/2-(5+3*K+10*Y-4*Y*Y-9*O)*ie*ie*ie*ie/24+(61+90*K+298*Y+45*K*K-252*O-3*Y*Y)*ie*ie*ie*ie*ie*ie/720);ut=N1(ut);var dt=(ie-(1+2*K+Y)*ie*ie*ie/6+(5-2*Y+28*K-3*Y*Y+8*O+24*K*K)*ie*ie*ie*ie*ie/120)/Math.cos(Oe);dt=ue+N1(dt);var wr;if(a.accuracy){var Kt=qa({northing:a.northing+a.accuracy,easting:a.easting+a.accuracy,zoneLetter:a.zoneLetter,zoneNumber:a.zoneNumber});wr={top:Kt.lat,right:Kt.lon,bottom:ut,left:dt}}else wr={lat:ut,lon:dt};return wr}function ip(a){var c="Z";return 84>=a&&a>=72?c="X":72>a&&a>=64?c="W":64>a&&a>=56?c="V":56>a&&a>=48?c="U":48>a&&a>=40?c="T":40>a&&a>=32?c="S":32>a&&a>=24?c="R":24>a&&a>=16?c="Q":16>a&&a>=8?c="P":8>a&&a>=0?c="N":0>a&&a>=-8?c="M":-8>a&&a>=-16?c="L":-16>a&&a>=-24?c="K":-24>a&&a>=-32?c="J":-32>a&&a>=-40?c="H":-40>a&&a>=-48?c="G":-48>a&&a>=-56?c="F":-56>a&&a>=-64?c="E":-64>a&&a>=-72?c="D":-72>a&&a>=-80&&(c="C"),c}function np(a,c){var p="00000"+a.easting,_="00000"+a.northing;return a.zoneNumber+a.zoneLetter+sp(a.easting,a.northing,a.zoneNumber)+p.substr(p.length-5,c)+_.substr(_.length-5,c)}function sp(a,c,p){var _=Rs(p),E=Math.floor(a/1e5),T=Math.floor(c/1e5)%20;return A1(E,T,_)}function Rs(a){var c=a%Nl;return c===0&&(c=Nl),c}function A1(a,c,p){var _=p-1,E=Ba.charCodeAt(_),T=Cs.charCodeAt(_),M=E+a-1,R=T+c,O=!1;M>pn&&(M=M-pn+Jr-1,O=!0),(M===ar||E<ar&&M>ar||(M>ar||E<ar)&&O)&&M++,(M===ur||E<ur&&M>ur||(M>ur||E<ur)&&O)&&(M++,M===ar&&M++),M>pn&&(M=M-pn+Jr-1),R>$i?(R=R-$i+Jr-1,O=!0):O=!1,(R===ar||T<ar&&R>ar||(R>ar||T<ar)&&O)&&R++,(R===ur||T<ur&&R>ur||(R>ur||T<ur)&&O)&&(R++,R===ar&&R++),R>$i&&(R=R-$i+Jr-1);var H=String.fromCharCode(M)+String.fromCharCode(R);return H}function M1(a){if(a&&a.length===0)throw"MGRSPoint coverting from nothing";for(var c=a.length,p=null,_="",E,T=0;!/[A-Z]/.test(E=a.charAt(T));){if(T>=2)throw"MGRSPoint bad conversion from: "+a;_+=E,T++}var M=parseInt(_,10);if(T===0||T+3>c)throw"MGRSPoint bad conversion from: "+a;var R=a.charAt(T++);if(R<="A"||R==="B"||R==="Y"||R>="Z"||R==="I"||R==="O")throw"MGRSPoint zone letter "+R+" not handled: "+a;p=a.substring(T,T+=2);for(var O=Rs(M),H=k1(p.charAt(0),O),$=Ts(p.charAt(1),O);$<Ns(R);)$+=2e6;var K=c-T;if(K%2!==0)throw`MGRSPoint has to have an even number
|
|
122
|
-
of digits after the zone letter and two 100km letters - front
|
|
123
|
-
half for easting meters, second half for
|
|
124
|
-
northing meters`+a;var Y=K/2,ne=0,ie=0,oe,ue,Ee,Oe,We;return Y>0&&(oe=1e5/Math.pow(10,Y),ue=a.substring(T,T+Y),ne=parseFloat(ue)*oe,Ee=a.substring(T+Y),ie=parseFloat(Ee)*oe),Oe=ne+H,We=ie+$,{easting:Oe,northing:We,zoneLetter:R,zoneNumber:M,accuracy:oe}}function k1(a,c){for(var p=Ba.charCodeAt(c-1),_=1e5,E=!1;p!==a.charCodeAt(0);){if(p++,p===ar&&p++,p===ur&&p++,p>pn){if(E)throw"Bad character: "+a;p=Jr,E=!0}_+=1e5}return _}function Ts(a,c){if(a>"V")throw"MGRSPoint given invalid Northing "+a;for(var p=Cs.charCodeAt(c-1),_=0,E=!1;p!==a.charCodeAt(0);){if(p++,p===ar&&p++,p===ur&&p++,p>$i){if(E)throw"Bad character: "+a;p=Jr,E=!0}_+=1e5}return _}function Ns(a){var c;switch(a){case"C":c=11e5;break;case"D":c=2e6;break;case"E":c=28e5;break;case"F":c=37e5;break;case"G":c=46e5;break;case"H":c=55e5;break;case"J":c=64e5;break;case"K":c=73e5;break;case"L":c=82e5;break;case"M":c=91e5;break;case"N":c=0;break;case"P":c=8e5;break;case"Q":c=17e5;break;case"R":c=26e5;break;case"S":c=35e5;break;case"T":c=44e5;break;case"U":c=53e5;break;case"V":c=62e5;break;case"W":c=7e6;break;case"X":c=79e5;break;default:c=-1}if(c>=0)return c;throw"Invalid zone letter: "+a}function Xi(a,c,p){if(!(this instanceof Xi))return new Xi(a,c,p);if(Array.isArray(a))this.x=a[0],this.y=a[1],this.z=a[2]||0;else if(typeof a=="object")this.x=a.x,this.y=a.y,this.z=a.z||0;else if(typeof a=="string"&&typeof c>"u"){var _=a.split(",");this.x=parseFloat(_[0],10),this.y=parseFloat(_[1],10),this.z=parseFloat(_[2],10)||0}else this.x=a,this.y=c,this.z=p||0;console.warn("proj4.Point will be removed in version 3, use proj4.toPoint")}Xi.fromMGRS=function(a){return new Xi(T1(a))},Xi.prototype.toMGRS=function(a){return R1([this.x,this.y],a)};var I1=1,op=.25,za=.046875,Fa=.01953125,Ua=.01068115234375,ap=.75,up=.46875,lp=.013020833333333334,cp=.007120768229166667,Ti=.3645833333333333,fp=.005696614583333333,hp=.3076171875,P1=function(a){var c=[];c[0]=I1-a*(op+a*(za+a*(Fa+a*Ua))),c[1]=a*(ap-a*(za+a*(Fa+a*Ua)));var p=a*a;return c[2]=p*(up-a*(lp+a*cp)),p*=a,c[3]=p*(Ti-a*fp),c[4]=p*a*hp,c},jn=function(a,c,p,_){return p*=c,c*=c,_[0]*a-p*(_[1]+c*(_[2]+c*(_[3]+c*_[4])))},Ml=20,As=function(a,c,p){for(var _=1/(1-c),E=a,T=Ml;T;--T){var M=Math.sin(E),R=1-c*M*M;if(R=(jn(E,M,Math.cos(E),p)-a)*(R*Math.sqrt(R))*_,E-=R,Math.abs(R)<y)return E}return E};function Hn(){this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.es&&(this.en=P1(this.es),this.ml0=jn(this.lat0,Math.sin(this.lat0),Math.cos(this.lat0),this.en))}function dp(a){var c=a.x,p=a.y,_=fe(c-this.long0),E,T,M,R=Math.sin(p),O=Math.cos(p);if(this.es){var $=O*_,K=Math.pow($,2),Y=this.ep2*Math.pow(O,2),ne=Math.pow(Y,2),ie=Math.abs(O)>y?Math.tan(p):0,oe=Math.pow(ie,2),ue=Math.pow(oe,2);E=1-this.es*Math.pow(R,2),$=$/Math.sqrt(E);var Ee=jn(p,R,O,this.en);T=this.a*(this.k0*$*(1+K/6*(1-oe+Y+K/20*(5-18*oe+ue+14*Y-58*oe*Y+K/42*(61+179*ue-ue*oe-479*oe)))))+this.x0,M=this.a*(this.k0*(Ee-this.ml0+R*_*$/2*(1+K/12*(5-oe+9*Y+4*ne+K/30*(61+ue-58*oe+270*Y-330*oe*Y+K/56*(1385+543*ue-ue*oe-3111*oe))))))+this.y0}else{var H=O*Math.sin(_);if(Math.abs(Math.abs(H)-1)<y)return 93;if(T=.5*this.a*this.k0*Math.log((1+H)/(1-H))+this.x0,M=O*Math.cos(_)/Math.sqrt(1-Math.pow(H,2)),H=Math.abs(M),H>=1){if(H-1>y)return 93;M=0}else M=Math.acos(M);p<0&&(M=-M),M=this.a*this.k0*(M-this.lat0)+this.y0}return a.x=T,a.y=M,a}function L1(a){var c,p,_,E,T=(a.x-this.x0)*(1/this.a),M=(a.y-this.y0)*(1/this.a);if(this.es)if(c=this.ml0+M/this.k0,p=As(c,this.es,this.en),Math.abs(p)<h){var K=Math.sin(p),Y=Math.cos(p),ne=Math.abs(Y)>y?Math.tan(p):0,ie=this.ep2*Math.pow(Y,2),oe=Math.pow(ie,2),ue=Math.pow(ne,2),Ee=Math.pow(ue,2);c=1-this.es*Math.pow(K,2);var Oe=T*Math.sqrt(c)/this.k0,We=Math.pow(Oe,2);c=c*ne,_=p-c*We/(1-this.es)*.5*(1-We/12*(5+3*ue-9*ie*ue+ie-4*oe-We/30*(61+90*ue-252*ie*ue+45*Ee+46*ie-We/56*(1385+3633*ue+4095*Ee+1574*Ee*ue)))),E=fe(this.long0+Oe*(1-We/6*(1+2*ue+ie-We/20*(5+28*ue+24*Ee+8*ie*ue+6*ie-We/42*(61+662*ue+1320*Ee+720*Ee*ue))))/Y)}else _=h*$r(M),E=0;else{var R=Math.exp(T/this.k0),O=.5*(R-1/R),H=this.lat0+M/this.k0,$=Math.cos(H);c=Math.sqrt((1-Math.pow($,2))/(1+Math.pow(O,2))),_=Math.asin(c),M<0&&(_=-_),O===0&&$===0?E=0:E=fe(Math.atan2(O,$)+this.long0)}return a.x=E,a.y=_,a}var pp=["Fast_Transverse_Mercator","Fast Transverse Mercator"],ja={init:Hn,forward:dp,inverse:L1,names:pp},kl=function(a){var c=Math.exp(a);return c=(c-1/c)/2,c},fi=function(a,c){a=Math.abs(a),c=Math.abs(c);var p=Math.max(a,c),_=Math.min(a,c)/(p||1);return p*Math.sqrt(1+Math.pow(_,2))},O1=function(a){var c=1+a,p=c-1;return p===0?a:a*Math.log(c)/p},B1=function(a){var c=Math.abs(a);return c=O1(c*(1+c/(fi(1,c)+1))),a<0?-c:c},Ha=function(a,c){for(var p=2*Math.cos(2*c),_=a.length-1,E=a[_],T=0,M;--_>=0;)M=-T+p*E+a[_],T=E,E=M;return c+M*Math.sin(2*c)},Ms=function(a,c){for(var p=2*Math.cos(c),_=a.length-1,E=a[_],T=0,M;--_>=0;)M=-T+p*E+a[_],T=E,E=M;return Math.sin(c)*M},Il=function(a){var c=Math.exp(a);return c=(c+1/c)/2,c},Pl=function(a,c,p){for(var _=Math.sin(c),E=Math.cos(c),T=kl(p),M=Il(p),R=2*E*M,O=-2*_*T,H=a.length-1,$=a[H],K=0,Y=0,ne=0,ie,oe;--H>=0;)ie=Y,oe=K,Y=$,K=ne,$=-ie+R*Y-O*K+a[H],ne=-oe+O*Y+R*K;return R=_*M,O=E*T,[R*$-O*ne,R*ne+O*$]};function mp(){if(!this.approx&&(isNaN(this.es)||this.es<=0))throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.');this.approx&&(ja.init.apply(this),this.forward=ja.forward,this.inverse=ja.inverse),this.x0=this.x0!==void 0?this.x0:0,this.y0=this.y0!==void 0?this.y0:0,this.long0=this.long0!==void 0?this.long0:0,this.lat0=this.lat0!==void 0?this.lat0:0,this.cgb=[],this.cbg=[],this.utg=[],this.gtu=[];var a=this.es/(1+Math.sqrt(1-this.es)),c=a/(2-a),p=c;this.cgb[0]=c*(2+c*(-2/3+c*(-2+c*(116/45+c*(26/45+c*(-2854/675)))))),this.cbg[0]=c*(-2+c*(2/3+c*(4/3+c*(-82/45+c*(32/45+c*(4642/4725)))))),p=p*c,this.cgb[1]=p*(7/3+c*(-8/5+c*(-227/45+c*(2704/315+c*(2323/945))))),this.cbg[1]=p*(5/3+c*(-16/15+c*(-13/9+c*(904/315+c*(-1522/945))))),p=p*c,this.cgb[2]=p*(56/15+c*(-136/35+c*(-1262/105+c*(73814/2835)))),this.cbg[2]=p*(-26/15+c*(34/21+c*(8/5+c*(-12686/2835)))),p=p*c,this.cgb[3]=p*(4279/630+c*(-332/35+c*(-399572/14175))),this.cbg[3]=p*(1237/630+c*(-12/5+c*(-24832/14175))),p=p*c,this.cgb[4]=p*(4174/315+c*(-144838/6237)),this.cbg[4]=p*(-734/315+c*(109598/31185)),p=p*c,this.cgb[5]=p*(601676/22275),this.cbg[5]=p*(444337/155925),p=Math.pow(c,2),this.Qn=this.k0/(1+c)*(1+p*(1/4+p*(1/64+p/256))),this.utg[0]=c*(-.5+c*(2/3+c*(-37/96+c*(1/360+c*(81/512+c*(-96199/604800)))))),this.gtu[0]=c*(.5+c*(-2/3+c*(5/16+c*(41/180+c*(-127/288+c*(7891/37800)))))),this.utg[1]=p*(-1/48+c*(-1/15+c*(437/1440+c*(-46/105+c*(1118711/3870720))))),this.gtu[1]=p*(13/48+c*(-3/5+c*(557/1440+c*(281/630+c*(-1983433/1935360))))),p=p*c,this.utg[2]=p*(-17/480+c*(37/840+c*(209/4480+c*(-5569/90720)))),this.gtu[2]=p*(61/240+c*(-103/140+c*(15061/26880+c*(167603/181440)))),p=p*c,this.utg[3]=p*(-4397/161280+c*(11/504+c*(830251/7257600))),this.gtu[3]=p*(49561/161280+c*(-179/168+c*(6601661/7257600))),p=p*c,this.utg[4]=p*(-4583/161280+c*(108847/3991680)),this.gtu[4]=p*(34729/80640+c*(-3418889/1995840)),p=p*c,this.utg[5]=p*(-20648693/638668800),this.gtu[5]=p*(212378941/319334400);var _=Ha(this.cbg,this.lat0);this.Zb=-this.Qn*(_+Ms(this.gtu,2*_))}function Wa(a){var c=fe(a.x-this.long0),p=a.y;p=Ha(this.cbg,p);var _=Math.sin(p),E=Math.cos(p),T=Math.sin(c),M=Math.cos(c);p=Math.atan2(_,M*E),c=Math.atan2(T*E,fi(_,E*M)),c=B1(Math.tan(c));var R=Pl(this.gtu,2*p,2*c);p=p+R[0],c=c+R[1];var O,H;return Math.abs(c)<=2.623395162778?(O=this.a*(this.Qn*c)+this.x0,H=this.a*(this.Qn*p+this.Zb)+this.y0):(O=1/0,H=1/0),a.x=O,a.y=H,a}function yp(a){var c=(a.x-this.x0)*(1/this.a),p=(a.y-this.y0)*(1/this.a);p=(p-this.Zb)/this.Qn,c=c/this.Qn;var _,E;if(Math.abs(c)<=2.623395162778){var T=Pl(this.utg,2*p,2*c);p=p+T[0],c=c+T[1],c=Math.atan(kl(c));var M=Math.sin(p),R=Math.cos(p),O=Math.sin(c),H=Math.cos(c);p=Math.atan2(M*H,fi(O,H*R)),c=Math.atan2(O,H*R),_=fe(c+this.long0),E=Ha(this.cgb,p)}else _=1/0,E=1/0;return a.x=_,a.y=E,a}var gp=["Extended_Transverse_Mercator","Extended Transverse Mercator","etmerc","Transverse_Mercator","Transverse Mercator","tmerc"],Ro={init:mp,forward:Wa,inverse:yp,names:gp},vp=function(a,c){if(a===void 0){if(a=Math.floor((fe(c)+Math.PI)*30/Math.PI)+1,a<0)return 0;if(a>60)return 60}return a},Ga="etmerc";function Ll(){var a=vp(this.zone,this.long0);if(a===void 0)throw new Error("unknown utm zone");this.lat0=0,this.long0=(6*Math.abs(a)-183)*v,this.x0=5e5,this.y0=this.utmSouth?1e7:0,this.k0=.9996,Ro.init.apply(this),this.forward=Ro.forward,this.inverse=Ro.inverse}var bp=["Universal Transverse Mercator System","utm"],Sp={init:Ll,names:bp,dependsOn:Ga},To=function(a,c){return Math.pow((1-a)/(1+a),c)},D1=20;function Ka(){var a=Math.sin(this.lat0),c=Math.cos(this.lat0);c*=c,this.rc=Math.sqrt(1-this.es)/(1-this.es*a*a),this.C=Math.sqrt(1+this.es*c*c/(1-this.es)),this.phic0=Math.asin(a/this.C),this.ratexp=.5*this.C*this.e,this.K=Math.tan(.5*this.phic0+w)/(Math.pow(Math.tan(.5*this.lat0+w),this.C)*To(this.e*a,this.ratexp))}function Ol(a){var c=a.x,p=a.y;return a.y=2*Math.atan(this.K*Math.pow(Math.tan(.5*p+w),this.C)*To(this.e*Math.sin(p),this.ratexp))-h,a.x=this.C*c,a}function Wn(a){for(var c=1e-14,p=a.x/this.C,_=a.y,E=Math.pow(Math.tan(.5*_+w)/this.K,1/this.C),T=D1;T>0&&(_=2*Math.atan(E*To(this.e*Math.sin(a.y),-.5*this.e))-h,!(Math.abs(_-a.y)<c));--T)a.y=_;return T?(a.x=p,a.y=_,a):null}var No=["gauss"],ks={init:Ka,forward:Ol,inverse:Wn,names:No};function q1(){ks.init.apply(this),this.rc&&(this.sinc0=Math.sin(this.phic0),this.cosc0=Math.cos(this.phic0),this.R2=2*this.rc,this.title||(this.title="Oblique Stereographic Alternative"))}function xp(a){var c,p,_,E;return a.x=fe(a.x-this.long0),ks.forward.apply(this,[a]),c=Math.sin(a.y),p=Math.cos(a.y),_=Math.cos(a.x),E=this.k0*this.R2/(1+this.sinc0*c+this.cosc0*p*_),a.x=E*p*Math.sin(a.x),a.y=E*(this.cosc0*c-this.sinc0*p*_),a.x=this.a*a.x+this.x0,a.y=this.a*a.y+this.y0,a}function Bl(a){var c,p,_,E,T;if(a.x=(a.x-this.x0)/this.a,a.y=(a.y-this.y0)/this.a,a.x/=this.k0,a.y/=this.k0,T=Math.sqrt(a.x*a.x+a.y*a.y)){var M=2*Math.atan2(T,this.R2);c=Math.sin(M),p=Math.cos(M),E=Math.asin(p*this.sinc0+a.y*c*this.cosc0/T),_=Math.atan2(a.x*c,T*this.cosc0*p-a.y*this.sinc0*c)}else E=this.phic0,_=0;return a.x=_,a.y=E,ks.inverse.apply(this,[a]),a.x=fe(a.x+this.long0),a}var wp=["Stereographic_North_Pole","Oblique_Stereographic","Polar_Stereographic","sterea","Oblique Stereographic Alternative","Double_Stereographic"],z1={init:q1,forward:xp,inverse:Bl,names:wp};function Va(a,c,p){return c*=p,Math.tan(.5*(h+a))*Math.pow((1-c)/(1+c),.5*p)}function Dl(){this.coslat0=Math.cos(this.lat0),this.sinlat0=Math.sin(this.lat0),this.sphere?this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=y&&(this.k0=.5*(1+$r(this.lat0)*Math.sin(this.lat_ts))):(Math.abs(this.coslat0)<=y&&(this.lat0>0?this.con=1:this.con=-1),this.cons=Math.sqrt(Math.pow(1+this.e,1+this.e)*Math.pow(1-this.e,1-this.e)),this.k0===1&&!isNaN(this.lat_ts)&&Math.abs(this.coslat0)<=y&&(this.k0=.5*this.cons*jt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts))/Ht(this.e,this.con*this.lat_ts,this.con*Math.sin(this.lat_ts))),this.ms1=jt(this.e,this.sinlat0,this.coslat0),this.X0=2*Math.atan(this.ssfn_(this.lat0,this.sinlat0,this.e))-h,this.cosX0=Math.cos(this.X0),this.sinX0=Math.sin(this.X0))}function F1(a){var c=a.x,p=a.y,_=Math.sin(p),E=Math.cos(p),T,M,R,O,H,$,K=fe(c-this.long0);return Math.abs(Math.abs(c-this.long0)-Math.PI)<=y&&Math.abs(p+this.lat0)<=y?(a.x=NaN,a.y=NaN,a):this.sphere?(T=2*this.k0/(1+this.sinlat0*_+this.coslat0*E*Math.cos(K)),a.x=this.a*T*E*Math.sin(K)+this.x0,a.y=this.a*T*(this.coslat0*_-this.sinlat0*E*Math.cos(K))+this.y0,a):(M=2*Math.atan(this.ssfn_(p,_,this.e))-h,O=Math.cos(M),R=Math.sin(M),Math.abs(this.coslat0)<=y?(H=Ht(this.e,p*this.con,this.con*_),$=2*this.a*this.k0*H/this.cons,a.x=this.x0+$*Math.sin(c-this.long0),a.y=this.y0-this.con*$*Math.cos(c-this.long0),a):(Math.abs(this.sinlat0)<y?(T=2*this.a*this.k0/(1+O*Math.cos(K)),a.y=T*R):(T=2*this.a*this.k0*this.ms1/(this.cosX0*(1+this.sinX0*R+this.cosX0*O*Math.cos(K))),a.y=T*(this.cosX0*R-this.sinX0*O*Math.cos(K))+this.y0),a.x=T*O*Math.sin(K)+this.x0,a))}function U1(a){a.x-=this.x0,a.y-=this.y0;var c,p,_,E,T,M=Math.sqrt(a.x*a.x+a.y*a.y);if(this.sphere){var R=2*Math.atan(M/(2*this.a*this.k0));return c=this.long0,p=this.lat0,M<=y?(a.x=c,a.y=p,a):(p=Math.asin(Math.cos(R)*this.sinlat0+a.y*Math.sin(R)*this.coslat0/M),Math.abs(this.coslat0)<y?this.lat0>0?c=fe(this.long0+Math.atan2(a.x,-1*a.y)):c=fe(this.long0+Math.atan2(a.x,a.y)):c=fe(this.long0+Math.atan2(a.x*Math.sin(R),M*this.coslat0*Math.cos(R)-a.y*this.sinlat0*Math.sin(R))),a.x=c,a.y=p,a)}else if(Math.abs(this.coslat0)<=y){if(M<=y)return p=this.lat0,c=this.long0,a.x=c,a.y=p,a;a.x*=this.con,a.y*=this.con,_=M*this.cons/(2*this.a*this.k0),p=this.con*li(this.e,_),c=this.con*fe(this.con*this.long0+Math.atan2(a.x,-1*a.y))}else E=2*Math.atan(M*this.cosX0/(2*this.a*this.k0*this.ms1)),c=this.long0,M<=y?T=this.X0:(T=Math.asin(Math.cos(E)*this.sinX0+a.y*Math.sin(E)*this.cosX0/M),c=fe(this.long0+Math.atan2(a.x*Math.sin(E),M*this.cosX0*Math.cos(E)-a.y*this.sinX0*Math.sin(E)))),p=-1*li(this.e,Math.tan(.5*(h+T)));return a.x=c,a.y=p,a}var Ep=["stere","Stereographic_South_Pole","Polar Stereographic (variant B)"],_p={init:Dl,forward:F1,inverse:U1,names:Ep,ssfn_:Va};function ql(){var a=this.lat0;this.lambda0=this.long0;var c=Math.sin(a),p=this.a,_=this.rf,E=1/_,T=2*E-Math.pow(E,2),M=this.e=Math.sqrt(T);this.R=this.k0*p*Math.sqrt(1-T)/(1-T*Math.pow(c,2)),this.alpha=Math.sqrt(1+T/(1-T)*Math.pow(Math.cos(a),4)),this.b0=Math.asin(c/this.alpha);var R=Math.log(Math.tan(Math.PI/4+this.b0/2)),O=Math.log(Math.tan(Math.PI/4+a/2)),H=Math.log((1+M*c)/(1-M*c));this.K=R-this.alpha*O+this.alpha*M/2*H}function j1(a){var c=Math.log(Math.tan(Math.PI/4-a.y/2)),p=this.e/2*Math.log((1+this.e*Math.sin(a.y))/(1-this.e*Math.sin(a.y))),_=-this.alpha*(c+p)+this.K,E=2*(Math.atan(Math.exp(_))-Math.PI/4),T=this.alpha*(a.x-this.lambda0),M=Math.atan(Math.sin(T)/(Math.sin(this.b0)*Math.tan(E)+Math.cos(this.b0)*Math.cos(T))),R=Math.asin(Math.cos(this.b0)*Math.sin(E)-Math.sin(this.b0)*Math.cos(E)*Math.cos(T));return a.y=this.R/2*Math.log((1+Math.sin(R))/(1-Math.sin(R)))+this.y0,a.x=this.R*M+this.x0,a}function Cp(a){for(var c=a.x-this.x0,p=a.y-this.y0,_=c/this.R,E=2*(Math.atan(Math.exp(p/this.R))-Math.PI/4),T=Math.asin(Math.cos(this.b0)*Math.sin(E)+Math.sin(this.b0)*Math.cos(E)*Math.cos(_)),M=Math.atan(Math.sin(_)/(Math.cos(this.b0)*Math.cos(_)-Math.sin(this.b0)*Math.tan(E))),R=this.lambda0+M/this.alpha,O=0,H=T,$=-1e3,K=0;Math.abs(H-$)>1e-7;){if(++K>20)return;O=1/this.alpha*(Math.log(Math.tan(Math.PI/4+T/2))-this.K)+this.e*Math.log(Math.tan(Math.PI/4+Math.asin(this.e*Math.sin(H))/2)),$=H,H=2*Math.atan(Math.exp(O))-Math.PI/2}return a.x=R,a.y=H,a}var Rp=["somerc"],Tp={init:ql,forward:j1,inverse:Cp,names:Rp},Gn=1e-7;function Is(a){var c=["Hotine_Oblique_Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin"],p=typeof a.PROJECTION=="object"?Object.keys(a.PROJECTION)[0]:a.PROJECTION;return"no_uoff"in a||"no_off"in a||c.indexOf(p)!==-1}function $a(){var a,c,p,_,E,T,M,R,O,H,$=0,K,Y=0,ne=0,ie=0,oe=0,ue=0,Ee=0;this.no_off=Is(this),this.no_rot="no_rot"in this;var Oe=!1;"alpha"in this&&(Oe=!0);var We=!1;if("rectified_grid_angle"in this&&(We=!0),Oe&&(Ee=this.alpha),We&&($=this.rectified_grid_angle*v),Oe||We)Y=this.longc;else if(ne=this.long1,oe=this.lat1,ie=this.long2,ue=this.lat2,Math.abs(oe-ue)<=Gn||(a=Math.abs(oe))<=Gn||Math.abs(a-h)<=Gn||Math.abs(Math.abs(this.lat0)-h)<=Gn||Math.abs(Math.abs(ue)-h)<=Gn)throw new Error;var wt=1-this.es;c=Math.sqrt(wt),Math.abs(this.lat0)>y?(R=Math.sin(this.lat0),p=Math.cos(this.lat0),a=1-this.es*R*R,this.B=p*p,this.B=Math.sqrt(1+this.es*this.B*this.B/wt),this.A=this.B*this.k0*c/a,_=this.B*c/(p*Math.sqrt(a)),E=_*_-1,E<=0?E=0:(E=Math.sqrt(E),this.lat0<0&&(E=-E)),this.E=E+=_,this.E*=Math.pow(Ht(this.e,this.lat0,R),this.B)):(this.B=1/c,this.A=this.k0,this.E=_=E=1),Oe||We?(Oe?(K=Math.asin(Math.sin(Ee)/_),We||($=Ee)):(K=$,Ee=Math.asin(_*Math.sin(K))),this.lam0=Y-Math.asin(.5*(E-1/E)*Math.tan(K))/this.B):(T=Math.pow(Ht(this.e,oe,Math.sin(oe)),this.B),M=Math.pow(Ht(this.e,ue,Math.sin(ue)),this.B),E=this.E/T,O=(M-T)/(M+T),H=this.E*this.E,H=(H-M*T)/(H+M*T),a=ne-ie,a<-Math.pi?ie-=x:a>Math.pi&&(ie+=x),this.lam0=fe(.5*(ne+ie)-Math.atan(H*Math.tan(.5*this.B*(ne-ie))/O)/this.B),K=Math.atan(2*Math.sin(this.B*fe(ne-this.lam0))/(E-1/E)),$=Ee=Math.asin(_*Math.sin(K))),this.singam=Math.sin(K),this.cosgam=Math.cos(K),this.sinrot=Math.sin($),this.cosrot=Math.cos($),this.rB=1/this.B,this.ArB=this.A*this.rB,this.BrA=1/this.ArB,this.no_off?this.u_0=0:(this.u_0=Math.abs(this.ArB*Math.atan(Math.sqrt(_*_-1)/Math.cos(Ee))),this.lat0<0&&(this.u_0=-this.u_0)),E=.5*K,this.v_pole_n=this.ArB*Math.log(Math.tan(w-E)),this.v_pole_s=this.ArB*Math.log(Math.tan(w+E))}function Ao(a){var c={},p,_,E,T,M,R,O,H;if(a.x=a.x-this.lam0,Math.abs(Math.abs(a.y)-h)>y){if(M=this.E/Math.pow(Ht(this.e,a.y,Math.sin(a.y)),this.B),R=1/M,p=.5*(M-R),_=.5*(M+R),T=Math.sin(this.B*a.x),E=(p*this.singam-T*this.cosgam)/_,Math.abs(Math.abs(E)-1)<y)throw new Error;H=.5*this.ArB*Math.log((1-E)/(1+E)),R=Math.cos(this.B*a.x),Math.abs(R)<Gn?O=this.A*a.x:O=this.ArB*Math.atan2(p*this.cosgam+T*this.singam,R)}else H=a.y>0?this.v_pole_n:this.v_pole_s,O=this.ArB*a.y;return this.no_rot?(c.x=O,c.y=H):(O-=this.u_0,c.x=H*this.cosrot+O*this.sinrot,c.y=O*this.cosrot-H*this.sinrot),c.x=this.a*c.x+this.x0,c.y=this.a*c.y+this.y0,c}function H1(a){var c,p,_,E,T,M,R,O={};if(a.x=(a.x-this.x0)*(1/this.a),a.y=(a.y-this.y0)*(1/this.a),this.no_rot?(p=a.y,c=a.x):(p=a.x*this.cosrot-a.y*this.sinrot,c=a.y*this.cosrot+a.x*this.sinrot+this.u_0),_=Math.exp(-this.BrA*p),E=.5*(_-1/_),T=.5*(_+1/_),M=Math.sin(this.BrA*c),R=(M*this.cosgam+E*this.singam)/T,Math.abs(Math.abs(R)-1)<y)O.x=0,O.y=R<0?-h:h;else{if(O.y=this.E/Math.sqrt((1+R)/(1-R)),O.y=li(this.e,Math.pow(O.y,1/this.B)),O.y===1/0)throw new Error;O.x=-this.rB*Math.atan2(E*this.cosgam-M*this.singam,Math.cos(this.BrA*c))}return O.x+=this.lam0,O}var Xa=["Hotine_Oblique_Mercator","Hotine Oblique Mercator","Hotine_Oblique_Mercator_Azimuth_Natural_Origin","Hotine_Oblique_Mercator_Two_Point_Natural_Origin","Hotine_Oblique_Mercator_Azimuth_Center","Oblique_Mercator","omerc"],Mo={init:$a,forward:Ao,inverse:H1,names:Xa};function Ja(){if(this.lat2||(this.lat2=this.lat1),this.k0||(this.k0=1),this.x0=this.x0||0,this.y0=this.y0||0,!(Math.abs(this.lat1+this.lat2)<y)){var a=this.b/this.a;this.e=Math.sqrt(1-a*a);var c=Math.sin(this.lat1),p=Math.cos(this.lat1),_=jt(this.e,c,p),E=Ht(this.e,this.lat1,c),T=Math.sin(this.lat2),M=Math.cos(this.lat2),R=jt(this.e,T,M),O=Ht(this.e,this.lat2,T),H=Ht(this.e,this.lat0,Math.sin(this.lat0));Math.abs(this.lat1-this.lat2)>y?this.ns=Math.log(_/R)/Math.log(E/O):this.ns=c,isNaN(this.ns)&&(this.ns=c),this.f0=_/(this.ns*Math.pow(E,this.ns)),this.rh=this.a*this.f0*Math.pow(H,this.ns),this.title||(this.title="Lambert Conformal Conic")}}function mn(a){var c=a.x,p=a.y;Math.abs(2*Math.abs(p)-Math.PI)<=y&&(p=$r(p)*(h-2*y));var _=Math.abs(Math.abs(p)-h),E,T;if(_>y)E=Ht(this.e,p,Math.sin(p)),T=this.a*this.f0*Math.pow(E,this.ns);else{if(_=p*this.ns,_<=0)return null;T=0}var M=this.ns*fe(c-this.long0);return a.x=this.k0*(T*Math.sin(M))+this.x0,a.y=this.k0*(this.rh-T*Math.cos(M))+this.y0,a}function zl(a){var c,p,_,E,T,M=(a.x-this.x0)/this.k0,R=this.rh-(a.y-this.y0)/this.k0;this.ns>0?(c=Math.sqrt(M*M+R*R),p=1):(c=-Math.sqrt(M*M+R*R),p=-1);var O=0;if(c!==0&&(O=Math.atan2(p*M,p*R)),c!==0||this.ns>0){if(p=1/this.ns,_=Math.pow(c/(this.a*this.f0),p),E=li(this.e,_),E===-9999)return null}else E=-h;return T=fe(O/this.ns+this.long0),a.x=T,a.y=E,a}var Np=["Lambert Tangential Conformal Conic Projection","Lambert_Conformal_Conic","Lambert_Conformal_Conic_1SP","Lambert_Conformal_Conic_2SP","lcc","Lambert Conic Conformal (1SP)","Lambert Conic Conformal (2SP)"],Ps={init:Ja,forward:mn,inverse:zl,names:Np};function W1(){this.a=6377397155e-3,this.es=.006674372230614,this.e=Math.sqrt(this.es),this.lat0||(this.lat0=.863937979737193),this.long0||(this.long0=.7417649320975901-.308341501185665),this.k0||(this.k0=.9999),this.s45=.785398163397448,this.s90=2*this.s45,this.fi0=this.lat0,this.e2=this.es,this.e=Math.sqrt(this.e2),this.alfa=Math.sqrt(1+this.e2*Math.pow(Math.cos(this.fi0),4)/(1-this.e2)),this.uq=1.04216856380474,this.u0=Math.asin(Math.sin(this.fi0)/this.alfa),this.g=Math.pow((1+this.e*Math.sin(this.fi0))/(1-this.e*Math.sin(this.fi0)),this.alfa*this.e/2),this.k=Math.tan(this.u0/2+this.s45)/Math.pow(Math.tan(this.fi0/2+this.s45),this.alfa)*this.g,this.k1=this.k0,this.n0=this.a*Math.sqrt(1-this.e2)/(1-this.e2*Math.pow(Math.sin(this.fi0),2)),this.s0=1.37008346281555,this.n=Math.sin(this.s0),this.ro0=this.k1*this.n0/Math.tan(this.s0),this.ad=this.s90-this.uq}function Ap(a){var c,p,_,E,T,M,R,O=a.x,H=a.y,$=fe(O-this.long0);return c=Math.pow((1+this.e*Math.sin(H))/(1-this.e*Math.sin(H)),this.alfa*this.e/2),p=2*(Math.atan(this.k*Math.pow(Math.tan(H/2+this.s45),this.alfa)/c)-this.s45),_=-$*this.alfa,E=Math.asin(Math.cos(this.ad)*Math.sin(p)+Math.sin(this.ad)*Math.cos(p)*Math.cos(_)),T=Math.asin(Math.cos(p)*Math.sin(_)/Math.cos(E)),M=this.n*T,R=this.ro0*Math.pow(Math.tan(this.s0/2+this.s45),this.n)/Math.pow(Math.tan(E/2+this.s45),this.n),a.y=R*Math.cos(M)/1,a.x=R*Math.sin(M)/1,this.czech||(a.y*=-1,a.x*=-1),a}function Ya(a){var c,p,_,E,T,M,R,O,H=a.x;a.x=a.y,a.y=H,this.czech||(a.y*=-1,a.x*=-1),M=Math.sqrt(a.x*a.x+a.y*a.y),T=Math.atan2(a.y,a.x),E=T/Math.sin(this.s0),_=2*(Math.atan(Math.pow(this.ro0/M,1/this.n)*Math.tan(this.s0/2+this.s45))-this.s45),c=Math.asin(Math.cos(this.ad)*Math.sin(_)-Math.sin(this.ad)*Math.cos(_)*Math.cos(E)),p=Math.asin(Math.cos(_)*Math.sin(E)/Math.cos(c)),a.x=this.long0-p/this.alfa,R=c,O=0;var $=0;do a.y=2*(Math.atan(Math.pow(this.k,-1/this.alfa)*Math.pow(Math.tan(c/2+this.s45),1/this.alfa)*Math.pow((1+this.e*Math.sin(R))/(1-this.e*Math.sin(R)),this.e/2))-this.s45),Math.abs(R-a.y)<1e-10&&(O=1),R=a.y,$+=1;while(O===0&&$<15);return $>=15?null:a}var Mp=["Krovak","krovak"],kp={init:W1,forward:Ap,inverse:Ya,names:Mp},lr=function(a,c,p,_,E){return a*E-c*Math.sin(2*E)+p*Math.sin(4*E)-_*Math.sin(6*E)},ko=function(a){return 1-.25*a*(1+a/16*(3+1.25*a))},Io=function(a){return .375*a*(1+.25*a*(1+.46875*a))},Po=function(a){return .05859375*a*a*(1+.75*a)},Lo=function(a){return a*a*a*(35/3072)},Ls=function(a,c,p){var _=c*p;return a/Math.sqrt(1-_*_)},Os=function(a){return Math.abs(a)<h?a:a-$r(a)*Math.PI},Za=function(a,c,p,_,E){var T,M;T=a/c;for(var R=0;R<15;R++)if(M=(a-(c*T-p*Math.sin(2*T)+_*Math.sin(4*T)-E*Math.sin(6*T)))/(c-2*p*Math.cos(2*T)+4*_*Math.cos(4*T)-6*E*Math.cos(6*T)),T+=M,Math.abs(M)<=1e-10)return T;return NaN};function Ip(){this.sphere||(this.e0=ko(this.es),this.e1=Io(this.es),this.e2=Po(this.es),this.e3=Lo(this.es),this.ml0=this.a*lr(this.e0,this.e1,this.e2,this.e3,this.lat0))}function G1(a){var c,p,_=a.x,E=a.y;if(_=fe(_-this.long0),this.sphere)c=this.a*Math.asin(Math.cos(E)*Math.sin(_)),p=this.a*(Math.atan2(Math.tan(E),Math.cos(_))-this.lat0);else{var T=Math.sin(E),M=Math.cos(E),R=Ls(this.a,this.e,T),O=Math.tan(E)*Math.tan(E),H=_*Math.cos(E),$=H*H,K=this.es*M*M/(1-this.es),Y=this.a*lr(this.e0,this.e1,this.e2,this.e3,E);c=R*H*(1-$*O*(1/6-(8-O+8*K)*$/120)),p=Y-this.ml0+R*T/M*$*(.5+(5-O+6*K)*$/24)}return a.x=c+this.x0,a.y=p+this.y0,a}function Pp(a){a.x-=this.x0,a.y-=this.y0;var c=a.x/this.a,p=a.y/this.a,_,E;if(this.sphere){var T=p+this.lat0;_=Math.asin(Math.sin(T)*Math.cos(c)),E=Math.atan2(Math.tan(c),Math.cos(T))}else{var M=this.ml0/this.a+p,R=Za(M,this.e0,this.e1,this.e2,this.e3);if(Math.abs(Math.abs(R)-h)<=y)return a.x=this.long0,a.y=h,p<0&&(a.y*=-1),a;var O=Ls(this.a,this.e,Math.sin(R)),H=O*O*O/this.a/this.a*(1-this.es),$=Math.pow(Math.tan(R),2),K=c*this.a/O,Y=K*K;_=R-O*Math.tan(R)/H*K*K*(.5-(1+3*$)*K*K/24),E=K*(1-Y*($/3+(1+3*$)*$*Y/15))/Math.cos(R)}return a.x=fe(E+this.long0),a.y=Os(_),a}var Lp=["Cassini","Cassini_Soldner","cass"],yn={init:Ip,forward:G1,inverse:Pp,names:Lp},Ni=function(a,c){var p;return a>1e-7?(p=a*c,(1-a*a)*(c/(1-p*p)-.5/a*Math.log((1-p)/(1+p)))):2*c},K1=1,Fl=2,gn=3,vn=4;function hi(){var a=Math.abs(this.lat0);if(Math.abs(a-h)<y?this.mode=this.lat0<0?this.S_POLE:this.N_POLE:Math.abs(a)<y?this.mode=this.EQUIT:this.mode=this.OBLIQ,this.es>0){var c;switch(this.qp=Ni(this.e,1),this.mmf=.5/(1-this.es),this.apa=Z1(this.es),this.mode){case this.N_POLE:this.dd=1;break;case this.S_POLE:this.dd=1;break;case this.EQUIT:this.rq=Math.sqrt(.5*this.qp),this.dd=1/this.rq,this.xmf=1,this.ymf=.5*this.qp;break;case this.OBLIQ:this.rq=Math.sqrt(.5*this.qp),c=Math.sin(this.lat0),this.sinb1=Ni(this.e,c)/this.qp,this.cosb1=Math.sqrt(1-this.sinb1*this.sinb1),this.dd=Math.cos(this.lat0)/(Math.sqrt(1-this.es*c*c)*this.rq*this.cosb1),this.ymf=(this.xmf=this.rq)/this.dd,this.xmf*=this.dd;break}}else this.mode===this.OBLIQ&&(this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0))}function Oo(a){var c,p,_,E,T,M,R,O,H,$,K=a.x,Y=a.y;if(K=fe(K-this.long0),this.sphere){if(T=Math.sin(Y),$=Math.cos(Y),_=Math.cos(K),this.mode===this.OBLIQ||this.mode===this.EQUIT){if(p=this.mode===this.EQUIT?1+$*_:1+this.sinph0*T+this.cosph0*$*_,p<=y)return null;p=Math.sqrt(2/p),c=p*$*Math.sin(K),p*=this.mode===this.EQUIT?T:this.cosph0*T-this.sinph0*$*_}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(_=-_),Math.abs(Y+this.lat0)<y)return null;p=w-Y*.5,p=2*(this.mode===this.S_POLE?Math.cos(p):Math.sin(p)),c=p*Math.sin(K),p*=_}}else{switch(R=0,O=0,H=0,_=Math.cos(K),E=Math.sin(K),T=Math.sin(Y),M=Ni(this.e,T),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(R=M/this.qp,O=Math.sqrt(1-R*R)),this.mode){case this.OBLIQ:H=1+this.sinb1*R+this.cosb1*O*_;break;case this.EQUIT:H=1+O*_;break;case this.N_POLE:H=h+Y,M=this.qp-M;break;case this.S_POLE:H=Y-h,M=this.qp+M;break}if(Math.abs(H)<y)return null;switch(this.mode){case this.OBLIQ:case this.EQUIT:H=Math.sqrt(2/H),this.mode===this.OBLIQ?p=this.ymf*H*(this.cosb1*R-this.sinb1*O*_):p=(H=Math.sqrt(2/(1+O*_)))*R*this.ymf,c=this.xmf*H*O*E;break;case this.N_POLE:case this.S_POLE:M>=0?(c=(H=Math.sqrt(M))*E,p=_*(this.mode===this.S_POLE?H:-H)):c=p=0;break}}return a.x=this.a*c+this.x0,a.y=this.a*p+this.y0,a}function V1(a){a.x-=this.x0,a.y-=this.y0;var c=a.x/this.a,p=a.y/this.a,_,E,T,M,R,O,H;if(this.sphere){var $=0,K,Y=0;if(K=Math.sqrt(c*c+p*p),E=K*.5,E>1)return null;switch(E=2*Math.asin(E),(this.mode===this.OBLIQ||this.mode===this.EQUIT)&&(Y=Math.sin(E),$=Math.cos(E)),this.mode){case this.EQUIT:E=Math.abs(K)<=y?0:Math.asin(p*Y/K),c*=Y,p=$*K;break;case this.OBLIQ:E=Math.abs(K)<=y?this.lat0:Math.asin($*this.sinph0+p*Y*this.cosph0/K),c*=Y*this.cosph0,p=($-Math.sin(E)*this.sinph0)*K;break;case this.N_POLE:p=-p,E=h-E;break;case this.S_POLE:E-=h;break}_=p===0&&(this.mode===this.EQUIT||this.mode===this.OBLIQ)?0:Math.atan2(c,p)}else{if(H=0,this.mode===this.OBLIQ||this.mode===this.EQUIT){if(c/=this.dd,p*=this.dd,O=Math.sqrt(c*c+p*p),O<y)return a.x=this.long0,a.y=this.lat0,a;M=2*Math.asin(.5*O/this.rq),T=Math.cos(M),c*=M=Math.sin(M),this.mode===this.OBLIQ?(H=T*this.sinb1+p*M*this.cosb1/O,R=this.qp*H,p=O*this.cosb1*T-p*this.sinb1*M):(H=p*M/O,R=this.qp*H,p=O*T)}else if(this.mode===this.N_POLE||this.mode===this.S_POLE){if(this.mode===this.N_POLE&&(p=-p),R=c*c+p*p,!R)return a.x=this.long0,a.y=this.lat0,a;H=1-R/this.qp,this.mode===this.S_POLE&&(H=-H)}_=Math.atan2(c,p),E=eu(Math.asin(H),this.apa)}return a.x=fe(this.long0+_),a.y=E,a}var Kn=.3333333333333333,$1=.17222222222222222,X1=.10257936507936508,Qa=.06388888888888888,J1=.0664021164021164,Y1=.016415012942191543;function Z1(a){var c,p=[];return p[0]=a*Kn,c=a*a,p[0]+=c*$1,p[1]=c*Qa,c*=a,p[0]+=c*X1,p[1]+=c*J1,p[2]=c*Y1,p}function eu(a,c){var p=a+a;return a+c[0]*Math.sin(p)+c[1]*Math.sin(p+p)+c[2]*Math.sin(p+p+p)}var Q1=["Lambert Azimuthal Equal Area","Lambert_Azimuthal_Equal_Area","laea"],ef={init:hi,forward:Oo,inverse:V1,names:Q1,S_POLE:K1,N_POLE:Fl,EQUIT:gn,OBLIQ:vn},bn=function(a){return Math.abs(a)>1&&(a=a>1?1:-1),Math.asin(a)};function Op(){Math.abs(this.lat1+this.lat2)<y||(this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e3=Math.sqrt(this.es),this.sin_po=Math.sin(this.lat1),this.cos_po=Math.cos(this.lat1),this.t1=this.sin_po,this.con=this.sin_po,this.ms1=jt(this.e3,this.sin_po,this.cos_po),this.qs1=Ni(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat2),this.cos_po=Math.cos(this.lat2),this.t2=this.sin_po,this.ms2=jt(this.e3,this.sin_po,this.cos_po),this.qs2=Ni(this.e3,this.sin_po,this.cos_po),this.sin_po=Math.sin(this.lat0),this.cos_po=Math.cos(this.lat0),this.t3=this.sin_po,this.qs0=Ni(this.e3,this.sin_po,this.cos_po),Math.abs(this.lat1-this.lat2)>y?this.ns0=(this.ms1*this.ms1-this.ms2*this.ms2)/(this.qs2-this.qs1):this.ns0=this.con,this.c=this.ms1*this.ms1+this.ns0*this.qs1,this.rh=this.a*Math.sqrt(this.c-this.ns0*this.qs0)/this.ns0)}function Bp(a){var c=a.x,p=a.y;this.sin_phi=Math.sin(p),this.cos_phi=Math.cos(p);var _=Ni(this.e3,this.sin_phi,this.cos_phi),E=this.a*Math.sqrt(this.c-this.ns0*_)/this.ns0,T=this.ns0*fe(c-this.long0),M=E*Math.sin(T)+this.x0,R=this.rh-E*Math.cos(T)+this.y0;return a.x=M,a.y=R,a}function Dp(a){var c,p,_,E,T,M;return a.x-=this.x0,a.y=this.rh-a.y+this.y0,this.ns0>=0?(c=Math.sqrt(a.x*a.x+a.y*a.y),_=1):(c=-Math.sqrt(a.x*a.x+a.y*a.y),_=-1),E=0,c!==0&&(E=Math.atan2(_*a.x,_*a.y)),_=c*this.ns0/this.a,this.sphere?M=Math.asin((this.c-_*_)/(2*this.ns0)):(p=(this.c-_*_)/this.ns0,M=this.phi1z(this.e3,p)),T=fe(E/this.ns0+this.long0),a.x=T,a.y=M,a}function tu(a,c){var p,_,E,T,M,R=bn(.5*c);if(a<y)return R;for(var O=a*a,H=1;H<=25;H++)if(p=Math.sin(R),_=Math.cos(R),E=a*p,T=1-E*E,M=.5*T*T/_*(c/(1-O)-p/T+.5/a*Math.log((1-E)/(1+E))),R=R+M,Math.abs(M)<=1e-7)return R;return null}var qp=["Albers_Conic_Equal_Area","Albers","aea"],tf={init:Op,forward:Bp,inverse:Dp,names:qp,phi1z:tu};function ru(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0),this.infinity_dist=1e3*this.a,this.rc=1}function iu(a){var c,p,_,E,T,M,R,O,H=a.x,$=a.y;return _=fe(H-this.long0),c=Math.sin($),p=Math.cos($),E=Math.cos(_),M=this.sin_p14*c+this.cos_p14*p*E,T=1,M>0||Math.abs(M)<=y?(R=this.x0+this.a*T*p*Math.sin(_)/M,O=this.y0+this.a*T*(this.cos_p14*c-this.sin_p14*p*E)/M):(R=this.x0+this.infinity_dist*p*Math.sin(_),O=this.y0+this.infinity_dist*(this.cos_p14*c-this.sin_p14*p*E)),a.x=R,a.y=O,a}function nu(a){var c,p,_,E,T,M;return a.x=(a.x-this.x0)/this.a,a.y=(a.y-this.y0)/this.a,a.x/=this.k0,a.y/=this.k0,(c=Math.sqrt(a.x*a.x+a.y*a.y))?(E=Math.atan2(c,this.rc),p=Math.sin(E),_=Math.cos(E),M=bn(_*this.sin_p14+a.y*p*this.cos_p14/c),T=Math.atan2(a.x*p,c*this.cos_p14*_-a.y*this.sin_p14*p),T=fe(this.long0+T)):(M=this.phic0,T=0),a.x=T,a.y=M,a}var Bo=["gnom"],su={init:ru,forward:iu,inverse:nu,names:Bo},zp=function(a,c){var p=1-(1-a*a)/(2*a)*Math.log((1-a)/(1+a));if(Math.abs(Math.abs(c)-p)<1e-6)return c<0?-1*h:h;for(var _=Math.asin(.5*c),E,T,M,R,O=0;O<30;O++)if(T=Math.sin(_),M=Math.cos(_),R=a*T,E=Math.pow(1-R*R,2)/(2*M)*(c/(1-a*a)-T/(1-R*R)+.5/a*Math.log((1-R)/(1+R))),_+=E,Math.abs(E)<=1e-10)return _;return NaN};function Fp(){this.sphere||(this.k0=jt(this.e,Math.sin(this.lat_ts),Math.cos(this.lat_ts)))}function rf(a){var c=a.x,p=a.y,_,E,T=fe(c-this.long0);if(this.sphere)_=this.x0+this.a*T*Math.cos(this.lat_ts),E=this.y0+this.a*Math.sin(p)/Math.cos(this.lat_ts);else{var M=Ni(this.e,Math.sin(p));_=this.x0+this.a*this.k0*T,E=this.y0+this.a*M*.5/this.k0}return a.x=_,a.y=E,a}function nf(a){a.x-=this.x0,a.y-=this.y0;var c,p;return this.sphere?(c=fe(this.long0+a.x/this.a/Math.cos(this.lat_ts)),p=Math.asin(a.y/this.a*Math.cos(this.lat_ts))):(p=zp(this.e,2*a.y*this.k0/this.a),c=fe(this.long0+a.x/(this.a*this.k0))),a.x=c,a.y=p,a}var Up=["cea"],sf={init:Fp,forward:rf,inverse:nf,names:Up};function jp(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Equidistant Cylindrical (Plate Carre)",this.rc=Math.cos(this.lat_ts)}function Hp(a){var c=a.x,p=a.y,_=fe(c-this.long0),E=Os(p-this.lat0);return a.x=this.x0+this.a*_*this.rc,a.y=this.y0+this.a*E,a}function Wp(a){var c=a.x,p=a.y;return a.x=fe(this.long0+(c-this.x0)/(this.a*this.rc)),a.y=Os(this.lat0+(p-this.y0)/this.a),a}var Gp=["Equirectangular","Equidistant_Cylindrical","eqc"],Kp={init:jp,forward:Hp,inverse:Wp,names:Gp},Do=20;function of(){this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ko(this.es),this.e1=Io(this.es),this.e2=Po(this.es),this.e3=Lo(this.es),this.ml0=this.a*lr(this.e0,this.e1,this.e2,this.e3,this.lat0)}function f(a){var c=a.x,p=a.y,_,E,T,M=fe(c-this.long0);if(T=M*Math.sin(p),this.sphere)Math.abs(p)<=y?(_=this.a*M,E=-1*this.a*this.lat0):(_=this.a*Math.sin(T)/Math.tan(p),E=this.a*(Os(p-this.lat0)+(1-Math.cos(T))/Math.tan(p)));else if(Math.abs(p)<=y)_=this.a*M,E=-1*this.ml0;else{var R=Ls(this.a,this.e,Math.sin(p))/Math.tan(p);_=R*Math.sin(T),E=this.a*lr(this.e0,this.e1,this.e2,this.e3,p)-this.ml0+R*(1-Math.cos(T))}return a.x=_+this.x0,a.y=E+this.y0,a}function g(a){var c,p,_,E,T,M,R,O,H;if(_=a.x-this.x0,E=a.y-this.y0,this.sphere)if(Math.abs(E+this.a*this.lat0)<=y)c=fe(_/this.a+this.long0),p=0;else{M=this.lat0+E/this.a,R=_*_/this.a/this.a+M*M,O=M;var $;for(T=Do;T;--T)if($=Math.tan(O),H=-1*(M*(O*$+1)-O-.5*(O*O+R)*$)/((O-M)/$-1),O+=H,Math.abs(H)<=y){p=O;break}c=fe(this.long0+Math.asin(_*Math.tan(O)/this.a)/Math.sin(p))}else if(Math.abs(E+this.ml0)<=y)p=0,c=fe(this.long0+_/this.a);else{M=(this.ml0+E)/this.a,R=_*_/this.a/this.a+M*M,O=M;var K,Y,ne,ie,oe;for(T=Do;T;--T)if(oe=this.e*Math.sin(O),K=Math.sqrt(1-oe*oe)*Math.tan(O),Y=this.a*lr(this.e0,this.e1,this.e2,this.e3,O),ne=this.e0-2*this.e1*Math.cos(2*O)+4*this.e2*Math.cos(4*O)-6*this.e3*Math.cos(6*O),ie=Y/this.a,H=(M*(K*ie+1)-ie-.5*K*(ie*ie+R))/(this.es*Math.sin(2*O)*(ie*ie+R-2*M*ie)/(4*K)+(M-ie)*(K*ne-2/Math.sin(2*O))-ne),O-=H,Math.abs(H)<=y){p=O;break}K=Math.sqrt(1-this.es*Math.pow(Math.sin(p),2))*Math.tan(p),c=fe(this.long0+Math.asin(_*K/this.a)/Math.sin(p))}return a.x=c,a.y=p,a}var A=["Polyconic","poly"],F={init:of,forward:f,inverse:g,names:A};function V(){this.A=[],this.A[1]=.6399175073,this.A[2]=-.1358797613,this.A[3]=.063294409,this.A[4]=-.02526853,this.A[5]=.0117879,this.A[6]=-.0055161,this.A[7]=.0026906,this.A[8]=-.001333,this.A[9]=67e-5,this.A[10]=-34e-5,this.B_re=[],this.B_im=[],this.B_re[1]=.7557853228,this.B_im[1]=0,this.B_re[2]=.249204646,this.B_im[2]=.003371507,this.B_re[3]=-.001541739,this.B_im[3]=.04105856,this.B_re[4]=-.10162907,this.B_im[4]=.01727609,this.B_re[5]=-.26623489,this.B_im[5]=-.36249218,this.B_re[6]=-.6870983,this.B_im[6]=-1.1651967,this.C_re=[],this.C_im=[],this.C_re[1]=1.3231270439,this.C_im[1]=0,this.C_re[2]=-.577245789,this.C_im[2]=-.007809598,this.C_re[3]=.508307513,this.C_im[3]=-.112208952,this.C_re[4]=-.15094762,this.C_im[4]=.18200602,this.C_re[5]=1.01418179,this.C_im[5]=1.64497696,this.C_re[6]=1.9660549,this.C_im[6]=2.5127645,this.D=[],this.D[1]=1.5627014243,this.D[2]=.5185406398,this.D[3]=-.03333098,this.D[4]=-.1052906,this.D[5]=-.0368594,this.D[6]=.007317,this.D[7]=.0122,this.D[8]=.00394,this.D[9]=-.0013}function Z(a){var c,p=a.x,_=a.y,E=_-this.lat0,T=p-this.long0,M=E/d*1e-5,R=T,O=1,H=0;for(c=1;c<=10;c++)O=O*M,H=H+this.A[c]*O;var $=H,K=R,Y=1,ne=0,ie,oe,ue=0,Ee=0;for(c=1;c<=6;c++)ie=Y*$-ne*K,oe=ne*$+Y*K,Y=ie,ne=oe,ue=ue+this.B_re[c]*Y-this.B_im[c]*ne,Ee=Ee+this.B_im[c]*Y+this.B_re[c]*ne;return a.x=Ee*this.a+this.x0,a.y=ue*this.a+this.y0,a}function re(a){var c,p=a.x,_=a.y,E=p-this.x0,T=_-this.y0,M=T/this.a,R=E/this.a,O=1,H=0,$,K,Y=0,ne=0;for(c=1;c<=6;c++)$=O*M-H*R,K=H*M+O*R,O=$,H=K,Y=Y+this.C_re[c]*O-this.C_im[c]*H,ne=ne+this.C_im[c]*O+this.C_re[c]*H;for(var ie=0;ie<this.iterations;ie++){var oe=Y,ue=ne,Ee,Oe,We=M,wt=R;for(c=2;c<=6;c++)Ee=oe*Y-ue*ne,Oe=ue*Y+oe*ne,oe=Ee,ue=Oe,We=We+(c-1)*(this.B_re[c]*oe-this.B_im[c]*ue),wt=wt+(c-1)*(this.B_im[c]*oe+this.B_re[c]*ue);oe=1,ue=0;var ut=this.B_re[1],dt=this.B_im[1];for(c=2;c<=6;c++)Ee=oe*Y-ue*ne,Oe=ue*Y+oe*ne,oe=Ee,ue=Oe,ut=ut+c*(this.B_re[c]*oe-this.B_im[c]*ue),dt=dt+c*(this.B_im[c]*oe+this.B_re[c]*ue);var wr=ut*ut+dt*dt;Y=(We*ut+wt*dt)/wr,ne=(wt*ut-We*dt)/wr}var Kt=Y,xn=ne,qo=1,zo=0;for(c=1;c<=9;c++)qo=qo*Kt,zo=zo+this.D[c]*qo;var cf=this.lat0+zo*d*1e5,__=this.long0+xn;return a.x=__,a.y=cf,a}var ge=["New_Zealand_Map_Grid","nzmg"],Be={init:V,forward:Z,inverse:re,names:ge};function Ve(){}function et(a){var c=a.x,p=a.y,_=fe(c-this.long0),E=this.x0+this.a*_,T=this.y0+this.a*Math.log(Math.tan(Math.PI/4+p/2.5))*1.25;return a.x=E,a.y=T,a}function tt(a){a.x-=this.x0,a.y-=this.y0;var c=fe(this.long0+a.x/this.a),p=2.5*(Math.atan(Math.exp(.8*a.y/this.a))-Math.PI/4);return a.x=c,a.y=p,a}var Gt=["Miller_Cylindrical","mill"],di={init:Ve,forward:et,inverse:tt,names:Gt},Bs=20;function Sn(){this.sphere?(this.n=1,this.m=0,this.es=0,this.C_y=Math.sqrt((this.m+1)/this.n),this.C_x=this.C_y/(this.m+1)):this.en=P1(this.es)}function Ji(a){var c,p,_=a.x,E=a.y;if(_=fe(_-this.long0),this.sphere){if(!this.m)E=this.n!==1?Math.asin(this.n*Math.sin(E)):E;else for(var T=this.n*Math.sin(E),M=Bs;M;--M){var R=(this.m*E+Math.sin(E)-T)/(this.m+Math.cos(E));if(E-=R,Math.abs(R)<y)break}c=this.a*this.C_x*_*(this.m+Math.cos(E)),p=this.a*this.C_y*E}else{var O=Math.sin(E),H=Math.cos(E);p=this.a*jn(E,O,H,this.en),c=this.a*_*H/Math.sqrt(1-this.es*O*O)}return a.x=c,a.y=p,a}function cr(a){var c,p,_,E;return a.x-=this.x0,_=a.x/this.a,a.y-=this.y0,c=a.y/this.a,this.sphere?(c/=this.C_y,_=_/(this.C_x*(this.m+Math.cos(c))),this.m?c=bn((this.m*c+Math.sin(c))/this.n):this.n!==1&&(c=bn(Math.sin(c)/this.n)),_=fe(_+this.long0),c=Os(c)):(c=As(a.y/this.a,this.es,this.en),E=Math.abs(c),E<h?(E=Math.sin(c),p=this.long0+a.x*Math.sqrt(1-this.es*E*E)/(this.a*Math.cos(c)),_=fe(p)):E-y<h&&(_=this.long0)),a.x=_,a.y=c,a}var Sr=["Sinusoidal","sinu"],Yr={init:Sn,forward:Ji,inverse:cr,names:Sr};function Yi(){}function _e(a){for(var c=a.x,p=a.y,_=fe(c-this.long0),E=p,T=Math.PI*Math.sin(p);;){var M=-(E+Math.sin(E)-T)/(1+Math.cos(E));if(E+=M,Math.abs(M)<y)break}E/=2,Math.PI/2-Math.abs(p)<y&&(_=0);var R=.900316316158*this.a*_*Math.cos(E)+this.x0,O=1.4142135623731*this.a*Math.sin(E)+this.y0;return a.x=R,a.y=O,a}function He(a){var c,p;a.x-=this.x0,a.y-=this.y0,p=a.y/(1.4142135623731*this.a),Math.abs(p)>.999999999999&&(p=.999999999999),c=Math.asin(p);var _=fe(this.long0+a.x/(.900316316158*this.a*Math.cos(c)));_<-Math.PI&&(_=-Math.PI),_>Math.PI&&(_=Math.PI),p=(2*c+Math.sin(2*c))/Math.PI,Math.abs(p)>1&&(p=1);var E=Math.asin(p);return a.x=_,a.y=E,a}var St=["Mollweide","moll"],Ir={init:Yi,forward:_e,inverse:He,names:St};function Ds(){Math.abs(this.lat1+this.lat2)<y||(this.lat2=this.lat2||this.lat1,this.temp=this.b/this.a,this.es=1-Math.pow(this.temp,2),this.e=Math.sqrt(this.es),this.e0=ko(this.es),this.e1=Io(this.es),this.e2=Po(this.es),this.e3=Lo(this.es),this.sinphi=Math.sin(this.lat1),this.cosphi=Math.cos(this.lat1),this.ms1=jt(this.e,this.sinphi,this.cosphi),this.ml1=lr(this.e0,this.e1,this.e2,this.e3,this.lat1),Math.abs(this.lat1-this.lat2)<y?this.ns=this.sinphi:(this.sinphi=Math.sin(this.lat2),this.cosphi=Math.cos(this.lat2),this.ms2=jt(this.e,this.sinphi,this.cosphi),this.ml2=lr(this.e0,this.e1,this.e2,this.e3,this.lat2),this.ns=(this.ms1-this.ms2)/(this.ml2-this.ml1)),this.g=this.ml1+this.ms1/this.ns,this.ml0=lr(this.e0,this.e1,this.e2,this.e3,this.lat0),this.rh=this.a*(this.g-this.ml0))}function qs(a){var c=a.x,p=a.y,_;if(this.sphere)_=this.a*(this.g-p);else{var E=lr(this.e0,this.e1,this.e2,this.e3,p);_=this.a*(this.g-E)}var T=this.ns*fe(c-this.long0),M=this.x0+_*Math.sin(T),R=this.y0+this.rh-_*Math.cos(T);return a.x=M,a.y=R,a}function zs(a){a.x-=this.x0,a.y=this.rh-a.y+this.y0;var c,p,_,E;this.ns>=0?(p=Math.sqrt(a.x*a.x+a.y*a.y),c=1):(p=-Math.sqrt(a.x*a.x+a.y*a.y),c=-1);var T=0;if(p!==0&&(T=Math.atan2(c*a.x,c*a.y)),this.sphere)return E=fe(this.long0+T/this.ns),_=Os(this.g-p/this.a),a.x=E,a.y=_,a;var M=this.g-p/this.a;return _=Za(M,this.e0,this.e1,this.e2,this.e3),E=fe(this.long0+T/this.ns),a.x=E,a.y=_,a}var ou=["Equidistant_Conic","eqdc"],af={init:Ds,forward:qs,inverse:zs,names:ou};function Ul(){this.R=this.a}function OE(a){var c=a.x,p=a.y,_=fe(c-this.long0),E,T;Math.abs(p)<=y&&(E=this.x0+this.R*_,T=this.y0);var M=bn(2*Math.abs(p/Math.PI));(Math.abs(_)<=y||Math.abs(Math.abs(p)-h)<=y)&&(E=this.x0,p>=0?T=this.y0+Math.PI*this.R*Math.tan(.5*M):T=this.y0+Math.PI*this.R*-Math.tan(.5*M));var R=.5*Math.abs(Math.PI/_-_/Math.PI),O=R*R,H=Math.sin(M),$=Math.cos(M),K=$/(H+$-1),Y=K*K,ne=K*(2/H-1),ie=ne*ne,oe=Math.PI*this.R*(R*(K-ie)+Math.sqrt(O*(K-ie)*(K-ie)-(ie+O)*(Y-ie)))/(ie+O);_<0&&(oe=-oe),E=this.x0+oe;var ue=O+K;return oe=Math.PI*this.R*(ne*ue-R*Math.sqrt((ie+O)*(O+1)-ue*ue))/(ie+O),p>=0?T=this.y0+oe:T=this.y0-oe,a.x=E,a.y=T,a}function BE(a){var c,p,_,E,T,M,R,O,H,$,K,Y,ne;return a.x-=this.x0,a.y-=this.y0,K=Math.PI*this.R,_=a.x/K,E=a.y/K,T=_*_+E*E,M=-Math.abs(E)*(1+T),R=M-2*E*E+_*_,O=-2*M+1+2*E*E+T*T,ne=E*E/O+(2*R*R*R/O/O/O-9*M*R/O/O)/27,H=(M-R*R/3/O)/O,$=2*Math.sqrt(-H/3),K=3*ne/H/$,Math.abs(K)>1&&(K>=0?K=1:K=-1),Y=Math.acos(K)/3,a.y>=0?p=(-$*Math.cos(Y+Math.PI/3)-R/3/O)*Math.PI:p=-(-$*Math.cos(Y+Math.PI/3)-R/3/O)*Math.PI,Math.abs(_)<y?c=this.long0:c=fe(this.long0+Math.PI*(T-1+Math.sqrt(1+2*(_*_-E*E)+T*T))/2/_),a.x=c,a.y=p,a}var DE=["Van_der_Grinten_I","VanDerGrinten","vandg"],qE={init:Ul,forward:OE,inverse:BE,names:DE};function zE(){this.sin_p12=Math.sin(this.lat0),this.cos_p12=Math.cos(this.lat0)}function FE(a){var c=a.x,p=a.y,_=Math.sin(a.y),E=Math.cos(a.y),T=fe(c-this.long0),M,R,O,H,$,K,Y,ne,ie,oe,ue,Ee,Oe,We,wt,ut,dt,wr,Kt,xn,qo,zo,cf;return this.sphere?Math.abs(this.sin_p12-1)<=y?(a.x=this.x0+this.a*(h-p)*Math.sin(T),a.y=this.y0-this.a*(h-p)*Math.cos(T),a):Math.abs(this.sin_p12+1)<=y?(a.x=this.x0+this.a*(h+p)*Math.sin(T),a.y=this.y0+this.a*(h+p)*Math.cos(T),a):(wr=this.sin_p12*_+this.cos_p12*E*Math.cos(T),ut=Math.acos(wr),dt=ut?ut/Math.sin(ut):1,a.x=this.x0+this.a*dt*E*Math.sin(T),a.y=this.y0+this.a*dt*(this.cos_p12*_-this.sin_p12*E*Math.cos(T)),a):(M=ko(this.es),R=Io(this.es),O=Po(this.es),H=Lo(this.es),Math.abs(this.sin_p12-1)<=y?($=this.a*lr(M,R,O,H,h),K=this.a*lr(M,R,O,H,p),a.x=this.x0+($-K)*Math.sin(T),a.y=this.y0-($-K)*Math.cos(T),a):Math.abs(this.sin_p12+1)<=y?($=this.a*lr(M,R,O,H,h),K=this.a*lr(M,R,O,H,p),a.x=this.x0+($+K)*Math.sin(T),a.y=this.y0+($+K)*Math.cos(T),a):(Y=_/E,ne=Ls(this.a,this.e,this.sin_p12),ie=Ls(this.a,this.e,_),oe=Math.atan((1-this.es)*Y+this.es*ne*this.sin_p12/(ie*E)),ue=Math.atan2(Math.sin(T),this.cos_p12*Math.tan(oe)-this.sin_p12*Math.cos(T)),ue===0?Kt=Math.asin(this.cos_p12*Math.sin(oe)-this.sin_p12*Math.cos(oe)):Math.abs(Math.abs(ue)-Math.PI)<=y?Kt=-Math.asin(this.cos_p12*Math.sin(oe)-this.sin_p12*Math.cos(oe)):Kt=Math.asin(Math.sin(T)*Math.cos(oe)/Math.sin(ue)),Ee=this.e*this.sin_p12/Math.sqrt(1-this.es),Oe=this.e*this.cos_p12*Math.cos(ue)/Math.sqrt(1-this.es),We=Ee*Oe,wt=Oe*Oe,xn=Kt*Kt,qo=xn*Kt,zo=qo*Kt,cf=zo*Kt,ut=ne*Kt*(1-xn*wt*(1-wt)/6+qo/8*We*(1-2*wt)+zo/120*(wt*(4-7*wt)-3*Ee*Ee*(1-7*wt))-cf/48*We),a.x=this.x0+ut*Math.sin(ue),a.y=this.y0+ut*Math.cos(ue),a))}function UE(a){a.x-=this.x0,a.y-=this.y0;var c,p,_,E,T,M,R,O,H,$,K,Y,ne,ie,oe,ue,Ee,Oe,We,wt,ut,dt,wr,Kt;return this.sphere?(c=Math.sqrt(a.x*a.x+a.y*a.y),c>2*h*this.a?void 0:(p=c/this.a,_=Math.sin(p),E=Math.cos(p),T=this.long0,Math.abs(c)<=y?M=this.lat0:(M=bn(E*this.sin_p12+a.y*_*this.cos_p12/c),R=Math.abs(this.lat0)-h,Math.abs(R)<=y?this.lat0>=0?T=fe(this.long0+Math.atan2(a.x,-a.y)):T=fe(this.long0-Math.atan2(-a.x,a.y)):T=fe(this.long0+Math.atan2(a.x*_,c*this.cos_p12*E-a.y*this.sin_p12*_))),a.x=T,a.y=M,a)):(O=ko(this.es),H=Io(this.es),$=Po(this.es),K=Lo(this.es),Math.abs(this.sin_p12-1)<=y?(Y=this.a*lr(O,H,$,K,h),c=Math.sqrt(a.x*a.x+a.y*a.y),ne=Y-c,M=Za(ne/this.a,O,H,$,K),T=fe(this.long0+Math.atan2(a.x,-1*a.y)),a.x=T,a.y=M,a):Math.abs(this.sin_p12+1)<=y?(Y=this.a*lr(O,H,$,K,h),c=Math.sqrt(a.x*a.x+a.y*a.y),ne=c-Y,M=Za(ne/this.a,O,H,$,K),T=fe(this.long0+Math.atan2(a.x,a.y)),a.x=T,a.y=M,a):(c=Math.sqrt(a.x*a.x+a.y*a.y),ue=Math.atan2(a.x,a.y),ie=Ls(this.a,this.e,this.sin_p12),Ee=Math.cos(ue),Oe=this.e*this.cos_p12*Ee,We=-Oe*Oe/(1-this.es),wt=3*this.es*(1-We)*this.sin_p12*this.cos_p12*Ee/(1-this.es),ut=c/ie,dt=ut-We*(1+We)*Math.pow(ut,3)/6-wt*(1+3*We)*Math.pow(ut,4)/24,wr=1-We*dt*dt/2-ut*dt*dt*dt/6,oe=Math.asin(this.sin_p12*Math.cos(dt)+this.cos_p12*Math.sin(dt)*Ee),T=fe(this.long0+Math.asin(Math.sin(ue)*Math.sin(dt)/Math.cos(oe))),Kt=Math.sin(oe),M=Math.atan2((Kt-this.es*wr*this.sin_p12)*Math.tan(oe),Kt*(1-this.es)),a.x=T,a.y=M,a))}var jE=["Azimuthal_Equidistant","aeqd"],HE={init:zE,forward:FE,inverse:UE,names:jE};function WE(){this.sin_p14=Math.sin(this.lat0),this.cos_p14=Math.cos(this.lat0)}function GE(a){var c,p,_,E,T,M,R,O,H=a.x,$=a.y;return _=fe(H-this.long0),c=Math.sin($),p=Math.cos($),E=Math.cos(_),M=this.sin_p14*c+this.cos_p14*p*E,T=1,(M>0||Math.abs(M)<=y)&&(R=this.a*T*p*Math.sin(_),O=this.y0+this.a*T*(this.cos_p14*c-this.sin_p14*p*E)),a.x=R,a.y=O,a}function KE(a){var c,p,_,E,T,M,R;return a.x-=this.x0,a.y-=this.y0,c=Math.sqrt(a.x*a.x+a.y*a.y),p=bn(c/this.a),_=Math.sin(p),E=Math.cos(p),M=this.long0,Math.abs(c)<=y?(R=this.lat0,a.x=M,a.y=R,a):(R=bn(E*this.sin_p14+a.y*_*this.cos_p14/c),T=Math.abs(this.lat0)-h,Math.abs(T)<=y?(this.lat0>=0?M=fe(this.long0+Math.atan2(a.x,-a.y)):M=fe(this.long0-Math.atan2(-a.x,a.y)),a.x=M,a.y=R,a):(M=fe(this.long0+Math.atan2(a.x*_,c*this.cos_p14*E-a.y*this.sin_p14*_)),a.x=M,a.y=R,a))}var VE=["ortho"],$E={init:WE,forward:GE,inverse:KE,names:VE},Bt={FRONT:1,RIGHT:2,BACK:3,LEFT:4,TOP:5,BOTTOM:6},ht={AREA_0:1,AREA_1:2,AREA_2:3,AREA_3:4};function XE(){this.x0=this.x0||0,this.y0=this.y0||0,this.lat0=this.lat0||0,this.long0=this.long0||0,this.lat_ts=this.lat_ts||0,this.title=this.title||"Quadrilateralized Spherical Cube",this.lat0>=h-w/2?this.face=Bt.TOP:this.lat0<=-(h-w/2)?this.face=Bt.BOTTOM:Math.abs(this.long0)<=w?this.face=Bt.FRONT:Math.abs(this.long0)<=h+w?this.face=this.long0>0?Bt.RIGHT:Bt.LEFT:this.face=Bt.BACK,this.es!==0&&(this.one_minus_f=1-(this.a-this.b)/this.a,this.one_minus_f_squared=this.one_minus_f*this.one_minus_f)}function JE(a){var c={x:0,y:0},p,_,E,T,M,R,O={value:0};if(a.x-=this.long0,this.es!==0?p=Math.atan(this.one_minus_f_squared*Math.tan(a.y)):p=a.y,_=a.x,this.face===Bt.TOP)T=h-p,_>=w&&_<=h+w?(O.value=ht.AREA_0,E=_-h):_>h+w||_<=-(h+w)?(O.value=ht.AREA_1,E=_>0?_-N:_+N):_>-(h+w)&&_<=-w?(O.value=ht.AREA_2,E=_+h):(O.value=ht.AREA_3,E=_);else if(this.face===Bt.BOTTOM)T=h+p,_>=w&&_<=h+w?(O.value=ht.AREA_0,E=-_+h):_<w&&_>=-w?(O.value=ht.AREA_1,E=-_):_<-w&&_>=-(h+w)?(O.value=ht.AREA_2,E=-_-h):(O.value=ht.AREA_3,E=_>0?-_+N:-_-N);else{var H,$,K,Y,ne,ie,oe;this.face===Bt.RIGHT?_=au(_,+h):this.face===Bt.BACK?_=au(_,+N):this.face===Bt.LEFT&&(_=au(_,-h)),Y=Math.sin(p),ne=Math.cos(p),ie=Math.sin(_),oe=Math.cos(_),H=ne*oe,$=ne*ie,K=Y,this.face===Bt.FRONT?(T=Math.acos(H),E=uf(T,K,$,O)):this.face===Bt.RIGHT?(T=Math.acos($),E=uf(T,K,-H,O)):this.face===Bt.BACK?(T=Math.acos(-H),E=uf(T,K,-$,O)):this.face===Bt.LEFT?(T=Math.acos(-$),E=uf(T,K,H,O)):(T=E=0,O.value=ht.AREA_0)}return R=Math.atan(12/N*(E+Math.acos(Math.sin(E)*Math.cos(w))-h)),M=Math.sqrt((1-Math.cos(T))/(Math.cos(R)*Math.cos(R))/(1-Math.cos(Math.atan(1/Math.cos(E))))),O.value===ht.AREA_1?R+=h:O.value===ht.AREA_2?R+=N:O.value===ht.AREA_3&&(R+=1.5*N),c.x=M*Math.cos(R),c.y=M*Math.sin(R),c.x=c.x*this.a+this.x0,c.y=c.y*this.a+this.y0,a.x=c.x,a.y=c.y,a}function YE(a){var c={lam:0,phi:0},p,_,E,T,M,R,O,H,$,K={value:0};if(a.x=(a.x-this.x0)/this.a,a.y=(a.y-this.y0)/this.a,_=Math.atan(Math.sqrt(a.x*a.x+a.y*a.y)),p=Math.atan2(a.y,a.x),a.x>=0&&a.x>=Math.abs(a.y)?K.value=ht.AREA_0:a.y>=0&&a.y>=Math.abs(a.x)?(K.value=ht.AREA_1,p-=h):a.x<0&&-a.x>=Math.abs(a.y)?(K.value=ht.AREA_2,p=p<0?p+N:p-N):(K.value=ht.AREA_3,p+=h),$=N/12*Math.tan(p),M=Math.sin($)/(Math.cos($)-1/Math.sqrt(2)),R=Math.atan(M),E=Math.cos(p),T=Math.tan(_),O=1-E*E*T*T*(1-Math.cos(Math.atan(1/Math.cos(R)))),O<-1?O=-1:O>1&&(O=1),this.face===Bt.TOP)H=Math.acos(O),c.phi=h-H,K.value===ht.AREA_0?c.lam=R+h:K.value===ht.AREA_1?c.lam=R<0?R+N:R-N:K.value===ht.AREA_2?c.lam=R-h:c.lam=R;else if(this.face===Bt.BOTTOM)H=Math.acos(O),c.phi=H-h,K.value===ht.AREA_0?c.lam=-R+h:K.value===ht.AREA_1?c.lam=-R:K.value===ht.AREA_2?c.lam=-R-h:c.lam=R<0?-R-N:-R+N;else{var Y,ne,ie;Y=O,$=Y*Y,$>=1?ie=0:ie=Math.sqrt(1-$)*Math.sin(R),$+=ie*ie,$>=1?ne=0:ne=Math.sqrt(1-$),K.value===ht.AREA_1?($=ne,ne=-ie,ie=$):K.value===ht.AREA_2?(ne=-ne,ie=-ie):K.value===ht.AREA_3&&($=ne,ne=ie,ie=-$),this.face===Bt.RIGHT?($=Y,Y=-ne,ne=$):this.face===Bt.BACK?(Y=-Y,ne=-ne):this.face===Bt.LEFT&&($=Y,Y=ne,ne=-$),c.phi=Math.acos(-ie)-h,c.lam=Math.atan2(ne,Y),this.face===Bt.RIGHT?c.lam=au(c.lam,-h):this.face===Bt.BACK?c.lam=au(c.lam,-N):this.face===Bt.LEFT&&(c.lam=au(c.lam,+h))}if(this.es!==0){var oe,ue,Ee;oe=c.phi<0?1:0,ue=Math.tan(c.phi),Ee=this.b/Math.sqrt(ue*ue+this.one_minus_f_squared),c.phi=Math.atan(Math.sqrt(this.a*this.a-Ee*Ee)/(this.one_minus_f*Ee)),oe&&(c.phi=-c.phi)}return c.lam+=this.long0,a.x=c.lam,a.y=c.phi,a}function uf(a,c,p,_){var E;return a<y?(_.value=ht.AREA_0,E=0):(E=Math.atan2(c,p),Math.abs(E)<=w?_.value=ht.AREA_0:E>w&&E<=h+w?(_.value=ht.AREA_1,E-=h):E>h+w||E<=-(h+w)?(_.value=ht.AREA_2,E=E>=0?E-N:E+N):(_.value=ht.AREA_3,E+=h)),E}function au(a,c){var p=a+c;return p<-N?p+=x:p>+N&&(p-=x),p}var ZE=["Quadrilateralized Spherical Cube","Quadrilateralized_Spherical_Cube","qsc"],QE={init:XE,forward:JE,inverse:YE,names:ZE},Vp=[[1,22199e-21,-715515e-10,31103e-10],[.9986,-482243e-9,-24897e-9,-13309e-10],[.9954,-83103e-8,-448605e-10,-986701e-12],[.99,-.00135364,-59661e-9,36777e-10],[.9822,-.00167442,-449547e-11,-572411e-11],[.973,-.00214868,-903571e-10,18736e-12],[.96,-.00305085,-900761e-10,164917e-11],[.9427,-.00382792,-653386e-10,-26154e-10],[.9216,-.00467746,-10457e-8,481243e-11],[.8962,-.00536223,-323831e-10,-543432e-11],[.8679,-.00609363,-113898e-9,332484e-11],[.835,-.00698325,-640253e-10,934959e-12],[.7986,-.00755338,-500009e-10,935324e-12],[.7597,-.00798324,-35971e-9,-227626e-11],[.7186,-.00851367,-701149e-10,-86303e-10],[.6732,-.00986209,-199569e-9,191974e-10],[.6213,-.010418,883923e-10,624051e-11],[.5722,-.00906601,182e-6,624051e-11],[.5322,-.00677797,275608e-9,624051e-11]],jl=[[-520417e-23,.0124,121431e-23,-845284e-16],[.062,.0124,-126793e-14,422642e-15],[.124,.0124,507171e-14,-160604e-14],[.186,.0123999,-190189e-13,600152e-14],[.248,.0124002,710039e-13,-224e-10],[.31,.0123992,-264997e-12,835986e-13],[.372,.0124029,988983e-12,-311994e-12],[.434,.0123893,-369093e-11,-435621e-12],[.4958,.0123198,-102252e-10,-345523e-12],[.5571,.0121916,-154081e-10,-582288e-12],[.6176,.0119938,-241424e-10,-525327e-12],[.6769,.011713,-320223e-10,-516405e-12],[.7346,.0113541,-397684e-10,-609052e-12],[.7903,.0109107,-489042e-10,-104739e-11],[.8435,.0103431,-64615e-9,-140374e-14],[.8936,.00969686,-64636e-9,-8547e-9],[.9394,.00840947,-192841e-9,-42106e-10],[.9761,.00616527,-256e-6,-42106e-10],[1,.00328947,-319159e-9,-42106e-10]],C2=.8487,R2=1.3523,T2=C/5,e_=1/T2,uu=18,lf=function(a,c){return a[0]+c*(a[1]+c*(a[2]+c*a[3]))},t_=function(a,c){return a[1]+c*(2*a[2]+c*3*a[3])};function r_(a,c,p,_){for(var E=c;_;--_){var T=a(E);if(E-=T,Math.abs(T)<p)break}return E}function i_(){this.x0=this.x0||0,this.y0=this.y0||0,this.long0=this.long0||0,this.es=0,this.title=this.title||"Robinson"}function n_(a){var c=fe(a.x-this.long0),p=Math.abs(a.y),_=Math.floor(p*T2);_<0?_=0:_>=uu&&(_=uu-1),p=C*(p-e_*_);var E={x:lf(Vp[_],p)*c,y:lf(jl[_],p)};return a.y<0&&(E.y=-E.y),E.x=E.x*this.a*C2+this.x0,E.y=E.y*this.a*R2+this.y0,E}function s_(a){var c={x:(a.x-this.x0)/(this.a*C2),y:Math.abs(a.y-this.y0)/(this.a*R2)};if(c.y>=1)c.x/=Vp[uu][0],c.y=a.y<0?-h:h;else{var p=Math.floor(c.y*uu);for(p<0?p=0:p>=uu&&(p=uu-1);;)if(jl[p][0]>c.y)--p;else if(jl[p+1][0]<=c.y)++p;else break;var _=jl[p],E=5*(c.y-_[0])/(jl[p+1][0]-_[0]);E=r_(function(T){return(lf(_,T)-c.y)/t_(_,T)},E,y,100),c.x/=lf(Vp[p],E),c.y=(5*p+E)*v,a.y<0&&(c.y=-c.y)}return c.x=fe(c.x+this.long0),c}var o_=["Robinson","robin"],a_={init:i_,forward:n_,inverse:s_,names:o_};function u_(){this.name="geocent"}function l_(a){var c=_l(a,this.es,this.a);return c}function c_(a){var c=Eo(a,this.es,this.a,this.b);return c}var f_=["Geocentric","geocentric","geocent","Geocent"],h_={init:u_,forward:l_,inverse:c_,names:f_},xr={N_POLE:0,S_POLE:1,EQUIT:2,OBLIQ:3},Hl={h:{def:1e5,num:!0},azi:{def:0,num:!0,degrees:!0},tilt:{def:0,num:!0,degrees:!0},long0:{def:0,num:!0},lat0:{def:0,num:!0}};function d_(){if(Object.keys(Hl).forEach(function(p){if(typeof this[p]>"u")this[p]=Hl[p].def;else{if(Hl[p].num&&isNaN(this[p]))throw new Error("Invalid parameter value, must be numeric "+p+" = "+this[p]);Hl[p].num&&(this[p]=parseFloat(this[p]))}Hl[p].degrees&&(this[p]=this[p]*v)}.bind(this)),Math.abs(Math.abs(this.lat0)-h)<y?this.mode=this.lat0<0?xr.S_POLE:xr.N_POLE:Math.abs(this.lat0)<y?this.mode=xr.EQUIT:(this.mode=xr.OBLIQ,this.sinph0=Math.sin(this.lat0),this.cosph0=Math.cos(this.lat0)),this.pn1=this.h/this.a,this.pn1<=0||this.pn1>1e10)throw new Error("Invalid height");this.p=1+this.pn1,this.rp=1/this.p,this.h1=1/this.pn1,this.pfact=(this.p+1)*this.h1,this.es=0;var a=this.tilt,c=this.azi;this.cg=Math.cos(c),this.sg=Math.sin(c),this.cw=Math.cos(a),this.sw=Math.sin(a)}function p_(a){a.x-=this.long0;var c=Math.sin(a.y),p=Math.cos(a.y),_=Math.cos(a.x),E,T;switch(this.mode){case xr.OBLIQ:T=this.sinph0*c+this.cosph0*p*_;break;case xr.EQUIT:T=p*_;break;case xr.S_POLE:T=-c;break;case xr.N_POLE:T=c;break}switch(T=this.pn1/(this.p-T),E=T*p*Math.sin(a.x),this.mode){case xr.OBLIQ:T*=this.cosph0*c-this.sinph0*p*_;break;case xr.EQUIT:T*=c;break;case xr.N_POLE:T*=-(p*_);break;case xr.S_POLE:T*=p*_;break}var M,R;return M=T*this.cg+E*this.sg,R=1/(M*this.sw*this.h1+this.cw),E=(E*this.cg-T*this.sg)*this.cw*R,T=M*R,a.x=E*this.a,a.y=T*this.a,a}function m_(a){a.x/=this.a,a.y/=this.a;var c={x:a.x,y:a.y},p,_,E;E=1/(this.pn1-a.y*this.sw),p=this.pn1*a.x*E,_=this.pn1*a.y*this.cw*E,a.x=p*this.cg+_*this.sg,a.y=_*this.cg-p*this.sg;var T=fi(a.x,a.y);if(Math.abs(T)<y)c.x=0,c.y=a.y;else{var M,R;switch(R=1-T*T*this.pfact,R=(this.p-Math.sqrt(R))/(this.pn1/T+T/this.pn1),M=Math.sqrt(1-R*R),this.mode){case xr.OBLIQ:c.y=Math.asin(M*this.sinph0+a.y*R*this.cosph0/T),a.y=(M-this.sinph0*Math.sin(c.y))*T,a.x*=R*this.cosph0;break;case xr.EQUIT:c.y=Math.asin(a.y*R/T),a.y=M*T,a.x*=R;break;case xr.N_POLE:c.y=Math.asin(M),a.y=-a.y;break;case xr.S_POLE:c.y=-Math.asin(M);break}c.x=Math.atan2(a.x,a.y)}return a.x=c.x+this.long0,a.y=c.y,a}var y_=["Tilted_Perspective","tpers"],g_={init:d_,forward:p_,inverse:m_,names:y_};function v_(){if(this.flip_axis=this.sweep==="x"?1:0,this.h=Number(this.h),this.radius_g_1=this.h/this.a,this.radius_g_1<=0||this.radius_g_1>1e10)throw new Error;if(this.radius_g=1+this.radius_g_1,this.C=this.radius_g*this.radius_g-1,this.es!==0){var a=1-this.es,c=1/a;this.radius_p=Math.sqrt(a),this.radius_p2=a,this.radius_p_inv2=c,this.shape="ellipse"}else this.radius_p=1,this.radius_p2=1,this.radius_p_inv2=1,this.shape="sphere";this.title||(this.title="Geostationary Satellite View")}function b_(a){var c=a.x,p=a.y,_,E,T,M;if(c=c-this.long0,this.shape==="ellipse"){p=Math.atan(this.radius_p2*Math.tan(p));var R=this.radius_p/fi(this.radius_p*Math.cos(p),Math.sin(p));if(E=R*Math.cos(c)*Math.cos(p),T=R*Math.sin(c)*Math.cos(p),M=R*Math.sin(p),(this.radius_g-E)*E-T*T-M*M*this.radius_p_inv2<0)return a.x=Number.NaN,a.y=Number.NaN,a;_=this.radius_g-E,this.flip_axis?(a.x=this.radius_g_1*Math.atan(T/fi(M,_)),a.y=this.radius_g_1*Math.atan(M/_)):(a.x=this.radius_g_1*Math.atan(T/_),a.y=this.radius_g_1*Math.atan(M/fi(T,_)))}else this.shape==="sphere"&&(_=Math.cos(p),E=Math.cos(c)*_,T=Math.sin(c)*_,M=Math.sin(p),_=this.radius_g-E,this.flip_axis?(a.x=this.radius_g_1*Math.atan(T/fi(M,_)),a.y=this.radius_g_1*Math.atan(M/_)):(a.x=this.radius_g_1*Math.atan(T/_),a.y=this.radius_g_1*Math.atan(M/fi(T,_))));return a.x=a.x*this.a,a.y=a.y*this.a,a}function S_(a){var c=-1,p=0,_=0,E,T,M,R;if(a.x=a.x/this.a,a.y=a.y/this.a,this.shape==="ellipse"){this.flip_axis?(_=Math.tan(a.y/this.radius_g_1),p=Math.tan(a.x/this.radius_g_1)*fi(1,_)):(p=Math.tan(a.x/this.radius_g_1),_=Math.tan(a.y/this.radius_g_1)*fi(1,p));var O=_/this.radius_p;if(E=p*p+O*O+c*c,T=2*this.radius_g*c,M=T*T-4*E*this.C,M<0)return a.x=Number.NaN,a.y=Number.NaN,a;R=(-T-Math.sqrt(M))/(2*E),c=this.radius_g+R*c,p*=R,_*=R,a.x=Math.atan2(p,c),a.y=Math.atan(_*Math.cos(a.x)/c),a.y=Math.atan(this.radius_p_inv2*Math.tan(a.y))}else if(this.shape==="sphere"){if(this.flip_axis?(_=Math.tan(a.y/this.radius_g_1),p=Math.tan(a.x/this.radius_g_1)*Math.sqrt(1+_*_)):(p=Math.tan(a.x/this.radius_g_1),_=Math.tan(a.y/this.radius_g_1)*Math.sqrt(1+p*p)),E=p*p+_*_+c*c,T=2*this.radius_g*c,M=T*T-4*E*this.C,M<0)return a.x=Number.NaN,a.y=Number.NaN,a;R=(-T-Math.sqrt(M))/(2*E),c=this.radius_g+R*c,p*=R,_*=R,a.x=Math.atan2(p,c),a.y=Math.atan(_*Math.cos(a.x)/c)}return a.x=a.x+this.long0,a}var x_=["Geostationary Satellite View","Geostationary_Satellite","geos"],w_={init:v_,forward:b_,inverse:S_,names:x_},E_=function(a){a.Proj.projections.add(ja),a.Proj.projections.add(Ro),a.Proj.projections.add(Sp),a.Proj.projections.add(z1),a.Proj.projections.add(_p),a.Proj.projections.add(Tp),a.Proj.projections.add(Mo),a.Proj.projections.add(Ps),a.Proj.projections.add(kp),a.Proj.projections.add(yn),a.Proj.projections.add(ef),a.Proj.projections.add(tf),a.Proj.projections.add(su),a.Proj.projections.add(sf),a.Proj.projections.add(Kp),a.Proj.projections.add(F),a.Proj.projections.add(Be),a.Proj.projections.add(di),a.Proj.projections.add(Yr),a.Proj.projections.add(Ir),a.Proj.projections.add(af),a.Proj.projections.add(qE),a.Proj.projections.add(HE),a.Proj.projections.add($E),a.Proj.projections.add(QE),a.Proj.projections.add(a_),a.Proj.projections.add(h_),a.Proj.projections.add(g_),a.Proj.projections.add(w_)};return kr.defaultDatum="WGS84",kr.Proj=Ri,kr.WGS84=new kr.Proj("WGS84"),kr.Point=Xi,kr.toPoint=Co,kr.defs=G,kr.nadgrid=ci,kr.transform=Es,kr.mgrs=Da,kr.version="2.8.0",E_(kr),kr})});var _3=U(($V,E3)=>{"use strict";function WO(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<t.length;i++){var n=t.charAt(i),s=n.charCodeAt(0);if(e[s]!==255)throw new TypeError(n+" is ambiguous");e[s]=i}var o=t.length,u=t.charAt(0),l=Math.log(o)/Math.log(256),d=Math.log(256)/Math.log(o);function h(S){if(S instanceof Uint8Array||(ArrayBuffer.isView(S)?S=new Uint8Array(S.buffer,S.byteOffset,S.byteLength):Array.isArray(S)&&(S=Uint8Array.from(S))),!(S instanceof Uint8Array))throw new TypeError("Expected Uint8Array");if(S.length===0)return"";for(var y=0,v=0,C=0,w=S.length;C!==w&&S[C]===0;)C++,y++;for(var x=(w-C)*d+1>>>0,N=new Uint8Array(x);C!==w;){for(var I=S[C],q=0,B=x-1;(I!==0||q<v)&&B!==-1;B--,q++)I+=256*N[B]>>>0,N[B]=I%o>>>0,I=I/o>>>0;if(I!==0)throw new Error("Non-zero carry");v=q,C++}for(var z=x-v;z!==x&&N[z]===0;)z++;for(var D=u.repeat(y);z<x;++z)D+=t.charAt(N[z]);return D}function m(S){if(typeof S!="string")throw new TypeError("Expected String");if(S.length===0)return new Uint8Array;for(var y=0,v=0,C=0;S[y]===u;)v++,y++;for(var w=(S.length-y)*l+1>>>0,x=new Uint8Array(w);S[y];){var N=e[S.charCodeAt(y)];if(N===255)return;for(var I=0,q=w-1;(N!==0||I<C)&&q!==-1;q--,I++)N+=o*x[q]>>>0,x[q]=N%256>>>0,N=N/256>>>0;if(N!==0)throw new Error("Non-zero carry");C=I,y++}for(var B=w-C;B!==w&&x[B]===0;)B++;for(var z=new Uint8Array(v+(w-B)),D=v;B!==w;)z[D++]=x[B++];return z}function b(S){var y=m(S);if(y)return y;throw new Error("Non-base"+o+" character")}return{encode:h,decodeUnsafe:m,decode:b}}E3.exports=WO});var k3=U((Dh,M3)=>{(function(t,e){typeof Dh=="object"&&typeof M3<"u"?e(Dh):typeof define=="function"&&define.amd?define(["exports"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.WebStreamsPolyfill={}))})(Dh,function(t){"use strict";let e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:f=>`Symbol(${f})`;function r(){}function i(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}let n=i();function s(f){return typeof f=="object"&&f!==null||typeof f=="function"}let o=r,u=Promise,l=Promise.prototype.then,d=Promise.resolve.bind(u),h=Promise.reject.bind(u);function m(f){return new u(f)}function b(f){return d(f)}function S(f){return h(f)}function y(f,g,A){return l.call(f,g,A)}function v(f,g,A){y(y(f,g,A),void 0,o)}function C(f,g){v(f,g)}function w(f,g){v(f,void 0,g)}function x(f,g,A){return y(f,g,A)}function N(f){y(f,void 0,o)}let I=(()=>{let f=n&&n.queueMicrotask;if(typeof f=="function")return f;let g=b(void 0);return A=>y(g,A)})();function q(f,g,A){if(typeof f!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(f,g,A)}function B(f,g,A){try{return b(q(f,g,A))}catch(F){return S(F)}}let z=16384;class D{constructor(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}get length(){return this._size}push(g){let A=this._back,F=A;A._elements.length===z-1&&(F={_elements:[],_next:void 0}),A._elements.push(g),F!==A&&(this._back=F,A._next=F),++this._size}shift(){let g=this._front,A=g,F=this._cursor,V=F+1,Z=g._elements,re=Z[F];return V===z&&(A=g._next,V=0),--this._size,this._cursor=V,g!==A&&(this._front=A),Z[F]=void 0,re}forEach(g){let A=this._cursor,F=this._front,V=F._elements;for(;(A!==V.length||F._next!==void 0)&&!(A===V.length&&(F=F._next,V=F._elements,A=0,V.length===0));)g(V[A]),++A}peek(){let g=this._front,A=this._cursor;return g._elements[A]}}function se(f,g){f._ownerReadableStream=g,g._reader=f,g._state==="readable"?qe(f):g._state==="closed"?Mt(f):Je(f,g._storedError)}function le(f,g){let A=f._ownerReadableStream;return hi(A,g)}function te(f){f._ownerReadableStream._state==="readable"?Pe(f,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):Wr(f,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),f._ownerReadableStream._reader=void 0,f._ownerReadableStream=void 0}function ve(f){return new TypeError("Cannot "+f+" a stream using a released reader")}function qe(f){f._closedPromise=m((g,A)=>{f._closedPromise_resolve=g,f._closedPromise_reject=A})}function Je(f,g){qe(f),Pe(f,g)}function Mt(f){qe(f),vr(f)}function Pe(f,g){f._closedPromise_reject!==void 0&&(N(f._closedPromise),f._closedPromise_reject(g),f._closedPromise_resolve=void 0,f._closedPromise_reject=void 0)}function Wr(f,g){Je(f,g)}function vr(f){f._closedPromise_resolve!==void 0&&(f._closedPromise_resolve(void 0),f._closedPromise_resolve=void 0,f._closedPromise_reject=void 0)}let Gr=e("[[AbortSteps]]"),Rt=e("[[ErrorSteps]]"),Kr=e("[[CancelSteps]]"),or=e("[[PullSteps]]"),er=Number.isFinite||function(f){return typeof f=="number"&&isFinite(f)},wi=Math.trunc||function(f){return f<0?Math.ceil(f):Math.floor(f)};function Vi(f){return typeof f=="object"||typeof f=="function"}function L(f,g){if(f!==void 0&&!Vi(f))throw new TypeError(`${g} is not an object.`)}function k(f,g){if(typeof f!="function")throw new TypeError(`${g} is not a function.`)}function J(f){return typeof f=="object"&&f!==null||typeof f=="function"}function G(f,g){if(!J(f))throw new TypeError(`${g} is not an object.`)}function Le(f,g,A){if(f===void 0)throw new TypeError(`Parameter ${g} is required in '${A}'.`)}function bt(f,g,A){if(f===void 0)throw new TypeError(`${g} is required in '${A}'.`)}function Et(f){return Number(f)}function Jt(f){return f===0?0:f}function br(f){return Jt(wi(f))}function Vr(f,g){let F=Number.MAX_SAFE_INTEGER,V=Number(f);if(V=Jt(V),!er(V))throw new TypeError(`${g} is not a finite number`);if(V=br(V),V<0||V>F)throw new TypeError(`${g} is outside the accepted range of ${0} to ${F}, inclusive`);return!er(V)||V===0?0:V}function Tt(f,g){if(!gn(f))throw new TypeError(`${g} is not a ReadableStream.`)}function Ut(f){return new fe(f)}function Ne(f,g){f._reader._readRequests.push(g)}function ui(f,g,A){let V=f._reader._readRequests.shift();A?V._closeSteps():V._chunkSteps(g)}function jt(f){return f._reader._readRequests.length}function $r(f){let g=f._reader;return!(g===void 0||!Ht(g))}class fe{constructor(g){if(Le(g,1,"ReadableStreamDefaultReader"),Tt(g,"First parameter"),vn(g))throw new TypeError("This stream has already been locked for exclusive reading by another reader");se(this,g),this._readRequests=new D}get closed(){return Ht(this)?this._closedPromise:S(P("closed"))}cancel(g=void 0){return Ht(this)?this._ownerReadableStream===void 0?S(ve("cancel")):le(this,g):S(P("cancel"))}read(){if(!Ht(this))return S(P("read"));if(this._ownerReadableStream===void 0)return S(ve("read from"));let g,A,F=m((Z,re)=>{g=Z,A=re});return li(this,{_chunkSteps:Z=>g({value:Z,done:!1}),_closeSteps:()=>g({value:void 0,done:!0}),_errorSteps:Z=>A(Z)}),F}releaseLock(){if(!Ht(this))throw P("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");te(this)}}}Object.defineProperties(fe.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(fe.prototype,e.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Ht(f){return!s(f)||!Object.prototype.hasOwnProperty.call(f,"_readRequests")?!1:f instanceof fe}function li(f,g){let A=f._ownerReadableStream;A._disturbed=!0,A._state==="closed"?g._closeSteps():A._state==="errored"?g._errorSteps(A._storedError):A._readableStreamController[or](g)}function P(f){return new TypeError(`ReadableStreamDefaultReader.prototype.${f} can only be used on a ReadableStreamDefaultReader`)}let j=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);class W{constructor(g,A){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=g,this._preventCancel=A}next(){let g=()=>this._nextSteps();return this._ongoingPromise=this._ongoingPromise?x(this._ongoingPromise,g,g):g(),this._ongoingPromise}return(g){let A=()=>this._returnSteps(g);return this._ongoingPromise?x(this._ongoingPromise,A,A):A()}_nextSteps(){if(this._isFinished)return Promise.resolve({value:void 0,done:!0});let g=this._reader;if(g._ownerReadableStream===void 0)return S(ve("iterate"));let A,F,V=m((re,ge)=>{A=re,F=ge});return li(g,{_chunkSteps:re=>{this._ongoingPromise=void 0,I(()=>A({value:re,done:!1}))},_closeSteps:()=>{this._ongoingPromise=void 0,this._isFinished=!0,te(g),A({value:void 0,done:!0})},_errorSteps:re=>{this._ongoingPromise=void 0,this._isFinished=!0,te(g),F(re)}}),V}_returnSteps(g){if(this._isFinished)return Promise.resolve({value:g,done:!0});this._isFinished=!0;let A=this._reader;if(A._ownerReadableStream===void 0)return S(ve("finish iterating"));if(!this._preventCancel){let F=le(A,g);return te(A),x(F,()=>({value:g,done:!0}))}return te(A),b({value:g,done:!0})}}let X={next(){return he(this)?this._asyncIteratorImpl.next():S(Ie("next"))},return(f){return he(this)?this._asyncIteratorImpl.return(f):S(Ie("return"))}};j!==void 0&&Object.setPrototypeOf(X,j);function Q(f,g){let A=Ut(f),F=new W(A,g),V=Object.create(X);return V._asyncIteratorImpl=F,V}function he(f){if(!s(f)||!Object.prototype.hasOwnProperty.call(f,"_asyncIteratorImpl"))return!1;try{return f._asyncIteratorImpl instanceof W}catch{return!1}}function Ie(f){return new TypeError(`ReadableStreamAsyncIterator.${f} can only be used on a ReadableSteamAsyncIterator`)}let je=Number.isNaN||function(f){return f!==f};function Lt(f){return f.slice()}function Ei(f,g,A,F,V){new Uint8Array(f).set(new Uint8Array(A,F,V),g)}function Ot(f){return f}function we(f){return!1}function Mr(f,g,A){if(f.slice)return f.slice(g,A);let F=A-g,V=new ArrayBuffer(F);return Ei(V,0,f,g,F),V}function wl(f){return!(typeof f!="number"||je(f)||f<0)}function xs(f){let g=Mr(f.buffer,f.byteOffset,f.byteOffset+f.byteLength);return new Uint8Array(g)}function ws(f){let g=f._queue.shift();return f._queueTotalSize-=g.size,f._queueTotalSize<0&&(f._queueTotalSize=0),g.value}function Te(f,g,A){if(!wl(A)||A===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");f._queue.push({value:g,size:A}),f._queueTotalSize+=A}function wo(f){return f._queue.peek().value}function Wt(f){f._queue=new D,f._queueTotalSize=0}class fn{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!hn(this))throw Es("view");return this._view}respond(g){if(!hn(this))throw Es("respond");if(Le(g,1,"respond"),g=Vr(g,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");we(this._view.buffer),_o(this._associatedReadableByteStreamController,g)}respondWithNewView(g){if(!hn(this))throw Es("respondWithNewView");if(Le(g,1,"respondWithNewView"),!ArrayBuffer.isView(g))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");we(g.buffer),Co(this._associatedReadableByteStreamController,g)}}Object.defineProperties(fn.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(fn.prototype,e.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});class mt{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!_i(this))throw _s("byobRequest");return Cl(this)}get desiredSize(){if(!_i(this))throw _s("desiredSize");return Rl(this)}close(){if(!_i(this))throw _s("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");let g=this._controlledReadableByteStream._state;if(g!=="readable")throw new TypeError(`The stream (in ${g} state) is not in the readable state and cannot be closed`);dn(this)}enqueue(g){if(!_i(this))throw _s("enqueue");if(Le(g,1,"enqueue"),!ArrayBuffer.isView(g))throw new TypeError("chunk must be an array buffer view");if(g.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(g.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");let A=this._controlledReadableByteStream._state;if(A!=="readable")throw new TypeError(`The stream (in ${A} state) is not in the readable state and cannot be enqueued to`);La(this,g)}error(g=void 0){if(!_i(this))throw _s("error");Xr(this,g)}[Kr](g){zn(this),Wt(this);let A=this._cancelAlgorithm(g);return Pa(this),A}[or](g){let A=this._controlledReadableByteStream;if(this._queueTotalSize>0){let V=this._queue.shift();this._queueTotalSize-=V.byteLength,w1(this);let Z=new Uint8Array(V.buffer,V.byteOffset,V.byteLength);g._chunkSteps(Z);return}let F=this._autoAllocateChunkSize;if(F!==void 0){let V;try{V=new ArrayBuffer(F)}catch(re){g._errorSteps(re);return}let Z={buffer:V,bufferByteLength:F,byteOffset:0,byteLength:F,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Z)}Ne(A,g),ci(this)}}Object.defineProperties(mt.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(mt.prototype,e.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function _i(f){return!s(f)||!Object.prototype.hasOwnProperty.call(f,"_controlledReadableByteStream")?!1:f instanceof mt}function hn(f){return!s(f)||!Object.prototype.hasOwnProperty.call(f,"_associatedReadableByteStreamController")?!1:f instanceof fn}function ci(f){if(!Qd(f))return;if(f._pulling){f._pullAgain=!0;return}f._pulling=!0;let A=f._pullAlgorithm();v(A,()=>{f._pulling=!1,f._pullAgain&&(f._pullAgain=!1,ci(f))},F=>{Xr(f,F)})}function zn(f){El(f),f._pendingPullIntos=new D}function Fn(f,g){let A=!1;f._state==="closed"&&(A=!0);let F=Ci(g);g.readerType==="default"?ui(f,F,A):kr(f,F,A)}function Ci(f){let g=f.bytesFilled,A=f.elementSize;return new f.viewConstructor(f.buffer,f.byteOffset,g/A)}function Un(f,g,A,F){f._queue.push({buffer:g,byteOffset:A,byteLength:F}),f._queueTotalSize+=F}function x1(f,g){let A=g.elementSize,F=g.bytesFilled-g.bytesFilled%A,V=Math.min(f._queueTotalSize,g.byteLength-g.bytesFilled),Z=g.bytesFilled+V,re=Z-Z%A,ge=V,Be=!1;re>F&&(ge=re-g.bytesFilled,Be=!0);let Ve=f._queue;for(;ge>0;){let et=Ve.peek(),tt=Math.min(ge,et.byteLength),Gt=g.byteOffset+g.bytesFilled;Ei(g.buffer,Gt,et.buffer,et.byteOffset,tt),et.byteLength===tt?Ve.shift():(et.byteOffset+=tt,et.byteLength-=tt),f._queueTotalSize-=tt,Ia(f,tt,g),ge-=tt}return Be}function Ia(f,g,A){A.bytesFilled+=g}function w1(f){f._queueTotalSize===0&&f._closeRequested?(Pa(f),Oo(f._controlledReadableByteStream)):ci(f)}function El(f){f._byobRequest!==null&&(f._byobRequest._associatedReadableByteStreamController=void 0,f._byobRequest._view=null,f._byobRequest=null)}function E1(f){for(;f._pendingPullIntos.length>0;){if(f._queueTotalSize===0)return;let g=f._pendingPullIntos.peek();x1(f,g)&&(Eo(f),Fn(f._controlledReadableByteStream,g))}}function Yd(f,g,A){let F=f._controlledReadableByteStream,V=1;g.constructor!==DataView&&(V=g.constructor.BYTES_PER_ELEMENT);let Z=g.constructor,re=g.buffer,ge={buffer:re,bufferByteLength:re.byteLength,byteOffset:g.byteOffset,byteLength:g.byteLength,bytesFilled:0,elementSize:V,viewConstructor:Z,readerType:"byob"};if(f._pendingPullIntos.length>0){f._pendingPullIntos.push(ge),Tl(F,A);return}if(F._state==="closed"){let Be=new Z(ge.buffer,ge.byteOffset,0);A._closeSteps(Be);return}if(f._queueTotalSize>0){if(x1(f,ge)){let Be=Ci(ge);w1(f),A._chunkSteps(Be);return}if(f._closeRequested){let Be=new TypeError("Insufficient bytes to fill elements in the given buffer");Xr(f,Be),A._errorSteps(Be);return}}f._pendingPullIntos.push(ge),Tl(F,A),ci(f)}function Ri(f,g){let A=f._controlledReadableByteStream;if(Ba(A))for(;Nl(A)>0;){let F=Eo(f);Fn(A,F)}}function Zd(f,g,A){if(Ia(f,g,A),A.bytesFilled<A.elementSize)return;Eo(f);let F=A.bytesFilled%A.elementSize;if(F>0){let V=A.byteOffset+A.bytesFilled,Z=Mr(A.buffer,V-F,V);Un(f,Z,0,Z.byteLength)}A.bytesFilled-=F,Fn(f._controlledReadableByteStream,A),E1(f)}function _l(f,g){let A=f._pendingPullIntos.peek();El(f),f._controlledReadableByteStream._state==="closed"?Ri(f):Zd(f,g,A),ci(f)}function Eo(f){return f._pendingPullIntos.shift()}function Qd(f){let g=f._controlledReadableByteStream;return g._state!=="readable"||f._closeRequested||!f._started?!1:!!($r(g)&&jt(g)>0||Ba(g)&&Nl(g)>0||Rl(f)>0)}function Pa(f){f._pullAlgorithm=void 0,f._cancelAlgorithm=void 0}function dn(f){let g=f._controlledReadableByteStream;if(!(f._closeRequested||g._state!=="readable")){if(f._queueTotalSize>0){f._closeRequested=!0;return}if(f._pendingPullIntos.length>0&&f._pendingPullIntos.peek().bytesFilled>0){let F=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Xr(f,F),F}Pa(f),Oo(g)}}function La(f,g){let A=f._controlledReadableByteStream;if(f._closeRequested||A._state!=="readable")return;let F=g.buffer,V=g.byteOffset,Z=g.byteLength,re=F;if(f._pendingPullIntos.length>0){let ge=f._pendingPullIntos.peek();we(ge.buffer),ge.buffer=ge.buffer}if(El(f),$r(A))if(jt(A)===0)Un(f,re,V,Z);else{f._pendingPullIntos.length>0&&Eo(f);let ge=new Uint8Array(re,V,Z);ui(A,ge,!1)}else Ba(A)?(Un(f,re,V,Z),E1(f)):Un(f,re,V,Z);ci(f)}function Xr(f,g){let A=f._controlledReadableByteStream;A._state==="readable"&&(zn(f),Wt(f),Pa(f),V1(A,g))}function Cl(f){if(f._byobRequest===null&&f._pendingPullIntos.length>0){let g=f._pendingPullIntos.peek(),A=new Uint8Array(g.buffer,g.byteOffset+g.bytesFilled,g.byteLength-g.bytesFilled),F=Object.create(fn.prototype);ep(F,f,A),f._byobRequest=F}return f._byobRequest}function Rl(f){let g=f._controlledReadableByteStream._state;return g==="errored"?null:g==="closed"?0:f._strategyHWM-f._queueTotalSize}function _o(f,g){let A=f._pendingPullIntos.peek();if(f._controlledReadableByteStream._state==="closed"){if(g!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(g===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(A.bytesFilled+g>A.byteLength)throw new RangeError("bytesWritten out of range")}A.buffer=A.buffer,_l(f,g)}function Co(f,g){let A=f._pendingPullIntos.peek();if(f._controlledReadableByteStream._state==="closed"){if(g.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(g.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(A.byteOffset+A.bytesFilled!==g.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(A.bufferByteLength!==g.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(A.bytesFilled+g.byteLength>A.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");let V=g.byteLength;A.buffer=g.buffer,_l(f,V)}function _1(f,g,A,F,V,Z,re){g._controlledReadableByteStream=f,g._pullAgain=!1,g._pulling=!1,g._byobRequest=null,g._queue=g._queueTotalSize=void 0,Wt(g),g._closeRequested=!1,g._started=!1,g._strategyHWM=Z,g._pullAlgorithm=F,g._cancelAlgorithm=V,g._autoAllocateChunkSize=re,g._pendingPullIntos=new D,f._readableStreamController=g;let ge=A();v(b(ge),()=>{g._started=!0,ci(g)},Be=>{Xr(g,Be)})}function C1(f,g,A){let F=Object.create(mt.prototype),V=()=>{},Z=()=>b(void 0),re=()=>b(void 0);g.start!==void 0&&(V=()=>g.start(F)),g.pull!==void 0&&(Z=()=>g.pull(F)),g.cancel!==void 0&&(re=Be=>g.cancel(Be));let ge=g.autoAllocateChunkSize;if(ge===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");_1(f,F,V,Z,re,A,ge)}function ep(f,g,A){f._associatedReadableByteStreamController=g,f._view=A}function Es(f){return new TypeError(`ReadableStreamBYOBRequest.prototype.${f} can only be used on a ReadableStreamBYOBRequest`)}function _s(f){return new TypeError(`ReadableByteStreamController.prototype.${f} can only be used on a ReadableByteStreamController`)}function Oa(f){return new Cs(f)}function Tl(f,g){f._reader._readIntoRequests.push(g)}function kr(f,g,A){let V=f._reader._readIntoRequests.shift();A?V._closeSteps(g):V._chunkSteps(g)}function Nl(f){return f._reader._readIntoRequests.length}function Ba(f){let g=f._reader;return!(g===void 0||!Jr(g))}class Cs{constructor(g){if(Le(g,1,"ReadableStreamBYOBReader"),Tt(g,"First parameter"),vn(g))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!_i(g._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");se(this,g),this._readIntoRequests=new D}get closed(){return Jr(this)?this._closedPromise:S(ur("closed"))}cancel(g=void 0){return Jr(this)?this._ownerReadableStream===void 0?S(ve("cancel")):le(this,g):S(ur("cancel"))}read(g){if(!Jr(this))return S(ur("read"));if(!ArrayBuffer.isView(g))return S(new TypeError("view must be an array buffer view"));if(g.byteLength===0)return S(new TypeError("view must have non-zero byteLength"));if(g.buffer.byteLength===0)return S(new TypeError("view's buffer must have non-zero byteLength"));if(we(g.buffer),this._ownerReadableStream===void 0)return S(ve("read from"));let A,F,V=m((re,ge)=>{A=re,F=ge});return ar(this,g,{_chunkSteps:re=>A({value:re,done:!1}),_closeSteps:re=>A({value:re,done:!0}),_errorSteps:re=>F(re)}),V}releaseLock(){if(!Jr(this))throw ur("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");te(this)}}}Object.defineProperties(Cs.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Cs.prototype,e.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Jr(f){return!s(f)||!Object.prototype.hasOwnProperty.call(f,"_readIntoRequests")?!1:f instanceof Cs}function ar(f,g,A){let F=f._ownerReadableStream;F._disturbed=!0,F._state==="errored"?A._errorSteps(F._storedError):Yd(F._readableStreamController,g,A)}function ur(f){return new TypeError(`ReadableStreamBYOBReader.prototype.${f} can only be used on a ReadableStreamBYOBReader`)}function $i(f,g){let{highWaterMark:A}=f;if(A===void 0)return g;if(je(A)||A<0)throw new RangeError("Invalid highWaterMark");return A}function pn(f){let{size:g}=f;return g||(()=>1)}function Da(f,g){L(f,g);let A=f?.highWaterMark,F=f?.size;return{highWaterMark:A===void 0?void 0:Et(A),size:F===void 0?void 0:R1(F,`${g} has member 'size' that`)}}function R1(f,g){return k(f,g),A=>Et(f(A))}function tp(f,g){L(f,g);let A=f?.abort,F=f?.close,V=f?.start,Z=f?.type,re=f?.write;return{abort:A===void 0?void 0:T1(A,f,`${g} has member 'abort' that`),close:F===void 0?void 0:Al(F,f,`${g} has member 'close' that`),start:V===void 0?void 0:N1(V,f,`${g} has member 'start' that`),write:re===void 0?void 0:rp(re,f,`${g} has member 'write' that`),type:Z}}function T1(f,g,A){return k(f,A),F=>B(f,g,[F])}function Al(f,g,A){return k(f,A),()=>B(f,g,[])}function N1(f,g,A){return k(f,A),F=>q(f,g,[F])}function rp(f,g,A){return k(f,A),(F,V)=>B(f,g,[F,V])}function qa(f,g){if(!Ts(f))throw new TypeError(`${g} is not a WritableStream.`)}function ip(f){if(typeof f!="object"||f===null)return!1;try{return typeof f.aborted=="boolean"}catch{return!1}}let np=typeof AbortController=="function";function sp(){if(np)return new AbortController}class Rs{constructor(g={},A={}){g===void 0?g=null:G(g,"First parameter");let F=Da(A,"Second parameter"),V=tp(g,"First parameter");if(k1(this),V.type!==void 0)throw new RangeError("Invalid type is specified");let re=pn(F),ge=$i(F,1);mp(this,V,ge,re)}get locked(){if(!Ts(this))throw Ka("locked");return Ns(this)}abort(g=void 0){return Ts(this)?Ns(this)?S(new TypeError("Cannot abort a stream that already has a writer")):Xi(this,g):S(Ka("abort"))}close(){return Ts(this)?Ns(this)?S(new TypeError("Cannot close a stream that already has a writer")):Ti(this)?S(new TypeError("Cannot close an already-closing stream")):I1(this):S(Ka("close"))}getWriter(){if(!Ts(this))throw Ka("getWriter");return A1(this)}}Object.defineProperties(Rs.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Rs.prototype,e.toStringTag,{value:"WritableStream",configurable:!0});function A1(f){return new As(f)}function M1(f,g,A,F,V=1,Z=()=>1){let re=Object.create(Rs.prototype);k1(re);let ge=Object.create(Ms.prototype);return Pl(re,ge,f,g,A,F,V,Z),re}function k1(f){f._state="writable",f._storedError=void 0,f._writer=void 0,f._writableStreamController=void 0,f._writeRequests=new D,f._inFlightWriteRequest=void 0,f._closeRequest=void 0,f._inFlightCloseRequest=void 0,f._pendingAbortRequest=void 0,f._backpressure=!1}function Ts(f){return!s(f)||!Object.prototype.hasOwnProperty.call(f,"_writableStreamController")?!1:f instanceof Rs}function Ns(f){return f._writer!==void 0}function Xi(f,g){var A;if(f._state==="closed"||f._state==="errored")return b(void 0);f._writableStreamController._abortReason=g,(A=f._writableStreamController._abortController)===null||A===void 0||A.abort();let F=f._state;if(F==="closed"||F==="errored")return b(void 0);if(f._pendingAbortRequest!==void 0)return f._pendingAbortRequest._promise;let V=!1;F==="erroring"&&(V=!0,g=void 0);let Z=m((re,ge)=>{f._pendingAbortRequest={_promise:void 0,_resolve:re,_reject:ge,_reason:g,_wasAlreadyErroring:V}});return f._pendingAbortRequest._promise=Z,V||Fa(f,g),Z}function I1(f){let g=f._state;if(g==="closed"||g==="errored")return S(new TypeError(`The stream (in ${g} state) is not in the writable state and cannot be closed`));let A=m((V,Z)=>{let re={_resolve:V,_reject:Z};f._closeRequest=re}),F=f._writer;return F!==void 0&&f._backpressure&&g==="writable"&&ql(F),yp(f._writableStreamController),A}function op(f){return m((A,F)=>{let V={_resolve:A,_reject:F};f._writeRequests.push(V)})}function za(f,g){if(f._state==="writable"){Fa(f,g);return}Ua(f)}function Fa(f,g){let A=f._writableStreamController;f._state="erroring",f._storedError=g;let F=f._writer;F!==void 0&&kl(F,g),!fp(f)&&A._started&&Ua(f)}function Ua(f){f._state="errored",f._writableStreamController[Rt]();let g=f._storedError;if(f._writeRequests.forEach(V=>{V._reject(g)}),f._writeRequests=new D,f._pendingAbortRequest===void 0){jn(f);return}let A=f._pendingAbortRequest;if(f._pendingAbortRequest=void 0,A._wasAlreadyErroring){A._reject(g),jn(f);return}let F=f._writableStreamController[Gr](A._reason);v(F,()=>{A._resolve(),jn(f)},V=>{A._reject(V),jn(f)})}function ap(f){f._inFlightWriteRequest._resolve(void 0),f._inFlightWriteRequest=void 0}function up(f,g){f._inFlightWriteRequest._reject(g),f._inFlightWriteRequest=void 0,za(f,g)}function lp(f){f._inFlightCloseRequest._resolve(void 0),f._inFlightCloseRequest=void 0,f._state==="erroring"&&(f._storedError=void 0,f._pendingAbortRequest!==void 0&&(f._pendingAbortRequest._resolve(),f._pendingAbortRequest=void 0)),f._state="closed";let A=f._writer;A!==void 0&&z1(A)}function cp(f,g){f._inFlightCloseRequest._reject(g),f._inFlightCloseRequest=void 0,f._pendingAbortRequest!==void 0&&(f._pendingAbortRequest._reject(g),f._pendingAbortRequest=void 0),za(f,g)}function Ti(f){return!(f._closeRequest===void 0&&f._inFlightCloseRequest===void 0)}function fp(f){return!(f._inFlightWriteRequest===void 0&&f._inFlightCloseRequest===void 0)}function hp(f){f._inFlightCloseRequest=f._closeRequest,f._closeRequest=void 0}function P1(f){f._inFlightWriteRequest=f._writeRequests.shift()}function jn(f){f._closeRequest!==void 0&&(f._closeRequest._reject(f._storedError),f._closeRequest=void 0);let g=f._writer;g!==void 0&&Bl(g,f._storedError)}function Ml(f,g){let A=f._writer;A!==void 0&&g!==f._backpressure&&(g?Ep(A):ql(A)),f._backpressure=g}class As{constructor(g){if(Le(g,1,"WritableStreamDefaultWriter"),qa(g,"First parameter"),Ns(g))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=g,g._writer=this;let A=g._state;if(A==="writable")!Ti(g)&&g._backpressure?Va(this):F1(this),ks(this);else if(A==="erroring")Dl(this,g._storedError),ks(this);else if(A==="closed")F1(this),xp(this);else{let F=g._storedError;Dl(this,F),q1(this,F)}}get closed(){return Hn(this)?this._closedPromise:S(Wn("closed"))}get desiredSize(){if(!Hn(this))throw Wn("desiredSize");if(this._ownerWritableStream===void 0)throw No("desiredSize");return fi(this)}get ready(){return Hn(this)?this._readyPromise:S(Wn("ready"))}abort(g=void 0){return Hn(this)?this._ownerWritableStream===void 0?S(No("abort")):dp(this,g):S(Wn("abort"))}close(){if(!Hn(this))return S(Wn("close"));let g=this._ownerWritableStream;return g===void 0?S(No("close")):Ti(g)?S(new TypeError("Cannot close an already-closing stream")):L1(this)}releaseLock(){if(!Hn(this))throw Wn("releaseLock");this._ownerWritableStream!==void 0&&O1(this)}write(g=void 0){return Hn(this)?this._ownerWritableStream===void 0?S(No("write to")):B1(this,g):S(Wn("write"))}}Object.defineProperties(As.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(As.prototype,e.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Hn(f){return!s(f)||!Object.prototype.hasOwnProperty.call(f,"_ownerWritableStream")?!1:f instanceof As}function dp(f,g){let A=f._ownerWritableStream;return Xi(A,g)}function L1(f){let g=f._ownerWritableStream;return I1(g)}function pp(f){let g=f._ownerWritableStream,A=g._state;return Ti(g)||A==="closed"?b(void 0):A==="errored"?S(g._storedError):L1(f)}function ja(f,g){f._closedPromiseState==="pending"?Bl(f,g):wp(f,g)}function kl(f,g){f._readyPromiseState==="pending"?U1(f,g):_p(f,g)}function fi(f){let g=f._ownerWritableStream,A=g._state;return A==="errored"||A==="erroring"?null:A==="closed"?0:Ro(g._writableStreamController)}function O1(f){let g=f._ownerWritableStream,A=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");kl(f,A),ja(f,A),g._writer=void 0,f._ownerWritableStream=void 0}function B1(f,g){let A=f._ownerWritableStream,F=A._writableStreamController,V=gp(F,g);if(A!==f._ownerWritableStream)return S(No("write to"));let Z=A._state;if(Z==="errored")return S(A._storedError);if(Ti(A)||Z==="closed")return S(new TypeError("The stream is closing or closed and cannot be written to"));if(Z==="erroring")return S(A._storedError);let re=op(A);return vp(F,g,V),re}let Ha={};class Ms{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!Il(this))throw Ol("abortReason");return this._abortReason}get signal(){if(!Il(this))throw Ol("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal}error(g=void 0){if(!Il(this))throw Ol("error");this._controlledWritableStream._state==="writable"&&D1(this,g)}[Gr](g){let A=this._abortAlgorithm(g);return Wa(this),A}[Rt](){Wt(this)}}Object.defineProperties(Ms.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Ms.prototype,e.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Il(f){return!s(f)||!Object.prototype.hasOwnProperty.call(f,"_controlledWritableStream")?!1:f instanceof Ms}function Pl(f,g,A,F,V,Z,re,ge){g._controlledWritableStream=f,f._writableStreamController=g,g._queue=void 0,g._queueTotalSize=void 0,Wt(g),g._abortReason=void 0,g._abortController=sp(),g._started=!1,g._strategySizeAlgorithm=ge,g._strategyHWM=re,g._writeAlgorithm=F,g._closeAlgorithm=V,g._abortAlgorithm=Z;let Be=To(g);Ml(f,Be);let Ve=A(),et=b(Ve);v(et,()=>{g._started=!0,Ga(g)},tt=>{g._started=!0,za(f,tt)})}function mp(f,g,A,F){let V=Object.create(Ms.prototype),Z=()=>{},re=()=>b(void 0),ge=()=>b(void 0),Be=()=>b(void 0);g.start!==void 0&&(Z=()=>g.start(V)),g.write!==void 0&&(re=Ve=>g.write(Ve,V)),g.close!==void 0&&(ge=()=>g.close()),g.abort!==void 0&&(Be=Ve=>g.abort(Ve)),Pl(f,V,Z,re,ge,Be,A,F)}function Wa(f){f._writeAlgorithm=void 0,f._closeAlgorithm=void 0,f._abortAlgorithm=void 0,f._strategySizeAlgorithm=void 0}function yp(f){Te(f,Ha,0),Ga(f)}function gp(f,g){try{return f._strategySizeAlgorithm(g)}catch(A){return Ll(f,A),1}}function Ro(f){return f._strategyHWM-f._queueTotalSize}function vp(f,g,A){try{Te(f,g,A)}catch(V){Ll(f,V);return}let F=f._controlledWritableStream;if(!Ti(F)&&F._state==="writable"){let V=To(f);Ml(F,V)}Ga(f)}function Ga(f){let g=f._controlledWritableStream;if(!f._started||g._inFlightWriteRequest!==void 0)return;if(g._state==="erroring"){Ua(g);return}if(f._queue.length===0)return;let F=wo(f);F===Ha?bp(f):Sp(f,F)}function Ll(f,g){f._controlledWritableStream._state==="writable"&&D1(f,g)}function bp(f){let g=f._controlledWritableStream;hp(g),ws(f);let A=f._closeAlgorithm();Wa(f),v(A,()=>{lp(g)},F=>{cp(g,F)})}function Sp(f,g){let A=f._controlledWritableStream;P1(A);let F=f._writeAlgorithm(g);v(F,()=>{ap(A);let V=A._state;if(ws(f),!Ti(A)&&V==="writable"){let Z=To(f);Ml(A,Z)}Ga(f)},V=>{A._state==="writable"&&Wa(f),up(A,V)})}function To(f){return Ro(f)<=0}function D1(f,g){let A=f._controlledWritableStream;Wa(f),Fa(A,g)}function Ka(f){return new TypeError(`WritableStream.prototype.${f} can only be used on a WritableStream`)}function Ol(f){return new TypeError(`WritableStreamDefaultController.prototype.${f} can only be used on a WritableStreamDefaultController`)}function Wn(f){return new TypeError(`WritableStreamDefaultWriter.prototype.${f} can only be used on a WritableStreamDefaultWriter`)}function No(f){return new TypeError("Cannot "+f+" a stream using a released writer")}function ks(f){f._closedPromise=m((g,A)=>{f._closedPromise_resolve=g,f._closedPromise_reject=A,f._closedPromiseState="pending"})}function q1(f,g){ks(f),Bl(f,g)}function xp(f){ks(f),z1(f)}function Bl(f,g){f._closedPromise_reject!==void 0&&(N(f._closedPromise),f._closedPromise_reject(g),f._closedPromise_resolve=void 0,f._closedPromise_reject=void 0,f._closedPromiseState="rejected")}function wp(f,g){q1(f,g)}function z1(f){f._closedPromise_resolve!==void 0&&(f._closedPromise_resolve(void 0),f._closedPromise_resolve=void 0,f._closedPromise_reject=void 0,f._closedPromiseState="resolved")}function Va(f){f._readyPromise=m((g,A)=>{f._readyPromise_resolve=g,f._readyPromise_reject=A}),f._readyPromiseState="pending"}function Dl(f,g){Va(f),U1(f,g)}function F1(f){Va(f),ql(f)}function U1(f,g){f._readyPromise_reject!==void 0&&(N(f._readyPromise),f._readyPromise_reject(g),f._readyPromise_resolve=void 0,f._readyPromise_reject=void 0,f._readyPromiseState="rejected")}function Ep(f){Va(f)}function _p(f,g){Dl(f,g)}function ql(f){f._readyPromise_resolve!==void 0&&(f._readyPromise_resolve(void 0),f._readyPromise_resolve=void 0,f._readyPromise_reject=void 0,f._readyPromiseState="fulfilled")}let j1=typeof DOMException<"u"?DOMException:void 0;function Cp(f){if(!(typeof f=="function"||typeof f=="object"))return!1;try{return new f,!0}catch{return!1}}function Rp(){let f=function(A,F){this.message=A||"",this.name=F||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return f.prototype=Object.create(Error.prototype),Object.defineProperty(f.prototype,"constructor",{value:f,writable:!0,configurable:!0}),f}let Tp=Cp(j1)?j1:Rp();function Gn(f,g,A,F,V,Z){let re=Ut(f),ge=A1(g);f._disturbed=!0;let Be=!1,Ve=b(void 0);return m((et,tt)=>{let Gt;if(Z!==void 0){if(Gt=()=>{let _e=new Tp("Aborted","AbortError"),He=[];F||He.push(()=>g._state==="writable"?Xi(g,_e):b(void 0)),V||He.push(()=>f._state==="readable"?hi(f,_e):b(void 0)),Sr(()=>Promise.all(He.map(St=>St())),!0,_e)},Z.aborted){Gt();return}Z.addEventListener("abort",Gt)}function di(){return m((_e,He)=>{function St(Ir){Ir?_e():y(Bs(),St,He)}St(!1)})}function Bs(){return Be?b(!0):y(ge._readyPromise,()=>m((_e,He)=>{li(re,{_chunkSteps:St=>{Ve=y(B1(ge,St),void 0,r),_e(!1)},_closeSteps:()=>_e(!0),_errorSteps:He})}))}if(Ji(f,re._closedPromise,_e=>{F?Yr(!0,_e):Sr(()=>Xi(g,_e),!0,_e)}),Ji(g,ge._closedPromise,_e=>{V?Yr(!0,_e):Sr(()=>hi(f,_e),!0,_e)}),cr(f,re._closedPromise,()=>{A?Yr():Sr(()=>pp(ge))}),Ti(g)||g._state==="closed"){let _e=new TypeError("the destination writable stream closed before all data could be piped to it");V?Yr(!0,_e):Sr(()=>hi(f,_e),!0,_e)}N(di());function Sn(){let _e=Ve;return y(Ve,()=>_e!==Ve?Sn():void 0)}function Ji(_e,He,St){_e._state==="errored"?St(_e._storedError):w(He,St)}function cr(_e,He,St){_e._state==="closed"?St():C(He,St)}function Sr(_e,He,St){if(Be)return;Be=!0,g._state==="writable"&&!Ti(g)?C(Sn(),Ir):Ir();function Ir(){v(_e(),()=>Yi(He,St),Ds=>Yi(!0,Ds))}}function Yr(_e,He){Be||(Be=!0,g._state==="writable"&&!Ti(g)?C(Sn(),()=>Yi(_e,He)):Yi(_e,He))}function Yi(_e,He){O1(ge),te(re),Z!==void 0&&Z.removeEventListener("abort",Gt),_e?tt(He):et(void 0)}})}class Is{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!$a(this))throw Ya("desiredSize");return zl(this)}close(){if(!$a(this))throw Ya("close");if(!Ps(this))throw new TypeError("The stream is not in a state that permits close");Mo(this)}enqueue(g=void 0){if(!$a(this))throw Ya("enqueue");if(!Ps(this))throw new TypeError("The stream is not in a state that permits enqueue");return Ja(this,g)}error(g=void 0){if(!$a(this))throw Ya("error");mn(this,g)}[Kr](g){Wt(this);let A=this._cancelAlgorithm(g);return Xa(this),A}[or](g){let A=this._controlledReadableStream;if(this._queue.length>0){let F=ws(this);this._closeRequested&&this._queue.length===0?(Xa(this),Oo(A)):Ao(this),g._chunkSteps(F)}else Ne(A,g),Ao(this)}}Object.defineProperties(Is.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Is.prototype,e.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function $a(f){return!s(f)||!Object.prototype.hasOwnProperty.call(f,"_controlledReadableStream")?!1:f instanceof Is}function Ao(f){if(!H1(f))return;if(f._pulling){f._pullAgain=!0;return}f._pulling=!0;let A=f._pullAlgorithm();v(A,()=>{f._pulling=!1,f._pullAgain&&(f._pullAgain=!1,Ao(f))},F=>{mn(f,F)})}function H1(f){let g=f._controlledReadableStream;return!Ps(f)||!f._started?!1:!!(vn(g)&&jt(g)>0||zl(f)>0)}function Xa(f){f._pullAlgorithm=void 0,f._cancelAlgorithm=void 0,f._strategySizeAlgorithm=void 0}function Mo(f){if(!Ps(f))return;let g=f._controlledReadableStream;f._closeRequested=!0,f._queue.length===0&&(Xa(f),Oo(g))}function Ja(f,g){if(!Ps(f))return;let A=f._controlledReadableStream;if(vn(A)&&jt(A)>0)ui(A,g,!1);else{let F;try{F=f._strategySizeAlgorithm(g)}catch(V){throw mn(f,V),V}try{Te(f,g,F)}catch(V){throw mn(f,V),V}}Ao(f)}function mn(f,g){let A=f._controlledReadableStream;A._state==="readable"&&(Wt(f),Xa(f),V1(A,g))}function zl(f){let g=f._controlledReadableStream._state;return g==="errored"?null:g==="closed"?0:f._strategyHWM-f._queueTotalSize}function Np(f){return!H1(f)}function Ps(f){let g=f._controlledReadableStream._state;return!f._closeRequested&&g==="readable"}function W1(f,g,A,F,V,Z,re){g._controlledReadableStream=f,g._queue=void 0,g._queueTotalSize=void 0,Wt(g),g._started=!1,g._closeRequested=!1,g._pullAgain=!1,g._pulling=!1,g._strategySizeAlgorithm=re,g._strategyHWM=Z,g._pullAlgorithm=F,g._cancelAlgorithm=V,f._readableStreamController=g;let ge=A();v(b(ge),()=>{g._started=!0,Ao(g)},Be=>{mn(g,Be)})}function Ap(f,g,A,F){let V=Object.create(Is.prototype),Z=()=>{},re=()=>b(void 0),ge=()=>b(void 0);g.start!==void 0&&(Z=()=>g.start(V)),g.pull!==void 0&&(re=()=>g.pull(V)),g.cancel!==void 0&&(ge=Be=>g.cancel(Be)),W1(f,V,Z,re,ge,A,F)}function Ya(f){return new TypeError(`ReadableStreamDefaultController.prototype.${f} can only be used on a ReadableStreamDefaultController`)}function Mp(f,g){return _i(f._readableStreamController)?lr(f):kp(f)}function kp(f,g){let A=Ut(f),F=!1,V=!1,Z=!1,re=!1,ge,Be,Ve,et,tt,Gt=m(cr=>{tt=cr});function di(){return F?(V=!0,b(void 0)):(F=!0,li(A,{_chunkSteps:Sr=>{I(()=>{V=!1;let Yr=Sr,Yi=Sr;Z||Ja(Ve._readableStreamController,Yr),re||Ja(et._readableStreamController,Yi),F=!1,V&&di()})},_closeSteps:()=>{F=!1,Z||Mo(Ve._readableStreamController),re||Mo(et._readableStreamController),(!Z||!re)&&tt(void 0)},_errorSteps:()=>{F=!1}}),b(void 0))}function Bs(cr){if(Z=!0,ge=cr,re){let Sr=Lt([ge,Be]),Yr=hi(f,Sr);tt(Yr)}return Gt}function Sn(cr){if(re=!0,Be=cr,Z){let Sr=Lt([ge,Be]),Yr=hi(f,Sr);tt(Yr)}return Gt}function Ji(){}return Ve=Ni(Ji,di,Bs),et=Ni(Ji,di,Sn),w(A._closedPromise,cr=>{mn(Ve._readableStreamController,cr),mn(et._readableStreamController,cr),(!Z||!re)&&tt(void 0)}),[Ve,et]}function lr(f){let g=Ut(f),A=!1,F=!1,V=!1,Z=!1,re=!1,ge,Be,Ve,et,tt,Gt=m(_e=>{tt=_e});function di(_e){w(_e._closedPromise,He=>{_e===g&&(Xr(Ve._readableStreamController,He),Xr(et._readableStreamController,He),(!Z||!re)&&tt(void 0))})}function Bs(){Jr(g)&&(te(g),g=Ut(f),di(g)),li(g,{_chunkSteps:He=>{I(()=>{F=!1,V=!1;let St=He,Ir=He;if(!Z&&!re)try{Ir=xs(He)}catch(Ds){Xr(Ve._readableStreamController,Ds),Xr(et._readableStreamController,Ds),tt(hi(f,Ds));return}Z||La(Ve._readableStreamController,St),re||La(et._readableStreamController,Ir),A=!1,F?Ji():V&&cr()})},_closeSteps:()=>{A=!1,Z||dn(Ve._readableStreamController),re||dn(et._readableStreamController),Ve._readableStreamController._pendingPullIntos.length>0&&_o(Ve._readableStreamController,0),et._readableStreamController._pendingPullIntos.length>0&&_o(et._readableStreamController,0),(!Z||!re)&&tt(void 0)},_errorSteps:()=>{A=!1}})}function Sn(_e,He){Ht(g)&&(te(g),g=Oa(f),di(g));let St=He?et:Ve,Ir=He?Ve:et;ar(g,_e,{_chunkSteps:qs=>{I(()=>{F=!1,V=!1;let zs=He?re:Z;if(He?Z:re)zs||Co(St._readableStreamController,qs);else{let af;try{af=xs(qs)}catch(Ul){Xr(St._readableStreamController,Ul),Xr(Ir._readableStreamController,Ul),tt(hi(f,Ul));return}zs||Co(St._readableStreamController,qs),La(Ir._readableStreamController,af)}A=!1,F?Ji():V&&cr()})},_closeSteps:qs=>{A=!1;let zs=He?re:Z,ou=He?Z:re;zs||dn(St._readableStreamController),ou||dn(Ir._readableStreamController),qs!==void 0&&(zs||Co(St._readableStreamController,qs),!ou&&Ir._readableStreamController._pendingPullIntos.length>0&&_o(Ir._readableStreamController,0)),(!zs||!ou)&&tt(void 0)},_errorSteps:()=>{A=!1}})}function Ji(){if(A)return F=!0,b(void 0);A=!0;let _e=Cl(Ve._readableStreamController);return _e===null?Bs():Sn(_e._view,!1),b(void 0)}function cr(){if(A)return V=!0,b(void 0);A=!0;let _e=Cl(et._readableStreamController);return _e===null?Bs():Sn(_e._view,!0),b(void 0)}function Sr(_e){if(Z=!0,ge=_e,re){let He=Lt([ge,Be]),St=hi(f,He);tt(St)}return Gt}function Yr(_e){if(re=!0,Be=_e,Z){let He=Lt([ge,Be]),St=hi(f,He);tt(St)}return Gt}function Yi(){}return Ve=K1(Yi,Ji,Sr),et=K1(Yi,cr,Yr),di(g),[Ve,et]}function ko(f,g){L(f,g);let A=f,F=A?.autoAllocateChunkSize,V=A?.cancel,Z=A?.pull,re=A?.start,ge=A?.type;return{autoAllocateChunkSize:F===void 0?void 0:Vr(F,`${g} has member 'autoAllocateChunkSize' that`),cancel:V===void 0?void 0:Io(V,A,`${g} has member 'cancel' that`),pull:Z===void 0?void 0:Po(Z,A,`${g} has member 'pull' that`),start:re===void 0?void 0:Lo(re,A,`${g} has member 'start' that`),type:ge===void 0?void 0:Ls(ge,`${g} has member 'type' that`)}}function Io(f,g,A){return k(f,A),F=>B(f,g,[F])}function Po(f,g,A){return k(f,A),F=>B(f,g,[F])}function Lo(f,g,A){return k(f,A),F=>q(f,g,[F])}function Ls(f,g){if(f=`${f}`,f!=="bytes")throw new TypeError(`${g} '${f}' is not a valid enumeration value for ReadableStreamType`);return f}function Os(f,g){L(f,g);let A=f?.mode;return{mode:A===void 0?void 0:Za(A,`${g} has member 'mode' that`)}}function Za(f,g){if(f=`${f}`,f!=="byob")throw new TypeError(`${g} '${f}' is not a valid enumeration value for ReadableStreamReaderMode`);return f}function Ip(f,g){L(f,g);let A=f?.preventCancel;return{preventCancel:Boolean(A)}}function G1(f,g){L(f,g);let A=f?.preventAbort,F=f?.preventCancel,V=f?.preventClose,Z=f?.signal;return Z!==void 0&&Pp(Z,`${g} has member 'signal' that`),{preventAbort:Boolean(A),preventCancel:Boolean(F),preventClose:Boolean(V),signal:Z}}function Pp(f,g){if(!ip(f))throw new TypeError(`${g} is not an AbortSignal.`)}function Lp(f,g){L(f,g);let A=f?.readable;bt(A,"readable","ReadableWritablePair"),Tt(A,`${g} has member 'readable' that`);let F=f?.writable;return bt(F,"writable","ReadableWritablePair"),qa(F,`${g} has member 'writable' that`),{readable:A,writable:F}}class yn{constructor(g={},A={}){g===void 0?g=null:G(g,"First parameter");let F=Da(A,"Second parameter"),V=ko(g,"First parameter");if(Fl(this),V.type==="bytes"){if(F.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");let Z=$i(F,0);C1(this,V,Z)}else{let Z=pn(F),re=$i(F,1);Ap(this,V,re,Z)}}get locked(){if(!gn(this))throw Kn("locked");return vn(this)}cancel(g=void 0){return gn(this)?vn(this)?S(new TypeError("Cannot cancel a stream that already has a reader")):hi(this,g):S(Kn("cancel"))}getReader(g=void 0){if(!gn(this))throw Kn("getReader");return Os(g,"First parameter").mode===void 0?Ut(this):Oa(this)}pipeThrough(g,A={}){if(!gn(this))throw Kn("pipeThrough");Le(g,1,"pipeThrough");let F=Lp(g,"First parameter"),V=G1(A,"Second parameter");if(vn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Ns(F.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");let Z=Gn(this,F.writable,V.preventClose,V.preventAbort,V.preventCancel,V.signal);return N(Z),F.readable}pipeTo(g,A={}){if(!gn(this))return S(Kn("pipeTo"));if(g===void 0)return S("Parameter 1 is required in 'pipeTo'.");if(!Ts(g))return S(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));let F;try{F=G1(A,"Second parameter")}catch(V){return S(V)}return vn(this)?S(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Ns(g)?S(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Gn(this,g,F.preventClose,F.preventAbort,F.preventCancel,F.signal)}tee(){if(!gn(this))throw Kn("tee");let g=Mp(this);return Lt(g)}values(g=void 0){if(!gn(this))throw Kn("values");let A=Ip(g,"First parameter");return Q(this,A.preventCancel)}}Object.defineProperties(yn.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(yn.prototype,e.toStringTag,{value:"ReadableStream",configurable:!0}),typeof e.asyncIterator=="symbol"&&Object.defineProperty(yn.prototype,e.asyncIterator,{value:yn.prototype.values,writable:!0,configurable:!0});function Ni(f,g,A,F=1,V=()=>1){let Z=Object.create(yn.prototype);Fl(Z);let re=Object.create(Is.prototype);return W1(Z,re,f,g,A,F,V),Z}function K1(f,g,A){let F=Object.create(yn.prototype);Fl(F);let V=Object.create(mt.prototype);return _1(F,V,f,g,A,0,void 0),F}function Fl(f){f._state="readable",f._reader=void 0,f._storedError=void 0,f._disturbed=!1}function gn(f){return!s(f)||!Object.prototype.hasOwnProperty.call(f,"_readableStreamController")?!1:f instanceof yn}function vn(f){return f._reader!==void 0}function hi(f,g){if(f._disturbed=!0,f._state==="closed")return b(void 0);if(f._state==="errored")return S(f._storedError);Oo(f);let A=f._reader;A!==void 0&&Jr(A)&&(A._readIntoRequests.forEach(V=>{V._closeSteps(void 0)}),A._readIntoRequests=new D);let F=f._readableStreamController[Kr](g);return x(F,r)}function Oo(f){f._state="closed";let g=f._reader;g!==void 0&&(vr(g),Ht(g)&&(g._readRequests.forEach(A=>{A._closeSteps()}),g._readRequests=new D))}function V1(f,g){f._state="errored",f._storedError=g;let A=f._reader;A!==void 0&&(Pe(A,g),Ht(A)?(A._readRequests.forEach(F=>{F._errorSteps(g)}),A._readRequests=new D):(A._readIntoRequests.forEach(F=>{F._errorSteps(g)}),A._readIntoRequests=new D))}function Kn(f){return new TypeError(`ReadableStream.prototype.${f} can only be used on a ReadableStream`)}function $1(f,g){L(f,g);let A=f?.highWaterMark;return bt(A,"highWaterMark","QueuingStrategyInit"),{highWaterMark:Et(A)}}let X1=f=>f.byteLength;Object.defineProperty(X1,"name",{value:"size",configurable:!0});class Qa{constructor(g){Le(g,1,"ByteLengthQueuingStrategy"),g=$1(g,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=g.highWaterMark}get highWaterMark(){if(!Y1(this))throw J1("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!Y1(this))throw J1("size");return X1}}Object.defineProperties(Qa.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Qa.prototype,e.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function J1(f){return new TypeError(`ByteLengthQueuingStrategy.prototype.${f} can only be used on a ByteLengthQueuingStrategy`)}function Y1(f){return!s(f)||!Object.prototype.hasOwnProperty.call(f,"_byteLengthQueuingStrategyHighWaterMark")?!1:f instanceof Qa}let Z1=()=>1;Object.defineProperty(Z1,"name",{value:"size",configurable:!0});class eu{constructor(g){Le(g,1,"CountQueuingStrategy"),g=$1(g,"First parameter"),this._countQueuingStrategyHighWaterMark=g.highWaterMark}get highWaterMark(){if(!ef(this))throw Q1("highWaterMark");return this._countQueuingStrategyHighWaterMark}get size(){if(!ef(this))throw Q1("size");return Z1}}Object.defineProperties(eu.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(eu.prototype,e.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Q1(f){return new TypeError(`CountQueuingStrategy.prototype.${f} can only be used on a CountQueuingStrategy`)}function ef(f){return!s(f)||!Object.prototype.hasOwnProperty.call(f,"_countQueuingStrategyHighWaterMark")?!1:f instanceof eu}function bn(f,g){L(f,g);let A=f?.flush,F=f?.readableType,V=f?.start,Z=f?.transform,re=f?.writableType;return{flush:A===void 0?void 0:Op(A,f,`${g} has member 'flush' that`),readableType:F,start:V===void 0?void 0:Bp(V,f,`${g} has member 'start' that`),transform:Z===void 0?void 0:Dp(Z,f,`${g} has member 'transform' that`),writableType:re}}function Op(f,g,A){return k(f,A),F=>B(f,g,[F])}function Bp(f,g,A){return k(f,A),F=>q(f,g,[F])}function Dp(f,g,A){return k(f,A),(F,V)=>B(f,g,[F,V])}class tu{constructor(g={},A={},F={}){g===void 0&&(g=null);let V=Da(A,"Second parameter"),Z=Da(F,"Third parameter"),re=bn(g,"First parameter");if(re.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(re.writableType!==void 0)throw new RangeError("Invalid writableType specified");let ge=$i(Z,0),Be=pn(Z),Ve=$i(V,1),et=pn(V),tt,Gt=m(di=>{tt=di});qp(this,Gt,Ve,et,ge,Be),Fp(this,re),re.start!==void 0?tt(re.start(this._transformStreamController)):tt(void 0)}get readable(){if(!tf(this))throw of("readable");return this._readable}get writable(){if(!tf(this))throw of("writable");return this._writable}}Object.defineProperties(tu.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(tu.prototype,e.toStringTag,{value:"TransformStream",configurable:!0});function qp(f,g,A,F,V,Z){function re(){return g}function ge(Gt){return Hp(f,Gt)}function Be(Gt){return Wp(f,Gt)}function Ve(){return Gp(f)}f._writable=M1(re,ge,Ve,Be,A,F);function et(){return Kp(f)}function tt(Gt){return iu(f,Gt),b(void 0)}f._readable=Ni(re,et,tt,V,Z),f._backpressure=void 0,f._backpressureChangePromise=void 0,f._backpressureChangePromise_resolve=void 0,nu(f,!0),f._transformStreamController=void 0}function tf(f){return!s(f)||!Object.prototype.hasOwnProperty.call(f,"_transformStreamController")?!1:f instanceof tu}function ru(f,g){mn(f._readable._readableStreamController,g),iu(f,g)}function iu(f,g){rf(f._transformStreamController),Ll(f._writable._writableStreamController,g),f._backpressure&&nu(f,!1)}function nu(f,g){f._backpressureChangePromise!==void 0&&f._backpressureChangePromise_resolve(),f._backpressureChangePromise=m(A=>{f._backpressureChangePromise_resolve=A}),f._backpressure=g}class Bo{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!su(this))throw Do("desiredSize");let g=this._controlledTransformStream._readable._readableStreamController;return zl(g)}enqueue(g=void 0){if(!su(this))throw Do("enqueue");nf(this,g)}error(g=void 0){if(!su(this))throw Do("error");Up(this,g)}terminate(){if(!su(this))throw Do("terminate");jp(this)}}Object.defineProperties(Bo.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof e.toStringTag=="symbol"&&Object.defineProperty(Bo.prototype,e.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function su(f){return!s(f)||!Object.prototype.hasOwnProperty.call(f,"_controlledTransformStream")?!1:f instanceof Bo}function zp(f,g,A,F){g._controlledTransformStream=f,f._transformStreamController=g,g._transformAlgorithm=A,g._flushAlgorithm=F}function Fp(f,g){let A=Object.create(Bo.prototype),F=Z=>{try{return nf(A,Z),b(void 0)}catch(re){return S(re)}},V=()=>b(void 0);g.transform!==void 0&&(F=Z=>g.transform(Z,A)),g.flush!==void 0&&(V=()=>g.flush(A)),zp(f,A,F,V)}function rf(f){f._transformAlgorithm=void 0,f._flushAlgorithm=void 0}function nf(f,g){let A=f._controlledTransformStream,F=A._readable._readableStreamController;if(!Ps(F))throw new TypeError("Readable side is not in a state that permits enqueue");try{Ja(F,g)}catch(Z){throw iu(A,Z),A._readable._storedError}Np(F)!==A._backpressure&&nu(A,!0)}function Up(f,g){ru(f._controlledTransformStream,g)}function sf(f,g){let A=f._transformAlgorithm(g);return x(A,void 0,F=>{throw ru(f._controlledTransformStream,F),F})}function jp(f){let g=f._controlledTransformStream,A=g._readable._readableStreamController;Mo(A);let F=new TypeError("TransformStream terminated");iu(g,F)}function Hp(f,g){let A=f._transformStreamController;if(f._backpressure){let F=f._backpressureChangePromise;return x(F,()=>{let V=f._writable;if(V._state==="erroring")throw V._storedError;return sf(A,g)})}return sf(A,g)}function Wp(f,g){return ru(f,g),b(void 0)}function Gp(f){let g=f._readable,A=f._transformStreamController,F=A._flushAlgorithm();return rf(A),x(F,()=>{if(g._state==="errored")throw g._storedError;Mo(g._readableStreamController)},V=>{throw ru(f,V),g._storedError})}function Kp(f){return nu(f,!1),f._backpressureChangePromise}function Do(f){return new TypeError(`TransformStreamDefaultController.prototype.${f} can only be used on a TransformStreamDefaultController`)}function of(f){return new TypeError(`TransformStream.prototype.${f} can only be used on a TransformStream`)}t.ByteLengthQueuingStrategy=Qa,t.CountQueuingStrategy=eu,t.ReadableByteStreamController=mt,t.ReadableStream=yn,t.ReadableStreamBYOBReader=Cs,t.ReadableStreamBYOBRequest=fn,t.ReadableStreamDefaultController=Is,t.ReadableStreamDefaultReader=fe,t.TransformStream=tu,t.TransformStreamDefaultController=Bo,t.WritableStream=Rs,t.WritableStreamDefaultController=Ms,t.WritableStreamDefaultWriter=As,Object.defineProperty(t,"__esModule",{value:!0})})});var I3=U(()=>{if(!globalThis.ReadableStream)try{let t=require("process"),{emitWarning:e}=t;try{t.emitWarning=()=>{},Object.assign(globalThis,require("stream/web")),t.emitWarning=e}catch(r){throw t.emitWarning=e,r}}catch{Object.assign(globalThis,k3())}try{let{Blob:t}=require("buffer");t&&!t.prototype.stream&&(t.prototype.stream=function(r){let i=0,n=this;return new ReadableStream({type:"bytes",async pull(s){let u=await n.slice(i,Math.min(n.size,i+65536)).arrayBuffer();i+=u.byteLength,s.enqueue(new Uint8Array(u)),i===n.size&&s.close()}})})}catch{}});async function*Gy(t,e=!0){for(let r of t)if("stream"in r)yield*r.stream();else if(ArrayBuffer.isView(r))if(e){let i=r.byteOffset,n=r.byteOffset+r.byteLength;for(;i!==n;){let s=Math.min(n-i,P3),o=r.buffer.slice(i,i+s);i+=o.byteLength,yield new Uint8Array(o)}}else yield r;else{let i=0,n=r;for(;i!==n.size;){let o=await n.slice(i,Math.min(n.size,i+P3)).arrayBuffer();i+=o.byteLength,yield new Uint8Array(o)}}}var v$,P3,cs,$c,Lu,qh,Ou,L3,JO,fs,Xc=Gl(()=>{v$=ze(I3(),1);P3=65536;L3=(Ou=class{constructor(e=[],r={}){fr(this,cs,[]);fr(this,$c,"");fr(this,Lu,0);fr(this,qh,"transparent");if(typeof e!="object"||e===null)throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.");if(typeof e[Symbol.iterator]!="function")throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.");if(typeof r!="object"&&typeof r!="function")throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.");r===null&&(r={});let i=new TextEncoder;for(let s of e){let o;ArrayBuffer.isView(s)?o=new Uint8Array(s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)):s instanceof ArrayBuffer?o=new Uint8Array(s.slice(0)):s instanceof Ou?o=s:o=i.encode(`${s}`),kt(this,Lu,Ye(this,Lu)+(ArrayBuffer.isView(o)?o.byteLength:o.size)),Ye(this,cs).push(o)}kt(this,qh,`${r.endings===void 0?"transparent":r.endings}`);let n=r.type===void 0?"":String(r.type);kt(this,$c,/^[\x20-\x7E]*$/.test(n)?n:"")}get size(){return Ye(this,Lu)}get type(){return Ye(this,$c)}async text(){let e=new TextDecoder,r="";for await(let i of Gy(Ye(this,cs),!1))r+=e.decode(i,{stream:!0});return r+=e.decode(),r}async arrayBuffer(){let e=new Uint8Array(this.size),r=0;for await(let i of Gy(Ye(this,cs),!1))e.set(i,r),r+=i.length;return e.buffer}stream(){let e=Gy(Ye(this,cs),!0);return new globalThis.ReadableStream({type:"bytes",async pull(r){let i=await e.next();i.done?r.close():r.enqueue(i.value)},async cancel(){await e.return()}})}slice(e=0,r=this.size,i=""){let{size:n}=this,s=e<0?Math.max(n+e,0):Math.min(e,n),o=r<0?Math.max(n+r,0):Math.min(r,n),u=Math.max(o-s,0),l=Ye(this,cs),d=[],h=0;for(let b of l){if(h>=u)break;let S=ArrayBuffer.isView(b)?b.byteLength:b.size;if(s&&S<=s)s-=S,o-=S;else{let y;ArrayBuffer.isView(b)?(y=b.subarray(s,Math.min(S,o)),h+=y.byteLength):(y=b.slice(s,Math.min(S,o)),h+=y.size),o-=S,d.push(y),s=0}}let m=new Ou([],{type:String(i).toLowerCase()});return kt(m,Lu,u),kt(m,cs,d),m}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](e){return e&&typeof e=="object"&&typeof e.constructor=="function"&&(typeof e.stream=="function"||typeof e.arrayBuffer=="function")&&/^(Blob|File)$/.test(e[Symbol.toStringTag])}},cs=new WeakMap,$c=new WeakMap,Lu=new WeakMap,qh=new WeakMap,Ou);Object.defineProperties(L3.prototype,{size:{enumerable:!0},type:{enumerable:!0},slice:{enumerable:!0}});JO=L3,fs=JO});var Jc,Yc,O3,YO,ZO,Bu,Ky=Gl(()=>{Xc();YO=(O3=class extends fs{constructor(r,i,n={}){if(arguments.length<2)throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`);super(r,n);fr(this,Jc,0);fr(this,Yc,"");n===null&&(n={});let s=n.lastModified===void 0?Date.now():Number(n.lastModified);Number.isNaN(s)||kt(this,Jc,s),kt(this,Yc,String(i))}get name(){return Ye(this,Yc)}get lastModified(){return Ye(this,Jc)}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](r){return!!r&&r instanceof fs&&/^(File)$/.test(r[Symbol.toStringTag])}},Jc=new WeakMap,Yc=new WeakMap,O3),ZO=YO,Bu=ZO});function z3(t,e=fs){var r=`${B3()}${B3()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),i=[],n=`--${r}\r
|
|
125
|
-
Content-Disposition: form-data; name="`;return t.forEach((s,o)=>typeof s=="string"?i.push(n+Vy(o)+`"\r
|
|
126
|
-
\r
|
|
127
|
-
${s.replace(/\r(?!\n)|(?<!\r)\n/g,`\r
|
|
128
|
-
`)}\r
|
|
129
|
-
`):i.push(n+Vy(o)+`"; filename="${Vy(s.name,1)}"\r
|
|
130
|
-
Content-Type: ${s.type||"application/octet-stream"}\r
|
|
131
|
-
\r
|
|
132
|
-
`,s,`\r
|
|
133
|
-
`)),i.push(`--${r}--`),new e(i,{type:"multipart/form-data; boundary="+r})}var Zc,QO,eB,B3,tB,D3,Vy,ha,Di,q3,da,zh=Gl(()=>{Xc();Ky();({toStringTag:Zc,iterator:QO,hasInstance:eB}=Symbol),B3=Math.random,tB="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),D3=(t,e,r)=>(t+="",/^(Blob|File)$/.test(e&&e[Zc])?[(r=r!==void 0?r+"":e[Zc]=="File"?e.name:"blob",t),e.name!==r||e[Zc]=="blob"?new Bu([e],r,e):e]:[t,e+""]),Vy=(t,e)=>(e?t:t.replace(/\r?\n|\r/g,`\r
|
|
134
|
-
`)).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),ha=(t,e,r)=>{if(e.length<r)throw new TypeError(`Failed to execute '${t}' on 'FormData': ${r} arguments required, but only ${e.length} present.`)},da=(q3=class{constructor(...e){fr(this,Di,[]);if(e.length)throw new TypeError("Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.")}get[Zc](){return"FormData"}[QO](){return this.entries()}static[eB](e){return e&&typeof e=="object"&&e[Zc]==="FormData"&&!tB.some(r=>typeof e[r]!="function")}append(...e){ha("append",arguments,2),Ye(this,Di).push(D3(...e))}delete(e){ha("delete",arguments,1),e+="",kt(this,Di,Ye(this,Di).filter(([r])=>r!==e))}get(e){ha("get",arguments,1),e+="";for(var r=Ye(this,Di),i=r.length,n=0;n<i;n++)if(r[n][0]===e)return r[n][1];return null}getAll(e,r){return ha("getAll",arguments,1),r=[],e+="",Ye(this,Di).forEach(i=>i[0]===e&&r.push(i[1])),r}has(e){return ha("has",arguments,1),e+="",Ye(this,Di).some(r=>r[0]===e)}forEach(e,r){ha("forEach",arguments,1);for(var[i,n]of this)e.call(r,n,i,this)}set(...e){ha("set",arguments,2);var r=[],i=!0;e=D3(...e),Ye(this,Di).forEach(n=>{n[0]===e[0]?i&&(i=!r.push(e)):r.push(n)}),i&&r.push(e),kt(this,Di,r)}*entries(){yield*Ye(this,Di)}*keys(){for(var[e]of this)yield e}*values(){for(var[,e]of this)yield e}},Di=new WeakMap,q3)});var H3=U((k$,j3)=>{if(!globalThis.DOMException)try{let{MessageChannel:t}=require("worker_threads"),e=new t().port1,r=new ArrayBuffer;e.postMessage(r,[r,r])}catch(t){t.constructor.name==="DOMException"&&(globalThis.DOMException=t.constructor)}j3.exports=globalThis.DOMException});var e1,G3,rB,pa,ma,Xy,W3,Jy=Gl(()=>{e1=require("fs"),G3=ze(H3(),1);Ky();Xc();({stat:rB}=e1.promises),Xy=class{constructor(e){fr(this,pa,void 0);fr(this,ma,void 0);kt(this,pa,e.path),kt(this,ma,e.start),this.size=e.size,this.lastModified=e.lastModified}slice(e,r){return new Xy({path:Ye(this,pa),lastModified:this.lastModified,size:r-e,start:Ye(this,ma)+e})}async*stream(){let{mtimeMs:e}=await rB(Ye(this,pa));if(e>this.lastModified)throw new G3.default("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError");yield*(0,e1.createReadStream)(Ye(this,pa),{start:Ye(this,ma),end:Ye(this,ma)+this.size-1})}get[Symbol.toStringTag](){return"Blob"}},W3=Xy;pa=new WeakMap,ma=new WeakMap});var V3={};N2(V3,{toFormData:()=>lB});function uB(t){let e=t.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!e)return;let r=e[2]||e[3]||"",i=r.slice(r.lastIndexOf("\\")+1);return i=i.replace(/%22/g,'"'),i=i.replace(/&#(\d{4});/g,(n,s)=>String.fromCharCode(s)),i}async function lB(t,e){if(!/multipart/i.test(e))throw new TypeError("Failed to fetch");let r=e.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!r)throw new TypeError("no or bad content-type header, no multipart boundary");let i=new Yy(r[1]||r[2]),n,s,o,u,l,d,h=[],m=new da,b=w=>{o+=C.decode(w,{stream:!0})},S=w=>{h.push(w)},y=()=>{let w=new Bu(h,d,{type:l});m.append(u,w)},v=()=>{m.append(u,o)},C=new TextDecoder("utf-8");C.decode(),i.onPartBegin=function(){i.onPartData=b,i.onPartEnd=v,n="",s="",o="",u="",l="",d=null,h.length=0},i.onHeaderField=function(w){n+=C.decode(w,{stream:!0})},i.onHeaderValue=function(w){s+=C.decode(w,{stream:!0})},i.onHeaderEnd=function(){if(s+=C.decode(),n=n.toLowerCase(),n==="content-disposition"){let w=s.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);w&&(u=w[2]||w[3]||""),d=uB(s),d&&(i.onPartData=S,i.onPartEnd=y)}else n==="content-type"&&(l=s);s="",n=""};for await(let w of t)i.write(w);return i.end(),m}var kn,_t,K3,uo,Uh,jh,iB,t1,nB,sB,oB,aB,ya,Yy,$3=Gl(()=>{Jy();zh();kn=0,_t={START_BOUNDARY:kn++,HEADER_FIELD_START:kn++,HEADER_FIELD:kn++,HEADER_VALUE_START:kn++,HEADER_VALUE:kn++,HEADER_VALUE_ALMOST_DONE:kn++,HEADERS_ALMOST_DONE:kn++,PART_DATA_START:kn++,PART_DATA:kn++,END:kn++},K3=1,uo={PART_BOUNDARY:K3,LAST_BOUNDARY:K3*=2},Uh=10,jh=13,iB=32,t1=45,nB=58,sB=97,oB=122,aB=t=>t|32,ya=()=>{},Yy=class{constructor(e){this.index=0,this.flags=0,this.onHeaderEnd=ya,this.onHeaderField=ya,this.onHeadersEnd=ya,this.onHeaderValue=ya,this.onPartBegin=ya,this.onPartData=ya,this.onPartEnd=ya,this.boundaryChars={},e=`\r
|
|
135
|
-
--`+e;let r=new Uint8Array(e.length);for(let i=0;i<e.length;i++)r[i]=e.charCodeAt(i),this.boundaryChars[r[i]]=!0;this.boundary=r,this.lookbehind=new Uint8Array(this.boundary.length+8),this.state=_t.START_BOUNDARY}write(e){let r=0,i=e.length,n=this.index,{lookbehind:s,boundary:o,boundaryChars:u,index:l,state:d,flags:h}=this,m=this.boundary.length,b=m-1,S=e.length,y,v,C=I=>{this[I+"Mark"]=r},w=I=>{delete this[I+"Mark"]},x=(I,q,B,z)=>{(q===void 0||q!==B)&&this[I](z&&z.subarray(q,B))},N=(I,q)=>{let B=I+"Mark";B in this&&(q?(x(I,this[B],r,e),delete this[B]):(x(I,this[B],e.length,e),this[B]=0))};for(r=0;r<i;r++)switch(y=e[r],d){case _t.START_BOUNDARY:if(l===o.length-2){if(y===t1)h|=uo.LAST_BOUNDARY;else if(y!==jh)return;l++;break}else if(l-1===o.length-2){if(h&uo.LAST_BOUNDARY&&y===t1)d=_t.END,h=0;else if(!(h&uo.LAST_BOUNDARY)&&y===Uh)l=0,x("onPartBegin"),d=_t.HEADER_FIELD_START;else return;break}y!==o[l+2]&&(l=-2),y===o[l+2]&&l++;break;case _t.HEADER_FIELD_START:d=_t.HEADER_FIELD,C("onHeaderField"),l=0;case _t.HEADER_FIELD:if(y===jh){w("onHeaderField"),d=_t.HEADERS_ALMOST_DONE;break}if(l++,y===t1)break;if(y===nB){if(l===1)return;N("onHeaderField",!0),d=_t.HEADER_VALUE_START;break}if(v=aB(y),v<sB||v>oB)return;break;case _t.HEADER_VALUE_START:if(y===iB)break;C("onHeaderValue"),d=_t.HEADER_VALUE;case _t.HEADER_VALUE:y===jh&&(N("onHeaderValue",!0),x("onHeaderEnd"),d=_t.HEADER_VALUE_ALMOST_DONE);break;case _t.HEADER_VALUE_ALMOST_DONE:if(y!==Uh)return;d=_t.HEADER_FIELD_START;break;case _t.HEADERS_ALMOST_DONE:if(y!==Uh)return;x("onHeadersEnd"),d=_t.PART_DATA_START;break;case _t.PART_DATA_START:d=_t.PART_DATA,C("onPartData");case _t.PART_DATA:if(n=l,l===0){for(r+=b;r<S&&!(e[r]in u);)r+=m;r-=b,y=e[r]}if(l<o.length)o[l]===y?(l===0&&N("onPartData",!0),l++):l=0;else if(l===o.length)l++,y===jh?h|=uo.PART_BOUNDARY:y===t1?h|=uo.LAST_BOUNDARY:l=0;else if(l-1===o.length)if(h&uo.PART_BOUNDARY){if(l=0,y===Uh){h&=~uo.PART_BOUNDARY,x("onPartEnd"),x("onPartBegin"),d=_t.HEADER_FIELD_START;break}}else h&uo.LAST_BOUNDARY&&y===t1?(x("onPartEnd"),d=_t.END,h=0):l=0;if(l>0)s[l-1]=y;else if(n>0){let I=new Uint8Array(s.buffer,s.byteOffset,s.byteLength);x("onPartData",0,n,I),n=0,C("onPartData"),r--}break;case _t.END:break;default:throw new Error(`Unexpected state entered: ${d}`)}N("onHeaderField"),N("onHeaderValue"),N("onPartData"),this.index=l,this.state=d,this.flags=h}end(){if(this.state===_t.HEADER_FIELD_START&&this.index===0||this.state===_t.PART_DATA&&this.index===this.boundary.length)this.onPartEnd();else if(this.state!==_t.END)throw new Error("MultipartParser.end(): stream ended unexpectedly")}}});var Px=U((ZY,Ix)=>{var Ft=me(),kx=th(),md={isArnInParam:function(e,r){var i=(e.service.api.operations[e.operation]||{}).input||{},n=i.members||{};return!e.params[r]||!n[r]?!1:Ft.util.ARN.validate(e.params[r])},validateArnService:function(e){var r=e._parsedArn;if(r.service!=="s3"&&r.service!=="s3-outposts"&&r.service!=="s3-object-lambda")throw Ft.util.error(new Error,{code:"InvalidARN",message:"expect 's3' or 's3-outposts' or 's3-object-lambda' in ARN service component"})},validateArnAccount:function(e){var r=e._parsedArn;if(!/[0-9]{12}/.exec(r.accountId))throw Ft.util.error(new Error,{code:"InvalidARN",message:'ARN accountID does not match regex "[0-9]{12}"'})},validateS3AccessPointArn:function(e){var r=e._parsedArn,i=r.resource[11];if(r.resource.split(i).length!==2)throw Ft.util.error(new Error,{code:"InvalidARN",message:"Access Point ARN should have one resource accesspoint/{accesspointName}"});var n=r.resource.split(i)[1],s=n+"-"+r.accountId;if(!md.dnsCompatibleBucketName(s)||s.match(/\./))throw Ft.util.error(new Error,{code:"InvalidARN",message:"Access point resource in ARN is not DNS compatible. Got "+n});e._parsedArn.accessPoint=n},validateOutpostsArn:function(e){var r=e._parsedArn;if(r.resource.indexOf("outpost:")!==0&&r.resource.indexOf("outpost/")!==0)throw Ft.util.error(new Error,{code:"InvalidARN",message:"ARN resource should begin with 'outpost/'"});var i=r.resource[7],n=r.resource.split(i)[1],s=new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);if(!s.test(n))throw Ft.util.error(new Error,{code:"InvalidARN",message:"Outpost resource in ARN is not DNS compatible. Got "+n});e._parsedArn.outpostId=n},validateOutpostsAccessPointArn:function(e){var r=e._parsedArn,i=r.resource[7];if(r.resource.split(i).length!==4)throw Ft.util.error(new Error,{code:"InvalidARN",message:"Outposts ARN should have two resources outpost/{outpostId}/accesspoint/{accesspointName}"});var n=r.resource.split(i)[3],s=n+"-"+r.accountId;if(!md.dnsCompatibleBucketName(s)||s.match(/\./))throw Ft.util.error(new Error,{code:"InvalidARN",message:"Access point resource in ARN is not DNS compatible. Got "+n});e._parsedArn.accessPoint=n},validateArnRegion:function(e){var r=md.loadUseArnRegionConfig(e),i=e._parsedArn.region,n=e.service.config.region;if(!i)throw Ft.util.error(new Error,{code:"InvalidARN",message:"ARN region is empty"});if(n.indexOf("fips")>=0||i.indexOf("fips")>=0)throw Ft.util.error(new Error,{code:"InvalidConfiguration",message:"ARN endpoint is not compatible with FIPS region"});if(!r&&i!==n)throw Ft.util.error(new Error,{code:"InvalidConfiguration",message:"Configured region conflicts with access point region"});if(r&&kx.getEndpointSuffix(i)!==kx.getEndpointSuffix(n))throw Ft.util.error(new Error,{code:"InvalidConfiguration",message:"Configured region and access point region not in same partition"});if(e.service.config.useAccelerateEndpoint)throw Ft.util.error(new Error,{code:"InvalidConfiguration",message:"useAccelerateEndpoint config is not supported with access point ARN"});if(e._parsedArn.service==="s3-outposts"&&e.service.config.useDualstack)throw Ft.util.error(new Error,{code:"InvalidConfiguration",message:"useDualstack config is not supported with outposts access point ARN"})},loadUseArnRegionConfig:function(e){var r="AWS_S3_USE_ARN_REGION",i="s3_use_arn_region",n=!0,s=e.service._originalConfig||{};if(e.service.config.s3UseArnRegion!==void 0)return e.service.config.s3UseArnRegion;if(s.s3UseArnRegion!==void 0)n=s.s3UseArnRegion===!0;else if(Ft.util.isNode())if(process.env[r]){var o=process.env[r].trim().toLowerCase();if(["false","true"].indexOf(o)<0)throw Ft.util.error(new Error,{code:"InvalidConfiguration",message:r+" only accepts true or false. Got "+process.env[r],retryable:!1});n=o==="true"}else{var u={},l={};try{u=Ft.util.getProfilesFromSharedConfig(Ft.util.iniLoader),l=u[process.env.AWS_PROFILE||Ft.util.defaultProfile]}catch{}if(l[i]){if(["false","true"].indexOf(l[i].trim().toLowerCase())<0)throw Ft.util.error(new Error,{code:"InvalidConfiguration",message:i+" only accepts true or false. Got "+l[i],retryable:!1});n=l[i].trim().toLowerCase()==="true"}}return e.service.config.s3UseArnRegion=n,n},validatePopulateUriFromArn:function(e){if(e.service._originalConfig&&e.service._originalConfig.endpoint)throw Ft.util.error(new Error,{code:"InvalidConfiguration",message:"Custom endpoint is not compatible with access point ARN"});if(e.service.config.s3ForcePathStyle)throw Ft.util.error(new Error,{code:"InvalidConfiguration",message:"Cannot construct path-style endpoint with access point"})},dnsCompatibleBucketName:function(e){var r=e,i=new RegExp(/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/),n=new RegExp(/(\d+\.){3}\d+/),s=new RegExp(/\.\./);return!!(r.match(i)&&!r.match(n)&&!r.match(s))}};Ix.exports=md});var Bx=U((QY,Ox)=>{var vt=me(),hg=vt.util.string.byteLength,Lx=vt.util.Buffer;vt.S3.ManagedUpload=vt.util.inherit({constructor:function(e){var r=this;vt.SequentialExecutor.call(r),r.body=null,r.sliceFn=null,r.callback=null,r.parts={},r.completeInfo=[],r.fillQueue=function(){r.callback(new Error("Unsupported body payload "+typeof r.body))},r.configure(e)},configure:function(e){if(e=e||{},this.partSize=this.minPartSize,e.queueSize&&(this.queueSize=e.queueSize),e.partSize&&(this.partSize=e.partSize),e.leavePartsOnError&&(this.leavePartsOnError=!0),e.tags){if(!Array.isArray(e.tags))throw new Error("Tags must be specified as an array; "+typeof e.tags+" provided.");this.tags=e.tags}if(this.partSize<this.minPartSize)throw new Error("partSize must be greater than "+this.minPartSize);this.service=e.service,this.bindServiceObject(e.params),this.validateBody(),this.adjustTotalBytes()},leavePartsOnError:!1,queueSize:4,partSize:null,minPartSize:1024*1024*5,maxTotalParts:1e4,send:function(t){var e=this;e.failed=!1,e.callback=t||function(n){if(n)throw n};var r=!0;if(e.sliceFn)e.fillQueue=e.fillBuffer;else if(vt.util.isNode()){var i=vt.util.stream.Stream;e.body instanceof i&&(r=!1,e.fillQueue=e.fillStream,e.partBuffers=[],e.body.on("error",function(n){e.cleanup(n)}).on("readable",function(){e.fillQueue()}).on("end",function(){e.isDoneChunking=!0,e.numParts=e.totalPartNumbers,e.fillQueue.call(e),e.isDoneChunking&&e.totalPartNumbers>=1&&e.doneParts===e.numParts&&e.finishMultiPart()}))}r&&e.fillQueue.call(e)},abort:function(){var t=this;t.isDoneChunking===!0&&t.totalPartNumbers===1&&t.singlePart?t.singlePart.abort():t.cleanup(vt.util.error(new Error("Request aborted by user"),{code:"RequestAbortedError",retryable:!1}))},validateBody:function(){var e=this;if(e.body=e.service.config.params.Body,typeof e.body=="string")e.body=vt.util.buffer.toBuffer(e.body);else if(!e.body)throw new Error("params.Body is required");e.sliceFn=vt.util.arraySliceFn(e.body)},bindServiceObject:function(e){e=e||{};var r=this;if(!r.service)r.service=new vt.S3({params:e});else{var i=r.service,n=vt.util.copy(i.config);n.signatureVersion=i.getSignatureVersion(),r.service=new i.constructor.__super__(n),r.service.config.params=vt.util.merge(r.service.config.params||{},e),Object.defineProperty(r.service,"_originalConfig",{get:function(){return i._originalConfig},enumerable:!1,configurable:!0})}},adjustTotalBytes:function(){var e=this;try{e.totalBytes=hg(e.body)}catch{}if(e.totalBytes){var r=Math.ceil(e.totalBytes/e.maxTotalParts);r>e.partSize&&(e.partSize=r)}else e.totalBytes=void 0},isDoneChunking:!1,partPos:0,totalChunkedBytes:0,totalUploadedBytes:0,totalBytes:void 0,numParts:0,totalPartNumbers:0,activeParts:0,doneParts:0,parts:null,completeInfo:null,failed:!1,multipartReq:null,partBuffers:null,partBufferLength:0,fillBuffer:function(){var e=this,r=hg(e.body);if(r===0){e.isDoneChunking=!0,e.numParts=1,e.nextChunk(e.body);return}for(;e.activeParts<e.queueSize&&e.partPos<r;){var i=Math.min(e.partPos+e.partSize,r),n=e.sliceFn.call(e.body,e.partPos,i);e.partPos+=e.partSize,(hg(n)<e.partSize||e.partPos===r)&&(e.isDoneChunking=!0,e.numParts=e.totalPartNumbers+1),e.nextChunk(n)}},fillStream:function(){var e=this;if(!(e.activeParts>=e.queueSize)){var r=e.body.read(e.partSize-e.partBufferLength)||e.body.read();if(r&&(e.partBuffers.push(r),e.partBufferLength+=r.length,e.totalChunkedBytes+=r.length),e.partBufferLength>=e.partSize){var i=e.partBuffers.length===1?e.partBuffers[0]:Lx.concat(e.partBuffers);if(e.partBuffers=[],e.partBufferLength=0,i.length>e.partSize){var n=i.slice(e.partSize);e.partBuffers.push(n),e.partBufferLength+=n.length,i=i.slice(0,e.partSize)}e.nextChunk(i)}e.isDoneChunking&&!e.isDoneSending&&(i=e.partBuffers.length===1?e.partBuffers[0]:Lx.concat(e.partBuffers),e.partBuffers=[],e.partBufferLength=0,e.totalBytes=e.totalChunkedBytes,e.isDoneSending=!0,(e.numParts===0||i.length>0)&&(e.numParts++,e.nextChunk(i))),e.body.read(0)}},nextChunk:function(e){var r=this;if(r.failed)return null;var i=++r.totalPartNumbers;if(r.isDoneChunking&&i===1){var n={Body:e};this.tags&&(n.Tagging=this.getTaggingHeader());var s=r.service.putObject(n);return s._managedUpload=r,s.on("httpUploadProgress",r.progress).send(r.finishSinglePart),r.singlePart=s,null}else if(r.service.config.params.ContentMD5){var o=vt.util.error(new Error("The Content-MD5 you specified is invalid for multi-part uploads."),{code:"InvalidDigest",retryable:!1});return r.cleanup(o),null}if(r.completeInfo[i]&&r.completeInfo[i].ETag!==null)return null;r.activeParts++,r.service.config.params.UploadId?r.uploadPart(e,i):r.multipartReq?r.queueChunks(e,i):(r.multipartReq=r.service.createMultipartUpload(),r.multipartReq.on("success",function(u){r.service.config.params.UploadId=u.data.UploadId,r.multipartReq=null}),r.queueChunks(e,i),r.multipartReq.on("error",function(u){r.cleanup(u)}),r.multipartReq.send())},getTaggingHeader:function(){for(var e=[],r=0;r<this.tags.length;r++)e.push(vt.util.uriEscape(this.tags[r].Key)+"="+vt.util.uriEscape(this.tags[r].Value));return e.join("&")},uploadPart:function(e,r){var i=this,n={Body:e,ContentLength:vt.util.string.byteLength(e),PartNumber:r},s={ETag:null,PartNumber:r};i.completeInfo[r]=s;var o=i.service.uploadPart(n);i.parts[r]=o,o._lastUploadedBytes=0,o._managedUpload=i,o.on("httpUploadProgress",i.progress),o.send(function(u,l){if(delete i.parts[n.PartNumber],i.activeParts--,!u&&(!l||!l.ETag)){var d="No access to ETag property on response.";vt.util.isBrowser()&&(d+=" Check CORS configuration to expose ETag header."),u=vt.util.error(new Error(d),{code:"ETagMissing",retryable:!1})}if(u)return i.cleanup(u);if(i.completeInfo[r]&&i.completeInfo[r].ETag!==null)return null;s.ETag=l.ETag,i.doneParts++,i.isDoneChunking&&i.doneParts===i.numParts?i.finishMultiPart():i.fillQueue.call(i)})},queueChunks:function(e,r){var i=this;i.multipartReq.on("success",function(){i.uploadPart(e,r)})},cleanup:function(e){var r=this;r.failed||(typeof r.body.removeAllListeners=="function"&&typeof r.body.resume=="function"&&(r.body.removeAllListeners("readable"),r.body.removeAllListeners("end"),r.body.resume()),r.multipartReq&&(r.multipartReq.removeAllListeners("success"),r.multipartReq.removeAllListeners("error"),r.multipartReq.removeAllListeners("complete"),delete r.multipartReq),r.service.config.params.UploadId&&!r.leavePartsOnError?r.service.abortMultipartUpload().send():r.leavePartsOnError&&(r.isDoneChunking=!1),vt.util.each(r.parts,function(i,n){n.removeAllListeners("complete"),n.abort()}),r.activeParts=0,r.partPos=0,r.numParts=0,r.totalPartNumbers=0,r.parts={},r.failed=!0,r.callback(e))},finishMultiPart:function(){var e=this,r={MultipartUpload:{Parts:e.completeInfo.slice(1)}};e.service.completeMultipartUpload(r,function(i,n){if(i)return e.cleanup(i);if(n&&typeof n.Location=="string"&&(n.Location=n.Location.replace(/%2F/g,"/")),Array.isArray(e.tags)){for(var s=0;s<e.tags.length;s++)e.tags[s].Value=String(e.tags[s].Value);e.service.putObjectTagging({Tagging:{TagSet:e.tags}},function(o,u){o?e.callback(o):e.callback(o,n)})}else e.callback(i,n)})},finishSinglePart:function(e,r){var i=this.request._managedUpload,n=this.request.httpRequest,s=n.endpoint;if(e)return i.callback(e);r.Location=[s.protocol,"//",s.host,n.path].join(""),r.key=this.request.params.Key,r.Key=this.request.params.Key,r.Bucket=this.request.params.Bucket,i.callback(e,r)},progress:function(e){var r=this._managedUpload;this.operation==="putObject"?(e.part=1,e.key=this.params.Key):(r.totalUploadedBytes+=e.loaded-this._lastUploadedBytes,this._lastUploadedBytes=e.loaded,e={loaded:r.totalUploadedBytes,total:r.totalBytes,part:this.params.PartNumber,key:this.params.Key}),r.emit("httpUploadProgress",[e])}});vt.util.mixin(vt.S3.ManagedUpload,vt.SequentialExecutor);vt.S3.ManagedUpload.addPromisesToClass=function(e){this.prototype.promise=vt.util.promisifyMethod("send",e)};vt.S3.ManagedUpload.deletePromisesFromClass=function(){delete this.prototype.promise};vt.util.addPromises(vt.S3.ManagedUpload);Ox.exports=vt.S3.ManagedUpload});var Fx=U(()=>{var xe=me(),Dx=ty(),TD=dy(),Bn=Px(),ND=th();Bx();var qx={completeMultipartUpload:!0,copyObject:!0,uploadPartCopy:!0},zx=["AuthorizationHeaderMalformed","BadRequest","PermanentRedirect",301],dg="s3-object-lambda";xe.util.update(xe.S3.prototype,{getSignatureVersion:function(e){var r=this.api.signatureVersion,i=this._originalConfig?this._originalConfig.signatureVersion:null,n=this.config.signatureVersion,s=e?e.isPresigned():!1;return i?(i=i==="v2"?"s3":i,i):(s!==!0?r="v4":n&&(r=n),r)},getSigningName:function(e){if(e&&e.operation==="writeGetObjectResponse")return dg;var r=xe.Service.prototype.getSigningName;return e&&e._parsedArn&&e._parsedArn.service?e._parsedArn.service:r.call(this)},getSignerClass:function(e){var r=this.getSignatureVersion(e);return xe.Signers.RequestSigner.getVersion(r)},validateService:function(){var e,r=[];if(this.config.region||(this.config.region="us-east-1"),!this.config.endpoint&&this.config.s3BucketEndpoint&&r.push("An endpoint must be provided when configuring `s3BucketEndpoint` to true."),r.length===1?e=r[0]:r.length>1&&(e=`Multiple configuration errors:
|
|
136
|
-
`+r.join(`
|
|
137
|
-
`)),e)throw xe.util.error(new Error,{name:"InvalidEndpoint",message:e})},shouldDisableBodySigning:function(e){var r=this.getSignerClass();return this.config.s3DisableBodySigning===!0&&r===xe.Signers.V4&&e.httpRequest.endpoint.protocol==="https:"},setupRequestListeners:function(e){var r=!0;if(e.addListener("validate",this.validateScheme),e.addListener("validate",this.validateBucketName,r),e.addListener("validate",this.optInUsEast1RegionalEndpoint,r),e.removeListener("validate",xe.EventListeners.Core.VALIDATE_REGION),e.addListener("build",this.addContentType),e.addListener("build",this.computeContentMd5),e.addListener("build",this.computeSseCustomerKeyMd5),e.addListener("build",this.populateURI),e.addListener("afterBuild",this.addExpect100Continue),e.addListener("extractError",this.extractError),e.addListener("extractData",xe.util.hoistPayloadMember),e.addListener("extractData",this.extractData),e.addListener("extractData",this.extractErrorFrom200Response),e.addListener("beforePresign",this.prepareSignedUrl),this.shouldDisableBodySigning(e)&&(e.removeListener("afterBuild",xe.EventListeners.Core.COMPUTE_SHA256),e.addListener("afterBuild",this.disableBodySigning)),e.operation!=="createBucket"&&Bn.isArnInParam(e,"Bucket")){e._parsedArn=xe.util.ARN.parse(e.params.Bucket),e.removeListener("validate",this.validateBucketName),e.removeListener("build",this.populateURI),e._parsedArn.service==="s3"?(e.addListener("validate",Bn.validateS3AccessPointArn),e.addListener("validate",this.validateArnResourceType)):e._parsedArn.service==="s3-outposts"&&(e.addListener("validate",Bn.validateOutpostsAccessPointArn),e.addListener("validate",Bn.validateOutpostsArn)),e.addListener("validate",Bn.validateArnRegion),e.addListener("validate",Bn.validateArnAccount),e.addListener("validate",Bn.validateArnService),e.addListener("build",this.populateUriFromAccessPointArn),e.addListener("build",Bn.validatePopulateUriFromArn);return}e.addListener("validate",this.validateBucketEndpoint),e.addListener("validate",this.correctBucketRegionFromCache),e.onAsync("extractError",this.requestBucketRegion),xe.util.isBrowser()&&e.onAsync("retry",this.reqRegionForNetworkingError)},validateScheme:function(t){var e=t.params,r=t.httpRequest.endpoint.protocol,i=e.SSECustomerKey||e.CopySourceSSECustomerKey;if(i&&r!=="https:"){var n="Cannot send SSE keys over HTTP. Set 'sslEnabled'to 'true' in your configuration";throw xe.util.error(new Error,{code:"ConfigError",message:n})}},validateBucketEndpoint:function(t){if(!t.params.Bucket&&t.service.config.s3BucketEndpoint){var e="Cannot send requests to root API with `s3BucketEndpoint` set.";throw xe.util.error(new Error,{code:"ConfigError",message:e})}},validateArnResourceType:function(e){var r=e._parsedArn.resource;if(r.indexOf("accesspoint:")!==0&&r.indexOf("accesspoint/")!==0)throw xe.util.error(new Error,{code:"InvalidARN",message:"ARN resource should begin with 'accesspoint/'"})},validateBucketName:function(e){var r=e.service,i=r.getSignatureVersion(e),n=e.params&&e.params.Bucket,s=e.params&&e.params.Key,o=n&&n.indexOf("/");if(n&&o>=0){if(typeof s=="string"&&o>0){e.params=xe.util.copy(e.params);var u=n.substr(o+1)||"";e.params.Key=u+"/"+s,e.params.Bucket=n.substr(0,o)}else if(i==="v4"){var l="Bucket names cannot contain forward slashes. Bucket: "+n;throw xe.util.error(new Error,{code:"InvalidBucket",message:l})}}},isValidAccelerateOperation:function(e){var r=["createBucket","deleteBucket","listBuckets"];return r.indexOf(e)===-1},optInUsEast1RegionalEndpoint:function(e){var r=e.service,i=r.config;if(i.s3UsEast1RegionalEndpoint=TD(r._originalConfig,{env:"AWS_S3_US_EAST_1_REGIONAL_ENDPOINT",sharedConfig:"s3_us_east_1_regional_endpoint",clientConfig:"s3UsEast1RegionalEndpoint"}),!(r._originalConfig||{}).endpoint&&e.httpRequest.region==="us-east-1"&&i.s3UsEast1RegionalEndpoint==="regional"&&e.httpRequest.endpoint.hostname.indexOf("s3.amazonaws.com")>=0){var n=i.endpoint.indexOf(".amazonaws.com");regionalEndpoint=i.endpoint.substring(0,n)+".us-east-1"+i.endpoint.substring(n),e.httpRequest.updateEndpoint(regionalEndpoint)}},populateURI:function(e){var r=e.httpRequest,i=e.params.Bucket,n=e.service,s=r.endpoint;if(i&&!n.pathStyleBucketName(i)){n.config.useAccelerateEndpoint&&n.isValidAccelerateOperation(e.operation)?n.config.useDualstack?s.hostname=i+".s3-accelerate.dualstack.amazonaws.com":s.hostname=i+".s3-accelerate.amazonaws.com":n.config.s3BucketEndpoint||(s.hostname=i+"."+s.hostname);var o=s.port;o!==80&&o!==443?s.host=s.hostname+":"+s.port:s.host=s.hostname,r.virtualHostedBucket=i,n.removeVirtualHostedBucketFromPath(e)}},removeVirtualHostedBucketFromPath:function(e){var r=e.httpRequest,i=r.virtualHostedBucket;if(i&&r.path){if(e.params&&e.params.Key){var n="/"+xe.util.uriEscapePath(e.params.Key);if(r.path.indexOf(n)===0&&(r.path.length===n.length||r.path[n.length]==="?"))return}r.path=r.path.replace(new RegExp("/"+i),""),r.path[0]!=="/"&&(r.path="/"+r.path)}},populateUriFromAccessPointArn:function(e){var r=e._parsedArn,i=r.service==="s3-outposts",n=r.service==="s3-object-lambda",s=i?"."+r.outpostId:"",o=i?"s3-outposts":"s3-accesspoint",u=!i&&e.service.config.useDualstack?".dualstack":"",l=e.httpRequest.endpoint,d=ND.getEndpointSuffix(r.region),h=e.service.config.s3UseArnRegion;if(l.hostname=[r.accessPoint+"-"+r.accountId+s,o+u,h?r.region:e.service.config.region,d].join("."),n){var o="s3-object-lambda",m=r.resource.split("/")[1];l.hostname=[m+"-"+r.accountId,o,h?r.region:e.service.config.region,d].join(".")}l.host=l.hostname;var b=xe.util.uriEscape(e.params.Bucket),S=e.httpRequest.path;e.httpRequest.path=S.replace(new RegExp("/"+b),""),e.httpRequest.path[0]!=="/"&&(e.httpRequest.path="/"+e.httpRequest.path),e.httpRequest.region=r.region},addExpect100Continue:function(e){var r=e.httpRequest.headers["Content-Length"];xe.util.isNode()&&(r>=1024*1024||e.params.Body instanceof xe.util.stream.Stream)&&(e.httpRequest.headers.Expect="100-continue")},addContentType:function(e){var r=e.httpRequest;if(r.method==="GET"||r.method==="HEAD"){delete r.headers["Content-Type"];return}r.headers["Content-Type"]||(r.headers["Content-Type"]="application/octet-stream");var i=r.headers["Content-Type"];if(xe.util.isBrowser())if(typeof r.body=="string"&&!i.match(/;\s*charset=/)){var n="; charset=UTF-8";r.headers["Content-Type"]+=n}else{var s=function(o,u,l){return u+l.toUpperCase()};r.headers["Content-Type"]=i.replace(/(;\s*charset=)(.+)$/,s)}},computableChecksumOperations:{putBucketCors:!0,putBucketLifecycle:!0,putBucketLifecycleConfiguration:!0,putBucketTagging:!0,deleteObjects:!0,putBucketReplication:!0,putObjectLegalHold:!0,putObjectRetention:!0,putObjectLockConfiguration:!0},willComputeChecksums:function(e){if(this.computableChecksumOperations[e.operation])return!0;if(!this.config.computeChecksums||!xe.util.Buffer.isBuffer(e.httpRequest.body)&&typeof e.httpRequest.body!="string")return!1;var r=e.service.api.operations[e.operation].input.members;if(e.service.shouldDisableBodySigning(e)&&!Object.prototype.hasOwnProperty.call(e.httpRequest.headers,"presigned-expires")&&r.ContentMD5&&!e.params.ContentMD5)return!0;if(e.service.getSignerClass(e)===xe.Signers.V4&&r.ContentMD5&&!r.ContentMD5.required)return!1;if(r.ContentMD5&&!e.params.ContentMD5)return!0},computeContentMd5:function(e){if(e.service.willComputeChecksums(e)){var r=xe.util.crypto.md5(e.httpRequest.body,"base64");e.httpRequest.headers["Content-MD5"]=r}},computeSseCustomerKeyMd5:function(e){var r={SSECustomerKey:"x-amz-server-side-encryption-customer-key-MD5",CopySourceSSECustomerKey:"x-amz-copy-source-server-side-encryption-customer-key-MD5"};xe.util.each(r,function(i,n){if(e.params[i]){var s=xe.util.crypto.md5(e.params[i],"base64");e.httpRequest.headers[n]=s}})},pathStyleBucketName:function(e){return this.config.s3ForcePathStyle?!0:this.config.s3BucketEndpoint?!1:Bn.dnsCompatibleBucketName(e)?!!(this.config.sslEnabled&&e.match(/\./)):!0},extractErrorFrom200Response:function(e){if(!!qx[e.request.operation]){var r=e.httpResponse;if(r.body&&r.body.toString().match("<Error>")){e.data=null;var i=this.service?this.service:this;throw i.extractError(e),e.error}else if(!r.body||!r.body.toString().match(/<[\w_]/))throw e.data=null,xe.util.error(new Error,{code:"InternalError",message:"S3 aborted request"})}},retryableError:function(e,r){if(qx[r.operation]&&e.statusCode===200)return!0;if(r._requestRegionForBucket&&r.service.bucketRegionCache[r._requestRegionForBucket])return!1;if(e&&e.code==="RequestTimeout")return!0;if(e&&zx.indexOf(e.code)!=-1&&e.region&&e.region!=r.httpRequest.region)return r.httpRequest.region=e.region,e.statusCode===301&&r.service.updateReqBucketRegion(r),!0;var i=xe.Service.prototype.retryableError;return i.call(this,e,r)},updateReqBucketRegion:function(e,r){var i=e.httpRequest;if(typeof r=="string"&&r.length&&(i.region=r),!!i.endpoint.host.match(/s3(?!-accelerate).*\.amazonaws\.com$/)){var n=e.service,s=n.config,o=s.s3BucketEndpoint;o&&delete s.s3BucketEndpoint;var u=xe.util.copy(s);delete u.endpoint,u.region=i.region,i.endpoint=new xe.S3(u).endpoint,n.populateURI(e),s.s3BucketEndpoint=o,i.headers.Host=i.endpoint.host,e._asm.currentState==="validate"&&(e.removeListener("build",n.populateURI),e.addListener("build",n.removeVirtualHostedBucketFromPath))}},extractData:function(e){var r=e.request;if(r.operation==="getBucketLocation"){var i=e.httpResponse.body.toString().match(/>(.+)<\/Location/);delete e.data._,i?e.data.LocationConstraint=i[1]:e.data.LocationConstraint=""}var n=r.params.Bucket||null;if(r.operation==="deleteBucket"&&typeof n=="string"&&!e.error)r.service.clearBucketRegionCache(n);else{var s=e.httpResponse.headers||{},o=s["x-amz-bucket-region"]||null;if(!o&&r.operation==="createBucket"&&!e.error){var u=r.params.CreateBucketConfiguration;u?u.LocationConstraint==="EU"?o="eu-west-1":o=u.LocationConstraint:o="us-east-1"}o&&n&&o!==r.service.bucketRegionCache[n]&&(r.service.bucketRegionCache[n]=o)}r.service.extractRequestIds(e)},extractError:function(e){var r={304:"NotModified",403:"Forbidden",400:"BadRequest",404:"NotFound"},i=e.request,n=e.httpResponse.statusCode,s=e.httpResponse.body||"",o=e.httpResponse.headers||{},u=o["x-amz-bucket-region"]||null,l=i.params.Bucket||null,d=i.service.bucketRegionCache;u&&l&&u!==d[l]&&(d[l]=u);var h;if(r[n]&&s.length===0)l&&!u&&(h=d[l]||null,h!==i.httpRequest.region&&(u=h)),e.error=xe.util.error(new Error,{code:r[n],message:null,region:u});else{var m=new xe.XML.Parser().parse(s.toString());m.Region&&!u?(u=m.Region,l&&u!==d[l]&&(d[l]=u)):l&&!u&&!m.Region&&(h=d[l]||null,h!==i.httpRequest.region&&(u=h)),e.error=xe.util.error(new Error,{code:m.Code||n,message:m.Message||null,region:u})}i.service.extractRequestIds(e)},requestBucketRegion:function(e,r){var i=e.error,n=e.request,s=n.params.Bucket||null;if(!i||!s||i.region||n.operation==="listObjects"||xe.util.isNode()&&n.operation==="headBucket"||i.statusCode===400&&n.operation!=="headObject"||zx.indexOf(i.code)===-1)return r();var o=xe.util.isNode()?"headBucket":"listObjects",u={Bucket:s};o==="listObjects"&&(u.MaxKeys=0);var l=n.service[o](u);l._requestRegionForBucket=s,l.send(function(){var d=n.service.bucketRegionCache[s]||null;i.region=d,r()})},reqRegionForNetworkingError:function(e,r){if(!xe.util.isBrowser())return r();var i=e.error,n=e.request,s=n.params.Bucket;if(!i||i.code!=="NetworkingError"||!s||n.httpRequest.region==="us-east-1")return r();var o=n.service,u=o.bucketRegionCache,l=u[s]||null;if(l&&l!==n.httpRequest.region)o.updateReqBucketRegion(n,l),r();else if(!Bn.dnsCompatibleBucketName(s))o.updateReqBucketRegion(n,"us-east-1"),u[s]!=="us-east-1"&&(u[s]="us-east-1"),r();else if(n.httpRequest.virtualHostedBucket){var d=o.listObjects({Bucket:s,MaxKeys:0});o.updateReqBucketRegion(d,"us-east-1"),d._requestRegionForBucket=s,d.send(function(){var h=o.bucketRegionCache[s]||null;h&&h!==n.httpRequest.region&&o.updateReqBucketRegion(n,h),r()})}else r()},bucketRegionCache:{},clearBucketRegionCache:function(t){var e=this.bucketRegionCache;t?typeof t=="string"&&(t=[t]):t=Object.keys(e);for(var r=0;r<t.length;r++)delete e[t[r]];return e},correctBucketRegionFromCache:function(e){var r=e.params.Bucket||null;if(r){var i=e.service,n=e.httpRequest.region,s=i.bucketRegionCache[r];s&&s!==n&&i.updateReqBucketRegion(e,s)}},extractRequestIds:function(e){var r=e.httpResponse.headers?e.httpResponse.headers["x-amz-id-2"]:null,i=e.httpResponse.headers?e.httpResponse.headers["x-amz-cf-id"]:null;e.extendedRequestId=r,e.cfId=i,e.error&&(e.error.requestId=e.requestId||null,e.error.extendedRequestId=r,e.error.cfId=i)},getSignedUrl:function(e,r,i){r=xe.util.copy(r||{});var n=r.Expires||900;if(typeof n!="number")throw xe.util.error(new Error,{code:"InvalidParameterException",message:"The expiration must be a number, received "+typeof n});delete r.Expires;var s=this.makeRequest(e,r);if(i)xe.util.defer(function(){s.presign(n,i)});else return s.presign(n,i)},createPresignedPost:function(e,r){typeof e=="function"&&r===void 0&&(r=e,e=null),e=xe.util.copy(e||{});var i=this.config.params||{},n=e.Bucket||i.Bucket,s=this,o=this.config,u=xe.util.copy(this.endpoint);o.s3BucketEndpoint||(u.pathname="/"+n);function l(){return{url:xe.util.urlFormat(u),fields:s.preparePostFields(o.credentials,o.region,n,e.Fields,e.Conditions,e.Expires)}}if(r)o.getCredentials(function(d){if(d)r(d);else try{r(null,l())}catch(h){r(h)}});else return l()},preparePostFields:function(e,r,i,n,s,o){var u=this.getSkewCorrectedDate();if(!e||!r||!i)throw new Error("Unable to create a POST object policy without a bucket, region, and credentials");n=xe.util.copy(n||{}),s=(s||[]).slice(0),o=o||3600;var l=xe.util.date.iso8601(u).replace(/[:\-]|\.\d{3}/g,""),d=l.substr(0,8),h=Dx.createScope(d,r,"s3"),m=e.accessKeyId+"/"+h;n.bucket=i,n["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",n["X-Amz-Credential"]=m,n["X-Amz-Date"]=l,e.sessionToken&&(n["X-Amz-Security-Token"]=e.sessionToken);for(var b in n)if(n.hasOwnProperty(b)){var S={};S[b]=n[b],s.push(S)}return n.Policy=this.preparePostPolicy(new Date(u.valueOf()+o*1e3),s),n["X-Amz-Signature"]=xe.util.crypto.hmac(Dx.getSigningKey(e,d,r,"s3",!0),n.Policy,"hex"),n},preparePostPolicy:function(e,r){return xe.util.base64.encode(JSON.stringify({expiration:xe.util.date.iso8601(e),conditions:r}))},prepareSignedUrl:function(e){e.addListener("validate",e.service.noPresignedContentLength),e.removeListener("build",e.service.addContentType),e.params.Body?e.addListener("afterBuild",xe.EventListeners.Core.COMPUTE_SHA256):e.removeListener("build",e.service.computeContentMd5)},disableBodySigning:function(e){var r=e.httpRequest.headers;Object.prototype.hasOwnProperty.call(r,"presigned-expires")||(r["X-Amz-Content-Sha256"]="UNSIGNED-PAYLOAD")},noPresignedContentLength:function(e){if(e.params.ContentLength!==void 0)throw xe.util.error(new Error,{code:"UnexpectedParameter",message:"ContentLength is not supported in pre-signed URLs."})},createBucket:function(e,r){(typeof e=="function"||!e)&&(r=r||e,e={});var i=this.endpoint.hostname,n=xe.util.copy(e);return i!==this.api.globalEndpoint&&!e.CreateBucketConfiguration&&(n.CreateBucketConfiguration={LocationConstraint:this.config.region}),this.makeRequest("createBucket",n,r)},writeGetObjectResponse:function(e,r){var i=this.makeRequest("writeGetObjectResponse",xe.util.copy(e),r),n=this.endpoint.hostname;return n.indexOf(this.config.region)!==-1?n=n.replace("s3.",dg+"."):n=n.replace("s3.",dg+"."+this.config.region+"."),i.httpRequest.endpoint=new xe.Endpoint(n,this.config),i},upload:function(e,r,i){typeof r=="function"&&i===void 0&&(i=r,r=null),r=r||{},r=xe.util.merge(r||{},{service:this,params:e});var n=new xe.S3.ManagedUpload(r);return typeof i=="function"&&n.send(i),n}});xe.S3.addPromisesToClass=function(e){this.prototype.getSignedUrlPromise=xe.util.promisifyMethod("getSignedUrl",e)};xe.S3.deletePromisesFromClass=function(){delete this.prototype.getSignedUrlPromise};xe.util.addPromises(xe.S3)});var Ux=U((rZ,AD)=>{AD.exports={version:"2.0",metadata:{apiVersion:"2006-03-01",checksumFormat:"md5",endpointPrefix:"s3",globalEndpoint:"s3.amazonaws.com",protocol:"rest-xml",serviceAbbreviation:"Amazon S3",serviceFullName:"Amazon Simple Storage Service",serviceId:"S3",signatureVersion:"s3",uid:"s3-2006-03-01"},operations:{AbortMultipartUpload:{http:{method:"DELETE",requestUri:"/{Bucket}/{Key+}",responseCode:204},input:{type:"structure",required:["Bucket","Key","UploadId"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},UploadId:{location:"querystring",locationName:"uploadId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},CompleteMultipartUpload:{http:{requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key","UploadId"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},MultipartUpload:{locationName:"CompleteMultipartUpload",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{Parts:{locationName:"Part",type:"list",member:{type:"structure",members:{ETag:{},PartNumber:{type:"integer"}}},flattened:!0}}},UploadId:{location:"querystring",locationName:"uploadId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"MultipartUpload"},output:{type:"structure",members:{Location:{},Bucket:{},Key:{},Expiration:{location:"header",locationName:"x-amz-expiration"},ETag:{},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},VersionId:{location:"header",locationName:"x-amz-version-id"},SSEKMSKeyId:{shape:"Sk",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},BucketKeyEnabled:{location:"header",locationName:"x-amz-server-side-encryption-bucket-key-enabled",type:"boolean"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},CopyObject:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","CopySource","Key"],members:{ACL:{location:"header",locationName:"x-amz-acl"},Bucket:{location:"uri",locationName:"Bucket"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentType:{location:"header",locationName:"Content-Type"},CopySource:{location:"header",locationName:"x-amz-copy-source"},CopySourceIfMatch:{location:"header",locationName:"x-amz-copy-source-if-match"},CopySourceIfModifiedSince:{location:"header",locationName:"x-amz-copy-source-if-modified-since",type:"timestamp"},CopySourceIfNoneMatch:{location:"header",locationName:"x-amz-copy-source-if-none-match"},CopySourceIfUnmodifiedSince:{location:"header",locationName:"x-amz-copy-source-if-unmodified-since",type:"timestamp"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},Key:{location:"uri",locationName:"Key"},Metadata:{shape:"S13",location:"headers",locationName:"x-amz-meta-"},MetadataDirective:{location:"header",locationName:"x-amz-metadata-directive"},TaggingDirective:{location:"header",locationName:"x-amz-tagging-directive"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S1b",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sk",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},SSEKMSEncryptionContext:{shape:"S1d",location:"header",locationName:"x-amz-server-side-encryption-context"},BucketKeyEnabled:{location:"header",locationName:"x-amz-server-side-encryption-bucket-key-enabled",type:"boolean"},CopySourceSSECustomerAlgorithm:{location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm"},CopySourceSSECustomerKey:{shape:"S1f",location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-key"},CopySourceSSECustomerKeyMD5:{location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},Tagging:{location:"header",locationName:"x-amz-tagging"},ObjectLockMode:{location:"header",locationName:"x-amz-object-lock-mode"},ObjectLockRetainUntilDate:{shape:"S1j",location:"header",locationName:"x-amz-object-lock-retain-until-date"},ObjectLockLegalHoldStatus:{location:"header",locationName:"x-amz-object-lock-legal-hold"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"},ExpectedSourceBucketOwner:{location:"header",locationName:"x-amz-source-expected-bucket-owner"}}},output:{type:"structure",members:{CopyObjectResult:{type:"structure",members:{ETag:{},LastModified:{type:"timestamp"}}},Expiration:{location:"header",locationName:"x-amz-expiration"},CopySourceVersionId:{location:"header",locationName:"x-amz-copy-source-version-id"},VersionId:{location:"header",locationName:"x-amz-version-id"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sk",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},SSEKMSEncryptionContext:{shape:"S1d",location:"header",locationName:"x-amz-server-side-encryption-context"},BucketKeyEnabled:{location:"header",locationName:"x-amz-server-side-encryption-bucket-key-enabled",type:"boolean"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}},payload:"CopyObjectResult"},alias:"PutObjectCopy"},CreateBucket:{http:{method:"PUT",requestUri:"/{Bucket}"},input:{type:"structure",required:["Bucket"],members:{ACL:{location:"header",locationName:"x-amz-acl"},Bucket:{location:"uri",locationName:"Bucket"},CreateBucketConfiguration:{locationName:"CreateBucketConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{LocationConstraint:{}}},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWrite:{location:"header",locationName:"x-amz-grant-write"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},ObjectLockEnabledForBucket:{location:"header",locationName:"x-amz-bucket-object-lock-enabled",type:"boolean"}},payload:"CreateBucketConfiguration"},output:{type:"structure",members:{Location:{location:"header",locationName:"Location"}}},alias:"PutBucket"},CreateMultipartUpload:{http:{requestUri:"/{Bucket}/{Key+}?uploads"},input:{type:"structure",required:["Bucket","Key"],members:{ACL:{location:"header",locationName:"x-amz-acl"},Bucket:{location:"uri",locationName:"Bucket"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentType:{location:"header",locationName:"Content-Type"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},Key:{location:"uri",locationName:"Key"},Metadata:{shape:"S13",location:"headers",locationName:"x-amz-meta-"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S1b",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sk",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},SSEKMSEncryptionContext:{shape:"S1d",location:"header",locationName:"x-amz-server-side-encryption-context"},BucketKeyEnabled:{location:"header",locationName:"x-amz-server-side-encryption-bucket-key-enabled",type:"boolean"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},Tagging:{location:"header",locationName:"x-amz-tagging"},ObjectLockMode:{location:"header",locationName:"x-amz-object-lock-mode"},ObjectLockRetainUntilDate:{shape:"S1j",location:"header",locationName:"x-amz-object-lock-retain-until-date"},ObjectLockLegalHoldStatus:{location:"header",locationName:"x-amz-object-lock-legal-hold"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{AbortDate:{location:"header",locationName:"x-amz-abort-date",type:"timestamp"},AbortRuleId:{location:"header",locationName:"x-amz-abort-rule-id"},Bucket:{locationName:"Bucket"},Key:{},UploadId:{},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sk",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},SSEKMSEncryptionContext:{shape:"S1d",location:"header",locationName:"x-amz-server-side-encryption-context"},BucketKeyEnabled:{location:"header",locationName:"x-amz-server-side-encryption-bucket-key-enabled",type:"boolean"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}},alias:"InitiateMultipartUpload"},DeleteBucket:{http:{method:"DELETE",requestUri:"/{Bucket}",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},DeleteBucketAnalyticsConfiguration:{http:{method:"DELETE",requestUri:"/{Bucket}?analytics",responseCode:204},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},DeleteBucketCors:{http:{method:"DELETE",requestUri:"/{Bucket}?cors",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},DeleteBucketEncryption:{http:{method:"DELETE",requestUri:"/{Bucket}?encryption",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},DeleteBucketIntelligentTieringConfiguration:{http:{method:"DELETE",requestUri:"/{Bucket}?intelligent-tiering",responseCode:204},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}}},DeleteBucketInventoryConfiguration:{http:{method:"DELETE",requestUri:"/{Bucket}?inventory",responseCode:204},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},DeleteBucketLifecycle:{http:{method:"DELETE",requestUri:"/{Bucket}?lifecycle",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},DeleteBucketMetricsConfiguration:{http:{method:"DELETE",requestUri:"/{Bucket}?metrics",responseCode:204},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},DeleteBucketOwnershipControls:{http:{method:"DELETE",requestUri:"/{Bucket}?ownershipControls",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},DeleteBucketPolicy:{http:{method:"DELETE",requestUri:"/{Bucket}?policy",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},DeleteBucketReplication:{http:{method:"DELETE",requestUri:"/{Bucket}?replication",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},DeleteBucketTagging:{http:{method:"DELETE",requestUri:"/{Bucket}?tagging",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},DeleteBucketWebsite:{http:{method:"DELETE",requestUri:"/{Bucket}?website",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},DeleteObject:{http:{method:"DELETE",requestUri:"/{Bucket}/{Key+}",responseCode:204},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},MFA:{location:"header",locationName:"x-amz-mfa"},VersionId:{location:"querystring",locationName:"versionId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},BypassGovernanceRetention:{location:"header",locationName:"x-amz-bypass-governance-retention",type:"boolean"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{DeleteMarker:{location:"header",locationName:"x-amz-delete-marker",type:"boolean"},VersionId:{location:"header",locationName:"x-amz-version-id"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},DeleteObjectTagging:{http:{method:"DELETE",requestUri:"/{Bucket}/{Key+}?tagging",responseCode:204},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{VersionId:{location:"header",locationName:"x-amz-version-id"}}}},DeleteObjects:{http:{requestUri:"/{Bucket}?delete"},input:{type:"structure",required:["Bucket","Delete"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delete:{locationName:"Delete",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Objects"],members:{Objects:{locationName:"Object",type:"list",member:{type:"structure",required:["Key"],members:{Key:{},VersionId:{}}},flattened:!0},Quiet:{type:"boolean"}}},MFA:{location:"header",locationName:"x-amz-mfa"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},BypassGovernanceRetention:{location:"header",locationName:"x-amz-bypass-governance-retention",type:"boolean"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"Delete"},output:{type:"structure",members:{Deleted:{type:"list",member:{type:"structure",members:{Key:{},VersionId:{},DeleteMarker:{type:"boolean"},DeleteMarkerVersionId:{}}},flattened:!0},RequestCharged:{location:"header",locationName:"x-amz-request-charged"},Errors:{locationName:"Error",type:"list",member:{type:"structure",members:{Key:{},VersionId:{},Code:{},Message:{}}},flattened:!0}}},alias:"DeleteMultipleObjects",httpChecksumRequired:!0},DeletePublicAccessBlock:{http:{method:"DELETE",requestUri:"/{Bucket}?publicAccessBlock",responseCode:204},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},GetBucketAccelerateConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?accelerate"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{Status:{}}}},GetBucketAcl:{http:{method:"GET",requestUri:"/{Bucket}?acl"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{Owner:{shape:"S37"},Grants:{shape:"S3a",locationName:"AccessControlList"}}}},GetBucketAnalyticsConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?analytics"},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{AnalyticsConfiguration:{shape:"S3j"}},payload:"AnalyticsConfiguration"}},GetBucketCors:{http:{method:"GET",requestUri:"/{Bucket}?cors"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{CORSRules:{shape:"S3y",locationName:"CORSRule"}}}},GetBucketEncryption:{http:{method:"GET",requestUri:"/{Bucket}?encryption"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{ServerSideEncryptionConfiguration:{shape:"S4b"}},payload:"ServerSideEncryptionConfiguration"}},GetBucketIntelligentTieringConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?intelligent-tiering"},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"}}},output:{type:"structure",members:{IntelligentTieringConfiguration:{shape:"S4h"}},payload:"IntelligentTieringConfiguration"}},GetBucketInventoryConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?inventory"},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{InventoryConfiguration:{shape:"S4r"}},payload:"InventoryConfiguration"}},GetBucketLifecycle:{http:{method:"GET",requestUri:"/{Bucket}?lifecycle"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{Rules:{shape:"S57",locationName:"Rule"}}},deprecated:!0},GetBucketLifecycleConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?lifecycle"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{Rules:{shape:"S5m",locationName:"Rule"}}}},GetBucketLocation:{http:{method:"GET",requestUri:"/{Bucket}?location"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{LocationConstraint:{}}}},GetBucketLogging:{http:{method:"GET",requestUri:"/{Bucket}?logging"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{LoggingEnabled:{shape:"S5w"}}}},GetBucketMetricsConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?metrics"},input:{type:"structure",required:["Bucket","Id"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{MetricsConfiguration:{shape:"S64"}},payload:"MetricsConfiguration"}},GetBucketNotification:{http:{method:"GET",requestUri:"/{Bucket}?notification"},input:{shape:"S67"},output:{shape:"S68"},deprecated:!0},GetBucketNotificationConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?notification"},input:{shape:"S67"},output:{shape:"S6j"}},GetBucketOwnershipControls:{http:{method:"GET",requestUri:"/{Bucket}?ownershipControls"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{OwnershipControls:{shape:"S6z"}},payload:"OwnershipControls"}},GetBucketPolicy:{http:{method:"GET",requestUri:"/{Bucket}?policy"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{Policy:{}},payload:"Policy"}},GetBucketPolicyStatus:{http:{method:"GET",requestUri:"/{Bucket}?policyStatus"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{PolicyStatus:{type:"structure",members:{IsPublic:{locationName:"IsPublic",type:"boolean"}}}},payload:"PolicyStatus"}},GetBucketReplication:{http:{method:"GET",requestUri:"/{Bucket}?replication"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{ReplicationConfiguration:{shape:"S7c"}},payload:"ReplicationConfiguration"}},GetBucketRequestPayment:{http:{method:"GET",requestUri:"/{Bucket}?requestPayment"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{Payer:{}}}},GetBucketTagging:{http:{method:"GET",requestUri:"/{Bucket}?tagging"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",required:["TagSet"],members:{TagSet:{shape:"S3p"}}}},GetBucketVersioning:{http:{method:"GET",requestUri:"/{Bucket}?versioning"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{Status:{},MFADelete:{locationName:"MfaDelete"}}}},GetBucketWebsite:{http:{method:"GET",requestUri:"/{Bucket}?website"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{RedirectAllRequestsTo:{shape:"S8f"},IndexDocument:{shape:"S8i"},ErrorDocument:{shape:"S8k"},RoutingRules:{shape:"S8l"}}}},GetObject:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},IfMatch:{location:"header",locationName:"If-Match"},IfModifiedSince:{location:"header",locationName:"If-Modified-Since",type:"timestamp"},IfNoneMatch:{location:"header",locationName:"If-None-Match"},IfUnmodifiedSince:{location:"header",locationName:"If-Unmodified-Since",type:"timestamp"},Key:{location:"uri",locationName:"Key"},Range:{location:"header",locationName:"Range"},ResponseCacheControl:{location:"querystring",locationName:"response-cache-control"},ResponseContentDisposition:{location:"querystring",locationName:"response-content-disposition"},ResponseContentEncoding:{location:"querystring",locationName:"response-content-encoding"},ResponseContentLanguage:{location:"querystring",locationName:"response-content-language"},ResponseContentType:{location:"querystring",locationName:"response-content-type"},ResponseExpires:{location:"querystring",locationName:"response-expires",type:"timestamp",timestampFormat:"rfc822"},VersionId:{location:"querystring",locationName:"versionId"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S1b",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},PartNumber:{location:"querystring",locationName:"partNumber",type:"integer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{Body:{streaming:!0,type:"blob"},DeleteMarker:{location:"header",locationName:"x-amz-delete-marker",type:"boolean"},AcceptRanges:{location:"header",locationName:"accept-ranges"},Expiration:{location:"header",locationName:"x-amz-expiration"},Restore:{location:"header",locationName:"x-amz-restore"},LastModified:{location:"header",locationName:"Last-Modified",type:"timestamp"},ContentLength:{location:"header",locationName:"Content-Length",type:"long"},ETag:{location:"header",locationName:"ETag"},MissingMeta:{location:"header",locationName:"x-amz-missing-meta",type:"integer"},VersionId:{location:"header",locationName:"x-amz-version-id"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentRange:{location:"header",locationName:"Content-Range"},ContentType:{location:"header",locationName:"Content-Type"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},Metadata:{shape:"S13",location:"headers",locationName:"x-amz-meta-"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sk",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},BucketKeyEnabled:{location:"header",locationName:"x-amz-server-side-encryption-bucket-key-enabled",type:"boolean"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"},ReplicationStatus:{location:"header",locationName:"x-amz-replication-status"},PartsCount:{location:"header",locationName:"x-amz-mp-parts-count",type:"integer"},TagCount:{location:"header",locationName:"x-amz-tagging-count",type:"integer"},ObjectLockMode:{location:"header",locationName:"x-amz-object-lock-mode"},ObjectLockRetainUntilDate:{shape:"S1j",location:"header",locationName:"x-amz-object-lock-retain-until-date"},ObjectLockLegalHoldStatus:{location:"header",locationName:"x-amz-object-lock-legal-hold"}},payload:"Body"}},GetObjectAcl:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}?acl"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{Owner:{shape:"S37"},Grants:{shape:"S3a",locationName:"AccessControlList"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},GetObjectLegalHold:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}?legal-hold"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{LegalHold:{shape:"S9k"}},payload:"LegalHold"}},GetObjectLockConfiguration:{http:{method:"GET",requestUri:"/{Bucket}?object-lock"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{ObjectLockConfiguration:{shape:"S9n"}},payload:"ObjectLockConfiguration"}},GetObjectRetention:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}?retention"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{Retention:{shape:"S9v"}},payload:"Retention"}},GetObjectTagging:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}?tagging"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}}},output:{type:"structure",required:["TagSet"],members:{VersionId:{location:"header",locationName:"x-amz-version-id"},TagSet:{shape:"S3p"}}}},GetObjectTorrent:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}?torrent"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{Body:{streaming:!0,type:"blob"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}},payload:"Body"}},GetPublicAccessBlock:{http:{method:"GET",requestUri:"/{Bucket}?publicAccessBlock"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{PublicAccessBlockConfiguration:{shape:"Sa2"}},payload:"PublicAccessBlockConfiguration"}},HeadBucket:{http:{method:"HEAD",requestUri:"/{Bucket}"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}}},HeadObject:{http:{method:"HEAD",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},IfMatch:{location:"header",locationName:"If-Match"},IfModifiedSince:{location:"header",locationName:"If-Modified-Since",type:"timestamp"},IfNoneMatch:{location:"header",locationName:"If-None-Match"},IfUnmodifiedSince:{location:"header",locationName:"If-Unmodified-Since",type:"timestamp"},Key:{location:"uri",locationName:"Key"},Range:{location:"header",locationName:"Range"},VersionId:{location:"querystring",locationName:"versionId"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S1b",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},PartNumber:{location:"querystring",locationName:"partNumber",type:"integer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{DeleteMarker:{location:"header",locationName:"x-amz-delete-marker",type:"boolean"},AcceptRanges:{location:"header",locationName:"accept-ranges"},Expiration:{location:"header",locationName:"x-amz-expiration"},Restore:{location:"header",locationName:"x-amz-restore"},ArchiveStatus:{location:"header",locationName:"x-amz-archive-status"},LastModified:{location:"header",locationName:"Last-Modified",type:"timestamp"},ContentLength:{location:"header",locationName:"Content-Length",type:"long"},ETag:{location:"header",locationName:"ETag"},MissingMeta:{location:"header",locationName:"x-amz-missing-meta",type:"integer"},VersionId:{location:"header",locationName:"x-amz-version-id"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentType:{location:"header",locationName:"Content-Type"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},Metadata:{shape:"S13",location:"headers",locationName:"x-amz-meta-"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sk",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},BucketKeyEnabled:{location:"header",locationName:"x-amz-server-side-encryption-bucket-key-enabled",type:"boolean"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"},ReplicationStatus:{location:"header",locationName:"x-amz-replication-status"},PartsCount:{location:"header",locationName:"x-amz-mp-parts-count",type:"integer"},ObjectLockMode:{location:"header",locationName:"x-amz-object-lock-mode"},ObjectLockRetainUntilDate:{shape:"S1j",location:"header",locationName:"x-amz-object-lock-retain-until-date"},ObjectLockLegalHoldStatus:{location:"header",locationName:"x-amz-object-lock-legal-hold"}}}},ListBucketAnalyticsConfigurations:{http:{method:"GET",requestUri:"/{Bucket}?analytics"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContinuationToken:{location:"querystring",locationName:"continuation-token"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},ContinuationToken:{},NextContinuationToken:{},AnalyticsConfigurationList:{locationName:"AnalyticsConfiguration",type:"list",member:{shape:"S3j"},flattened:!0}}}},ListBucketIntelligentTieringConfigurations:{http:{method:"GET",requestUri:"/{Bucket}?intelligent-tiering"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContinuationToken:{location:"querystring",locationName:"continuation-token"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},ContinuationToken:{},NextContinuationToken:{},IntelligentTieringConfigurationList:{locationName:"IntelligentTieringConfiguration",type:"list",member:{shape:"S4h"},flattened:!0}}}},ListBucketInventoryConfigurations:{http:{method:"GET",requestUri:"/{Bucket}?inventory"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContinuationToken:{location:"querystring",locationName:"continuation-token"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{ContinuationToken:{},InventoryConfigurationList:{locationName:"InventoryConfiguration",type:"list",member:{shape:"S4r"},flattened:!0},IsTruncated:{type:"boolean"},NextContinuationToken:{}}}},ListBucketMetricsConfigurations:{http:{method:"GET",requestUri:"/{Bucket}?metrics"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContinuationToken:{location:"querystring",locationName:"continuation-token"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},ContinuationToken:{},NextContinuationToken:{},MetricsConfigurationList:{locationName:"MetricsConfiguration",type:"list",member:{shape:"S64"},flattened:!0}}}},ListBuckets:{http:{method:"GET"},output:{type:"structure",members:{Buckets:{type:"list",member:{locationName:"Bucket",type:"structure",members:{Name:{},CreationDate:{type:"timestamp"}}}},Owner:{shape:"S37"}}},alias:"GetService"},ListMultipartUploads:{http:{method:"GET",requestUri:"/{Bucket}?uploads"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delimiter:{location:"querystring",locationName:"delimiter"},EncodingType:{location:"querystring",locationName:"encoding-type"},KeyMarker:{location:"querystring",locationName:"key-marker"},MaxUploads:{location:"querystring",locationName:"max-uploads",type:"integer"},Prefix:{location:"querystring",locationName:"prefix"},UploadIdMarker:{location:"querystring",locationName:"upload-id-marker"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{Bucket:{},KeyMarker:{},UploadIdMarker:{},NextKeyMarker:{},Prefix:{},Delimiter:{},NextUploadIdMarker:{},MaxUploads:{type:"integer"},IsTruncated:{type:"boolean"},Uploads:{locationName:"Upload",type:"list",member:{type:"structure",members:{UploadId:{},Key:{},Initiated:{type:"timestamp"},StorageClass:{},Owner:{shape:"S37"},Initiator:{shape:"Sb3"}}},flattened:!0},CommonPrefixes:{shape:"Sb4"},EncodingType:{}}}},ListObjectVersions:{http:{method:"GET",requestUri:"/{Bucket}?versions"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delimiter:{location:"querystring",locationName:"delimiter"},EncodingType:{location:"querystring",locationName:"encoding-type"},KeyMarker:{location:"querystring",locationName:"key-marker"},MaxKeys:{location:"querystring",locationName:"max-keys",type:"integer"},Prefix:{location:"querystring",locationName:"prefix"},VersionIdMarker:{location:"querystring",locationName:"version-id-marker"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},KeyMarker:{},VersionIdMarker:{},NextKeyMarker:{},NextVersionIdMarker:{},Versions:{locationName:"Version",type:"list",member:{type:"structure",members:{ETag:{},Size:{type:"integer"},StorageClass:{},Key:{},VersionId:{},IsLatest:{type:"boolean"},LastModified:{type:"timestamp"},Owner:{shape:"S37"}}},flattened:!0},DeleteMarkers:{locationName:"DeleteMarker",type:"list",member:{type:"structure",members:{Owner:{shape:"S37"},Key:{},VersionId:{},IsLatest:{type:"boolean"},LastModified:{type:"timestamp"}}},flattened:!0},Name:{},Prefix:{},Delimiter:{},MaxKeys:{type:"integer"},CommonPrefixes:{shape:"Sb4"},EncodingType:{}}},alias:"GetBucketObjectVersions"},ListObjects:{http:{method:"GET",requestUri:"/{Bucket}"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delimiter:{location:"querystring",locationName:"delimiter"},EncodingType:{location:"querystring",locationName:"encoding-type"},Marker:{location:"querystring",locationName:"marker"},MaxKeys:{location:"querystring",locationName:"max-keys",type:"integer"},Prefix:{location:"querystring",locationName:"prefix"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},Marker:{},NextMarker:{},Contents:{shape:"Sbm"},Name:{},Prefix:{},Delimiter:{},MaxKeys:{type:"integer"},CommonPrefixes:{shape:"Sb4"},EncodingType:{}}},alias:"GetBucket"},ListObjectsV2:{http:{method:"GET",requestUri:"/{Bucket}?list-type=2"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},Delimiter:{location:"querystring",locationName:"delimiter"},EncodingType:{location:"querystring",locationName:"encoding-type"},MaxKeys:{location:"querystring",locationName:"max-keys",type:"integer"},Prefix:{location:"querystring",locationName:"prefix"},ContinuationToken:{location:"querystring",locationName:"continuation-token"},FetchOwner:{location:"querystring",locationName:"fetch-owner",type:"boolean"},StartAfter:{location:"querystring",locationName:"start-after"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{IsTruncated:{type:"boolean"},Contents:{shape:"Sbm"},Name:{},Prefix:{},Delimiter:{},MaxKeys:{type:"integer"},CommonPrefixes:{shape:"Sb4"},EncodingType:{},KeyCount:{type:"integer"},ContinuationToken:{},NextContinuationToken:{},StartAfter:{}}}},ListParts:{http:{method:"GET",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key","UploadId"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},MaxParts:{location:"querystring",locationName:"max-parts",type:"integer"},PartNumberMarker:{location:"querystring",locationName:"part-number-marker",type:"integer"},UploadId:{location:"querystring",locationName:"uploadId"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{AbortDate:{location:"header",locationName:"x-amz-abort-date",type:"timestamp"},AbortRuleId:{location:"header",locationName:"x-amz-abort-rule-id"},Bucket:{},Key:{},UploadId:{},PartNumberMarker:{type:"integer"},NextPartNumberMarker:{type:"integer"},MaxParts:{type:"integer"},IsTruncated:{type:"boolean"},Parts:{locationName:"Part",type:"list",member:{type:"structure",members:{PartNumber:{type:"integer"},LastModified:{type:"timestamp"},ETag:{},Size:{type:"integer"}}},flattened:!0},Initiator:{shape:"Sb3"},Owner:{shape:"S37"},StorageClass:{},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},PutBucketAccelerateConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?accelerate"},input:{type:"structure",required:["Bucket","AccelerateConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},AccelerateConfiguration:{locationName:"AccelerateConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{Status:{}}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"AccelerateConfiguration"}},PutBucketAcl:{http:{method:"PUT",requestUri:"/{Bucket}?acl"},input:{type:"structure",required:["Bucket"],members:{ACL:{location:"header",locationName:"x-amz-acl"},AccessControlPolicy:{shape:"Sc4",locationName:"AccessControlPolicy",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWrite:{location:"header",locationName:"x-amz-grant-write"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"AccessControlPolicy"},httpChecksumRequired:!0},PutBucketAnalyticsConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?analytics"},input:{type:"structure",required:["Bucket","Id","AnalyticsConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},AnalyticsConfiguration:{shape:"S3j",locationName:"AnalyticsConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"AnalyticsConfiguration"}},PutBucketCors:{http:{method:"PUT",requestUri:"/{Bucket}?cors"},input:{type:"structure",required:["Bucket","CORSConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},CORSConfiguration:{locationName:"CORSConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["CORSRules"],members:{CORSRules:{shape:"S3y",locationName:"CORSRule"}}},ContentMD5:{location:"header",locationName:"Content-MD5"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"CORSConfiguration"},httpChecksumRequired:!0},PutBucketEncryption:{http:{method:"PUT",requestUri:"/{Bucket}?encryption"},input:{type:"structure",required:["Bucket","ServerSideEncryptionConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},ServerSideEncryptionConfiguration:{shape:"S4b",locationName:"ServerSideEncryptionConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"ServerSideEncryptionConfiguration"},httpChecksumRequired:!0},PutBucketIntelligentTieringConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?intelligent-tiering"},input:{type:"structure",required:["Bucket","Id","IntelligentTieringConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},IntelligentTieringConfiguration:{shape:"S4h",locationName:"IntelligentTieringConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"IntelligentTieringConfiguration"}},PutBucketInventoryConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?inventory"},input:{type:"structure",required:["Bucket","Id","InventoryConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},InventoryConfiguration:{shape:"S4r",locationName:"InventoryConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"InventoryConfiguration"}},PutBucketLifecycle:{http:{method:"PUT",requestUri:"/{Bucket}?lifecycle"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},LifecycleConfiguration:{locationName:"LifecycleConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Rules"],members:{Rules:{shape:"S57",locationName:"Rule"}}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"LifecycleConfiguration"},deprecated:!0,httpChecksumRequired:!0},PutBucketLifecycleConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?lifecycle"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},LifecycleConfiguration:{locationName:"LifecycleConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Rules"],members:{Rules:{shape:"S5m",locationName:"Rule"}}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"LifecycleConfiguration"},httpChecksumRequired:!0},PutBucketLogging:{http:{method:"PUT",requestUri:"/{Bucket}?logging"},input:{type:"structure",required:["Bucket","BucketLoggingStatus"],members:{Bucket:{location:"uri",locationName:"Bucket"},BucketLoggingStatus:{locationName:"BucketLoggingStatus",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{LoggingEnabled:{shape:"S5w"}}},ContentMD5:{location:"header",locationName:"Content-MD5"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"BucketLoggingStatus"},httpChecksumRequired:!0},PutBucketMetricsConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?metrics"},input:{type:"structure",required:["Bucket","Id","MetricsConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},Id:{location:"querystring",locationName:"id"},MetricsConfiguration:{shape:"S64",locationName:"MetricsConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"MetricsConfiguration"}},PutBucketNotification:{http:{method:"PUT",requestUri:"/{Bucket}?notification"},input:{type:"structure",required:["Bucket","NotificationConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},NotificationConfiguration:{shape:"S68",locationName:"NotificationConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"NotificationConfiguration"},deprecated:!0,httpChecksumRequired:!0},PutBucketNotificationConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?notification"},input:{type:"structure",required:["Bucket","NotificationConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},NotificationConfiguration:{shape:"S6j",locationName:"NotificationConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"NotificationConfiguration"}},PutBucketOwnershipControls:{http:{method:"PUT",requestUri:"/{Bucket}?ownershipControls"},input:{type:"structure",required:["Bucket","OwnershipControls"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"},OwnershipControls:{shape:"S6z",locationName:"OwnershipControls",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}}},payload:"OwnershipControls"},httpChecksumRequired:!0},PutBucketPolicy:{http:{method:"PUT",requestUri:"/{Bucket}?policy"},input:{type:"structure",required:["Bucket","Policy"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},ConfirmRemoveSelfBucketAccess:{location:"header",locationName:"x-amz-confirm-remove-self-bucket-access",type:"boolean"},Policy:{},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"Policy"},httpChecksumRequired:!0},PutBucketReplication:{http:{method:"PUT",requestUri:"/{Bucket}?replication"},input:{type:"structure",required:["Bucket","ReplicationConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},ReplicationConfiguration:{shape:"S7c",locationName:"ReplicationConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},Token:{location:"header",locationName:"x-amz-bucket-object-lock-token"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"ReplicationConfiguration"},httpChecksumRequired:!0},PutBucketRequestPayment:{http:{method:"PUT",requestUri:"/{Bucket}?requestPayment"},input:{type:"structure",required:["Bucket","RequestPaymentConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},RequestPaymentConfiguration:{locationName:"RequestPaymentConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Payer"],members:{Payer:{}}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"RequestPaymentConfiguration"},httpChecksumRequired:!0},PutBucketTagging:{http:{method:"PUT",requestUri:"/{Bucket}?tagging"},input:{type:"structure",required:["Bucket","Tagging"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},Tagging:{shape:"Sct",locationName:"Tagging",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"Tagging"},httpChecksumRequired:!0},PutBucketVersioning:{http:{method:"PUT",requestUri:"/{Bucket}?versioning"},input:{type:"structure",required:["Bucket","VersioningConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},MFA:{location:"header",locationName:"x-amz-mfa"},VersioningConfiguration:{locationName:"VersioningConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{MFADelete:{locationName:"MfaDelete"},Status:{}}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"VersioningConfiguration"},httpChecksumRequired:!0},PutBucketWebsite:{http:{method:"PUT",requestUri:"/{Bucket}?website"},input:{type:"structure",required:["Bucket","WebsiteConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},WebsiteConfiguration:{locationName:"WebsiteConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{ErrorDocument:{shape:"S8k"},IndexDocument:{shape:"S8i"},RedirectAllRequestsTo:{shape:"S8f"},RoutingRules:{shape:"S8l"}}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"WebsiteConfiguration"},httpChecksumRequired:!0},PutObject:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key"],members:{ACL:{location:"header",locationName:"x-amz-acl"},Body:{streaming:!0,type:"blob"},Bucket:{location:"uri",locationName:"Bucket"},CacheControl:{location:"header",locationName:"Cache-Control"},ContentDisposition:{location:"header",locationName:"Content-Disposition"},ContentEncoding:{location:"header",locationName:"Content-Encoding"},ContentLanguage:{location:"header",locationName:"Content-Language"},ContentLength:{location:"header",locationName:"Content-Length",type:"long"},ContentMD5:{location:"header",locationName:"Content-MD5"},ContentType:{location:"header",locationName:"Content-Type"},Expires:{location:"header",locationName:"Expires",type:"timestamp"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},Key:{location:"uri",locationName:"Key"},Metadata:{shape:"S13",location:"headers",locationName:"x-amz-meta-"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},StorageClass:{location:"header",locationName:"x-amz-storage-class"},WebsiteRedirectLocation:{location:"header",locationName:"x-amz-website-redirect-location"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S1b",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sk",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},SSEKMSEncryptionContext:{shape:"S1d",location:"header",locationName:"x-amz-server-side-encryption-context"},BucketKeyEnabled:{location:"header",locationName:"x-amz-server-side-encryption-bucket-key-enabled",type:"boolean"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},Tagging:{location:"header",locationName:"x-amz-tagging"},ObjectLockMode:{location:"header",locationName:"x-amz-object-lock-mode"},ObjectLockRetainUntilDate:{shape:"S1j",location:"header",locationName:"x-amz-object-lock-retain-until-date"},ObjectLockLegalHoldStatus:{location:"header",locationName:"x-amz-object-lock-legal-hold"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"Body"},output:{type:"structure",members:{Expiration:{location:"header",locationName:"x-amz-expiration"},ETag:{location:"header",locationName:"ETag"},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},VersionId:{location:"header",locationName:"x-amz-version-id"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sk",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},SSEKMSEncryptionContext:{shape:"S1d",location:"header",locationName:"x-amz-server-side-encryption-context"},BucketKeyEnabled:{location:"header",locationName:"x-amz-server-side-encryption-bucket-key-enabled",type:"boolean"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},PutObjectAcl:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}?acl"},input:{type:"structure",required:["Bucket","Key"],members:{ACL:{location:"header",locationName:"x-amz-acl"},AccessControlPolicy:{shape:"Sc4",locationName:"AccessControlPolicy",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},GrantFullControl:{location:"header",locationName:"x-amz-grant-full-control"},GrantRead:{location:"header",locationName:"x-amz-grant-read"},GrantReadACP:{location:"header",locationName:"x-amz-grant-read-acp"},GrantWrite:{location:"header",locationName:"x-amz-grant-write"},GrantWriteACP:{location:"header",locationName:"x-amz-grant-write-acp"},Key:{location:"uri",locationName:"Key"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},VersionId:{location:"querystring",locationName:"versionId"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"AccessControlPolicy"},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}},httpChecksumRequired:!0},PutObjectLegalHold:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}?legal-hold"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},LegalHold:{shape:"S9k",locationName:"LegalHold",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},VersionId:{location:"querystring",locationName:"versionId"},ContentMD5:{location:"header",locationName:"Content-MD5"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"LegalHold"},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}},httpChecksumRequired:!0},PutObjectLockConfiguration:{http:{method:"PUT",requestUri:"/{Bucket}?object-lock"},input:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ObjectLockConfiguration:{shape:"S9n",locationName:"ObjectLockConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},Token:{location:"header",locationName:"x-amz-bucket-object-lock-token"},ContentMD5:{location:"header",locationName:"Content-MD5"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"ObjectLockConfiguration"},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}},httpChecksumRequired:!0},PutObjectRetention:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}?retention"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},Retention:{shape:"S9v",locationName:"Retention",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},VersionId:{location:"querystring",locationName:"versionId"},BypassGovernanceRetention:{location:"header",locationName:"x-amz-bypass-governance-retention",type:"boolean"},ContentMD5:{location:"header",locationName:"Content-MD5"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"Retention"},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}},httpChecksumRequired:!0},PutObjectTagging:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}?tagging"},input:{type:"structure",required:["Bucket","Key","Tagging"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},ContentMD5:{location:"header",locationName:"Content-MD5"},Tagging:{shape:"Sct",locationName:"Tagging",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"}},payload:"Tagging"},output:{type:"structure",members:{VersionId:{location:"header",locationName:"x-amz-version-id"}}},httpChecksumRequired:!0},PutPublicAccessBlock:{http:{method:"PUT",requestUri:"/{Bucket}?publicAccessBlock"},input:{type:"structure",required:["Bucket","PublicAccessBlockConfiguration"],members:{Bucket:{location:"uri",locationName:"Bucket"},ContentMD5:{location:"header",locationName:"Content-MD5"},PublicAccessBlockConfiguration:{shape:"Sa2",locationName:"PublicAccessBlockConfiguration",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"PublicAccessBlockConfiguration"},httpChecksumRequired:!0},RestoreObject:{http:{requestUri:"/{Bucket}/{Key+}?restore"},input:{type:"structure",required:["Bucket","Key"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},VersionId:{location:"querystring",locationName:"versionId"},RestoreRequest:{locationName:"RestoreRequest",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",members:{Days:{type:"integer"},GlacierJobParameters:{type:"structure",required:["Tier"],members:{Tier:{}}},Type:{},Tier:{},Description:{},SelectParameters:{type:"structure",required:["InputSerialization","ExpressionType","Expression","OutputSerialization"],members:{InputSerialization:{shape:"Sdj"},ExpressionType:{},Expression:{},OutputSerialization:{shape:"Sdy"}}},OutputLocation:{type:"structure",members:{S3:{type:"structure",required:["BucketName","Prefix"],members:{BucketName:{},Prefix:{},Encryption:{type:"structure",required:["EncryptionType"],members:{EncryptionType:{},KMSKeyId:{shape:"Sk"},KMSContext:{}}},CannedACL:{},AccessControlList:{shape:"S3a"},Tagging:{shape:"Sct"},UserMetadata:{type:"list",member:{locationName:"MetadataEntry",type:"structure",members:{Name:{},Value:{}}}},StorageClass:{}}}}}}},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"RestoreRequest"},output:{type:"structure",members:{RequestCharged:{location:"header",locationName:"x-amz-request-charged"},RestoreOutputPath:{location:"header",locationName:"x-amz-restore-output-path"}}},alias:"PostObjectRestore"},SelectObjectContent:{http:{requestUri:"/{Bucket}/{Key+}?select&select-type=2"},input:{locationName:"SelectObjectContentRequest",xmlNamespace:{uri:"http://s3.amazonaws.com/doc/2006-03-01/"},type:"structure",required:["Bucket","Key","Expression","ExpressionType","InputSerialization","OutputSerialization"],members:{Bucket:{location:"uri",locationName:"Bucket"},Key:{location:"uri",locationName:"Key"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S1b",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},Expression:{},ExpressionType:{},RequestProgress:{type:"structure",members:{Enabled:{type:"boolean"}}},InputSerialization:{shape:"Sdj"},OutputSerialization:{shape:"Sdy"},ScanRange:{type:"structure",members:{Start:{type:"long"},End:{type:"long"}}},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},output:{type:"structure",members:{Payload:{type:"structure",members:{Records:{type:"structure",members:{Payload:{eventpayload:!0,type:"blob"}},event:!0},Stats:{type:"structure",members:{Details:{eventpayload:!0,type:"structure",members:{BytesScanned:{type:"long"},BytesProcessed:{type:"long"},BytesReturned:{type:"long"}}}},event:!0},Progress:{type:"structure",members:{Details:{eventpayload:!0,type:"structure",members:{BytesScanned:{type:"long"},BytesProcessed:{type:"long"},BytesReturned:{type:"long"}}}},event:!0},Cont:{type:"structure",members:{},event:!0},End:{type:"structure",members:{},event:!0}},eventstream:!0}},payload:"Payload"}},UploadPart:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","Key","PartNumber","UploadId"],members:{Body:{streaming:!0,type:"blob"},Bucket:{location:"uri",locationName:"Bucket"},ContentLength:{location:"header",locationName:"Content-Length",type:"long"},ContentMD5:{location:"header",locationName:"Content-MD5"},Key:{location:"uri",locationName:"Key"},PartNumber:{location:"querystring",locationName:"partNumber",type:"integer"},UploadId:{location:"querystring",locationName:"uploadId"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S1b",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}},payload:"Body"},output:{type:"structure",members:{ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},ETag:{location:"header",locationName:"ETag"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sk",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},BucketKeyEnabled:{location:"header",locationName:"x-amz-server-side-encryption-bucket-key-enabled",type:"boolean"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}}}},UploadPartCopy:{http:{method:"PUT",requestUri:"/{Bucket}/{Key+}"},input:{type:"structure",required:["Bucket","CopySource","Key","PartNumber","UploadId"],members:{Bucket:{location:"uri",locationName:"Bucket"},CopySource:{location:"header",locationName:"x-amz-copy-source"},CopySourceIfMatch:{location:"header",locationName:"x-amz-copy-source-if-match"},CopySourceIfModifiedSince:{location:"header",locationName:"x-amz-copy-source-if-modified-since",type:"timestamp"},CopySourceIfNoneMatch:{location:"header",locationName:"x-amz-copy-source-if-none-match"},CopySourceIfUnmodifiedSince:{location:"header",locationName:"x-amz-copy-source-if-unmodified-since",type:"timestamp"},CopySourceRange:{location:"header",locationName:"x-amz-copy-source-range"},Key:{location:"uri",locationName:"Key"},PartNumber:{location:"querystring",locationName:"partNumber",type:"integer"},UploadId:{location:"querystring",locationName:"uploadId"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKey:{shape:"S1b",location:"header",locationName:"x-amz-server-side-encryption-customer-key"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},CopySourceSSECustomerAlgorithm:{location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-algorithm"},CopySourceSSECustomerKey:{shape:"S1f",location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-key"},CopySourceSSECustomerKeyMD5:{location:"header",locationName:"x-amz-copy-source-server-side-encryption-customer-key-MD5"},RequestPayer:{location:"header",locationName:"x-amz-request-payer"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"},ExpectedSourceBucketOwner:{location:"header",locationName:"x-amz-source-expected-bucket-owner"}}},output:{type:"structure",members:{CopySourceVersionId:{location:"header",locationName:"x-amz-copy-source-version-id"},CopyPartResult:{type:"structure",members:{ETag:{},LastModified:{type:"timestamp"}}},ServerSideEncryption:{location:"header",locationName:"x-amz-server-side-encryption"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-server-side-encryption-customer-algorithm"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-server-side-encryption-customer-key-MD5"},SSEKMSKeyId:{shape:"Sk",location:"header",locationName:"x-amz-server-side-encryption-aws-kms-key-id"},BucketKeyEnabled:{location:"header",locationName:"x-amz-server-side-encryption-bucket-key-enabled",type:"boolean"},RequestCharged:{location:"header",locationName:"x-amz-request-charged"}},payload:"CopyPartResult"}},WriteGetObjectResponse:{http:{requestUri:"/WriteGetObjectResponse"},input:{type:"structure",required:["RequestRoute","RequestToken"],members:{RequestRoute:{hostLabel:!0,location:"header",locationName:"x-amz-request-route"},RequestToken:{location:"header",locationName:"x-amz-request-token"},Body:{streaming:!0,type:"blob"},StatusCode:{location:"header",locationName:"x-amz-fwd-status",type:"integer"},ErrorCode:{location:"header",locationName:"x-amz-fwd-error-code"},ErrorMessage:{location:"header",locationName:"x-amz-fwd-error-message"},AcceptRanges:{location:"header",locationName:"x-amz-fwd-header-accept-ranges"},CacheControl:{location:"header",locationName:"x-amz-fwd-header-Cache-Control"},ContentDisposition:{location:"header",locationName:"x-amz-fwd-header-Content-Disposition"},ContentEncoding:{location:"header",locationName:"x-amz-fwd-header-Content-Encoding"},ContentLanguage:{location:"header",locationName:"x-amz-fwd-header-Content-Language"},ContentLength:{location:"header",locationName:"Content-Length",type:"long"},ContentRange:{location:"header",locationName:"x-amz-fwd-header-Content-Range"},ContentType:{location:"header",locationName:"x-amz-fwd-header-Content-Type"},DeleteMarker:{location:"header",locationName:"x-amz-fwd-header-x-amz-delete-marker",type:"boolean"},ETag:{location:"header",locationName:"x-amz-fwd-header-ETag"},Expires:{location:"header",locationName:"x-amz-fwd-header-Expires",type:"timestamp"},Expiration:{location:"header",locationName:"x-amz-fwd-header-x-amz-expiration"},LastModified:{location:"header",locationName:"x-amz-fwd-header-Last-Modified",type:"timestamp"},MissingMeta:{location:"header",locationName:"x-amz-fwd-header-x-amz-missing-meta",type:"integer"},Metadata:{shape:"S13",location:"headers",locationName:"x-amz-meta-"},ObjectLockMode:{location:"header",locationName:"x-amz-fwd-header-x-amz-object-lock-mode"},ObjectLockLegalHoldStatus:{location:"header",locationName:"x-amz-fwd-header-x-amz-object-lock-legal-hold"},ObjectLockRetainUntilDate:{shape:"S1j",location:"header",locationName:"x-amz-fwd-header-x-amz-object-lock-retain-until-date"},PartsCount:{location:"header",locationName:"x-amz-fwd-header-x-amz-mp-parts-count",type:"integer"},ReplicationStatus:{location:"header",locationName:"x-amz-fwd-header-x-amz-replication-status"},RequestCharged:{location:"header",locationName:"x-amz-fwd-header-x-amz-request-charged"},Restore:{location:"header",locationName:"x-amz-fwd-header-x-amz-restore"},ServerSideEncryption:{location:"header",locationName:"x-amz-fwd-header-x-amz-server-side-encryption"},SSECustomerAlgorithm:{location:"header",locationName:"x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm"},SSEKMSKeyId:{shape:"Sk",location:"header",locationName:"x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id"},SSECustomerKeyMD5:{location:"header",locationName:"x-amz-fwd-header-x-amz-server-side-encryption-customer-key-MD5"},StorageClass:{location:"header",locationName:"x-amz-fwd-header-x-amz-storage-class"},TagCount:{location:"header",locationName:"x-amz-fwd-header-x-amz-tagging-count",type:"integer"},VersionId:{location:"header",locationName:"x-amz-fwd-header-x-amz-version-id"},BucketKeyEnabled:{location:"header",locationName:"x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled",type:"boolean"}},payload:"Body"},authtype:"v4-unsigned-body",endpoint:{hostPrefix:"{RequestRoute}."}}},shapes:{Sk:{type:"string",sensitive:!0},S13:{type:"map",key:{},value:{}},S1b:{type:"blob",sensitive:!0},S1d:{type:"string",sensitive:!0},S1f:{type:"blob",sensitive:!0},S1j:{type:"timestamp",timestampFormat:"iso8601"},S37:{type:"structure",members:{DisplayName:{},ID:{}}},S3a:{type:"list",member:{locationName:"Grant",type:"structure",members:{Grantee:{shape:"S3c"},Permission:{}}}},S3c:{type:"structure",required:["Type"],members:{DisplayName:{},EmailAddress:{},ID:{},Type:{locationName:"xsi:type",xmlAttribute:!0},URI:{}},xmlNamespace:{prefix:"xsi",uri:"http://www.w3.org/2001/XMLSchema-instance"}},S3j:{type:"structure",required:["Id","StorageClassAnalysis"],members:{Id:{},Filter:{type:"structure",members:{Prefix:{},Tag:{shape:"S3m"},And:{type:"structure",members:{Prefix:{},Tags:{shape:"S3p",flattened:!0,locationName:"Tag"}}}}},StorageClassAnalysis:{type:"structure",members:{DataExport:{type:"structure",required:["OutputSchemaVersion","Destination"],members:{OutputSchemaVersion:{},Destination:{type:"structure",required:["S3BucketDestination"],members:{S3BucketDestination:{type:"structure",required:["Format","Bucket"],members:{Format:{},BucketAccountId:{},Bucket:{},Prefix:{}}}}}}}}}}},S3m:{type:"structure",required:["Key","Value"],members:{Key:{},Value:{}}},S3p:{type:"list",member:{shape:"S3m",locationName:"Tag"}},S3y:{type:"list",member:{type:"structure",required:["AllowedMethods","AllowedOrigins"],members:{ID:{},AllowedHeaders:{locationName:"AllowedHeader",type:"list",member:{},flattened:!0},AllowedMethods:{locationName:"AllowedMethod",type:"list",member:{},flattened:!0},AllowedOrigins:{locationName:"AllowedOrigin",type:"list",member:{},flattened:!0},ExposeHeaders:{locationName:"ExposeHeader",type:"list",member:{},flattened:!0},MaxAgeSeconds:{type:"integer"}}},flattened:!0},S4b:{type:"structure",required:["Rules"],members:{Rules:{locationName:"Rule",type:"list",member:{type:"structure",members:{ApplyServerSideEncryptionByDefault:{type:"structure",required:["SSEAlgorithm"],members:{SSEAlgorithm:{},KMSMasterKeyID:{shape:"Sk"}}},BucketKeyEnabled:{type:"boolean"}}},flattened:!0}}},S4h:{type:"structure",required:["Id","Status","Tierings"],members:{Id:{},Filter:{type:"structure",members:{Prefix:{},Tag:{shape:"S3m"},And:{type:"structure",members:{Prefix:{},Tags:{shape:"S3p",flattened:!0,locationName:"Tag"}}}}},Status:{},Tierings:{locationName:"Tiering",type:"list",member:{type:"structure",required:["Days","AccessTier"],members:{Days:{type:"integer"},AccessTier:{}}},flattened:!0}}},S4r:{type:"structure",required:["Destination","IsEnabled","Id","IncludedObjectVersions","Schedule"],members:{Destination:{type:"structure",required:["S3BucketDestination"],members:{S3BucketDestination:{type:"structure",required:["Bucket","Format"],members:{AccountId:{},Bucket:{},Format:{},Prefix:{},Encryption:{type:"structure",members:{SSES3:{locationName:"SSE-S3",type:"structure",members:{}},SSEKMS:{locationName:"SSE-KMS",type:"structure",required:["KeyId"],members:{KeyId:{shape:"Sk"}}}}}}}}},IsEnabled:{type:"boolean"},Filter:{type:"structure",required:["Prefix"],members:{Prefix:{}}},Id:{},IncludedObjectVersions:{},OptionalFields:{type:"list",member:{locationName:"Field"}},Schedule:{type:"structure",required:["Frequency"],members:{Frequency:{}}}}},S57:{type:"list",member:{type:"structure",required:["Prefix","Status"],members:{Expiration:{shape:"S59"},ID:{},Prefix:{},Status:{},Transition:{shape:"S5e"},NoncurrentVersionTransition:{shape:"S5g"},NoncurrentVersionExpiration:{shape:"S5h"},AbortIncompleteMultipartUpload:{shape:"S5i"}}},flattened:!0},S59:{type:"structure",members:{Date:{shape:"S5a"},Days:{type:"integer"},ExpiredObjectDeleteMarker:{type:"boolean"}}},S5a:{type:"timestamp",timestampFormat:"iso8601"},S5e:{type:"structure",members:{Date:{shape:"S5a"},Days:{type:"integer"},StorageClass:{}}},S5g:{type:"structure",members:{NoncurrentDays:{type:"integer"},StorageClass:{}}},S5h:{type:"structure",members:{NoncurrentDays:{type:"integer"}}},S5i:{type:"structure",members:{DaysAfterInitiation:{type:"integer"}}},S5m:{type:"list",member:{type:"structure",required:["Status"],members:{Expiration:{shape:"S59"},ID:{},Prefix:{deprecated:!0},Filter:{type:"structure",members:{Prefix:{},Tag:{shape:"S3m"},And:{type:"structure",members:{Prefix:{},Tags:{shape:"S3p",flattened:!0,locationName:"Tag"}}}}},Status:{},Transitions:{locationName:"Transition",type:"list",member:{shape:"S5e"},flattened:!0},NoncurrentVersionTransitions:{locationName:"NoncurrentVersionTransition",type:"list",member:{shape:"S5g"},flattened:!0},NoncurrentVersionExpiration:{shape:"S5h"},AbortIncompleteMultipartUpload:{shape:"S5i"}}},flattened:!0},S5w:{type:"structure",required:["TargetBucket","TargetPrefix"],members:{TargetBucket:{},TargetGrants:{type:"list",member:{locationName:"Grant",type:"structure",members:{Grantee:{shape:"S3c"},Permission:{}}}},TargetPrefix:{}}},S64:{type:"structure",required:["Id"],members:{Id:{},Filter:{type:"structure",members:{Prefix:{},Tag:{shape:"S3m"},And:{type:"structure",members:{Prefix:{},Tags:{shape:"S3p",flattened:!0,locationName:"Tag"}}}}}}},S67:{type:"structure",required:["Bucket"],members:{Bucket:{location:"uri",locationName:"Bucket"},ExpectedBucketOwner:{location:"header",locationName:"x-amz-expected-bucket-owner"}}},S68:{type:"structure",members:{TopicConfiguration:{type:"structure",members:{Id:{},Events:{shape:"S6b",locationName:"Event"},Event:{deprecated:!0},Topic:{}}},QueueConfiguration:{type:"structure",members:{Id:{},Event:{deprecated:!0},Events:{shape:"S6b",locationName:"Event"},Queue:{}}},CloudFunctionConfiguration:{type:"structure",members:{Id:{},Event:{deprecated:!0},Events:{shape:"S6b",locationName:"Event"},CloudFunction:{},InvocationRole:{}}}}},S6b:{type:"list",member:{},flattened:!0},S6j:{type:"structure",members:{TopicConfigurations:{locationName:"TopicConfiguration",type:"list",member:{type:"structure",required:["TopicArn","Events"],members:{Id:{},TopicArn:{locationName:"Topic"},Events:{shape:"S6b",locationName:"Event"},Filter:{shape:"S6m"}}},flattened:!0},QueueConfigurations:{locationName:"QueueConfiguration",type:"list",member:{type:"structure",required:["QueueArn","Events"],members:{Id:{},QueueArn:{locationName:"Queue"},Events:{shape:"S6b",locationName:"Event"},Filter:{shape:"S6m"}}},flattened:!0},LambdaFunctionConfigurations:{locationName:"CloudFunctionConfiguration",type:"list",member:{type:"structure",required:["LambdaFunctionArn","Events"],members:{Id:{},LambdaFunctionArn:{locationName:"CloudFunction"},Events:{shape:"S6b",locationName:"Event"},Filter:{shape:"S6m"}}},flattened:!0}}},S6m:{type:"structure",members:{Key:{locationName:"S3Key",type:"structure",members:{FilterRules:{locationName:"FilterRule",type:"list",member:{type:"structure",members:{Name:{},Value:{}}},flattened:!0}}}}},S6z:{type:"structure",required:["Rules"],members:{Rules:{locationName:"Rule",type:"list",member:{type:"structure",required:["ObjectOwnership"],members:{ObjectOwnership:{}}},flattened:!0}}},S7c:{type:"structure",required:["Role","Rules"],members:{Role:{},Rules:{locationName:"Rule",type:"list",member:{type:"structure",required:["Status","Destination"],members:{ID:{},Priority:{type:"integer"},Prefix:{deprecated:!0},Filter:{type:"structure",members:{Prefix:{},Tag:{shape:"S3m"},And:{type:"structure",members:{Prefix:{},Tags:{shape:"S3p",flattened:!0,locationName:"Tag"}}}}},Status:{},SourceSelectionCriteria:{type:"structure",members:{SseKmsEncryptedObjects:{type:"structure",required:["Status"],members:{Status:{}}},ReplicaModifications:{type:"structure",required:["Status"],members:{Status:{}}}}},ExistingObjectReplication:{type:"structure",required:["Status"],members:{Status:{}}},Destination:{type:"structure",required:["Bucket"],members:{Bucket:{},Account:{},StorageClass:{},AccessControlTranslation:{type:"structure",required:["Owner"],members:{Owner:{}}},EncryptionConfiguration:{type:"structure",members:{ReplicaKmsKeyID:{}}},ReplicationTime:{type:"structure",required:["Status","Time"],members:{Status:{},Time:{shape:"S7y"}}},Metrics:{type:"structure",required:["Status"],members:{Status:{},EventThreshold:{shape:"S7y"}}}}},DeleteMarkerReplication:{type:"structure",members:{Status:{}}}}},flattened:!0}}},S7y:{type:"structure",members:{Minutes:{type:"integer"}}},S8f:{type:"structure",required:["HostName"],members:{HostName:{},Protocol:{}}},S8i:{type:"structure",required:["Suffix"],members:{Suffix:{}}},S8k:{type:"structure",required:["Key"],members:{Key:{}}},S8l:{type:"list",member:{locationName:"RoutingRule",type:"structure",required:["Redirect"],members:{Condition:{type:"structure",members:{HttpErrorCodeReturnedEquals:{},KeyPrefixEquals:{}}},Redirect:{type:"structure",members:{HostName:{},HttpRedirectCode:{},Protocol:{},ReplaceKeyPrefixWith:{},ReplaceKeyWith:{}}}}}},S9k:{type:"structure",members:{Status:{}}},S9n:{type:"structure",members:{ObjectLockEnabled:{},Rule:{type:"structure",members:{DefaultRetention:{type:"structure",members:{Mode:{},Days:{type:"integer"},Years:{type:"integer"}}}}}}},S9v:{type:"structure",members:{Mode:{},RetainUntilDate:{shape:"S5a"}}},Sa2:{type:"structure",members:{BlockPublicAcls:{locationName:"BlockPublicAcls",type:"boolean"},IgnorePublicAcls:{locationName:"IgnorePublicAcls",type:"boolean"},BlockPublicPolicy:{locationName:"BlockPublicPolicy",type:"boolean"},RestrictPublicBuckets:{locationName:"RestrictPublicBuckets",type:"boolean"}}},Sb3:{type:"structure",members:{ID:{},DisplayName:{}}},Sb4:{type:"list",member:{type:"structure",members:{Prefix:{}}},flattened:!0},Sbm:{type:"list",member:{type:"structure",members:{Key:{},LastModified:{type:"timestamp"},ETag:{},Size:{type:"integer"},StorageClass:{},Owner:{shape:"S37"}}},flattened:!0},Sc4:{type:"structure",members:{Grants:{shape:"S3a",locationName:"AccessControlList"},Owner:{shape:"S37"}}},Sct:{type:"structure",required:["TagSet"],members:{TagSet:{shape:"S3p"}}},Sdj:{type:"structure",members:{CSV:{type:"structure",members:{FileHeaderInfo:{},Comments:{},QuoteEscapeCharacter:{},RecordDelimiter:{},FieldDelimiter:{},QuoteCharacter:{},AllowQuotedRecordDelimiter:{type:"boolean"}}},CompressionType:{},JSON:{type:"structure",members:{Type:{}}},Parquet:{type:"structure",members:{}}}},Sdy:{type:"structure",members:{CSV:{type:"structure",members:{QuoteFields:{},QuoteEscapeCharacter:{},RecordDelimiter:{},FieldDelimiter:{},QuoteCharacter:{}}},JSON:{type:"structure",members:{RecordDelimiter:{}}}}}}}});var jx=U((iZ,MD)=>{MD.exports={pagination:{ListBuckets:{result_key:"Buckets"},ListMultipartUploads:{input_token:["KeyMarker","UploadIdMarker"],limit_key:"MaxUploads",more_results:"IsTruncated",output_token:["NextKeyMarker","NextUploadIdMarker"],result_key:["Uploads","CommonPrefixes"]},ListObjectVersions:{input_token:["KeyMarker","VersionIdMarker"],limit_key:"MaxKeys",more_results:"IsTruncated",output_token:["NextKeyMarker","NextVersionIdMarker"],result_key:["Versions","DeleteMarkers","CommonPrefixes"]},ListObjects:{input_token:"Marker",limit_key:"MaxKeys",more_results:"IsTruncated",output_token:"NextMarker || Contents[-1].Key",result_key:["Contents","CommonPrefixes"]},ListObjectsV2:{input_token:"ContinuationToken",limit_key:"MaxKeys",output_token:"NextContinuationToken",result_key:["Contents","CommonPrefixes"]},ListParts:{input_token:"PartNumberMarker",limit_key:"MaxParts",more_results:"IsTruncated",output_token:"NextPartNumberMarker",result_key:"Parts"}}}});var Hx=U((nZ,kD)=>{kD.exports={version:2,waiters:{BucketExists:{delay:5,operation:"HeadBucket",maxAttempts:20,acceptors:[{expected:200,matcher:"status",state:"success"},{expected:301,matcher:"status",state:"success"},{expected:403,matcher:"status",state:"success"},{expected:404,matcher:"status",state:"retry"}]},BucketNotExists:{delay:5,operation:"HeadBucket",maxAttempts:20,acceptors:[{expected:404,matcher:"status",state:"success"}]},ObjectExists:{delay:5,operation:"HeadObject",maxAttempts:20,acceptors:[{expected:200,matcher:"status",state:"success"},{expected:404,matcher:"status",state:"retry"}]},ObjectNotExists:{delay:5,operation:"HeadObject",maxAttempts:20,acceptors:[{expected:404,matcher:"status",state:"success"}]}}}});var pg=U((sZ,Gx)=>{_c();var yd=me(),ID=yd.Service,Wx=yd.apiLoader;Wx.services.s3={};yd.S3=ID.defineService("s3",["2006-03-01"]);Fx();Object.defineProperty(Wx.services.s3,"2006-03-01",{get:function(){var e=Ux();return e.paginators=jx().pagination,e.waiters=Hx().waiters,e},enumerable:!0,configurable:!0});Gx.exports=yd.S3});var mg=U((FZ,Qx)=>{"use strict";function LD(t,e){return e}Qx.exports=function(){let e=Error.prepareStackTrace;Error.prepareStackTrace=LD;let r=new Error().stack;if(Error.prepareStackTrace=e,!Array.isArray(r))return;let i=r.slice(2),n=[];for(let s of i)!s||n.push(s.getFileName());return n}});var nl=U((UZ,ew)=>{"use strict";var OD=Symbol("pino.setLevel"),BD=Symbol("pino.getLevel"),DD=Symbol("pino.levelVal"),qD=Symbol("pino.useLevelLabels"),zD=Symbol("pino.useOnlyCustomLevels"),FD=Symbol("pino.mixin"),UD=Symbol("pino.lsCache"),jD=Symbol("pino.chindings"),HD=Symbol("pino.asJson"),WD=Symbol("pino.write"),GD=Symbol("pino.redactFmt"),KD=Symbol("pino.time"),VD=Symbol("pino.timeSliceIndex"),$D=Symbol("pino.stream"),XD=Symbol("pino.stringify"),JD=Symbol("pino.stringifySafe"),YD=Symbol("pino.stringifiers"),ZD=Symbol("pino.end"),QD=Symbol("pino.formatOpts"),eq=Symbol("pino.messageKey"),tq=Symbol("pino.nestedKey"),rq=Symbol("pino.nestedKeyStr"),iq=Symbol("pino.mixinMergeStrategy"),nq=Symbol("pino.wildcardFirst"),sq=Symbol.for("pino.serializers"),oq=Symbol.for("pino.formatters"),aq=Symbol.for("pino.hooks"),uq=Symbol.for("pino.metadata");ew.exports={setLevelSym:OD,getLevelSym:BD,levelValSym:DD,useLevelLabelsSym:qD,mixinSym:FD,lsCacheSym:UD,chindingsSym:jD,asJsonSym:HD,writeSym:WD,serializersSym:sq,redactFmtSym:GD,timeSym:KD,timeSliceIndexSym:VD,streamSym:$D,stringifySym:XD,stringifySafeSym:JD,stringifiersSym:YD,endSym:ZD,formatOptsSym:QD,messageKeySym:eq,nestedKeySym:tq,wildcardFirstSym:nq,needsMetadataGsym:uq,useOnlyCustomLevelsSym:zD,formattersSym:oq,hooksSym:aq,nestedKeyStrSym:rq,mixinMergeStrategySym:iq}});var vg=U((jZ,nw)=>{"use strict";var gg=am(),{redactFmtSym:lq,wildcardFirstSym:bd}=nl(),{rx:yg,validator:cq}=gg,tw=cq({ERR_PATHS_MUST_BE_STRINGS:()=>"pino \u2013 redacted paths must be strings",ERR_INVALID_PATH:t=>`pino \u2013 redact paths array contains an invalid path (${t})`}),rw="[Redacted]",iw=!1;function fq(t,e){let{paths:r,censor:i}=hq(t),n=r.reduce((u,l)=>{yg.lastIndex=0;let d=yg.exec(l),h=yg.exec(l),m=d[1]!==void 0?d[1].replace(/^(?:"|'|`)(.*)(?:"|'|`)$/,"$1"):d[0];if(m==="*"&&(m=bd),h===null)return u[m]=null,u;if(u[m]===null)return u;let{index:b}=h,S=`${l.substr(b,l.length-1)}`;return u[m]=u[m]||[],m!==bd&&u[m].length===0&&u[m].push(...u[bd]||[]),m===bd&&Object.keys(u).forEach(function(y){u[y]&&u[y].push(S)}),u[m].push(S),u},{}),s={[lq]:gg({paths:r,censor:i,serialize:e,strict:iw})},o=(...u)=>e(typeof i=="function"?i(...u):i);return[...Object.keys(n),...Object.getOwnPropertySymbols(n)].reduce((u,l)=>{if(n[l]===null)u[l]=d=>o(d,[l]);else{let d=typeof i=="function"?(h,m)=>i(h,[l,...m]):i;u[l]=gg({paths:n[l],censor:d,serialize:e,strict:iw})}return u},s)}function hq(t){if(Array.isArray(t))return t={paths:t,censor:rw},tw(t),t;let{paths:e,censor:r=rw,remove:i}=t;if(Array.isArray(e)===!1)throw Error("pino \u2013 redact must contain an array of strings");return i===!0&&(r=void 0),tw({paths:e,censor:r}),{paths:e,censor:r}}nw.exports=fq});var ow=U((HZ,sw)=>{"use strict";var dq=()=>"",pq=()=>`,"time":${Date.now()}`,mq=()=>`,"time":${Math.round(Date.now()/1e3)}`,yq=()=>`,"time":"${new Date(Date.now()).toISOString()}"`;sw.exports={nullTime:dq,epochTime:pq,unixTime:mq,isoTime:yq}});var xg=U((WZ,aw)=>{"use strict";var{createRequire:gq}=require("module"),vq=mg(),{join:bg,isAbsolute:bq}=require("path"),Sq=yf(),Sg=$l(),xq=Sm();function wq(t){Sg.register(t,_q),Sg.registerBeforeExit(t,Cq),t.on("close",function(){Sg.unregister(t)})}function Eq(t,e,r){let i=new xq({filename:t,workerData:e,workerOpts:r});i.on("ready",n),i.on("close",function(){process.removeListener("exit",s)}),process.on("exit",s);function n(){process.removeListener("exit",s),i.unref(),r.autoEnd!==!1&&wq(i)}function s(){i.closed||(i.flushSync(),Sq(100),i.end())}return i}function _q(t){t.ref(),t.flushSync(),t.end(),t.once("close",function(){t.unref()})}function Cq(t){t.flushSync()}function Rq(t){let{pipeline:e,targets:r,levels:i,options:n={},worker:s={},caller:o=vq()}=t,u=typeof o=="string"?[o]:o,l="__bundlerPathsOverrides"in globalThis?globalThis.__bundlerPathsOverrides:{},d=t.target;if(d&&r)throw new Error("only one of target or targets can be specified");return r?(d=l["pino-worker"]||bg(__dirname,"worker.js"),n.targets=r.map(m=>({...m,target:h(m.target)}))):e&&(d=l["pino-pipeline-worker"]||bg(__dirname,"worker-pipeline.js"),n.targets=e.map(m=>({...m,target:h(m.target)}))),i&&(n.levels=i),Eq(h(d),n,s);function h(m){if(m=l[m]||m,bq(m)||m.indexOf("file://")===0)return m;if(m==="pino/file")return bg(__dirname,"..","file.js");let b;for(let S of u)try{b=gq(S).resolve(m);break}catch{continue}if(!b)throw new Error(`unable to determine transport target for "${m}"`);return b}}aw.exports=Rq});var xd=U((GZ,bw)=>{"use strict";var uw=fm(),{mapHttpRequest:Tq,mapHttpResponse:Nq}=Vl(),wg=pm(),lw=$l(),{lsCacheSym:Aq,chindingsSym:dw,writeSym:cw,serializersSym:pw,formatOptsSym:fw,endSym:Mq,stringifiersSym:mw,stringifySym:yw,stringifySafeSym:Eg,wildcardFirstSym:gw,nestedKeySym:kq,formattersSym:vw,messageKeySym:Iq,nestedKeyStrSym:Pq}=nl(),{isMainThread:Lq}=require("worker_threads"),Oq=xg();function c1(){}function Bq(t,e){if(!e)return r;return function(...n){e.call(this,n,r,t)};function r(i,...n){if(typeof i=="object"){let s=i;i!==null&&(i.method&&i.headers&&i.socket?i=Tq(i):typeof i.setHeader=="function"&&(i=Nq(i)));let o;s===null&&n.length===0?o=[null]:(s=n.shift(),o=n),this[cw](i,uw(s,o,this[fw]),t)}else this[cw](null,uw(i,n,this[fw]),t)}}function hw(t){let e="",r=0,i=!1,n=255,s=t.length;if(s>100)return JSON.stringify(t);for(var o=0;o<s&&n>=32;o++)n=t.charCodeAt(o),(n===34||n===92)&&(e+=t.slice(r,o)+"\\",r=o,i=!0);return i?e+=t.slice(r):e=t,n<32?JSON.stringify(t):'"'+e+'"'}function Dq(t,e,r,i){let n=this[yw],s=this[Eg],o=this[mw],u=this[Mq],l=this[dw],d=this[pw],h=this[vw],m=this[Iq],b=this[Aq][r]+i;b=b+l;let S;h.log&&(t=h.log(t));let y=o[gw],v="";for(let w in t)if(S=t[w],Object.prototype.hasOwnProperty.call(t,w)&&S!==void 0){S=d[w]?d[w](S):S;let x=o[w]||y;switch(typeof S){case"undefined":case"function":continue;case"number":Number.isFinite(S)===!1&&(S=null);case"boolean":x&&(S=x(S));break;case"string":S=(x||hw)(S);break;default:S=(x||n)(S,s)}if(S===void 0)continue;v+=',"'+w+'":'+S}let C="";if(e!==void 0){S=d[m]?d[m](e):e;let w=o[m]||y;switch(typeof S){case"function":break;case"number":Number.isFinite(S)===!1&&(S=null);case"boolean":w&&(S=w(S)),C=',"'+m+'":'+S;break;case"string":S=(w||hw)(S),C=',"'+m+'":'+S;break;default:S=(w||n)(S,s),C=',"'+m+'":'+S}}return this[kq]&&v?b+this[Pq]+v.slice(1)+"}"+C+u:b+v+C+u}function qq(t,e){let r,i=t[dw],n=t[yw],s=t[Eg],o=t[mw],u=o[gw],l=t[pw],d=t[vw].bindings;e=d(e);for(let h in e)if(r=e[h],(h!=="level"&&h!=="serializers"&&h!=="formatters"&&h!=="customLevels"&&e.hasOwnProperty(h)&&r!==void 0)===!0){if(r=l[h]?l[h](r):r,r=(o[h]||u||n)(r,s),r===void 0)continue;i+=',"'+h+'":'+r}return i}function zq(t){return t.write!==t.constructor.prototype.write}function Sd(t){let e=new wg(t);return e.on("error",r),!t.sync&&Lq&&(lw.register(e,Fq),e.on("close",function(){lw.unregister(e)})),e;function r(i){if(i.code==="EPIPE"){e.write=c1,e.end=c1,e.flushSync=c1,e.destroy=c1;return}e.removeListener("error",r),e.emit("error",i)}}function Fq(t,e){t.destroyed||(e==="beforeExit"?(t.flush(),t.on("drain",function(){t.end()})):t.flushSync())}function Uq(t){return function(r,i,n={},s){if(typeof n=="string")s=Sd({dest:n}),n={};else if(typeof s=="string"){if(n&&n.transport)throw Error("only one of option.transport or stream can be specified");s=Sd({dest:s})}else if(n instanceof wg||n.writable||n._writableState)s=n,n={};else if(n.transport){if(n.transport instanceof wg||n.transport.writable||n.transport._writableState)throw Error("option.transport do not allow stream, please pass to option directly. e.g. pino(transport)");if(n.transport.targets&&n.transport.targets.length&&n.formatters&&typeof n.formatters.level=="function")throw Error("option.transport.targets do not allow custom level formatters");let u;n.customLevels&&(u=n.useOnlyCustomLevels?n.customLevels:Object.assign({},n.levels,n.customLevels)),s=Oq({caller:i,...n.transport,levels:u})}if(n=Object.assign({},t,n),n.serializers=Object.assign({},t.serializers,n.serializers),n.formatters=Object.assign({},t.formatters,n.formatters),n.prettyPrint)throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");if("onTerminated"in n)throw Error("The onTerminated option has been removed, use pino.final instead");let{enabled:o}=n;return o===!1&&(n.level="silent"),s||(zq(process.stdout)?s=process.stdout:s=Sd({fd:process.stdout.fd})),{opts:n,stream:s}}}function jq(t,e){try{return JSON.stringify(t)}catch{try{return(e||this[Eg])(t)}catch{return'"[unable to serialize, circular reference is too complex to analyze]"'}}}function Hq(t,e,r){return{level:t,bindings:e,log:r}}function Wq(t){let e=Number(t);return typeof t=="string"&&Number.isFinite(e)?e:t}bw.exports={noop:c1,buildSafeSonicBoom:Sd,asChindings:qq,asJson:Dq,genLog:Bq,createArgsNormalizer:Uq,stringify:jq,buildFormatters:Hq,normalizeDestFileDescriptor:Wq}});var wd=U((KZ,xw)=>{"use strict";var{lsCacheSym:Gq,levelValSym:_g,useOnlyCustomLevelsSym:Kq,streamSym:Vq,formattersSym:$q,hooksSym:Xq}=nl(),{noop:Jq,genLog:wa}=xd(),cn={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Sw={fatal:t=>{let e=wa(cn.fatal,t);return function(...r){let i=this[Vq];if(e.call(this,...r),typeof i.flushSync=="function")try{i.flushSync()}catch{}}},error:t=>wa(cn.error,t),warn:t=>wa(cn.warn,t),info:t=>wa(cn.info,t),debug:t=>wa(cn.debug,t),trace:t=>wa(cn.trace,t)},Cg=Object.keys(cn).reduce((t,e)=>(t[cn[e]]=e,t),{}),Yq=Object.keys(Cg).reduce((t,e)=>(t[e]='{"level":'+Number(e),t),{});function Zq(t){let e=t[$q].level,{labels:r}=t.levels,i={};for(let n in r){let s=e(r[n],Number(n));i[n]=JSON.stringify(s).slice(0,-1)}return t[Gq]=i,t}function Qq(t,e){if(e)return!1;switch(t){case"fatal":case"error":case"warn":case"info":case"debug":case"trace":return!0;default:return!1}}function ez(t){let{labels:e,values:r}=this.levels;if(typeof t=="number"){if(e[t]===void 0)throw Error("unknown level value"+t);t=e[t]}if(r[t]===void 0)throw Error("unknown level "+t);let i=this[_g],n=this[_g]=r[t],s=this[Kq],o=this[Xq].logMethod;for(let u in r){if(n>r[u]){this[u]=Jq;continue}this[u]=Qq(u,s)?Sw[u](o):wa(r[u],o)}this.emit("level-change",t,n,e[i],i)}function tz(t){let{levels:e,levelVal:r}=this;return e&&e.labels?e.labels[r]:""}function rz(t){let{values:e}=this.levels,r=e[t];return r!==void 0&&r>=this[_g]}function iz(t=null,e=!1){let r=t?Object.keys(t).reduce((s,o)=>(s[t[o]]=o,s),{}):null,i=Object.assign(Object.create(Object.prototype,{Infinity:{value:"silent"}}),e?null:Cg,r),n=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),e?null:cn,t);return{labels:i,values:n}}function nz(t,e,r){if(typeof t=="number"){if(![].concat(Object.keys(e||{}).map(s=>e[s]),r?[]:Object.keys(Cg).map(s=>+s),1/0).includes(t))throw Error(`default level:${t} must be included in custom levels`);return}let i=Object.assign(Object.create(Object.prototype,{silent:{value:1/0}}),r?null:cn,e);if(!(t in i))throw Error(`default level:${t} must be included in custom levels`)}function sz(t,e){let{labels:r,values:i}=t;for(let n in e){if(n in i)throw Error("levels cannot be overridden");if(e[n]in r)throw Error("pre-existing level values cannot be used for new levels")}}xw.exports={initialLsCache:Yq,genLsCache:Zq,levelMethods:Sw,getLevel:tz,setLevel:ez,isLevelEnabled:rz,mappings:iz,levels:cn,assertNoLevelCollisions:sz,assertDefaultLevelFound:nz}});var Rg=U((VZ,ww)=>{"use strict";ww.exports={version:"8.3.0"}});var Iw=U((XZ,kw)=>{"use strict";var{EventEmitter:oz}=require("events"),{lsCacheSym:az,levelValSym:uz,setLevelSym:Ng,getLevelSym:Ew,chindingsSym:Ag,parsedChindingsSym:lz,mixinSym:cz,asJsonSym:Tw,writeSym:fz,mixinMergeStrategySym:hz,timeSym:dz,timeSliceIndexSym:pz,streamSym:Nw,serializersSym:Ea,formattersSym:Tg,useOnlyCustomLevelsSym:mz,needsMetadataGsym:yz,redactFmtSym:gz,stringifySym:vz,formatOptsSym:bz,stringifiersSym:Sz}=nl(),{getLevel:xz,setLevel:wz,isLevelEnabled:Ez,mappings:_z,initialLsCache:Cz,genLsCache:Rz,assertNoLevelCollisions:Tz}=wd(),{asChindings:Aw,asJson:Nz,buildFormatters:_w,stringify:Cw}=xd(),{version:Az}=Rg(),Mz=vg(),kz=class{},Mw={constructor:kz,child:Iz,bindings:Pz,setBindings:Lz,flush:qz,isLevelEnabled:Ez,version:Az,get level(){return this[Ew]()},set level(t){this[Ng](t)},get levelVal(){return this[uz]},set levelVal(t){throw Error("levelVal is read-only")},[az]:Cz,[fz]:Bz,[Tw]:Nz,[Ew]:xz,[Ng]:wz};Object.setPrototypeOf(Mw,oz.prototype);kw.exports=function(){return Object.create(Mw)};var Rw=t=>t;function Iz(t,e){if(!t)throw Error("missing bindings for child Pino");e=e||{};let r=this[Ea],i=this[Tg],n=Object.create(this);if(e.hasOwnProperty("serializers")===!0){n[Ea]=Object.create(null);for(let h in r)n[Ea][h]=r[h];let l=Object.getOwnPropertySymbols(r);for(var s=0;s<l.length;s++){let h=l[s];n[Ea][h]=r[h]}for(let h in e.serializers)n[Ea][h]=e.serializers[h];let d=Object.getOwnPropertySymbols(e.serializers);for(var o=0;o<d.length;o++){let h=d[o];n[Ea][h]=e.serializers[h]}}else n[Ea]=r;if(e.hasOwnProperty("formatters")){let{level:l,bindings:d,log:h}=e.formatters;n[Tg]=_w(l||i.level,d||Rw,h||i.log)}else n[Tg]=_w(i.level,Rw,i.log);if(e.hasOwnProperty("customLevels")===!0&&(Tz(this.levels,e.customLevels),n.levels=_z(e.customLevels,n[mz]),Rz(n)),typeof e.redact=="object"&&e.redact!==null||Array.isArray(e.redact)){n.redact=e.redact;let l=Mz(n.redact,Cw),d={stringify:l[gz]};n[vz]=Cw,n[Sz]=l,n[bz]=d}n[Ag]=Aw(n,t);let u=e.level||this.level;return n[Ng](u),n}function Pz(){let e=`{${this[Ag].substr(1)}}`,r=JSON.parse(e);return delete r.pid,delete r.hostname,r}function Lz(t){let e=Aw(this,t);this[Ag]=e,delete this[lz]}function Oz(t,e){return Object.assign(e,t)}function Bz(t,e,r){let i=this[dz](),n=this[cz],s=this[hz]||Oz,o;t==null?o={}:t instanceof Error?(o={err:t},e===void 0&&(e=t.message)):(o=t,e===void 0&&t.err&&(e=t.err.message)),n&&(o=s(o,n(o,r)));let u=this[Tw](o,e,r,i),l=this[Nw];l[yz]===!0&&(l.lastLevel=r,l.lastObj=o,l.lastMsg=e,l.lastTime=i.slice(this[pz]),l.lastLogger=this),l.write(u)}function Dz(){}function qz(){let t=this[Nw];"flush"in t&&t.flush(Dz)}});var Bw=U((JZ,Ow)=>{"use strict";var Mg=Symbol.for("pino.metadata"),{levels:Pw}=wd(),Lw=Object.create(Pw);Lw.silent=1/0;var zz=Pw.info;function Fz(t,e){let r=0;t=t||[],e=e||{dedupe:!1};let i=Lw;e.levels&&typeof e.levels=="object"&&(i=e.levels);let n={write:s,add:u,flushSync:o,end:l,minLevel:0,streams:[],clone:d,[Mg]:!0};return Array.isArray(t)?t.forEach(u,n):u.call(n,t),t=null,n;function s(h){let m,b=this.lastLevel,{streams:S}=this,y;for(let v=0;v<S.length&&(m=S[v],m.level<=b);v++){if(y=m.stream,y[Mg]){let{lastTime:C,lastMsg:w,lastObj:x,lastLogger:N}=this;y.lastLevel=b,y.lastTime=C,y.lastMsg=w,y.lastObj=x,y.lastLogger=N}(!e.dedupe||m.level===b)&&y.write(h)}}function o(){for(let{stream:h}of this.streams)typeof h.flushSync=="function"&&h.flushSync()}function u(h){if(!h)return n;let m=typeof h.write=="function"||h.stream,b=h.write?h:h.stream;if(!m)throw Error("stream object needs to implement either StreamEntry or DestinationStream interface");let{streams:S}=this,y;typeof h.levelVal=="number"?y=h.levelVal:typeof h.level=="string"?y=i[h.level]:typeof h.level=="number"?y=h.level:y=zz;let v={stream:b,level:y,levelVal:void 0,id:r++};return S.unshift(v),S.sort(Uz),this.minLevel=S[0].level,n}function l(){for(let{stream:h}of this.streams)typeof h.flushSync=="function"&&h.flushSync(),h.end()}function d(h){let m=new Array(this.streams.length);for(let b=0;b<m.length;b++)m[b]={level:h,stream:this.streams[b].stream};return{write:s,add:u,minLevel:h,streams:m,clone:d,flushSync:o,[Mg]:!0}}}function Uz(t,e){return t.level-e.level}Ow.exports=Fz});var Xw=U((YZ,Wi)=>{"use strict";var jz=require("os"),Ww=Vl(),Hz=mg(),Wz=vg(),Gw=ow(),Gz=Iw(),Kw=nl(),{configure:Kz}=qm(),{assertDefaultLevelFound:Vz,mappings:Vw,genLsCache:$z,levels:Xz}=wd(),{createArgsNormalizer:Jz,asChindings:Yz,buildSafeSonicBoom:Dw,buildFormatters:Zz,stringify:Ed,normalizeDestFileDescriptor:qw,noop:Qz}=xd(),{version:eF}=Rg(),{chindingsSym:zw,redactFmtSym:tF,serializersSym:Fw,timeSym:rF,timeSliceIndexSym:iF,streamSym:nF,stringifySym:Uw,stringifySafeSym:kg,stringifiersSym:jw,setLevelSym:sF,endSym:oF,formatOptsSym:aF,messageKeySym:uF,nestedKeySym:lF,mixinSym:cF,useOnlyCustomLevelsSym:fF,formattersSym:Hw,hooksSym:hF,nestedKeyStrSym:dF,mixinMergeStrategySym:pF}=Kw,{epochTime:$w,nullTime:mF}=Gw,{pid:yF}=process,gF=jz.hostname(),vF=Ww.err,bF={level:"info",levels:Xz,messageKey:"msg",nestedKey:null,enabled:!0,base:{pid:yF,hostname:gF},serializers:Object.assign(Object.create(null),{err:vF}),formatters:Object.assign(Object.create(null),{bindings(t){return t},level(t,e){return{level:e}}}),hooks:{logMethod:void 0},timestamp:$w,name:void 0,redact:null,customLevels:null,useOnlyCustomLevels:!1,depthLimit:5,edgeLimit:100},SF=Jz(bF),xF=Object.assign(Object.create(null),Ww);function Ig(...t){let e={},{opts:r,stream:i}=SF(e,Hz(),...t),{redact:n,crlf:s,serializers:o,timestamp:u,messageKey:l,nestedKey:d,base:h,name:m,level:b,customLevels:S,mixin:y,mixinMergeStrategy:v,useOnlyCustomLevels:C,formatters:w,hooks:x,depthLimit:N,edgeLimit:I}=r,q=Kz({maximumDepth:N,maximumBreadth:I}),B=Zz(w.level,w.bindings,w.log),z=n?Wz(n,Ed):{},D=Ed.bind({[kg]:q}),se=n?{stringify:z[tF]}:{stringify:D},le="}"+(s?`\r
|
|
138
|
-
`:`
|
|
139
|
-
`),te=Yz.bind(null,{[zw]:"",[Fw]:o,[jw]:z,[Uw]:Ed,[kg]:q,[Hw]:B}),ve="";h!==null&&(m===void 0?ve=te(h):ve=te(Object.assign({},h,{name:m})));let qe=u instanceof Function?u:u?$w:mF,Je=qe().indexOf(":")+1;if(C&&!S)throw Error("customLevels is required if useOnlyCustomLevels is set true");if(y&&typeof y!="function")throw Error(`Unknown mixin type "${typeof y}" - expected "function"`);Vz(b,S,C);let Mt=Vw(S,C);return Object.assign(e,{levels:Mt,[fF]:C,[nF]:i,[rF]:qe,[iF]:Je,[Uw]:Ed,[kg]:q,[jw]:z,[oF]:le,[aF]:se,[uF]:l,[lF]:d,[dF]:d?`,${JSON.stringify(d)}:{`:"",[Fw]:o,[cF]:y,[pF]:v,[zw]:ve,[Hw]:B,[hF]:x,silent:Qz}),Object.setPrototypeOf(e,Gz()),$z(e),e[sF](b),e}Wi.exports=Ig;Wi.exports.destination=(t=process.stdout.fd)=>typeof t=="object"?(t.dest=qw(t.dest||process.stdout.fd),Dw(t)):Dw({dest:qw(t),minLength:0});Wi.exports.transport=xg();Wi.exports.multistream=Bw();Wi.exports.levels=Vw();Wi.exports.stdSerializers=xF;Wi.exports.stdTimeFunctions=Object.assign({},Gw);Wi.exports.symbols=Kw;Wi.exports.version=eF;Wi.exports.default=Ig;Wi.exports.pino=Ig});var f1=U((SQ,r7)=>{r7.exports={ROOT:0,GROUP:1,POSITION:2,SET:3,RANGE:4,REPETITION:5,REFERENCE:6,CHAR:7}});var Og=U(go=>{var pt=f1(),Lg=()=>[{type:pt.RANGE,from:48,to:57}],i7=()=>[{type:pt.CHAR,value:95},{type:pt.RANGE,from:97,to:122},{type:pt.RANGE,from:65,to:90}].concat(Lg()),n7=()=>[{type:pt.CHAR,value:9},{type:pt.CHAR,value:10},{type:pt.CHAR,value:11},{type:pt.CHAR,value:12},{type:pt.CHAR,value:13},{type:pt.CHAR,value:32},{type:pt.CHAR,value:160},{type:pt.CHAR,value:5760},{type:pt.RANGE,from:8192,to:8202},{type:pt.CHAR,value:8232},{type:pt.CHAR,value:8233},{type:pt.CHAR,value:8239},{type:pt.CHAR,value:8287},{type:pt.CHAR,value:12288},{type:pt.CHAR,value:65279}],EF=()=>[{type:pt.CHAR,value:10},{type:pt.CHAR,value:13},{type:pt.CHAR,value:8232},{type:pt.CHAR,value:8233}];go.words=()=>({type:pt.SET,set:i7(),not:!1});go.notWords=()=>({type:pt.SET,set:i7(),not:!0});go.ints=()=>({type:pt.SET,set:Lg(),not:!1});go.notInts=()=>({type:pt.SET,set:Lg(),not:!0});go.whitespace=()=>({type:pt.SET,set:n7(),not:!1});go.notWhitespace=()=>({type:pt.SET,set:n7(),not:!0});go.anyChar=()=>({type:pt.SET,set:EF(),not:!0})});var o7=U(h1=>{var s7=f1(),ll=Og(),_F="@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^ ?",CF={0:0,t:9,n:10,v:11,f:12,r:13};h1.strToChars=function(t){var e=/(\[\\b\])|(\\)?\\(?:u([A-F0-9]{4})|x([A-F0-9]{2})|(0?[0-7]{2})|c([@A-Z[\\\]^?])|([0tnvfr]))/g;return t=t.replace(e,function(r,i,n,s,o,u,l,d){if(n)return r;var h=i?8:s?parseInt(s,16):o?parseInt(o,16):u?parseInt(u,8):l?_F.indexOf(l):CF[d],m=String.fromCharCode(h);return/[[\]{}^$.|?*+()]/.test(m)&&(m="\\"+m),m}),t};h1.tokenizeClass=(t,e)=>{for(var r=[],i=/\\(?:(w)|(d)|(s)|(W)|(D)|(S))|((?:(?:\\)(.)|([^\]\\]))-(?:\\)?([^\]]))|(\])|(?:\\)?([^])/g,n,s;(n=i.exec(t))!=null;)if(n[1])r.push(ll.words());else if(n[2])r.push(ll.ints());else if(n[3])r.push(ll.whitespace());else if(n[4])r.push(ll.notWords());else if(n[5])r.push(ll.notInts());else if(n[6])r.push(ll.notWhitespace());else if(n[7])r.push({type:s7.RANGE,from:(n[8]||n[9]).charCodeAt(0),to:n[10].charCodeAt(0)});else if(s=n[12])r.push({type:s7.CHAR,value:s.charCodeAt(0)});else return[r,i.lastIndex];h1.error(e,"Unterminated character class")};h1.error=(t,e)=>{throw new SyntaxError("Invalid regular expression: /"+t+"/: "+e)}});var a7=U(d1=>{var Cd=f1();d1.wordBoundary=()=>({type:Cd.POSITION,value:"b"});d1.nonWordBoundary=()=>({type:Cd.POSITION,value:"B"});d1.begin=()=>({type:Cd.POSITION,value:"^"});d1.end=()=>({type:Cd.POSITION,value:"$"})});var u7=U((_Q,Bg)=>{var cl=o7(),Gi=f1(),Ca=Og(),Rd=a7();Bg.exports=t=>{var e=0,r,i,n={type:Gi.ROOT,stack:[]},s=n,o=n.stack,u=[],l=w=>{cl.error(t,`Nothing to repeat at column ${w-1}`)},d=cl.strToChars(t);for(r=d.length;e<r;)switch(i=d[e++],i){case"\\":switch(i=d[e++],i){case"b":o.push(Rd.wordBoundary());break;case"B":o.push(Rd.nonWordBoundary());break;case"w":o.push(Ca.words());break;case"W":o.push(Ca.notWords());break;case"d":o.push(Ca.ints());break;case"D":o.push(Ca.notInts());break;case"s":o.push(Ca.whitespace());break;case"S":o.push(Ca.notWhitespace());break;default:/\d/.test(i)?o.push({type:Gi.REFERENCE,value:parseInt(i,10)}):o.push({type:Gi.CHAR,value:i.charCodeAt(0)})}break;case"^":o.push(Rd.begin());break;case"$":o.push(Rd.end());break;case"[":var h;d[e]==="^"?(h=!0,e++):h=!1;var m=cl.tokenizeClass(d.slice(e),t);e+=m[1],o.push({type:Gi.SET,set:m[0],not:h});break;case".":o.push(Ca.anyChar());break;case"(":var b={type:Gi.GROUP,stack:[],remember:!0};i=d[e],i==="?"&&(i=d[e+1],e+=2,i==="="?b.followedBy=!0:i==="!"?b.notFollowedBy=!0:i!==":"&&cl.error(t,`Invalid group, character '${i}' after '?' at column ${e-1}`),b.remember=!1),o.push(b),u.push(s),s=b,o=b.stack;break;case")":u.length===0&&cl.error(t,`Unmatched ) at column ${e-1}`),s=u.pop(),o=s.options?s.options[s.options.length-1]:s.stack;break;case"|":s.options||(s.options=[s.stack],delete s.stack);var S=[];s.options.push(S),o=S;break;case"{":var y=/^(\d+)(,(\d+)?)?\}/.exec(d.slice(e)),v,C;y!==null?(o.length===0&&l(e),v=parseInt(y[1],10),C=y[2]?y[3]?parseInt(y[3],10):1/0:v,e+=y[0].length,o.push({type:Gi.REPETITION,min:v,max:C,value:o.pop()})):o.push({type:Gi.CHAR,value:123});break;case"?":o.length===0&&l(e),o.push({type:Gi.REPETITION,min:0,max:1,value:o.pop()});break;case"+":o.length===0&&l(e),o.push({type:Gi.REPETITION,min:1,max:1/0,value:o.pop()});break;case"*":o.length===0&&l(e),o.push({type:Gi.REPETITION,min:0,max:1/0,value:o.pop()});break;default:o.push({type:Gi.CHAR,value:i.charCodeAt(0)})}return u.length!==0&&cl.error(t,"Unterminated group"),n};Bg.exports.types=Gi});var f7=U((CQ,c7)=>{"use strict";var l7=u7(),RF=l7.types;c7.exports=function(t,e){e||(e={});var r=e.limit===void 0?25:e.limit;TF(t)?t=t.source:typeof t!="string"&&(t=String(t));try{t=l7(t)}catch{return!1}var i=0;return function n(s,o){var u,l,d;if(s.type===RF.REPETITION&&(o++,i++,o>1||i>r))return!1;if(s.options){for(u=0,d=s.options.length;u<d;u++)if(l=n({stack:s.options[u]},o),!l)return!1}var h=s.stack||s.value&&s.value.stack;if(!h)return!0;for(u=0;u<h.length;u++)if(l=n(h[u],o),!l)return!1;return!0}(t,0)};function TF(t){return{}.toString.call(t)==="[object RegExp]"}});var d7=U((RQ,h7)=>{"use strict";h7.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var i,n,s;if(Array.isArray(e)){if(i=e.length,i!=r.length)return!1;for(n=i;n--!==0;)if(!t(e[n],r[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),i=s.length,i!==Object.keys(r).length)return!1;for(n=i;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[n]))return!1;for(n=i;n--!==0;){var o=s[n];if(!t(e[o],r[o]))return!1}return!0}return e!==e&&r!==r}});var w7=U((TQ,x7)=>{"use strict";var fl=" ",hl="\u2502 ",p7="\u251C\u2500\u2500 ",m7="\u2514\u2500\u2500 ",y7="*",p1="/",g7=/(?=\/)/;function NF(t){let e=t.name||"";return e=e.replace("bound","").trim(),e=(e||"anonymous")+"()",e}function v7(t){return Array.isArray(t)?t.map(e=>v7(e)):typeof t=="symbol"?t.toString():typeof t=="function"?NF(t):t}function Dg(t,e){let r={},i=this.buildPrettyMeta(t);return Array.isArray(e)||(e=i?Reflect.ownKeys(i):[]),e.forEach(n=>{let s=typeof n=="symbol"?n.toString():n;i&&i[n]&&(r[s]=v7(i[n]))}),r}function AF(t,e={}){if(!this.buildPrettyMeta)throw new Error("buildPrettyMeta not defined");e.includeMeta=e.includeMeta||null;let r=[],i="";t.sort((s,o)=>!s.path||!o.path?0:s.path.localeCompare(o.path));for(let s=0;s<t.length;s++){let o=t[s],u=r.find(d=>o.path===d.path);if(u){u.handlers.push({method:o.method,opts:o.opts.constraints||void 0,meta:e.includeMeta?Dg.call(this,o,e.includeMeta):null});continue}let l={method:o.method,opts:o.opts.constraints||void 0,meta:e.includeMeta?Dg.call(this,o,e.includeMeta):null};r.push({path:o.path,methods:[o.method],opts:[o.opts],handlers:[l]})}if(!r.filter(s=>s.path===p1).length){let s={path:p1,truncatedPath:"",methods:[],opts:[],handlers:[{}]};r.filter(o=>o.path===y7).length?r.splice(1,0,s):r.unshift(s)}let n=MF(r);return n.forEach((s,o)=>{i+=b7(s,null,o===n.length-1,!1,!0),i+=`
|
|
140
|
-
`}),i}function MF(t,e){e=e||p1;let r=[],i={result:r};return t.forEach((n,s)=>{let o=n.path.split(g7);o[0]!==p1&&o[0]!==y7&&(o=[p1,o[0].slice(1),...o.slice(1)]),o.reduce((u,l,d)=>{if(!u[l]){u[l]={result:[]};let h={path:l,children:u[l].result};d===o.length-1&&(h.handlers=n.handlers),u.result.push(h)}return u[l]},i)}),r}function b7(t,e,r,i,n){let s="";if(!i&&!n&&(s+=`
|
|
141
|
-
`),i||(s+=`${e||""}${r?m7:p7}`),s+=`${t.path}`,t.handlers){let o=t.handlers.reduce((u,l)=>{let d=u.findIndex(h=>JSON.stringify(h.opts)===JSON.stringify(l.opts));return d!==-1?u[d].method=[u[d].method,l.method].join(", "):u.push(l),u},[]);o.forEach((u,l)=>{l>0&&(s+=`${i?"":e||""}${r?fl:hl}${t.path}`),s+=` (${u.method||"-"})`,u.opts&&JSON.stringify(u.opts)!=="{}"&&(s+=` ${JSON.stringify(u.opts)}`),u.meta&&Reflect.ownKeys(u.meta).forEach((d,h)=>{s+=`
|
|
142
|
-
${i?"":e||""}${r?fl:hl}`,s+=`\u2022 (${d}) ${JSON.stringify(u.meta[d])}`}),o.length>1&&l!==o.length-1&&(s+=`
|
|
143
|
-
`)})}else t.children.length>1&&(s+=" (-)");return i||(e=`${e||""}${r?fl:hl}`),t.children.forEach((o,u)=>{let l=u===t.children.length-1,d=!t.handlers&&t.children.length===1;s+=b7(o,e,l,d)}),s}function S7(t,e,r,i){if(!this.buildPrettyMeta)throw new Error("buildPrettyMeta not defined");i.includeMeta=i.includeMeta||null;let n="",s=[];for(let{node:l,method:d}of t.nodes)for(let h of l.handlerStorage.handlers)s.push({method:d,...h});s.length?s.forEach((l,d)=>{let h=`(${l.method||"-"})`;Object.keys(l.constraints).length>0&&(h+=" "+JSON.stringify(l.constraints));let m="",b=t.prefix.split("").map((S,y)=>S===":"?y:null).filter(S=>S!==null);if(b.length){let S=0;b.forEach((y,v)=>{m+=t.prefix.slice(S,y+1),m+=l.params[l.params.length-b.length+v],v===b.length-1&&(m+=t.prefix.slice(y+1)),S=y+1})}else m=t.prefix;if(d===0?n+=`${m} ${h}`:n+=`
|
|
144
|
-
${e}${r?fl:hl}${m} ${h}`,i.includeMeta){let S=Dg.call(this,l,i.includeMeta);Object.keys(S).forEach((y,v)=>{n+=`
|
|
145
|
-
${e||""}${r?fl:hl}`,n+=`\u2022 (${y}) ${JSON.stringify(S[y])}`})}}):n=t.prefix;let o=`${e}${r?m7:p7}${n}
|
|
146
|
-
`;e=`${e}${r?fl:hl}`;let u=Object.keys(t.children);for(let l=0;l<u.length;l++){let d=t.children[u[l]];o+=S7.call(this,d,e,l===u.length-1,i)}return o}function Td(t,e,r){if(e.handlerStorage.handlers.length!==0&&t.nodes.push({method:r,node:e}),e.parametricChildren&&e.parametricChildren[0]&&(t.children[":"]||(t.children[":"]={prefix:":",nodes:[],children:{}}),Td(t.children[":"],e.parametricChildren[0],r)),e.wildcardChild&&(t.children["*"]||(t.children["*"]={prefix:"*",nodes:[],children:{}}),Td(t.children["*"],e.wildcardChild,r)),e.staticChildren)for(let i of Object.values(e.staticChildren)){let n=i.prefix.split(g7),s=t,o;for(let u of n)o=s,s=s.children[u],s||(s={prefix:u,nodes:[],children:{}},o.children[u]=s);Td(s,i,r)}}function qg(t){let e=Object.keys(t.children);if(t.nodes.length===0&&e.length===1){let r=t.children[e[0]];if(r.nodes.length<=1)return qg(r),t.nodes=r.nodes,t.prefix+=r.prefix,t.children=r.children,t}for(let r of Object.keys(t.children))qg(t.children[r]);return t}x7.exports={flattenNode:Td,compressFlattenedNode:qg,prettyPrintFlattenedNode:S7,prettyPrintRoutesArray:AF}});var _7=U((NQ,E7)=>{"use strict";var zg=class{constructor(){this.unconstrainedHandler=null,this.constraints=[],this.handlers=[],this.constrainedHandlerStores=null}getMatchingHandler(e){return e===void 0?this.unconstrainedHandler:this._getHandlerMatchingConstraints(e)}addHandler(e,r,i,n,s){let o={handler:e,params:r,constraints:s,store:i||null,_createParamsObject:this._compileCreateParamsObject(r)};Object.keys(s).length===0&&(this.unconstrainedHandler=o);for(let u of Object.keys(s))this.constraints.includes(u)||(u==="version"?this.constraints.unshift(u):this.constraints.push(u));if(this.handlers.length>=32)throw new Error("find-my-way supports a maximum of 32 route handlers per node when there are constraints, limit reached");this.handlers.push(o),this.handlers.sort((u,l)=>Object.keys(u.constraints).length-Object.keys(l.constraints).length),this._compileGetHandlerMatchingConstraints(n,s)}_compileCreateParamsObject(e){let r=[];for(let i=0;i<e.length;i++)r.push(`'${e[i]}': paramsArray[${i}]`);return new Function("paramsArray",`return {${r.join(",")}}`)}_getHandlerMatchingConstraints(){return null}_buildConstraintStore(e,r){for(let i=0;i<this.handlers.length;i++){let s=this.handlers[i].constraints[r];if(s!==void 0){let o=e.get(s)||0;o|=1<<i,e.set(s,o)}}}_constrainedIndexBitmask(e){let r=0;for(let i=0;i<this.handlers.length;i++)this.handlers[i].constraints[e]!==void 0&&(r|=1<<i);return~r}_compileGetHandlerMatchingConstraints(e){this.constrainedHandlerStores={};for(let i of this.constraints){let n=e.newStoreForConstraint(i);this.constrainedHandlerStores[i]=n,this._buildConstraintStore(n,i)}let r=[];r.push(`
|
|
147
|
-
let candidates = ${(1<<this.handlers.length)-1}
|
|
148
|
-
let mask, matches
|
|
149
|
-
`);for(let i of this.constraints){r.push(`
|
|
150
|
-
mask = ${this._constrainedIndexBitmask(i)}
|
|
151
|
-
value = derivedConstraints.${i}
|
|
152
|
-
`);let s=e.strategies[i].mustMatchWhenDerived?"matches":"(matches | mask)";r.push(`
|
|
153
|
-
if (value === undefined) {
|
|
154
|
-
candidates &= mask
|
|
155
|
-
} else {
|
|
156
|
-
matches = this.constrainedHandlerStores.${i}.get(value) || 0
|
|
157
|
-
candidates &= ${s}
|
|
158
|
-
}
|
|
159
|
-
if (candidates === 0) return null;
|
|
160
|
-
`)}for(let i in e.strategies)e.strategies[i].mustMatchWhenDerived&&!this.constraints.includes(i)&&r.push(`if (derivedConstraints.${i} !== undefined) return null`);r.push("return this.handlers[Math.floor(Math.log2(candidates))]"),this._getHandlerMatchingConstraints=new Function("derivedConstraints",r.join(`
|
|
161
|
-
`))}};E7.exports=zg});var R7=U((AQ,C7)=>{"use strict";var kF=_7(),Id={STATIC:0,PARAMETRIC:1,WILDCARD:2},Nd=class{constructor(){this.handlerStorage=new kF}},Ad=class extends Nd{constructor(){super(),this.staticChildren={}}findStaticMatchingChild(e,r){let i=this.staticChildren[e.charAt(r)];return i===void 0||!i.matchPrefix(e,r)?null:i}createStaticChild(e){if(e.length===0)return this;let r=this.staticChildren[e.charAt(0)];if(r){let n=1;for(;n<r.prefix.length;n++)if(e.charCodeAt(n)!==r.prefix.charCodeAt(n)){r=r.split(this,n);break}return r.createStaticChild(e.slice(n))}let i=e.charAt(0);return this.staticChildren[i]=new dl(e),this.staticChildren[i]}},dl=class extends Ad{constructor(e){super(),this.prefix=e,this.wildcardChild=null,this.parametricChildren=[],this.kind=Id.STATIC,this._compilePrefixMatch()}createParametricChild(e){let r=e&&e.source,i=this.parametricChildren.find(n=>(n.regex&&n.regex.source)===r);return i||(i=new Md(e),e?this.parametricChildren.unshift(i):this.parametricChildren.push(i),i)}createWildcardChild(){return this.wildcardChild?this.wildcardChild:(this.wildcardChild=new kd,this.wildcardChild)}split(e,r){let i=this.prefix.slice(0,r),n=this.prefix.slice(r);this.prefix=n,this._compilePrefixMatch();let s=new dl(i);return s.staticChildren[n.charAt(0)]=this,e.staticChildren[i.charAt(0)]=s,s}getNextNode(e,r,i,n){let s=this.findStaticMatchingChild(e,r),o=0;if(s===null){if(this.parametricChildren.length===0)return this.wildcardChild;s=this.parametricChildren[0],o=1}this.wildcardChild!==null&&i.push({paramsCount:n,brotherPathIndex:r,brotherNode:this.wildcardChild});for(let u=this.parametricChildren.length-1;u>=o;u--)i.push({paramsCount:n,brotherPathIndex:r,brotherNode:this.parametricChildren[u]});return s}_compilePrefixMatch(){if(this.prefix.length===1){this.matchPrefix=()=>!0;return}let e=[];for(let r=1;r<this.prefix.length;r++){let i=this.prefix.charCodeAt(r);e.push(`path.charCodeAt(i + ${r}) === ${i}`)}this.matchPrefix=new Function("path","i",`return ${e.join(" && ")}`)}},Md=class extends Ad{constructor(e){super(),this.regex=e||null,this.isRegex=!!e,this.kind=Id.PARAMETRIC}getNextNode(e,r){return this.findStaticMatchingChild(e,r)}},kd=class extends Nd{constructor(){super(),this.kind=Id.WILDCARD}getNextNode(){return null}};C7.exports={StaticNode:dl,ParametricNode:Md,WildcardNode:kd,NODE_TYPES:Id}});var N7=U((MQ,T7)=>{"use strict";var IF=require("assert");function m1(){if(!(this instanceof m1))return new m1;this.store={},this.maxMajor=0,this.maxMinors={},this.maxPatches={}}m1.prototype.set=function(t,e){if(typeof t!="string")throw new TypeError("Version should be a string");let[r,i,n]=t.split(".");return r=Number(r)||0,i=Number(i)||0,n=Number(n)||0,r>=this.maxMajor&&(this.maxMajor=r,this.store.x=e,this.store["*"]=e,this.store["x.x"]=e,this.store["x.x.x"]=e),i>=(this.maxMinors[r]||0)&&(this.maxMinors[r]=i,this.store[`${r}.x`]=e,this.store[`${r}.x.x`]=e),n>=(this.store[`${r}.${i}`]||0)&&(this.maxPatches[`${r}.${i}`]=n,this.store[`${r}.${i}.x`]=e),this.store[`${r}.${i}.${n}`]=e,this};m1.prototype.get=function(t){return this.store[t]};T7.exports={name:"version",mustMatchWhenDerived:!0,storage:m1,validate(t){IF(typeof t=="string","Version should be a string")}}});var M7=U((kQ,A7)=>{"use strict";var PF=require("assert");function LF(){let t={},e=[];return{get:r=>{let i=t[r];if(i)return i;for(let n of e)if(n.host.test(r))return n.value},set:(r,i)=>{r instanceof RegExp?e.push({host:r,value:i}):t[r]=i}}}A7.exports={name:"host",mustMatchWhenDerived:!1,storage:LF,validate(t){PF(typeof t=="string"||Object.prototype.toString.call(t)==="[object RegExp]","Host should be a string or a RegExp")}}});var I7=U((IQ,k7)=>{"use strict";var OF=N7(),BF=M7(),Fg=require("assert"),Ug=class{constructor(e){if(this.strategies={version:OF,host:BF},this.strategiesInUse=new Set,e)for(let r of Object.values(e))this.addConstraintStrategy(r)}hasConstraintStrategy(e){let r=this.strategies[e];return r!==void 0?r.isCustom||this.strategiesInUse.has(e):!1}addConstraintStrategy(e){if(Fg(typeof e.name=="string"&&e.name!=="","strategy.name is required."),Fg(e.storage&&typeof e.storage=="function","strategy.storage function is required."),Fg(e.deriveConstraint&&typeof e.deriveConstraint=="function","strategy.deriveConstraint function is required."),this.strategies[e.name]&&this.strategies[e.name].isCustom)throw new Error(`There already exists a custom constraint with the name ${e.name}.`);if(this.strategiesInUse.has(e.name))throw new Error(`There already exists a route with ${e.name} constraint.`);e.isCustom=!0,this.strategies[e.name]=e,e.mustMatchWhenDerived&&this.noteUsage({[e.name]:e})}deriveConstraints(e,r){}noteUsage(e){if(e){let r=this.strategiesInUse.size;for(let i in e)this.strategiesInUse.add(i);r!==this.strategiesInUse.size&&this._buildDeriveConstraints()}}newStoreForConstraint(e){if(!this.strategies[e])throw new Error(`No strategy registered for constraint key ${e}`);return this.strategies[e].storage()}validateConstraints(e){for(let r in e){let i=e[r];if(typeof i>"u")throw new Error("Can't pass an undefined constraint value, must pass null or no key at all");let n=this.strategies[r];if(!n)throw new Error(`No strategy registered for constraint key ${r}`);n.validate&&n.validate(i)}}_buildDeriveConstraints(){if(this.strategiesInUse.size===0)return;let e=["return {"];for(let r of this.strategiesInUse){let i=this.strategies[r];if(i.isCustom)e.push(` ${i.name}: this.strategies.${r}.deriveConstraint(req, ctx),`);else if(r==="version")e.push(" version: req.headers['accept-version'],");else if(r==="host")e.push(" host: req.headers.host || req.headers[':authority'],");else throw new Error("unknown non-custom strategy for compiling constraint derivation function")}e.push("}"),this.deriveConstraints=new Function("req","ctx",e.join(`
|
|
162
|
-
`)).bind(this)}};k7.exports=Ug});var O7=U((PQ,L7)=>{"use strict";function P7(t,e){return t===50?e===53?"%":e===51?"#":e===52?"$":e===54?"&":e===66||e===98?"+":e===67||e===99?",":e===70||e===102?"/":null:t===51?e===65||e===97?":":e===66||e===98?";":e===68||e===100?"=":e===70||e===102?"?":null:t===52&&e===48?"@":null}function DF(t){let e=!1,r=!1,i="";for(let s=1;s<t.length;s++){let o=t.charCodeAt(s);if(o===37){let u=t.charCodeAt(s+1),l=t.charCodeAt(s+2);P7(u,l)===null?e=!0:(r=!0,u===50&&l===53&&(e=!0,t=t.slice(0,s+1)+"25"+t.slice(s+1),s+=2),s+=2)}else if(o===63||o===59||o===35){i=t.slice(s+1),t=t.slice(0,s);break}}return{path:e?decodeURI(t):t,querystring:i,shouldDecodeParam:r}}function qF(t){let e=t.indexOf("%");if(e===-1)return t;let r="",i=e;for(let n=e;n<t.length;n++)if(t.charCodeAt(n)===37){let s=t.charCodeAt(n+1),o=t.charCodeAt(n+2),u=P7(s,o);r+=t.slice(i,n)+u,i=n+3}return t.slice(0,e)+r+t.slice(i)}L7.exports={safeDecodeURI:DF,safeDecodeURIComponent:qF}});var U7=U((LQ,F7)=>{"use strict";var ir=require("assert"),Pd=require("http"),zF=require("querystring"),Wg=f7(),q7=d7(),{flattenNode:FF,compressFlattenedNode:UF,prettyPrintFlattenedNode:jF,prettyPrintRoutesArray:HF}=w7(),{StaticNode:B7,NODE_TYPES:jg}=R7(),WF=I7(),{safeDecodeURI:GF,safeDecodeURIComponent:D7}=O7(),Gg=Pd.METHODS,z7=/^https?:\/\/.*?\//,Ra=/(\/:[^/()]*?)\?(\/?)/;if(!Wg(z7))throw new Error("the FULL_PATH_REGEXP is not safe, update this module");if(!Wg(Ra))throw new Error("the OPTIONAL_PARAM_REGEXP is not safe, update this module");function nr(t){if(!(this instanceof nr))return new nr(t);t=t||{},t.defaultRoute?(ir(typeof t.defaultRoute=="function","The default route must be a function"),this.defaultRoute=t.defaultRoute):this.defaultRoute=null,t.onBadUrl?(ir(typeof t.onBadUrl=="function","The bad url handler must be a function"),this.onBadUrl=t.onBadUrl):this.onBadUrl=null,t.buildPrettyMeta?(ir(typeof t.buildPrettyMeta=="function","buildPrettyMeta must be a function"),this.buildPrettyMeta=t.buildPrettyMeta):this.buildPrettyMeta=XF,t.querystringParser?(ir(typeof t.querystringParser=="function","querystringParser must be a function"),this.querystringParser=t.querystringParser):this.querystringParser=e=>e===""?{}:zF.parse(e),this.caseSensitive=t.caseSensitive===void 0?!0:t.caseSensitive,this.ignoreTrailingSlash=t.ignoreTrailingSlash||!1,this.ignoreDuplicateSlashes=t.ignoreDuplicateSlashes||!1,this.maxParamLength=t.maxParamLength||100,this.allowUnsafeRegex=t.allowUnsafeRegex||!1,this.routes=[],this.trees={},this.constrainer=new WF(t.constraints),this._routesPatterns=[]}nr.prototype.on=function(e,r,i,n,s){typeof i=="function"&&(n!==void 0&&(s=n),n=i,i={}),ir(typeof r=="string","Path should be a string"),ir(r.length>0,"The path could not be empty"),ir(r[0]==="/"||r[0]==="*","The first character of a path should be `/` or `*`"),ir(typeof n=="function","Handler should be a function");let o=r.match(Ra);if(o){ir(r.length===o.index+o[0].length,"Optional Parameter needs to be the last parameter of the path");let d=r.replace(Ra,"$1$2"),h=r.replace(Ra,"$2");this.on(e,d,i,n,s),this.on(e,h,i,n,s);return}let u=r;this.ignoreDuplicateSlashes&&(r=Kg(r)),this.ignoreTrailingSlash&&(r=Vg(r));let l=Array.isArray(e)?e:[e];for(let d of l)this._on(d,r,i,n,s,u),this.routes.push({method:d,path:r,opts:i,handler:n,store:s})};nr.prototype._on=function(e,r,i,n,s){ir(typeof e=="string","Method should be a string"),ir(Gg.includes(e),`Method '${e}' is not an http method.`);let o={};if(i.constraints!==void 0&&(ir(typeof i.constraints=="object"&&i.constraints!==null,"Constraints should be an object"),Object.keys(i.constraints).length!==0&&(o=i.constraints)),this.constrainer.validateConstraints(o),this.constrainer.noteUsage(o),this.trees[e]===void 0&&(this.trees[e]=new B7("/")),r==="*"&&this.trees[e].prefix.length!==0){let h=this.trees[e];this.trees[e]=new B7(""),this.trees[e].staticChildren["/"]=h}let u=this.trees[e],l=u.prefix.length,d=[];for(let h=0;h<=r.length;h++){if(r.charCodeAt(h)===58&&r.charCodeAt(h+1)===58){h++;continue}let m=r.charCodeAt(h)===58&&r.charCodeAt(h+1)!==58,b=r.charCodeAt(h)===42;if(m||b||h===r.length&&h!==l){let S=r.slice(l,h);this.caseSensitive||(S=S.toLowerCase()),S=S.split("::").join(":"),S=S.split("%").join("%25"),u=u.createStaticChild(S)}if(m){let S=!1,y=[],v=0,C=h+1;for(let x=C;;x++){let N=r.charCodeAt(x);if(N===40||N===45||N===46){S=!0;let I=r.slice(C,x);if(d.push(I),N===40){let z=$F(r,x),D=r.slice(x,z+1);this.allowUnsafeRegex||ir(Wg(new RegExp(D)),`The regex '${D}' is not safe!`),y.push(VF(D)),x=z+1}else y.push("(.*?)");let q=x;for(;q<r.length;q++){let z=r.charCodeAt(q);if(z===58||z===47)break}let B=r.slice(x,q);B&&y.push(KF(B)),C=q+1,x=q,(r.charCodeAt(x)===47||x===r.length)&&(v=B.length)}else if(N===47||x===r.length){let I=r.slice(C,x);d.push(I),y.length!==0&&y.push("(.*?)")}if(r.charCodeAt(x)===47||x===r.length){r=r.slice(0,h+1)+r.slice(x-v),h+=v;break}}let w=null;S&&(w=new RegExp("^"+y.join("")+"$")),u=u.createParametricChild(w),l=h+1}else b&&(d.push("*"),u=u.createWildcardChild(),l=h+1)}this.caseSensitive||(r=r.toLowerCase());for(let h of this._routesPatterns)if(h.path===r&&h.method===e&&q7(h.constraints,o))throw new Error(`Method '${e}' already declared for route '${r}' with constraints '${JSON.stringify(o)}'`);this._routesPatterns.push({method:e,path:r,constraints:o}),u.handlerStorage.addHandler(n,d,s,this.constrainer,o)};nr.prototype.hasConstraintStrategy=function(t){return this.constrainer.hasConstraintStrategy(t)};nr.prototype.addConstraintStrategy=function(t){this.constrainer.addConstraintStrategy(t),this._rebuild(this.routes)};nr.prototype.reset=function(){this.trees={},this.routes=[],this._routesPatterns=[]};nr.prototype.off=function(e,r,i){ir(typeof r=="string","Path should be a string"),ir(r.length>0,"The path could not be empty"),ir(r[0]==="/"||r[0]==="*","The first character of a path should be `/` or `*`");let n=r.match(Ra);if(n){ir(r.length===n.index+n[0].length,"Optional Parameter needs to be the last parameter of the path");let o=r.replace(Ra,"$1$2"),u=r.replace(Ra,"$2");this.off(e,o,i),this.off(e,u,i);return}this.ignoreDuplicateSlashes&&(r=Kg(r)),this.ignoreTrailingSlash&&(r=Vg(r));let s=Array.isArray(e)?e:[e];for(let o of s)this._off(o,r,i)};nr.prototype._off=function(e,r,i){ir(typeof e=="string","Method should be a string"),ir(Gg.includes(e),`Method '${e}' is not an http method.`);function n(o){return!i||!o?!0:q7(i,o)}let s=this.routes.filter(o=>e!==o.method||r!==o.path||!n(o.opts.constraints));this._rebuild(s)};nr.prototype.lookup=function(e,r,i){var n=this.find(e.method,e.url,this.constrainer.deriveConstraints(e,i));return n===null?this._defaultRoute(e,r,i):i===void 0?n.handler(e,r,n.params,n.store,n.searchParams):n.handler.call(i,e,r,n.params,n.store,n.searchParams)};nr.prototype.find=function(e,r,i){let n=this.trees[e];if(n===void 0)return null;r.charCodeAt(0)!==47&&(r=r.replace(z7,"/")),this.ignoreDuplicateSlashes&&(r=Kg(r));let s,o,u;try{s=GF(r),r=s.path,o=s.querystring,u=s.shouldDecodeParam}catch{return this._onBadUrl(r)}this.ignoreTrailingSlash&&(r=Vg(r));let l=r;this.caseSensitive===!1&&(r=r.toLowerCase());let d=this.maxParamLength,h=n.prefix.length,m=[],b=r.length,S=[];for(;;){if(h===b){let v=n.handlerStorage.getMatchingHandler(i);if(v!==null)return{handler:v.handler,store:v.store,params:v._createParamsObject(m),searchParams:this.querystringParser(o)}}let y=n.getNextNode(r,h,S,m.length);if(y===null){if(S.length===0)return null;let v=S.pop();h=v.brotherPathIndex,m.splice(v.paramsCount),y=v.brotherNode}if(n=y,n.kind===jg.STATIC){h+=n.prefix.length;continue}if(n.kind===jg.WILDCARD){let v=l.slice(h);u&&(v=D7(v)),m.push(v),h=b;continue}if(n.kind===jg.PARAMETRIC){let v=l.indexOf("/",h);v===-1&&(v=b);let C=l.slice(h,v);if(u&&(C=D7(C)),n.isRegex){let w=n.regex.exec(C);if(w===null)continue;for(let x=1;x<w.length;x++){let N=w[x];if(N.length>d)return null;m.push(N)}}else{if(C.length>d)return null;m.push(C)}h=v}}};nr.prototype._rebuild=function(t){this.reset();for(let e of t){let{method:r,path:i,opts:n,handler:s,store:o}=e;this._on(r,i,n,s,o),this.routes.push({method:r,path:i,opts:n,handler:s,store:o})}};nr.prototype._defaultRoute=function(t,e,r){if(this.defaultRoute!==null)return r===void 0?this.defaultRoute(t,e):this.defaultRoute.call(r,t,e);e.statusCode=404,e.end()};nr.prototype._onBadUrl=function(t){if(this.onBadUrl===null)return null;let e=this.onBadUrl;return{handler:(r,i,n)=>e(t,r,i),params:{},store:null}};nr.prototype.prettyPrint=function(t={}){if(t.commonPrefix=t.commonPrefix===void 0?!0:t.commonPrefix,!t.commonPrefix)return HF.call(this,this.routes,t);let e={prefix:"/",nodes:[],children:{}};for(let r in this.trees){let i=this.trees[r];i&&FF(e,i,r)}return UF(e),jF.call(this,e,"",!0,t)};for(Hg in Pd.METHODS){if(!Pd.METHODS.hasOwnProperty(Hg))continue;let t=Pd.METHODS[Hg],e=t.toLowerCase();if(nr.prototype[e])throw new Error("Method already exists: "+e);nr.prototype[e]=function(r,i,n){return this.on(t,r,i,n)}}var Hg;nr.prototype.all=function(t,e,r){this.on(Gg,t,e,r)};F7.exports=nr;function KF(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Kg(t){return t.replace(/\/\/+/g,"/")}function Vg(t){return t.length>1&&t.charCodeAt(t.length-1)===47?t.slice(0,-1):t}function VF(t){return t.charCodeAt(1)===94&&(t=t.slice(0,1)+t.slice(2)),t.charCodeAt(t.length-2)===36&&(t=t.slice(0,t.length-2)+t.slice(t.length-1)),t}function $F(t,e){for(var r=1;e<t.length;){if(e++,t[e]==="\\"){e++;continue}if(t[e]===")"?r--:t[e]==="("&&r++,!r)return e}throw new TypeError('Invalid regexp expression in "'+t+'"')}function XF(t){return t?t.store?Object.assign({},t.store):{}:{}}});var n2=U(i2=>{i2.read=function(t,e,r,i,n){var s,o,u=n*8-i-1,l=(1<<u)-1,d=l>>1,h=-7,m=r?n-1:0,b=r?-1:1,S=t[e+m];for(m+=b,s=S&(1<<-h)-1,S>>=-h,h+=u;h>0;s=s*256+t[e+m],m+=b,h-=8);for(o=s&(1<<-h)-1,s>>=-h,h+=i;h>0;o=o*256+t[e+m],m+=b,h-=8);if(s===0)s=1-d;else{if(s===l)return o?NaN:(S?-1:1)*(1/0);o=o+Math.pow(2,i),s=s-d}return(S?-1:1)*o*Math.pow(2,s-i)};i2.write=function(t,e,r,i,n,s){var o,u,l,d=s*8-n-1,h=(1<<d)-1,m=h>>1,b=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=i?0:s-1,y=i?1:-1,v=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,o=h):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+m>=1?e+=b/l:e+=b*Math.pow(2,1-m),e*l>=2&&(o++,l/=2),o+m>=h?(u=0,o=h):o+m>=1?(u=(e*l-1)*Math.pow(2,n),o=o+m):(u=e*Math.pow(2,m-1)*Math.pow(2,n),o=0));n>=8;t[r+S]=u&255,S+=y,u/=256,n-=8);for(o=o<<n|u,d+=n;d>0;t[r+S]=o&255,S+=y,o/=256,d-=8);t[r+S-y]|=v*128}});var gE=U((Uie,yE)=>{"use strict";yE.exports=yU;var mU={threshold:.1,includeAA:!1,alpha:.1,aaColor:[255,255,0],diffColor:[255,0,0],diffColorAlt:null,diffMask:!1};function yU(t,e,r,i,n,s){if(!d2(t)||!d2(e)||r&&!d2(r))throw new Error("Image data: Uint8Array, Uint8ClampedArray or Buffer expected.");if(t.length!==e.length||r&&r.length!==t.length)throw new Error("Image sizes do not match.");if(t.length!==i*n*4)throw new Error("Image data size does not match width/height.");s=Object.assign({},mU,s);let o=i*n,u=new Uint32Array(t.buffer,t.byteOffset,o),l=new Uint32Array(e.buffer,e.byteOffset,o),d=!0;for(let b=0;b<o;b++)if(u[b]!==l[b]){d=!1;break}if(d){if(r&&!s.diffMask)for(let b=0;b<o;b++)pE(t,4*b,s.alpha,r);return 0}let h=35215*s.threshold*s.threshold,m=0;for(let b=0;b<n;b++)for(let S=0;S<i;S++){let y=(b*i+S)*4,v=mE(t,e,y,y);Math.abs(v)>h?!s.includeAA&&(fE(t,S,b,i,n,e)||fE(e,S,b,i,n,t))?r&&!s.diffMask&&m2(r,y,...s.aaColor):(r&&m2(r,y,...v<0&&s.diffColorAlt||s.diffColor),m++):r&&(s.diffMask||pE(t,y,s.alpha,r))}return m}function d2(t){return ArrayBuffer.isView(t)&&t.constructor.BYTES_PER_ELEMENT===1}function fE(t,e,r,i,n,s){let o=Math.max(e-1,0),u=Math.max(r-1,0),l=Math.min(e+1,i-1),d=Math.min(r+1,n-1),h=(r*i+e)*4,m=e===o||e===l||r===u||r===d?1:0,b=0,S=0,y,v,C,w;for(let x=o;x<=l;x++)for(let N=u;N<=d;N++){if(x===e&&N===r)continue;let I=mE(t,t,h,(N*i+x)*4,!0);if(I===0){if(m++,m>2)return!1}else I<b?(b=I,y=x,v=N):I>S&&(S=I,C=x,w=N)}return b===0||S===0?!1:jd(t,y,v,i,n)&&jd(s,y,v,i,n)||jd(t,C,w,i,n)&&jd(s,C,w,i,n)}function jd(t,e,r,i,n){let s=Math.max(e-1,0),o=Math.max(r-1,0),u=Math.min(e+1,i-1),l=Math.min(r+1,n-1),d=(r*i+e)*4,h=e===s||e===u||r===o||r===l?1:0;for(let m=s;m<=u;m++)for(let b=o;b<=l;b++){if(m===e&&b===r)continue;let S=(b*i+m)*4;if(t[d]===t[S]&&t[d+1]===t[S+1]&&t[d+2]===t[S+2]&&t[d+3]===t[S+3]&&h++,h>2)return!0}return!1}function mE(t,e,r,i,n){let s=t[r+0],o=t[r+1],u=t[r+2],l=t[r+3],d=e[i+0],h=e[i+1],m=e[i+2],b=e[i+3];if(l===b&&s===d&&o===h&&u===m)return 0;l<255&&(l/=255,s=Aa(s,l),o=Aa(o,l),u=Aa(u,l)),b<255&&(b/=255,d=Aa(d,b),h=Aa(h,b),m=Aa(m,b));let S=p2(s,o,u),y=p2(d,h,m),v=S-y;if(n)return v;let C=hE(s,o,u)-hE(d,h,m),w=dE(s,o,u)-dE(d,h,m),x=.5053*v*v+.299*C*C+.1957*w*w;return S>y?-x:x}function p2(t,e,r){return t*.29889531+e*.58662247+r*.11448223}function hE(t,e,r){return t*.59597799-e*.2741761-r*.32180189}function dE(t,e,r){return t*.21147017-e*.52261711+r*.31114694}function Aa(t,e){return 255+(t-255)*e}function m2(t,e,r,i,n){t[e+0]=r,t[e+1]=i,t[e+2]=n,t[e+3]=255}function pE(t,e,r,i){let n=t[e+0],s=t[e+1],o=t[e+2],u=Aa(p2(n,s,o),r*t[e+3]/255);m2(i,e,u,u,u)}});var MU={};N2(MU,{handler:()=>ft});module.exports=k_(MU);var Kl={Aws:{Region:"ap-southeast-2"},ApiKey:{QueryString:"api",TableName:"ApiKey",RequestLimitMinute:1e3},TileMetadata:{TableName:"TileMetadata",RequestLimitMinute:1e3}},Nt={PublicUrlBase:"BASEMAPS_PUBLIC_URL",TiffConcurrency:"TIFF_CONCURRENCY",TempFolder:"TEMP_FOLDER",BatchIndex:"AWS_BATCH_JOB_ARRAY_INDEX",AwsRoleDurationHours:"AWS_ROLE_DURATION_HOURS",AwsRoleConfigPath:"AWS_ROLE_CONFIG_PATH",GitHubToken:"GITHUB_API_TOKEN",Gdal:{UseDocker:"GDAL_DOCKER",DockerContainer:"GDAL_DOCKER_CONTAINER",DockerContainerTag:"GDAL_DOCKER_CONTAINER_TAG"},Analytics:{CloudFrontId:"ANALYTICS_CLOUD_FRONT_ID",CloudFrontSourceBucket:"ANALYTICS_CLOUD_FRONT_SOURCE_BUCKET",CacheBucket:"ANALYTICS_CACHE_BUCKET"},get(t){return process.env[t]},getNumber(t,e){let r=Nt.get(t);if(r===""||r==null)return e;let i=parseFloat(r);return isNaN(i)?e:i},isProduction(){return!0}};var S0=ze(Rv(),1);var Qi=ze(Iv(),1);function VN(t){return t<=10?Qi.default.gray("TRACE"):t<=20?Qi.default.magenta("DEBUG"):t<=30?Qi.default.cyan("INFO"):t<=40?Qi.default.yellow("WARN"):t<=50?Qi.default.red("ERROR"):Qi.default.bgRed("FATAL")}var Vn=class{constructor(e){this.level=e}static formatObject(e){let r=[];for(let i of Object.keys(e)){if(Vn.Ignore.has(i))continue;let n=e[i];if(n==null||n==="")continue;let s="",o=typeof n;if(o==="number")s=Qi.default.yellow(String(n));else if(o==="string")s=Qi.default.green(n);else if(o==="object"){let u=this.formatObject(n);u.length>0&&(s=`{ ${u.join(" ")} }`)}else s=String(n);s!==""&&r.push(`${Qi.default.dim(i)}=${s}`)}return r}pretty(e){if(e.level<this.level)return null;let r=new Date(e.time);if(isNaN(r.getTime()))return null;let n=Vn.formatObject(e).join(" ");return`[${r.toISOString()}] ${VN(e.level)} ${Qi.default.blue(e.msg)} ${n}`}};Vn.Ignore=new Set(["pid","time","hostname","level","v","name","msg"]);var F9=ze(z9(),1),gu=require("stream"),U9=require("string_decoder");function ek(t){try{return JSON.parse(t)}catch{return null}}function tk(t){t!=null&&console.error("PrettyTransformFailed",t)}var $s=class extends gu.Transform{constructor(){super(),this.pretty=new Vn(-1),this.decoder=new U9.StringDecoder}static stream(e=process.stdout){let r=new gu.PassThrough;return $s.pretty(r,e),r}static pretty(e,r=process.stdout){let i=new $s;return(0,gu.pipeline)(e,(0,F9.default)(),i,r,tk),i}_transform(e,r,i){if(r!=="buffer")return i(new Error(`Unknown encoding: ${r}`));let n=this.decoder.write(e),s=ek(n);if(s==null)return i(null,e+`
|
|
163
|
-
`);let o=this.pretty.pretty(s);if(o==null)return i(null,e+`
|
|
164
|
-
`);i(null,o+`
|
|
165
|
-
`)}};var Uf,j9={level:"debug"},vu={get(){return Uf==null&&(Uf=process.stdout.isTTY?(0,S0.default)(j9,$s.stream()):(0,S0.default)(j9)),Uf},set(t){Uf=t},disable(){vu.get().level="silent"}};var x0=ze(bu(),1);var W9=24*60*60*1e3,jj=30*W9,rk=91*W9;function G9(t){if(t==null)return{valid:!1,message:"missing"};if(!t.startsWith("c")&&!t.startsWith("d"))return{valid:!1,message:"malformed"};let e=t.slice(1).toUpperCase();try{let r=(0,x0.decodeTime)(e);if(t.startsWith("d"))return{valid:!0,key:t};if(Date.now()-r>rk)return{valid:!1,message:"expired"}}catch{return{valid:!1,message:"malformed"}}return{valid:!0,key:t}}function K9(t){return typeof t!="string"?"invalid":t.startsWith("c")?"c"+t.slice(t.length-6):t.startsWith("d")?"d"+t.slice(t.length-6):"invalid"}var V9=new Uint16Array([7489,60,213,305,650,1181,1403,1488,1653,1758,1954,2006,2063,2634,2705,3489,3693,3849,3878,4298,4648,4833,5141,5277,5315,5343,5413,0,0,0,0,0,0,5483,5837,6541,7186,7645,8062,8288,8624,8845,9152,9211,9282,10276,10514,11528,11848,12238,12310,12986,13881,14252,14590,14888,14961,15072,15150,2048,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,92,98,102,109,115,127,132,139,144,149,152,166,179,185,200,207,108,105,103,32827,198,16582,80,32827,38,16422,99,117,116,101,32827,193,16577,114,101,118,101,59,16642,256,105,121,120,125,114,99,32827,194,16578,59,17424,114,59,49152,55349,56580,114,97,118,101,32827,192,16576,112,104,97,59,17297,97,99,114,59,16640,100,59,27219,256,103,112,157,161,111,110,59,16644,102,59,49152,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,24673,105,110,103,32827,197,16581,256,99,115,190,195,114,59,49152,55349,56476,105,103,110,59,25172,105,108,100,101,32827,195,16579,109,108,32827,196,16580,1024,97,99,101,102,111,114,115,117,229,251,254,279,284,290,295,298,256,99,114,234,242,107,115,108,97,115,104,59,25110,374,246,248,59,27367,101,100,59,25350,121,59,17425,384,99,114,116,261,267,276,97,117,115,101,59,25141,110,111,117,108,108,105,115,59,24876,97,59,17298,114,59,49152,55349,56581,112,102,59,49152,55349,56633,101,118,101,59,17112,99,242,275,109,112,101,113,59,25166,1792,72,79,97,99,100,101,102,104,105,108,111,114,115,117,333,337,342,384,414,418,437,439,442,476,533,627,632,638,99,121,59,17447,80,89,32827,169,16553,384,99,112,121,349,354,378,117,116,101,59,16646,256,59,105,359,360,25298,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,24901,108,101,121,115,59,24877,512,97,101,105,111,393,398,404,408,114,111,110,59,16652,100,105,108,32827,199,16583,114,99,59,16648,110,105,110,116,59,25136,111,116,59,16650,256,100,110,423,429,105,108,108,97,59,16568,116,101,114,68,111,116,59,16567,242,383,105,59,17319,114,99,108,101,512,68,77,80,84,455,459,465,470,111,116,59,25241,105,110,117,115,59,25238,108,117,115,59,25237,105,109,101,115,59,25239,111,256,99,115,482,504,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,25138,101,67,117,114,108,121,256,68,81,515,527,111,117,98,108,101,81,117,111,116,101,59,24605,117,111,116,101,59,24601,512,108,110,112,117,542,552,583,597,111,110,256,59,101,549,550,25143,59,27252,384,103,105,116,559,566,570,114,117,101,110,116,59,25185,110,116,59,25135,111,117,114,73,110,116,101,103,114,97,108,59,25134,256,102,114,588,590,59,24834,111,100,117,99,116,59,25104,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,25139,111,115,115,59,27183,99,114,59,49152,55349,56478,112,256,59,67,644,645,25299,97,112,59,25165,1408,68,74,83,90,97,99,101,102,105,111,115,672,684,688,692,696,715,727,737,742,819,1165,256,59,111,377,677,116,114,97,104,100,59,26897,99,121,59,17410,99,121,59,17413,99,121,59,17423,384,103,114,115,703,708,711,103,101,114,59,24609,114,59,24993,104,118,59,27364,256,97,121,720,725,114,111,110,59,16654,59,17428,108,256,59,116,733,734,25095,97,59,17300,114,59,49152,55349,56583,256,97,102,747,807,256,99,109,752,802,114,105,116,105,99,97,108,512,65,68,71,84,768,774,790,796,99,117,116,101,59,16564,111,372,779,781,59,17113,98,108,101,65,99,117,116,101,59,17117,114,97,118,101,59,16480,105,108,100,101,59,17116,111,110,100,59,25284,102,101,114,101,110,116,105,97,108,68,59,24902,1136,829,0,0,0,834,852,0,1029,102,59,49152,55349,56635,384,59,68,69,840,841,845,16552,111,116,59,24796,113,117,97,108,59,25168,98,108,101,768,67,68,76,82,85,86,867,882,898,975,994,1016,111,110,116,111,117,114,73,110,116,101,103,114,97,236,569,111,628,889,0,0,891,187,841,110,65,114,114,111,119,59,25043,256,101,111,903,932,102,116,384,65,82,84,912,918,929,114,114,111,119,59,25040,105,103,104,116,65,114,114,111,119,59,25044,101,229,714,110,103,256,76,82,939,964,101,102,116,256,65,82,947,953,114,114,111,119,59,26616,105,103,104,116,65,114,114,111,119,59,26618,105,103,104,116,65,114,114,111,119,59,26617,105,103,104,116,256,65,84,984,990,114,114,111,119,59,25042,101,101,59,25256,112,577,1001,0,0,1007,114,114,111,119,59,25041,111,119,110,65,114,114,111,119,59,25045,101,114,116,105,99,97,108,66,97,114,59,25125,110,768,65,66,76,82,84,97,1042,1066,1072,1118,1151,892,114,114,111,119,384,59,66,85,1053,1054,1058,24979,97,114,59,26899,112,65,114,114,111,119,59,25077,114,101,118,101,59,17169,101,102,116,722,1082,0,1094,0,1104,105,103,104,116,86,101,99,116,111,114,59,26960,101,101,86,101,99,116,111,114,59,26974,101,99,116,111,114,256,59,66,1113,1114,25021,97,114,59,26966,105,103,104,116,468,1127,0,1137,101,101,86,101,99,116,111,114,59,26975,101,99,116,111,114,256,59,66,1146,1147,25025,97,114,59,26967,101,101,256,59,65,1158,1159,25252,114,114,111,119,59,24999,256,99,116,1170,1175,114,59,49152,55349,56479,114,111,107,59,16656,2048,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1213,1216,1220,1227,1246,1250,1255,1262,1269,1313,1327,1334,1362,1373,1376,1381,71,59,16714,72,32827,208,16592,99,117,116,101,32827,201,16585,384,97,105,121,1234,1239,1244,114,111,110,59,16666,114,99,32827,202,16586,59,17453,111,116,59,16662,114,59,49152,55349,56584,114,97,118,101,32827,200,16584,101,109,101,110,116,59,25096,256,97,112,1274,1278,99,114,59,16658,116,121,595,1286,0,0,1298,109,97,108,108,83,113,117,97,114,101,59,26107,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,26027,256,103,112,1318,1322,111,110,59,16664,102,59,49152,55349,56636,115,105,108,111,110,59,17301,117,256,97,105,1340,1353,108,256,59,84,1346,1347,27253,105,108,100,101,59,25154,108,105,98,114,105,117,109,59,25036,256,99,105,1367,1370,114,59,24880,109,59,27251,97,59,17303,109,108,32827,203,16587,256,105,112,1386,1391,115,116,115,59,25091,111,110,101,110,116,105,97,108,69,59,24903,640,99,102,105,111,115,1413,1416,1421,1458,1484,121,59,17444,114,59,49152,55349,56585,108,108,101,100,595,1431,0,0,1443,109,97,108,108,83,113,117,97,114,101,59,26108,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,26026,880,1466,0,1471,0,0,1476,102,59,49152,55349,56637,65,108,108,59,25088,114,105,101,114,116,114,102,59,24881,99,242,1483,1536,74,84,97,98,99,100,102,103,111,114,115,116,1512,1516,1519,1530,1536,1554,1558,1563,1565,1571,1644,1650,99,121,59,17411,32827,62,16446,109,109,97,256,59,100,1527,1528,17299,59,17372,114,101,118,101,59,16670,384,101,105,121,1543,1548,1552,100,105,108,59,16674,114,99,59,16668,59,17427,111,116,59,16672,114,59,49152,55349,56586,59,25305,112,102,59,49152,55349,56638,101,97,116,101,114,768,69,70,71,76,83,84,1589,1604,1614,1622,1627,1638,113,117,97,108,256,59,76,1598,1599,25189,101,115,115,59,25307,117,108,108,69,113,117,97,108,59,25191,114,101,97,116,101,114,59,27298,101,115,115,59,25207,108,97,110,116,69,113,117,97,108,59,27262,105,108,100,101,59,25203,99,114,59,49152,55349,56482,59,25195,1024,65,97,99,102,105,111,115,117,1669,1675,1686,1691,1694,1706,1726,1738,82,68,99,121,59,17450,256,99,116,1680,1684,101,107,59,17095,59,16478,105,114,99,59,16676,114,59,24844,108,98,101,114,116,83,112,97,99,101,59,24843,496,1711,0,1714,102,59,24845,105,122,111,110,116,97,108,76,105,110,101,59,25856,256,99,116,1731,1733,242,1705,114,111,107,59,16678,109,112,324,1744,1752,111,119,110,72,117,109,240,303,113,117,97,108,59,25167,1792,69,74,79,97,99,100,102,103,109,110,111,115,116,117,1786,1790,1795,1799,1806,1818,1822,1825,1832,1860,1912,1931,1935,1941,99,121,59,17429,108,105,103,59,16690,99,121,59,17409,99,117,116,101,32827,205,16589,256,105,121,1811,1816,114,99,32827,206,16590,59,17432,111,116,59,16688,114,59,24849,114,97,118,101,32827,204,16588,384,59,97,112,1824,1839,1855,256,99,103,1844,1847,114,59,16682,105,110,97,114,121,73,59,24904,108,105,101,243,989,500,1865,0,1890,256,59,101,1869,1870,25132,256,103,114,1875,1880,114,97,108,59,25131,115,101,99,116,105,111,110,59,25282,105,115,105,98,108,101,256,67,84,1900,1906,111,109,109,97,59,24675,105,109,101,115,59,24674,384,103,112,116,1919,1923,1928,111,110,59,16686,102,59,49152,55349,56640,97,59,17305,99,114,59,24848,105,108,100,101,59,16680,491,1946,0,1950,99,121,59,17414,108,32827,207,16591,640,99,102,111,115,117,1964,1975,1980,1986,2e3,256,105,121,1969,1973,114,99,59,16692,59,17433,114,59,49152,55349,56589,112,102,59,49152,55349,56641,483,1991,0,1996,114,59,49152,55349,56485,114,99,121,59,17416,107,99,121,59,17412,896,72,74,97,99,102,111,115,2020,2024,2028,2033,2045,2050,2056,99,121,59,17445,99,121,59,17420,112,112,97,59,17306,256,101,121,2038,2043,100,105,108,59,16694,59,17434,114,59,49152,55349,56590,112,102,59,49152,55349,56642,99,114,59,49152,55349,56486,1408,74,84,97,99,101,102,108,109,111,115,116,2085,2089,2092,2128,2147,2483,2488,2503,2509,2615,2631,99,121,59,17417,32827,60,16444,640,99,109,110,112,114,2103,2108,2113,2116,2125,117,116,101,59,16697,98,100,97,59,17307,103,59,26602,108,97,99,101,116,114,102,59,24850,114,59,24990,384,97,101,121,2135,2140,2145,114,111,110,59,16701,100,105,108,59,16699,59,17435,256,102,115,2152,2416,116,1280,65,67,68,70,82,84,85,86,97,114,2174,2217,2225,2272,2278,2300,2351,2395,912,2410,256,110,114,2179,2191,103,108,101,66,114,97,99,107,101,116,59,26600,114,111,119,384,59,66,82,2201,2202,2206,24976,97,114,59,25060,105,103,104,116,65,114,114,111,119,59,25030,101,105,108,105,110,103,59,25352,111,501,2231,0,2243,98,108,101,66,114,97,99,107,101,116,59,26598,110,468,2248,0,2258,101,101,86,101,99,116,111,114,59,26977,101,99,116,111,114,256,59,66,2267,2268,25027,97,114,59,26969,108,111,111,114,59,25354,105,103,104,116,256,65,86,2287,2293,114,114,111,119,59,24980,101,99,116,111,114,59,26958,256,101,114,2305,2327,101,384,59,65,86,2313,2314,2320,25251,114,114,111,119,59,24996,101,99,116,111,114,59,26970,105,97,110,103,108,101,384,59,66,69,2340,2341,2345,25266,97,114,59,27087,113,117,97,108,59,25268,112,384,68,84,86,2359,2370,2380,111,119,110,86,101,99,116,111,114,59,26961,101,101,86,101,99,116,111,114,59,26976,101,99,116,111,114,256,59,66,2390,2391,25023,97,114,59,26968,101,99,116,111,114,256,59,66,2405,2406,25020,97,114,59,26962,105,103,104,116,225,924,115,768,69,70,71,76,83,84,2430,2443,2453,2461,2466,2477,113,117,97,108,71,114,101,97,116,101,114,59,25306,117,108,108,69,113,117,97,108,59,25190,114,101,97,116,101,114,59,25206,101,115,115,59,27297,108,97,110,116,69,113,117,97,108,59,27261,105,108,100,101,59,25202,114,59,49152,55349,56591,256,59,101,2493,2494,25304,102,116,97,114,114,111,119,59,25050,105,100,111,116,59,16703,384,110,112,119,2516,2582,2587,103,512,76,82,108,114,2526,2551,2562,2576,101,102,116,256,65,82,2534,2540,114,114,111,119,59,26613,105,103,104,116,65,114,114,111,119,59,26615,105,103,104,116,65,114,114,111,119,59,26614,101,102,116,256,97,114,947,2570,105,103,104,116,225,959,105,103,104,116,225,970,102,59,49152,55349,56643,101,114,256,76,82,2594,2604,101,102,116,65,114,114,111,119,59,24985,105,103,104,116,65,114,114,111,119,59,24984,384,99,104,116,2622,2624,2626,242,2124,59,25008,114,111,107,59,16705,59,25194,1024,97,99,101,102,105,111,115,117,2650,2653,2656,2679,2684,2693,2699,2702,112,59,26885,121,59,17436,256,100,108,2661,2671,105,117,109,83,112,97,99,101,59,24671,108,105,110,116,114,102,59,24883,114,59,49152,55349,56592,110,117,115,80,108,117,115,59,25107,112,102,59,49152,55349,56644,99,242,2678,59,17308,1152,74,97,99,101,102,111,115,116,117,2723,2727,2733,2752,2836,2841,3473,3479,3486,99,121,59,17418,99,117,116,101,59,16707,384,97,101,121,2740,2745,2750,114,111,110,59,16711,100,105,108,59,16709,59,17437,384,103,115,119,2759,2800,2830,97,116,105,118,101,384,77,84,86,2771,2783,2792,101,100,105,117,109,83,112,97,99,101,59,24587,104,105,256,99,110,2790,2776,235,2777,101,114,121,84,104,105,238,2777,116,101,100,256,71,76,2808,2822,114,101,97,116,101,114,71,114,101,97,116,101,242,1651,101,115,115,76,101,115,243,2632,76,105,110,101,59,16394,114,59,49152,55349,56593,512,66,110,112,116,2850,2856,2871,2874,114,101,97,107,59,24672,66,114,101,97,107,105,110,103,83,112,97,99,101,59,16544,102,59,24853,1664,59,67,68,69,71,72,76,78,80,82,83,84,86,2901,2902,2922,2940,2977,3051,3076,3166,3204,3238,3288,3425,3461,27372,256,111,117,2907,2916,110,103,114,117,101,110,116,59,25186,112,67,97,112,59,25197,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,25126,384,108,113,120,2947,2954,2971,101,109,101,110,116,59,25097,117,97,108,256,59,84,2962,2963,25184,105,108,100,101,59,49152,8770,824,105,115,116,115,59,25092,114,101,97,116,101,114,896,59,69,70,71,76,83,84,2998,2999,3005,3017,3027,3032,3045,25199,113,117,97,108,59,25201,117,108,108,69,113,117,97,108,59,49152,8807,824,114,101,97,116,101,114,59,49152,8811,824,101,115,115,59,25209,108,97,110,116,69,113,117,97,108,59,49152,10878,824,105,108,100,101,59,25205,117,109,112,324,3058,3069,111,119,110,72,117,109,112,59,49152,8782,824,113,117,97,108,59,49152,8783,824,101,256,102,115,3082,3111,116,84,114,105,97,110,103,108,101,384,59,66,69,3098,3099,3105,25322,97,114,59,49152,10703,824,113,117,97,108,59,25324,115,768,59,69,71,76,83,84,3125,3126,3132,3140,3147,3160,25198,113,117,97,108,59,25200,114,101,97,116,101,114,59,25208,101,115,115,59,49152,8810,824,108,97,110,116,69,113,117,97,108,59,49152,10877,824,105,108,100,101,59,25204,101,115,116,101,100,256,71,76,3176,3193,114,101,97,116,101,114,71,114,101,97,116,101,114,59,49152,10914,824,101,115,115,76,101,115,115,59,49152,10913,824,114,101,99,101,100,101,115,384,59,69,83,3218,3219,3227,25216,113,117,97,108,59,49152,10927,824,108,97,110,116,69,113,117,97,108,59,25312,256,101,105,3243,3257,118,101,114,115,101,69,108,101,109,101,110,116,59,25100,103,104,116,84,114,105,97,110,103,108,101,384,59,66,69,3275,3276,3282,25323,97,114,59,49152,10704,824,113,117,97,108,59,25325,256,113,117,3293,3340,117,97,114,101,83,117,256,98,112,3304,3321,115,101,116,256,59,69,3312,3315,49152,8847,824,113,117,97,108,59,25314,101,114,115,101,116,256,59,69,3331,3334,49152,8848,824,113,117,97,108,59,25315,384,98,99,112,3347,3364,3406,115,101,116,256,59,69,3355,3358,49152,8834,8402,113,117,97,108,59,25224,99,101,101,100,115,512,59,69,83,84,3378,3379,3387,3398,25217,113,117,97,108,59,49152,10928,824,108,97,110,116,69,113,117,97,108,59,25313,105,108,100,101,59,49152,8831,824,101,114,115,101,116,256,59,69,3416,3419,49152,8835,8402,113,117,97,108,59,25225,105,108,100,101,512,59,69,70,84,3438,3439,3445,3455,25153,113,117,97,108,59,25156,117,108,108,69,113,117,97,108,59,25159,105,108,100,101,59,25161,101,114,116,105,99,97,108,66,97,114,59,25124,99,114,59,49152,55349,56489,105,108,100,101,32827,209,16593,59,17309,1792,69,97,99,100,102,103,109,111,112,114,115,116,117,118,3517,3522,3529,3541,3547,3552,3559,3580,3586,3616,3618,3634,3647,3652,108,105,103,59,16722,99,117,116,101,32827,211,16595,256,105,121,3534,3539,114,99,32827,212,16596,59,17438,98,108,97,99,59,16720,114,59,49152,55349,56594,114,97,118,101,32827,210,16594,384,97,101,105,3566,3570,3574,99,114,59,16716,103,97,59,17321,99,114,111,110,59,17311,112,102,59,49152,55349,56646,101,110,67,117,114,108,121,256,68,81,3598,3610,111,117,98,108,101,81,117,111,116,101,59,24604,117,111,116,101,59,24600,59,27220,256,99,108,3623,3628,114,59,49152,55349,56490,97,115,104,32827,216,16600,105,364,3639,3644,100,101,32827,213,16597,101,115,59,27191,109,108,32827,214,16598,101,114,256,66,80,3659,3680,256,97,114,3664,3667,114,59,24638,97,99,256,101,107,3674,3676,59,25566,101,116,59,25524,97,114,101,110,116,104,101,115,105,115,59,25564,1152,97,99,102,104,105,108,111,114,115,3711,3719,3722,3727,3730,3732,3741,3760,3836,114,116,105,97,108,68,59,25090,121,59,17439,114,59,49152,55349,56595,105,59,17318,59,17312,117,115,77,105,110,117,115,59,16561,256,105,112,3746,3757,110,99,97,114,101,112,108,97,110,229,1693,102,59,24857,512,59,101,105,111,3769,3770,3808,3812,27323,99,101,100,101,115,512,59,69,83,84,3784,3785,3791,3802,25210,113,117,97,108,59,27311,108,97,110,116,69,113,117,97,108,59,25212,105,108,100,101,59,25214,109,101,59,24627,256,100,112,3817,3822,117,99,116,59,25103,111,114,116,105,111,110,256,59,97,549,3833,108,59,25117,256,99,105,3841,3846,114,59,49152,55349,56491,59,17320,512,85,102,111,115,3857,3862,3867,3871,79,84,32827,34,16418,114,59,49152,55349,56596,112,102,59,24858,99,114,59,49152,55349,56492,1536,66,69,97,99,101,102,104,105,111,114,115,117,3902,3907,3911,3936,3955,4007,4010,4013,4246,4265,4276,4286,97,114,114,59,26896,71,32827,174,16558,384,99,110,114,3918,3923,3926,117,116,101,59,16724,103,59,26603,114,256,59,116,3932,3933,24992,108,59,26902,384,97,101,121,3943,3948,3953,114,111,110,59,16728,100,105,108,59,16726,59,17440,256,59,118,3960,3961,24860,101,114,115,101,256,69,85,3970,3993,256,108,113,3975,3982,101,109,101,110,116,59,25099,117,105,108,105,98,114,105,117,109,59,25035,112,69,113,117,105,108,105,98,114,105,117,109,59,26991,114,187,3961,111,59,17313,103,104,116,1024,65,67,68,70,84,85,86,97,4033,4075,4083,4130,4136,4187,4231,984,256,110,114,4038,4050,103,108,101,66,114,97,99,107,101,116,59,26601,114,111,119,384,59,66,76,4060,4061,4065,24978,97,114,59,25061,101,102,116,65,114,114,111,119,59,25028,101,105,108,105,110,103,59,25353,111,501,4089,0,4101,98,108,101,66,114,97,99,107,101,116,59,26599,110,468,4106,0,4116,101,101,86,101,99,116,111,114,59,26973,101,99,116,111,114,256,59,66,4125,4126,25026,97,114,59,26965,108,111,111,114,59,25355,256,101,114,4141,4163,101,384,59,65,86,4149,4150,4156,25250,114,114,111,119,59,24998,101,99,116,111,114,59,26971,105,97,110,103,108,101,384,59,66,69,4176,4177,4181,25267,97,114,59,27088,113,117,97,108,59,25269,112,384,68,84,86,4195,4206,4216,111,119,110,86,101,99,116,111,114,59,26959,101,101,86,101,99,116,111,114,59,26972,101,99,116,111,114,256,59,66,4226,4227,25022,97,114,59,26964,101,99,116,111,114,256,59,66,4241,4242,25024,97,114,59,26963,256,112,117,4251,4254,102,59,24861,110,100,73,109,112,108,105,101,115,59,26992,105,103,104,116,97,114,114,111,119,59,25051,256,99,104,4281,4284,114,59,24859,59,25009,108,101,68,101,108,97,121,101,100,59,27124,1664,72,79,97,99,102,104,105,109,111,113,115,116,117,4324,4337,4343,4349,4377,4382,4433,4438,4449,4455,4533,4539,4543,256,67,99,4329,4334,72,99,121,59,17449,121,59,17448,70,84,99,121,59,17452,99,117,116,101,59,16730,640,59,97,101,105,121,4360,4361,4366,4371,4375,27324,114,111,110,59,16736,100,105,108,59,16734,114,99,59,16732,59,17441,114,59,49152,55349,56598,111,114,116,512,68,76,82,85,4394,4404,4414,4425,111,119,110,65,114,114,111,119,187,1054,101,102,116,65,114,114,111,119,187,2202,105,103,104,116,65,114,114,111,119,187,4061,112,65,114,114,111,119,59,24977,103,109,97,59,17315,97,108,108,67,105,114,99,108,101,59,25112,112,102,59,49152,55349,56650,626,4461,0,0,4464,116,59,25114,97,114,101,512,59,73,83,85,4475,4476,4489,4527,26017,110,116,101,114,115,101,99,116,105,111,110,59,25235,117,256,98,112,4495,4510,115,101,116,256,59,69,4503,4504,25231,113,117,97,108,59,25233,101,114,115,101,116,256,59,69,4520,4521,25232,113,117,97,108,59,25234,110,105,111,110,59,25236,99,114,59,49152,55349,56494,97,114,59,25286,512,98,99,109,112,4552,4571,4617,4619,256,59,115,4557,4558,25296,101,116,256,59,69,4557,4565,113,117,97,108,59,25222,256,99,104,4576,4613,101,101,100,115,512,59,69,83,84,4589,4590,4596,4607,25211,113,117,97,108,59,27312,108,97,110,116,69,113,117,97,108,59,25213,105,108,100,101,59,25215,84,104,225,3980,59,25105,384,59,101,115,4626,4627,4643,25297,114,115,101,116,256,59,69,4636,4637,25219,113,117,97,108,59,25223,101,116,187,4627,1408,72,82,83,97,99,102,104,105,111,114,115,4670,4676,4681,4693,4702,4721,4726,4767,4802,4808,4817,79,82,78,32827,222,16606,65,68,69,59,24866,256,72,99,4686,4690,99,121,59,17419,121,59,17446,256,98,117,4698,4700,59,16393,59,17316,384,97,101,121,4709,4714,4719,114,111,110,59,16740,100,105,108,59,16738,59,17442,114,59,49152,55349,56599,256,101,105,4731,4745,498,4736,0,4743,101,102,111,114,101,59,25140,97,59,17304,256,99,110,4750,4760,107,83,112,97,99,101,59,49152,8287,8202,83,112,97,99,101,59,24585,108,100,101,512,59,69,70,84,4779,4780,4786,4796,25148,113,117,97,108,59,25155,117,108,108,69,113,117,97,108,59,25157,105,108,100,101,59,25160,112,102,59,49152,55349,56651,105,112,108,101,68,111,116,59,24795,256,99,116,4822,4827,114,59,49152,55349,56495,114,111,107,59,16742,2785,4855,4878,4890,4902,0,4908,4913,0,0,0,0,0,4920,4925,4983,4997,0,5119,5124,5130,5136,256,99,114,4859,4865,117,116,101,32827,218,16602,114,256,59,111,4871,4872,24991,99,105,114,59,26953,114,483,4883,0,4886,121,59,17422,118,101,59,16748,256,105,121,4894,4899,114,99,32827,219,16603,59,17443,98,108,97,99,59,16752,114,59,49152,55349,56600,114,97,118,101,32827,217,16601,97,99,114,59,16746,256,100,105,4929,4969,101,114,256,66,80,4936,4957,256,97,114,4941,4944,114,59,16479,97,99,256,101,107,4951,4953,59,25567,101,116,59,25525,97,114,101,110,116,104,101,115,105,115,59,25565,111,110,256,59,80,4976,4977,25283,108,117,115,59,25230,256,103,112,4987,4991,111,110,59,16754,102,59,49152,55349,56652,1024,65,68,69,84,97,100,112,115,5013,5038,5048,5060,1e3,5074,5079,5107,114,114,111,119,384,59,66,68,4432,5024,5028,97,114,59,26898,111,119,110,65,114,114,111,119,59,25029,111,119,110,65,114,114,111,119,59,24981,113,117,105,108,105,98,114,105,117,109,59,26990,101,101,256,59,65,5067,5068,25253,114,114,111,119,59,24997,111,119,110,225,1011,101,114,256,76,82,5086,5096,101,102,116,65,114,114,111,119,59,24982,105,103,104,116,65,114,114,111,119,59,24983,105,256,59,108,5113,5114,17362,111,110,59,17317,105,110,103,59,16750,99,114,59,49152,55349,56496,105,108,100,101,59,16744,109,108,32827,220,16604,1152,68,98,99,100,101,102,111,115,118,5159,5164,5168,5171,5182,5253,5258,5264,5270,97,115,104,59,25259,97,114,59,27371,121,59,17426,97,115,104,256,59,108,5179,5180,25257,59,27366,256,101,114,5187,5189,59,25281,384,98,116,121,5196,5200,5242,97,114,59,24598,256,59,105,5199,5205,99,97,108,512,66,76,83,84,5217,5221,5226,5236,97,114,59,25123,105,110,101,59,16508,101,112,97,114,97,116,111,114,59,26456,105,108,100,101,59,25152,84,104,105,110,83,112,97,99,101,59,24586,114,59,49152,55349,56601,112,102,59,49152,55349,56653,99,114,59,49152,55349,56497,100,97,115,104,59,25258,640,99,101,102,111,115,5287,5292,5297,5302,5308,105,114,99,59,16756,100,103,101,59,25280,114,59,49152,55349,56602,112,102,59,49152,55349,56654,99,114,59,49152,55349,56498,512,102,105,111,115,5323,5328,5330,5336,114,59,49152,55349,56603,59,17310,112,102,59,49152,55349,56655,99,114,59,49152,55349,56499,1152,65,73,85,97,99,102,111,115,117,5361,5365,5369,5373,5380,5391,5396,5402,5408,99,121,59,17455,99,121,59,17415,99,121,59,17454,99,117,116,101,32827,221,16605,256,105,121,5385,5389,114,99,59,16758,59,17451,114,59,49152,55349,56604,112,102,59,49152,55349,56656,99,114,59,49152,55349,56500,109,108,59,16760,1024,72,97,99,100,101,102,111,115,5429,5433,5439,5451,5455,5469,5472,5476,99,121,59,17430,99,117,116,101,59,16761,256,97,121,5444,5449,114,111,110,59,16765,59,17431,111,116,59,16763,498,5460,0,5467,111,87,105,100,116,232,2777,97,59,17302,114,59,24872,112,102,59,24868,99,114,59,49152,55349,56501,3041,5507,5514,5520,0,5552,5558,5567,0,0,0,0,5574,5595,5611,5727,5741,0,5781,5787,5810,5817,0,5822,99,117,116,101,32827,225,16609,114,101,118,101,59,16643,768,59,69,100,105,117,121,5532,5533,5537,5539,5544,5549,25150,59,49152,8766,819,59,25151,114,99,32827,226,16610,116,101,32955,180,774,59,17456,108,105,103,32827,230,16614,256,59,114,178,5562,59,49152,55349,56606,114,97,118,101,32827,224,16608,256,101,112,5578,5590,256,102,112,5583,5588,115,121,109,59,24885,232,5587,104,97,59,17329,256,97,112,5599,99,256,99,108,5604,5607,114,59,16641,103,59,27199,612,5616,0,0,5642,640,59,97,100,115,118,5626,5627,5631,5633,5639,25127,110,100,59,27221,59,27228,108,111,112,101,59,27224,59,27226,896,59,101,108,109,114,115,122,5656,5657,5659,5662,5695,5711,5721,25120,59,27044,101,187,5657,115,100,256,59,97,5669,5670,25121,1121,5680,5682,5684,5686,5688,5690,5692,5694,59,27048,59,27049,59,27050,59,27051,59,27052,59,27053,59,27054,59,27055,116,256,59,118,5701,5702,25119,98,256,59,100,5708,5709,25278,59,27037,256,112,116,5716,5719,104,59,25122,187,185,97,114,114,59,25468,256,103,112,5731,5735,111,110,59,16645,102,59,49152,55349,56658,896,59,69,97,101,105,111,112,4801,5755,5757,5762,5764,5767,5770,59,27248,99,105,114,59,27247,59,25162,100,59,25163,115,59,16423,114,111,120,256,59,101,4801,5778,241,5763,105,110,103,32827,229,16613,384,99,116,121,5793,5798,5800,114,59,49152,55349,56502,59,16426,109,112,256,59,101,4801,5807,241,648,105,108,100,101,32827,227,16611,109,108,32827,228,16612,256,99,105,5826,5832,111,110,105,110,244,626,110,116,59,27153,2048,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,5869,5873,5936,5948,5955,5960,6008,6013,6112,6118,6201,6224,5901,6461,6472,6512,111,116,59,27373,256,99,114,5878,5918,107,512,99,101,112,115,5888,5893,5901,5907,111,110,103,59,25164,112,115,105,108,111,110,59,17398,114,105,109,101,59,24629,105,109,256,59,101,5914,5915,25149,113,59,25293,374,5922,5926,101,101,59,25277,101,100,256,59,103,5932,5933,25349,101,187,5933,114,107,256,59,116,4956,5943,98,114,107,59,25526,256,111,121,5889,5953,59,17457,113,117,111,59,24606,640,99,109,112,114,116,5971,5979,5985,5988,5992,97,117,115,256,59,101,266,265,112,116,121,118,59,27056,115,233,5900,110,111,245,275,384,97,104,119,5999,6001,6003,59,17330,59,24886,101,101,110,59,25196,114,59,49152,55349,56607,103,896,99,111,115,116,117,118,119,6029,6045,6067,6081,6101,6107,6110,384,97,105,117,6036,6038,6042,240,1888,114,99,59,26095,112,187,4977,384,100,112,116,6052,6056,6061,111,116,59,27136,108,117,115,59,27137,105,109,101,115,59,27138,625,6073,0,0,6078,99,117,112,59,27142,97,114,59,26117,114,105,97,110,103,108,101,256,100,117,6093,6098,111,119,110,59,26045,112,59,26035,112,108,117,115,59,27140,101,229,5188,229,5293,97,114,111,119,59,26893,384,97,107,111,6125,6182,6197,256,99,110,6130,6179,107,384,108,115,116,6138,1451,6146,111,122,101,110,103,101,59,27115,114,105,97,110,103,108,101,512,59,100,108,114,6162,6163,6168,6173,26036,111,119,110,59,26046,101,102,116,59,26050,105,103,104,116,59,26040,107,59,25635,433,6187,0,6195,434,6191,0,6193,59,26002,59,26001,52,59,26003,99,107,59,25992,256,101,111,6206,6221,256,59,113,6211,6214,49152,61,8421,117,105,118,59,49152,8801,8421,116,59,25360,512,112,116,119,120,6233,6238,6247,6252,102,59,49152,55349,56659,256,59,116,5067,6243,111,109,187,5068,116,105,101,59,25288,1536,68,72,85,86,98,100,104,109,112,116,117,118,6277,6294,6314,6331,6359,6363,6380,6399,6405,6410,6416,6433,512,76,82,108,114,6286,6288,6290,6292,59,25943,59,25940,59,25942,59,25939,640,59,68,85,100,117,6305,6306,6308,6310,6312,25936,59,25958,59,25961,59,25956,59,25959,512,76,82,108,114,6323,6325,6327,6329,59,25949,59,25946,59,25948,59,25945,896,59,72,76,82,104,108,114,6346,6347,6349,6351,6353,6355,6357,25937,59,25964,59,25955,59,25952,59,25963,59,25954,59,25951,111,120,59,27081,512,76,82,108,114,6372,6374,6376,6378,59,25941,59,25938,59,25872,59,25868,640,59,68,85,100,117,1725,6391,6393,6395,6397,59,25957,59,25960,59,25900,59,25908,105,110,117,115,59,25247,108,117,115,59,25246,105,109,101,115,59,25248,512,76,82,108,114,6425,6427,6429,6431,59,25947,59,25944,59,25880,59,25876,896,59,72,76,82,104,108,114,6448,6449,6451,6453,6455,6457,6459,25858,59,25962,59,25953,59,25950,59,25916,59,25892,59,25884,256,101,118,291,6466,98,97,114,32827,166,16550,512,99,101,105,111,6481,6486,6490,6496,114,59,49152,55349,56503,109,105,59,24655,109,256,59,101,5914,5916,108,384,59,98,104,6504,6505,6507,16476,59,27077,115,117,98,59,26568,364,6516,6526,108,256,59,101,6521,6522,24610,116,187,6522,112,384,59,69,101,303,6533,6535,59,27310,256,59,113,1756,1755,3297,6567,0,6632,6673,6677,6706,0,6711,6736,0,0,6836,0,0,6849,0,0,6945,6958,6989,6994,0,7165,0,7180,384,99,112,114,6573,6578,6621,117,116,101,59,16647,768,59,97,98,99,100,115,6591,6592,6596,6602,6613,6617,25129,110,100,59,27204,114,99,117,112,59,27209,256,97,117,6607,6610,112,59,27211,112,59,27207,111,116,59,27200,59,49152,8745,65024,256,101,111,6626,6629,116,59,24641,238,1683,512,97,101,105,117,6640,6651,6657,6661,496,6645,0,6648,115,59,27213,111,110,59,16653,100,105,108,32827,231,16615,114,99,59,16649,112,115,256,59,115,6668,6669,27212,109,59,27216,111,116,59,16651,384,100,109,110,6683,6688,6694,105,108,32955,184,429,112,116,121,118,59,27058,116,33024,162,59,101,6701,6702,16546,114,228,434,114,59,49152,55349,56608,384,99,101,105,6717,6720,6733,121,59,17479,99,107,256,59,109,6727,6728,26387,97,114,107,187,6728,59,17351,114,896,59,69,99,101,102,109,115,6751,6752,6754,6763,6820,6826,6830,26059,59,27075,384,59,101,108,6761,6762,6765,17094,113,59,25175,101,609,6772,0,0,6792,114,114,111,119,256,108,114,6780,6785,101,102,116,59,25018,105,103,104,116,59,25019,640,82,83,97,99,100,6802,6804,6806,6810,6815,187,3911,59,25800,115,116,59,25243,105,114,99,59,25242,97,115,104,59,25245,110,105,110,116,59,27152,105,100,59,27375,99,105,114,59,27074,117,98,115,256,59,117,6843,6844,26211,105,116,187,6844,748,6855,6868,6906,0,6922,111,110,256,59,101,6861,6862,16442,256,59,113,199,198,621,6873,0,0,6882,97,256,59,116,6878,6879,16428,59,16448,384,59,102,108,6888,6889,6891,25089,238,4448,101,256,109,120,6897,6902,101,110,116,187,6889,101,243,589,487,6910,0,6919,256,59,100,4795,6914,111,116,59,27245,110,244,582,384,102,114,121,6928,6932,6935,59,49152,55349,56660,111,228,596,33024,169,59,115,341,6941,114,59,24855,256,97,111,6949,6953,114,114,59,25013,115,115,59,26391,256,99,117,6962,6967,114,59,49152,55349,56504,256,98,112,6972,6980,256,59,101,6977,6978,27343,59,27345,256,59,101,6985,6986,27344,59,27346,100,111,116,59,25327,896,100,101,108,112,114,118,119,7008,7020,7031,7042,7084,7124,7161,97,114,114,256,108,114,7016,7018,59,26936,59,26933,624,7026,0,0,7029,114,59,25310,99,59,25311,97,114,114,256,59,112,7039,7040,25014,59,26941,768,59,98,99,100,111,115,7055,7056,7062,7073,7077,7080,25130,114,99,97,112,59,27208,256,97,117,7067,7070,112,59,27206,112,59,27210,111,116,59,25229,114,59,27205,59,49152,8746,65024,512,97,108,114,118,7093,7103,7134,7139,114,114,256,59,109,7100,7101,25015,59,26940,121,384,101,118,119,7111,7124,7128,113,624,7118,0,0,7122,114,101,227,7027,117,227,7029,101,101,59,25294,101,100,103,101,59,25295,101,110,32827,164,16548,101,97,114,114,111,119,256,108,114,7150,7155,101,102,116,187,7040,105,103,104,116,187,7101,101,228,7133,256,99,105,7169,7175,111,110,105,110,244,503,110,116,59,25137,108,99,116,121,59,25389,2432,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,7224,7227,7231,7261,7273,7285,7306,7326,7340,7351,7419,7423,7437,7547,7569,7595,7611,7622,7629,114,242,897,97,114,59,26981,512,103,108,114,115,7240,7245,7250,7252,103,101,114,59,24608,101,116,104,59,24888,242,4403,104,256,59,118,7258,7259,24592,187,2314,363,7265,7271,97,114,111,119,59,26895,97,227,789,256,97,121,7278,7283,114,111,110,59,16655,59,17460,384,59,97,111,818,7292,7300,256,103,114,703,7297,114,59,25034,116,115,101,113,59,27255,384,103,108,109,7313,7316,7320,32827,176,16560,116,97,59,17332,112,116,121,118,59,27057,256,105,114,7331,7336,115,104,116,59,27007,59,49152,55349,56609,97,114,256,108,114,7347,7349,187,2268,187,4126,640,97,101,103,115,118,7362,888,7382,7388,7392,109,384,59,111,115,806,7370,7380,110,100,256,59,115,806,7377,117,105,116,59,26214,97,109,109,97,59,17373,105,110,59,25330,384,59,105,111,7399,7400,7416,16631,100,101,33024,247,59,111,7399,7408,110,116,105,109,101,115,59,25287,110,248,7415,99,121,59,17490,99,623,7430,0,0,7434,114,110,59,25374,111,112,59,25357,640,108,112,116,117,119,7448,7453,7458,7497,7509,108,97,114,59,16420,102,59,49152,55349,56661,640,59,101,109,112,115,779,7469,7479,7485,7490,113,256,59,100,850,7475,111,116,59,25169,105,110,117,115,59,25144,108,117,115,59,25108,113,117,97,114,101,59,25249,98,108,101,98,97,114,119,101,100,103,229,250,110,384,97,100,104,4398,7517,7527,111,119,110,97,114,114,111,119,243,7299,97,114,112,111,111,110,256,108,114,7538,7542,101,102,244,7348,105,103,104,244,7350,354,7551,7557,107,97,114,111,247,3906,623,7562,0,0,7566,114,110,59,25375,111,112,59,25356,384,99,111,116,7576,7587,7590,256,114,121,7581,7585,59,49152,55349,56505,59,17493,108,59,27126,114,111,107,59,16657,256,100,114,7600,7604,111,116,59,25329,105,256,59,102,7610,6166,26047,256,97,104,7616,7619,114,242,1065,97,242,4006,97,110,103,108,101,59,27046,256,99,105,7634,7637,121,59,17503,103,114,97,114,114,59,26623,2304,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,7681,7689,7705,7736,1400,7740,7753,7777,7806,7845,7855,7869,7905,7978,7991,8004,8014,8026,256,68,111,7686,7476,111,244,7305,256,99,115,7694,7700,117,116,101,32827,233,16617,116,101,114,59,27246,512,97,105,111,121,7714,7719,7729,7734,114,111,110,59,16667,114,256,59,99,7725,7726,25174,32827,234,16618,108,111,110,59,25173,59,17485,111,116,59,16663,256,68,114,7745,7749,111,116,59,25170,59,49152,55349,56610,384,59,114,115,7760,7761,7767,27290,97,118,101,32827,232,16616,256,59,100,7772,7773,27286,111,116,59,27288,512,59,105,108,115,7786,7787,7794,7796,27289,110,116,101,114,115,59,25575,59,24851,256,59,100,7801,7802,27285,111,116,59,27287,384,97,112,115,7813,7817,7831,99,114,59,16659,116,121,384,59,115,118,7826,7827,7829,25093,101,116,187,7827,112,256,49,59,7837,7844,307,7841,7843,59,24580,59,24581,24579,256,103,115,7850,7852,59,16715,112,59,24578,256,103,112,7860,7864,111,110,59,16665,102,59,49152,55349,56662,384,97,108,115,7876,7886,7890,114,256,59,115,7882,7883,25301,108,59,27107,117,115,59,27249,105,384,59,108,118,7898,7899,7903,17333,111,110,187,7899,59,17397,512,99,115,117,118,7914,7923,7947,7971,256,105,111,7919,7729,114,99,187,7726,617,7929,0,0,7931,237,1352,97,110,116,256,103,108,7938,7942,116,114,187,7773,101,115,115,187,7802,384,97,101,105,7954,7958,7962,108,115,59,16445,115,116,59,25183,118,256,59,68,565,7968,68,59,27256,112,97,114,115,108,59,27109,256,68,97,7983,7987,111,116,59,25171,114,114,59,26993,384,99,100,105,7998,8001,7928,114,59,24879,111,244,850,256,97,104,8009,8011,59,17335,32827,240,16624,256,109,114,8019,8023,108,32827,235,16619,111,59,24748,384,99,105,112,8033,8036,8039,108,59,16417,115,244,1390,256,101,111,8044,8052,99,116,97,116,105,111,238,1369,110,101,110,116,105,97,108,229,1401,2529,8082,0,8094,0,8097,8103,0,0,8134,8140,0,8147,0,8166,8170,8192,0,8200,8282,108,108,105,110,103,100,111,116,115,101,241,7748,121,59,17476,109,97,108,101,59,26176,384,105,108,114,8109,8115,8129,108,105,103,59,32768,64259,617,8121,0,0,8125,103,59,32768,64256,105,103,59,32768,64260,59,49152,55349,56611,108,105,103,59,32768,64257,108,105,103,59,49152,102,106,384,97,108,116,8153,8156,8161,116,59,26221,105,103,59,32768,64258,110,115,59,26033,111,102,59,16786,496,8174,0,8179,102,59,49152,55349,56663,256,97,107,1471,8183,256,59,118,8188,8189,25300,59,27353,97,114,116,105,110,116,59,27149,256,97,111,8204,8277,256,99,115,8209,8274,945,8218,8240,8248,8261,8264,0,8272,946,8226,8229,8231,8234,8236,0,8238,32827,189,16573,59,24915,32827,188,16572,59,24917,59,24921,59,24923,435,8244,0,8246,59,24916,59,24918,692,8254,8257,0,0,8259,32827,190,16574,59,24919,59,24924,53,59,24920,438,8268,0,8270,59,24922,59,24925,56,59,24926,108,59,24644,119,110,59,25378,99,114,59,49152,55349,56507,2176,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,8322,8329,8351,8357,8368,8372,8432,8437,8442,8447,8451,8466,8504,791,8510,8530,8606,256,59,108,1613,8327,59,27276,384,99,109,112,8336,8341,8349,117,116,101,59,16885,109,97,256,59,100,8348,7386,17331,59,27270,114,101,118,101,59,16671,256,105,121,8362,8366,114,99,59,16669,59,17459,111,116,59,16673,512,59,108,113,115,1598,1602,8381,8393,384,59,113,115,1598,1612,8388,108,97,110,244,1637,512,59,99,100,108,1637,8402,8405,8421,99,59,27305,111,116,256,59,111,8412,8413,27264,256,59,108,8418,8419,27266,59,27268,256,59,101,8426,8429,49152,8923,65024,115,59,27284,114,59,49152,55349,56612,256,59,103,1651,1563,109,101,108,59,24887,99,121,59,17491,512,59,69,97,106,1626,8460,8462,8464,59,27282,59,27301,59,27300,512,69,97,101,115,8475,8477,8489,8500,59,25193,112,256,59,112,8483,8484,27274,114,111,120,187,8484,256,59,113,8494,8495,27272,256,59,113,8494,8475,105,109,59,25319,112,102,59,49152,55349,56664,256,99,105,8515,8518,114,59,24842,109,384,59,101,108,1643,8526,8528,59,27278,59,27280,33536,62,59,99,100,108,113,114,1518,8544,8554,8558,8563,8569,256,99,105,8549,8551,59,27303,114,59,27258,111,116,59,25303,80,97,114,59,27029,117,101,115,116,59,27260,640,97,100,101,108,115,8580,8554,8592,1622,8603,496,8585,0,8590,112,114,111,248,8350,114,59,27e3,113,256,108,113,1599,8598,108,101,115,243,8328,105,237,1643,256,101,110,8611,8621,114,116,110,101,113,113,59,49152,8809,65024,197,8618,1280,65,97,98,99,101,102,107,111,115,121,8644,8647,8689,8693,8698,8728,8733,8751,8808,8829,114,242,928,512,105,108,109,114,8656,8660,8663,8667,114,115,240,5252,102,187,8228,105,108,244,1705,256,100,114,8672,8676,99,121,59,17482,384,59,99,119,2292,8683,8687,105,114,59,26952,59,25005,97,114,59,24847,105,114,99,59,16677,384,97,108,114,8705,8718,8723,114,116,115,256,59,117,8713,8714,26213,105,116,187,8714,108,105,112,59,24614,99,111,110,59,25273,114,59,49152,55349,56613,115,256,101,119,8739,8745,97,114,111,119,59,26917,97,114,111,119,59,26918,640,97,109,111,112,114,8762,8766,8771,8798,8803,114,114,59,25087,116,104,116,59,25147,107,256,108,114,8777,8787,101,102,116,97,114,114,111,119,59,25001,105,103,104,116,97,114,114,111,119,59,25002,102,59,49152,55349,56665,98,97,114,59,24597,384,99,108,116,8815,8820,8824,114,59,49152,55349,56509,97,115,232,8692,114,111,107,59,16679,256,98,112,8834,8839,117,108,108,59,24643,104,101,110,187,7259,2785,8867,0,8874,0,8888,8901,8910,0,8917,8947,0,0,8952,8994,9063,9058,9087,0,9094,9130,9140,99,117,116,101,32827,237,16621,384,59,105,121,1905,8880,8885,114,99,32827,238,16622,59,17464,256,99,120,8892,8895,121,59,17461,99,108,32827,161,16545,256,102,114,927,8905,59,49152,55349,56614,114,97,118,101,32827,236,16620,512,59,105,110,111,1854,8925,8937,8942,256,105,110,8930,8934,110,116,59,27148,116,59,25133,102,105,110,59,27100,116,97,59,24873,108,105,103,59,16691,384,97,111,112,8958,8986,8989,384,99,103,116,8965,8968,8983,114,59,16683,384,101,108,112,1823,8975,8979,105,110,229,1934,97,114,244,1824,104,59,16689,102,59,25271,101,100,59,16821,640,59,99,102,111,116,1268,9004,9009,9021,9025,97,114,101,59,24837,105,110,256,59,116,9016,9017,25118,105,101,59,27101,100,111,244,8985,640,59,99,101,108,112,1879,9036,9040,9051,9057,97,108,59,25274,256,103,114,9045,9049,101,114,243,5475,227,9037,97,114,104,107,59,27159,114,111,100,59,27196,512,99,103,112,116,9071,9074,9078,9083,121,59,17489,111,110,59,16687,102,59,49152,55349,56666,97,59,17337,117,101,115,116,32827,191,16575,256,99,105,9098,9103,114,59,49152,55349,56510,110,640,59,69,100,115,118,1268,9115,9117,9121,1267,59,25337,111,116,59,25333,256,59,118,9126,9127,25332,59,25331,256,59,105,1911,9134,108,100,101,59,16681,491,9144,0,9148,99,121,59,17494,108,32827,239,16623,768,99,102,109,111,115,117,9164,9175,9180,9185,9191,9205,256,105,121,9169,9173,114,99,59,16693,59,17465,114,59,49152,55349,56615,97,116,104,59,16951,112,102,59,49152,55349,56667,483,9196,0,9201,114,59,49152,55349,56511,114,99,121,59,17496,107,99,121,59,17492,1024,97,99,102,103,104,106,111,115,9227,9238,9250,9255,9261,9265,9269,9275,112,112,97,256,59,118,9235,9236,17338,59,17392,256,101,121,9243,9248,100,105,108,59,16695,59,17466,114,59,49152,55349,56616,114,101,101,110,59,16696,99,121,59,17477,99,121,59,17500,112,102,59,49152,55349,56668,99,114,59,49152,55349,56512,2944,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,9328,9345,9350,9357,9361,9486,9533,9562,9600,9806,9822,9829,9849,9853,9882,9906,9944,10077,10088,10123,10176,10241,10258,384,97,114,116,9335,9338,9340,114,242,2502,242,917,97,105,108,59,26907,97,114,114,59,26894,256,59,103,2452,9355,59,27275,97,114,59,26978,2403,9381,0,9386,0,9393,0,0,0,0,0,9397,9402,0,9414,9416,9421,0,9465,117,116,101,59,16698,109,112,116,121,118,59,27060,114,97,238,2124,98,100,97,59,17339,103,384,59,100,108,2190,9409,9411,59,27025,229,2190,59,27269,117,111,32827,171,16555,114,1024,59,98,102,104,108,112,115,116,2201,9438,9446,9449,9451,9454,9457,9461,256,59,102,2205,9443,115,59,26911,115,59,26909,235,8786,112,59,25003,108,59,26937,105,109,59,26995,108,59,24994,384,59,97,101,9471,9472,9476,27307,105,108,59,26905,256,59,115,9481,9482,27309,59,49152,10925,65024,384,97,98,114,9493,9497,9501,114,114,59,26892,114,107,59,26482,256,97,107,9506,9516,99,256,101,107,9512,9514,59,16507,59,16475,256,101,115,9521,9523,59,27019,108,256,100,117,9529,9531,59,27023,59,27021,512,97,101,117,121,9542,9547,9558,9560,114,111,110,59,16702,256,100,105,9552,9556,105,108,59,16700,236,2224,226,9513,59,17467,512,99,113,114,115,9571,9574,9581,9597,97,59,26934,117,111,256,59,114,3609,5958,256,100,117,9586,9591,104,97,114,59,26983,115,104,97,114,59,26955,104,59,25010,640,59,102,103,113,115,9611,9612,2441,9715,9727,25188,116,640,97,104,108,114,116,9624,9636,9655,9666,9704,114,114,111,119,256,59,116,2201,9633,97,233,9462,97,114,112,111,111,110,256,100,117,9647,9652,111,119,110,187,1114,112,187,2406,101,102,116,97,114,114,111,119,115,59,25031,105,103,104,116,384,97,104,115,9677,9686,9694,114,114,111,119,256,59,115,2292,2215,97,114,112,111,111,110,243,3992,113,117,105,103,97,114,114,111,247,8688,104,114,101,101,116,105,109,101,115,59,25291,384,59,113,115,9611,2451,9722,108,97,110,244,2476,640,59,99,100,103,115,2476,9738,9741,9757,9768,99,59,27304,111,116,256,59,111,9748,9749,27263,256,59,114,9754,9755,27265,59,27267,256,59,101,9762,9765,49152,8922,65024,115,59,27283,640,97,100,101,103,115,9779,9785,9789,9801,9803,112,112,114,111,248,9414,111,116,59,25302,113,256,103,113,9795,9797,244,2441,103,116,242,9356,244,2459,105,237,2482,384,105,108,114,9813,2273,9818,115,104,116,59,27004,59,49152,55349,56617,256,59,69,2460,9827,59,27281,353,9833,9846,114,256,100,117,9650,9838,256,59,108,2405,9843,59,26986,108,107,59,25988,99,121,59,17497,640,59,97,99,104,116,2632,9864,9867,9873,9878,114,242,9665,111,114,110,101,242,7432,97,114,100,59,26987,114,105,59,26106,256,105,111,9887,9892,100,111,116,59,16704,117,115,116,256,59,97,9900,9901,25520,99,104,101,187,9901,512,69,97,101,115,9915,9917,9929,9940,59,25192,112,256,59,112,9923,9924,27273,114,111,120,187,9924,256,59,113,9934,9935,27271,256,59,113,9934,9915,105,109,59,25318,1024,97,98,110,111,112,116,119,122,9961,9972,9975,10010,10031,10049,10055,10064,256,110,114,9966,9969,103,59,26604,114,59,25085,114,235,2241,103,384,108,109,114,9983,9997,10004,101,102,116,256,97,114,2534,9991,105,103,104,116,225,2546,97,112,115,116,111,59,26620,105,103,104,116,225,2557,112,97,114,114,111,119,256,108,114,10021,10025,101,102,244,9453,105,103,104,116,59,25004,384,97,102,108,10038,10041,10045,114,59,27013,59,49152,55349,56669,117,115,59,27181,105,109,101,115,59,27188,353,10059,10063,115,116,59,25111,225,4942,384,59,101,102,10071,10072,6144,26058,110,103,101,187,10072,97,114,256,59,108,10084,10085,16424,116,59,27027,640,97,99,104,109,116,10099,10102,10108,10117,10119,114,242,2216,111,114,110,101,242,7564,97,114,256,59,100,3992,10115,59,26989,59,24590,114,105,59,25279,768,97,99,104,105,113,116,10136,10141,2624,10146,10158,10171,113,117,111,59,24633,114,59,49152,55349,56513,109,384,59,101,103,2482,10154,10156,59,27277,59,27279,256,98,117,9514,10163,111,256,59,114,3615,10169,59,24602,114,111,107,59,16706,33792,60,59,99,100,104,105,108,113,114,2091,10194,9785,10204,10208,10213,10218,10224,256,99,105,10199,10201,59,27302,114,59,27257,114,101,229,9714,109,101,115,59,25289,97,114,114,59,26998,117,101,115,116,59,27259,256,80,105,10229,10233,97,114,59,27030,384,59,101,102,10240,2349,6171,26051,114,256,100,117,10247,10253,115,104,97,114,59,26954,104,97,114,59,26982,256,101,110,10263,10273,114,116,110,101,113,113,59,49152,8808,65024,197,10270,1792,68,97,99,100,101,102,104,105,108,110,111,112,115,117,10304,10309,10370,10382,10387,10400,10405,10408,10458,10466,10468,2691,10483,10498,68,111,116,59,25146,512,99,108,112,114,10318,10322,10339,10365,114,32827,175,16559,256,101,116,10327,10329,59,26178,256,59,101,10334,10335,26400,115,101,187,10335,256,59,115,4155,10344,116,111,512,59,100,108,117,4155,10355,10359,10363,111,119,238,1164,101,102,244,2319,240,5073,107,101,114,59,26030,256,111,121,10375,10380,109,109,97,59,27177,59,17468,97,115,104,59,24596,97,115,117,114,101,100,97,110,103,108,101,187,5670,114,59,49152,55349,56618,111,59,24871,384,99,100,110,10415,10420,10441,114,111,32827,181,16565,512,59,97,99,100,5220,10429,10432,10436,115,244,5799,105,114,59,27376,111,116,32955,183,437,117,115,384,59,98,100,10450,6403,10451,25106,256,59,117,7484,10456,59,27178,355,10462,10465,112,59,27355,242,8722,240,2689,256,100,112,10473,10478,101,108,115,59,25255,102,59,49152,55349,56670,256,99,116,10488,10493,114,59,49152,55349,56514,112,111,115,187,5533,384,59,108,109,10505,10506,10509,17340,116,105,109,97,112,59,25272,3072,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,10562,10579,10622,10633,10648,10714,10729,10773,10778,10840,10845,10883,10901,10916,10920,11012,11015,11076,11135,11182,11316,11367,11388,11497,256,103,116,10567,10571,59,49152,8921,824,256,59,118,10576,3023,49152,8811,8402,384,101,108,116,10586,10610,10614,102,116,256,97,114,10593,10599,114,114,111,119,59,25037,105,103,104,116,97,114,114,111,119,59,25038,59,49152,8920,824,256,59,118,10619,3143,49152,8810,8402,105,103,104,116,97,114,114,111,119,59,25039,256,68,100,10638,10643,97,115,104,59,25263,97,115,104,59,25262,640,98,99,110,112,116,10659,10663,10668,10673,10700,108,97,187,734,117,116,101,59,16708,103,59,49152,8736,8402,640,59,69,105,111,112,3460,10684,10688,10693,10696,59,49152,10864,824,100,59,49152,8779,824,115,59,16713,114,111,248,3460,117,114,256,59,97,10707,10708,26222,108,256,59,115,10707,2872,499,10719,0,10723,112,32955,160,2871,109,112,256,59,101,3065,3072,640,97,101,111,117,121,10740,10750,10755,10768,10771,496,10745,0,10747,59,27203,111,110,59,16712,100,105,108,59,16710,110,103,256,59,100,3454,10762,111,116,59,49152,10861,824,112,59,27202,59,17469,97,115,104,59,24595,896,59,65,97,100,113,115,120,2962,10793,10797,10811,10817,10821,10832,114,114,59,25047,114,256,104,114,10803,10806,107,59,26916,256,59,111,5106,5104,111,116,59,49152,8784,824,117,105,246,2915,256,101,105,10826,10830,97,114,59,26920,237,2968,105,115,116,256,59,115,2976,2975,114,59,49152,55349,56619,512,69,101,115,116,3013,10854,10873,10876,384,59,113,115,3004,10861,3041,384,59,113,115,3004,3013,10868,108,97,110,244,3042,105,237,3050,256,59,114,2998,10881,187,2999,384,65,97,112,10890,10893,10897,114,242,10609,114,114,59,25006,97,114,59,27378,384,59,115,118,3981,10908,3980,256,59,100,10913,10914,25340,59,25338,99,121,59,17498,896,65,69,97,100,101,115,116,10935,10938,10942,10946,10949,10998,11001,114,242,10598,59,49152,8806,824,114,114,59,24986,114,59,24613,512,59,102,113,115,3131,10958,10979,10991,116,256,97,114,10964,10969,114,114,111,247,10945,105,103,104,116,97,114,114,111,247,10896,384,59,113,115,3131,10938,10986,108,97,110,244,3157,256,59,115,3157,10996,187,3126,105,237,3165,256,59,114,3125,11006,105,256,59,101,3098,3109,105,228,3472,256,112,116,11020,11025,102,59,49152,55349,56671,33152,172,59,105,110,11033,11034,11062,16556,110,512,59,69,100,118,2953,11044,11048,11054,59,49152,8953,824,111,116,59,49152,8949,824,481,2953,11059,11061,59,25335,59,25334,105,256,59,118,3256,11068,481,3256,11073,11075,59,25342,59,25341,384,97,111,114,11083,11107,11113,114,512,59,97,115,116,2939,11093,11098,11103,108,108,101,236,2939,108,59,49152,11005,8421,59,49152,8706,824,108,105,110,116,59,27156,384,59,99,101,3218,11120,11123,117,229,3237,256,59,99,3224,11128,256,59,101,3218,11133,241,3224,512,65,97,105,116,11144,11147,11165,11175,114,242,10632,114,114,384,59,99,119,11156,11157,11161,24987,59,49152,10547,824,59,49152,8605,824,103,104,116,97,114,114,111,119,187,11157,114,105,256,59,101,3275,3286,896,99,104,105,109,112,113,117,11197,11213,11225,11012,2936,11236,11247,512,59,99,101,114,3378,11206,3383,11209,117,229,3397,59,49152,55349,56515,111,114,116,621,11013,0,0,11222,97,114,225,11094,109,256,59,101,3438,11231,256,59,113,3444,3443,115,117,256,98,112,11243,11245,229,3320,229,3339,384,98,99,112,11254,11281,11289,512,59,69,101,115,11263,11264,3362,11268,25220,59,49152,10949,824,101,116,256,59,101,3355,11275,113,256,59,113,3363,11264,99,256,59,101,3378,11287,241,3384,512,59,69,101,115,11298,11299,3423,11303,25221,59,49152,10950,824,101,116,256,59,101,3416,11310,113,256,59,113,3424,11299,512,103,105,108,114,11325,11327,11333,11335,236,3031,108,100,101,32827,241,16625,231,3139,105,97,110,103,108,101,256,108,114,11346,11356,101,102,116,256,59,101,3098,11354,241,3110,105,103,104,116,256,59,101,3275,11365,241,3287,256,59,109,11372,11373,17341,384,59,101,115,11380,11381,11385,16419,114,111,59,24854,112,59,24583,1152,68,72,97,100,103,105,108,114,115,11407,11412,11417,11422,11427,11440,11446,11475,11491,97,115,104,59,25261,97,114,114,59,26884,112,59,49152,8781,8402,97,115,104,59,25260,256,101,116,11432,11436,59,49152,8805,8402,59,49152,62,8402,110,102,105,110,59,27102,384,65,101,116,11453,11457,11461,114,114,59,26882,59,49152,8804,8402,256,59,114,11466,11469,49152,60,8402,105,101,59,49152,8884,8402,256,65,116,11480,11484,114,114,59,26883,114,105,101,59,49152,8885,8402,105,109,59,49152,8764,8402,384,65,97,110,11504,11508,11522,114,114,59,25046,114,256,104,114,11514,11517,107,59,26915,256,59,111,5095,5093,101,97,114,59,26919,4691,6805,0,0,0,0,0,0,0,0,0,0,0,0,0,11565,0,11576,11592,11616,11621,11634,11652,6919,0,0,11661,11691,0,11720,11726,0,11740,11801,11819,11838,11843,256,99,115,11569,6807,117,116,101,32827,243,16627,256,105,121,11580,11589,114,256,59,99,6814,11586,32827,244,16628,59,17470,640,97,98,105,111,115,6816,11602,11607,456,11610,108,97,99,59,16721,118,59,27192,111,108,100,59,27068,108,105,103,59,16723,256,99,114,11625,11629,105,114,59,27071,59,49152,55349,56620,879,11641,0,0,11644,0,11650,110,59,17115,97,118,101,32827,242,16626,59,27073,256,98,109,11656,3572,97,114,59,27061,512,97,99,105,116,11669,11672,11685,11688,114,242,6784,256,105,114,11677,11680,114,59,27070,111,115,115,59,27067,110,229,3666,59,27072,384,97,101,105,11697,11701,11705,99,114,59,16717,103,97,59,17353,384,99,100,110,11712,11717,461,114,111,110,59,17343,59,27062,112,102,59,49152,55349,56672,384,97,101,108,11732,11735,466,114,59,27063,114,112,59,27065,896,59,97,100,105,111,115,118,11754,11755,11758,11784,11789,11792,11798,25128,114,242,6790,512,59,101,102,109,11767,11768,11778,11781,27229,114,256,59,111,11774,11775,24884,102,187,11775,32827,170,16554,32827,186,16570,103,111,102,59,25270,114,59,27222,108,111,112,101,59,27223,59,27227,384,99,108,111,11807,11809,11815,242,11777,97,115,104,32827,248,16632,108,59,25240,105,364,11823,11828,100,101,32827,245,16629,101,115,256,59,97,475,11834,115,59,27190,109,108,32827,246,16630,98,97,114,59,25405,2785,11870,0,11901,0,11904,11933,0,11938,11961,0,0,11979,3740,0,12051,0,0,12075,12220,0,12232,114,512,59,97,115,116,1027,11879,11890,3717,33024,182,59,108,11885,11886,16566,108,101,236,1027,617,11896,0,0,11899,109,59,27379,59,27389,121,59,17471,114,640,99,105,109,112,116,11915,11919,11923,6245,11927,110,116,59,16421,111,100,59,16430,105,108,59,24624,101,110,107,59,24625,114,59,49152,55349,56621,384,105,109,111,11944,11952,11956,256,59,118,11949,11950,17350,59,17365,109,97,244,2678,110,101,59,26126,384,59,116,118,11967,11968,11976,17344,99,104,102,111,114,107,187,8189,59,17366,256,97,117,11983,11999,110,256,99,107,11989,11997,107,256,59,104,8692,11995,59,24846,246,8692,115,1152,59,97,98,99,100,101,109,115,116,12019,12020,6408,12025,12029,12036,12038,12042,12046,16427,99,105,114,59,27171,105,114,59,27170,256,111,117,7488,12034,59,27173,59,27250,110,32955,177,3741,105,109,59,27174,119,111,59,27175,384,105,112,117,12057,12064,12069,110,116,105,110,116,59,27157,102,59,49152,55349,56673,110,100,32827,163,16547,1280,59,69,97,99,101,105,110,111,115,117,3784,12095,12097,12100,12103,12161,12169,12178,12158,12214,59,27315,112,59,27319,117,229,3801,256,59,99,3790,12108,768,59,97,99,101,110,115,3784,12121,12127,12134,12136,12158,112,112,114,111,248,12099,117,114,108,121,101,241,3801,241,3790,384,97,101,115,12143,12150,12154,112,112,114,111,120,59,27321,113,113,59,27317,105,109,59,25320,105,237,3807,109,101,256,59,115,12168,3758,24626,384,69,97,115,12152,12176,12154,240,12149,384,100,102,112,3820,12185,12207,384,97,108,115,12192,12197,12202,108,97,114,59,25390,105,110,101,59,25362,117,114,102,59,25363,256,59,116,3835,12212,239,3835,114,101,108,59,25264,256,99,105,12224,12229,114,59,49152,55349,56517,59,17352,110,99,115,112,59,24584,768,102,105,111,112,115,117,12250,8930,12255,12261,12267,12273,114,59,49152,55349,56622,112,102,59,49152,55349,56674,114,105,109,101,59,24663,99,114,59,49152,55349,56518,384,97,101,111,12280,12297,12307,116,256,101,105,12286,12293,114,110,105,111,110,243,1712,110,116,59,27158,115,116,256,59,101,12304,12305,16447,241,7961,244,3860,2688,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,12352,12369,12373,12377,12512,12558,12587,12615,12642,12658,12686,12806,12821,12836,12841,12888,12910,12914,12944,12976,12983,384,97,114,116,12359,12362,12364,114,242,4275,242,989,97,105,108,59,26908,97,114,242,7269,97,114,59,26980,896,99,100,101,110,113,114,116,12392,12405,12408,12415,12431,12436,12492,256,101,117,12397,12401,59,49152,8765,817,116,101,59,16725,105,227,4462,109,112,116,121,118,59,27059,103,512,59,100,101,108,4049,12425,12427,12429,59,27026,59,27045,229,4049,117,111,32827,187,16571,114,1408,59,97,98,99,102,104,108,112,115,116,119,4060,12460,12463,12471,12473,12476,12478,12480,12483,12487,12490,112,59,26997,256,59,102,4064,12468,115,59,26912,59,26931,115,59,26910,235,8797,240,10030,108,59,26949,105,109,59,26996,108,59,24995,59,24989,256,97,105,12497,12501,105,108,59,26906,111,256,59,110,12507,12508,25142,97,108,243,3870,384,97,98,114,12519,12522,12526,114,242,6117,114,107,59,26483,256,97,107,12531,12541,99,256,101,107,12537,12539,59,16509,59,16477,256,101,115,12546,12548,59,27020,108,256,100,117,12554,12556,59,27022,59,27024,512,97,101,117,121,12567,12572,12583,12585,114,111,110,59,16729,256,100,105,12577,12581,105,108,59,16727,236,4082,226,12538,59,17472,512,99,108,113,115,12596,12599,12605,12612,97,59,26935,100,104,97,114,59,26985,117,111,256,59,114,526,525,104,59,25011,384,97,99,103,12622,12639,3908,108,512,59,105,112,115,3960,12632,12635,4252,110,229,4283,97,114,244,4009,116,59,26029,384,105,108,114,12649,4131,12654,115,104,116,59,27005,59,49152,55349,56623,256,97,111,12663,12678,114,256,100,117,12669,12671,187,1147,256,59,108,4241,12676,59,26988,256,59,118,12683,12684,17345,59,17393,384,103,110,115,12693,12793,12796,104,116,768,97,104,108,114,115,116,12708,12720,12738,12760,12772,12782,114,114,111,119,256,59,116,4060,12717,97,233,12488,97,114,112,111,111,110,256,100,117,12731,12735,111,119,238,12670,112,187,4242,101,102,116,256,97,104,12746,12752,114,114,111,119,243,4074,97,114,112,111,111,110,243,1361,105,103,104,116,97,114,114,111,119,115,59,25033,113,117,105,103,97,114,114,111,247,12491,104,114,101,101,116,105,109,101,115,59,25292,103,59,17114,105,110,103,100,111,116,115,101,241,7986,384,97,104,109,12813,12816,12819,114,242,4074,97,242,1361,59,24591,111,117,115,116,256,59,97,12830,12831,25521,99,104,101,187,12831,109,105,100,59,27374,512,97,98,112,116,12850,12861,12864,12882,256,110,114,12855,12858,103,59,26605,114,59,25086,114,235,4099,384,97,102,108,12871,12874,12878,114,59,27014,59,49152,55349,56675,117,115,59,27182,105,109,101,115,59,27189,256,97,112,12893,12903,114,256,59,103,12899,12900,16425,116,59,27028,111,108,105,110,116,59,27154,97,114,242,12771,512,97,99,104,113,12923,12928,4284,12933,113,117,111,59,24634,114,59,49152,55349,56519,256,98,117,12539,12938,111,256,59,114,532,531,384,104,105,114,12951,12955,12960,114,101,229,12792,109,101,115,59,25290,105,512,59,101,102,108,12970,4185,6177,12971,26041,116,114,105,59,27086,108,117,104,97,114,59,26984,59,24862,3425,13013,13019,13023,13100,13112,13169,0,13178,13220,0,0,13292,13296,0,13352,13384,13402,13485,13489,13514,13553,0,13846,0,0,13875,99,117,116,101,59,16731,113,117,239,10170,1280,59,69,97,99,101,105,110,112,115,121,4589,13043,13045,13055,13058,13067,13071,13087,13094,13097,59,27316,496,13050,0,13052,59,27320,111,110,59,16737,117,229,4606,256,59,100,4595,13063,105,108,59,16735,114,99,59,16733,384,69,97,115,13078,13080,13083,59,27318,112,59,27322,105,109,59,25321,111,108,105,110,116,59,27155,105,237,4612,59,17473,111,116,384,59,98,101,13108,7495,13109,25285,59,27238,896,65,97,99,109,115,116,120,13126,13130,13143,13147,13150,13155,13165,114,114,59,25048,114,256,104,114,13136,13138,235,8744,256,59,111,2614,2612,116,32827,167,16551,105,59,16443,119,97,114,59,26921,109,256,105,110,13161,240,110,117,243,241,116,59,26422,114,256,59,111,13174,8277,49152,55349,56624,512,97,99,111,121,13186,13190,13201,13216,114,112,59,26223,256,104,121,13195,13199,99,121,59,17481,59,17480,114,116,621,13209,0,0,13212,105,228,5220,97,114,97,236,11887,32827,173,16557,256,103,109,13224,13236,109,97,384,59,102,118,13233,13234,13234,17347,59,17346,1024,59,100,101,103,108,110,112,114,4779,13253,13257,13262,13270,13278,13281,13286,111,116,59,27242,256,59,113,4785,4784,256,59,69,13267,13268,27294,59,27296,256,59,69,13275,13276,27293,59,27295,101,59,25158,108,117,115,59,27172,97,114,114,59,26994,97,114,242,4413,512,97,101,105,116,13304,13320,13327,13335,256,108,115,13309,13316,108,115,101,116,109,233,13162,104,112,59,27187,112,97,114,115,108,59,27108,256,100,108,5219,13332,101,59,25379,256,59,101,13340,13341,27306,256,59,115,13346,13347,27308,59,49152,10924,65024,384,102,108,112,13358,13363,13378,116,99,121,59,17484,256,59,98,13368,13369,16431,256,59,97,13374,13375,27076,114,59,25407,102,59,49152,55349,56676,97,256,100,114,13389,1026,101,115,256,59,117,13396,13397,26208,105,116,187,13397,384,99,115,117,13408,13433,13471,256,97,117,13413,13423,112,256,59,115,4488,13419,59,49152,8851,65024,112,256,59,115,4532,13429,59,49152,8852,65024,117,256,98,112,13439,13455,384,59,101,115,4503,4508,13446,101,116,256,59,101,4503,13453,241,4509,384,59,101,115,4520,4525,13462,101,116,256,59,101,4520,13469,241,4526,384,59,97,102,4475,13478,1456,114,357,13483,1457,187,4476,97,114,242,4424,512,99,101,109,116,13497,13502,13506,13509,114,59,49152,55349,56520,116,109,238,241,105,236,13333,97,114,230,4542,256,97,114,13518,13525,114,256,59,102,13524,6079,26118,256,97,110,13530,13549,105,103,104,116,256,101,112,13539,13546,112,115,105,108,111,238,7904,104,233,11951,115,187,10322,640,98,99,109,110,112,13563,13662,4617,13707,13710,1152,59,69,100,101,109,110,112,114,115,13582,13583,13585,13589,13598,13603,13612,13617,13622,25218,59,27333,111,116,59,27325,256,59,100,4570,13594,111,116,59,27331,117,108,116,59,27329,256,69,101,13608,13610,59,27339,59,25226,108,117,115,59,27327,97,114,114,59,27001,384,101,105,117,13629,13650,13653,116,384,59,101,110,13582,13637,13643,113,256,59,113,4570,13583,101,113,256,59,113,13611,13608,109,59,27335,256,98,112,13658,13660,59,27349,59,27347,99,768,59,97,99,101,110,115,4589,13676,13682,13689,13691,13094,112,112,114,111,248,13050,117,114,108,121,101,241,4606,241,4595,384,97,101,115,13698,13704,13083,112,112,114,111,248,13082,113,241,13079,103,59,26218,1664,49,50,51,59,69,100,101,104,108,109,110,112,115,13737,13740,13743,4636,13746,13748,13760,13769,13781,13786,13791,13800,13805,32827,185,16569,32827,178,16562,32827,179,16563,59,27334,256,111,115,13753,13756,116,59,27326,117,98,59,27352,256,59,100,4642,13765,111,116,59,27332,115,256,111,117,13775,13778,108,59,26569,98,59,27351,97,114,114,59,27003,117,108,116,59,27330,256,69,101,13796,13798,59,27340,59,25227,108,117,115,59,27328,384,101,105,117,13812,13833,13836,116,384,59,101,110,4636,13820,13826,113,256,59,113,4642,13746,101,113,256,59,113,13799,13796,109,59,27336,256,98,112,13841,13843,59,27348,59,27350,384,65,97,110,13852,13856,13869,114,114,59,25049,114,256,104,114,13862,13864,235,8750,256,59,111,2603,2601,119,97,114,59,26922,108,105,103,32827,223,16607,3041,13905,13917,13920,4814,13939,13945,0,13950,14018,0,0,0,0,0,14043,14083,0,14089,14188,0,0,0,14215,626,13910,0,0,13915,103,101,116,59,25366,59,17348,114,235,3679,384,97,101,121,13926,13931,13936,114,111,110,59,16741,100,105,108,59,16739,59,17474,108,114,101,99,59,25365,114,59,49152,55349,56625,512,101,105,107,111,13958,13981,14005,14012,498,13963,0,13969,101,256,52,102,4740,4737,97,384,59,115,118,13976,13977,13979,17336,121,109,59,17361,256,99,110,13986,14002,107,256,97,115,13992,13998,112,112,114,111,248,4801,105,109,187,4780,115,240,4766,256,97,115,14010,13998,240,4801,114,110,32827,254,16638,492,799,14022,8935,101,115,33152,215,59,98,100,14031,14032,14040,16599,256,59,97,6415,14037,114,59,27185,59,27184,384,101,112,115,14049,14051,14080,225,10829,512,59,98,99,102,1158,14060,14064,14068,111,116,59,25398,105,114,59,27377,256,59,111,14073,14076,49152,55349,56677,114,107,59,27354,225,13154,114,105,109,101,59,24628,384,97,105,112,14095,14098,14180,100,229,4680,896,97,100,101,109,112,115,116,14113,14157,14144,14161,14167,14172,14175,110,103,108,101,640,59,100,108,113,114,14128,14129,14134,14144,14146,26037,111,119,110,187,7611,101,102,116,256,59,101,10240,14142,241,2350,59,25180,105,103,104,116,256,59,101,12970,14155,241,4186,111,116,59,26092,105,110,117,115,59,27194,108,117,115,59,27193,98,59,27085,105,109,101,59,27195,101,122,105,117,109,59,25570,384,99,104,116,14194,14205,14209,256,114,121,14199,14203,59,49152,55349,56521,59,17478,99,121,59,17499,114,111,107,59,16743,256,105,111,14219,14222,120,244,6007,104,101,97,100,256,108,114,14231,14240,101,102,116,97,114,114,111,247,2127,105,103,104,116,97,114,114,111,119,187,3933,2304,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,14288,14291,14295,14308,14320,14332,14350,14364,14371,14388,14417,14429,14443,14505,14540,14546,14570,14582,114,242,1005,97,114,59,26979,256,99,114,14300,14306,117,116,101,32827,250,16634,242,4432,114,483,14314,0,14317,121,59,17502,118,101,59,16749,256,105,121,14325,14330,114,99,32827,251,16635,59,17475,384,97,98,104,14339,14342,14347,114,242,5037,108,97,99,59,16753,97,242,5059,256,105,114,14355,14360,115,104,116,59,27006,59,49152,55349,56626,114,97,118,101,32827,249,16633,353,14375,14385,114,256,108,114,14380,14382,187,2391,187,4227,108,107,59,25984,256,99,116,14393,14413,623,14399,0,0,14410,114,110,256,59,101,14405,14406,25372,114,187,14406,111,112,59,25359,114,105,59,26104,256,97,108,14422,14426,99,114,59,16747,32955,168,841,256,103,112,14434,14438,111,110,59,16755,102,59,49152,55349,56678,768,97,100,104,108,115,117,4427,14456,14461,4978,14481,14496,111,119,110,225,5043,97,114,112,111,111,110,256,108,114,14472,14476,101,102,244,14381,105,103,104,244,14383,105,384,59,104,108,14489,14490,14492,17349,187,5114,111,110,187,14490,112,97,114,114,111,119,115,59,25032,384,99,105,116,14512,14532,14536,623,14518,0,0,14529,114,110,256,59,101,14524,14525,25373,114,187,14525,111,112,59,25358,110,103,59,16751,114,105,59,26105,99,114,59,49152,55349,56522,384,100,105,114,14553,14557,14562,111,116,59,25328,108,100,101,59,16745,105,256,59,102,14128,14568,187,6163,256,97,109,14575,14578,114,242,14504,108,32827,252,16636,97,110,103,108,101,59,27047,1920,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,14620,14623,14633,14637,14773,14776,14781,14815,14820,14824,14835,14841,14845,14849,14880,114,242,1015,97,114,256,59,118,14630,14631,27368,59,27369,97,115,232,993,256,110,114,14642,14647,103,114,116,59,27036,896,101,107,110,112,114,115,116,13539,14662,14667,14674,14685,14692,14742,97,112,112,225,9237,111,116,104,105,110,231,7830,384,104,105,114,13547,11976,14681,111,112,244,12213,256,59,104,5047,14690,239,12685,256,105,117,14697,14701,103,109,225,13235,256,98,112,14706,14724,115,101,116,110,101,113,256,59,113,14717,14720,49152,8842,65024,59,49152,10955,65024,115,101,116,110,101,113,256,59,113,14735,14738,49152,8843,65024,59,49152,10956,65024,256,104,114,14747,14751,101,116,225,13980,105,97,110,103,108,101,256,108,114,14762,14767,101,102,116,187,2341,105,103,104,116,187,4177,121,59,17458,97,115,104,187,4150,384,101,108,114,14788,14802,14807,384,59,98,101,11754,14795,14799,97,114,59,25275,113,59,25178,108,105,112,59,25326,256,98,116,14812,5224,97,242,5225,114,59,49152,55349,56627,116,114,233,14766,115,117,256,98,112,14831,14833,187,3356,187,3417,112,102,59,49152,55349,56679,114,111,240,3835,116,114,233,14772,256,99,117,14854,14859,114,59,49152,55349,56523,256,98,112,14864,14872,110,256,69,101,14720,14870,187,14718,110,256,69,101,14738,14878,187,14736,105,103,122,97,103,59,27034,896,99,101,102,111,112,114,115,14902,14907,14934,14939,14932,14945,14954,105,114,99,59,16757,256,100,105,14912,14929,256,98,103,14917,14921,97,114,59,27231,101,256,59,113,5626,14927,59,25177,101,114,112,59,24856,114,59,49152,55349,56628,112,102,59,49152,55349,56680,256,59,101,5241,14950,97,116,232,5241,99,114,59,49152,55349,56524,2787,6030,14983,0,14987,0,14992,15003,0,0,15005,15016,15019,15023,0,0,15043,15054,0,15064,6108,6111,116,114,233,6097,114,59,49152,55349,56629,256,65,97,14996,14999,114,242,963,114,242,2550,59,17342,256,65,97,15009,15012,114,242,952,114,242,2539,97,240,10003,105,115,59,25339,384,100,112,116,6052,15029,15038,256,102,108,15034,6057,59,49152,55349,56681,105,109,229,6066,256,65,97,15047,15050,114,242,974,114,242,2561,256,99,113,15058,6072,114,59,49152,55349,56525,256,112,116,6102,15068,114,233,6100,1024,97,99,101,102,105,111,115,117,15088,15101,15112,15116,15121,15125,15131,15137,99,256,117,121,15094,15099,116,101,32827,253,16637,59,17487,256,105,121,15106,15110,114,99,59,16759,59,17483,110,32827,165,16549,114,59,49152,55349,56630,99,121,59,17495,112,102,59,49152,55349,56682,99,114,59,49152,55349,56526,256,99,109,15142,15145,121,59,17486,108,32827,255,16639,1280,97,99,100,101,102,104,105,111,115,119,15170,15176,15188,15192,15204,15209,15213,15220,15226,15232,99,117,116,101,59,16762,256,97,121,15181,15186,114,111,110,59,16766,59,17463,111,116,59,16764,256,101,116,15197,15201,116,114,230,5471,97,59,17334,114,59,49152,55349,56631,99,121,59,17462,103,114,97,114,114,59,25053,112,102,59,49152,55349,56683,99,114,59,49152,55349,56527,256,106,110,15237,15239,59,24589,106,59,24588]);var $9=new Uint16Array([512,97,103,108,113,9,21,24,27,621,15,0,0,18,112,59,16422,111,115,59,16423,116,59,16446,116,59,16444,117,111,116,59,16418]);var w0,ik=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),X9=(w0=String.fromCodePoint)!==null&&w0!==void 0?w0:function(t){let e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|t&1023),e+=String.fromCharCode(t),e};function J9(t){var e;return t>=55296&&t<=57343||t>1114111?65533:(e=ik.get(t))!==null&&e!==void 0?e:t}function E0(t){return X9(J9(t))}var pi;(function(t){t[t.NUM=35]="NUM",t[t.SEMI=59]="SEMI",t[t.ZERO=48]="ZERO",t[t.NINE=57]="NINE",t[t.LOWER_A=97]="LOWER_A",t[t.LOWER_F=102]="LOWER_F",t[t.LOWER_X=120]="LOWER_X",t[t.To_LOWER_BIT=32]="To_LOWER_BIT"})(pi||(pi={}));var Xo;(function(t){t[t.VALUE_LENGTH=49152]="VALUE_LENGTH",t[t.BRANCH_LENGTH=16256]="BRANCH_LENGTH",t[t.JUMP_TABLE=127]="JUMP_TABLE"})(Xo||(Xo={}));function Y9(t){return function(r,i){let n="",s=0,o=0;for(;(o=r.indexOf("&",o))>=0;){if(n+=r.slice(s,o),s=o,o+=1,r.charCodeAt(o)===pi.NUM){let m=o+1,b=10,S=r.charCodeAt(m);(S|pi.To_LOWER_BIT)===pi.LOWER_X&&(b=16,o+=1,m+=1);do S=r.charCodeAt(++o);while(S>=pi.ZERO&&S<=pi.NINE||b===16&&(S|pi.To_LOWER_BIT)>=pi.LOWER_A&&(S|pi.To_LOWER_BIT)<=pi.LOWER_F);if(m!==o){let y=r.substring(m,o),v=parseInt(y,b);if(r.charCodeAt(o)===pi.SEMI)o+=1;else if(i)continue;n+=E0(v),s=o}continue}let u=0,l=1,d=0,h=t[d];for(;o<r.length&&(d=nk(t,h,d+1,r.charCodeAt(o)),!(d<0));o++,l++){h=t[d];let m=h&Xo.VALUE_LENGTH;if(m){(!i||r.charCodeAt(o)===pi.SEMI)&&(u=d,l=0);let b=(m>>14)-1;if(b===0)break;d+=b}}if(u!==0){let m=(t[u]&Xo.VALUE_LENGTH)>>14;n+=m===1?String.fromCharCode(t[u]&~Xo.VALUE_LENGTH):m===2?String.fromCharCode(t[u+1]):String.fromCharCode(t[u+1],t[u+2]),s=o-l+1}}return n+r.slice(s)}}function nk(t,e,r,i){let n=(e&Xo.BRANCH_LENGTH)>>7,s=e&Xo.JUMP_TABLE;if(n===0)return s!==0&&i===s?r:-1;if(s){let l=i-s;return l<0||l>n?-1:t[r+l]-1}let o=r,u=o+n-1;for(;o<=u;){let l=o+u>>>1,d=t[l];if(d<i)o=l+1;else if(d>i)u=l-1;else return t[l+n]}return-1}var Jj=Y9(V9),Yj=Y9($9);var sk=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),ok=String.prototype.codePointAt!=null?(t,e)=>t.codePointAt(e):(t,e)=>(t.charCodeAt(e)&64512)===55296?(t.charCodeAt(e)-55296)*1024+t.charCodeAt(e+1)-56320+65536:t.charCodeAt(e);function _0(t,e){return function(i){let n,s=0,o="";for(;n=t.exec(i);)s!==n.index&&(o+=i.substring(s,n.index)),o+=e.get(n[0].charCodeAt(0)),s=n.index+1;return o+i.substring(s)}}var sc=_0(/[&<>'"]/g,sk),Z9=_0(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),Q9=_0(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var eb;(function(t){t[t.XML=0]="XML",t[t.HTML=1]="HTML"})(eb||(eb={}));var tb;(function(t){t[t.Legacy=0]="Legacy",t[t.Strict=1]="Strict"})(tb||(tb={}));var rb;(function(t){t[t.UTF8=0]="UTF8",t[t.ASCII=1]="ASCII",t[t.Extensive=2]="Extensive",t[t.Attribute=3]="Attribute",t[t.Text=4]="Text"})(rb||(rb={}));var Hf=t=>" ".repeat(t),oc=class{toString(e=0){return Hf(e)+"[VNode]"}},Jo=class extends oc{constructor(e){super(),this.text=e}toString(e=0){return Hf(e)+this.textContent}get textContent(){return sc(this.text)}set textContent(e){this.text=e}},Su=class extends oc{constructor(e,r,i){super(),this.tag=e,this.attrs=r,this.children=i}get textContent(){return this.children.length===0?"":this.children.length===1?this.children[0].textContent:this.children.map(e=>e.textContent).join("")}set textContent(e){this.children=[new Jo(e)]}toString(e=0){let r=this.toStringAttrs(),i=Hf(e),n=this.toStringChildren(e),s=`${i}<${this.tag}${r}`;return n===""?`${s} />`:`${s}>${n}</${this.tag}>`}*tags(e){this.tag===e&&(yield this);for(let r of this.elementChildren())yield*r.tags(e);return null}find(e,...r){for(let i of this.tags(e)){if(i===this)continue;if(r.length===0)return i;let n=i.find(...r);if(n!=null)return n}return null}*elementChildren(){for(let e of this.children)e instanceof Su&&(yield e);return null}toStringAttrs(){let e=Object.keys(this.attrs);if(e.length===0)return"";let r="";for(let i of e){let n=this.attrs[i];n!=null&&(r+=` ${i}="${sc(n)}"`)}return r}toStringChildren(e=0){if(this.children.length===0)return"";if(this.children.length===1){let r=this.children[0];if(r instanceof Jo)return r.textContent}return`
|
|
166
|
-
${this.children.map(r=>r.toString(e+1)).join(`
|
|
167
|
-
`)}
|
|
168
|
-
${Hf(e)}`}};function lk(t){if(t==null)return[];if(Array.isArray(t)){let e=[];for(let r of t)if(r!=null){if(typeof r=="string"||typeof r=="number"){e.push(new Jo(String(r)));continue}e.push(r)}return e}else if(typeof t=="string"||typeof t=="number")return[new Jo(String(t))];return[t]}function de(t,e,r){let i=typeof e=="object"&&!Array.isArray(e);if(!i){if(r!=null)throw new Error("Invalid input");r=e}return new Su(t,i?e:{},lk(r))}var lt;(function(t){t.Imagery="im",t.TileSet="ts",t.Provider="pv",t.ImageryRule="ir",t.Style="st",t.ConfigBundle="cb"})(lt||(lt={}));var nb=new Set(Object.values(lt));var Yo=class{},Zo=class{constructor(e){this.prefix=e}isWriteable(){return!1}id(e){return e.startsWith(`${this.prefix}_`)?e:`${this.prefix}_${e}`}is(e){return e!=null&&e.id.startsWith(this.prefix)}},Ii={prefix(t,e){return e===""||e.startsWith(t)?e:`${t}_${e}`},getPrefix(t){let e=t.indexOf("_");if(e===-1)return null;let r=t.slice(0,e);return nb.has(r)?r:null},unprefix(t,e){return e.startsWith(t)?e.slice(3):e}};async function Qo(t,e,r){let i=new Set;for(let n of r)for(let s of e){let o=s[n.code];o&&i.add(t.Imagery.id(o))}return t.Imagery.getAll(i)}var Dt;(function(t){t.Raster="raster",t.Vector="vector"})(Dt||(Dt={}));var G8=ze(My(),1);var Tu=ze(My(),1);function rO(t){return{id:{S:t}}}var io=class extends Zo{constructor(e,r){super(r),this.cfg=e}ensureId(e){if(e.startsWith(this.prefix+"_"))return e;throw new Error(`Trying to query "${e}" expected prefix of ${this.prefix}`)}get db(){return this.cfg.dynamo}isWriteable(){return!0}clone(e){return Tu.default.Converter.unmarshall(Tu.default.Converter.marshall(e))}async get(e){let r=await this.db.getItem({Key:{id:{S:this.ensureId(e)}},TableName:this.cfg.tableName}).promise();if(r==null||r.Item==null)return null;let i=Tu.default.Converter.unmarshall(r.Item);return this.is(i)?i:null}async getAll(e){var r;let i=[];for(let s of e)i.push(rO(this.ensureId(s)));let n=new Map;for(;i.length>0;){let s=i.length>100?i.slice(0,100):i;i=i.length>100?i.slice(100):[];let o={[this.cfg.tableName]:{Keys:s}};for(;o!=null&&Object.keys(o).length>0;){let u=await this.db.batchGetItem({RequestItems:o}).promise(),l=(r=u.Responses)===null||r===void 0?void 0:r[this.cfg.tableName];if(l==null)throw new Error("Failed to fetch from "+this.cfg.tableName);for(let d of l){let h=Tu.default.Converter.unmarshall(d);this.is(h)&&n.set(h.id,h)}o=u.UnprocessedKeys}}return n}async put(e){return e.updatedAt=Date.now(),await this.db.putItem({TableName:this.cfg.tableName,Item:Tu.default.Converter.marshall(e)}).promise(),e.id}};var Nu=class extends io{constructor(){super(...arguments),this.cache=new Map}async get(e){let r=this.ensureId(e),i=this.cache.get(r);if(i==null){if(i=await super.get(r),i==null)return null;this.cache.set(r,i)}return i}async getAll(e){let r=new Map,i=new Set;for(let n of e){let s=this.ensureId(n),o=this.cache.get(s);o==null?i.add(s):r.set(s,o)}if(i.size>0){let n=await super.getAll(i);for(let s of n.values())r.set(s.id,s),this.cache.set(s.id,s)}return r}};var Fc=class extends Yo{constructor(e){super(),this.Prefix=lt,this.type="dynamo",this.Imagery=new Nu(this,lt.Imagery),this.Style=new Nu(this,lt.Style),this.TileSet=new io(this,lt.TileSet),this.Provider=new Nu(this,lt.Provider),this.ConfigBundle=new io(this,lt.ConfigBundle),this.dynamo=new G8.default({region:"ap-southeast-2"}),this.tableName=e}record(){let e=Date.now();return{id:"",name:"",updatedAt:e}}};var $e=class{constructor(e,r,i,n){this.x=e,this.y=r,this.width=i,this.height=n}get bottom(){return this.y+this.height}get right(){return this.x+this.width}intersects(e){return this.x<e.right&&e.x<this.right&&this.y<e.bottom&&e.y<this.bottom}containsBounds(e){return $e.contains(this,e)}intersection(e){let r=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),n=Math.max(this.y,e.y),s=Math.min(this.y+this.height,e.y+e.height);return i>r&&s>n?new $e(r,n,i-r,s-n):null}static union(e){if(e.length===0)throw new Error("Union on empty list is not allowed");let{x:r,y:i}=e[0],n=r+e[0].width,s=i+e[0].height;for(let o=1;o<e.length;++o){let u=e[o];r=Math.min(r,u.x),n=Math.max(n,u.x+u.width),i=Math.min(i,u.y),s=Math.max(s,u.y+u.height)}return new $e(r,i,n-r,s-i)}union(e){return $e.union([this,e])}toJson(){return{x:this.x,y:this.y,width:this.width,height:this.height}}toBbox(){return[this.x,this.y,this.right,this.bottom]}toPolygon(){return[[[this.x,this.y],[this.x,this.bottom],[this.right,this.bottom],[this.right,this.y],[this.x,this.y]]]}scale(e,r=e){return new $e(this.x*e,this.y*r,this.width*e,this.height*r)}scaleFromCenter(e,r=e){let i=this.width*e,n=this.height*r;return new $e(this.x-.5*(i-this.width),this.y-.5*(n-this.height),i,n)}pad(e,r=e){return new $e(this.x-e,this.y-r,this.width+e*2,this.height+r*2)}round(e=0){let r=Math.round(this.x-e),i=Math.round(this.y-e);return new $e(r,i,Math.round(this.right+e)-r,Math.round(this.bottom+e)-i)}add(e){return new $e(this.x+e.x,this.y+e.y,this.width,this.height)}subtract(e){return new $e(this.x-e.x,this.y-e.y,this.width,this.height)}static fromMultiPolygon(e){if(e.length===0)return new $e(0,0,0,0);let r=e[0][0][0][0],i=e[0][0][0][1],n=r,s=i;for(let[o]of e)for(let[u,l]of o)u<r?r=u:u>n&&(n=u),l<i?i=l:l>s&&(s=l);return new $e(r,i,n-r,s-i)}static fromBbox([e,r,i,n]){return new $e(Math.min(e,i),Math.min(r,n),Math.abs(i-e),Math.abs(n-r))}static fromUpperLeftLowerRight(e,r){return new $e(e.x,e.y,r.x-e.x,r.y-e.y)}static fromJson(e){return new $e(e.x,e.y,e.width,e.height)}static compareArea(e,r){let i=e.width*e.height-r.width*r.height;if(i!==0)return i;let n=e.x-r.x;return n===0?e.y-r.y:n}static contains(e,r){return e.x<=r.x&&e.x+e.width>=r.x+r.width&&e.y<=r.y&&e.y+e.height>=r.y+r.height}};var gt;(function(t){t[t.Google=3857]="Google",t[t.Wgs84=4326]="Wgs84",t[t.Nztm2000=2193]="Nztm2000",t[t.Citm2000=3793]="Citm2000"})(gt||(gt={}));var ky={google:gt.Google,epsg3857:gt.Google,[gt.Google]:gt.Google,globalmercator:gt.Google,wgs84:gt.Wgs84,epsg4326:gt.Wgs84,[gt.Wgs84]:gt.Wgs84,nztm:gt.Nztm2000,epsg2193:gt.Nztm2000,[gt.Nztm2000]:gt.Nztm2000,nztm2000:gt.Nztm2000,citm:gt.Citm2000,epsg3793:gt.Citm2000,[gt.Citm2000]:gt.Citm2000,citm2000:gt.Citm2000},Ue=class{constructor(e){if(this.code=e,Ue.Codes.has(e))throw new Error(`Duplicate EPSG code created: ${e}`);Ue.Codes.set(this.code,this)}toString(){return this.code.toString()}toJSON(){return this.code}toEpsgString(){return`EPSG:${this.code}`}toUrn(){return`urn:ogc:def:crs:EPSG::${this.code}`}static get(e){let r=Ue.Codes.get(e);if(r==null)throw new Error(`Invalid EPSG:${e}`);return r}static tryGet(e){if(e!=null)return Ue.Codes.get(e)}static parseCode(e){var r;return e.startsWith("urn:")?ky[e.slice(e.lastIndexOf(":")+1)]:e.startsWith("https://")?ky[e.slice(e.lastIndexOf("/")+1)]:(r=ky[e.replace(/[\W_]/g,"").toLowerCase()])!==null&&r!==void 0?r:null}static parse(e){let r=Ue.parseCode(e);return r==null?null:Ue.get(r)}};Ue.Codes=new Map;Ue.Google=new Ue(gt.Google);Ue.Wgs84=new Ue(gt.Wgs84);Ue.Nztm2000=new Ue(gt.Nztm2000);Ue.Citm2000=new Ue(gt.Citm2000);var hK="0".charCodeAt(0),dK="1".charCodeAt(0),pK="2".charCodeAt(0),mK="3".charCodeAt(0);var Au;(function(t){t[t.Xy=0]="Xy",t[t.Yx=1]="Yx"})(Au||(Au={}));function K8(t){return t===Ue.Nztm2000?Au.Yx:Au.Xy}function iO(t,e){return e.scaleDenominator-t.scaleDenominator}var Er=class{constructor(e){this.zooms=[],this.indexX=0,this.indexY=1,this.zoomConversionMap=new Map,this.def=e,this.tileSize=e.tileMatrix[0].tileHeight;let r=e.tileMatrix.slice().sort(iO),i={};for(let d of r){if(i[d.identifier])throw new Error(`Duplicate tileMatrix identifier ${d.identifier}`);if(d.tileHeight!==d.tileWidth)throw new Error("Only square tiles supported");if(d.tileHeight!==this.tileSize)throw new Error("All tiles must have the same tile size");i[d.identifier]=!0}this.zooms=r;let n=Ue.parse(e.supportedCRS);if(n==null)throw new Error(`Unable to find supported projection ${e.supportedCRS}`);this.projection=n,K8(this.projection)===Au.Yx&&(this.indexX=1,this.indexY=0);let{lowerCorner:s,upperCorner:o}=e.boundingBox,u=s[this.indexX],l=s[this.indexY];this.extent=new $e(u,l,o[this.indexX]-u,o[this.indexY]-l)}get maxZoom(){return this.zooms.length-1}get identifier(){return this.def.identifier}pixelScale(e){let r=this.zooms[e];if(r==null)throw new Error(`Zoom not found :${e}`);return r.scaleDenominator*28e-5}tileToPixels(e,r){return{x:e*this.tileSize,y:r*this.tileSize}}pixelsToTile(e,r,i){let n=Math.floor(e/this.tileSize),s=Math.floor(r/this.tileSize);return{x:n,y:s,z:i}}sourceToPixels(e,r,i){let n=this.zooms[i],s=this.pixelScale(i),o=(e-n.topLeftCorner[this.indexX])/s,u=(n.topLeftCorner[this.indexY]-r)/s;return{x:o,y:u}}pixelsToSource(e,r,i){let n=this.zooms[i],s=this.pixelScale(i),o=n.topLeftCorner[this.indexX]+e*s,u=n.topLeftCorner[this.indexY]-r*s;return{x:o,y:u}}tileToSource(e){let r=this.tileToPixels(e.x,e.y);return this.pixelsToSource(r.x,r.y,e.z)}tileToSourceBounds(e){let r=this.tileToSource(e),i=this.pixelScale(e.z)*this.tileSize;return new $e(r.x,r.y-i,i,i)}*topLevelTiles(){let{matrixWidth:r,matrixHeight:i}=this.zooms[0];for(let n=0;n<i;++n)for(let s=0;s<r;++s)yield{x:s,y:n,z:0};return null}*coverTile(e){if(e==null)return yield*this.topLevelTiles(),null;let r=e.z+1,{matrixWidth:i,matrixHeight:n}=this.zooms[e.z],{matrixWidth:s,matrixHeight:o}=this.zooms[r],u=s/i,l=o/n,d=Math.floor(e.x*u),h=Math.floor(e.y*l),m=Math.ceil((e.x+1)*u),b=Math.ceil((e.y+1)*l);for(let S=h;S<b;++S)for(let y=d;y<m;++y)yield{x:y,y:S,z:r};return null}static tileToName(e){return`${e.z}-${e.x}-${e.y}`}static nameToTile(e){let r=e.split("-");if(r.length===3){let i=Number(r[0]),n=Number(r[1]),s=Number(r[2]);if(!(isNaN(i)||isNaN(s)||isNaN(n)))return{x:n,y:s,z:i}}throw new Error(`Invalid tile name '${e}'`)}findBestZoom(e){let r=this.zoomConversionMap.get(e);return r==null&&(r=this.convertZoomLevel(e),this.zoomConversionMap.set(e,r)),r}convertZoomLevel(e){for(let r=0;r<this.zooms.length;r++){let i=this.zooms[r].scaleDenominator-e;if(i>1e-5)continue;if(r===0)return r;let n=this.zooms[r-1].scaleDenominator-e;return Math.abs(i)<n?r:r-1}return this.maxZoom}static convertZoomLevel(e,r,i,n=!0){return r.identifier===i.identifier||(e>=r.maxZoom&&(e=r.maxZoom),n&&e===0)?e:n&&e===r.maxZoom?i.maxZoom:i.findBestZoom(r.zooms[e].scaleDenominator)}};var Uc={Version:"1.0.0-beta.2",License:"CC BY 4.0",BaseMapsExtension:"https://basemaps.linz.govt.nz/json-schema/stac-basemaps-extension/1.0/schema.json"};var nO={type:"TileMatrixSetType",title:"Google Maps Compatible for the World",identifier:"WebMercatorQuad",boundingBox:{type:"BoundingBoxType",crs:"http://www.opengis.net/def/crs/EPSG/0/3857",lowerCorner:[-200375083427892e-7,-200375083427892e-7],upperCorner:[200375083427892e-7,200375083427892e-7]},supportedCRS:"https://www.opengis.net/def/crs/EPSG/0/3857",wellKnownScaleSet:"https://www.opengis.net/def/wkss/OGC/1.0/GoogleMapsCompatible",tileMatrix:[{type:"TileMatrixType",identifier:"0",scaleDenominator:559082264028717e-6,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:1,matrixHeight:1},{type:"TileMatrixType",identifier:"1",scaleDenominator:279541132014358e-6,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:2,matrixHeight:2},{type:"TileMatrixType",identifier:"2",scaleDenominator:139770566007179e-6,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:4,matrixHeight:4},{type:"TileMatrixType",identifier:"3",scaleDenominator:698852830035897e-7,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:8,matrixHeight:8},{type:"TileMatrixType",identifier:"4",scaleDenominator:349426415017948e-7,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:16,matrixHeight:16},{type:"TileMatrixType",identifier:"5",scaleDenominator:174713207508974e-7,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:32,matrixHeight:32},{type:"TileMatrixType",identifier:"6",scaleDenominator:873566037544871e-8,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:64,matrixHeight:64},{type:"TileMatrixType",identifier:"7",scaleDenominator:436783018772435e-8,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:128,matrixHeight:128},{type:"TileMatrixType",identifier:"8",scaleDenominator:218391509386217e-8,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:256,matrixHeight:256},{type:"TileMatrixType",identifier:"9",scaleDenominator:109195754693108e-8,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:512,matrixHeight:512},{type:"TileMatrixType",identifier:"10",scaleDenominator:545978.773465544,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:1024,matrixHeight:1024},{type:"TileMatrixType",identifier:"11",scaleDenominator:272989.386732772,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:2048,matrixHeight:2048},{type:"TileMatrixType",identifier:"12",scaleDenominator:136494.693366386,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:4096,matrixHeight:4096},{type:"TileMatrixType",identifier:"13",scaleDenominator:68247.346683193,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:8192,matrixHeight:8192},{type:"TileMatrixType",identifier:"14",scaleDenominator:34123.6733415964,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:16384,matrixHeight:16384},{type:"TileMatrixType",identifier:"15",scaleDenominator:17061.8366707982,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:32768,matrixHeight:32768},{type:"TileMatrixType",identifier:"16",scaleDenominator:8530.91833539913,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:65536,matrixHeight:65536},{type:"TileMatrixType",identifier:"17",scaleDenominator:4265.45916769956,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:131072,matrixHeight:131072},{type:"TileMatrixType",identifier:"18",scaleDenominator:2132.72958384978,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:262144,matrixHeight:262144},{type:"TileMatrixType",identifier:"19",scaleDenominator:1066.36479192489,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:524288,matrixHeight:524288},{type:"TileMatrixType",identifier:"20",scaleDenominator:533.182395962445,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:1048576,matrixHeight:1048576},{type:"TileMatrixType",identifier:"21",scaleDenominator:266.591197981222,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:2097152,matrixHeight:2097152},{type:"TileMatrixType",identifier:"22",scaleDenominator:133.295598990611,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:4194304,matrixHeight:4194304},{type:"TileMatrixType",identifier:"23",scaleDenominator:66.6477994953056,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:8388608,matrixHeight:8388608},{type:"TileMatrixType",identifier:"24",scaleDenominator:33.3238997476528,topLeftCorner:[-200375083427892e-7,200375083427892e-7],tileWidth:256,tileHeight:256,matrixWidth:16777216,matrixHeight:16777216}]},it=new Er(nO);var Ch=ze(X8(),1),Rh=new Er(Ch.Nztm2000),no=new Er(Ch.Nztm2000Quad);var yi={All:[it,Rh,no],Defaults:new Map([[Ue.Google.code,it],[Ue.Nztm2000.code,Rh]]),get(t){let e=this.tryGet(t);if(e==null)throw new Error("Failed to lookup TileMatrixSet: "+t);return e},tryGet(t){var e,r;return t==null?null:typeof t=="number"?(e=this.Defaults.get(t))!==null&&e!==void 0?e:null:(r=this.Defaults.get(t.code))!==null&&r!==void 0?r:null},find(t,e=!0){if(t==null)return null;let r=Ue.parse(t);if(r!=null)return yi.tryGet(r);if(e){for(let i of yi.All)if(i.identifier===t)return i;return null}for(let i of yi.All)if(i.identifier.toLowerCase()===t.toLowerCase())return i;return null}};var nt;(function(t){t.Png="png",t.Jpeg="jpeg",t.Webp="webp",t.Avif="avif"})(nt||(nt={}));var gi;(function(t){t.MapboxVectorTiles="pbf"})(gi||(gi={}));var Iy;(function(t){t.aerial="aerial"})(Iy||(Iy={}));var h3=ze(Y8(),1),d3=ze(c3(),1);function f3(t){return[[[t[0],t[1]],[t[2],t[1]],[t[2],t[3]],[t[0],t[3]],[t[0],t[1]]]]}var{intersection:TO,union:p3}=d3.default;function NO(t,e){return t[0]===e[0]&&t[1]===e[1]}function AO(t,e){return TO(t,f3(e))}function zy(t,e){let r=[];for(let i of t){let n=h3.default.polygon(i[0],e);n.length!==0&&(NO(n[0],n[n.length-1])||n.push(n[0]),r.push([n]))}return AO(r,e)}var Gc=t=>(t<-360?t=-(-t%360):t>360&&(t=t%360),t<-180?360+t:t>180?t-360:t),ca=(t,e)=>{let r=e-t;return r>180?r-360:r<-180?r+360:r},MO=(t,e)=>Gc(t+(e<t?e+360-t:e-t)),oo={boxLonCenter(t){return Gc(t[0]+.5*(t[2]<t[0]?360+t[2]-t[0]:t[2]-t[0]))},delta:ca,crossesAM(t,e){return Math.sign(ca(t,e))!==Math.sign(e-t)},normLon:Gc,normExtent(t){return[Gc(t[0]),t[1],Gc(t[2]),t[3]]},union(t,e){if(e==null)return t.slice();let r=oo.boxLonCenter(t),i=oo.boxLonCenter(e);if(ca(r,i)<0)return this.union(e,t);let n=t.slice(),s=MO(r,i);return ca(s,e[0])<ca(s,t[0])&&(n[0]=e[0]),ca(s,e[2])>ca(s,t[2])&&(n[2]=e[2]),e[1]<t[1]&&(n[1]=e[1]),e[3]>t[3]&&(n[3]=e[3]),n},intersects(t,e){if(t[1]>e[3]||e[1]>t[3])return!1;let r=t[0],i=e[0],n=r<t[2]?t[2]:t[2]+360,s=i<e[2]?e[2]:e[2]+360;return r<=s&&i<=n||r+360<=s&&i<=n+360||r<=s+360&&i+360<=n},ringToBbox(t){if(t.length<3)throw new Error("Invalid ring");let e=!1,r=t[0],i=r[0],n=r[1],s=i,o=n,u=i;for(let l=1;l<t.length;++l){let d=t[l],h=d[0];oo.crossesAM(u,h)&&(e=!e),e&&(h<0?h+=360:(u+=360,l===1&&(i=s=u))),h<i?i=h:h>s&&(s=h);let b=d[1];b<n?n=b:b>o&&(o=b),u=d[0]}return[this.normLon(i),n,this.normLon(s),o]},multiPolygonToBbox(t){let e=null;for(let r of t){if(r.length===0)continue;let i=r[0];if(i.length<3)continue;let n=this.ringToBbox(i);e=e==null?n:this.union(e,n)}if(e==null)throw new Error("Invalid multipolygon");return e},bboxToMultiPolygon(t){let e=[t[0],t[1]],r=[t[2],t[1]],i=[t[0],t[3]],n=[t[2],t[3]];return t[0]<t[2]?[[[e,i,n,r,e]]]:[[[e,i,[180,n[1]],[180,r[1]],e]],[[n,r,[-180,e[1]],[-180,i[1]],n]]]}};var kO=[-180,-90,180,90],IO=[180,-90,360,90];function PO(t,e,r){return[e[0]+(r[0]-e[0])*t,e[1]+(r[1]-e[1])*t]}function LO(t){let e=[];for(let r of zy(t,kO))e.push(r);for(let r of zy(t,IO))e.push(r.map(i=>i.map(n=>[n[0]-360,n[1]])));return e}function Mh(t,e,r=!0){let i=!1,n=!1,s=t.map(o=>o.map(u=>{let l=[];if(u.length===0)return l;let d=u[0],h=null,m=0;for(let b of u){let S=e(b),y=S[0];if(h!=null){let v=oo.crossesAM(m,y);if(v&&(i=!0,n=!n),n&&(y<0?S[0]=y+360:h[0]=m+360),v){let C=(180-S[0])/(h[0]-S[0]),w=e(PO(C,b,d));l.push([180,w[1]])}}l.push(S),d=b,h=S,m=y}return l}));return i&&r?LO(s):s}function OO(t){return{type:"Polygon",coordinates:t}}function m3(t,e={}){return{type:"Feature",geometry:OO(t),properties:e}}function y3(t,e={}){return{type:"Feature",geometry:{type:"MultiPolygon",coordinates:t},properties:e}}var Iu=ze(g3(),1);var v3=`PROJCS["NZGD2000 / Chatham Islands TM 2000",
|
|
169
|
-
GEOGCS["NZGD2000",
|
|
170
|
-
DATUM["New_Zealand_Geodetic_Datum_2000",
|
|
171
|
-
SPHEROID["GRS 1980",6378137,298.257222101,
|
|
172
|
-
AUTHORITY["EPSG","7019"]],
|
|
173
|
-
TOWGS84[0,0,0,0,0,0,0],
|
|
174
|
-
AUTHORITY["EPSG","6167"]],
|
|
175
|
-
PRIMEM["Greenwich",0,
|
|
176
|
-
AUTHORITY["EPSG","8901"]],
|
|
177
|
-
UNIT["degree",0.01745329251994328,
|
|
178
|
-
AUTHORITY["EPSG","9122"]],
|
|
179
|
-
AUTHORITY["EPSG","4167"]],
|
|
180
|
-
UNIT["metre",1,
|
|
181
|
-
AUTHORITY["EPSG","9001"]],
|
|
182
|
-
PROJECTION["Transverse_Mercator"],
|
|
183
|
-
PARAMETER["latitude_of_origin",0],
|
|
184
|
-
PARAMETER["central_meridian",-176.5],
|
|
185
|
-
PARAMETER["scale_factor",1],
|
|
186
|
-
PARAMETER["false_easting",3500000],
|
|
187
|
-
PARAMETER["false_northing",10000000],
|
|
188
|
-
AUTHORITY["EPSG","3793"],
|
|
189
|
-
AXIS["Easting",EAST],
|
|
190
|
-
AXIS["Northing",NORTH]]`;var b3=`PROJCS["NZGD2000 / New Zealand Transverse Mercator 2000",
|
|
191
|
-
GEOGCS["NZGD2000",
|
|
192
|
-
DATUM["New_Zealand_Geodetic_Datum_2000",
|
|
193
|
-
SPHEROID["GRS 1980",6378137,298.257222101,
|
|
194
|
-
AUTHORITY["EPSG","7019"]],
|
|
195
|
-
TOWGS84[0,0,0,0,0,0,0],
|
|
196
|
-
AUTHORITY["EPSG","6167"]],
|
|
197
|
-
PRIMEM["Greenwich",0,
|
|
198
|
-
AUTHORITY["EPSG","8901"]],
|
|
199
|
-
UNIT["degree",0.0174532925199433,
|
|
200
|
-
AUTHORITY["EPSG","9122"]],
|
|
201
|
-
AUTHORITY["EPSG","4167"]],
|
|
202
|
-
PROJECTION["Transverse_Mercator"],
|
|
203
|
-
PARAMETER["latitude_of_origin",0],
|
|
204
|
-
PARAMETER["central_meridian",173],
|
|
205
|
-
PARAMETER["scale_factor",0.9996],
|
|
206
|
-
PARAMETER["false_easting",1600000],
|
|
207
|
-
PARAMETER["false_northing",10000000],
|
|
208
|
-
UNIT["metre",1,
|
|
209
|
-
AUTHORITY["EPSG","9001"]],
|
|
210
|
-
AUTHORITY["EPSG","2193"]]`;var Ke;(function(t){t[t.UInt8=1]="UInt8",t[t.UInt16=2]="UInt16",t[t.UInt32=4]="UInt32",t[t.UInt64=8]="UInt64",t[t.Double=8]="Double",t[t.Float=4]="Float"})(Ke||(Ke={}));var S3=2**32,BO=typeof setImmediate>"u"?setTimeout:setImmediate,Br=()=>{throw new Error("Method not implemented.")},_r=class{constructor(){this.isLittleEndian=!0,this.delayMs=_r.DefaultDelayMs,this.maxChunkCount=10,this.chunks=_r.DefaultChunkCache(),this.blankFillCount=16,this.maxConcurrentRequests=50,this.toFetch=new Set,this.toFetchPromise=null,this.byteOffset=0,this.getFloat32=Br,this.getFloat64=Br,this.getInt8=Br,this.getInt16=Br,this.getInt32=Br,this.setFloat32=Br,this.setFloat64=Br,this.setInt8=Br,this.setInt16=Br,this.setInt32=Br,this.setUint8=Br,this.setUint16=Br,this.setUint32=Br,this.setBigInt64=Br,this.setBigUint64=Br}static getByteRanges(e,r=32,i=16){if(e.size===0)return{chunks:[],blankFill:[]};let n=[...e.values()].sort((l,d)=>l-d),s=[],o=[];s.push(o);let u=[];for(let l=0;l<n.length;++l){let d=n[l],h=n[l-1];if(o.length>=r)o=[d],s.push(o);else if(l===0||d===h+1)o.push(d);else if(d<h+i){for(let m=h;m<d;m++)o.push(m+1),u.push(m+1);u.pop()}else o=[d],s.push(o)}return{chunks:s,blankFill:u}}async fetchData(){if(this.toFetch.size===0)return;let e=this.toFetch;this.toFetch=new Set,this.toFetchPromise=null;let r=_r.getByteRanges(e,this.maxChunkCount,this.blankFillCount),i=[];for(let n of r.chunks){let s=n[0],o=n[n.length-1],u=s*this.chunkSize,l=o*this.chunkSize+this.chunkSize-u,d=await this.fetchBytes(u,l);if(n.length===1){i[s]=d,this.chunks.set(s,new DataView(d));continue}let h=s*this.chunkSize;for(let m of n){let b=m*this.chunkSize-h,S=d.slice(b,b+this.chunkSize);i[m]=S,this.chunks.set(m,new DataView(S))}}}async loadBytes(e,r){if(e<0)throw new Error("Offset must be positive");let i=Math.floor(e/this.chunkSize),n=Math.ceil((e+r)/this.chunkSize)-1;for(let s=i;s<=n;s++)this.chunks.has(s)||this.toFetch.add(s);if(this.toFetch.size!==0){if(this.toFetchPromise==null&&(this.toFetchPromise=new Promise(s=>BO(s,this.delayMs)).then(()=>this.fetchData())),this.toFetch.size>this.maxConcurrentRequests)throw new Error("Too many outstanding requests");await this.toFetchPromise}}getChunkId(e){return Math.floor(e/this.chunkSize)}getUint(e,r){switch(r){case Ke.UInt8:return this.getUint8(e);case Ke.UInt16:return this.getUint16(e);case Ke.UInt32:return this.getUint32(e);case Ke.UInt64:return this.getUint64(e)}}bytes(e,r){let i=this.isOneChunk(e,r);if(i){let d=this.getView(i),h=e-i*this.chunkSize;return new Uint8Array(d.buffer.slice(h,h+r))}let n=new Uint8Array(r),s=e+r,o=Math.floor(e/this.chunkSize),u=Math.ceil((e+r)/this.chunkSize)-1,l=0;for(let d=o;d<=u;d++){let h=e+l,m=d*this.chunkSize,b=this.getView(d),S=Math.min(s,m+this.chunkSize),y=b.buffer.slice(h-m,S-m);n.set(new Uint8Array(y),l),l+=y.byteLength}return n}getView(e){let r=this.chunks.get(e);if(r==null)throw new Error(`Chunk:${e} is not ready`);return r}isOneChunk(e,r){let i=e+r-1,n=Math.floor(e/this.chunkSize);return Math.floor(i/this.chunkSize)-n<1?n:null}hasBytes(e,r=1){let i=Math.floor(e/this.chunkSize),n=Math.ceil((e+r)/this.chunkSize)-1;for(let s=i;s<=n;s++)if(!this.chunks.has(s))return!1;return!0}toRange(e,r){if(r==null)return`bytes=${e}`;if(e<0)throw new Error("Cannot read from remote source with negative offset and length");return`bytes=${e}-${e+r}`}parseContentRange(e){let[r,i]=e.split(" ");if(r!=="bytes")throw new Error("Failed to parse content-range: "+e);if(i==null)throw new Error("Failed to parse content-range: "+e);let[,n]=i.split("/"),s=Number(n);if(isNaN(s))throw new Error("Failed to parse content-range: "+e);return s}get buffer(){throw new Error("Method not implemented.")}get byteLength(){if(this._byteLength)return this._byteLength;throw Error(".size() has not been fetched.")}getUint8(e){let r=Math.floor(e/this.chunkSize),i=this.chunks.get(r);if(i==null)throw new Error(`Chunk:${r} is not ready`);return i.getUint8(e-r*this.chunkSize)}getUint16(e){let r=this.isOneChunk(e,Ke.UInt16);if(r!=null)return this.getView(r).getUint16(e-r*this.chunkSize,this.isLittleEndian);let i=this.getUint8(e),n=this.getUint8(e+Ke.UInt8);return this.isLittleEndian?i+(n<<8):(i<<8)+n}getUint32(e){let r=this.isOneChunk(e,Ke.UInt32);if(r!=null)return this.getView(r).getUint32(e-r*this.chunkSize,this.isLittleEndian);let i=this.getUint16(e),n=this.getUint16(e+Ke.UInt16);return this.isLittleEndian?i+n*65536:i*65536+n}getUint64(e){let r=this.isOneChunk(e,Ke.UInt64);if(r!=null){let s=this.getView(r);return Number(s.getBigUint64(e-r*this.chunkSize,this.isLittleEndian))}let i=this.getUint32(e),n=this.getUint32(e+Ke.UInt32);return this.isLittleEndian?i+n*S3:i*S3+n}getBigUint64(e){let r=this.isOneChunk(e,Ke.UInt64);if(r!=null)return this.getView(r).getBigUint64(e-r*this.chunkSize,this.isLittleEndian);let i=BigInt(this.getUint32(e)),n=BigInt(this.getUint32(e+Ke.UInt32));return this.isLittleEndian?i+(n<<BigInt(32)):(i<<BigInt(32))+n}getBigInt64(){throw new Error("Not implemented.")}};_r.DefaultChunkCache=()=>new Map;_r.DefaultDelayMs=1;var Qt=class extends Error{constructor(e,r,i){super(e),this.name="CompositeError",this.code=r,this.reason=i}static isCompositeError(e){return typeof e!="object"||e==null?!1:e.name==="CompositeError"}};function ss(t){return typeof t=="object"&&t!==null}function ii(t){let e=t.split("/"),r=e[0];if(r==null||r==="")return null;r.endsWith(":")&&(r=r.slice(0,r.length-1));let i=e[2];if(i==null||i.trim()==="")return null;if(e.length===3)return{protocol:r,bucket:i};let n=e.slice(3).join("/");return n==null||n.trim()===""?{protocol:r,bucket:i}:{key:n,bucket:i,protocol:r}}var qO=/\/$/,zO=/^\//;function jy(t,e){return t.replace(qO,"")+"/"+e.replace(zO,"")}function x3(t,...e){let r=t;for(let i=0;i<e.length;i++)r=jy(r,e[i]);return r}async function w3(t){let e=[];for await(let r of t)e.push(r);return e}Iu.default.defs(Ue.Nztm2000.toEpsgString(),b3);Iu.default.defs(Ue.Citm2000.toEpsgString(),v3);var Hy=new Map;function FO(t){return t==null?null:typeof t=="number"?t:"code"in t?t.code:"projection"in t?t.projection.code:null}var Dr=class{constructor(e){this.epsg=e;try{this.projection=(0,Iu.default)(e.toEpsgString(),Ue.Wgs84.toEpsgString())}catch(r){throw new Qt(`Failed to create projection: ${e.toEpsgString()}, ${Ue.Wgs84.toEpsgString()}`,500,r)}}static define(e,r){if(Hy.get(e.code)!=null)throw new Error("Duplicate projection definition: "+e.toEpsgString());Iu.default.defs(e.toEpsgString(),r)}static get(e){let r=this.tryGet(e);if(r==null)throw new Error(`Invalid projection: ${e}`);return r}static tryGet(e){let r=FO(e);if(r==null)return null;let i=Hy.get(r);if(i!=null)return i;let n=Ue.tryGet(r);return n==null||Iu.default.defs(n.toEpsgString())==null?null:(i=new Dr(n),Hy.set(r,i),i)}projectMultipolygon(e,r){if(r.epsg.code===this.epsg.code)return e;let{toWgs84:i}=this,{fromWgs84:n}=r;return e.map(s=>s.map(o=>o.map(u=>n(i(u)))))}get toWgs84(){return this.projection.forward}get fromWgs84(){return this.projection.inverse}boundsToWgs84BoundingBox(e){let r=this.toWgs84([e.x,e.y]),i=this.toWgs84([e.x+e.width,e.y+e.height]);return[r[0],r[1],i[0],i[1]]}boundsToGeoJsonFeature(e,r={}){let i=[e.x,e.y],n=[e.x+e.width,e.y],s=[e.x,e.y+e.height],o=[e.x+e.width,e.y+e.height],u=Mh([[[i,s,o,n,i]]],this.toWgs84),l=u.length===1?m3(u[0],r):y3(u,r);return l.bbox=this.boundsToWgs84BoundingBox(e),l}toGeoJson(e){return{type:"FeatureCollection",features:e.map(r=>this.boundsToGeoJsonFeature(r,{name:r.name}))}}static getTiffResZoom(e,r){for(let i=0;i<e.zooms.length;i++)if(e.pixelScale(i)-r<this.AllowedFloatingError)return i;return e.zooms.length-1}static tileToWgs84Bbox(e,r){let i=e.tileToSource(r),n=e.tileToSource({x:r.x+1,y:r.y+1,z:r.z}),s=this.get(e),[o,u]=s.toWgs84([i.x,n.y]),[l,d]=s.toWgs84([n.x,i.y]);return[o,u,l,d]}static tileCenterToLatLon(e,r){let i=e.tileToSource({x:r.x+.5,y:r.y+.5,z:r.z}),[n,s]=this.get(e).toWgs84([i.x,i.y]);return Dr.wrapLatLon(s,n)}static wrapLatLon(e,r){let i={lat:e,lon:r},n=Math.floor(Math.abs(e)/90)%4,s=e>0?90:-90,o=e%90;switch(n){case 0:i.lat=o;break;case 1:i.lat=s-o,i.lon+=180;break;case 2:i.lat=-o,i.lon+=180;break;case 3:i.lat=-s+o;break}return(i.lon>180||i.lon<-180)&&(i.lon-=Math.floor((i.lon+180)/360)*360),i}static findAlignmentLevels(e,r,i,n=2){return Math.max(0,this.getTiffResZoom(e,i*n)-r.z)}static getImagePixelWidth(e,r,i){let n=e.tileToSource(r),s=e.tileToSource({x:r.x+1,y:r.y+1,z:r.z});return Math.round((s.x-n.x)/e.pixelScale(i))*2}};Dr.AllowedFloatingError=1e-8;var kh=class{static async load(e){if(Dr.tryGet(e)!=null)return Ue.get(e);let r=`https://spatialreference.org/ref/epsg/${e}/ogcwkt/`,i=await this._fetch(r);if(!i.ok)throw new Error("Failed to load projection information for:"+e);let n=Ue.tryGet(e);n==null&&(n=new Ue(e));let s=await i.text();return Dr.define(n,s),n}};kh._fetch=fetch;var Ph=ze(bu(),1);function UO(t){if(!t.endsWith("m")||!t.includes("-"))return null;let e=Number(t.replace("-",".").slice(0,t.length-1));return isNaN(e)?null:String(e)+"m"}function jO(t){let e=t.split("-");return e.length!==2||e[0].length!==4?null:e[1].length===4?t:e[1].length===2?`${e[0]}-${e[0].slice(0,2)}${e[1]}`:null}var HO=[UO,jO];function Mn(t){let e=new Set(t.split("_"));e.delete("RGB"),e.delete("RGBI"),e.delete("RGBA");let r=[];for(let i of e){let n=!1;for(let s of HO){let o=s(i);if(o!=null){n=!0,r.push(o);break}}n||r.push(i)}return r.join("-")}var T3=require("crypto");var C3=ze(_3(),1),R3="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",Pu=(0,C3.default)(R3),GO=new Set(R3);function Ih(t){for(let e=0;e<t.length;e++)if(!GO.has(t.charAt(e)))return!1;return!0}function os(t){return Pu.encode((0,T3.createHash)("sha256").update(t).digest())}function KO(t){return Ii.getPrefix(t.id)===lt.Imagery}function VO(t){return Ii.getPrefix(t.id)===lt.TileSet}function $O(t){return!(typeof t!="object"||t==null||Array.isArray(t))}function N3(t){if(!!$O(t))for(let e of Object.keys(t))t[e]===void 0&&delete t[e]}var as=class extends Yo{constructor(){super(...arguments),this.type="memory",this.Imagery=new fa(this,lt.Imagery),this.Style=new fa(this,lt.Style),this.TileSet=new fa(this,lt.TileSet),this.Provider=new fa(this,lt.Provider),this.ConfigBundle=new fa(this,lt.ConfigBundle),this.objects=new Map}put(e){this.objects.set(e.id,e)}toJson(){let e={id:"",hash:"",assets:this.assets,imagery:[],style:[],provider:[],tileSet:[]};for(let r of this.objects.values()){let i=r.id.slice(0,r.id.indexOf("_"));switch(delete r.updatedAt,i){case lt.Imagery:e.imagery.push(r);break;case lt.Style:e.style.push(r);break;case lt.Provider:e.provider.push(r);break;case lt.TileSet:e.tileSet.push(r);break;default:throw new Error("Unable to parse configuration id: "+r.id)}}return e.hash=os(JSON.stringify(e)),e.id=Ii.prefix(lt.ConfigBundle,(0,Ph.ulid)()),e}createVirtualTileSets(){for(let e of this.objects.values())if(VO(e)&&e.name==="aerial")for(let r of e.layers)this.imageryToChildTileSet(e,r,gt.Nztm2000),this.imageryToChildTileSet(e,r,gt.Google);else KO(e)&&(this.put(as.imageryToTileSet(e)),this.imageryToTileSetByName(e))}imageryToTileSetByName(e){let r=Mn(e.name),i=Ii.prefix(lt.TileSet,r),n=this.objects.get(i);return n==null&&(n={type:Dt.Raster,id:i,title:e.title,category:e.category,name:r,format:nt.Webp,layers:[{name:r,minZoom:0,maxZoom:32}],background:{r:0,g:0,b:0,alpha:0},updatedAt:Date.now()},N3(n),this.put(n)),n.layers[0][e.projection]=e.id,n}static imageryToTileSet(e){return{type:Dt.Raster,id:Ii.prefix(lt.TileSet,Ii.unprefix(lt.Imagery,e.id)),name:e.name,title:e.title,format:nt.Webp,layers:[{[e.projection]:e.id,name:e.name,minZoom:0,maxZoom:32,title:e.title}],background:{r:0,g:0,b:0,alpha:0},updatedAt:Date.now()}}imageryToChildTileSet(e,r,i){var n;let s=r[i];if(s==null)return;let o=this.objects.get(s);if(o==null)return;let u=e.name+":"+o.name,l=Ii.prefix(lt.TileSet,u),d=this.objects.get(l);d==null&&(d={type:Dt.Raster,id:l,title:r.title,category:(n=r.category)!==null&&n!==void 0?n:o.category,name:Mn(o.name),format:nt.Webp,layers:[{name:u,minZoom:0,maxZoom:32}],background:{r:0,g:0,b:0,alpha:0},updatedAt:Date.now()},N3(d),this.put(d)),d.layers[0][o.projection]=o.id}static fromJson(e){if(e.id==null||Ii.getPrefix(e.id)!==lt.ConfigBundle)throw new Error("Provided configuration file is not a basemaps config bundle.");let r=(0,Ph.decodeTime)(Ii.unprefix(lt.ConfigBundle,e.id)),i=new as;for(let n of e.tileSet)i.put(n);for(let n of e.style)i.put(n);for(let n of e.provider)i.put(n);for(let n of e.imagery)i.put(n);for(let n of i.objects.values())n.updatedAt=r;return i.assets=e.assets,i}},fa=class extends Zo{constructor(e,r){super(r),this.cfg=e}async get(e){let r=this.cfg.objects.get(this.id(e));return this.is(r)?r:null}async getAll(e){let r=new Map;for(let i of e){let n=await this.get(i);n!=null&&r.set(i,n)}return r}};function Kc(t){if(t==="")return 0;let e=parseInt(t,16);if(isNaN(e))throw new Error("Invalid hex byte: "+t);return e}function Lh(t){if(t.startsWith("0x")?t=t.slice(2):t.startsWith("#")&&(t=t.slice(1)),t.length!==6&&t.length!==8)throw new Error("Invalid hex color: "+t);return{r:Kc(t.substr(0,2)),g:Kc(t.substr(2,2)),b:Kc(t.substr(4,2)),alpha:Kc(t.substr(6,2))}}var us=ze(require("fs"),1),Bh=ze(require("path"),1);var Wy=require("fs"),Oh=require("path"),ao=class extends _r{constructor(e){super(),this.type="file",this.protocol="file",this.chunkSize=ao.DefaultChunkSize,this.fd=null,this.closeAfterRead=!1,this.fileName=e}static isSource(e){return e.type==="file"}async close(){let e=await this.fd;e!=null&&(await e.close(),this.fd=null)}get uri(){return(0,Oh.resolve)(this.fileName)}get name(){return(0,Oh.basename)(this.fileName)}get size(){return this._size?this._size:(this._size=Promise.resolve().then(async()=>(await Wy.promises.stat(this.fileName)).size),this._size)}async fetchBytes(e,r){if(e<0&&r!=null)throw new Error("Cannot fetch negative offsets with length");if(e<0&&(r=Math.abs(e),e=await this.size+e),r==null)throw new Error("Length is required for reading from files");this.fd==null&&(this.fd=Wy.promises.open(this.fileName,"r"));let i=await this.fd,{buffer:n}=await i.read(Buffer.allocUnsafe(r),0,r,e);return this.closeAfterRead&&await this.close(),n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)}};ao.DefaultChunkSize=16*1024;function Vc(t,e){return ss(t)?t.code==="ENOENT"?new Qt(e,404,t):t.code==="EACCES"?new Qt(e,403,t):new Qt(e,500,t):new Qt(e,500,t)}var ls=class{constructor(){this.protocol=ls.protocol}static is(e){return e.protocol===ls.protocol}source(e){return new ao(e)}async*list(e,r){try{let i=await us.default.promises.readdir(e,{withFileTypes:!0}),n=Bh.default.resolve(e);for(let s of i){let o=Bh.default.join(n,s.name);s.isDirectory()&&r?.recursive!==!1?yield*this.list(o):yield o}}catch(i){throw Vc(i,`Failed to list: ${e}`)}}async*details(e,r){for await(let i of this.list(e,r)){let n=await this.head(i);n!=null&&(yield n)}}async head(e){try{let r=await us.default.promises.stat(e);return{path:e,size:r.size,isDirectory:r.isDirectory()}}catch(r){if(ss(r)&&r.code==="ENOENT")return null;throw Vc(r,`Failed to stat: ${e}`)}}async read(e){try{return await us.default.promises.readFile(e)}catch(r){throw Vc(r,`Failed to read: ${e}`)}}async write(e,r){let i=Bh.default.dirname(e);await us.default.promises.mkdir(i,{recursive:!0});try{if(Buffer.isBuffer(r)||typeof r=="string")await us.default.promises.writeFile(e,r);else{let n=us.default.createWriteStream(e);await new Promise((s,o)=>{n.on("finish",s),n.on("error",o),r.pipe(n)})}}catch(n){throw Vc(n,`Failed to write: ${e}`)}}async delete(e){try{return await us.default.promises.unlink(e)}catch(r){throw Vc(r,`Failed to read: ${e}`)}}stream(e){return us.default.createReadStream(e)}};ls.protocol="file";var lx=ze(require("http"),1),cx=ze(require("https"),1),ga=ze(require("zlib"),1),bi=ze(require("stream"),1),i1=require("buffer");function XO(t){if(!/^data:/i.test(t))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');t=t.replace(/\r?\n/g,"");let e=t.indexOf(",");if(e===-1||e<=4)throw new TypeError("malformed data: URI");let r=t.substring(5,e).split(";"),i="",n=!1,s=r[0]||"text/plain",o=s;for(let h=1;h<r.length;h++)r[h]==="base64"?n=!0:(o+=`;${r[h]}`,r[h].indexOf("charset=")===0&&(i=r[h].substring(8)));!r[0]&&!i.length&&(o+=";charset=US-ASCII",i="US-ASCII");let u=n?"base64":"ascii",l=unescape(t.substring(e+1)),d=Buffer.from(l,u);return d.type=s,d.typeFull=o,d.charset=i,d}var A3=XO;var qi=ze(require("stream"),1),ds=require("util"),vi=require("buffer");Xc();zh();var hs=class extends Error{constructor(e,r){super(e),Error.captureStackTrace(this,this.constructor),this.type=r}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}};var ni=class extends hs{constructor(e,r,i){super(e,r),i&&(this.code=this.errno=i.code,this.erroredSysCall=i.syscall)}};var Fh=Symbol.toStringTag,$y=t=>typeof t=="object"&&typeof t.append=="function"&&typeof t.delete=="function"&&typeof t.get=="function"&&typeof t.getAll=="function"&&typeof t.has=="function"&&typeof t.set=="function"&&typeof t.sort=="function"&&t[Fh]==="URLSearchParams",Qc=t=>t&&typeof t=="object"&&typeof t.arrayBuffer=="function"&&typeof t.type=="string"&&typeof t.stream=="function"&&typeof t.constructor=="function"&&/^(Blob|File)$/.test(t[Fh]),F3=t=>typeof t=="object"&&(t[Fh]==="AbortSignal"||t[Fh]==="EventTarget"),U3=(t,e)=>{let r=new URL(e).hostname,i=new URL(t).hostname;return r===i||r.endsWith(`.${i}`)};var cB=(0,ds.promisify)(qi.default.pipeline),si=Symbol("Body internals"),In=class{constructor(e,{size:r=0}={}){let i=null;e===null?e=null:$y(e)?e=vi.Buffer.from(e.toString()):Qc(e)||vi.Buffer.isBuffer(e)||(ds.types.isAnyArrayBuffer(e)?e=vi.Buffer.from(e):ArrayBuffer.isView(e)?e=vi.Buffer.from(e.buffer,e.byteOffset,e.byteLength):e instanceof qi.default||(e instanceof da?(e=z3(e),i=e.type.split("=")[1]):e=vi.Buffer.from(String(e))));let n=e;vi.Buffer.isBuffer(e)?n=qi.default.Readable.from(e):Qc(e)&&(n=qi.default.Readable.from(e.stream())),this[si]={body:e,stream:n,boundary:i,disturbed:!1,error:null},this.size=r,e instanceof qi.default&&e.on("error",s=>{let o=s instanceof hs?s:new ni(`Invalid response body while trying to fetch ${this.url}: ${s.message}`,"system",s);this[si].error=o})}get body(){return this[si].stream}get bodyUsed(){return this[si].disturbed}async arrayBuffer(){let{buffer:e,byteOffset:r,byteLength:i}=await Hh(this);return e.slice(r,r+i)}async formData(){let e=this.headers.get("content-type");if(e.startsWith("application/x-www-form-urlencoded")){let i=new da,n=new URLSearchParams(await this.text());for(let[s,o]of n)i.append(s,o);return i}let{toFormData:r}=await Promise.resolve().then(()=>($3(),V3));return r(this.body,e)}async blob(){let e=this.headers&&this.headers.get("content-type")||this[si].body&&this[si].body.type||"",r=await this.arrayBuffer();return new fs([r],{type:e})}async json(){let e=await Hh(this);return JSON.parse(e.toString())}async text(){return(await Hh(this)).toString()}buffer(){return Hh(this)}};In.prototype.buffer=(0,ds.deprecate)(In.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(In.prototype,{body:{enumerable:!0},bodyUsed:{enumerable:!0},arrayBuffer:{enumerable:!0},blob:{enumerable:!0},json:{enumerable:!0},text:{enumerable:!0},data:{get:(0,ds.deprecate)(()=>{},"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function Hh(t){if(t[si].disturbed)throw new TypeError(`body used already for: ${t.url}`);if(t[si].disturbed=!0,t[si].error)throw t[si].error;let{body:e}=t;if(e===null)return vi.Buffer.alloc(0);if(!(e instanceof qi.default))return vi.Buffer.alloc(0);let r=[],i=0;try{for await(let n of e){if(t.size>0&&i+n.length>t.size){let s=new ni(`content size at ${t.url} over limit: ${t.size}`,"max-size");throw e.destroy(s),s}i+=n.length,r.push(n)}}catch(n){throw n instanceof hs?n:new ni(`Invalid response body while trying to fetch ${t.url}: ${n.message}`,"system",n)}if(e.readableEnded===!0||e._readableState.ended===!0)try{return r.every(n=>typeof n=="string")?vi.Buffer.from(r.join("")):vi.Buffer.concat(r,i)}catch(n){throw new ni(`Could not create Buffer from response body for ${t.url}: ${n.message}`,"system",n)}else throw new ni(`Premature close of server response while trying to fetch ${t.url}`)}var Du=(t,e)=>{let r,i,{body:n}=t[si];if(t.bodyUsed)throw new Error("cannot clone body after it is used");return n instanceof qi.default&&typeof n.getBoundary!="function"&&(r=new qi.PassThrough({highWaterMark:e}),i=new qi.PassThrough({highWaterMark:e}),n.pipe(r),n.pipe(i),t[si].stream=r,n=i),n},fB=(0,ds.deprecate)(t=>t.getBoundary(),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167"),Wh=(t,e)=>t===null?null:typeof t=="string"?"text/plain;charset=UTF-8":$y(t)?"application/x-www-form-urlencoded;charset=UTF-8":Qc(t)?t.type||null:vi.Buffer.isBuffer(t)||ds.types.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)?null:t instanceof da?`multipart/form-data; boundary=${e[si].boundary}`:t&&typeof t.getBoundary=="function"?`multipart/form-data;boundary=${fB(t)}`:t instanceof qi.default?null:"text/plain;charset=UTF-8",X3=t=>{let{body:e}=t[si];return e===null?0:Qc(e)?e.size:vi.Buffer.isBuffer(e)?e.length:e&&typeof e.getLengthSync=="function"&&e.hasKnownLength&&e.hasKnownLength()?e.getLengthSync():null},J3=async(t,{body:e})=>{e===null?t.end():await cB(e,t)};var Zy=require("util"),r1=ze(require("http"),1),Gh=typeof r1.default.validateHeaderName=="function"?r1.default.validateHeaderName:t=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){let e=new TypeError(`Header name must be a valid HTTP token [${t}]`);throw Object.defineProperty(e,"code",{value:"ERR_INVALID_HTTP_TOKEN"}),e}},Qy=typeof r1.default.validateHeaderValue=="function"?r1.default.validateHeaderValue:(t,e)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(e)){let r=new TypeError(`Invalid character in header content ["${t}"]`);throw Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"}),r}},oi=class extends URLSearchParams{constructor(e){let r=[];if(e instanceof oi){let i=e.raw();for(let[n,s]of Object.entries(i))r.push(...s.map(o=>[n,o]))}else if(e!=null)if(typeof e=="object"&&!Zy.types.isBoxedPrimitive(e)){let i=e[Symbol.iterator];if(i==null)r.push(...Object.entries(e));else{if(typeof i!="function")throw new TypeError("Header pairs must be iterable");r=[...e].map(n=>{if(typeof n!="object"||Zy.types.isBoxedPrimitive(n))throw new TypeError("Each header pair must be an iterable object");return[...n]}).map(n=>{if(n.length!==2)throw new TypeError("Each header pair must be a name/value tuple");return[...n]})}}else throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)");return r=r.length>0?r.map(([i,n])=>(Gh(i),Qy(i,String(n)),[String(i).toLowerCase(),String(n)])):void 0,super(r),new Proxy(this,{get(i,n,s){switch(n){case"append":case"set":return(o,u)=>(Gh(o),Qy(o,String(u)),URLSearchParams.prototype[n].call(i,String(o).toLowerCase(),String(u)));case"delete":case"has":case"getAll":return o=>(Gh(o),URLSearchParams.prototype[n].call(i,String(o).toLowerCase()));case"keys":return()=>(i.sort(),new Set(URLSearchParams.prototype.keys.call(i)).keys());default:return Reflect.get(i,n,s)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(e){let r=this.getAll(e);if(r.length===0)return null;let i=r.join(", ");return/^content-encoding$/i.test(e)&&(i=i.toLowerCase()),i}forEach(e,r=void 0){for(let i of this.keys())Reflect.apply(e,r,[this.get(i),i,this])}*values(){for(let e of this.keys())yield this.get(e)}*entries(){for(let e of this.keys())yield[e,this.get(e)]}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce((e,r)=>(e[r]=this.getAll(r),e),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce((e,r)=>{let i=this.getAll(r);return r==="host"?e[r]=i[0]:e[r]=i.length>1?i:i[0],e},{})}};Object.defineProperties(oi.prototype,["get","entries","forEach","values"].reduce((t,e)=>(t[e]={enumerable:!0},t),{}));function Y3(t=[]){return new oi(t.reduce((e,r,i,n)=>(i%2===0&&e.push(n.slice(i,i+2)),e),[]).filter(([e,r])=>{try{return Gh(e),Qy(e,String(r)),!0}catch{return!1}}))}var hB=new Set([301,302,303,307,308]),Kh=t=>hB.has(t);var an=Symbol("Response internals"),Cr=class extends In{constructor(e=null,r={}){super(e,r);let i=r.status!=null?r.status:200,n=new oi(r.headers);if(e!==null&&!n.has("Content-Type")){let s=Wh(e,this);s&&n.append("Content-Type",s)}this[an]={type:"default",url:r.url,status:i,statusText:r.statusText||"",headers:n,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[an].type}get url(){return this[an].url||""}get status(){return this[an].status}get ok(){return this[an].status>=200&&this[an].status<300}get redirected(){return this[an].counter>0}get statusText(){return this[an].statusText}get headers(){return this[an].headers}get highWaterMark(){return this[an].highWaterMark}clone(){return new Cr(Du(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(e,r=302){if(!Kh(r))throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');return new Cr(null,{headers:{location:new URL(e).toString()},status:r})}static error(){let e=new Cr(null,{status:0,statusText:""});return e[an].type="error",e}get[Symbol.toStringTag](){return"Response"}};Object.defineProperties(Cr.prototype,{type:{enumerable:!0},url:{enumerable:!0},status:{enumerable:!0},ok:{enumerable:!0},redirected:{enumerable:!0},statusText:{enumerable:!0},headers:{enumerable:!0},clone:{enumerable:!0}});var ox=require("url"),ax=require("util");var Z3=t=>{if(t.search)return t.search;let e=t.href.length-1,r=t.hash||(t.href[e]==="#"?"#":"");return t.href[e-r.length]==="?"?"?":""};var ex=require("net");function Q3(t,e=!1){return t==null||(t=new URL(t),/^(about|blob|data):$/.test(t.protocol))?"no-referrer":(t.username="",t.password="",t.hash="",e&&(t.pathname="",t.search=""),t)}var tx=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]),rx="strict-origin-when-cross-origin";function ix(t){if(!tx.has(t))throw new TypeError(`Invalid referrerPolicy: ${t}`);return t}function dB(t){if(/^(http|ws)s:$/.test(t.protocol))return!0;let e=t.host.replace(/(^\[)|(]$)/g,""),r=(0,ex.isIP)(e);return r===4&&/^127\./.test(e)||r===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(e)?!0:/^(.+\.)*localhost$/.test(t.host)?!1:t.protocol==="file:"}function qu(t){return/^about:(blank|srcdoc)$/.test(t)||t.protocol==="data:"||/^(blob|filesystem):$/.test(t.protocol)?!0:dB(t)}function nx(t,{referrerURLCallback:e,referrerOriginCallback:r}={}){if(t.referrer==="no-referrer"||t.referrerPolicy==="")return null;let i=t.referrerPolicy;if(t.referrer==="about:client")return"no-referrer";let n=t.referrer,s=Q3(n),o=Q3(n,!0);s.toString().length>4096&&(s=o),e&&(s=e(s)),r&&(o=r(o));let u=new URL(t.url);switch(i){case"no-referrer":return"no-referrer";case"origin":return o;case"unsafe-url":return s;case"strict-origin":return qu(s)&&!qu(u)?"no-referrer":o.toString();case"strict-origin-when-cross-origin":return s.origin===u.origin?s:qu(s)&&!qu(u)?"no-referrer":o;case"same-origin":return s.origin===u.origin?s:"no-referrer";case"origin-when-cross-origin":return s.origin===u.origin?s:o;case"no-referrer-when-downgrade":return qu(s)&&!qu(u)?"no-referrer":s;default:throw new TypeError(`Invalid referrerPolicy: ${i}`)}}function sx(t){let e=(t.get("referrer-policy")||"").split(/[,\s]+/),r="";for(let i of e)i&&tx.has(i)&&(r=i);return r}var sr=Symbol("Request internals"),Vh=t=>typeof t=="object"&&typeof t[sr]=="object",pB=(0,ax.deprecate)(()=>{},".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)"),ps=class extends In{constructor(e,r={}){let i;if(Vh(e)?i=new URL(e.url):(i=new URL(e),e={}),i.username!==""||i.password!=="")throw new TypeError(`${i} is an url with embedded credentails.`);let n=r.method||e.method||"GET";if(n=n.toUpperCase(),"data"in r&&pB(),(r.body!=null||Vh(e)&&e.body!==null)&&(n==="GET"||n==="HEAD"))throw new TypeError("Request with GET/HEAD method cannot have body");let s=r.body?r.body:Vh(e)&&e.body!==null?Du(e):null;super(s,{size:r.size||e.size||0});let o=new oi(r.headers||e.headers||{});if(s!==null&&!o.has("Content-Type")){let d=Wh(s,this);d&&o.set("Content-Type",d)}let u=Vh(e)?e.signal:null;if("signal"in r&&(u=r.signal),u!=null&&!F3(u))throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget");let l=r.referrer==null?e.referrer:r.referrer;if(l==="")l="no-referrer";else if(l){let d=new URL(l);l=/^about:(\/\/)?client$/.test(d)?"client":d}else l=void 0;this[sr]={method:n,redirect:r.redirect||e.redirect||"follow",headers:o,parsedURL:i,signal:u,referrer:l},this.follow=r.follow===void 0?e.follow===void 0?20:e.follow:r.follow,this.compress=r.compress===void 0?e.compress===void 0?!0:e.compress:r.compress,this.counter=r.counter||e.counter||0,this.agent=r.agent||e.agent,this.highWaterMark=r.highWaterMark||e.highWaterMark||16384,this.insecureHTTPParser=r.insecureHTTPParser||e.insecureHTTPParser||!1,this.referrerPolicy=r.referrerPolicy||e.referrerPolicy||""}get method(){return this[sr].method}get url(){return(0,ox.format)(this[sr].parsedURL)}get headers(){return this[sr].headers}get redirect(){return this[sr].redirect}get signal(){return this[sr].signal}get referrer(){if(this[sr].referrer==="no-referrer")return"";if(this[sr].referrer==="client")return"about:client";if(this[sr].referrer)return this[sr].referrer.toString()}get referrerPolicy(){return this[sr].referrerPolicy}set referrerPolicy(e){this[sr].referrerPolicy=ix(e)}clone(){return new ps(this)}get[Symbol.toStringTag](){return"Request"}};Object.defineProperties(ps.prototype,{method:{enumerable:!0},url:{enumerable:!0},headers:{enumerable:!0},redirect:{enumerable:!0},clone:{enumerable:!0},signal:{enumerable:!0},referrer:{enumerable:!0},referrerPolicy:{enumerable:!0}});var ux=t=>{let{parsedURL:e}=t[sr],r=new oi(t[sr].headers);r.has("Accept")||r.set("Accept","*/*");let i=null;if(t.body===null&&/^(post|put)$/i.test(t.method)&&(i="0"),t.body!==null){let u=X3(t);typeof u=="number"&&!Number.isNaN(u)&&(i=String(u))}i&&r.set("Content-Length",i),t.referrerPolicy===""&&(t.referrerPolicy=rx),t.referrer&&t.referrer!=="no-referrer"?t[sr].referrer=nx(t):t[sr].referrer="no-referrer",t[sr].referrer instanceof URL&&r.set("Referer",t.referrer),r.has("User-Agent")||r.set("User-Agent","node-fetch"),t.compress&&!r.has("Accept-Encoding")&&r.set("Accept-Encoding","gzip,deflate,br");let{agent:n}=t;typeof n=="function"&&(n=n(e)),!r.has("Connection")&&!n&&r.set("Connection","close");let s=Z3(e),o={path:e.pathname+s,method:t.method,headers:r[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:n};return{parsedURL:e,options:o}};var $h=class extends hs{constructor(e,r="aborted"){super(e,r)}};zh();Jy();var mB=new Set(["data:","http:","https:"]);async function Xh(t,e){return new Promise((r,i)=>{let n=new ps(t,e),{parsedURL:s,options:o}=ux(n);if(!mB.has(s.protocol))throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${s.protocol.replace(/:$/,"")}" is not supported.`);if(s.protocol==="data:"){let y=A3(n.url),v=new Cr(y,{headers:{"Content-Type":y.typeFull}});r(v);return}let u=(s.protocol==="https:"?cx.default:lx.default).request,{signal:l}=n,d=null,h=()=>{let y=new $h("The operation was aborted.");i(y),n.body&&n.body instanceof bi.default.Readable&&n.body.destroy(y),!(!d||!d.body)&&d.body.emit("error",y)};if(l&&l.aborted){h();return}let m=()=>{h(),S()},b=u(s.toString(),o);l&&l.addEventListener("abort",m);let S=()=>{b.abort(),l&&l.removeEventListener("abort",m)};b.on("error",y=>{i(new ni(`request to ${n.url} failed, reason: ${y.message}`,"system",y)),S()}),yB(b,y=>{d.body.destroy(y)}),process.version<"v14"&&b.on("socket",y=>{let v;y.prependListener("end",()=>{v=y._eventsCount}),y.prependListener("close",C=>{if(d&&v<y._eventsCount&&!C){let w=new Error("Premature close");w.code="ERR_STREAM_PREMATURE_CLOSE",d.body.emit("error",w)}})}),b.on("response",y=>{b.setTimeout(0);let v=Y3(y.rawHeaders);if(Kh(y.statusCode)){let I=v.get("Location"),q=null;try{q=I===null?null:new URL(I,n.url)}catch{if(n.redirect!=="manual"){i(new ni(`uri requested responds with an invalid redirect URL: ${I}`,"invalid-redirect")),S();return}}switch(n.redirect){case"error":i(new ni(`uri requested responds with a redirect, redirect mode is set to error: ${n.url}`,"no-redirect")),S();return;case"manual":break;case"follow":{if(q===null)break;if(n.counter>=n.follow){i(new ni(`maximum redirect reached at: ${n.url}`,"max-redirect")),S();return}let B={headers:new oi(n.headers),follow:n.follow,counter:n.counter+1,agent:n.agent,compress:n.compress,method:n.method,body:Du(n),signal:n.signal,size:n.size,referrer:n.referrer,referrerPolicy:n.referrerPolicy};if(!U3(n.url,q))for(let D of["authorization","www-authenticate","cookie","cookie2"])B.headers.delete(D);if(y.statusCode!==303&&n.body&&e.body instanceof bi.default.Readable){i(new ni("Cannot follow redirect with body being a readable stream","unsupported-redirect")),S();return}(y.statusCode===303||(y.statusCode===301||y.statusCode===302)&&n.method==="POST")&&(B.method="GET",B.body=void 0,B.headers.delete("content-length"));let z=sx(v);z&&(B.referrerPolicy=z),r(Xh(new ps(q,B))),S();return}default:return i(new TypeError(`Redirect option '${n.redirect}' is not a valid value of RequestRedirect`))}}l&&y.once("end",()=>{l.removeEventListener("abort",m)});let C=(0,bi.pipeline)(y,new bi.PassThrough,I=>{I&&i(I)});process.version<"v12.10"&&y.on("aborted",m);let w={url:n.url,status:y.statusCode,statusText:y.statusMessage,headers:v,size:n.size,counter:n.counter,highWaterMark:n.highWaterMark},x=v.get("Content-Encoding");if(!n.compress||n.method==="HEAD"||x===null||y.statusCode===204||y.statusCode===304){d=new Cr(C,w),r(d);return}let N={flush:ga.default.Z_SYNC_FLUSH,finishFlush:ga.default.Z_SYNC_FLUSH};if(x==="gzip"||x==="x-gzip"){C=(0,bi.pipeline)(C,ga.default.createGunzip(N),I=>{I&&i(I)}),d=new Cr(C,w),r(d);return}if(x==="deflate"||x==="x-deflate"){let I=(0,bi.pipeline)(y,new bi.PassThrough,q=>{q&&i(q)});I.once("data",q=>{(q[0]&15)===8?C=(0,bi.pipeline)(C,ga.default.createInflate(),B=>{B&&i(B)}):C=(0,bi.pipeline)(C,ga.default.createInflateRaw(),B=>{B&&i(B)}),d=new Cr(C,w),r(d)}),I.once("end",()=>{d||(d=new Cr(C,w),r(d))});return}if(x==="br"){C=(0,bi.pipeline)(C,ga.default.createBrotliDecompress(),I=>{I&&i(I)}),d=new Cr(C,w),r(d);return}d=new Cr(C,w),r(d)}),J3(b,n).catch(i)})}function yB(t,e){let r=i1.Buffer.from(`0\r
|
|
211
|
-
\r
|
|
212
|
-
`),i=!1,n=!1,s;t.on("response",o=>{let{headers:u}=o;i=u["transfer-encoding"]==="chunked"&&!u["content-length"]}),t.on("socket",o=>{let u=()=>{if(i&&!n){let l=new Error("Premature close");l.code="ERR_STREAM_PREMATURE_CLOSE",e(l)}};o.prependListener("close",u),t.on("abort",()=>{o.removeListener("close",u)}),o.on("data",l=>{n=i1.Buffer.compare(l.slice(-5),r)===0,!n&&s&&(n=i1.Buffer.compare(s.slice(-3),r.slice(0,3))===0&&i1.Buffer.compare(l.slice(-2),r.slice(3))===0),s=l})})}var qr=class extends _r{constructor(e){super(),this.type="url",this.protocol="http",this.chunkSize=qr.DefaultChunkSize,this.uri=e}static isSource(e){return e.type==="url"}get size(){return this._size?this._size:(this._size=Promise.resolve().then(async()=>{let e=await qr.fetch(this.uri,{method:"HEAD"});return Number(e.headers.get("content-length"))}),this._size)}async fetchBytes(e,r){let n={Range:this.toRange(e,r)},s=await qr.fetch(this.uri,{headers:n});if(s.ok){let o=s.headers.get("content-range");return this._size==null&&o!=null&&(this._size=Promise.resolve(this.parseContentRange(o))),s.arrayBuffer()}throw new Error("Failed to fetch")}};qr.DefaultChunkSize=32*1024;qr.fetch=(t,e)=>fetch(t,e);function fx(t,e){return ss(t)?t.code==="ENOENT"?new Qt(e,404,t):t.code==="EACCES"?new Qt(e,403,t):new Qt(e,500,t):new Qt(e,500,t)}var ms=class{constructor(){this.protocol=ms.protocol}static is(e){return e.protocol===ms.protocol}source(e){return new qr(e)}async*list(e){throw new Error(`Unable to "list" on ${e}`)}async*details(e){throw new Error(`Unable to "details" on ${e}`)}async head(e){let r=await qr.fetch(e,{method:"HEAD"});if(!r.ok)throw fx(new Error(r.statusText),`Failed to head: ${e}`);return{path:e,size:Number(r.headers.get("content-length")),isDirectory:!1}}async read(e){let r=await qr.fetch(e,{method:"GET"});if(!r.ok)throw fx(new Error(r.statusText),`Failed to head: ${e}`);return Buffer.from(await r.arrayBuffer())}async write(e){throw new Error(`Unable to "write" on ${e}`)}async delete(e){throw new Error(`Unable to "delete" on ${e}`)}stream(e){throw new Error(`Unable to "stream" on ${e}`)}};ms.protocol="http";qr.fetch=Xh;function gB(t){return typeof t!="object"||t==null?!1:t.constructor===Object}var Jh=class{constructor(){this.protocol="abstract",this.isOrdered=!0,this.systems=[],this.toArray=w3,this.join=jy,this.joinAll=x3}register(e,r,i="rw"){for(let n=0;n<this.systems.length;n++){let s=this.systems[n];if(s.path===e&&s.flag===i){this.systems.splice(n,1,{path:e,system:r,flag:i});return}}this.systems.push({path:e,system:r,flag:i}),this.isOrdered=!1}read(e){return this.get(e,"r").read(e)}async readJson(e){let r=await this.read(e);return JSON.parse(r.toString())}stream(e){return this.get(e,"r").stream(e)}write(e,r,i){if(Array.isArray(r)||gB(r)){let n=JSON.stringify(r,null,2);return this.get(e,"rw").write(e,n,{contentType:"application/json",...i})}return this.get(e,"rw").write(e,r,i)}delete(e){return this.get(e,"rw").delete(e)}list(e,r){return this.get(e,"r").list(e,r)}details(e,r){return this.get(e,"r").details(e,r)}exists(e){return this.get(e,"r").head(e).then(r=>r!=null)}head(e){return this.get(e,"r").head(e)}source(e){return this.get(e,"r").source(e)}sortSystems(){this.isOrdered||(this.systems.sort((e,r)=>r.path.length-e.path.length),this.isOrdered=!0)}get(e,r){this.sortSystems();for(let i of this.systems)if(e.startsWith(i.path)){if(r==="rw"&&i.flag==="r")continue;return i.system}throw new Error(`Unable to find file system for path:${e}`)}},gr=new Jh;var hx=new ls;gr.register("",hx);gr.register("file://",hx);var dx=new ms;gr.register("http://",dx);gr.register("https://",dx);var ct=class{constructor(e){this.name=e}raw(e,r=0){return this.parse(e,{offset:r,startOffset:0})}read(e,r=0){let i={offset:r,startOffset:r};return{value:this.parse(e,i),offset:i.offset}}refine(e){return new eg(this,e)}},eg=class extends ct{constructor(e,r){super("Function:"+e.name),this.input=e,this.cb=r}get size(){return this.input.size}parse(e,r){let i=this.input.parse(e,r);return this.cb(i,e,r)}};var Yh=class extends ct{constructor(e,r,i){super(`Array:${e}:${r.name}x${i}`),this.count=i,this.type=r}get size(){return this.count*this.type.size}parse(e,r){let i=[];for(let n=0;n<this.count;n++)i.push(this.type.parse(e,r));return i}},Zh=class extends ct{constructor(e,r,i,n){super("Array:Offset:"+e),this.isLookupRequired=!0,this.isMaxLength=n,this.lengthName=i,this.type=r}get size(){throw new Error("Unable to calculate size of dynamic object: "+this.name)}parse(e,r,i){let n=[],s=i?.[this.lengthName];if(s==null||typeof s!="number")throw new Error(`${this.name}: Missing variable a "${this.lengthName}"`);this.isMaxLength&&(s-=r.offset-r.startOffset);for(let o=0;o<s;o++)n.push(this.type.parse(e,r));return n}};var px=[];for(let t=0;t<64;t++)px[t]=Math.pow(2,t);var n1=class{constructor(e,r=0,i=e.length,n=!0){if(this.buffer=e,this.offset=r*8,this.maxOffset=i*8,this.isLittleEndian=n,!this.isLittleEndian)throw new Error("BigEndian is not supported")}get remainingBits(){return this.maxOffset-this.offset}getBitValue(e,r,i){return(e&((1<<r+i)-1&~((1<<r)-1)))>>r}skip(e){this.offset+=e}bit(){if(this.remainingBits<0)throw new Error("BitStream: Overflow "+this.remainingBits);let e=Math.floor(this.offset/8),r=this.offset%8,i=this.buffer[e];return this.offset++,this.getBitValue(i,r,1)}bool(){return this.bit()===1}bits(e){let r=e,i=0;for(;e>0;)this.bit()===1&&(i+=px[r-e]),e--;return i}string(e){let r=[];e==null&&(e=Math.floor(this.remainingBits/8));for(let i=0;i<e;i++){let n=this.bits(8);if(n===0)break;r.push(String.fromCharCode(n))}return r.join("")}};var Qh=class extends ct{constructor(e,r){super("Bits:"+e);let i=0;this.fields=Object.keys(r).map(n=>{let s=r[n];return i+=s,{key:n,bits:s}}),this.size=Math.ceil(i/8)}parse(e,r){let i=r.offset,n={},s=new n1(e,i,i+this.size);for(let{key:o,bits:u}of this.fields)n[o]=s.bits(u);return r.offset+=this.size,n}},ed=class extends ct{constructor(e,r,i){super("BitsFlags:"+e),this.type=r,this.fields=Object.entries(i)}get size(){return this.type.size}parse(e,r){let i=this.type.parse(e,r),n={};for(let[s,o]of this.fields){let u=(i&o)===o;u&&(n[s]=u)}return n}};var td=class extends ct{constructor(e){super("Bytes:"+e),this.size=e}parse(e,r){let i=e.slice(r.offset,r.offset+this.size);return r.offset+=this.size,i}};var tg=class extends ct{constructor(){super(...arguments),this.size=1}parse(e,r){let i=r.offset;return r.offset+=this.size,e[i]}},rg=class extends ct{constructor(){super(...arguments),this.size=2}parse(e,r){let i=r.offset,n=e[i++],s=e[i++]<<8;return r.offset+=2,n|s}},ig=class extends ct{constructor(){super(...arguments),this.size=4}parse(e,r){let i=r.offset,n=e[i++],s=e[i++]<<8,o=e[i++]<<16,u=e[i++]*16777216;return r.offset=i,(n|s|o)+u}},vB=2**32,ng=class extends ct{constructor(){super(...arguments),this.size=8}parse(e,r){let i=zu.parse(e,r),n=zu.parse(e,r);return i+n*vB}},sg=class extends ct{constructor(){super(...arguments),this.size=8}parse(e,r){let i=BigInt(zu.parse(e,r)),n=BigInt(zu.parse(e,r));return i+(n<<BigInt(32))}},mx=new tg("UInt8"),yx=new rg("LUInt16"),zu=new ig("LUInt32"),gx=new ng("LUInt64"),vx=new sg("BigLUInt64");var rd=class extends ct{constructor(e,r,i){super("Lookup:"+e),this.lookup=i,this.type=r}get size(){return this.type.size}parse(e,r){let i=this.type.parse(e,r),n=this.lookup(i);if(n==null)throw new Error(`${this.name}: Failed to lookup ${i}`);return{id:i,name:n}}},id=class extends ct{constructor(e,r,i){super("Enum:"+e),this.enumeration=i,this.type=r}get size(){return this.type.size}parse(e,r){let i=this.type.parse(e,r),n=this.enumeration[i];if(n==null)throw new Error(`${this.name}: Failed to lookup ${i}`);return{id:i,name:n}}};var Fu=class extends ct{constructor(e,r){super(e),this._size=-1,this.fields=[];for(let[i,n]of Object.entries(r))this.fields.push({key:i,parser:n})}get size(){if(this._size>-1)return this._size;let e=0;for(let r of this.fields)e+=r.parser.size;return this._size=e,this._size}parse(e,r){let i={};for(let n of this.fields)i[n.key]=n.parser.parse(e,r,i);return i}},nd=class extends ct{constructor(e,r){super(e),this.fields=[],this._size=-1;let i=Object.entries(r),n=!1;for(let[s,o]of i)o.isLookupRequired&&(n=!0),this.fields.push({key:s,parser:o});i.length!==0&&(n?this.generateObjectAssign():this.generateSingleObject())}generateSingleObject(){let e=[],r='"use strict"; return {';for(let n=0;n<this.fields.length;n++)e.push(this.fields[n].parser),r+=` ${JSON.stringify(this.fields[n].key)}: _bp[${n}].parse(buf, ctx),`;r+=" };";let i=new Function("_bp","buf","ctx",r);this.parse=i.bind(null,e)}generateObjectAssign(){let e=[],r=`"use strict"; const ret = {};
|
|
213
|
-
`;for(let n=0;n<this.fields.length;n++)e.push(this.fields[n].parser),r+=`ret[${JSON.stringify(this.fields[n].key)}] = _bp[${n}].parse(buf, ctx, ret)
|
|
214
|
-
`;r+="return ret";let i=new Function("_bp","buf","ctx",r);this.parse=i.bind(null,e)}get size(){if(this._size>-1)return this._size;let e=0;for(let r of this.fields)e+=r.parser.size;return this._size=e,this._size}parse(e,r){return{}}};function Uu(t,e=2){return"0x"+t.toString(16).padStart(e,"0")}var sd=class extends ct{constructor(e,r){super("Offset:"+e.name+":"+r.name),this.type=r,this.offset=e}get size(){return this.type.size}parse(e,r){let i=this.offset.parse(e,r);if(i>e.length||i<0)throw new Error(`[${this.name}]: BufferOverflow attempted read at ${Uu(i)}`);return this.type.parse(e,{offset:i,startOffset:i})}};var od=class extends ct{constructor(e){super("Skip:"+e),this.size=e}parse(e,r){r.offset+=this.size}};var ad=class extends ct{constructor(){super("String")}get size(){throw new Error("Unable to calculate size from dynamic object")}parse(e,r){let i=r.offset,n=[],s=0;for(;s+i<e.length;){let o=e[i+s];if(o===0)break;n.push(String.fromCharCode(o)),s++}return r.offset+=s+1,n.join("")}},ud=class extends ct{constructor(e){super("String:"+e),this.size=e}parse(e,r){let i=r.offset;if(this.size+i>e.length)throw new Error(`BufferOverflow: ${this.name} offset: ${Uu(r.offset)}`);let n=[],s=0;for(;s<this.size;){let o=e[i+s];if(o===0)break;n.push(String.fromCharCode(o)),s++}return r.offset+=this.size,n.join("")}};function bB(t,e,r,i){return typeof r=="number"?new Yh(t,e,r):new Zh(t,e,r,i??!1)}var Si={u8:mx,lu16:yx,lu32:zu,lu64:gx,blu64:vx,empty:new Fu("Empty",{}),offset(t,e){return new sd(t,e)},string(t){return t==null?new ad:new ud(t)},bits(t,e){return new Qh(t,e)},flags(t,e,r){return new ed(t,e,r)},object(t,e){return new nd(t,e)},static(t,e){return new Fu(t,e)},lookup(t,e,r){return new rd(t,e,r)},enum(t,e,r){return new id(t,e,r)},bytes(t){return new td(t)},skip(t){return new od(t)},array:bB};var bx;(function(t){t[t.File="0".charCodeAt(0)]="File",t[t.HardLink="1".charCodeAt(0)]="HardLink",t[t.SymLink="2".charCodeAt(0)]="SymLink",t[t.CharDeviceNode="3".charCodeAt(0)]="CharDeviceNode",t[t.BlockDeviceNode="4".charCodeAt(0)]="BlockDeviceNode",t[t.Directory="5".charCodeAt(0)]="Directory",t[t.FifoNode="6".charCodeAt(0)]="FifoNode",t[t.Reserved="7".charCodeAt(0)]="Reserved",t[t.LongName="L".charCodeAt(0)]="LongName",t[t.LongLink="K".charCodeAt(0)]="LongLink"})(bx||(bx={}));var SB=Si.object("TarHeader",{path:Si.string(100),skip1:Si.skip(24),size:Si.bytes(12).refine(t=>parseInt(t.toString(),8)),skip2:Si.skip(20),type:Si.u8,linkName:Si.string(100)});var Sx={32:16777619n,64:1099511628211n,128:309485009821345068724781371n,256:374144419156711147060143317175368453031918731002211n,512:35835915874844867368919076489095108449946327955754392558399825615420669938882575126094039892345713852759n,1024:5016456510113118655434598811035278955030765345404790744303017523831112055108147451509157692220295382716162651878526895249385292291816524375083746691371804094271873160484737966720260389217684476157468082573n},xB={32:2166136261n,64:14695981039346656037n,128:144066263297769815596495629667062367629n,256:100029257958052580907070968620625704837092796014241193945225284501741471925557n,512:9659303129496669498009435400716310466090418745672637896108374329434462657994582932197716438449813051892206539805784495328239340083876191928701583869517785n,1024:14197795064947621068722070641403218320880622795441933960878474914617582723252296732303717722150864096521202355549365628174669108571814760471015076148029755969804077320157692458563003215304957150157403644460363550505412711285966361610267868082893823963790439336411086884584107735010676915n};function og(t,{size:e=32}={}){if(!Sx[e])throw new Error("The `size` option must be one of 32, 64, 128, 256, 512, or 1024");let r=xB[e],i=Sx[e],n=!1;for(let s=0;s<t.length;s++){let o=t.charCodeAt(s);o>127&&!n&&(t=unescape(encodeURIComponent(t)),o=t.charCodeAt(s),n=!0),r^=BigInt(o),r=BigInt.asUintN(e,r*i)}return r}var ld="COT";var wB=BigInt(0),EB=BigInt(32),_B=BigInt(2**32-1),xx=Si.object("CotarMetadata",{magic:Si.string(ld.length),version:Si.u8,count:Si.lu32}),un=class{constructor(e,r,i=0){this.isHeader=!0,this.source=e,this.sourceOffset=i,this.metadata=r}static hash(e){return og(e,{size:64})}static async loadMetadata(e,r,i){if(i){await e.loadBytes(r,e.chunkSize);let s=e.bytes(r,8);return xx.read(s).value}let n=await e.fetchBytes(-8);return xx.read(new Uint8Array(n)).value}static async getMetadata(e,r,i){let n=await this.loadMetadata(e,r,i);if(n.magic!==ld)throw new Error(`Invalid source: ${e.uri} invalid magic found: ${n.magic}`);if(n.version===1||n.version===2)return n;throw new Error(`Invalid source: ${e.uri} invalid version found: ${n.version}`)}static async create(e,r=0,i=!0){let n=await this.getMetadata(e,r,i);return new un(e,n,r)}async find(e){if(this.metadata.version===1)return this._findV1(e);if(this.metadata.version===2)return this._findV2(e);throw new Error("Invalid metadata version")}async _findV2(e){let r=un.hash(e),i=this.metadata.count,n=Number(r%BigInt(i)),s=Number(r>>EB),o=Number(r&_B),u=null,l=null,d=n;for(;;){let h=this.sourceOffset+d*16+8;if(await this.source.loadBytes(h,16),l=this.source.getUint32(h),u=this.source.getUint32(h+4),u===s&&l===o){let m=this.source.getUint32(h+8)*512,b=this.source.getUint32(h+12);return{offset:m,size:b}}if(u===0&&l===0||(d++,d>=i&&(d=0),d===n))return null}}async _findV1(e){let r=un.hash(e),i=this.metadata.count,n=Number(r%BigInt(i)),s=null,o=n;for(;;){let u=this.sourceOffset+o*24+8;if(await this.source.loadBytes(u,24),s=this.source.getBigUint64(u),s===r){let l=this.source.getUint64(u+8),d=this.source.getUint64(u+16);return{offset:l,size:d}}if(s===wB||(o++,o>=i&&(o=0),o===n))return null}}};var BJ=BigInt(0);var lo=class{constructor(e,r){this.source=e,this.index=r}static async fromTar(e){let r=await un.getMetadata(e,0,!1),i=await e.size,n=r.version===1?24:16,s=i-(r.count*n+16),o=new un(e,r,s);return new lo(e,o)}async get(e){let r=await this.index.find(e);return r==null?null:(await this.source.loadBytes(r.offset,r.size),this.source.bytes(r.offset,r.size))}};var _D=ze(bu(),1);var At;(function(t){function e(i){throw new Error}t.assertNever=e,t.arrayToEnum=i=>{let n={};for(let s of i)n[s]=s;return n},t.getValidEnumValues=i=>{let n=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),s={};for(let o of n)s[o]=i[o];return t.objectValues(s)},t.objectValues=i=>t.objectKeys(i).map(function(n){return i[n]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{let n=[];for(let s in i)Object.prototype.hasOwnProperty.call(i,s)&&n.push(s);return n},t.find=(i,n)=>{for(let s of i)if(n(s))return s},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,n=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(n)}t.joinValues=r})(At||(At={}));var ye=At.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),co=t=>{switch(typeof t){case"undefined":return ye.undefined;case"string":return ye.string;case"number":return isNaN(t)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"object":return Array.isArray(t)?ye.array:t===null?ye.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ye.promise:typeof Map<"u"&&t instanceof Map?ye.map:typeof Set<"u"&&t instanceof Set?ye.set:typeof Date<"u"&&t instanceof Date?ye.date:ye.object;default:return ye.unknown}},pe=At.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of"]),RB=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),ln=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i]},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i]};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){let r=e||function(s){return s.message},i={_errors:[]},n=s=>{for(let o of s.issues)if(o.code==="invalid_union")o.unionErrors.map(n);else if(o.code==="invalid_return_type")n(o.returnTypeError);else if(o.code==="invalid_arguments")n(o.argumentsError);else if(o.path.length===0)i._errors.push(r(o));else{let u=i,l=0;for(;l<o.path.length;){let d=o.path[l];l===o.path.length-1?(u[d]=u[d]||{_errors:[]},u[d]._errors.push(r(o))):u[d]=u[d]||{_errors:[]},u=u[d],l++}}};return n(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,null,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},i=[];for(let n of this.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};ln.create=t=>new ln(t);var a1=(t,e)=>{let r;switch(t.code){case pe.invalid_type:t.received===ye.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case pe.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected)}`;break;case pe.unrecognized_keys:r=`Unrecognized key(s) in object: ${At.joinValues(t.keys,", ")}`;break;case pe.invalid_union:r="Invalid input";break;case pe.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${At.joinValues(t.options)}`;break;case pe.invalid_enum_value:r=`Invalid enum value. Expected ${At.joinValues(t.options)}, received '${t.received}'`;break;case pe.invalid_arguments:r="Invalid function arguments";break;case pe.invalid_return_type:r="Invalid function return type";break;case pe.invalid_date:r="Invalid date";break;case pe.invalid_string:t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case pe.too_small:t.type==="array"?r=`Array must contain ${t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be greater than ${t.inclusive?"or equal to ":""}${t.minimum}`:r="Invalid input";break;case pe.too_big:t.type==="array"?r=`Array must contain ${t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be less than ${t.inclusive?"or equal to ":""}${t.maximum}`:r="Invalid input";break;case pe.custom:r="Invalid input";break;case pe.invalid_intersection_types:r="Intersection results could not be merged";break;case pe.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;default:r=e.defaultError,At.assertNever(t)}return{message:r}},u1=a1,TB=t=>{u1=t},fd=t=>{let{data:e,path:r,errorMaps:i,issueData:n}=t,s=[...r,...n.path||[]],o={...n,path:s},u="",l=i.filter(d=>!!d).slice().reverse();for(let d of l)u=d(o,{data:e,defaultError:u}).message;return{...n,path:s,message:n.message||u}},NB=[];function Me(t,e){let r=fd({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,u1,a1].filter(i=>!!i)});t.common.issues.push(r)}var Rr=class{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){let i=[];for(let n of r){if(n.status==="aborted")return Fe;n.status==="dirty"&&e.dirty(),i.push(n.value)}return{status:e.value,value:i}}static async mergeObjectAsync(e,r){let i=[];for(let n of r)i.push({key:await n.key,value:await n.value});return Rr.mergeObjectSync(e,i)}static mergeObjectSync(e,r){let i={};for(let n of r){let{key:s,value:o}=n;if(s.status==="aborted"||o.status==="aborted")return Fe;s.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),(typeof o.value<"u"||n.alwaysSet)&&(i[s.value]=o.value)}return{status:e.value,value:i}}},Fe=Object.freeze({status:"aborted"}),AB=t=>({status:"dirty",value:t}),zr=t=>({status:"valid",value:t}),ag=t=>t.status==="aborted",ug=t=>t.status==="dirty",hd=t=>t.status==="valid",lg=t=>typeof Promise!==void 0&&t instanceof Promise,xt;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(xt||(xt={}));var Fi=class{constructor(e,r,i,n){this.parent=e,this.data=r,this._path=i,this._key=n}get path(){return this._path.concat(this._key)}},Ex=(t,e)=>{if(hd(e))return{success:!0,data:e.value};{if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");let r=new ln(t.common.issues);return{success:!1,error:r}}};function Ze(t){if(!t)return{};let{errorMap:e,invalid_type_error:r,required_error:i,description:n}=t;if(e&&(r||i))throw new Error(`Can't use "invalid" or "required" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(o,u)=>o.code!=="invalid_type"?{message:u.defaultError}:typeof u.data>"u"&&i?{message:i}:t.invalid_type_error?{message:t.invalid_type_error}:{message:u.defaultError},description:n}}var Xe=class{constructor(e){this.spa=this.safeParseAsync,this.superRefine=this._refinement,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.default=this.default.bind(this),this.describe=this.describe.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return co(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:co(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Rr,ctx:{common:e.parent.common,data:e.data,parsedType:co(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(lg(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let i=this.safeParse(e,r);if(i.success)return i.data;throw i.error}safeParse(e,r){var i;let n={common:{issues:[],async:(i=r?.async)!==null&&i!==void 0?i:!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:co(e)},s=this._parseSync({data:e,path:n.path,parent:n});return Ex(n,s)}async parseAsync(e,r){let i=await this.safeParseAsync(e,r);if(i.success)return i.data;throw i.error}async safeParseAsync(e,r){let i={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:co(e)},n=this._parse({data:e,path:[],parent:i}),s=await(lg(n)?n:Promise.resolve(n));return Ex(i,s)}refine(e,r){let i=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,s)=>{let o=e(n),u=()=>s.addIssue({code:pe.custom,...i(n)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(u(),!1)):o?!0:(u(),!1)})}refinement(e,r){return this._refinement((i,n)=>e(i)?!0:(n.addIssue(typeof r=="function"?r(i,n):r),!1))}_refinement(e){return new Hi({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:e}})}optional(){return zi.create(this)}nullable(){return bs.create(this)}nullish(){return this.optional().nullable()}array(){return Ui.create(this)}promise(){return ho.create(this)}or(e){return va.create([this,e])}and(e){return ba.create(this,e)}transform(e){return new Hi({schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new l1({innerType:this,defaultValue:r,typeName:De.ZodDefault})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},MB=/^c[^\s-]{8,}$/i,kB=/^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i,IB=/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i,Ln=class extends Xe{constructor(){super(...arguments),this._regex=(e,r,i)=>this.refinement(n=>e.test(n),{validation:r,code:pe.invalid_string,...xt.errToObj(i)}),this.nonempty=e=>this.min(1,xt.errToObj(e)),this.trim=()=>new Ln({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}_parse(e){if(this._getType(e)!==ye.string){let s=this._getOrReturnCtx(e);return Me(s,{code:pe.invalid_type,expected:ye.string,received:s.parsedType}),Fe}let i=new Rr,n;for(let s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(n=this._getOrReturnCtx(e,n),Me(n,{code:pe.too_small,minimum:s.value,type:"string",inclusive:!0,message:s.message}),i.dirty());else if(s.kind==="max")e.data.length>s.value&&(n=this._getOrReturnCtx(e,n),Me(n,{code:pe.too_big,maximum:s.value,type:"string",inclusive:!0,message:s.message}),i.dirty());else if(s.kind==="email")IB.test(e.data)||(n=this._getOrReturnCtx(e,n),Me(n,{validation:"email",code:pe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="uuid")kB.test(e.data)||(n=this._getOrReturnCtx(e,n),Me(n,{validation:"uuid",code:pe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="cuid")MB.test(e.data)||(n=this._getOrReturnCtx(e,n),Me(n,{validation:"cuid",code:pe.invalid_string,message:s.message}),i.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),Me(n,{validation:"url",code:pe.invalid_string,message:s.message}),i.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),Me(n,{validation:"regex",code:pe.invalid_string,message:s.message}),i.dirty())):s.kind==="trim"?e.data=e.data.trim():At.assertNever(s);return{status:i.value,value:e.data}}_addCheck(e){return new Ln({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...xt.errToObj(e)})}url(e){return this._addCheck({kind:"url",...xt.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...xt.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...xt.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...xt.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...xt.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...xt.errToObj(r)})}length(e,r){return this.min(e,r).max(e,r)}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get minLength(){let e=-1/0;return this._def.checks.map(r=>{r.kind==="min"&&(e===null||r.value>e)&&(e=r.value)}),e}get maxLength(){let e=null;return this._def.checks.map(r=>{r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}),e}};Ln.create=t=>new Ln({checks:[],typeName:De.ZodString,...Ze(t)});function PB(t,e){let r=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,n=r>i?r:i,s=parseInt(t.toFixed(n).replace(".","")),o=parseInt(e.toFixed(n).replace(".",""));return s%o/Math.pow(10,n)}var ys=class extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._getType(e)!==ye.number){let s=this._getOrReturnCtx(e);return Me(s,{code:pe.invalid_type,expected:ye.number,received:s.parsedType}),Fe}let i,n=new Rr;for(let s of this._def.checks)s.kind==="int"?At.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),Me(i,{code:pe.invalid_type,expected:"integer",received:"float",message:s.message}),n.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(i=this._getOrReturnCtx(e,i),Me(i,{code:pe.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(i=this._getOrReturnCtx(e,i),Me(i,{code:pe.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,message:s.message}),n.dirty()):s.kind==="multipleOf"?PB(e.data,s.value)!==0&&(i=this._getOrReturnCtx(e,i),Me(i,{code:pe.not_multiple_of,multipleOf:s.value,message:s.message}),n.dirty()):At.assertNever(s);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,xt.toString(r))}gt(e,r){return this.setLimit("min",e,!1,xt.toString(r))}lte(e,r){return this.setLimit("max",e,!0,xt.toString(r))}lt(e,r){return this.setLimit("max",e,!1,xt.toString(r))}setLimit(e,r,i,n){return new ys({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:xt.toString(n)}]})}_addCheck(e){return new ys({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:xt.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:xt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:xt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:xt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:xt.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:xt.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int")}};ys.create=t=>new ys({checks:[],typeName:De.ZodNumber,...Ze(t)});var Hu=class extends Xe{_parse(e){if(this._getType(e)!==ye.bigint){let i=this._getOrReturnCtx(e);return Me(i,{code:pe.invalid_type,expected:ye.bigint,received:i.parsedType}),Fe}return zr(e.data)}};Hu.create=t=>new Hu({typeName:De.ZodBigInt,...Ze(t)});var Wu=class extends Xe{_parse(e){if(this._getType(e)!==ye.boolean){let i=this._getOrReturnCtx(e);return Me(i,{code:pe.invalid_type,expected:ye.boolean,received:i.parsedType}),Fe}return zr(e.data)}};Wu.create=t=>new Wu({typeName:De.ZodBoolean,...Ze(t)});var Gu=class extends Xe{_parse(e){if(this._getType(e)!==ye.date){let i=this._getOrReturnCtx(e);return Me(i,{code:pe.invalid_type,expected:ye.date,received:i.parsedType}),Fe}if(isNaN(e.data.getTime())){let i=this._getOrReturnCtx(e);return Me(i,{code:pe.invalid_date}),Fe}return{status:"valid",value:new Date(e.data.getTime())}}};Gu.create=t=>new Gu({typeName:De.ZodDate,...Ze(t)});var Ku=class extends Xe{_parse(e){if(this._getType(e)!==ye.undefined){let i=this._getOrReturnCtx(e);return Me(i,{code:pe.invalid_type,expected:ye.undefined,received:i.parsedType}),Fe}return zr(e.data)}};Ku.create=t=>new Ku({typeName:De.ZodUndefined,...Ze(t)});var Vu=class extends Xe{_parse(e){if(this._getType(e)!==ye.null){let i=this._getOrReturnCtx(e);return Me(i,{code:pe.invalid_type,expected:ye.null,received:i.parsedType}),Fe}return zr(e.data)}};Vu.create=t=>new Vu({typeName:De.ZodNull,...Ze(t)});var fo=class extends Xe{constructor(){super(...arguments),this._any=!0}_parse(e){return zr(e.data)}};fo.create=t=>new fo({typeName:De.ZodAny,...Ze(t)});var Pn=class extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return zr(e.data)}};Pn.create=t=>new Pn({typeName:De.ZodUnknown,...Ze(t)});var On=class extends Xe{_parse(e){let r=this._getOrReturnCtx(e);return Me(r,{code:pe.invalid_type,expected:ye.never,received:r.parsedType}),Fe}};On.create=t=>new On({typeName:De.ZodNever,...Ze(t)});var $u=class extends Xe{_parse(e){if(this._getType(e)!==ye.undefined){let i=this._getOrReturnCtx(e);return Me(i,{code:pe.invalid_type,expected:ye.void,received:i.parsedType}),Fe}return zr(e.data)}};$u.create=t=>new $u({typeName:De.ZodVoid,...Ze(t)});var Ui=class extends Xe{_parse(e){let{ctx:r,status:i}=this._processInputParams(e),n=this._def;if(r.parsedType!==ye.array)return Me(r,{code:pe.invalid_type,expected:ye.array,received:r.parsedType}),Fe;if(n.minLength!==null&&r.data.length<n.minLength.value&&(Me(r,{code:pe.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,message:n.minLength.message}),i.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(Me(r,{code:pe.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,message:n.maxLength.message}),i.dirty()),r.common.async)return Promise.all(r.data.map((o,u)=>n.type._parseAsync(new Fi(r,o,r.path,u)))).then(o=>Rr.mergeArray(i,o));let s=r.data.map((o,u)=>n.type._parseSync(new Fi(r,o,r.path,u)));return Rr.mergeArray(i,s)}get element(){return this._def.type}min(e,r){return new Ui({...this._def,minLength:{value:e,message:xt.toString(r)}})}max(e,r){return new Ui({...this._def,maxLength:{value:e,message:xt.toString(r)}})}length(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Ui.create=(t,e)=>new Ui({type:t,minLength:null,maxLength:null,typeName:De.ZodArray,...Ze(e)});var dd;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(dd||(dd={}));var _x=t=>e=>new Ct({...t,shape:()=>({...t.shape(),...e})});function ju(t){if(t instanceof Ct){let e={};for(let r in t.shape){let i=t.shape[r];e[r]=zi.create(ju(i))}return new Ct({...t._def,shape:()=>e})}else return t instanceof Ui?Ui.create(ju(t.element)):t instanceof zi?zi.create(ju(t.unwrap())):t instanceof bs?bs.create(ju(t.unwrap())):t instanceof ji?ji.create(t.items.map(e=>ju(e))):t}var Ct=class extends Xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=_x(this._def),this.extend=_x(this._def)}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=At.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==ye.object){let d=this._getOrReturnCtx(e);return Me(d,{code:pe.invalid_type,expected:ye.object,received:d.parsedType}),Fe}let{status:i,ctx:n}=this._processInputParams(e),{shape:s,keys:o}=this._getCached(),u=[];for(let d in n.data)o.includes(d)||u.push(d);let l=[];for(let d of o){let h=s[d],m=n.data[d];l.push({key:{status:"valid",value:d},value:h._parse(new Fi(n,m,n.path,d)),alwaysSet:d in n.data})}if(this._def.catchall instanceof On){let d=this._def.unknownKeys;if(d==="passthrough")for(let h of u)l.push({key:{status:"valid",value:h},value:{status:"valid",value:n.data[h]}});else if(d==="strict")u.length>0&&(Me(n,{code:pe.unrecognized_keys,keys:u}),i.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{let d=this._def.catchall;for(let h of u){let m=n.data[h];l.push({key:{status:"valid",value:h},value:d._parse(new Fi(n,m,n.path,h)),alwaysSet:h in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let d=[];for(let h of l){let m=await h.key;d.push({key:m,value:await h.value,alwaysSet:h.alwaysSet})}return d}).then(d=>Rr.mergeObjectSync(i,d)):Rr.mergeObjectSync(i,l)}get shape(){return this._def.shape()}strict(e){return xt.errToObj,new Ct({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,i)=>{var n,s,o,u;let l=(o=(s=(n=this._def).errorMap)===null||s===void 0?void 0:s.call(n,r,i).message)!==null&&o!==void 0?o:i.defaultError;return r.code==="unrecognized_keys"?{message:(u=xt.errToObj(e).message)!==null&&u!==void 0?u:l}:{message:l}}}:{}})}strip(){return new Ct({...this._def,unknownKeys:"strip"})}passthrough(){return new Ct({...this._def,unknownKeys:"passthrough"})}setKey(e,r){return this.augment({[e]:r})}merge(e){return new Ct({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>dd.mergeShapes(this._def.shape(),e._def.shape()),typeName:De.ZodObject})}catchall(e){return new Ct({...this._def,catchall:e})}pick(e){let r={};return At.objectKeys(e).map(i=>{this.shape[i]&&(r[i]=this.shape[i])}),new Ct({...this._def,shape:()=>r})}omit(e){let r={};return At.objectKeys(this.shape).map(i=>{At.objectKeys(e).indexOf(i)===-1&&(r[i]=this.shape[i])}),new Ct({...this._def,shape:()=>r})}deepPartial(){return ju(this)}partial(e){let r={};if(e)return At.objectKeys(this.shape).map(i=>{At.objectKeys(e).indexOf(i)===-1?r[i]=this.shape[i]:r[i]=this.shape[i].optional()}),new Ct({...this._def,shape:()=>r});for(let i in this.shape){let n=this.shape[i];r[i]=n.optional()}return new Ct({...this._def,shape:()=>r})}required(){let e={};for(let r in this.shape){let n=this.shape[r];for(;n instanceof zi;)n=n._def.innerType;e[r]=n}return new Ct({...this._def,shape:()=>e})}};Ct.create=(t,e)=>new Ct({shape:()=>t,unknownKeys:"strip",catchall:On.create(),typeName:De.ZodObject,...Ze(e)});Ct.strictCreate=(t,e)=>new Ct({shape:()=>t,unknownKeys:"strict",catchall:On.create(),typeName:De.ZodObject,...Ze(e)});Ct.lazycreate=(t,e)=>new Ct({shape:t,unknownKeys:"strip",catchall:On.create(),typeName:De.ZodObject,...Ze(e)});var va=class extends Xe{_parse(e){let{ctx:r}=this._processInputParams(e),i=this._def.options;function n(s){for(let u of s)if(u.result.status==="valid")return u.result;for(let u of s)if(u.result.status==="dirty")return r.common.issues.push(...u.ctx.common.issues),u.result;let o=s.map(u=>new ln(u.ctx.common.issues));return Me(r,{code:pe.invalid_union,unionErrors:o}),Fe}if(r.common.async)return Promise.all(i.map(async s=>{let o={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(n);{let s,o=[];for(let l of i){let d={...r,common:{...r.common,issues:[]},parent:null},h=l._parseSync({data:r.data,path:r.path,parent:d});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:d}),d.common.issues.length&&o.push(d.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;let u=o.map(l=>new ln(l));return Me(r,{code:pe.invalid_union,unionErrors:u}),Fe}}get options(){return this._def.options}};va.create=(t,e)=>new va({options:t,typeName:De.ZodUnion,...Ze(e)});var Xu=class extends Xe{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==ye.object)return Me(r,{code:pe.invalid_type,expected:ye.object,received:r.parsedType}),Fe;let i=this.discriminator,n=r.data[i],s=this.options.get(n);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(Me(r,{code:pe.invalid_union_discriminator,options:this.validDiscriminatorValues,path:[i]}),Fe)}get discriminator(){return this._def.discriminator}get validDiscriminatorValues(){return Array.from(this.options.keys())}get options(){return this._def.options}static create(e,r,i){let n=new Map;try{r.forEach(s=>{let o=s.shape[e].value;n.set(o,s)})}catch{throw new Error("The discriminator value could not be extracted from all the provided schemas")}if(n.size!==r.length)throw new Error("Some of the discriminator values are not unique");return new Xu({typeName:De.ZodDiscriminatedUnion,discriminator:e,options:n,...Ze(i)})}};function cg(t,e){let r=co(t),i=co(e);if(t===e)return{valid:!0,data:t};if(r===ye.object&&i===ye.object){let n=At.objectKeys(e),s=At.objectKeys(t).filter(u=>n.indexOf(u)!==-1),o={...t,...e};for(let u of s){let l=cg(t[u],e[u]);if(!l.valid)return{valid:!1};o[u]=l.data}return{valid:!0,data:o}}else if(r===ye.array&&i===ye.array){if(t.length!==e.length)return{valid:!1};let n=[];for(let s=0;s<t.length;s++){let o=t[s],u=e[s],l=cg(o,u);if(!l.valid)return{valid:!1};n.push(l.data)}return{valid:!0,data:n}}else return r===ye.date&&i===ye.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var ba=class extends Xe{_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=(s,o)=>{if(ag(s)||ag(o))return Fe;let u=cg(s.value,o.value);return u.valid?((ug(s)||ug(o))&&r.dirty(),{status:r.value,value:u.data}):(Me(i,{code:pe.invalid_intersection_types}),Fe)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([s,o])=>n(s,o)):n(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};ba.create=(t,e,r)=>new ba({left:t,right:e,typeName:De.ZodIntersection,...Ze(r)});var ji=class extends Xe{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==ye.array)return Me(i,{code:pe.invalid_type,expected:ye.array,received:i.parsedType}),Fe;if(i.data.length<this._def.items.length)return Me(i,{code:pe.too_small,minimum:this._def.items.length,inclusive:!0,type:"array"}),Fe;!this._def.rest&&i.data.length>this._def.items.length&&(Me(i,{code:pe.too_big,maximum:this._def.items.length,inclusive:!0,type:"array"}),r.dirty());let s=i.data.map((o,u)=>{let l=this._def.items[u]||this._def.rest;return l?l._parse(new Fi(i,o,i.path,u)):null}).filter(o=>!!o);return i.common.async?Promise.all(s).then(o=>Rr.mergeArray(r,o)):Rr.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new ji({...this._def,rest:e})}};ji.create=(t,e)=>new ji({items:t,typeName:De.ZodTuple,rest:null,...Ze(e)});var Sa=class extends Xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==ye.object)return Me(i,{code:pe.invalid_type,expected:ye.object,received:i.parsedType}),Fe;let n=[],s=this._def.keyType,o=this._def.valueType;for(let u in i.data)n.push({key:s._parse(new Fi(i,u,i.path,u)),value:o._parse(new Fi(i,i.data[u],i.path,u))});return i.common.async?Rr.mergeObjectAsync(r,n):Rr.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,i){return r instanceof Xe?new Sa({keyType:e,valueType:r,typeName:De.ZodRecord,...Ze(i)}):new Sa({keyType:Ln.create(),valueType:e,typeName:De.ZodRecord,...Ze(r)})}},Ju=class extends Xe{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==ye.map)return Me(i,{code:pe.invalid_type,expected:ye.map,received:i.parsedType}),Fe;let n=this._def.keyType,s=this._def.valueType,o=[...i.data.entries()].map(([u,l],d)=>({key:n._parse(new Fi(i,u,i.path,[d,"key"])),value:s._parse(new Fi(i,l,i.path,[d,"value"]))}));if(i.common.async){let u=new Map;return Promise.resolve().then(async()=>{for(let l of o){let d=await l.key,h=await l.value;if(d.status==="aborted"||h.status==="aborted")return Fe;(d.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(d.value,h.value)}return{status:r.value,value:u}})}else{let u=new Map;for(let l of o){let d=l.key,h=l.value;if(d.status==="aborted"||h.status==="aborted")return Fe;(d.status==="dirty"||h.status==="dirty")&&r.dirty(),u.set(d.value,h.value)}return{status:r.value,value:u}}}};Ju.create=(t,e,r)=>new Ju({valueType:e,keyType:t,typeName:De.ZodMap,...Ze(r)});var gs=class extends Xe{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==ye.set)return Me(i,{code:pe.invalid_type,expected:ye.set,received:i.parsedType}),Fe;let n=this._def;n.minSize!==null&&i.data.size<n.minSize.value&&(Me(i,{code:pe.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&i.data.size>n.maxSize.value&&(Me(i,{code:pe.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,message:n.maxSize.message}),r.dirty());let s=this._def.valueType;function o(l){let d=new Set;for(let h of l){if(h.status==="aborted")return Fe;h.status==="dirty"&&r.dirty(),d.add(h.value)}return{status:r.value,value:d}}let u=[...i.data.values()].map((l,d)=>s._parse(new Fi(i,l,i.path,d)));return i.common.async?Promise.all(u).then(l=>o(l)):o(u)}min(e,r){return new gs({...this._def,minSize:{value:e,message:xt.toString(r)}})}max(e,r){return new gs({...this._def,maxSize:{value:e,message:xt.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};gs.create=(t,e)=>new gs({valueType:t,minSize:null,maxSize:null,typeName:De.ZodSet,...Ze(e)});var vs=class extends Xe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==ye.function)return Me(r,{code:pe.invalid_type,expected:ye.function,received:r.parsedType}),Fe;function i(u,l){return fd({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,u1,a1].filter(d=>!!d),issueData:{code:pe.invalid_arguments,argumentsError:l}})}function n(u,l){return fd({data:u,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,u1,a1].filter(d=>!!d),issueData:{code:pe.invalid_return_type,returnTypeError:l}})}let s={errorMap:r.common.contextualErrorMap},o=r.data;return this._def.returns instanceof ho?zr(async(...u)=>{let l=new ln([]),d=await this._def.args.parseAsync(u,s).catch(b=>{throw l.addIssue(i(u,b)),l}),h=await o(...d);return await this._def.returns._def.type.parseAsync(h,s).catch(b=>{throw l.addIssue(n(h,b)),l})}):zr((...u)=>{let l=this._def.args.safeParse(u,s);if(!l.success)throw new ln([i(u,l.error)]);let d=o(...l.data),h=this._def.returns.safeParse(d,s);if(!h.success)throw new ln([n(d,h.error)]);return h.data})}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new vs({...this._def,args:ji.create(e).rest(Pn.create())})}returns(e){return new vs({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}};vs.create=(t,e,r)=>new vs({args:t?t.rest(Pn.create()):ji.create([]).rest(Pn.create()),returns:e||Pn.create(),typeName:De.ZodFunction,...Ze(r)});var Yu=class extends Xe{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Yu.create=(t,e)=>new Yu({getter:t,typeName:De.ZodLazy,...Ze(e)});var Zu=class extends Xe{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return Me(r,{code:pe.invalid_literal,expected:this._def.value}),Fe}return{status:"valid",value:e.data}}get value(){return this._def.value}};Zu.create=(t,e)=>new Zu({value:t,typeName:De.ZodLiteral,...Ze(e)});function LB(t,e){return new Qu({values:t,typeName:De.ZodEnum,...Ze(e)})}var Qu=class extends Xe{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),i=this._def.values;return Me(r,{expected:At.joinValues(i),received:r.parsedType,code:pe.invalid_type}),Fe}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),i=this._def.values;return Me(r,{received:r.data,code:pe.invalid_enum_value,options:i}),Fe}return zr(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}};Qu.create=LB;var el=class extends Xe{_parse(e){let r=At.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==ye.string&&i.parsedType!==ye.number){let n=At.objectValues(r);return Me(i,{expected:At.joinValues(n),received:i.parsedType,code:pe.invalid_type}),Fe}if(r.indexOf(e.data)===-1){let n=At.objectValues(r);return Me(i,{received:i.data,code:pe.invalid_enum_value,options:n}),Fe}return zr(e.data)}get enum(){return this._def.values}};el.create=(t,e)=>new el({values:t,typeName:De.ZodNativeEnum,...Ze(e)});var ho=class extends Xe{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==ye.promise&&r.common.async===!1)return Me(r,{code:pe.invalid_type,expected:ye.promise,received:r.parsedType}),Fe;let i=r.parsedType===ye.promise?r.data:Promise.resolve(r.data);return zr(i.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}};ho.create=(t,e)=>new ho({type:t,typeName:De.ZodPromise,...Ze(e)});var Hi=class extends Xe{innerType(){return this._def.schema}_parse(e){let{status:r,ctx:i}=this._processInputParams(e),n=this._def.effect||null;if(n.type==="preprocess"){let o=n.transform(i.data);return i.common.async?Promise.resolve(o).then(u=>this._def.schema._parseAsync({data:u,path:i.path,parent:i})):this._def.schema._parseSync({data:o,path:i.path,parent:i})}let s={addIssue:o=>{Me(i,o),o.fatal?r.abort():r.dirty()},get path(){return i.path}};if(s.addIssue=s.addIssue.bind(s),n.type==="refinement"){let o=u=>{let l=n.refinement(u,s);if(i.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(i.common.async===!1){let u=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return u.status==="aborted"?Fe:(u.status==="dirty"&&r.dirty(),o(u.value),{status:r.value,value:u.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(u=>u.status==="aborted"?Fe:(u.status==="dirty"&&r.dirty(),o(u.value).then(()=>({status:r.value,value:u.value}))))}if(n.type==="transform")if(i.common.async===!1){let o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!hd(o))return o;let u=n.transform(o.value,s);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:u}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>hd(o)?Promise.resolve(n.transform(o.value,s)).then(u=>({status:r.value,value:u})):o);At.assertNever(n)}};Hi.create=(t,e,r)=>new Hi({schema:t,typeName:De.ZodEffects,effect:e,...Ze(r)});Hi.createWithPreprocess=(t,e,r)=>new Hi({schema:e,effect:{type:"preprocess",transform:t},typeName:De.ZodEffects,...Ze(r)});var zi=class extends Xe{_parse(e){return this._getType(e)===ye.undefined?zr(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};zi.create=(t,e)=>new zi({innerType:t,typeName:De.ZodOptional,...Ze(e)});var bs=class extends Xe{_parse(e){return this._getType(e)===ye.null?zr(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};bs.create=(t,e)=>new bs({innerType:t,typeName:De.ZodNullable,...Ze(e)});var l1=class extends Xe{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return r.parsedType===ye.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};l1.create=(t,e)=>new zi({innerType:t,typeName:De.ZodOptional,...Ze(e)});var tl=class extends Xe{_parse(e){if(this._getType(e)!==ye.nan){let i=this._getOrReturnCtx(e);return Me(i,{code:pe.invalid_type,expected:ye.nan,received:i.parsedType}),Fe}return{status:"valid",value:e.data}}};tl.create=t=>new tl({typeName:De.ZodNaN,...Ze(t)});var Rx=(t,e={},r)=>t?fo.create().superRefine((i,n)=>{if(!t(i)){let s=typeof e=="function"?e(i):e,o=typeof s=="string"?{message:s}:s;n.addIssue({code:"custom",...o,fatal:r})}}):fo.create(),OB={object:Ct.lazycreate},De;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodPromise="ZodPromise"})(De||(De={}));var BB=(t,e={message:`Input not instance of ${t.name}`})=>Rx(r=>r instanceof t,e,!0),Tx=Ln.create,Nx=ys.create,DB=tl.create,qB=Hu.create,Ax=Wu.create,zB=Gu.create,FB=Ku.create,UB=Vu.create,jB=fo.create,HB=Pn.create,WB=On.create,GB=$u.create,KB=Ui.create,VB=Ct.create,$B=Ct.strictCreate,XB=va.create,JB=Xu.create,YB=ba.create,ZB=ji.create,QB=Sa.create,eD=Ju.create,tD=gs.create,rD=vs.create,iD=Yu.create,nD=Zu.create,sD=Qu.create,oD=el.create,aD=ho.create,Cx=Hi.create,uD=zi.create,lD=bs.create,cD=Hi.createWithPreprocess,fD=()=>Tx().optional(),hD=()=>Nx().optional(),dD=()=>Ax().optional(),Re=Object.freeze({__proto__:null,getParsedType:co,ZodParsedType:ye,makeIssue:fd,EMPTY_PATH:NB,addIssueToContext:Me,ParseStatus:Rr,INVALID:Fe,DIRTY:AB,OK:zr,isAborted:ag,isDirty:ug,isValid:hd,isAsync:lg,ZodType:Xe,ZodString:Ln,ZodNumber:ys,ZodBigInt:Hu,ZodBoolean:Wu,ZodDate:Gu,ZodUndefined:Ku,ZodNull:Vu,ZodAny:fo,ZodUnknown:Pn,ZodNever:On,ZodVoid:$u,ZodArray:Ui,get objectUtil(){return dd},ZodObject:Ct,ZodUnion:va,ZodDiscriminatedUnion:Xu,ZodIntersection:ba,ZodTuple:ji,ZodRecord:Sa,ZodMap:Ju,ZodSet:gs,ZodFunction:vs,ZodLazy:Yu,ZodLiteral:Zu,ZodEnum:Qu,ZodNativeEnum:el,ZodPromise:ho,ZodEffects:Hi,ZodTransformer:Hi,ZodOptional:zi,ZodNullable:bs,ZodDefault:l1,ZodNaN:tl,custom:Rx,Schema:Xe,ZodSchema:Xe,late:OB,get ZodFirstPartyTypeKind(){return De},any:jB,array:KB,bigint:qB,boolean:Ax,date:zB,discriminatedUnion:JB,effect:Cx,enum:sD,function:rD,instanceof:BB,intersection:YB,lazy:iD,literal:nD,map:eD,nan:DB,nativeEnum:oD,never:WB,null:UB,nullable:lD,number:Nx,object:VB,oboolean:dD,onumber:hD,optional:uD,ostring:fD,preprocess:cD,promise:aD,record:QB,set:tD,strictObject:$B,string:Tx,transformer:Cx,tuple:ZB,undefined:FB,union:XB,unknown:HB,void:GB,ZodIssueCode:pe,quotelessJson:RB,ZodError:ln,defaultErrorMap:a1,get overrideErrorMap(){return u1},setErrorMap:TB});var pD=Re.object({title:Re.string(),description:Re.string(),fees:Re.string(),accessConstraints:Re.string()}),mD=Re.object({deliveryPoint:Re.string(),city:Re.string(),postalCode:Re.string(),country:Re.string(),email:Re.string()}),yD=Re.object({individualName:Re.string(),position:Re.string(),phone:Re.string(),address:mD}),gD=Re.object({name:Re.string(),site:Re.string(),contact:yD}),vD=Re.object({id:Re.string(),serviceIdentification:pD,serviceProvider:gD});var bD=Re.object({id:Re.string(),version:Re.number(),name:Re.string(),metadata:Re.unknown().optional(),sprite:Re.string().optional(),glyphs:Re.string().optional(),sources:Re.unknown(),layers:Re.array(Re.unknown())});function SD(t){try{return Lh(t),!0}catch{return!1}}var xD=Re.string().refine(SD,{message:"Invalid hex color"}),rl={minZoom:0,maxZoom:32},pd=Re.number().refine(t=>t>=rl.minZoom&&t<=rl.maxZoom,{message:`must be between ${rl.minZoom} and ${rl.maxZoom}`}),wD=Re.object({name:Re.string(),title:Re.string(),category:Re.string().optional(),2193:Re.string().optional(),3857:Re.string().optional(),minZoom:pd.optional(),maxZoom:pd.optional(),disabled:Re.boolean().optional()}).refine(({minZoom:t,maxZoom:e})=>(t||rl.minZoom)<=(e||rl.maxZoom),{message:"minZoom may no be greater than maxZoom",path:["minZoom"]}),ED=Re.object({type:Re.nativeEnum(Dt),id:Re.string(),title:Re.string(),category:Re.string().optional(),description:Re.string().optional(),background:xD.optional(),layers:Re.array(wD),minZoom:pd.optional(),maxZoom:pd.optional(),format:Re.union([Re.nativeEnum(nt),Re.nativeEnum(gi)]).optional()});var CD=new Fc(Kl.TileMetadata.TableName);function fg(){return CD}function xa(t){let e=Object.entries(t);if(e.length===0)return"";let r=new URLSearchParams;for(let n of e)n[1]!=null&&r.set(n[0],n[1]);r.sort();let i=r.toString();return i===""?"":`?${i}`}function Mx(t){return t==null||typeof t=="string"?!1:"roleArn"in t&&typeof t.roleArn=="string"}function po(t){return"promise"in t?t.promise():t}function mo(t,e){return ss(t)?typeof t.statusCode!="number"?new Qt(e,500,t):new Qt(e,t.statusCode,t):new Qt(e,500,t)}var ai=class extends _r{constructor(e,r,i){super(),this.type=ai.type,this.protocol="s3",this.chunkSize=ai.DefaultChunkSize,this.maxChunkCount=ai.DefaultMaxChunkCount,this.bucket=e,this.key=r,this.remote=i}get uri(){return this.name}get name(){return`s3://${this.bucket}/${this.key}`}static isSource(e){return e.type===ai.type}get size(){return this._size?this._size:(this._size=Promise.resolve().then(async()=>(await po(this.remote.headObject({Bucket:this.bucket,Key:this.key}))).ContentLength||-1),this._size)}static fromUri(e,r){let i=ii(e);return i==null||i.key==null||i.protocol!=="s3"?null:new ai(i.bucket,i.key,r)}async fetchBytes(e,r){let i=this.toRange(e,r);try{let n=await this.remote.getObject({Bucket:this.bucket,Key:this.key,Range:i}).promise();if(!Buffer.isBuffer(n.Body))throw new Error("Failed to fetch object, Body is not a buffer");n.ContentRange!=null&&this._size==null&&(this._size=Promise.resolve(this.parseContentRange(n.ContentRange)));let s=n.Body;return s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)}catch(n){throw mo(n,`Failed to fetch ${this.name} ${i}`)}}};ai.type="aws:s3";ai.DefaultChunkSize=64*1024;ai.DefaultMaxChunkCount=32;function RD(t){return typeof t.read=="function"}var Tr=class{constructor(e,r){this.protocol=Tr.protocol,this.writeTests=new Set,this.writeTestSuffix=Tr.WriteTestSuffix,this.s3=e,this.credentials=r}source(e){let r=ai.fromUri(e,this.s3);if(r==null)throw new Error(`Failed to create aws s3 source from uri: ${e}`);return r}static is(e){return e.protocol===Tr.protocol}static isPath(e){return e==null?!1:e.startsWith("s3://")}async*list(e,r){for await(let i of this.details(e,r))yield i.path}async*details(e,r){let i=ii(e);if(i==null)return;let n,s=r?.recursive===!1?"/":void 0,o=i.bucket,u=i.key,l=0;try{for(;;){l++;let d=await po(this.s3.listObjectsV2({Bucket:o,Prefix:u,ContinuationToken:n,Delimiter:s}));if(d.CommonPrefixes!=null)for(let h of d.CommonPrefixes)h.Prefix!=null&&(yield{path:`s3://${o}/${h.Prefix}`,isDirectory:!0});if(d.Contents!=null)for(let h of d.Contents)h.Key!=null&&(yield{path:`s3://${o}/${h.Key}`,size:h.Size});if(!d.IsTruncated)break;if(l>=Tr.MaxListCount)throw new Error(`Failed to finish listing within ${Tr.MaxListCount} list attempts`);n=d.NextContinuationToken}}catch(d){let h=mo(d,`Failed to list: "${e}"`);if(this.credentials!=null&&h.code===403){let m=await this.credentials.find(e);if(m){yield*m.details(e,r);return}}throw h}}async read(e){let r=ii(e);if(r==null||r.key==null)throw new Error(`Failed to read: "${e}"`);try{return(await this.s3.getObject({Bucket:r.bucket,Key:r.key}).promise()).Body}catch(i){let n=mo(i,`Failed to read: "${e}"`);if(this.credentials!=null&&n.code===403){let s=await this.credentials.find(e);if(s)return s.read(e)}throw n}}async _writeTest(e){let r=ii(e);if(r==null||r.key==null)throw new Error(`Failed to write: "${e}"`);if(this.credentials==null||this.writeTests.has(r.bucket))return;let i=`${e}${this.writeTestSuffix}`;try{await po(this.s3.upload({Bucket:r.bucket,Key:r.key+this.writeTestSuffix,Body:Buffer.from("test")})),this.writeTests.add(r.bucket),this.writeTestSuffix!==""&&await this.delete(i)}catch(n){let s=mo(n,`Failed to write to "s3://${i}"`);if(s.code===403){let o=await this.credentials.find(e);if(o)return o}throw s}}async write(e,r,i){let n=ii(e);if(n==null||n.key==null)throw new Error(`Failed to write: "${e}"`);if(this.credentials!=null&&RD(r)){let s=await this._writeTest(e);if(s)return s.write(e,r,i)}try{await po(this.s3.upload({Bucket:n.bucket,Key:n.key,Body:r,ContentEncoding:i?.contentEncoding,ContentType:i?.contentType}))}catch(s){let o=mo(s,`Failed to write: "${e}"`);if(this.credentials!=null&&o.code===403){let u=await this.credentials.find(e);if(u)return u.write(e,r,i)}throw o}}async delete(e){let r=ii(e);if(r==null||r.key==null)throw new Error(`Failed to write: "${e}"`);try{await po(this.s3.deleteObject({Bucket:r.bucket,Key:r.key}));return}catch(i){let n=mo(i,`Failed to delete: "${e}"`);if(this.credentials!=null&&n.code===403){let s=await this.credentials.find(e);if(s)return s.delete(e)}throw n}}exists(e){return this.head(e).then(r=>r!=null)}stream(e){let r=ii(e);if(r==null||r.key==null)throw new Error(`S3: Unable to read "${e}"`);return this.s3.getObject({Bucket:r.bucket,Key:r.key}).createReadStream()}async head(e){let r=ii(e);if(r==null||r.key==null)throw new Error(`Failed to head: "${e}"`);try{return{size:(await po(this.s3.headObject({Bucket:r.bucket,Key:r.key}))).ContentLength,path:e}}catch(i){if(ss(i)&&i.code==="NotFound")return null;let n=mo(i,`Failed to head: "${e}"`);if(this.credentials!=null&&n.code===403){let s=await this.credentials.find(e);if(s)return s.head(e)}throw n}}};Tr.protocol="s3";Tr.MaxListCount=100;Tr.WriteTestSuffix="";var Kx=ze(pg(),1),Vx=ze(me(),1),Fr=class{static fsFromRole(e,r,i){if(typeof e=="object")return Fr.fsFromRole(e.roleArn,e.externalId,e.durationSeconds);let n=Fr.role(e,r,i);return new Tr(new Kx.default({credentials:n}))}static role(e,r,i){i=i??Fr.DefaultRoleDurationSeconds;let n=`role::${e}::${r}::${i}`,s=Fr.cache.get(n);return s==null&&(s=new Vx.default.ChainableTemporaryCredentials({params:{RoleArn:e,ExternalId:r,RoleSessionName:"fsa-"+Math.random().toString(32)+"-"+Date.now(),DurationSeconds:i}}),Fr.cache.set(n,s)),s}};Fr.DefaultRoleDurationSeconds=3600;Fr.cache=new Map;var il=class{constructor(e,r){this._config=null,this.path=e,this.fs=r}get config(){return this._config==null&&(this._config=this.fs.read(this.path).then(e=>JSON.parse(e.toString()))),this._config}async findCredentials(e){if(this.path===e)return null;let r=await this.config;if(r==null)return null;if(r.v!==2)throw new Error("Invalid bucket config version: "+r.v+" from: "+this.path);if(r.prefixes==null||!Array.isArray(r.prefixes))throw new Error('Invalid bucket config missing "prefixes" from: '+this.path);for(let i of r.prefixes)if(e.startsWith(i.prefix))return i;return null}async find(e){let r=await this.findCredentials(e);if(r==null)return null;let i=Fr.fsFromRole(r.roleArn,r.externalId,r.roleSessionDuration);return this.onFileSystemCreated&&this.onFileSystemCreated(r,i),i}};var Xx=ze(pg(),1),Jx=require("util"),gd=require("zlib");var PD=(0,Jx.promisify)(gd.gunzip),rr=gr;rr.readJson=async function(e){let r=await this.read(e);return e.endsWith(".gz")?JSON.parse((await PD(r)).toString()):JSON.parse(r.toString())};rr.writeJson=async function(e,r){let i=Buffer.from(JSON.stringify(r,void 0,2));if(e.endsWith(".gz")){let n=(0,gd.createGzip)();return n.end(i),this.write(e,n)}else return this.write(e,i)};rr.configure=function(e){if(e.type!=="s3"||!Mx(e))return;let r=ii(e.path);if(r==null)throw new Error("Failed to parse URI: "+e.path);let i=`s3://${r.bucket}/`;this.register(i,Fr.fsFromRole(e.roleArn,e.externalId))};var Yx=new Tr(new Xx.default);rr.register("s3://",Yx);var $x=Nt.get(Nt.AwsRoleConfigPath);if($x!=null){let t=new il($x,rr);t.onFileSystemCreated=(e,r)=>{vu.get().debug({roleArn:e.roleArn,prefix:e.prefix},"FileSystem:Registered"),rr.register(e.prefix,r)},Yx.credentials=t}function Zx(t){let e=/(?:^|\D)(\d{4})(?:-(\d{2}))?(?:$|\D)/g,r=[];for(let i=e.exec(t);i!=null;i=e.exec(t))r.push(parseInt(i[1])),i[2]!=null&&r.push(parseInt(i[1].slice(0,2)+i[2]));return r.length===0?null:(r.sort(),[r[0],r[r.length-1]+1])}function vd(t){let e=t.slice(t.lastIndexOf(" ")+1).trim();if(e==null||!e.endsWith(")")||!e.startsWith("("))return null;let r=e.slice(1,e.length-1).split("-").map(Number);return r.length===1&&!isNaN(r[0])||r.length===2&&!isNaN(r[0])&&!isNaN(r[1])?r:null}process.env.AWS_NODEJS_CONNECTION_REUSE_ENABLED="1";var G7=ze(Xw(),1);var yo="application/json",Se;(function(t){t.CacheControl="Cache-Control",t.ContentEncoding="Content-Encoding",t.ContentType="Content-Type",t.Cors="Access-Control-Allow-Origin",t.ETag="ETag",t.IfNoneMatch="If-None-Match",t.Server="Server",t.ServerTiming="Server-Timing"})(Se||(Se={}));var sl;(function(t){t.CloudfrontId="X-Amz-Cf-Id",t.TraceId="X-Amzn-Trace-Id"})(sl||(sl={}));var xi;(function(t){t.CorrelationId="X-LINZ-Correlation-Id",t.RequestId="X-LINZ-Request-Id"})(xi||(xi={}));var Qw=require("url");var Jw=require("perf_hooks"),wF=4,_d=class{constructor(){this.timers=new Map}getTime(){return Jw.performance.now()}start(e){let r=this.timers.get(e);if(r!=null&&r.duration==null)throw new Error(`Duplicate startTime for "${e}"`);this.timers.set(e,{start:this.getTime()})}end(e){let r=this.timers.get(e);if(r==null)throw new Error(`Missing startTime information for "${e}"`);let i=this.getTime()-r.start;return r.duration=Number(i.toFixed(wF)),i}get metrics(){if(this.timers.size===0)return;let e={};for(let[r,i]of this.timers.entries())i.duration!=null&&(e[r]=i.duration);return e}get unfinished(){let e=[];for(let[r,i]of this.timers.entries())i.duration==null&&e.push(r);if(e.length!==0)return e}};var Yw=ze(bu(),1);function Ur(t){return!(typeof t!="object"||t==null)}var _a=class{constructor(e,r,i){this.context=r,this.event=e,this.id=(0,Yw.ulid)(),this.headers=new Map,this.logContext={},this.log=i,this.timer=new _d,this.log=i.child({id:this.id})}get isColdStart(){return this.requestCount===0}set(e,r){r==null&&(r=void 0),this.logContext[e]=r}toResponse(e){return e?.body}};var Zw=ze(bu(),1);var jr=class extends _a{constructor(e,r,i){var n;super(e,r,i),this.headers=new Map,this.abort=new AbortController,this.correlationId=(n=this.header(xi.CorrelationId))!==null&&n!==void 0?n:Zw.ulid(),this.set("correlationId",this.correlationId)}header(e){return this._isHeadersLoaded!==!0&&(this.loadHeaders(),this._isHeadersLoaded=!0),this.headers.get(e.toLowerCase())}json(){var e;if(this.header(Se.ContentType)!==yo)throw new Error(`Invalid Content-Type: "${this.header("content-type")}"`);if(this.body==null)throw new Error("Cannot parse empty body as JSON");try{return this.isBase64Encoded?JSON.parse(Buffer.from((e=this.body)!==null&&e!==void 0?e:"","base64").toString()):JSON.parse(this.body)}catch{throw new Error("Body is not a JSON object")}}get query(){return this._query==null&&(this._query=this.loadQueryString()),this._query}get url(){return this.path}};var ol=class extends jr{static is(e){return Ur(e)&&Ur(e.requestContext)&&Ur(e.requestContext.elb)}toResponse(e){return{statusCode:e.status,statusDescription:e.statusDescription,body:e.body,headers:this.toHeaders(e.headers),isBase64Encoded:e.isBase64Encoded}}toHeaders(e){if(e.size===0)return;let r={};for(let i of e)r[i[0]]=i[1];return r}loadHeaders(){if(this.event.headers!=null)for(let[e,r]of Object.entries(this.event.headers))r!=null&&this.headers.set(e.toLowerCase(),r)}loadQueryString(){let e=new Qw.URLSearchParams;if(this.event.queryStringParameters==null)return e;for(let[r,i]of Object.entries(this.event.queryStringParameters))e.append(r,i??"true");return e}get method(){return this.event.httpMethod.toUpperCase()}get path(){return this.event.path}get body(){return this.event.body}get isBase64Encoded(){return this.event.isBase64Encoded}};var e7=require("url");var Dn=class extends jr{static is(e){return!(!Ur(e)||!Ur(e.requestContext)||typeof e.requestContext.apiId!="string"||typeof e.requestContext.resourceId!="string"||typeof e.requestContext.httpMethod!="string")}toResponse(e){return{statusCode:e.status,body:e.body,headers:Dn.toHeaders(e),isBase64Encoded:e.isBase64Encoded}}static toHeaders(e){if(e.headers.size===0)return;let r={};for(let i of e.headers)r[i[0]]=i[1];return r}loadHeaders(){if(this.event.headers!=null)for(let[e,r]of Object.entries(this.event.headers))r!=null&&this.headers.set(e.toLowerCase(),r)}loadQueryString(){let e=new e7.URLSearchParams;if(this.event.multiValueQueryStringParameters==null)return e;for(let[r,i]of Object.entries(this.event.multiValueQueryStringParameters))if(i!=null)for(let n of i)e.append(r,n);return e}get path(){return this.event.path}get method(){return this.event.httpMethod.toUpperCase()}get body(){return this.event.body}get isBase64Encoded(){return this.event.isBase64Encoded}};var Pg=require("url");var al=class extends jr{static is(e){if(!Ur(e)||!Array.isArray(e.Records))return!1;let r=e.Records[0];return Ur(r)?Ur(r.cf):!1}toResponse(e){if(e.status===100&&this.event!=null){let r=this.event.Records[0].cf.request;for(let[i,n]of e.headers)r.headers[i.toLowerCase()]=[{key:i,value:String(n)}];return this.event.Records[0].cf.request}return{status:String(e.status),statusDescription:e.statusDescription,body:e.body,headers:this.toHeaders(e),bodyEncoding:"text"}}toHeaders(e){if(e.headers.size===0)return{};let r={};for(let i of e.headers)r[i[0]]=[{key:i[0],value:String(i[1])}];return r}loadHeaders(){var e;for(let[r,i]of Object.entries(this.event.Records[0].cf.request.headers))this.headers.set(r.toLowerCase(),(e=i[0])===null||e===void 0?void 0:e.value)}loadQueryString(){let e=this.event.Records[0].cf.request.querystring;return e==null?new Pg.URLSearchParams:new Pg.URLSearchParams(e)}get path(){return this.event.Records[0].cf.request.uri}get method(){return this.event.Records[0].cf.request.method.toUpperCase()}get body(){let e=this.event.Records[0].cf.request.body;return e==null?null:e.data}get isBase64Encoded(){var e;return((e=this.event.Records[0].cf.request.body)===null||e===void 0?void 0:e.encoding)==="base64"}};var t7=require("url");var ul=class extends jr{toResponse(e){return{statusCode:e.status,body:e.body,headers:Dn.toHeaders(e),isBase64Encoded:e.isBase64Encoded}}loadHeaders(){for(let[e,r]of Object.entries(this.event.headers))this.headers.set(e.toLowerCase(),r)}loadQueryString(){return new t7.URLSearchParams(this.event.rawQueryString)}get method(){return this.event.requestContext.http.method.toUpperCase()}get path(){return this.event.rawPath}get isBase64Encoded(){return this.event.isBase64Encoded}get body(){return this.event.body==null?null:this.event.body}static is(e){return!(!Ur(e)||!Ur(e.requestContext)||!Ur(e.requestContext.http))}};var ae=class{constructor(e,r,i){if(this._body=null,this.headers=new Map,this.status=e,this.statusDescription=r,i!=null)for(let n of Object.keys(i))this.header(n,i[n])}static is(e){return e instanceof ae}static ok(e=200,r="Ok"){return new ae(e,r)}header(e,r){let i=e.toLowerCase();if(r==null)return this.headers.get(i);this.headers.set(i,r)}get isBase64Encoded(){return Buffer.isBuffer(this._body)}json(e){return this.buffer(JSON.stringify(e),yo),this}buffer(e,r=yo){return this.header(Se.ContentType,r),this._body=e,this}get body(){return this._body==null?(this.header(Se.ContentType,yo),JSON.stringify({id:this.header(xi.RequestId),status:this.status,message:this.statusDescription,correlationId:this.header(xi.CorrelationId)})):Buffer.isBuffer(this._body)?this._body.toString("base64"):this._body}};var j7=ze(U7(),1),H7=ze(require("timers/promises"),1);var Ld=class{constructor(){this.hooks={request:[],response:[]},this.timeoutEarlyMs=0,this.router=(0,j7.default)({defaultRoute:()=>new ae(404,"Not found")})}register(e,r,i){this.router.on(e,r,(n,s,o)=>n instanceof jr?(n.params=o,Od(n,i)):new ae(500,"Internal server error"))}hook(e,r){this.hooks[e].push(r)}get(e,r){return this.register("GET",e,r)}post(e,r){return this.register("POST",e,r)}delete(e,r){return this.register("DELETE",e,r)}options(e,r){return this.register("OPTIONS",e,r)}patch(e,r){return this.register("PATCH",e,r)}head(e,r){return this.register("HEAD",e,r)}put(e,r){return this.register("PUT",e,r)}async after(e,r){try{for(let i of this.hooks.response)await i(e,r)}catch(i){return ae.is(i)?i:(e.set("err",i),new ae(500,"Internal Server Error"))}return r}async handle(e){let r=[this._handle(e)];if(this.timeoutEarlyMs&&typeof e.context.getRemainingTimeInMillis=="function"){let i=e.context.getRemainingTimeInMillis()-this.timeoutEarlyMs;r.push(H7.default.setTimeout(i,new ae(408,"Request Timed Out"),{signal:e.abort.signal}))}return Promise.race(r).then(i=>(e.abort.abort(),$g(e,i)))}async _handle(e){e.requestCount===-1&&(e.requestCount=Hr.requestCount++);let r=e.header(sl.CloudfrontId),i=e.header(sl.TraceId),n=e.context.awsRequestId;(r||i||n)&&e.set("aws",{cloudFrontId:r,traceId:i,lambdaId:n}),e.set("method",e.method),e.set("path",e.path);for(let o of this.hooks.request){let u=await Od(e,o);if(u)return this.after(e,u)}let s=await this.router.lookup(e,null);return s?this.after(e,s):this.after(e,new ae(404,"Not found"))}};var JF="v6.41.0",YF="a466cbcc9859b1585e6ca32894615b3eb6ad04b0",W7={version:JF,hash:YF};async function Od(t,e){t.timer.timers.has("lambda")||t.timer.start("lambda");try{return await e(t)}catch(r){return ae.is(r)?r:(t.set("err",r),new ae(500,"Internal Server Error"))}}function $g(t,e){let r=t.timer.timers.has("lambda")?t.timer.end("lambda"):0,i=200;return e instanceof ae&&(e.status>=500&&e.header(Se.CacheControl,"no-store"),e.header(Se.ServerTiming,`total;dur=${r}`),!e.isBase64Encoded&&e.header(Se.ContentType)==null&&e.header(Se.ContentType,yo),i=e.status,t.set("description",e.statusDescription),e.header(xi.RequestId,t.id),t instanceof jr&&e.header(xi.CorrelationId,t.correlationId)),t.set("status",i),t.timer.timers.size>0&&t.set("metrics",t.timer.metrics),W7.hash&&t.set("package",W7),t.set("requestCount",t.requestCount),t.set("unfinished",t.timer.unfinished),t.set("duration",r),t.set("@type","report"),i>499?t.log.error(t.logContext,"Lambda:Done"):i>399?t.log.warn(t.logContext,"Lambda:Done"):t.log.info(t.logContext,"Lambda:Done"),e}function ZF(t){let e={rejectOnError:!0,tracePercent:0,...t};if(isNaN(e.tracePercent)||e.tracePercent>1)throw new Error("tracePercent is not between 0-1 :"+e.tracePercent);return e}var Hr=class{static request(e,r,i){if(ol.is(e))return new ol(e,r,i);if(ul.is(e))return new ul(e,r,i);if(Dn.is(e))return new Dn(e,r,i);if(al.is(e))return new al(e,r,i);throw new Error("Request is not a a ALB, ApiGateway or Cloudfront event")}static handler(e,r,i){let n=ZF(r);function s(o,u,l){let d=new _a(o,u,i??Hr.Logger);d.requestCount=Hr.requestCount++,n.tracePercent>0&&Math.random()<n.tracePercent&&(d.log.level="trace"),process.env.TRACE_LAMBDA&&(d.log.level="trace"),d.log.trace({event:o},"Lambda:Start");let h=u.awsRequestId;d.set("aws",{lambdaId:h}),Od(d,e).then(m=>{if($g(d,m),ae.is(m)&&n.rejectOnError){if(d.logContext.err)return l(d.logContext.err);if(m.status>399)return l(d.toResponse(m))}return l(null,d.toResponse(m))})}return s}static http(e){let r=new Ld;async function i(n,s){let o=Hr.request(n,s,e??Hr.Logger);try{let u=await r.handle(o);return o.toResponse(u)}catch(u){o.log.fatal({err:u},"Lambda:Failed");let l=new ae(500,"Internal Server Error");return o.set("err",u),l.header(xi.RequestId,o.id),l.header(xi.CorrelationId,o.correlationId),o.toResponse(l)}}return i.router=r,i}};Hr.Logger=(0,G7.default)();Hr.ServerName="linz";Hr.requestCount=0;var ot={key(t){return Buffer.isBuffer(t)||typeof t=="string"?os(t):os(JSON.stringify(t))},isNotModified(t,e){let r=t.header(Se.IfNoneMatch);return r!=null&&r.indexOf(e)>-1?(t.set("cache",{hit:!0,match:r}),!0):!1}};var ke=()=>new ae(404,"Not Found"),$t=()=>new ae(304,"Not modified"),K7=()=>new ae(204,"No Content"),V7=t=>new ae(200,"ok").json({id:t.id,correlationId:t.correlationId,message:"ok"});async function $7(t){let e=Nt.get(Nt.PublicUrlBase);if(e==null)return ke();let r={currentVersion:10.1,fullVersion:"10.1",owningSystemUrl:e},i=JSON.stringify(r),n=Buffer.from(i),s=ot.key(n);if(ot.isNotModified(t,s))return $t();let o=new ae(200,"ok");return o.header(Se.CacheControl,"public, max-age=604800, stale-while-revalidate=86400"),o.buffer(n,"application/json"),t.set("bytes",n.byteLength),o}var Z7=require("url");var QF=.2;function eU(t){return t.source.uri.endsWith(".tar.co")}var pl=class{constructor(e){this.tms=e}async tile(e,r,i,n){let s=[];for(let o of e)if(eU(o))s.push({type:"cotar",asset:o,path:`tiles/${n}/${r}/${i}.webp`});else{let u=this.getTiles(o,r,i,n);if(u==null)continue;s=s.concat(u)}return s}getRasterTiffIntersection(e,r,i,n){let s=this.tms.tileToPixels(r,i),o=new $e(s.x,s.y,this.tms.tileSize,this.tms.tileSize),u=e.images[0].bbox,l=this.tms.sourceToPixels(u[0],u[3],n),d=this.tms.sourceToPixels(u[2],u[1],n),h=$e.fromUpperLeftLowerRight(l,d),m=h.intersection(o);return m==null?null:{tiff:h,intersection:m,tile:o}}createComposition(e,r,i,n,s){let o=$e.fromJson(e.getTileBounds(r,i)),u=o.scale(n,n).add(s.tiff).round(QF),l=u.intersection(s.tile);if(l==null)return null;let d=l.subtract(u);if(d.height<.5||d.width<.5)return null;let h=u.subtract(s.tile),m={type:"tiff",asset:e.tif,source:{x:r,y:i,imageId:e.id,width:o.width,height:o.height},y:Math.max(0,Math.round(h.y)),x:Math.max(0,Math.round(h.x))};if((o.width<e.tileSize.width||o.height<e.tileSize.height)&&(m.extract={width:o.width,height:o.height}),o.width!==u.width||o.height!==u.height){let b=u.width/o.width,S=u.height/o.height;m.resize={width:u.width,height:u.height,scaleX:b,scaleY:S}}return(d.y!==0||d.x!==0||d.height!==u.height||d.width!==u.width)&&(m.crop=d.toJson()),m}getTiles(e,r,i,n){let s=this.getRasterTiffIntersection(e,r,i,n);if(s==null)return null;let o=this.tms.pixelScale(n),u=e.getImageByResolution(o),l=o/u.resolution[0],d=s.intersection.subtract(s.tiff),{tileSize:h,tileCount:m}=u,b=[],S=1/l;for(let y of pl.getRequiredTiles(d,l,h,m)){let v=this.createComposition(u,y.x,y.y,S,s);v!=null&&b.push(v)}return b.length===0?null:b}static*getRequiredTiles(e,r,i,n){let s=Math.max(Math.floor(e.x/i.width*r),0),o=Math.min(Math.ceil(e.right/i.width*r),n.x),u=Math.max(Math.floor(e.y/i.height*r),0),l=Math.min(Math.ceil(e.bottom/i.height*r),n.y);for(let d=s;d<o;d++)for(let h=u;h<l;h++)yield{x:d,y:h}}};var X7=[nt.Jpeg,nt.Webp,nt.Png];function Xg(t){if(t==null)return null;let e=t.toLowerCase();return e===nt.Png?nt.Png:e===nt.Webp?nt.Webp:e===nt.Jpeg||e==="jpg"?nt.Jpeg:e===nt.Avif?nt.Avif:null}var Xt={apiKey(t){let e=t.query.get(Kl.ApiKey.QueryString)??t.header("X-LINZ-Api-Key"),r=G9(e);if(!r.valid)throw new ae(400,"API Key Invalid: "+r.message);return t.set("api",K9(e)),e},getTileMatrixSet(t){return yi.find(t)},getRequestedFormats(t){let e=[...t.query.getAll("format"),...t.query.getAll("tileFormat")];if(e.length===0)return null;let r=new Set;for(let i of e){let n=Xg(i);n!=null&&r.add(n)}return r.size===0?null:[...r.values()]},getTileFormat(t){let e=Xg(t);return e||(t===gi.MapboxVectorTiles?gi.MapboxVectorTiles:null)},xyz(t){Xt.apiKey(t),t.set("tileSet",t.params.tileSet);let e=parseInt(t.params.x,10),r=parseInt(t.params.y,10),i=parseInt(t.params.z,10),n=Xt.getTileMatrixSet(t.params.tileMatrix);if(n==null)throw new ae(404,"Tile Matrix not found");t.set("tileMatrix",n.identifier),t.set("projection",n.projection.code);let s=Xt.getTileFormat(t.params.tileType);if(s==null)throw new ae(404,"Tile extension not found");if(t.set("extension",s),isNaN(i)||i>n.maxZoom||i<0)throw new ae(404,`Zoom not found: ${i}`);let o=n.zooms[i];if(isNaN(e)||e<0||e>o.matrixWidth)throw new ae(404,`X not found: ${e}`);if(isNaN(r)||r<0||r>o.matrixHeight)throw new ae(404,`Y not found: ${r}`);let u={tile:{x:e,y:r,z:i},tileSet:t.params.tileSet,tileMatrix:n,tileType:s};t.set("xyz",u.tile);let l=Dr.tileCenterToLatLon(n,u.tile);return t.set("location",l),u}};var ml=class{constructor(e){this.cacheA=new Map;this.cacheB=new Map;this.hits=0;this.misses=0;this.resets=0;this.clears=0;this._lastCheckedAt=-1;this.maxSize=e}get(e){let r=this.cacheA.get(e);if(r)return this.hits++,r;let i=this.cacheB.get(e);return i==null?(this.misses++,null):(this.hits++,this.cacheA.set(e,i),this.cacheB.delete(e),i)}clear(){this.cacheA.clear(),this.cacheB.clear(),this.clears++}set(e,r){this.cacheA.set(e,r),this.check()}check(){if(this._lastCheckedAt=Date.now(),!(this.maxSize<=0)&&!(this.currentSize<=this.maxSize)){if(this.resets++,this.resets>100)return this.resets=0,this.clear();this.cacheB=this.cacheA,this.cacheA=new Map}}get currentSize(){let e=0;for(let r of this.cacheA.values())e+=r.size;return e}};var Jg=class{constructor(e){this.configProvider=e.then(r=>{let i=as.fromJson(r);return i.createVirtualTileSets(),i}).catch(r=>{if(r.code===404)return null;throw r})}get size(){return 1}},Yg=class{constructor(e){this.cache=new ml(e)}get(e){let r=this.cache.get(e)?.configProvider;if(r!=null)return r;let i=rr.readJson(e),n=new Jg(i);return this.cache.set(e,n),n.configProvider}},J7=new Yg(20);var tU=new Set(["linz-workflow-artifacts","linz-basemaps","linz-basemaps-staging"]),rU=new Set(["s3","memory"]),at=class{static async getDefaultConfig(){let e=fg();if(e.assets==null){let r=await e.ConfigBundle.get(e.ConfigBundle.id("latest"));r&&(e.assets=r.assets)}return e}static extract(e){let r=e.query.get("config");return r==null?null:r.includes("/")?Pu.encode(Buffer.from(r)):r}static async load(e){let r=e.query.get("config");if(r==null)return this.getDefaultConfig();let i=Ih(r)?Buffer.from(Pu.decode(r)).toString():r,n=ii(i);if(n==null)throw new ae(400,"Invalid config location");if(!rU.has(n.protocol))throw new ae(400,`Invalid configuration location protocol:${n.protocol}`);if(!tU.has(n.bucket))throw new ae(400,`Bucket: "${n.bucket}" is not a allowed bucket location`);return e.set("config",i),e.timer.start("config:load"),J7.get(i).then(s=>{if(e.timer.end("config:load"),s==null)throw new ae(404,`Config not found at ${i}`);return s})}};var vo={DateBefore:"date[before]",DateAfter:"date[after]"};function yl(t){return{[vo.DateBefore]:t.query.get(vo.DateBefore)??void 0,[vo.DateAfter]:t.query.get(vo.DateAfter)??void 0}}function Zg(t){return t.length===1?[new Date(`${t[0]}-01-01T00:00:00.000Z`),new Date(`${t[0]}-12-31T23:59:59.999Z`)]:[new Date(`${t[0]}-01-01T00:00:00.000Z`),new Date(`${t[1]}-12-31T23:59:59.999Z`)]}function Y7(t){if(t==null)return null;let e=new Date(t);if(isNaN(e.getTime()))throw new ae(400,`Invalid date format: "${t}"`);return e}function gl(t,e){let r=t.query.get(vo.DateAfter),i=t.query.get(vo.DateBefore);if(r==null&&i==null)return e;let n=Y7(r),s=Y7(i),o=e.filter(u=>{if(u.title==null)return!1;let l=vd(u.title);if(l==null)return!1;let d=Zg(l),h=d[0],m=d[1];return(n==null||m>=n)&&(s==null||h<=s)});return t.set("layerFilter",{[vo.DateBefore]:s?.toISOString(),[vo.DateAfter]:n?.toISOString(),layerCount:e.length,filterCount:o.length}),o}function Ss(t,e,r){if(t==null)return"";let i=Nt.get(Nt.PublicUrlBase)??"";if(!t.startsWith("/"))return t;let n=new Z7.URL(gr.join(i,t));return e&&n.searchParams.set("api",e),r&&n.searchParams.set("config",r),n.toString().replace(/%7B/g,"{").replace(/%7D/g,"}")}function iU(t,e,r,i){let n=JSON.parse(JSON.stringify(t.sources));for(let[s,o]of Object.entries(n)){if(o.type==="vector")o.url=Ss(o.url,e,r);else if(o.type==="raster"&&Array.isArray(o.tiles))for(let u=0;u<o.tiles.length;u++)o.tiles[u]=Ss(o.tiles[u],e,r);n[s]=o}return{version:8,id:t.id,name:t.name,sources:n,layers:i||t.layers,metadata:t.metadata??{},glyphs:Ss(t.glyphs,void 0,r),sprite:Ss(t.sprite,void 0,r)}}async function nU(t,e,r){let i=yi.find(t.query.get("tileMatrix")??it.identifier);if(i==null)return new ae(400,"Invalid tile matrix");let[n]=Xt.getRequestedFormats(t)??[nt.Webp];if(n==null)return new ae(400,"Invalid image format");let s=at.extract(t),o=xa({config:s,api:r,...yl(t)}),u=gr.join(Nt.get(Nt.PublicUrlBase)??"",`/v1/tiles/${e.name}/${i.identifier}/{z}/{x}/{y}.${n}${o}`),l=`basemaps-${e.name}`,d={version:8,sources:{[l]:{type:"raster",tiles:[u],tileSize:256}},layers:[{id:l,type:"raster",source:l}]},h=Buffer.from(JSON.stringify(d)),m=ot.key(h);if(ot.isNotModified(t,m))return $t();let b=new ae(200,"ok");return b.header(Se.ETag,m),b.header(Se.CacheControl,"no-store"),b.buffer(h,"application/json"),t.set("bytes",h.byteLength),b}async function Qg(t){let e=Xt.apiKey(t),r=t.params.styleName,i=t.query.getAll("exclude"),n=new Set(i.map(b=>b.toLowerCase())),s=await at.load(t),o=s.Style.id(r),u=await s.Style.get(o);if(u==null){let b=await s.TileSet.get(s.TileSet.id(r));return b==null?ke():b.type!==Dt.Raster?ke():nU(t,b,e)}let l=iU(u.style,e,at.extract(t),u.style.layers.filter(b=>!n.has(b.id.toLowerCase()))),d=Buffer.from(JSON.stringify(l)),h=ot.key(d);if(ot.isNotModified(t,h))return $t();let m=new ae(200,"ok");return m.header(Se.ETag,h),m.header(Se.CacheControl,"no-store"),m.buffer(d,"application/json"),t.set("bytes",d.byteLength),m}function sU(t,e){let r=Nt.get(Nt.PublicUrlBase)??"",i=`/v1/arcgis/rest/services/${t}/VectorTileServer`,n=new URL(rr.join(r,i));return n.searchParams.set("api",e),n.searchParams.set("f","json"),n.toString().replace(/%7B/g,"{").replace(/%7D/g,"}")}function oU(t,e,r){let i=JSON.parse(JSON.stringify(e.sources));for(let[s,o]of Object.entries(i))o.type==="vector"?(o.url=sU(t,r),i[s]=o):delete i[s];let n=[];for(let s of e.layers)s.source!=null&&!i.hasOwnProperty(s.source)||n.push(s);return{version:8,id:e.id,name:e.name,sources:i,layers:n,metadata:e.metadata??{},glyphs:Ss(e.glyphs),sprite:Ss(e.sprite)}}async function Q7(t){let e=Xt.apiKey(t),r=await at.load(t),i=await r.TileSet.get(r.TileSet.id(t.params.tileSet));if(i?.type!==Dt.Vector)return ke();let n=t.query.get("style"),s=n||"topographic",o=r.Style.id(s),u=await r.Style.get(o);if(u==null)return ke();let l=oU(i.name,u.style,e),d=Buffer.from(JSON.stringify(l)),h=ot.key(d);if(ot.isNotModified(t,h))return $t();let m=new ae(200,"ok");return m.header(Se.ETag,h),m.header(Se.CacheControl,"no-store"),m.buffer(d,"application/json"),t.set("bytes",d.byteLength),m}var aU=18,uU=1;async function eE(t){let e=await at.load(t),r=await e.TileSet.get(e.TileSet.id(t.params.tileSet));if(r?.type!==Dt.Vector)return ke();let i=Xt.apiKey(t);if(t.query.get("f")!=="json")return ke();let s={xmin:it.extent.x,ymin:it.extent.y,xmax:it.extent.right,ymax:it.extent.bottom,spatialReference:{wkid:102100,latestWkid:it.projection.code}},o={currentVersion:10.81,name:r.name,capabilities:"TilesOnly",type:"indexedVector",defaultStyles:"",tiles:[Ss(`/v1/tiles/${r.name}/WebMercatorQuad/{z}/{x}/{y}.pbf`,i)],exportTilesAllowed:!1,maxExportTilesCount:0,initialExtent:s,fullExtent:s,minScale:0,maxScale:0,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:it.extent.x,y:it.extent.bottom},spatialReference:{wkid:102100,latestWkid:it.projection.code},lods:it.zooms.slice(uU,aU).map((h,m)=>({level:m,resolution:h.scaleDenominator*28e-5,scale:h.scaleDenominator}))},maxzoom:22,minLOD:0,maxLOD:15,resourceInfo:{styleVersion:8,tileCompression:"gzip",cacheInfo:{storageInfo:{packetSize:128,storageFormat:"compactV2"}}}},u=JSON.stringify(o,null,2),l=Buffer.from(u),d=new ae(200,"ok");return d.header(Se.CacheControl,"no-store"),d.buffer(l,"application/json"),t.set("bytes",l.byteLength),d}var lU=1+1e-10,tE=10**8;function e2(t){return Math.round(t*tE)/tE}function cU(t){return[e2(t[0]),e2(t[1])]}function fU(t,e,r){if(oo.delta(t[0],t[2])<=0)return oo.bboxToMultiPolygon(t);let i=[];for(let o of e)i.push($e.fromJson(o).pad(lU).toPolygon());let n=p3(i);return Mh(n,o=>cU(r.toWgs84(o)))}function hU(t){if(t!=null)return[{name:t.serviceProvider.name,url:t.serviceProvider.site,roles:["host"]}]}async function dU(t,e,r){let i=Dr.get(r),n=[],s=[],o=await at.load(t),u=await Qo(o,e.layers,[r.projection]),l=gl(t,e.layers),d=await o.Provider.get(o.Provider.id("linz"));for(let h of l){let m=h[i.epsg.code];if(m==null)continue;let b=u.get(m);if(b==null)continue;let S=b.title,y=vd(b.title)??Zx(b.name);if(y==null)continue;let v=Zg(y),C=i.boundsToWgs84BoundingBox(b.bounds).map(e2),w={spatial:{bbox:[C]},temporal:{interval:[[v[0].toISOString(),v[1].toISOString()]]}},x={type:"Feature",stac_version:Uc.Version,id:m+"_item",collection:m,assets:{},links:[],bbox:C,geometry:{type:"MultiPolygon",coordinates:fU(C,b.files,i)},properties:{title:S,category:b.category,datetime:null,start_datetime:v[0].toISOString(),end_datetime:v[1].toISOString()}};s.push(x);let N=h.disabled?32:h.minZoom,I=Er.convertZoomLevel(N||0,it,r,!0),q=Er.convertZoomLevel(h.maxZoom?h.maxZoom:32,it,r,!0);n.push({stac_version:Uc.Version,license:Uc.License,id:b.id,providers:hU(d),title:S,description:"No description",extent:w,links:[],summaries:{"linz:category":b.category,"linz:zoom":{min:I,max:q},"linz:priority":[1e3+e.layers.indexOf(h)],"linz:disabled":!!h.disabled}})}return{id:e.id,type:"FeatureCollection",stac_version:Uc.Version,stac_extensions:["single-file-stac"],title:e.title??"No title",description:e.description??"No Description",features:s,collections:n,links:[]}}async function t2(t){let e=Xt.getTileMatrixSet(t.params.tileMatrix);if(e==null)throw new ae(404,"Tile Matrix not found");let r=await at.load(t);t.timer.start("tileset:load");let i=await r.TileSet.get(r.TileSet.id(t.params.tileSet));if(t.timer.end("tileset:load"),i==null||i.type===Dt.Vector)return ke();let n=ot.key(i);if(ot.isNotModified(t,n))return $t();t.timer.start("stac:load");let s=await dU(t,i,e);if(t.timer.end("stac:load"),s==null)return ke();let o=new ae(200,"ok");return o.header(Se.ETag,n),o.header(Se.CacheControl,"public, max-age=604800, stale-while-revalidate=86400"),o.json(s),o}async function rE(t,e){let r=Buffer.from(JSON.stringify(e)),i=ot.key(r);if(ot.isNotModified(t,i))return $t();let n=new ae(200,"ok");return n.header(Se.ETag,i),n.header(Se.CacheControl,"no-store"),n.buffer(r,"application/json"),t.set("bytes",r.byteLength),n}async function iE(t){let e=await at.load(t);t.timer.start("tileset:load");let r=await e.TileSet.get(e.TileSet.id(t.params.tileSet));return t.timer.end("tileset:load"),r==null?ke():rE(t,r)}async function nE(t){let e=await at.load(t);t.timer.start("tileset:load");let r=await e.TileSet.get(e.TileSet.id(t.params.tileSet));if(t.timer.end("tileset:load"),r==null)return ke();t.timer.start("imagery:load");let i=await e.Imagery.get(e.Imagery.id(t.params.imageryId));if(t.timer.end("imagery:load"),i==null){let n=r.layers.find(u=>u.name===t.params.imageryId||Mn(u.name)===t.params.imageryId);if(n==null)return ke();let s=yi.find(t.query.get("tileMatrix")??it.identifier);if(s==null)return ke();let o=n[s.projection.code];if(o==null)return ke();t.timer.start("imagery:load:sub"),i=await e.Imagery.get(e.Imagery.id(o)),t.timer.end("imagery:load:sub")}return i==null?ke():rE(t,i)}var h2=ze(require("path"),1);var Nr;(function(t){t.NONE="application/octet-stream",t.JPEG="image/jpeg",t.JP2="image/jp2",t.JPEGXL="image/jpegxl",t.WEBP="image/webp",t.ZSTD="application/zstd",t.LZW="application/lzw",t.DEFLATE="application/deflate",t.LZERC="application/lerc",t.LZMA="application/x-lzma"})(Nr||(Nr={}));var r2={1:Nr.NONE,5:Nr.LZW,6:Nr.JPEG,7:Nr.JPEG,8:Nr.DEFLATE,34887:Nr.LZERC,34925:Nr.LZMA,34712:Nr.JP2,5e4:Nr.ZSTD,50001:Nr.WEBP,50002:Nr.JPEGXL};var Ae;(function(t){t[t.Artist=315]="Artist",t[t.BitsPerSample=258]="BitsPerSample",t[t.CellLength=265]="CellLength",t[t.CellWidth=264]="CellWidth",t[t.ColorMap=320]="ColorMap",t[t.Compression=259]="Compression",t[t.Copyright=33432]="Copyright",t[t.DateTime=306]="DateTime",t[t.ExtraSamples=338]="ExtraSamples",t[t.FillOrder=266]="FillOrder",t[t.FreeByteCounts=289]="FreeByteCounts",t[t.FreeOffsets=288]="FreeOffsets",t[t.GrayResponseCurve=291]="GrayResponseCurve",t[t.GrayResponseUnit=290]="GrayResponseUnit",t[t.HostComputer=316]="HostComputer",t[t.ImageDescription=270]="ImageDescription",t[t.ImageHeight=257]="ImageHeight",t[t.ImageWidth=256]="ImageWidth",t[t.Make=271]="Make",t[t.MaxSampleValue=281]="MaxSampleValue",t[t.MinSampleValue=280]="MinSampleValue",t[t.Model=272]="Model",t[t.NewSubFileType=254]="NewSubFileType",t[t.Orientation=274]="Orientation",t[t.PhotometricInterpretation=262]="PhotometricInterpretation",t[t.PlanarConfiguration=284]="PlanarConfiguration",t[t.ResolutionUnit=296]="ResolutionUnit",t[t.RowsPerStrip=278]="RowsPerStrip",t[t.SamplesPerPixel=277]="SamplesPerPixel",t[t.Software=305]="Software",t[t.StripByteCounts=279]="StripByteCounts",t[t.StripOffsets=273]="StripOffsets",t[t.SubFileType=255]="SubFileType",t[t.Threshholding=263]="Threshholding",t[t.XResolution=282]="XResolution",t[t.YResolution=283]="YResolution",t[t.BadFaxLines=326]="BadFaxLines",t[t.CleanFaxData=327]="CleanFaxData",t[t.ClipPath=343]="ClipPath",t[t.ConsecutiveBadFaxLines=328]="ConsecutiveBadFaxLines",t[t.Decode=433]="Decode",t[t.DefaultImageColor=434]="DefaultImageColor",t[t.DocumentName=269]="DocumentName",t[t.DotRange=336]="DotRange",t[t.HalftoneHints=321]="HalftoneHints",t[t.Indexed=346]="Indexed",t[t.JPEGTables=347]="JPEGTables",t[t.PageName=285]="PageName",t[t.PageNumber=297]="PageNumber",t[t.Predictor=317]="Predictor",t[t.PrimaryChromaticities=319]="PrimaryChromaticities",t[t.ReferenceBlackWhite=532]="ReferenceBlackWhite",t[t.SampleFormat=339]="SampleFormat",t[t.SMinSampleValue=340]="SMinSampleValue",t[t.SMaxSampleValue=341]="SMaxSampleValue",t[t.StripRowCounts=559]="StripRowCounts",t[t.SubIFDs=330]="SubIFDs",t[t.T4Options=292]="T4Options",t[t.T6Options=293]="T6Options",t[t.TileByteCounts=325]="TileByteCounts",t[t.TileHeight=323]="TileHeight",t[t.TileOffsets=324]="TileOffsets",t[t.TileWidth=322]="TileWidth",t[t.TransferFunction=301]="TransferFunction",t[t.WhitePoint=318]="WhitePoint",t[t.XClipPathUnits=344]="XClipPathUnits",t[t.XPosition=286]="XPosition",t[t.YCbCrCoefficients=529]="YCbCrCoefficients",t[t.YCbCrPositioning=531]="YCbCrPositioning",t[t.YCbCrSubSampling=530]="YCbCrSubSampling",t[t.YClipPathUnits=345]="YClipPathUnits",t[t.YPosition=287]="YPosition",t[t.ApertureValue=37378]="ApertureValue",t[t.ColorSpace=40961]="ColorSpace",t[t.DateTimeDigitized=36868]="DateTimeDigitized",t[t.DateTimeOriginal=36867]="DateTimeOriginal",t[t.ExifIFD=34665]="ExifIFD",t[t.ExifVersion=36864]="ExifVersion",t[t.ExposureTime=33434]="ExposureTime",t[t.FileSource=41728]="FileSource",t[t.Flash=37385]="Flash",t[t.FlashpixVersion=40960]="FlashpixVersion",t[t.FNumber=33437]="FNumber",t[t.ImageUniqueID=42016]="ImageUniqueID",t[t.LightSource=37384]="LightSource",t[t.MakerNote=37500]="MakerNote",t[t.ShutterSpeedValue=37377]="ShutterSpeedValue",t[t.UserComment=37510]="UserComment",t[t.IPTC=33723]="IPTC",t[t.ICCProfile=34675]="ICCProfile",t[t.XMP=700]="XMP",t[t.GDAL_METADATA=42112]="GDAL_METADATA",t[t.GDAL_NODATA=42113]="GDAL_NODATA",t[t.Photoshop=34377]="Photoshop",t[t.ModelPixelScale=33550]="ModelPixelScale",t[t.ModelTiePoint=33922]="ModelTiePoint",t[t.ModelTransformation=34264]="ModelTransformation",t[t.GeoKeyDirectory=34735]="GeoKeyDirectory",t[t.GeoDoubleParams=34736]="GeoDoubleParams",t[t.GeoAsciiParams=34737]="GeoAsciiParams"})(Ae||(Ae={}));var y1;(function(t){t[t.GTModelTypeGeoKey=1024]="GTModelTypeGeoKey",t[t.GTRasterTypeGeoKey=1025]="GTRasterTypeGeoKey",t[t.GTCitationGeoKey=1026]="GTCitationGeoKey",t[t.GeographicTypeGeoKey=2048]="GeographicTypeGeoKey",t[t.GeogCitationGeoKey=2049]="GeogCitationGeoKey",t[t.GeogGeodeticDatumGeoKey=2050]="GeogGeodeticDatumGeoKey",t[t.GeogPrimeMeridianGeoKey=2051]="GeogPrimeMeridianGeoKey",t[t.GeogLinearUnitsGeoKey=2052]="GeogLinearUnitsGeoKey",t[t.GeogLinearUnitSizeGeoKey=2053]="GeogLinearUnitSizeGeoKey",t[t.GeogAngularUnitsGeoKey=2054]="GeogAngularUnitsGeoKey",t[t.GeogAngularUnitSizeGeoKey=2055]="GeogAngularUnitSizeGeoKey",t[t.GeogEllipsoidGeoKey=2056]="GeogEllipsoidGeoKey",t[t.GeogSemiMajorAxisGeoKey=2057]="GeogSemiMajorAxisGeoKey",t[t.GeogSemiMinorAxisGeoKey=2058]="GeogSemiMinorAxisGeoKey",t[t.GeogInvFlatteningGeoKey=2059]="GeogInvFlatteningGeoKey",t[t.GeogAzimuthUnitsGeoKey=2060]="GeogAzimuthUnitsGeoKey",t[t.GeogPrimeMeridianLongGeoKey=2061]="GeogPrimeMeridianLongGeoKey",t[t.GeogTOWGS84GeoKey=2062]="GeogTOWGS84GeoKey",t[t.ProjectedCSTypeGeoKey=3072]="ProjectedCSTypeGeoKey",t[t.PCSCitationGeoKey=3073]="PCSCitationGeoKey",t[t.ProjectionGeoKey=3074]="ProjectionGeoKey",t[t.ProjCoordTransGeoKey=3075]="ProjCoordTransGeoKey",t[t.ProjLinearUnitsGeoKey=3076]="ProjLinearUnitsGeoKey",t[t.ProjLinearUnitSizeGeoKey=3077]="ProjLinearUnitSizeGeoKey",t[t.ProjStdParallel1GeoKey=3078]="ProjStdParallel1GeoKey",t[t.ProjStdParallel2GeoKey=3079]="ProjStdParallel2GeoKey",t[t.ProjNatOriginLongGeoKey=3080]="ProjNatOriginLongGeoKey",t[t.ProjNatOriginLatGeoKey=3081]="ProjNatOriginLatGeoKey",t[t.ProjFalseEastingGeoKey=3082]="ProjFalseEastingGeoKey",t[t.ProjFalseNorthingGeoKey=3083]="ProjFalseNorthingGeoKey",t[t.ProjFalseOriginLongGeoKey=3084]="ProjFalseOriginLongGeoKey",t[t.ProjFalseOriginLatGeoKey=3085]="ProjFalseOriginLatGeoKey",t[t.ProjFalseOriginEastingGeoKey=3086]="ProjFalseOriginEastingGeoKey",t[t.ProjFalseOriginNorthingGeoKey=3087]="ProjFalseOriginNorthingGeoKey",t[t.ProjCenterLongGeoKey=3088]="ProjCenterLongGeoKey",t[t.ProjCenterLatGeoKey=3089]="ProjCenterLatGeoKey",t[t.ProjCenterEastingGeoKey=3090]="ProjCenterEastingGeoKey",t[t.ProjCenterNorthingGeoKey=3091]="ProjCenterNorthingGeoKey",t[t.ProjScaleAtNatOriginGeoKey=3092]="ProjScaleAtNatOriginGeoKey",t[t.ProjScaleAtCenterGeoKey=3093]="ProjScaleAtCenterGeoKey",t[t.ProjAzimuthAngleGeoKey=3094]="ProjAzimuthAngleGeoKey",t[t.ProjStraightVertPoleLongGeoKey=3095]="ProjStraightVertPoleLongGeoKey",t[t.ProjRectifiedGridAngleGeoKey=3096]="ProjRectifiedGridAngleGeoKey",t[t.VerticalCSTypeGeoKey=4096]="VerticalCSTypeGeoKey",t[t.VerticalCitationGeoKey=4097]="VerticalCitationGeoKey",t[t.VerticalDatumGeoKey=4098]="VerticalDatumGeoKey",t[t.VerticalUnitsGeoKey=4099]="VerticalUnitsGeoKey"})(y1||(y1={}));var Qe;(function(t){t[t.BYTE=1]="BYTE",t[t.ASCII=2]="ASCII",t[t.SHORT=3]="SHORT",t[t.LONG=4]="LONG",t[t.RATIONAL=5]="RATIONAL",t[t.SBYTE=6]="SBYTE",t[t.UNDEFINED=7]="UNDEFINED",t[t.SSHORT=8]="SSHORT",t[t.SLONG=9]="SLONG",t[t.SRATIONAL=10]="SRATIONAL",t[t.FLOAT=11]="FLOAT",t[t.DOUBLE=12]="DOUBLE",t[t.LONG8=16]="LONG8",t[t.SLONG8=17]="SLONG8",t[t.IFD8=18]="IFD8"})(Qe||(Qe={}));var sE=ze(n2(),1);function oE(t){switch(t){case Qe.BYTE:case Qe.ASCII:case Qe.SBYTE:case Qe.UNDEFINED:return 1;case Qe.SHORT:case Qe.SSHORT:return 2;case Qe.LONG:case Qe.SLONG:case Qe.FLOAT:return 4;case Qe.RATIONAL:case Qe.SRATIONAL:case Qe.DOUBLE:case Qe.LONG8:case Qe.SLONG8:case Qe.IFD8:return 8;default:throw new Error(`Invalid fieldType ${t}`)}}var Ta={char:(t,e)=>String.fromCharCode(t.getUint8(e)),uint8:(t,e)=>t.getUint8(e),uint16:(t,e)=>t.getUint16(e),uint32:(t,e)=>t.getUint32(e),uint64:(t,e)=>t.getUint64(e),double:(t,e)=>sE.read(t.bytes(e,Ke.Double),0,t.isLittleEndian,52,8),rational:(t,e)=>[t.getUint32(e),t.getUint32(e+4)]};function Bd(t){switch(t){case Qe.ASCII:return Ta.char;case Qe.BYTE:case Qe.UNDEFINED:case Qe.SBYTE:return Ta.uint8;case Qe.SHORT:case Qe.SSHORT:return Ta.uint16;case Qe.LONG:case Qe.SLONG:return Ta.uint32;case Qe.RATIONAL:case Qe.SRATIONAL:return Ta.rational;case Qe.DOUBLE:return Ta.double;case Qe.LONG8:return Ta.uint64;default:throw new Error(`Unknown read type "${t}" "${Qe[t]}"`)}}var bo=class{constructor(e,r,i){this.tiff=r,this.byteOffset=i,this.id=e,this.name=Ae[this.id],this.dataType=this.tiff.source.getUint16(i+2),this.dataCount=this.tiff.source.getUint(i+4,this.tiff.ifdConfig.pointer),this.dataTypeSize=oE(this.dataType),this.dataLength=this.dataTypeSize*this.dataCount}get hasBytes(){return this.tiff.source.hasBytes(this.valuePointer,this.dataLength)}get isReady(){return!0}get dataTypeName(){return Qe[this.dataType]}get valuePointer(){let e=this.size-this.tiff.ifdConfig.pointer;return this.isValueInline?this.byteOffset+e:this.tiff.source.getUint(this.byteOffset+e,this.tiff.ifdConfig.pointer)}get size(){return this.tiff.ifdConfig.ifd}get isValueInline(){return this.dataLength<=this.tiff.ifdConfig.pointer}readValue(){let e=this.valuePointer,r=this.dataTypeSize,i=Bd(this.dataType),n=this.dataCount,s=n*r;if(n===1)return i(this.tiff.source,e);let o=[];for(let u=0;u<s;u+=r)o.push(i(this.tiff.source,e+u));return this.dataType===Qe.ASCII?o.join("").trim():o}toJSON(){return{id:this.id,name:this.name,offset:this.byteOffset,isReady:this.isReady,type:this.dataTypeName,value:this.value}}};var Na=class extends bo{constructor(){super(...arguments),this.value=null}get isReady(){return this.value!=null}async fetch(){return this.tiff.source.hasBytes(this.valuePointer,this.dataLength)===!1&&await this.tiff.source.loadBytes(this.valuePointer,this.dataLength),this.value=this.readValue(),this.value}};var g1=class extends bo{constructor(e,r,i){super(e,r,i),this.loadedValues=null}get value(){return this.loadedValues!=null?this.loadedValues:this.hasBytes?(this.readValue(),this.loadedValues):null}async load(){await this.tiff.source.loadBytes(this.valuePointer,this.dataLength),this.readValue()}readValue(){let e=super.readValue();return typeof e=="number"?this.loadedValues=[e]:this.loadedValues=e,this.loadedValues}async getValueAt(e){if(this.loadedValues)return this.loadedValues[e];let r=this.dataTypeSize,i=this.valuePointer+r*e,n=Bd(this.dataType);return this.tiff.source.hasBytes(i,r)||await this.tiff.source.loadBytes(i,r),n(this.tiff.source,i)}};var v1=class extends bo{constructor(){super(...arguments),this._isRead=!1,this._value=null}get value(){return this._isRead===!1&&(this._value=this.readValue(),this._isRead=!0),this._value}};var Dd={create(t,e){let r=t.source.getUint16(e);if(r===Ae.TileOffsets||r===Ae.TileByteCounts||r===Ae.StripByteCounts||r===Ae.StripOffsets)return new g1(r,t,e);let i=new v1(r,t,e);return i.hasBytes?i:new Na(r,t,e)},isStatic(t){return t instanceof v1},isLazy(t){return t instanceof Na},isOffsetArray(t){return t instanceof g1}};var pU=32767,qd=class{constructor(e,r,i){this.tagsGeoLoaded=!1,this.tagsGeo=new Map,this.tif=e,this.id=r,this.tags=i}async init(e=!1){let r=[this.fetch(Ae.Compression),this.fetch(Ae.ImageHeight),this.fetch(Ae.ImageWidth),this.fetch(Ae.ModelPixelScale),this.fetch(Ae.ModelTiePoint),this.fetch(Ae.ModelTransformation),this.fetch(Ae.TileHeight),this.fetch(Ae.TileWidth)];e&&(r.push(this.fetch(Ae.GeoKeyDirectory)),r.push(this.fetch(Ae.GeoAsciiParams)),r.push(this.fetch(Ae.GeoDoubleParams))),await Promise.all(r),e&&await this.loadGeoTiffTags()}value(e){let r=this.tags.get(e);return r==null?null:r.value}async loadGeoTiffTags(){if(this.tagsGeoLoaded)return;let e=this.tags.get(Ae.GeoKeyDirectory);if(e==null){this.tagsGeoLoaded=!0;return}if(!e.isReady&&e instanceof Na&&await Promise.all([this.fetch(Ae.GeoKeyDirectory),this.fetch(Ae.GeoAsciiParams),this.fetch(Ae.GeoDoubleParams)]),this.tagsGeoLoaded=!0,e.value==null)return;let r=e.value;if(!Array.isArray(r))throw new Error("Invalid geo tags found");for(let i=4;i<=r[3]*4;i+=4){let n=r[i],s=r[i+1],o=r[i+3];if(s===0){this.tagsGeo.set(n,o);continue}let u=this.tags.get(s);if(u==null||u.value==null)continue;let l=r[i+2];Array.isArray(u.value)?this.tagsGeo.set(n,u.value[o+l-1]):typeof u.value=="string"&&this.tagsGeo.set(n,u.value.substr(o,o+l-1).trim())}}valueGeo(e){if(this.tagsGeoLoaded===!1)throw new Error("loadGeoTiffTags() has not been called");return this.tagsGeo.get(e)}async fetch(e){let r=this.tags.get(e);return r==null?null:Dd.isLazy(r)?r.fetch():r.value}get origin(){let e=this.value(Ae.ModelTiePoint);if(e!=null&&e.length===6)return[e[3],e[4],e[5]];let r=this.value(Ae.ModelTransformation);if(r!=null)return[r[3],r[7],r[11]];if(this.value(Ae.NewSubFileType)===1&&this.id!==0)return this.tif.images[0].origin;throw new Error("Image does not have a geo transformation.")}get isGeoLocated(){return this.value(Ae.ModelPixelScale)!=null||this.value(Ae.ModelTransformation)!=null?!0:this.value(Ae.NewSubFileType)===1&&this.id!==0?this.tif.images[0].isGeoLocated:!1}get resolution(){let e=this.value(Ae.ModelPixelScale);if(e!=null)return[e[0],-e[1],e[2]];let r=this.value(Ae.ModelTransformation);if(r!=null)return[r[0],r[5],r[10]];if(this.value(Ae.NewSubFileType)===1&&this.id!==0){let i=this.tif.images[0],[n,s,o]=i.resolution,u=i.size,l=this.size;return[n*u.width/l.width,s*u.height/l.height,o]}throw new Error("Image does not have a geo transformation.")}get bbox(){let e=this.size,r=this.origin,i=this.resolution;if(r==null||e==null||i==null)throw new Error("Unable to calculate bounding box");let n=r[0],s=r[1],o=n+i[0]*e.width,u=s+i[1]*e.height;return[Math.min(n,o),Math.min(s,u),Math.max(n,o),Math.max(s,u)]}get compression(){let e=this.value(Ae.Compression);return e==null||typeof e!="number"?null:r2[e]}get epsg(){let e=this.valueGeo(y1.ProjectedCSTypeGeoKey);return e===pU?null:e}get size(){return{width:this.value(Ae.ImageWidth),height:this.value(Ae.ImageHeight)}}get tagList(){return[...this.tags.keys()].map(e=>Ae[e])}isTiled(){return this.value(Ae.TileWidth)!==null}get tileSize(){return{width:this.value(Ae.TileWidth),height:this.value(Ae.TileHeight)}}get tileCount(){let e=this.size,r=this.tileSize,i=Math.ceil(e.width/r.width),n=Math.ceil(e.height/r.height);return{x:i,y:n}}get tileOffset(){let e=this.tags.get(Ae.TileOffsets);if(e==null)throw new Error("No tile offsets found");return e}get stripCount(){let e=this.tags.get(Ae.StripByteCounts);return e==null?0:e.dataCount}async getTileOffset(e){let r=this.tileOffset;if(e<0||e>r.dataCount)throw new Error(`Tile offset: ${e} out of range: 0 -> ${r.dataCount}`);return r.getValueAt(e)}getTileBounds(e,r){let{size:i,tileSize:n}=this,s=r*n.height,o=e*n.width,u=o+n.width>=i.width?i.width-o:n.width,l=s+n.height>=i.height?i.height-s:n.height;return{x:o,y:s,width:u,height:l}}async getStrip(e){if(this.isTiled())throw new Error("Cannot read stripes, tiff is tiled");let r=this.tags.get(Ae.StripByteCounts),i=this.tags.get(Ae.StripOffsets);if(e>=r.dataCount)throw new Error("Cannot read strip, index out of bounds");let[n,s]=await Promise.all([i.getValueAt(e),r.getValueAt(e)]);return this.getBytes(n,s)}getJpegHeader(e){let r=this.value(Ae.JPEGTables);if(r==null)throw new Error("Unable to find Jpeg header");let i=r.slice(0,r.length-2),n=new Uint8Array(e.byteLength+i.length-2);return n.set(i,0),n.set(e.slice(2),i.length),n}async getBytes(e,r){let i=this.compression;if(i==null)throw new Error("Unsupported compression: "+this.value(Ae.Compression));if(r===0)return null;await this.tif.source.loadBytes(e,r);let n=this.tif.source.bytes(e,r);return this.compression===Nr.JPEG?{mimeType:i,bytes:this.getJpegHeader(n)}:{mimeType:i,bytes:n}}async getTile(e,r){let i=this.compression,n=this.size,s=this.tileSize;if(s==null)throw new Error("Tiff is not tiled");if(i==null)throw new Error("Unsupported compression: "+this.value(Ae.Compression));let o=Math.ceil(n.height/s.height),u=Math.ceil(n.width/s.width);if(e>=u||r>=o)throw new Error(`Tile index is outside of range x:${e} >= ${u} or y:${r} >= ${o}`);let l=r*u+e,d=u*o;if(l>=d)throw new Error(`Tile index is outside of tile range: ${l} >= ${d}`);let{offset:h,imageSize:m}=await this.getTileSize(l);return this.getBytes(h,m)}async hasTile(e,r){let i=this.tileSize,n=this.size;if(i==null)throw new Error("Tiff is not tiled");let s=Math.ceil(n.height/i.height),o=Math.ceil(n.width/i.width);if(e>=o||r>=s)return!1;let u=r*o+e;return(await this.getTileSize(u)).offset>0}async getTileSize(e){let r=this.tif.options.tileLeaderByteSize;if(r){let o=await this.getTileOffset(e);return o===0?{offset:0,imageSize:0}:(await this.tif.source.loadBytes(o-r,r),{offset:o,imageSize:this.tif.source.getUint(o-r,r)})}let i=this.tags.get(Ae.TileByteCounts);if(i==null)throw new Error("No tile byte counts found");let[n,s]=await Promise.all([this.getTileOffset(e),i.getValueAt(e)]);return{offset:n,imageSize:s}}};var b1;(function(t){t[t.Big=19789]="Big",t[t.Little=18761]="Little"})(b1||(b1={}));var Ki;(function(t){t[t.BigTiff=43]="BigTiff",t[t.Tiff=42]="Tiff"})(Ki||(Ki={}));var vl;(function(t){t.GDAL_STRUCTURAL_METADATA_SIZE="GDAL_STRUCTURAL_METADATA_SIZE",t.LAYOUT="LAYOUT",t.BLOCK_ORDER="BLOCK_ORDER",t.BLOCK_LEADER="BLOCK_LEADER",t.BLOCK_TRAILER="BLOCK_TRAILER",t.KNOWN_INCOMPATIBLE_EDITION="KNOWN_INCOMPATIBLE_EDITION",t.MASK_INTERLEAVED_WITH_IMAGERY="MASK_INTERLEAVED_WITH_IMAGERY"})(vl||(vl={}));var aE;(function(t){t.RowMajor="ROW_MAJOR"})(aE||(aE={}));var s2;(function(t){t.uint32="SIZE_AS_UINT4"})(s2||(s2={}));var zd=class{constructor(){this.options=new Map}get isCogOptimized(){return this.isBroken?!1:this.options.get(vl.LAYOUT)==="IFDS_BEFORE_DATA"}get isBroken(){return this.options.get(vl.KNOWN_INCOMPATIBLE_EDITION)==="YES"}process(e){let r="",i="",n=!1;for(let s=0;s<e.length;s++){let o=e[s];if(o===0)break;let u=String.fromCharCode(o);u===`
|
|
215
|
-
`?(this.options.set(r.trim(),i.trim()),r="",i="",n=!1):u==="="?n=!0:n?i+=u:r+=u}}get tileLeaderByteSize(){switch(this.options.get(vl.BLOCK_LEADER)){case s2.uint32:return Ke.UInt32;default:return null}}get isMaskInterleaved(){return this.options.get(vl.MASK_INTERLEAVED_WITH_IMAGERY)==="YES"}};var o2={version:Ki.Tiff,pointer:Ke.UInt32,offset:Ke.UInt16,ifd:Ke.UInt16+Ke.UInt16+2*Ke.UInt32},a2={version:Ki.BigTiff,pointer:Ke.UInt64,offset:Ke.UInt64,ifd:Ke.UInt16+Ke.UInt16+2*Ke.UInt64},Gre={[Ki.BigTiff]:a2,[Ki.Tiff]:o2};var u2=ze(n2(),1),Fd=class{constructor(e,r=0){this.tiff=e,this.byteOffset=r,this.relativeOffset=0}get currentOffset(){return this.byteOffset+this.relativeOffset}seekTo(e){return this.byteOffset=e,this.relativeOffset=0,this}seek(e){let r=this.currentOffset;return this.relativeOffset+=e,r}bytes(e){return this.tiff.source.bytes(this.seek(e),e)}uint(e){return this.tiff.source.getUint(this.seek(e),e)}uint8(){return this.tiff.source.getUint8(this.seek(Ke.UInt8))}uint16(){return this.tiff.source.getUint16(this.seek(Ke.UInt16))}uint32(){return this.tiff.source.getUint32(this.seek(Ke.UInt32))}uint64(){return this.tiff.source.getUint64(this.seek(Ke.UInt64))}pointer(){let e=this.tiff.ifdConfig.pointer;return this.tiff.source.getUint(this.seek(e),e)}offset(){let e=this.tiff.ifdConfig.offset;return this.tiff.source.getUint(this.seek(e),e)}float(){return u2.read(this.bytes(Ke.Float),0,this.tiff.source.isLittleEndian,23,4)}double(){return u2.read(this.bytes(Ke.Double),0,this.tiff.source.isLittleEndian,52,8)}};function uE(t,e=4,r=!0){let i=t.toString(16).padStart(e,"0");return r?"0x"+i:i}var bl=class{constructor(e){this.version=Ki.Tiff,this.images=[],this.options=new zd,this.ifdConfig=o2,this.isInitialized=!1,this.source=e,this.cursor=new Fd(this)}static create(e){return new bl(e).init()}init(e=!1){return this._initPromise?this._initPromise:(this._initPromise=this.doInit(e),this._initPromise)}async doInit(e=!1){return this.isInitialized?this:(await this.source.loadBytes(0,this.source.chunkSize),await this.fetchIfd(),await Promise.all(this.images.map(r=>r.init(e))),this.isInitialized=!0,this)}async fetchIfd(){let e=this.cursor.seekTo(0),r=e.uint16();if(this.source.isLittleEndian=r===b1.Little,!this.source.isLittleEndian)throw new Error("Only little endian is supported");this.version=e.uint16();let i;if(this.version===Ki.BigTiff){if(this.ifdConfig=a2,e.uint16()!==8)throw new Error("Only 8byte pointers are supported");if(e.uint16()!==0)throw new Error("Invalid big tiff header");i=e.pointer()}else if(this.version===Ki.Tiff)i=e.pointer();else throw new Error(`Only tiff supported version:${this.version}`);let n=i-this.cursor.currentOffset;return n>0&&n<16*1024&&this.options.process(e.bytes(n)),this.processIfd(i)}getImage(e){return this.images[e]}getImageByResolution(e){let r=this.images[0],i=r.size,[n]=r.resolution,s=n*i.width;for(let o=this.images.length-1;o>0;o--){let u=this.images[o],l=u.size;if(s/l.width-e<=.01)return u}return r}async getTile(e,r,i){let n=this.getImage(i);if(n==null)throw new Error(`Missing z: ${i}`);if(!n.isTiled())throw new Error("Tif is not tiled");return n.getTile(e,r)}async processIfd(e){let{image:r,nextOffset:i}=await this.readIfd(e);this.images.push(r),i&&await this.processIfd(i)}async readIfd(e){this.source.hasBytes(e,4096)||await this.source.loadBytes(e,4096);let i=this.cursor.seekTo(e).offset(),n=e+this.ifdConfig.offset,s=new Map,o=n;for(let d=0;d<i;d++){let h=Dd.create(this,o);if(o+=h.size,h.name==null)throw new Error("Unknown IFD Tag: "+uE(h.id));s.set(h.id,h)}let u=new qd(this,this.images.length,s);return{nextOffset:this.source.getUint(o,this.ifdConfig.pointer),image:u}}async close(){var e,r;await((r=(e=this.source)===null||e===void 0?void 0:e.close)===null||r===void 0?void 0:r.call(e))}};var l2=class{constructor(){this.requests=[]}reset(){this.requests=[]}trace(e){let r=e.fetchBytes;e.fetchBytes=async(i,n)=>{let s={source:e.uri,offset:i,length:n},o=os(`${s.source}:${s.offset}:${s.length}`);s.id=o,this.requests.push(s);let u=Date.now(),l=await r.apply(e,[i,n]);return s.duration=Date.now()-u,l}}},So=new l2;var Ud=class{constructor(e){this.ob=e,this.ob._value==null&&this.ob.value.then(r=>this.ob._value=r)}get size(){let e=this.ob._value;return e==null?0:e.source.chunkSize*e.source.chunks.size}},c2=class{constructor(e){this.cache=new ml(e)}getCog(e){let r=this.cache.get(e)?.ob;if(r!=null){if(r.type==="cog")return r.value;throw new Error(`Existing object of type: ${r.type} made for location: ${e}`)}let i=rr.source(e);So.trace(i);let n=bl.create(i);return this.cache.set(e,new Ud({type:"cog",value:n})),n}getCotar(e){let r=this.cache.get(e)?.ob;if(r!=null){if(r.type==="cotar")return r.value;throw new Error(`Existing object of type: ${r.type} made for location: ${e}`)}let i=rr.source(e);So.trace(i);let n=lo.fromTar(i);return this.cache.set(e,new Ud({type:"cotar",value:n})),n}},Ar=new c2(700*1e3*1e3);function Sl(t){return t[0]===31&&t[1]===139}var f2=class{async get(e,r){if(e.endsWith(".tar.co"))return await this.getFromCotar(e,r);try{let i=gr.join(e,r);return await gr.read(i)}catch(i){if(i.code===404)return null;throw i}}async getFromCotar(e,r){let n=await(await Ar.getCotar(e)).get(r);return n&&Buffer.from(n)}async serve(e,r,i){let n=await at.load(e);if(n==null)return ke();if(n.assets==null)return ke();let s=await xl.get(n.assets,r);if(s==null)return ke();let o=ot.key(s);if(ot.isNotModified(e,o))return $t();let u=ae.ok().buffer(s,i);return u.header(Se.ETag,o),u.header(Se.CacheControl,"public, max-age=604800, stale-while-revalidate=86400"),Sl(s)&&u.header(Se.ContentEncoding,"gzip"),u}},xl=new f2;async function lE(t){let e=h2.default.join("fonts",t.params.fontStack,t.params.range)+".pbf";return xl.serve(t,e,"application/x-protobuf")}async function cE(t){return xl.serve(t,h2.default.join("fonts","fonts.json"),"application/json")}var v2=ze(require("fs"),1),Vd=ze(require("path"),1),bE=ze(gE(),1),b2=ze(require("sharp"),1),SE=ze(require("url"),1);var Gd=ze(require("sharp"),1);var Hd=class{constructor(){this.timers=new Map,typeof performance<"u"?this.getTime=()=>performance.now():this.getTime=()=>Date.now()}start(e){let r=this.timers.get(e);if(r!=null&&r.duration==null)throw new Error(`Duplicate startTime for "${e}"`);this.timers.set(e,{start:this.getTime()})}end(e){let r=this.timers.get(e);if(r==null)throw new Error(`Missing startTime information for "${e}"`);let i=this.getTime()-r.start;return r.duration=i,i}get metrics(){if(this.timers.size===0)return;let e={};for(let[r,i]of this.timers.entries())i.duration!=null&&(e[r]=i.duration);return e}get unfinished(){let e=[];for(let[r,i]of this.timers.entries())i.duration==null&&e.push(r);if(e.length!==0)return e}};function gU(t){return t!=null}var Wd=new Map,xo=class{constructor(e){this.tileSize=e}isTooLarge(e){return e.type==="cotar"?!1:!!(e.resize&&(e.resize.width>=xo.MaxImageSize||e.resize.height>=xo.MaxImageSize))}getEmptyImage(e,r){let i=[e,r.r,r.g,r.b,r.alpha].join("-"),n=Wd.get(i);return n||(n=this.toImage(e,this.createImage(r)),Wd.size>128&&Wd.clear(),Wd.set(i,n),n)}toImage(e,r){switch(e){case nt.Jpeg:return r.jpeg().toBuffer();case nt.Png:return r.png().toBuffer();case nt.Webp:return r.webp().toBuffer();case nt.Avif:return r.avif().toBuffer();default:throw new Error(`Invalid image format "${e}"`)}}async getImageBuffer(e,r,i){return e.length===0?this.getEmptyImage(r,i):this.toImage(r,this.createImage(i).composite(e))}isDirectCotar(e){return!(e.layers.length!==1||e.layers[0].type!=="cotar"||this.tileSize!==256||e.format!==nt.Webp||e.background.alpha!==0)}isDirectImage(e){var r;if(e.layers.length!==1)return!1;let i=e.layers[0];if(i.type!=="tiff"||i.x!==0||i.y!==0||i.crop!=null||i.extract!=null||i.resize!=null)return!1;let n=i.asset.getImage(i.source.imageId),s=n.tileSize;return!(s.height!==this.tileSize||s.width!==this.tileSize||!(!((r=n.compression)===null||r===void 0)&&r.includes(e.format))||e.background.alpha!==0)}async compose(e){var r;let i=(r=e.metrics)!==null&&r!==void 0?r:new Hd;if(i.start("compose:overlay"),this.isDirectCotar(e)){let u=e.layers[0],l=await u.asset.get(u.path);return l==null?{buffer:await this.getEmptyImage(e.format,e.background),metrics:i,layers:0}:(i.start("compose:direct"),i.end("compose:direct"),{buffer:Buffer.from(l),metrics:i,layers:1})}if(this.isDirectImage(e)){let u=e.layers[0],l=await u.asset.getTile(u.source.x,u.source.y,u.source.imageId);return i.end("compose:overlay"),l==null?{buffer:await this.getEmptyImage(e.format,e.background),metrics:i,layers:0}:(i.start("compose:direct"),i.end("compose:direct"),{buffer:Buffer.from(l.bytes),metrics:i,layers:1})}let n=[];for(let u of e.layers)this.isTooLarge(u)||n.push(this.composeTile(u,e.resizeKernel));let s=await Promise.all(n).then(u=>u.filter(gU));i.end("compose:overlay"),i.start("compose:compress");let o=await this.getImageBuffer(s,e.format,e.background);return i.end("compose:compress"),{buffer:o,metrics:i,layers:s.length}}async composeTile(e,r){if(e.type==="tiff")return this.composeTileTiff(e,r);if(e.type==="cotar")return this.composeTileTar(e);throw new Error("Failed to compose tile from source")}async composeTileTar(e){let r=await e.asset.get(e.path);return r==null?null:{input:Buffer.from(r),top:0,left:0}}async composeTileTiff(e,r){let i=await e.asset.getTile(e.source.x,e.source.y,e.source.imageId);if(i==null)return null;let n=(0,Gd.default)(Buffer.from(i.bytes)),{extract:s,resize:o,crop:u}=e;if(s&&n.extract({top:0,left:0,width:s.width,height:s.height}),o){let l={fit:Gd.default.fit.cover,kernel:o.scaleX>1?r.in:r.out};n.resize(o.width,o.height,l)}return u&&n.extract({top:u.y,left:u.x,width:u.width,height:u.height}),{input:await n.toBuffer(),top:e.y,left:e.x}}createImage(e){return(0,Gd.default)({create:{width:this.tileSize,height:this.tileSize,channels:4,background:e}})}};xo.MaxImageSize=256*2**15;var y2=class{constructor(e){$p(this,"value");$p(this,"next");this.value=e}},qn,Ma,ka,S1=class{constructor(){fr(this,qn,void 0);fr(this,Ma,void 0);fr(this,ka,void 0);this.clear()}enqueue(e){let r=new y2(e);Ye(this,qn)?(Ye(this,Ma).next=r,kt(this,Ma,r)):(kt(this,qn,r),kt(this,Ma,r)),Xp(this,ka)._++}dequeue(){let e=Ye(this,qn);if(!!e)return kt(this,qn,Ye(this,qn).next),Xp(this,ka)._--,e.value}clear(){kt(this,qn,void 0),kt(this,Ma,void 0),kt(this,ka,0)}get size(){return Ye(this,ka)}*[Symbol.iterator](){let e=Ye(this,qn);for(;e;)yield e.value,e=e.next}};qn=new WeakMap,Ma=new WeakMap,ka=new WeakMap;function g2(t){if(!((Number.isInteger(t)||t===Number.POSITIVE_INFINITY)&&t>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new S1,r=0,i=()=>{r--,e.size>0&&e.dequeue()()},n=async(u,l,d)=>{r++;let h=(async()=>u(...d))();l(h);try{await h}catch{}i()},s=(u,l,d)=>{e.enqueue(n.bind(void 0,u,l,d)),(async()=>(await Promise.resolve(),r<t&&e.size>0&&e.dequeue()()))()},o=(u,...l)=>new Promise(d=>{s(u,d,l)});return Object.defineProperties(o,{activeCount:{get:()=>r},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),o}var vU=g2(Nt.getNumber(Nt.TiffConcurrency,25));function bU(t){let e=t.toLowerCase();return e.endsWith(".tif")||e.endsWith(".tiff")?t:`${t}.tiff`}var SU=new xo(256),xU={in:"lanczos3",out:"lanczos3"},wU={r:0,g:0,b:0,alpha:0},Kd={async getAssetsForTile(t,e,r){let i=await at.load(t),n=await Qo(i,e.layers,[r.tileMatrix.projection]),s=gl(t,e.layers),o=[],u=r.tileMatrix.tileToSourceBounds(r.tile),l=Er.convertZoomLevel(r.tile.z,r.tileMatrix,yi.get(Ue.Google));for(let d of s){if(d.disabled||d.maxZoom!=null&&l>d.maxZoom||d.minZoom!=null&&l<d.minZoom)continue;let h=d[r.tileMatrix.projection.code];if(h==null){t.log.warn({layer:d.name,projection:r.tileMatrix.projection.code},"Failed to lookup imagery");continue}let m=n.get(h);if(m==null){t.log.warn({layer:d.name,projection:r.tileMatrix.projection.code,imgId:h},"Failed to lookup imagery");continue}if(!!u.intersects($e.fromJson(m.bounds)))for(let b of m.files){if(!u.intersects($e.fromJson(b)))continue;if(m.overviews&&m.overviews.maxZoom>=l&&m.overviews.minZoom<=l){o.push(rr.join(m.uri,m.overviews.path));break}let S=rr.join(m.uri,bU(b.name));o.push(S)}}return o},async tile(t,e,r){if(r.tileType===gi.MapboxVectorTiles)return ke();let i=await this.getAssetsForTile(t,e,r),n=ot.key(i);if(ot.isNotModified(t,n))return $t();let s=[];for(let m of i)s.push(vU(()=>m.endsWith(".tar.co")?Ar.getCotar(m).catch(b=>(t.log.warn({error:b,tiff:m},"Load:Cotar:Failed"),null)):Ar.getCog(m).catch(b=>(t.log.warn({error:b,tiff:m},"Load:Tiff:Failed"),null))));let o=(await Promise.all(s)).filter(m=>m!=null),l=await new pl(r.tileMatrix).tile(o,r.tile.x,r.tile.y,r.tile.z),d=await SU.compose({layers:l,format:r.tileType,background:e.background??wU,resizeKernel:e.resizeKernel??xU,metrics:t.timer});t.set("layersUsed",d.layers),t.set("bytes",d.buffer.byteLength);let h=new ae(200,"ok");return h.header(Se.ETag,n),h.header(Se.CacheControl,"public, max-age=604800, stale-while-revalidate=86400"),h.buffer(d.buffer,"image/"+r.tileType),h}};var CU={},EU=[{tileSet:"health",tileMatrix:it,tileType:nt.Png,tile:{x:252,y:156,z:8}},{tileSet:"health",tileMatrix:no,tileType:nt.Png,tile:{x:30,y:33,z:6}}],vE=256;async function _U(t){if(Buffer.isBuffer(t.buf))return t.buf;let e=t.tile,r=`static/expected_tile_${t.tileMatrix.identifier}_${e.x}_${e.y}_z${e.z}.${t.tileType}`;try{return await v2.promises.readFile(r)}catch(i){if(i.code!=="ENOENT")throw i;let n=Vd.join(Vd.dirname(SE.default.fileURLToPath(CU.url)),"..","..",r);return await v2.promises.readFile(n)}}async function S2(t){let e=await at.load(t),r=await e.TileSet.get(e.TileSet.id("health"));if(r==null)throw new ae(500,'TileSet: "health" not found');for(let n of EU){let s=await Kd.tile(t,r,n);if(s.status!==200)return new ae(500,s.statusDescription);if(!Buffer.isBuffer(s._body))throw new ae(500,"Not a Buffer response content.");let o=await(0,b2.default)(s._body).raw().toBuffer(),u=await _U(n);n.buf=u;let l=await(0,b2.default)(u).raw().toBuffer(),d=Buffer.alloc(l.length),h=(0,bE.default)(l,o,d,vE,vE);if(h)return t.log.error({missMatchedPixels:h,projection:n.tileMatrix.identifier,xyz:n.tile},"Health:MissMatch"),new ae(500,"TileSet does not match.")}let i=new ae(200,"ok");return i.header(Se.CacheControl,"no-store"),i}var xE=require("util"),wE=require("zlib");var RU=(0,xE.promisify)(wE.gzip);function TU(t){return t==null?!1:!!(t.endsWith(".geojson")||t.endsWith(".json"))}async function EE(t){let e=t.params.fileName;if(!TU(e))return ke();let r=await at.load(t),i=await r.Imagery.get(r.Imagery.id(t.params.imageryId));if(i==null)return ke();let n=rr.join(i.uri,e);try{let s=await rr.read(n),o=ot.key(s);if(ot.isNotModified(t,o))return $t();let u=new ae(200,"ok");return u.header(Se.ETag,o),u.header(Se.ContentEncoding,"gzip"),u.header(Se.CacheControl,"public, max-age=604800, stale-while-revalidate=86400"),u.buffer(Sl(s)?s:await RU(s),"application/json"),t.set("bytes",s.byteLength),u}catch{return t.log.warn({targetPath:n},"ImageryMetadata:Failed"),ke()}}var _E=new ae(200,"ok");_E.header(Se.CacheControl,"no-store");async function x2(){return _E}var CE=ze(require("path"),1);var w2=new Map;w2.set(".png","image/png");w2.set(".json","application/json");async function RE(t){let e=CE.default.extname(t.params.spriteName),r=w2.get(e);if(r==null)return ke();let i=gr.join("sprites",t.params.spriteName);return xl.serve(t,i,r)}async function TE(t){let e=Xt.getTileMatrixSet(t.params.tileMatrix);if(e==null)return ke();let r=Xt.apiKey(t),i=await at.load(t);t.timer.start("tileset:load");let n=await i.TileSet.get(i.TileSet.id(t.params.tileSet));if(t.timer.end("tileset:load"),n==null)return ke();let s=Xt.getRequestedFormats(t)??[n.format],o=Nt.get(Nt.PublicUrlBase)??"",u=at.extract(t),l=xa({api:r,config:u,...yl(t)}),h={tiles:[[o,"v1","tiles",n.name,e.identifier,"{z}","{x}","{y}"].join("/")+`.${s[0]}${l}`],tilejson:"3.0.0"},m=Er.convertZoomLevel(n.maxZoom??30,it,e,!0),b=Er.convertZoomLevel(n.minZoom??0,it,e,!0);n.maxZoom&&(h.maxzoom=m),n.minZoom&&(h.minzoom=b);let S=JSON.stringify(h),y=Buffer.from(S),v=new ae(200,"ok");return v.header(Se.CacheControl,"no-store"),v.buffer(y,"application/json"),t.set("bytes",y.byteLength),v}var IE=require("crypto");var NU={xmlns:"http://www.opengis.net/wmts/1.0","xmlns:ows":"http://www.opengis.net/ows/1.1","xmlns:xlink":"http://www.w3.org/1999/xlink","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance","xmlns:gml":"http://www.opengis.net/gml","xsi:schemaLocation":"http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd",version:"1.0.0"};function NE(t,e){return Dr.get(t).boundsToWgs84BoundingBox(e)}var AE=6,ME=4;function kE(t,e){return Number(t.toFixed(e)).toString()}function $d(t,e,r){return`${kE(t,r)} ${kE(e,r)}`}var E2=class{constructor(e){this.imagery=new Map;this.formats=[];this.tileMatrixSets=new Map;this.httpBase=e.httpBase,this.apiKey=e.apiKey,this.config=e.config,this.filters=e.filters}addImagery(...e){for(let r of e)this.imagery.set(r.id,r)}addTileMatrix(...e){for(let r of e)this.tileMatrixSets.set(r.identifier,r)}addFormats(...e){for(let r of e)this.formats.push(r)}getFormats(){return this.formats.length?this.formats:X7}getMatrixSets(e){let r=new Set;for(let i of this.tileMatrixSets.values())e.layers.find(n=>n[i.projection.code]!=null)&&r.add(i);return r}buildKeywords(e){return e.category==null?de("ows:Keywords"):de("ows:Keywords",[de("ows:Keyword",e.category)])}buildWgs84BoundingBox(e,r){let i;if(r.length>0){let n=r[0];for(let s=1;s<r.length;s++)n=n.union(r[s]);i=NE(e,n.toJson())}else i=NE(e,e.extent);return i[2]<i[0]&&(i[0]=-180,i[2]=180),de("ows:WGS84BoundingBox",{crs:"urn:ogc:def:crs:OGC:2:84"},[de("ows:LowerCorner",$d(i[0],i[1],AE)),de("ows:UpperCorner",$d(i[2],i[3],AE))])}buildBoundingBoxFromImagery(e,r){let i;for(let s of r){let o=s[e.projection.code];if(o==null)continue;let u=this.imagery.get(o);u!=null&&(i==null?i=$e.fromJson(u.bounds):i=i.union($e.fromJson(u.bounds)))}if(i==null)return null;let n=i.toBbox();return de("ows:BoundingBox",{crs:e.projection.toUrn()},[de("ows:LowerCorner",$d(n[e.indexX],n[e.indexY],ME)),de("ows:UpperCorner",$d(n[e.indexX+2],n[e.indexY+2],ME))])}buildStyle(){return de("Style",{isDefault:"true"},[de("ows:Title","Default Style"),de("ows:Identifier","default")])}buildResourceUrl(e,r,i=!1){return de("ResourceURL",{format:"image/"+r,resourceType:"tile",template:this.buildTileUrl(e,r,i)})}buildTileUrl(e,r,i=!1){let n={api:this.apiKey,config:this.config};return i&&(n={api:this.apiKey,config:this.config,...this.filters}),[this.httpBase,"v1","tiles",e,"{TileMatrixSet}","{TileMatrix}","{TileCol}",`{TileRow}.${r}${xa(n)}`].join("/")}buildFormats(){return this.getFormats().map(e=>de("Format","image/"+e))}buildTileMatrixLink(e){let r=[];for(let i of this.tileMatrixSets.values())e.layers.find(n=>n[i.projection.code]!=null)&&r.push(de("TileMatrixSetLink",[de("TileMatrixSet",i.identifier)]));return r}buildLayerFromImagery(e){let r=new Set,i=[];for(let l of this.tileMatrixSets.values()){let d=e[l.projection.code];d==null||this.imagery.get(d)==null||(i.push(de("TileMatrixSetLink",[de("TileMatrixSet",l.identifier)])),r.add(l))}let n=Mn(e.name),s=[...r.values()],o=s[0];if(o==null)return null;let u=this.imagery.get(e[o.projection.code]??"");return u==null?null:de("Layer",[de("ows:Title",e.title),de("ows:Abstract",""),de("ows:Identifier",n),this.buildKeywords(u),...s.map(l=>this.buildBoundingBoxFromImagery(l,[e])),this.buildWgs84BoundingBox(o,[$e.fromJson(u.bounds)]),this.buildStyle(),...this.getFormats().map(l=>de("Format","image/"+l)),...i,...this.getFormats().map(l=>this.buildResourceUrl(n,l))])}},Xd=class extends E2{constructor(r){super(r);this.minZoom=0;this.maxZoom=32}addTileSet(r){this.tileSet=r}addLayers(r){this.configLayers=r}addProvider(r){this.provider=r}toProviderVNode(r){if(r==null)return[];let{serviceIdentification:i,serviceProvider:n}=r,{contact:s}=n;return[de("ows:ServiceIdentification",[de("ows:Title",i.title),de("ows:Abstract",i.description),de("ows:ServiceType","OGC WMTS"),de("ows:ServiceTypeVersion","1.0.0"),de("ows:Fees",i.fees),de("ows:AccessConstraints",i.accessConstraints)]),de("ows:ServiceProvider",[de("ows:ProviderName",n.name),de("ows:ProviderSite",{"xlink:href":n.site}),de("ows:ServiceContact",[de("ows:IndividualName",s.individualName),de("ows:PositionName",s.position),de("ows:ContactInfo",[de("ows:Phone",[de("ows:Voice",s.phone)]),de("ows:Address",[de("ows:DeliveryPoint",s.address.deliveryPoint),de("ows:City",s.address.city),de("ows:PostalCode",s.address.postalCode),de("ows:Country",s.address.country),de("ows:ElectronicMailAddress",s.address.email)])])])])]}toLayerVNode(r){let i=this.getMatrixSets(r),n=[...i.values()],s=n[0];if(s==null)throw new Error("No matrix sets found for layer "+r.name);let o=n.find(d=>d.identifier===it.identifier)??s,u=[];for(let d of r.layers){let h=this.imagery.get(d[o.projection.code]??"");h!=null&&u.push($e.fromJson(h.bounds))}let l=Mn(r.name);return de("Layer",[de("ows:Title",r.title),de("ows:Abstract",r.description??""),de("ows:Identifier",l),this.buildKeywords(r),...[...i.values()].map(d=>this.buildBoundingBoxFromImagery(d,r.layers)),this.buildWgs84BoundingBox(o,u),this.buildStyle(),...this.buildFormats(),...this.buildTileMatrixLink(r),...this.getFormats().map(d=>this.buildResourceUrl(l,d,!0))])}toAllImageryLayersVNode(r){if(r==null)return[];let i=[],n=new Map;for(let o of r)n.set(Mn(o.name),o);let s=Array.from(n.values()).sort((o,u)=>(o.title??o.name).localeCompare(u.title??u.name));for(let o of s){let u=this.buildLayerFromImagery(o);u&&i.push(u)}return i}buildTileMatrixSet(r){return de("TileMatrixSet",[de("ows:Title",r.def.title),r.def.abstract?de("ows:Abstract",r.def.abstract):null,de("ows:Identifier",r.identifier),de("ows:SupportedCRS",r.projection.toUrn()),r.def.wellKnownScaleSet?de("WellKnownScaleSet",r.def.wellKnownScaleSet):null,...r.def.tileMatrix.slice(this.minZoom,this.maxZoom+1).map(i=>de("TileMatrix",[de("ows:Identifier",i.identifier),de("ScaleDenominator",i.scaleDenominator),de("TopLeftCorner",i.topLeftCorner.join(" ")),de("TileWidth",i.tileWidth),de("TileHeight",i.tileHeight),de("MatrixWidth",i.matrixWidth),de("MatrixHeight",i.matrixHeight)]))])}toVNode(){let r=this.toProviderVNode(this.provider),i=[];i.push(this.toLayerVNode(this.tileSet));let n=i.concat(this.toAllImageryLayersVNode(this.configLayers));for(let s of this.tileMatrixSets.values())n.push(this.buildTileMatrixSet(s));return de("Capabilities",NU,[...r,de("Contents",n)])}toXml(){return`<?xml version="1.0" encoding="utf-8"?>
|
|
216
|
-
`+this.toVNode().toString()}fromParams(r){for(let i of r.tileMatrix)this.addTileMatrix(i);for(let i of r.imagery.values())this.addImagery(i);for(let i of r.formats)this.addFormats(i);this.addTileSet(r.tileSet),this.addLayers(r.layers),this.addProvider(r.provider)}};function AU(t){if(t==null)return[it,no];let e=Xt.getTileMatrixSet(t);return e==null?null:[e]}async function Jd(t){let e=Xt.apiKey(t),r=t.params.tileSet??"aerial",i=AU(t.params.tileMatrix);if(i==null)return ke();let n=Nt.get(Nt.PublicUrlBase)??"",s=await at.load(t);t.timer.start("tileset:load");let o=await s.TileSet.get(s.TileSet.id(r??"aerial"));if(t.timer.end("tileset:load"),o==null||o.type!==Dt.Raster)return ke();let u=await s.Provider.get(s.Provider.id("linz"));t.timer.start("imagery:load");let l=await Qo(s,o.layers,i.map(y=>y.projection));t.timer.end("imagery:load");let d=new Xd({httpBase:n,apiKey:e,config:at.extract(t),filters:yl(t)});d.fromParams({provider:u??void 0,tileSet:o,tileMatrix:i,imagery:l,formats:Xt.getRequestedFormats(t)??[],layers:t.params.tileMatrix==null?gl(t,o.layers):void 0});let h=d.toXml();if(h==null)return ke();let m=Buffer.from(h),b=(0,IE.createHash)("sha256").update(m).digest("base64");if(ot.isNotModified(t,b))return $t();let S=new ae(200,"ok");return S.header(Se.ETag,b),S.header(Se.CacheControl,"no-store"),S.buffer(m,"text/xml"),t.set("bytes",m.byteLength),S}var PE={async tile(t,e,r){if(r.tileType!==gi.MapboxVectorTiles)return ke();if(r.tileMatrix.identifier!==it.identifier)return ke();if(e.layers.length>1)return new ae(500,"Too many layers in tileset");let[i]=e.layers,n=i[3857];if(n==null)return new ae(500,"Layer url not found from tileset Config");let s=(1<<r.tile.z)-1-r.tile.y,o=`tiles/${r.tile.z}/${r.tile.x}/${s}.pbf.gz`,u=`${n}#${o}`,l=ot.key(u);if(ot.isNotModified(t,l))return $t();t.timer.start("cotar:load");let d=await Ar.getCotar(n);if(d==null)return new ae(500,"Failed to load VectorTiles");t.timer.end("cotar:load"),t.timer.start("cotar:tile");let h=await d.get(o);if(h==null)return K7();t.timer.end("cotar:tile");let m=Buffer.from(h),b=ae.ok().buffer(m,"application/x-protobuf");return b.header(Se.ETag,l),b.header(Se.CacheControl,"public, max-age=604800, stale-while-revalidate=86400"),Sl(m)&&b.header(Se.ContentEncoding,"gzip"),b}};async function LE(t){let e=Xt.xyz(t),r=await at.load(t);t.timer.start("tileset:load");let i=await r.TileSet.get(r.TileSet.id(e.tileSet));if(t.timer.end("tileset:load"),i==null)return ke();switch(i.type){case Dt.Vector:return PE.tile(t,i,e);case Dt.Raster:return Kd.tile(t,i,e);default:return new ae(400,"Invalid tileset")}}async function _2(){let t=new ae(200,"ok");return t.header(Se.CacheControl,"no-store"),t.json({version:"v6.41.0",hash:"a466cbcc9859b1585e6ca32894615b3eb6ad04b0"}),t}var ft=Hr.http(vu.get());ft.router.timeoutEarlyMs=1e3;ft.router.hook("request",t=>{t.set("name","LambdaTiler"),So.reset()});ft.router.hook("response",(t,e)=>{So.requests.length>0&&(t.set("requests",So.requests.slice(0,100)),t.set("requestCount",So.requests.length)),t.set("sources",{hits:Ar.cache.hits,misses:Ar.cache.misses,size:Ar.cache.currentSize,resets:Ar.cache.resets,clears:Ar.cache.clears,cacheA:Ar.cache.cacheA.size,cacheB:Ar.cache.cacheB.size}),e.header("access-control-allow-origin","*")});ft.router.options("*",t=>ft.router.router.find("GET",t.path)==null?ke():ae.ok());ft.router.get("/ping",x2);ft.router.get("/health",S2);ft.router.get("/version",_2);ft.router.get("/v1/ping",x2);ft.router.get("/v1/health",S2);ft.router.get("/v1/version",_2);ft.router.get("/v1/imagery/:imageryId/:fileName",EE);ft.router.get("/v1/config/:tileSet.json",iE);ft.router.get("/v1/config/:tileSet/:imageryId.json",nE);ft.router.get("/v1/sprites/:spriteName",RE);ft.router.get("/v1/fonts.json",cE);ft.router.get("/v1/fonts/:fontStack/:range.pbf",lE);ft.router.get("/v1/styles/:styleName.json",Qg);ft.router.get("/v1/tiles/:tileSet/:tileMatrix/style/:styleName.json",Qg);ft.router.get("/v1/tiles/:tileSet/:tileMatrix/tile.json",TE);ft.router.get("/v1/tiles/:tileSet/:tileMatrix/:z/:x/:y.:tileType",LE);ft.router.get("/v1/tiles/:tileSet/:tileMatrix/attribution.json",t2);ft.router.get("/v1/attribution/:tileSet/:tileMatrix/summary.json",t2);ft.router.get("/v1/tiles/:tileSet/:tileMatrix/WMTSCapabilities.xml",Jd);ft.router.get("/v1/tiles/:tileSet/WMTSCapabilities.xml",Jd);ft.router.get("/v1/tiles/WMTSCapabilities.xml",Jd);ft.router.get("/v1/arcgis/rest/services/:tileSet/VectorTileServer",eE);ft.router.post("/v1/arcgis/rest/services/:tileSet/VectorTileServer",V7);ft.router.get("/v1/arcgis/rest/services/:tileSet/VectorTileServer/root.json",Q7);ft.router.get("/v1/arcgis/rest/info",$7);0&&(module.exports={handler});
|
|
217
|
-
/*! fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
|
218
|
-
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
|
219
|
-
/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
|
|
220
|
-
/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
|
221
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
222
|
-
/**
|
|
223
|
-
* splaytree v3.1.0
|
|
224
|
-
* Fast Splay tree for Node and browser
|
|
225
|
-
*
|
|
226
|
-
* @author Alexander Milevski <info@w8r.name>
|
|
227
|
-
* @license MIT
|
|
228
|
-
* @preserve
|
|
229
|
-
*/
|